[Medium] Final votes lock on transient non-final convergence, so an arrival-order split permanently stalls a position
Report
Summary
maybeLockLocked issues an irrevocable final vote when convergeWeights shows >=67% — but convergeWeights sums all stored votes, including non-final votes, which are revocable. A rep holding >33% can lock the first-seen candidate on the basis of a transient non-final supermajority; when the lower-hash candidate arrives later, every other rep switches to it, but it can then only ever converge <67% (the locked >33% is gone), while the locked candidate holds only the locked rep's final votes (<67%). Neither side can ever finalize. No one equivocates and no validation fails — both candidates are live, promotable, ordinary sends.
Root cause
maybeLockLocked(core/finalization.go:176-196) locks whenconvergeWeights(core/finalization.go:348-356) shows >=67% for the preferred candidate.convergeWeightssums every stored vote by block hash with noFinalfilter.- Non-final votes are revocable:
receiveVoteInner(core/vote.go:130-165) overwrites any non-final vote. The only guard against a transient supermajority is the 3-secondlockStabilityWindow(core/quorum.go:33) since the last new candidate. - Once locked, the vote can never change:
receiveVoteInnerrefuses to overwrite aFinalvote (core/vote.go:137-139),finalVoteStoreis write-once with no delete method (core/store.go,PutFinalVoteIfAbsentonly), andcastVoteLockedre-emits the locked hash forever (core/finalization.go:89-121). There is no vote release, expiry, or re-decision path: the sweep only re-tallies (core/quorum.go:552-585).
Verification
Executed deterministic two-node PoC (R1 = 40%, R2 = 60%). Both vote non-final H1 (100% convergence); H0 delivered to node2 at +2.5s, to node1 only after R1 locks at +3.1s. Observed:
node1 finalVoteStore lock: ok=true -> H1; R1 stored votefinal=true weight=16800000000000- After 5 sweep/revote rounds:
H1 finalized=false H0 finalized=false FinalHeight(V)=1on both nodes; R2's vote stuck non-final on H0 (60%), R1's final vote stuck on H1 (40%) new block on V: node1 err=account has unresolved conflict | node2 err=account has unresolved conflict
Impact
Permanent single-account finality stall + frozen funds with no in-protocol recovery (static electorate; new weight joining later could unstick it, stated honestly). Liveness only — no safety violation, no theft. Hence Medium.
Trigger (honest reps, no Byzantine supermajority): the account owner publishes H1, watches gossip for a >33% rep's FINAL vote for H1, then publishes H0 (lower hash). Differential delivery of a few seconds (eclipse/delay of the one rep, or ordinary gossip propagation skew — the window is only 3s) is enough. The owner must double-sign (precondition for any fork, same caveat as #545/#608), but the harm extends to counterparties: the frozen account rejects all new blocks (Ledger.AddBlock, core/ledger.go:~878, "account has unresolved conflict"), and receivers of its sends can never finalize their receives (depsFinalized gate).
Note on related reports
Distinct from:
- #591 — locks on a rejected ghost; here both candidates are live/promotable, no rejection involved.
- #364 — locks survive a cancel-unwind; here no unwind — divergence happens at lock issuance.
- #566 — winner unpromotable, validation gap; here both promotable.
- #608 — winner needs an impossible lease cascade; here plain sends, no cascade.
- #527 — snapshot members lose live weight; here weights constant.
- #42 — substitution finalized a below-threshold candidate (fixed by removing substitution); here nothing finalizes.
- #96 — watermark/ancestor composition; here a single position.
- #368 F2 — one rep equivocates, final-voting both sides; here every rep votes once, honestly.
- #545 — phantom lowest-hash blocks voting; here both blocks have bodies everywhere.
Searched convergeWeights non-final lock, final vote transient, lock final vote non-final, maybeLockLocked, final vote split, stability window — no filed issue describes issuance-time divergence of final votes.
Suggested fix
Lock only on convergence of final votes (or require the 67% convergence to be re-confirmed after the stability window elapses, rather than locking on the pre-window tally); alternatively, add a deterministic vote-release path when a position makes no finality progress (e.g. expire final-vote locks after N sweeps with no winner).
Thread
Thanks. This is the same finding as an earlier report that is not public, 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-16846 and says what differs; it is read like any other.