-
Notifications
You must be signed in to change notification settings - Fork 51
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 a checkpoint warp sync system to the full node #131
Comments
Requires #166 because Polkadot (and presumable other chains) uses child tries in its recent blocks. |
Now that #166 is done, we can progress here. The design issues are the same as in Substrate: is it a good idea to store a partially-downloaded warp sync chain storage in the database? If the node stops for a long time, it is likely that we can't find any node capable of serving the chain storage that we have partially downloaded anymore. |
A solution to this problem is that the full node could download and execute blocks on top of the finalized block while it is still downloading the state of the finalized block, using storage proofs if during the execution some items are missing. Once a block has been executed, we know that any item not modified during the execution is identical between the parent block and the child block. If the storage of the parent block becomes inaccessible, we can still continue by using the storage of the child block instead. Consequently, I think that the full node should simply use the same warp syncing code as the light client, and then download the storage asynchronously from one of its high level services. |
(I had a branch almost ready that adds a separate mode to the warp syncing algorithm that downloads the entire storage, but I'm throwing it away now) |
Changes that need to be made:
|
The last feature that is missing is the possibility to not verify a certain block yet (as we're currently downloading some items that we're missing from the storage of its parent). |
paritytech/smoldot#165
The text was updated successfully, but these errors were encountered: