Bounty
XE-9673 · Bounty

core/ledger: ValidateStagedBlock has no lease_renew case — a conflicting renew block can never be staged or promoted, whatever its vote weight

Closed · duplicate —claimed Minor web filed 2026-11-12 06:23 UTC by xe:03ea5b15

Report

Component: xeprotocol/xe @ 89a542e — core/ledger.go (Ledger.ValidateStagedBlock type switch); consumers addBlock (conflict ingestion) and core/quorum.go (canPromote, confirmConflict).

Summary

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).

Mechanism

  1. 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.
  2. 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.
  3. 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.

Reproduction (Go harness against the real Ledger + MemStore from this tree; controls signed and valid)

=== RUN   TestValidateStagedBlockLeaseRenew
    control send: staged validation OK
    control lease_accept: staged validation OK
    lease_renew: staged validation rejects: staged block: unknown type: lease_renew
--- PASS: TestValidateStagedBlockLeaseRenew

(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.)

Impact

Conflict 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.

Remediation direction

Add 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).

Distinctness (searches run against the live index: ValidateStagedBlock, lease_renew, LeaseRenew)

  • 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.
  • 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.
  • 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.
  • 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.

Thread

Joseph Denneteam2026-11-20 00:33 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-9673 and says what differs; it is read like any other.