Skip post-warp-sync wait in parachain bootstrap#3246
Open
Conversation
Contributor
Author
Benchmark resultsPaseo + Asset Hub Paseo, time-to-finalized, n=10 iterations.
Highlights:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After a relay-chain warp sync, the runtime_service places the warp-synced block directly as the outer
finalized_block— it never enters the innerasync_tree, so subscribers never receiveBlock/Finalizednotifications for it.fetch_parachain_head_from_relaywaits for the nextNotification::Finalized, which only fires when the relay finalizes the block after the warp-synced one (~6–12 s).Fix
Reshape the warp-sync
MustSubscribepath so the warp-synced block flows through the normalOutputUpdate::Block→OutputUpdate::Finalizedsequence:pre_warp_finalized) becomes the tree's initial finalized state — a tree-level predecessor only, not the real chain parent.input_finalize'd.pre_warp_finalizedas initial finalized, thenBlock(warp_synced)+Finalized(warp_synced)on the channel back-to-back.pre_warp_finalizedis pruned the moment warp-synced is finalized; its placeholder runtime isErr(CodeNotFound).This PR replaces #3210