-
Notifications
You must be signed in to change notification settings - Fork 21.5k
cmd/evm/internal/t8ntool, trie: support for verkle-at-genesis, use UBT, and move the transition tree to its own package #32445
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
Changes from all commits
a0e6f53
d729550
e94d14c
8704f12
4d68af3
d972963
ed3caba
b657f73
8e08bf3
922e0ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -88,6 +88,14 @@ var ( | |
| "\t<file> - into the file <file> ", | ||
| Value: "block.json", | ||
| } | ||
| OutputBTFlag = &cli.StringFlag{ | ||
| Name: "output.vkt", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agreed, but the reason why we keep this is because we are dependent on a branch of execution spec tests that is no longer maintained and it has all these fields hardcoded.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so I'm banking on the fact this code can be removed soon. |
||
| Usage: "Determines where to put the `BT` of the post-state.\n" + | ||
| "\t`stdout` - into the stdout output\n" + | ||
| "\t`stderr` - into the stderr output\n" + | ||
| "\t<file> - into the file <file> ", | ||
| Value: "vkt.json", | ||
| } | ||
| InputAllocFlag = &cli.StringFlag{ | ||
| Name: "input.alloc", | ||
| Usage: "`stdin` or file name of where to find the prestate alloc to use.", | ||
|
|
@@ -123,6 +131,11 @@ var ( | |
| Usage: "`stdin` or file name of where to find the transactions list in RLP form.", | ||
| Value: "txs.rlp", | ||
| } | ||
| // TODO(@CPerezz): rename `Name` of the file in a follow-up PR (relays on EEST -> https://github.com/ethereum/execution-spec-tests/tree/verkle/main) | ||
| InputBTFlag = &cli.StringFlag{ | ||
| Name: "input.vkt", | ||
| Usage: "`stdin` or file name of where to find the prestate BT.", | ||
| } | ||
| SealCliqueFlag = &cli.StringFlag{ | ||
| Name: "seal.clique", | ||
| Usage: "Seal block with Clique. `stdin` or file name of where to find the Clique sealing data.", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the MPT, the statedb re-init is essential, as after the commit, the mutated nodes are all converted as the hash and de-reference from the trie.
The only way to access the them is re-open the trie with new root hash.
I am not sure how it's handled in the binaryTrie. I guess it somehow still reference the new nodes after the commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After
Commit(), all mutated nodes are converted to hash nodes (line 763 in trie.go:t.root = newCommitter(...).Commit(...)).committerreplaces all dirty nodes with their hash representationsThat's why we need to re-open the trie with
state.New(root, sdb)to get a fresh trie that can load nodes from the database.In Binary Trie (Verkle/Binary):
So you are right, we should check if we're in Bintrie EIP. And if so, do this, otherwise, if we are using MPT we should avoid doing that.
Does that make sense @gballet ?