-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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_dumpState
full block load doesn't work
#8213
Comments
this looks more like an issue with how the state is reinserted |
Another weirdness we just noticed: Start anvil chain with a loaded state (with block > 0). Then: cast block-number // prints 200 (or whatever block the loaded state was dumped at)
cast block --rpc-url --field "number" // prints 0... ?!?!?! and then if you cast block-number // prints 201 (or whatever)
cast block --rpc-url --field "number" // prints 201 ?!? |
This is affecting me as well. Any insight about why this happens, and a potential fix? |
foundry/crates/anvil/src/eth/backend/mem/storage.rs Lines 337 to 346 in 72e44fb
state loading above is not hydrating the foundry/crates/anvil/src/eth/backend/mem/storage.rs Lines 214 to 230 in 72e44fb
This makes the get below to fail, because transaction is not there. foundry/crates/anvil/src/eth/backend/mem/mod.rs Line 1545 in 72e44fb
|
Could this issue be related to #8179 ? |
Component
Anvil
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (3abac32 2024-06-20T00:22:07.769597000Z)
What command(s) is the bug in?
anvil --dump/load-state & cast block n --full
Operating System
macOS (Apple Silicon)
Describe the bug
This is a followup to #8160. There was a bug left in that PR, which is now affecting me. It seems like full block are not dumped properly:
Does anyone know what the difference between
cast block n
andcast block n --full
, and any intuition as to why blocks can be found, but not full blocks?When querying via geth's BlockByNumber (which queries https://www.quicknode.com/docs/ethereum/eth_getBlockByNumber), I get panics, which seems to indicate that geth sets the
transaction_detail_flag
to true (equivalent to-full
flag in cast?)The text was updated successfully, but these errors were encountered: