{"id":"XE-9673","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":693,"title":"core/ledger: ValidateStagedBlock has no lease_renew case — a conflicting renew block can never be staged or promoted, whatever its vote weight","area":"leasing-ledger","claimed_tier":"minor","assessed_tier":null,"verdict":"duplicate","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-12T06:23:38.356112+00:00","updated_at":"2026-11-20T00:33:17.131329+00:00","source_created_at":null,"told_at":"2026-11-20T00:33:17.164936+00:00","status_changed_at":"2026-11-20T00:33:17.142104+00:00","url":"https://bounty.xe.network/XE-9673","body":"Component: xeprotocol/xe @ 89a542e — `core/ledger.go` (`Ledger.ValidateStagedBlock` type switch); consumers `addBlock` (conflict ingestion) and `core/quorum.go` (`canPromote`, `confirmConflict`).\r\n\r\nSummary\r\n\r\n`ValidateStagedBlock` — the function that decides whether a conflicting block may be staged and later promoted to winner by quorum — has an explicit case for every spendable block type: Send, Receive, Lease, LeaseAccept, LeaseSettle, LeaseCancel, LeaseForceSettle, MultisigOpen (rejected explicitly, by design), MultisigUpdate, Burn and Mint. The single exception is **BlockLeaseRenew, which has no case**, so a conflicting renew block falls into `default:` and is rejected with `staged block: unknown type: lease_renew` — a misleading error for a fully valid type that the normal path implements completely (`validateAndAddLeaseRenew`, `core/lease_renew.go`, including the balance rule `b.Balance == oldBal - b.Amount`).\r\n\r\nMechanism\r\n\r\n1. **Ingestion:** when a sibling block (same account, same `Previous`) arrives, `addBlock`'s conflict path requires it to pass `ValidateStagedBlock` before it can be recorded and staged as a conflict candidate. A conflicting lease_renew is rejected here categorically — it never enters voting at all.\r\n2. **Promotion:** `canPromote` and `confirmConflict` in quorum.go run the same function on the would-be winner, so even a renew branch carrying a 67% FINAL weight could never be promoted.\r\n3. The omission has the shape of an oversight, not a design decision: no comment documents it, and the one type that is deliberately unstageable (MultisigOpen) is rejected with an explicit case rather than through `default:`. The missing case would follow the existing Lease/LeaseAccept pattern (`Balance == parentBalance - Amount`) — the same rule the normal renew path enforces.\r\n\r\nReproduction (Go harness against the real Ledger + MemStore from this tree; controls signed and valid)\r\n\r\n```\r\n=== RUN   TestValidateStagedBlockLeaseRenew\r\n    control send: staged validation OK\r\n    control lease_accept: staged validation OK\r\n    lease_renew: staged validation rejects: staged block: unknown type: lease_renew\r\n--- PASS: TestValidateStagedBlockLeaseRenew\r\n```\r\n\r\n(The test blocks use `Previous == \"0\"` so the credential gate passes standalone; the rejection happens at the type switch after credentials pass — the exact point claimed. In production a conflicting renew always has a mid-chain `Previous`, and the rejection is identical because the case does not exist.)\r\n\r\nImpact\r\n\r\nConflict resolution treats one of the thirteen block types as categorically unresolvable: a lease renewal that lands on the losing side of a fork has no path to win, however the quorum votes — the account must re-issue the renewal on top of the winning chain. Because an account conflict requires two validly signed blocks on the same `Previous`, this is not a permanent brick, but it is a completeness hole in the consensus guarantee itself: the vote outcome for a valid block type is decided by a missing switch case, not by the quorum. Filed as Minor; a Medium reading — the violated guarantee is conflict resolution itself — is defensible.\r\n\r\nRemediation direction\r\n\r\nAdd the missing `BlockLeaseRenew` case to `ValidateStagedBlock`, mirroring the Lease/LeaseAccept shape and the normal path's balance rule (`Balance == parentBalance - Amount`, with the renewed lease terms taken from the parent state as the normal path does).\r\n\r\nDistinctness (searches run against the live index: `ValidateStagedBlock`, `lease_renew`, `LeaseRenew`)\r\n\r\n- The 61 `ValidateStagedBlock` hits concern quorum and conflict mechanics (XE-0021 finalisation without 67%, XE-2821 minority winner, XE-4145 withhold stall, XE-5826 Badger-vs-MemStore swap divergence, XE-3274 multisig brick) — none names lease_renew or a missing case in this switch.\r\n- **XE-0105** (read in full) is a cross-account renew-vs-settle race with no merge rule — a different mechanism; this candidate is a single account's conflict inside the staging path.\r\n- **XE-4038** is an omission in `blockDependencies` (the dependency graph) concerning renewals — a different function with a different failure; it does not touch staged-conflict validation.\r\n- **XE-0102** is the shipped client being unable to force-settle after a renewal; **XE-4023** is the SupplyAuditor omitting renew costs; **XE-9588** is a lease_cancel refund disagreement for extended leases. None shares this function or mechanism.","patch_refs":[],"thread":[{"id":13190,"source":"desk","source_ref":"reply:11212","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-9673 and says what differs; it is read like any other.","created_at":"2026-11-20T00:33:17.131329+00:00"}]}