{"id":"XE-16846","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"672","source_url":"https://github.com/xeprotocol/xe/issues/672","reporter_id":2920,"title":"[Medium] Final votes lock on transient non-final convergence, so an arrival-order split permanently stalls a position","area":"consensus","claimed_tier":"medium","assessed_tier":null,"verdict":"duplicate","duplicate_of":null,"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-17T06:39:33.715780+00:00","updated_at":"2026-11-22T23:26:11.941547+00:00","source_created_at":"2026-11-17T06:39:12+00:00","told_at":"2026-11-22T23:26:11.985549+00:00","status_changed_at":"2026-11-22T23:26:11.951368+00:00","url":"https://bounty.xe.network/XE-16846","body":"## Summary\n\n`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.\n\n## Root cause\n\n- `maybeLockLocked` (`core/finalization.go:176-196`) locks when `convergeWeights` (`core/finalization.go:348-356`) shows >=67% for the preferred candidate. `convergeWeights` sums every stored vote by block hash with no `Final` filter.\n- 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-second `lockStabilityWindow` (`core/quorum.go:33`) since the last new candidate.\n- Once locked, the vote can never change: `receiveVoteInner` refuses to overwrite a `Final` vote (`core/vote.go:137-139`), `finalVoteStore` is write-once with no delete method (`core/store.go`, `PutFinalVoteIfAbsent` only), and `castVoteLocked` re-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`).\n\n## Verification\n\nExecuted 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:\n- `node1 finalVoteStore lock: ok=true -> H1`; R1 stored vote `final=true weight=16800000000000`\n- After 5 sweep/revote rounds: `H1 finalized=false H0 finalized=false FinalHeight(V)=1` on **both** nodes; R2's vote stuck non-final on H0 (60%), R1's final vote stuck on H1 (40%)\n- `new block on V: node1 err=account has unresolved conflict | node2 err=account has unresolved conflict`\n\n## Impact\n\nPermanent 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.\n\nTrigger (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).\n\n## Note on related reports\n\nDistinct from:\n- #591 — locks on a *rejected ghost*; here both candidates are live/promotable, no rejection involved.\n- #364 — locks *survive a cancel-unwind*; here no unwind — divergence happens at lock issuance.\n- #566 — winner *unpromotable*, validation gap; here both promotable.\n- #608 — winner needs an *impossible lease cascade*; here plain sends, no cascade.\n- #527 — snapshot members *lose live weight*; here weights constant.\n- #42 — substitution finalized a below-threshold candidate (fixed by removing substitution); here *nothing* finalizes.\n- #96 — watermark/ancestor composition; here a single position.\n- #368 F2 — one rep *equivocates*, final-voting both sides; here every rep votes once, honestly.\n- #545 — phantom lowest-hash blocks voting; here both blocks have bodies everywhere.\n\nSearched `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.\n\n## Suggested fix\n\nLock 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).","patch_refs":[],"thread":[{"id":18802,"source":"desk","source_ref":"reply:16479","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as an earlier report that is not public, 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-16846 and says what differs; it is read like any other.","created_at":"2026-11-22T23:26:11.941547+00:00"}]}