Bounty
XE-10242 · Bounty

Consensus Vote Stalling: enqueueVote updates dedup cache before channel push dropping retransmissions of full-buffer votes

Closed · duplicate — web filed 2026-11-12 11:10 UTC by xe:e4cd6974

Report

Vulnerability Summary

In net/gossip.go:244-280, enqueueVote receives validated consensus votes from the P2P gossipsub topic and enqueues them into the vote channel ch:

func enqueueVote(ctx context.Context, ch chan<- *core.Vote, seen map[string]int64, v *core.Vote, now int64) bool {
	finalByte := "c"
	if v.Final {
		finalByte = "f"
	}
	key := v.RepPubKey + "|" + v.ConflictAccount + "|" + v.ConflictPrev + "|" + v.BlockHash + "|" + finalByte
	if ts, ok := seen[key]; ok && now-ts < voteDedupTTL {
		return false
	}
	seen[key] = now

	if len(seen) > 4096 {
		for k, ts := range seen {
			if now-ts >= voteDedupTTL {
				delete(seen, k)
			}
		}
	}

	if v.Final {
		select {
		case ch <- v:
			return true
		case <-ctx.Done():
			return false
		}
	}

	select {
	case ch <- v:
		return true
	default:
		logging.Warnf("gossip: vote channel full, dropping CONVERGE vote from %s", shortHash(v.RepPubKey))
		return false
	}
}

Critical ordering bug in deduplication logic:

  1. Premature Cache Mutation: seen[key] = now is updated before verifying that the vote can actually be delivered to the channel ch.
  2. Drop on Channel Congestion: For non-final CONVERGE votes, if ch is temporarily full (capacity 1024 saturated by high-volume elections), execution falls into default:. The vote is dropped and never processed by VoteManager.
  3. Retransmission Suppression: Because seen[key] was already marked with timestamp now, any subsequent retransmission of the same vote received from another P2P peer within voteDedupTTL = 200ms hits: if ts, ok := seen[key]; ok && now-ts < voteDedupTTL { return false } The retransmitted vote is falsely rejected as a duplicate, even though the original was never enqueued or processed.

Impact & Severity

  1. Consensus Retally Stall: Converge votes from major representatives are dropped and blocked from retransmission, preventing quorum elections from reaching threshold tallies.
  2. Artificial Conflict Prolongation: Elections remain open until representative revote timers elapse, increasing transaction settlement latency across active conflicts.

Proposed Remediation

In enqueueVote, only update seen[key] after confirming that the vote was successfully sent to ch:

	select {
	case ch <- v:
		seen[key] = now
		return true
	default:
		logging.Warnf("gossip: vote channel full, dropping CONVERGE vote from %s", shortHash(v.RepPubKey))
		return false
	}

Thread

Joseph Denneteam2026-11-20 00:33 UTCdesk

Thanks. This is the same finding as https://bounty.xe.network/XE-0024, 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-10242 and says what differs; it is read like any other.