Skip to content

[stable2603] Backport #10752#11296

Merged
lrubasze merged 2 commits intostable2603from
backport-10752-to-stable2603
Mar 6, 2026
Merged

[stable2603] Backport #10752#11296
lrubasze merged 2 commits intostable2603from
backport-10752-to-stable2603

Conversation

@paritytech-release-backport-bot
Copy link
Copy Markdown

@paritytech-release-backport-bot paritytech-release-backport-bot Bot commented Mar 6, 2026

Backport #10752 into stable2603 from lrubasze.

This PR significantly optimize DB and network usage when Gap sync is used (bodies are no longer requested). It also reduces gap sync duration.

See the documentation on how to use this bot.

### Summary
This PR optimizes gap sync bandwidth usage by skipping body requests for
non-archive nodes. Bodies are unnecessary during gap sync when the node
doesn't maintain full block history, while archive nodes continue to
request bodies to preserve complete history.
It reduces bandwidth consumption and database size significantly for
typical validator/full nodes.

Additionally added some gap sync statistics for observability:
- Introduced `GapSyncStats` to track bandwidth usage: header bytes, body
bytes, justification bytes
- Logged on gap sync completion to provide visibility into bandwidth
savings

---------

Co-authored-by: sistemd <enntheprogrammer@gmail.com>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit e23e645)
@github-actions github-actions Bot added the A3-backport Pull request is already reviewed well in another branch. label Mar 6, 2026
@github-actions github-actions Bot requested a review from lrubasze March 6, 2026 13:05
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

This pull request is amending an existing release. Please proceed with extreme caution,
as to not impact downstream teams that rely on the stability of it. Some things to consider:

  • Backports are only for 'patch' or 'minor' changes. No 'major' or other breaking change.
  • Should be a legit fix for some bug, not adding tons of new features.
  • Must either be already audited or not need an audit.
Emergency Bypass

If you really need to bypass this check: add validate: false to each crate
in the Prdoc where a breaking change is introduced. This will release a new major
version of that crate and all its reverse dependencies and basically break the release.

@lrubasze lrubasze merged commit 97e8f98 into stable2603 Mar 6, 2026
239 of 246 checks passed
@lrubasze lrubasze deleted the backport-10752-to-stable2603 branch March 6, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A3-backport Pull request is already reviewed well in another branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant