Skip to content
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

ext_storage_get_version_1 behavior w.r.t. child tries #577

Open
tomaka opened this issue Nov 3, 2022 · 0 comments
Open

ext_storage_get_version_1 behavior w.r.t. child tries #577

tomaka opened this issue Nov 3, 2022 · 0 comments
Assignees

Comments

@tomaka
Copy link
Collaborator

tomaka commented Nov 3, 2022

When reading the location of a child trie using ext_storage_get_version_1, the trie root hash of the child trie should be returned.

But there's a twist: the returned hash only takes into account the child trie writes that have been performed until the last time ext_storage_child_storage_root_version_1 was called.

On the other hand, ext_storage_child_storage_root_version_1 always recalculates the trie root hash of the child trie and takes into account all the writes that have been performed.

So for example if you call ext_storage_child_set_version_1, then ext_storage_child_storage_root_version_1, then ext_storage_child_set_version_1 again, then read the child trie root hash using ext_storage_get_version_1, it returns the hash that ext_storage_child_storage_root_version_1 returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants