Comments (10)
I guess we should consider dumping all blocks as well?
should be possible, and yes "just didn't know what people need!"
from foundry.
this happens because storage hashes are not dumped / reloaded from state file
foundry/crates/anvil/src/eth/backend/mem/mod.rs
Line 1474 in 9148dbc
@mattsse would be ok to include them?
le: it will also require persisting blocks which cannot be deserialized out of the box....
from foundry.
Bump. Still seeing this error which is blocking us from switching to anvil (which we would love to now that the RLP encoding fix has unblocked us):
2024-04-10T05:07:05.562591Z ERROR foundry_evm_core::fork::init: It looks like you're trying to fork from an older block with a non-archive node which is not supported. Please try to change your RPC url to an archive node if the issue persists.
Error:
Could not instantiate forked environment with fork url: http://localhost:8545
Context:
- Failed to get block for block number: 64
latest block number: 64
from foundry.
Any updates on this? It looks like it should be a relatively simple fix?
from foundry.
block 0 is technically the correct number for the genesis block
any update @mattsse
from foundry.
It looks like it should be a relatively simple fix?
what's the fix here?
blocks are not exported, just the state, should they be included?
from foundry.
@mattsse was just carelessly saying.. my bad; I have never actually dived into the anvil codebase.
Just assumed this was "simple" from https://x.com/gakonst/status/1775266582966788549
We have all this info and dumping more stuff is a simple job, just didn't know what people need!
So was assuming you guys would soon be able to dump the block info as well as events (see my other #5906 )
But not sure why @grandizzy was saying blocks can't be deserialized out of the box?
from foundry.
Assuming this to be an issue in my case as well.
My goal is to have a persisted anvil setup to be served along with Otterscan, basically creating a persisted on-premise testnet.
On the first launch, when there is no state to load, everything works fine, but after the restart, transaction history (and the block history) can't be loaded. In the image attached below you can see an account having a non-10,000 ETH balance (since it broadcasted some transactions, but they never loaded).
Assuming that if this issue gets fixed, Otterscan would be able to read block data properly.
from foundry.
@mattsse, friendly bump 👉💙
from foundry.
@mattsse opened a PR with something working. Let me know what you think.
from foundry.
Related Issues (20)
- bug: release workflow failed HOT 2
- Hex data being truncated in `anvil_dumpState` HOT 6
- feature request for cast(UX upgrade): cast block returning block time in human-readable string. HOT 1
- bug(forge): tx.origin is incorrect with prank HOT 2
- Extract forked backend and db to a standalone repo HOT 3
- Add printing of OPCODEs in forge tests
- test: add forge verify-bytecode test
- bug: `anvil_dumpState` full block load doesn't work HOT 1
- request: getLastBlockWallTime debug rpc method HOT 1
- Dynamic linking stops working for version `forge 0.2.0 (fd87888 2024-06-17T00:19:40.934209349Z)` HOT 1
- Enable anvil / default accounts to be unlocked by default in scripting during local tests
- Anvil -- Fork off a Tx HOT 6
- Doesn't `vm.expectRevert()` recognize the revert function call with `async parameter`? HOT 4
- `eth_sendTransaction` does not return the hash of the transaction but the signing hash. HOT 1
- Anvil fork to specific block: eth_getLogs is empty
- Undeclared identifier for "deal" cheatcode HOT 2
- --verifier-url in forge verify-contract doesn't change the URL that the contract is submitted for verifciation HOT 1
- Partial verify-bytecode not working as expected
- Make debugger UI configurable to force or switch four quadrants layout HOT 2
- Foundry book or foundry.toml updated with the latest support for cancun HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foundry.