-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug(anvil
): --cache-path
is ignored
#9639
Comments
--cache-path
is ignoredanvil
): --cache-path
is ignored
What you see in the trace log: |
My end goal is to reuse fork's state in tests. I want Anvil to fork an existing chain, run my tests on Anvil's RPC once, then save the cache/state/snapshot/etc, commit to git, and reuse in the tests so that further test runs enjoy fast Anvil start, ie not wait for the I've tried different approaches: So I thought to use the Could you please give me some advice on that setup? Is that possible, what's the best way to approach that? Currently, it seems that the best I can is to put Thank you! |
@folex You'd want to use If you're using the API you can do the following:
|
@yash-atreya hm, Now, after However, if I do the following
It still goes fetch storage via a bunch of From what I observe and understand, it seems that only If my conclusion is correct, it would be helpful to be able to override the Another thing I've noticed is that if I start Anvil fork with
|
Another unexpected thing is that if I start Anvil not from within a terminal, but from the Rust code like that:
It does a lot of Anvil started from within terminal works instantly (for the second time). I wonder, where the difference comes from 🤔 Once I passed
So there must be some difference in default parameters in anvil-cli-from-terminal and anvil-cli-from-rust :) |
Component
Anvil
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.3.0 (5e72c69 2025-01-07T00:23:20.105032000Z)
What command(s) is the bug in?
anvil --fork-url
Operating System
macOS (Apple Silicon)
Describe the bug
Hello, folks!
It seems that for me, anvil ignores
--cache-path
:Am I doing something wrong here?
copied from #8654 (comment)
The text was updated successfully, but these errors were encountered: