[Low] vote_request pull fails once a conflict has >132 votes (unbounded response vs 64 KiB messenger cap)
Report
Summary
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.
Root Cause
SetupVoteSync(net/votesync.go:30) returns every vote fromVotesForPosition(core/finalization.go:529, wired atnode/node.go:585) with no cap — unlike the cert handler (256) and the block handler (64).- 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, soPullVotesingests nothing. - Callers:
pullConflictVotes(node/node.go:960) andpullFrontierVotes(:985).
Impact
A 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.
Verification
Executed PoC (real core.Vote JSON sizes):
single vote JSON: 491 bytes
vote_request: max votes fitting in 65536 bytes: 132
vote_request with 200 votes: 98545 bytes (over cap: true)
Note on related reports
Same 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.
Suggested fix
Cap the vote response by count (and/or bytes) like the cert and block handlers, with pagination or a continuation signal for the remainder.
Thread
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-16883 and says what differs; it is read like any other.