You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kill anvil, and restart with the same command. current block number will have reverted back to the original
Use case:
I have a docker-compose setup where anvil is spawned in fork mode, and with persistence enabled to make the whole setup resilient.
In some cases, I want to ensure this setup targets a specific block number of the forked chain).
The docker image runs anvil --fork-url ... --fork-block-number ... --state /data/anvil
When restarting the docker-compose setup, the same command will be triggered.
I suppose a quick hack to fix this is to patch the docker entrypoint so that, depending on whether the state file exists, --state or --fork-block-number is added, but not both. This seems like it shouldn't be necessary though
The text was updated successfully, but these errors were encountered:
Component
Anvil
Have you ensured that all of these are up to date?
What version of Foundry are you on?
anvil 0.2.0 (59f354c 2024-12-11T00:25:55.121360682Z)
What command(s) is the bug in?
anvil --fork-url ... --fork-block-number ... --state
Operating System
Linux
Describe the bug
I've seen some recent work (#9215) that fixed issues when
--state
and--fork-url
are used together.However, some issues still seem to persist if
--fork-block-number
is added to the mix.to reproduce:
anvil --fork-url https://eth.llamarpc.com --fork-block-number 21381199 --state foo
cast rpc anvil_mine
Use case:
I have a docker-compose setup where anvil is spawned in fork mode, and with persistence enabled to make the whole setup resilient.
In some cases, I want to ensure this setup targets a specific block number of the forked chain).
The docker image runs
anvil --fork-url ... --fork-block-number ... --state /data/anvil
When restarting the docker-compose setup, the same command will be triggered.
I suppose a quick hack to fix this is to patch the docker entrypoint so that, depending on whether the state file exists,
--state
or--fork-block-number
is added, but not both. This seems like it shouldn't be necessary thoughThe text was updated successfully, but these errors were encountered: