<!-- XE-16713 · [High] Lease-block validity depends on the node's local off-chain certset; certificate eviction makes historical lease blocks unvalidatable (consensus non-determinism + permanent sync breakage) · testnet -->
*Markdown view of <https://bounty.xe.network/XE-16713>. The page is the record; this is the same page for reading.*

XE-16713 · Bounty

# \[High\] Lease-block validity depends on the node's local off-chain certset; certificate eviction makes historical lease blocks unvalidatable (consensus non-determinism \+ permanent sync breakage)

Closed · duplicate
—claimed High
[xe#651](https://github.com/xeprotocol/xe/issues/651)
filed 2026-11-17 05:17 UTC
by kecedanzz77-bit

Verdict
:   Duplicate

Tier
:   —

Claimed
:   High

Area
:   Leasing / ledger

Duplicate of
:   —

Tracked
:   internally

Updated
:   2026-11-22 23:26 UTC

Told
:   2026-11-22 23:26 UTC

### Patches

None linked.

### History

- [770283](https://bounty.xe.network/log/770283) 2026-11-22 23:26 UTC reply.mirror\_failed
- [770103](https://bounty.xe.network/log/770103) 2026-11-22 23:26 UTC proposal.adopted
- [770102](https://bounty.xe.network/log/770102) 2026-11-22 23:26 UTC reply.sent
- [770101](https://bounty.xe.network/log/770101) 2026-11-22 23:26 UTC ticket.status new → closed
- [769337](https://bounty.xe.network/log/769337) 2026-11-22 23:26 UTC proposal.adopted
- [769336](https://bounty.xe.network/log/769336) 2026-11-22 23:26 UTC ticket.facts area
- [769335](https://bounty.xe.network/log/769335) 2026-11-22 23:26 UTC proposal.adopted
- [769334](https://bounty.xe.network/log/769334) 2026-11-22 23:26 UTC ticket.facts
- [769333](https://bounty.xe.network/log/769333) 2026-11-22 23:26 UTC proposal.adopted
- [769332](https://bounty.xe.network/log/769332) 2026-11-22 23:26 UTC ticket.facts
- [769331](https://bounty.xe.network/log/769331) 2026-11-22 23:26 UTC proposal.adopted
- [769330](https://bounty.xe.network/log/769330) 2026-11-22 23:26 UTC ticket.facts

[Full history](https://bounty.xe.network/log?ref=XE-16713) · [JSON](https://bounty.xe.network/v1/tickets/XE-16713) · [markdown](https://bounty.xe.network/XE-16713.md)

### Report

## Summary

Performance certificates are not on-chain \-- a lease block stores only the cert hash. But the ledger validates the lease/accept/renew cost against the cert's `PriceMultiplierMilli`, fetched from the node's local, gossiped, capped certset (256 per provider). Two honest nodes with different certsets reach opposite verdicts on the identical block, and a cert evicted network-wide can never be recovered (it lives nowhere else). A new node syncing from scratch stalls at the first lease block whose cert was evicted \-- it cannot validate that account chain past that point, ever.

## Root Cause

- `validateAndAddLease` (`core/ledger.go:1656-1662`), `validateAndAddLeaseAccept` (`core/ledger.go:1821-1826`), `validateAndAddLeaseRenew` (`core/lease_renew.go:65-70`) all reject with "certificate not found" when `certificateLookupFn` returns nil.
- `certificateInfoByHash` (`node/perf.go:295-305`) reads only the node's local in-memory certset.
- `certSet.put` (`node/certset.go:25-55`) evicts oldest-by-`IssuedAt` past `certRetentionPerProvider = 256`.
- `retainCertificate` (`node/perf.go:358-377`) DELETES evicted certs from the persistent store (`DeleteCertificate`, line 371), so eviction is permanent, not just in-memory.
- The sync path (`AddSyncedBlock` -\> `addBlock` -\> `dispatchValidateAndAdd`, `core/ledger.go:793-795`) runs the same cert-lookup validation; nothing skips it.

## Impact

- **Consensus non-determinism:** the same lease block is valid on nodes holding the cert and invalid on nodes that evicted it.
- **Permanent sync breakage:** a new node syncing from scratch stalls at the first lease block whose cert was evicted.
- **Deliberate history poisoning (cheap):** a provider mints 256\+ self-asserted certs (trivial \-- `VerifyCertificateContent`, `perf/certificate.go:156-216`, never verifies PoW or the attestation roots; that enabler is already reported as #392/#594) and gossips them; every node ingests them, evicts the target cert, and deletes it from its store. The provider can thereby make any of its leases' history unvalidatable network-wide.

## Verification (executed PoC)

Standalone Go harness (map-backed cert lookup): builds a ledger, mints XCU, creates a lease block referencing a cert \-- ACCEPTED on node A. Then deletes the cert from the map (simulating eviction) and replays the identical mint\+lease via `AddSyncedBlock` on a fresh ledger (node B): mint replays fine, the same lease block is REJECTED with `certificate aaaaaaaaaaaa... not found`. "RESULT: consensus non-determinism confirmed \-- identical block, opposite verdicts depending on local off-chain cert state." Audited at HEAD `8cc209d` (testnet-0006).

## Note on related reports

Adjacent, not duplicate: XE-13481 ("Certificate eviction makes `holdLease` throw on the missing opening certificate") is an SDK/client helper (`holdLease` does not exist in this repo) with a client-liveness impact; it does not cover ledger consensus validation or sync breakage, and its fix would not fix this finding. #387 (no global cap -\> store/RAM exhaustion) is an adjacent, distinct root cause.

## Suggested fix

Persist the cert's pricing inputs (at minimum `PriceMultiplierMilli`, provider, expiry) in the lease block / lease record at creation so historical validation never needs the gossiped cert; or exempt already-finalized historical lease blocks from the cert lookup; and/or never delete certs referenced by on-chain leases from the store.

### Thread

**Joseph Denne**team2026-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-16713 and says what differs; it is read like any other.
