-
Notifications
You must be signed in to change notification settings - Fork 26
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
One simple question about zk_trie_impl #1
Comments
The value of dbKeyRootNode is (DBEntryTypeRoot+mt.rootKey) and mt.rootKey is changed in TryUpdate, so...... |
Yeah, but the My question is, if more than one zkTries exist at the same time, will there be conflict or overwriting in their Root updates? |
OK, I got your question, but I don't know why~ |
Haha, there seems to be no conflict problem encountered now. So I'm curious if there are other mechanisms to avoid read conflicts. |
Having understood that, I think I know why there is no conflict at the current codebase. |
Can you tell me about it please? |
Basically, I think this function call is redundant since it just inserts a KV with a constant key. There is no other function to query this KV and the Root value of each contract's Storage Trie does not point to this KV. Therefore, this function call is just writing continuously and does not cause any conflicts. Maybe could optimize this area in the future 😊. |
fix trie node and add a few node related tests
Hi, may I ask what the purpose of this line in
TryUpdate
function is?The value of
dbKeyRootNode
is not changed inTryUpdate
process . So this function call will always insert the KV with the sameKey
into the DB, right?Please correct me if I have a misunderstanding.
The text was updated successfully, but these errors were encountered: