Bounty
XE-16884 · Bounty

[Low] block_request pull fails for lease blocks and high-signature multisig blocks (64-block cap vs 64 KiB messenger cap)

Closed · duplicate — xe#684 filed 2026-11-17 07:04 UTC by kecedanzz77-bit

Report

Summary

block_request caps responses at 64 blocks but has no byte-size cap — and 64 contested-type blocks exceed the client's 64 KiB decode limit. The pull fails for exactly the block types most likely to be forked: lease blocks and high-signature multisig blocks.

Root Cause

  • SetupBlockSync (net/blocksync.go:31-45) caps at MaxBlockRequestHashes = 64 blocks, with no byte-size limit.
  • The client decodes via io.LimitReader(s, MsgMaxResponseSize) (net/msg.go:172, MsgMaxResponseSize = 65536, net/msg.go:24). A response over the cap fails the whole decode, so PullBlocks ingests nothing.
  • The pull path is pullPhantomBlocks (node/node.go:939) — the recovery path for dropped/phantom fork blocks.

Impact

Fork recovery via pull fails for lease blocks and high-signature multisig blocks — the block types most likely to be contested. Minimal sends fit, so the failure is silent and type-dependent: a node missing forked lease blocks cannot recover them through the designed pull path.

Verification

Executed PoC (real core.Block JSON sizes):

block_request 64 minimal blocks: 28719 bytes (over cap: false)
block_request 64 x 3-sig blocks: 63727 bytes (over cap: false)
block_request 64 x 10-sig blocks: 164527 bytes (over cap: true)
lease block (3 attestations) JSON: 1236 bytes
block_request 64 x lease blocks: 79215 bytes (over cap: true)

64 × 3-signature multisig blocks already sit at 97% of the cap.

Note on related reports

Same class as #366 (cert sync) — cited as precedent; this is the block handler, a different code path with its own fix. Distinct from #350 (hash pre-checks, no size cap). Searched "block_request 64 KiB" — no covering report.

Suggested fix

Cap the block response by bytes (in addition to the 64-block count cap), or shrink the count cap for large block types, with pagination for the remainder.

Thread

Joseph Denneteam2026-11-22 23:26 UTCdesk

Thanks. This is the same finding as https://bounty.xe.network/XE-0436, which was filed first; the programme pays the first verifiable submission, so this one closes as a duplicate. If you believe it is a different bug, file a new report that links https://bounty.xe.network/XE-16884 and says what differs; it is read like any other.