-
Notifications
You must be signed in to change notification settings - Fork 629
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
store: add proof to ViewState response #7593
Conversation
@mina86 I think I've broken something when merging master. Can you take a look? |
Yes, that’s expected. Previously iterator would fetch an unnecessary node which ended up included in the proof. With the seek_prefix change this no longer happens and the proof is one node shorter. |
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.
Great, thanks!
Sorry it took so long, but it turned out to be more convoluted than it appeared at first sight. Especially since it is part of public API and we had the whole borsh red herring at the beginning. But we’re finally here! \o/
I'm going to cry! Thanks for your support @mina86 |
Introduce visited_nodes to TrieIterator which records raw bytes of all the nodes the iterator visits. Those are then returned as proof in response to ViewState request. Since the exact nodes the iterator visited are included in the proof, it is therefore possible to verify all the values returned in the state. At the moment the proof is always included. Fixes: #2076
Introduce visited_nodes to TrieIterator which records raw bytes of all
the nodes the iterator visits. Those are then returned as proof in
response to ViewState request. Since the exact nodes the iterator
visited are included in the proof, it is therefore possible to verify
all the values returned in the state.
At the moment the proof is always included.
Fixes: #2076