Giter Club home page Giter Club logo

Comments (10)

mattsse avatar mattsse commented on June 27, 2024 2

I guess we should consider dumping all blocks as well?

should be possible, and yes "just didn't know what people need!"

from foundry.

grandizzy avatar grandizzy commented on June 27, 2024

this happens because storage hashes are not dumped / reloaded from state file

BlockNumber::Number(num) => *storage.hashes.get(&U64::from(num))?,

@mattsse would be ok to include them?

le: it will also require persisting blocks which cannot be deserialized out of the box....

from foundry.

samlaf avatar samlaf commented on June 27, 2024

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.

samlaf avatar samlaf commented on June 27, 2024

Any updates on this? It looks like it should be a relatively simple fix?

from foundry.

sambacha avatar sambacha commented on June 27, 2024

block 0 is technically the correct number for the genesis block

any update @mattsse

from foundry.

mattsse avatar mattsse commented on June 27, 2024

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.

samlaf avatar samlaf commented on June 27, 2024

@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.

dalechyn avatar dalechyn commented on June 27, 2024

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).

Screenshot 2024-05-01 at 14 18 58

Assuming that if this issue gets fixed, Otterscan would be able to read block data properly.

from foundry.

dalechyn avatar dalechyn commented on June 27, 2024

@mattsse, friendly bump 👉💙

from foundry.

samlaf avatar samlaf commented on June 27, 2024

@mattsse opened a PR with something working. Let me know what you think.

from foundry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.