{"id":"XE-16883","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"683","source_url":"https://github.com/xeprotocol/xe/issues/683","reporter_id":2920,"title":"[Low] vote_request pull fails once a conflict has >132 votes (unbounded response 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.940748+00:00","updated_at":"2026-11-22T23:26:12.455784+00:00","source_created_at":"2026-11-17T07:03:55+00:00","told_at":"2026-11-22T23:26:12.495272+00:00","status_changed_at":"2026-11-22T23:26:12.475875+00:00","url":"https://bounty.xe.network/XE-16883","body":"## Summary\n\n`vote_request` returns **all** votes for a position with no cap, but the client decodes through a 64 KiB `LimitReader` — so once a conflict has more than 132 votes, the pull fails outright and **zero** votes are ingested (decode is all-or-nothing). The catch-up pull breaks exactly when a conflict gets contentious.\n\n## Root Cause\n\n- `SetupVoteSync` (`net/votesync.go:30`) returns every vote from `VotesForPosition` (`core/finalization.go:529`, wired at `node/node.go:585`) with **no cap** — unlike the cert handler (256) and the block handler (64).\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 `PullVotes` ingests nothing.\n- Callers: `pullConflictVotes` (`node/node.go:960`) and `pullFrontierVotes` (`:985`).\n\n## Impact\n\nA conflict with 133+ votes can never be caught up via pull. Precondition: 133+ distinct funded+delegated representatives on one conflict (`ValidateVote` requires positive weight, `core/vote.go:282-285`) — grows with network size. Gossip still delivers new votes, so the failure is limited to the catch-up path — but that path is what a lagging or restarted node depends on.\n\n## Verification\n\nExecuted PoC (real `core.Vote` JSON sizes):\n\n```\nsingle vote JSON: 491 bytes\nvote_request: max votes fitting in 65536 bytes: 132\nvote_request with 200 votes: 98545 bytes (over cap: true)\n```\n\n## Note on related reports\n\nSame class as #366 (cert sync, ~65 certs) — cited as precedent; this is the vote handler, a different code path with its own fix. Distinct from #350 (PullVotes pre-checks, no size cap) and #161 (vote-store growth). Searched \"vote_request 64 KiB\" — no covering report.\n\n## Suggested fix\n\nCap the vote response by count (and/or bytes) like the cert and block handlers, with pagination or a continuation signal for the remainder.\n","patch_refs":[],"thread":[{"id":18809,"source":"desk","source_ref":"reply:16486","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-16883 and says what differs; it is read like any other.","created_at":"2026-11-22T23:26:12.455784+00:00"}]}