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

Add finalized block runtime code and heap_pages to wasm node database #1769

Open
tomaka opened this issue Dec 10, 2021 · 2 comments
Open

Add finalized block runtime code and heap_pages to wasm node database #1769

tomaka opened this issue Dec 10, 2021 · 2 comments
Labels
blocked Can't work on this issue because it is blocked on something out of our control

Comments

@tomaka
Copy link
Contributor

tomaka commented Dec 10, 2021

The wasm node database should contain the finalized block runtime code and heap pages.
Additionally, we should start by querying the hash of the runtime code from the network, instead of the value, and compare it against the hash stored in the database.
This would save the user from downloading the runtime if it hasn't changed since last time.

@tomaka
Copy link
Contributor Author

tomaka commented Dec 10, 2021

Thanks to #1773 we can now be sure that adding the runtime to the database will not make it exceed the maximum allowed size for local storage.

@tomaka
Copy link
Contributor Author

tomaka commented Dec 15, 2021

querying the hash of the runtime code from the network, instead of the value

This is the major remaining item in this issue.

@tomaka tomaka added the blocked Can't work on this issue because it is blocked on something out of our control label Feb 14, 2022
mergify bot added a commit that referenced this issue Nov 30, 2022
Before this PR, the warp syncing code asks "hey I'd like to know the
runtime", and the upper layers download a Merkle proof, verify it, and
give the storage values to the warp syncing code.

This PR modifies this. The warp syncing code now asks for a Merkle proof
of arbitrary keys, and the upper layers download that proof and give to
the warp syncing code. It is the warp syncing code that verifies said
proof.

The objective of this PR is simplification of the API surface of the
syncing code.
It will also make it easier to implement
#1769, as it is now clear
who is responsible for first downloading only the hash.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Can't work on this issue because it is blocked on something out of our control
Projects
None yet
Development

No branches or pull requests

1 participant