{"id":"XE-16487","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":2260,"title":"[Regression confirm] XE-0001 claim 3 at HEAD: multisig_update keyset rotates pre-finalization; siblings checked against rotated keyset before conflict detection","area":"consensus","claimed_tier":"high","assessed_tier":null,"verdict":"invalid","duplicate_of":null,"tracked":true,"internal_ref":"#1062","internal_url":"https://github.com/xeprotocol/core/issues/1062","status":"closed","closed_reason":"invalid","github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-17T02:03:51.057078+00:00","updated_at":"2026-11-22T23:41:14.371038+00:00","source_created_at":null,"told_at":"2026-11-22T23:41:14.374838+00:00","status_changed_at":"2026-11-22T23:26:14.044148+00:00","url":"https://bounty.xe.network/XE-16487","body":"# [Regression confirm] XE-0001 claim 3 still unfixed at HEAD 89a542e: unfinalized BlockMultisigUpdate rotates the active keyset before finalization, and competing sibling blocks are credential-checked against the rotated keyset before conflict detection — permanent multisig conflict lockout\n\n## Claim\nXE-0001 claim 3 (Severe/High, consensus): `BlockMultisigUpdate` conflict detection deadlock & missing keyset unwind. Both sub-claims manually verified at HEAD; UNFIXED.\n\n## Evidence at HEAD\n\n### (a) Credential check runs before conflict detection, against the already-rotated keyset\n1. `core/ledger.go:1308-1352`, `validateAndAddMultisigUpdate`: the keyset is installed into the in-memory cache immediately when the (not yet finalized) block is committed — `core/ledger.go:1351`: `l.setKeyset(b.Account, b.MSKeyset)`. `GetKeyset` (`:1355-1359`) reads that cache directly.\n2. `core/ledger.go:801-803` (`AddBlock`): `verifyBlockCredential(b)` runs **before** the conflict-detection block at `:805-812` (`detectConflictSibling`).\n3. `core/ledger.go:1447-1450` (`verifyBlockCredential`): a block on a multisig account is verified against `l.GetKeyset(b.Account)` — i.e. the **rotated** keyset K2, not the parent keyset K1 that was active at `b.Previous`.\n\nConsequence: a competing valid sibling signed under the parent keyset K1 arrives at the same sequence; `AddBlock:801` validates it against K2 and rejects it (\"invalid multisig signatures\" / threshold failure) **before `detectConflictSibling` at `:805-812` ever runs**. The legitimate sibling can never even be staged into the conflict set.\n\n### (b) SwapBlock can never unwind the rotation\n4. `core/rollback.go:246-248`, `buildBlockUndo`: `case BlockMultisigUpdate: return nil, nil, fmt.Errorf(\"undo: reversing a multisig_update is not supported (prior keyset unrecoverable)\")` — so `SwapBlock` (`core/ledger.go:2991-3008`) fails for any conflict whose replaced block is a multisig_update, even though the prior keyset is deterministically recoverable by scanning earlier `BlockMultisigUpdate` blocks in `chain.Blocks` (or deleting the keyset when reverting to single-sig).\n\n### Combined lockout\nOnce any unfinalized `BlockMultisigUpdate` K1→K2 lands for a sequence s:\n- K1-signed siblings at s are rejected pre-conflict-detection (a); they never enter the conflict set, so no resolution can pick them;\n- even if a conflict pair did exist, swap-based resolution cannot unwind the rotation (b);\n- `core/ledger.go:813-818` additionally rejects any further block while an unresolved conflict is open.\n\nResult: whichever keyset rotation is processed first permanently controls the account's subsequent blocks regardless of consensus outcome — a governance lockout / DoS on multisig accounts, and a validation-ordering bypass (the block is judged by state it caused, not the state at its parent).\n\n## Suggested fix direction\nDo not install the rotated keyset into the active cache until finalization (defer `setKeyset` to the finalize/commit path); and/or run `detectConflictSibling` before `verifyBlockCredential` for blocks whose parent sequence conflicts; and implement multisig_update undo by recovering the prior keyset from the chain.\n\nNote: follow-up to our XE-15105 (XE-0001 claims 1+3-filed-part) and XE-16089 (stale keyset caches during SwapBlock winner validation — same root area, complementary).","patch_refs":[],"thread":[{"id":18927,"source":"desk","source_ref":"reply:16604","author":"XE desk","team":true,"body":"Thanks for the report. We read it against the code and could not confirm a bug in what it describes.\n\nThis report is closed as invalid. If we have missed something, file a new report that links\nhttps://bounty.xe.network/XE-16487 and says what; it is read like any other.","created_at":"2026-11-22T23:41:14.371038+00:00"}]}