Bounty
XE-16840 · Bounty

[High] Competing multisig_open blocks cause a permanent, unresolvable consensus split

Closed · duplicate —claimed High xe#669 filed 2026-11-17 06:32 UTC by kecedanzz77-bit

Report

Summary

Two threshold-signed multisig_open blocks for the same account (same keyset, different timestamps → different hashes) delivered to different nodes partition the network permanently for that account. No recovery path exists: the fork is never recorded as a conflict, so quorum never sees it, and even a direct SwapBlock cannot promote the winner. Funds sent to the account are unspendable on the minority fork.

Root cause — two independent failure points, either alone is fatal

  1. Staging rejects the fork outright, so no conflict is ever recorded. ValidateStagedBlock (core/ledger.go:3113-3114) has an explicit case: BlockMultisigOpen → "staged multisig_open: conflicting account opens are invalid". In addBlock (:901-903) this error returns before recordConflict (:905), so quorum never sees the fork, no votes are ever cast, and no resolution is ever attempted.
  2. Even a direct SwapBlock cannot promote the winner. buildBlockUndo of the loser open yields a non-nil empty overlay chain (&AccountChain{Blocks: [:0]}, core/rollback.go:304, via cascade_commit.go:107-118), and validateAndAddMultisigOpen (core/ledger.go:1343-1345) rejects any non-nil chain with "account already exists" — it never checks len(chain.Blocks) == 0. Contrast validateAndAddReceive (:1170-1197), which handles the empty overlay chain correctly (Frontier() of an empty chain is "0"), so regular account-open forks resolve fine.

Verification

Executed PoC (two fresh ledgers, 2-of-3 keyset):

  • Part 1: AddBlock(O1) ok; AddBlock(O2) → conflict block: staged multisig_open: conflicting account opens are invalid; GetConflict(A, "0") → nil; direct SwapBlock(O1→O2) → SwapBlock: winner failed full validation ..., loser kept: multisig_open: account already exists; frontier stays O1.
  • Part 2: second ledger accepts O2 and rejects O1 → L1 frontier O1, L2 frontier O2, SPLIT.
  • Part 3 (contrast): competing multisig_update forks stage as a conflict and SwapBlock succeeds, keyset correctly becomes K3 — proving the machinery works for updates but not opens.

Impact

Trigger needs threshold-signed conflicting opens — malicious or accidental (there is no multisig support in client/ or cmd/; members hand-construct opens, so two members racing to open the same account is realistic). Blast radius is one account + downstream dependents. Restart replays the same state; final votes for the other fork cannot be adopted (no SwapBlock path). Closest precedent for severity: #43 (High, accepted) — permanent per-account stall needing only the account's own signatures; this is strictly worse (cross-node split + invisible, no conflict recorded anywhere).

Note on related reports

Distinct from:

  • #525 / #43 / #608 — descendant-type filter in planSwap/planRollbackFrom; my case has no descendants (the swapped block is the open, and planSwap succeeds).
  • #6 item 3 — multisig_update conflict deadlock; FIXED on HEAD via keysetAtPrevious + RestoreKeyset (proven by PoC Part 3). Opens are the remaining hole.
  • #566 — recorded conflict + quarantine livelock; here no conflict is ever recorded.
  • #394 / #552 — gossip delivery of multisig blocks.

Suggested fix

Allow the second open to stage as a conflict (drop the ValidateStagedBlock rejection or special-case it), and make validateAndAddMultisigOpen treat an empty overlay chain (len(chain.Blocks) == 0) as "account does not exist" — mirroring validateAndAddReceive.

Thread

Joseph Denneteam2026-11-22 23:26 UTCdesk

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-16840 and says what differs; it is read like any other.