Skip to content

fix(sync): avoid node ban after justification error UnknownTargetBlock#3257

Merged
lrubasze merged 4 commits into
mainfrom
gab_avoid_ban_for_justification
May 22, 2026
Merged

fix(sync): avoid node ban after justification error UnknownTargetBlock#3257
lrubasze merged 4 commits into
mainfrom
gab_avoid_ban_for_justification

Conversation

@gab8i

@gab8i gab8i commented May 13, 2026

Copy link
Copy Markdown
Contributor

After warp sync finishes, the non finalized tree contains just the warp-sync target block. The node now needs to catch up from that target to the chain tip. During that window, peers will send justifications targeting blocks the local node hasn't yet downloaded.

Not banning the node avoids delays in receiving important data needed to continue the sync.

This has been extracted from paritytech/smoldot-archive#2222, but not being relevant only to WebRTC, it has been moved into its own pr.

After warp sync finishes, the non finalized tree contains just
the warp-sync target block. The node now needs to catch up from that
target to the chain tip. During that window, peers will send
justifications targeting blocks the local node hasn't yet downloaded.

Not banning the node avoid delaying into receving important data
needed to continue the sync.

@lrubasze lrubasze left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice finding!

@lexnv lexnv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! 🙏

@lrubasze
lrubasze merged commit 2ffabfa into main May 22, 2026
44 of 45 checks passed
@lrubasze
lrubasze deleted the gab_avoid_ban_for_justification branch May 22, 2026 10:03
@lrubasze lrubasze mentioned this pull request May 29, 2026
lrubasze added a commit that referenced this pull request Jun 1, 2026
This is to:
- publish `smoldot-v3.1.4` npm.
- publish crates `smoldot-light v1.1.4`, `smoldot v1.1.3`

## Changes

### Changed

- Revert the immediate parachain block delivery introduced in 3.1.3.
([#3267](#3267))
- Decide the parachain bootstrap mode up front so `chainHead_v1_follow`
subscribers receive an authoritative finalized block instead of a stale
chain-spec checkpoint.
([#3268](#3268))
- Prefer chain-spec bootnodes for relay-chain gossip slots until a chain
has an open gossip link, speeding up the first relay-chain gossip after
a warm restart.
([#3273](#3273))
- Shorten handshake and peer-ban timeouts to speed up peer discovery
after a restart.
([#3269](#3269))

### Fixed

- Fix \`forbidNonLocalWs\` auto-detection in browsers, which previously
never forbade non-local WebSocket connections on secure origins.
([#3262](#3262))
- Avoid banning peers that send justifications targeting
not-yet-downloaded blocks during post-warp-sync catch-up, removing sync
delays. ([#3257](#3257))
- Floor the statement-distribution affinity bloom filter size so sparse
topic subscriptions still produce a realistically-sized filter.
([#3265](#3265))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants