-
Notifications
You must be signed in to change notification settings - Fork 1
Support computing state root with overlayed state #162
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
base: main
Are you sure you want to change the base?
Conversation
🟡 Heimdall Review Status
|
e114fd6
to
e2ea3ad
Compare
e3e202b
to
000e22b
Compare
000e22b
to
aaa2842
Compare
1931a50
to
4cecc8c
Compare
967be05
to
c0c602e
Compare
Review Error for and-cb @ 2025-08-20 20:07:10 UTC |
Review Error for and-cb @ 2025-08-21 01:27:48 UTC |
Review Error for and-cb @ 2025-08-21 16:34:06 UTC |
Review Error for and-cb @ 2025-08-21 16:37:40 UTC |
a521652
to
5267333
Compare
5267333
to
57565f1
Compare
57565f1
to
0501a67
Compare
Adds the ability to compute the state root with state diffs overlayed on top of the persistent db. This allows for rapid, stateless incremental root calculation via a RO transaction.
Performs iterative depth first search traversal using a stack. Adds all known leaves and branch hashes in lexicographic order to a
HashBuilder
, which also collects the set of known branch updates along the way. These known branch updates/hashes can then be used in a future incremental state root calculation, in order to avoid recomputing all leaf-level hashes.Adds an
OverlayState
struct which supports minimal-overhead subslicing and cloning by holding the underlying data within anArc
. This defines not only a set of Account and Storage value updates (Some for upsert, None for deletion), but also may include known intermediate Hashes with shorter paths (not a multiple of 64 nibbles). When a Hash is encountered in the overlay root calculation traversal, this is assumed to be authoritative, bypassing traversal of all children.Accounts in the overlay do not override the state root of the matching persisted account, if one exists.