<!-- XE-16883 · [Low] vote_request pull fails once a conflict has ›132 votes (unbounded response vs 64 KiB messenger cap) · testnet -->
*Markdown view of <https://bounty.xe.network/XE-16883>. The page is the record; this is the same page for reading.*

XE-16883 · Bounty

# \[Low\] vote\_request pull fails once a conflict has \>132 votes (unbounded response vs 64 KiB messenger cap)

Closed · duplicate
—
[xe#683](https://github.com/xeprotocol/xe/issues/683)
filed 2026-11-17 07:03 UTC
by kecedanzz77-bit

Verdict
:   Duplicate

Tier
:   —

Claimed
:   —

Area
:   P2P / sync

Duplicate of
:   [XE-0436](https://bounty.xe.network/XE-0436) accepted

Tracked
:   —

Updated
:   2026-11-22 23:26 UTC

Told
:   2026-11-22 23:26 UTC

### Patches

None linked.

### History

- [770253](https://bounty.xe.network/log/770253) 2026-11-22 23:26 UTC reply.mirror\_failed
- [769866](https://bounty.xe.network/log/769866) 2026-11-22 23:26 UTC proposal.adopted
- [769865](https://bounty.xe.network/log/769865) 2026-11-22 23:26 UTC reply.sent
- [769864](https://bounty.xe.network/log/769864) 2026-11-22 23:26 UTC ticket.status new → closed
- [768831](https://bounty.xe.network/log/768831) 2026-11-22 23:25 UTC proposal.adopted
- [768830](https://bounty.xe.network/log/768830) 2026-11-22 23:25 UTC ticket.facts area
- [768829](https://bounty.xe.network/log/768829) 2026-11-22 23:25 UTC proposal.adopted
- [768828](https://bounty.xe.network/log/768828) 2026-11-22 23:25 UTC ticket.facts
- [768827](https://bounty.xe.network/log/768827) 2026-11-22 23:25 UTC proposal.adopted
- [768826](https://bounty.xe.network/log/768826) 2026-11-22 23:25 UTC ticket.facts
- [766616](https://bounty.xe.network/log/766616) 2026-11-22 23:17 UTC note.added
- [766615](https://bounty.xe.network/log/766615) 2026-11-22 23:17 UTC proposal.created

[Full history](https://bounty.xe.network/log?ref=XE-16883) · [JSON](https://bounty.xe.network/v1/tickets/XE-16883) · [markdown](https://bounty.xe.network/XE-16883.md)

### 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 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).
- 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.
- Callers: `pullConflictVotes` (`node/node.go:960`) and `pullFrontierVotes` (`: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

**Joseph Denne**team2026-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-16883 and says what differs; it is read like any other.
