-
Notifications
You must be signed in to change notification settings - Fork 6
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
Try verkle on top of snapshot integration #14
base: snapshot-integration
Are you sure you want to change the base?
Try verkle on top of snapshot integration #14
Conversation
Co-authored-by: Ignacio Hagopian <[email protected]>
Thank you! I will try to review and improve it with you. It's easier for me to understand the verkle transition with this change! |
3771b64
to
c6b21d8
Compare
c6b21d8
to
7791fb3
Compare
if len(val) != 0 { | ||
return val, nil | ||
} | ||
// TODO also insert value into overlay |
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.
// TODO also insert value into overlay |
// // no pointer to db available, should the "transition" be done at the reader level instead? | ||
// if t.overlay.db.HasStorageRootConversion(address) { | ||
// data.Root = t.overlay.db.StorageRootConversion(address) | ||
// } |
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.
@rjl493456442 explainer here: because the account root isn't saved in the verkle tree (there is no such thing), the data.Root
field would always be empty, which would confuse the layer. So I implemented this conversion table that, given an address, would give the historical root. That might no longer be necessary to do in the new model. But if it is, we'd have to think on how to implement that.
Note: since only reads are searching the MPT, it would make sense to implement the logic of reading both trees in the reader only. Writing to the tree always go to the verkle tree, so the whole
TransitionTrie
might not be useful at all.