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

Modify runtime_host.rs to support child tries #684

Merged
merged 12 commits into from
Jun 7, 2023

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Jun 7, 2023

cc #166

This PR finishes adding support for child tries in the light client.

A list of child trie diffs is now maintained in runtime_host.rs (the equivalent of the so-called overlay in Substrate).

In terms of API, all the query variants now have a child_trie() function that should be inspected before fulfilling the request.
The ClosestDescendantMerkleValue had to be modified to accept an Option for the Merkle value, as it is now possible for the child trie to not exist.

There are several uncertainties w.r.t. how child tries work, and they'll need to be fixed with further PRs. However, this is unlikely to require any more API change.

@tomaka tomaka added this pull request to the merge queue Jun 7, 2023
Merged via the queue into smol-dot:main with commit b52155b Jun 7, 2023
@tomaka tomaka deleted the runtime-host-child-tries branch June 7, 2023 09:33
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

Successfully merging this pull request may close these issues.

1 participant