{"id":"XE-16884","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"684","source_url":"https://github.com/xeprotocol/xe/issues/684","reporter_id":2920,"title":"[Low] block_request pull fails for lease blocks and high-signature multisig blocks (64-block cap vs 64 KiB messenger cap)","area":"p2p-sync","claimed_tier":null,"assessed_tier":null,"verdict":"duplicate","duplicate_of":"XE-0436","tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"open","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-17T07:04:22.966825+00:00","updated_at":"2026-11-22T23:26:12.291029+00:00","source_created_at":"2026-11-17T07:04:03+00:00","told_at":"2026-11-22T23:26:12.321323+00:00","status_changed_at":"2026-11-22T23:26:12.301067+00:00","url":"https://bounty.xe.network/XE-16884","body":"## Summary\n\n`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.\n\n## Root Cause\n\n- `SetupBlockSync` (`net/blocksync.go:31-45`) caps at `MaxBlockRequestHashes = 64` blocks, with no byte-size limit.\n- 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.\n- The pull path is `pullPhantomBlocks` (`node/node.go:939`) — the recovery path for dropped/phantom fork blocks.\n\n## Impact\n\nFork 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.\n\n## Verification\n\nExecuted PoC (real `core.Block` JSON sizes):\n\n```\nblock_request 64 minimal blocks: 28719 bytes (over cap: false)\nblock_request 64 x 3-sig blocks: 63727 bytes (over cap: false)\nblock_request 64 x 10-sig blocks: 164527 bytes (over cap: true)\nlease block (3 attestations) JSON: 1236 bytes\nblock_request 64 x lease blocks: 79215 bytes (over cap: true)\n```\n\n64 × 3-signature multisig blocks already sit at 97% of the cap.\n\n## Note on related reports\n\nSame 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.\n\n## Suggested fix\n\nCap 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.\n","patch_refs":[],"thread":[{"id":18807,"source":"desk","source_ref":"reply:16484","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as https://bounty.xe.network/XE-0436, which was filed first; the programme pays the\nfirst verifiable submission, so this one closes as a duplicate. If you believe it is a different\nbug, file a new report that links https://bounty.xe.network/XE-16884 and says what differs; it is read like any other.","created_at":"2026-11-22T23:26:12.291029+00:00"}]}