-
Notifications
You must be signed in to change notification settings - Fork 20.3k
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
block import is broken with verkle #30878
Comments
@holiman you wanted to have a way to reproduce the issue:
Notice that it complains about the genesis hash being incorrect. |
The above comment points out that there is a much bigger issue than just block import: using a This causes this line to consider that we are not in verkle mode, even when we are. But even if we could somehow set this flag properly, it will still be missing important information like the state root hash. The inescapable conclusion, in my view is:
|
I can repro the issue and can confirm guillaume's analysis is correct |
Following a successful
geth init
with a custom genesis block,geth import
will fail.It goes off the rails, checking if the triedb has been
Initialized
at https://github.com/ethereum/go-ethereum/blob/master/core/genesis.go#L295Initialized
will go over the layers, and what happens is that there is only one layer, and it's keyed withtypes.EmptyRootHash
, which is not a valid node value for verkle. In fact, the tree itself shouldn't be empty to begin with, so this value should not show up, regardless of whether or not verkle is supported:The culprit is
loadLayers()
, which will callReadAccountTrieNode
, which will in turn returnnil
. As a result, it will create a new empty layer usingEmptyRootHash
as a root.The text was updated successfully, but these errors were encountered: