Skip to content

Warp sync: Warp proof block import should not mark as leaf#11152

Merged
skunert merged 11 commits intomasterfrom
skunert/warp-sync-fix-leaves
Feb 26, 2026
Merged

Warp sync: Warp proof block import should not mark as leaf#11152
skunert merged 11 commits intomasterfrom
skunert/warp-sync-fix-leaves

Conversation

@skunert
Copy link
Copy Markdown
Contributor

@skunert skunert commented Feb 23, 2026

While warp syncing a node, I saw some huge stalls. What happens:

  • During warp sync we store warp proofs
  • After warp sync we start gap sync
  • Problem: Once gap sync finishes, node starts looking for displaced leaves from all the warp proof blocks, which was over 2500 in my observed case. This led to a 30minutes stall.

In this PR I propose to import the blocks during warp sync with a Disconnected state, which does not add them as leaves. This fixes the downtime.

@skunert skunert added T0-node This PR/Issue is related to the topic “node”. A5-run-CI Run CI on draft PR labels Feb 23, 2026
@skunert
Copy link
Copy Markdown
Contributor Author

skunert commented Feb 24, 2026

/cmd prdoc --audience node_dev --bump major

@skunert
Copy link
Copy Markdown
Contributor Author

skunert commented Feb 24, 2026

/cmd fmt

@skunert skunert requested review from a team and lrubasze February 24, 2026 09:04
@skunert skunert marked this pull request as ready for review February 24, 2026 14:01
Comment thread substrate/client/api/src/backend.rs
@skunert skunert enabled auto-merge February 26, 2026 14:33
@skunert skunert added this pull request to the merge queue Feb 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Feb 26, 2026
@skunert skunert enabled auto-merge February 26, 2026 20:58
@skunert skunert added this pull request to the merge queue Feb 26, 2026
@skunert skunert removed this pull request from the merge queue due to a manual request Feb 26, 2026
@skunert skunert requested review from a team as code owners February 26, 2026 22:10
@skunert skunert enabled auto-merge February 26, 2026 22:10
@skunert skunert added this pull request to the merge queue Feb 26, 2026
Merged via the queue into master with commit 44a03f0 Feb 26, 2026
247 of 250 checks passed
@skunert skunert deleted the skunert/warp-sync-fix-leaves branch February 26, 2026 23:47
lrubasze pushed a commit that referenced this pull request Mar 4, 2026
While warp syncing a node, I saw some huge stalls. What happens:

- During warp sync we store warp proofs
- After warp sync we start gap sync
- Problem: Once gap sync finishes, node starts looking for displaced
leaves from all the warp proof blocks, which was over 2500 in my
observed case. This led to a 30minutes stall.

In this PR I propose to import the blocks during warp sync with a
Disconnected state, which does not add them as leaves. This fixes the
downtime.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
lrubasze added a commit that referenced this pull request Mar 5, 2026
@lrubasze lrubasze added the A4-backport-stable2603 Pull request must be backported to the stable2603 release branch label Mar 6, 2026
@paritytech-release-backport-bot
Copy link
Copy Markdown

Created backport PR for stable2603:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-11152-to-stable2603
git worktree add --checkout .worktree/backport-11152-to-stable2603 backport-11152-to-stable2603
cd .worktree/backport-11152-to-stable2603
git reset --hard HEAD^
git cherry-pick -x 44a03f017e2610f163c9ac26dee7ba158418384f
git push --force-with-lease

lrubasze pushed a commit that referenced this pull request Mar 6, 2026
While warp syncing a node, I saw some huge stalls. What happens:

- During warp sync we store warp proofs
- After warp sync we start gap sync
- Problem: Once gap sync finishes, node starts looking for displaced
leaves from all the warp proof blocks, which was over 2500 in my
observed case. This led to a 30minutes stall.

In this PR I propose to import the blocks during warp sync with a
Disconnected state, which does not add them as leaves. This fixes the
downtime.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 44a03f0)
lexnv added a commit that referenced this pull request Mar 6, 2026
lrubasze added a commit that referenced this pull request Mar 6, 2026
Backport #11152 into `stable2603` from skunert.

This PR fixes the downtime, which might happen after completed warp and
gap sync.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

---------

Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Lukasz Rubaszewski <117115317+lrubasze@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A4-backport-stable2603 Pull request must be backported to the stable2603 release branch A5-run-CI Run CI on draft PR T0-node This PR/Issue is related to the topic “node”.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants