Skip to content
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

feat(anvil): ability to dump / load state including the blockchain history, not just resulting state #7955

Closed
Tracked by #8269
kayabaNerve opened this issue May 21, 2024 · 1 comment · Fixed by #8411
Labels
C-anvil Command: anvil T-feature Type: feature

Comments

@kayabaNerve
Copy link
Contributor

Component

Anvil

Describe the feature you would like

dumpState/loadState only dumps/loads the EVM state. I'm working on a multi-nodal testing environment where I control block production (making Kurtosis not a candidate for this environment) and was hoping for dumpState/loadState be usable to cause one Anvil instance's blockchain to become another Anvil instance's.

Since dumpState/loadState only explicitly covers the EVM state, I now have one instance with a bunch of blocks, one instance with no blocks, and two indexers on my end with different results.

I'm not explicitly requesting a behavior change in dumpState/loadState and am fine if this is introduced as dumpChain/loadChain.

Additional context

No response

@kayabaNerve kayabaNerve added the T-feature Type: feature label May 21, 2024
@stevenvaleri
Copy link

Came here to request this feature for a different reason. I'd like to simulate a specific scenario of transactions and then run (non-foundry) scripts against them. The scenario uses cheats to advance the blocktime, and the script I'm testing is dependent on time passing. Of course I can execute all of the transactions every time to prepare the state / blocks, but this takes a while. LoadState doesn't work since the state is loaded, but the advances in block time are not accounted for.

@zerosnacks zerosnacks added the C-anvil Command: anvil label Jun 27, 2024
@zerosnacks zerosnacks changed the title Cheat to save/load the blockchain feat(anvil): ability to dump / load state including the blockchain history, not just resulting state Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-anvil Command: anvil T-feature Type: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants