-
Notifications
You must be signed in to change notification settings - Fork 790
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
Use node hash as db key #3472
Use node hash as db key #3472
Conversation
Some context question: there is this notion of "path based DB storage/access" for clients which was discussed recently and other clients I guess also practically implemented. Never dug too much into that, do you guys have some oversight/intuition/whatever how much this is related to this key scheme we change here? Might the old format also have advantages in this regard, or is this unrelated? (and might it be an option/being useful to allow both e.g.?) Just throwing in the ring, not necessarily needed to start a big topic/discussion, so feel free to answer as short as you want! 🙂 |
I discussed it with @kevaundray in the context of |
Thanks for this extensive explanation 🙏 (sorry, came only now towards reading it) |
This makes several small updates to
verkle
preparing for implementation oftrie.push
VerkleTrie
class to use output fromverkleCrypto.serializeCommitment
as db key for root node instead ofROOT_DB_KEY
(serialized commitment is needed for the verkle state root when we start creating block execution proofs)findPath
test to useverklenode.hash
instead of the partial path as the db key (to ensure that we can find nodes from previous state roots and not overwrite them everytime a node at a given partial path changes)findPath
test to use result fromfindPath
when inserting a new node into the trie. This gives a cleaner example of howtrie.put
should workverkle-cryptography-wasm
to v0.4.5