<!-- XE-13383 · [Core] Cross-block transitions accept timestamps predating causal predecessors across live and staged ledger validation · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13383>. The page is the record; this is the same page for reading.*

XE-13383 · Bounty

# \[Core\] Cross-block transitions accept timestamps predating causal predecessors across live and staged ledger validation

Closed · duplicate
—
[xe#540](https://github.com/xeprotocol/xe/issues/540)
filed 2026-11-13 06:29 UTC
by Khanhtnq

Verdict
:   Duplicate

Tier
:   —

Claimed
:   —

Area
:   Leasing / ledger

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 13:01 UTC

Told
:   2026-11-20 13:00 UTC

### Patches

- [xe#541](https://github.com/xeprotocol/xe/pull/541) open by Khanhtnq
  core: enforce causal predecessor timestamps on all cross-block transitions
- [xe#916](https://github.com/xeprotocol/xe/pull/916) open by tipprb
  fix(xe): core--cross-block-transitions (fixes #540)

### History

- [599210](https://bounty.xe.network/log/599210) 2026-11-20 13:00 UTC reply.mirrored
- [598670](https://bounty.xe.network/log/598670) 2026-11-20 13:00 UTC github.state\_pushed
- [598612](https://bounty.xe.network/log/598612) 2026-11-20 13:00 UTC github.labels
- [597666](https://bounty.xe.network/log/597666) 2026-11-20 12:59 UTC proposal.adopted
- [597665](https://bounty.xe.network/log/597665) 2026-11-20 12:59 UTC reply.sent
- [597664](https://bounty.xe.network/log/597664) 2026-11-20 12:59 UTC ticket.status new → closed
- [594400](https://bounty.xe.network/log/594400) 2026-11-20 12:58 UTC proposal.adopted
- [594399](https://bounty.xe.network/log/594399) 2026-11-20 12:58 UTC ticket.facts area
- [594398](https://bounty.xe.network/log/594398) 2026-11-20 12:58 UTC proposal.adopted
- [594397](https://bounty.xe.network/log/594397) 2026-11-20 12:58 UTC ticket.facts
- [594396](https://bounty.xe.network/log/594396) 2026-11-20 12:58 UTC proposal.adopted
- [594395](https://bounty.xe.network/log/594395) 2026-11-20 12:58 UTC ticket.facts

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

### Report

### Summary

Cross-block transitions in `core/ledger.go` and `core/lease_renew.go` validate per-account sequential timestamps (`b.Timestamp >= prev.Timestamp`), but do not enforce causal predecessor timestamp monotonicity across accounts or active lease state in either direct ledger addition (`validateAndAdd*`) or staged conflict evaluation (`ValidateStagedBlock`).

### Impact \& Affected Transitions

1. **`BlockReceive` (`validateAndAddReceive` / `ValidateStagedBlock`)**: An account can record a `receive` block with `b.Timestamp < src.Timestamp` (`send` block timestamp), violating cross-account causal ordering.
2. **`BlockLeaseAccept` \& `BlockLeaseCancel`**: Can record `b.Timestamp < leaseBlock.Timestamp`.
3. **`BlockLeaseRenew`**: Can record `b.Timestamp < max(lease.StartTime, leaseBlock.Timestamp, renewals)`; additionally, `ValidateStagedBlock` previously omitted `BlockLeaseRenew` balance and causal validation.
4. **`BlockLeaseSettle` \& `BlockLeaseForceSettle`**: Enforce wall-clock / expiry bounds against `StartTime` \+ duration, but if `leaseBlock.Timestamp` or a renewal timestamp exceeds those values, transitions could still carry timestamps predating their causal predecessor.

### Rule-First Fix

- **Rule**: Any block referencing or transitioning a causal predecessor (via `b.Source` or active lease state) must carry `b.Timestamp >= predecessor.Timestamp` across both direct addition (`validateAndAdd*`) and staged conflict evaluation (`ValidateStagedBlock`).
- **Verification**: `go test -count=1 ./...` and `go vet ./...` pass with 6 unit tests covering live and staged causal rejection across all 6 block transitions.

### Thread

**Khanhtnq**2026-11-13 06:29 UTCgithub

Fix PR submitted in #541.

**Joseph Denne**team2026-11-20 13:00 UTCgithub

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