-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Refactoring preparation: Extract import queue out of Sync. #11295
Comments
hi @altonen, so here are the main ideas/solutions we had planned for the Sync in general:
The state machine would have the following flows: Here are details of how each sync. mode would look like: You can also find all the related issues to this here: https://github.com/orgs/paritytech/projects/18/views/13 |
When sync fails, there is no real solution than let the operator step in. For example, If something like warp sync fails because some block can not be verified, we can not just fall back to initial sync. While the above images mainly concentrate on the different syncing strategies and how they work on a high level. They also contain some useful information for this issue. Currently in Substrate we have two ways of how blocks get imported, via block authoring and via the import queue. The only difference is that the import queue is verifying the blocks before importing them, after that the code path should be the same. If you take a look the pictures above, we already have added this behavior to syncing. It first verifies headers on announcement and only requests the blocks on successful verification. Verification should only include stuff like checking the seal of the header. Then when the block is imported we could directly forward it to the block import. Block authoring would use the same block import code path in contrast to the current implementation where these code paths are differ a little bit. For Parachains we have another path of where we can receive blocks and that is via pov recovery. This will also benefit from these changes here. |
I've started working on this as well, mainly just getting it out of |
Improve the import queue, allow importing blocks without execution.
Long-term it shouldn’t import justifications, we can remove the
JustificationImport
trait.The text was updated successfully, but these errors were encountered: