Invariants / DC-EPOCH-22

DC-EPOCH-22

DC derived declared

BOUNDARY-ALIGNED-MARK-CAPTURE. The live epoch-boundary stake mark is captured ONLY from the durable reduced checkpoint materialized at the EXACT selected-chain boundary point -- the last durable block of the closing epoch (s_prev) -- never at a later catch-up tip and never via a per-block stake scan. The capture is durably bound as a BoundaryMark keyed by the canonical boundary chain point (slot, hash) and the checkpoint lineage at that point, persisted BEFORE the accumulator boundary transition consumes it. The transition consumes a mark only when the binding is present and its point + lineage match the canonical chain; a reorg that removes or replaces the boundary point INVALIDATES the mark and forces deterministic rematerialization (reset-to-seed + replay) -- a mark is NEVER reused on an epoch-number match alone. This protects the boundary transition's INPUT (DC-EPOCH-21 governs the transition's OUTPUT given a correct mark): a mark read at the catch-up tip is byte-wrong (the checkpoint is already past the boundary), and even at the steady-state tip it wrongly includes the first block of the new epoch (SNAP captures the end-of-epoch stake, BEFORE that block). A co-advancer segments the reduced-checkpoint + accumulator advance at each boundary (idempotent-resume, byte-identical to advance-to-tip), captures sum_base_credential_stake() at the boundary point, durably binds the BoundaryMark before the cross, then crosses the accumulator over the boundary block with the bound mark; finally it advances the checkpoint the rest of the way to the durable tip (EVIEW currency preserved). OBSERVE-ONLY in S3: a capture/cross fault STALLS the accumulator (it stays at s_prev), never halting the proven follow; the EVIEW checkpoint still reaches tip fail-closed. Enforced PROGRESSIVELY: #2b-i wires the accumulator boundary-cross entry point (this sub-commit, cross_accumulator_over_boundary_block, the ONLY place the S2 mark-exclusion is lifted); the durable BoundaryMark witness + the point/lineage validation (#2b-ii), the node_lifecycle co-advancer segment->capture->bind->cross->tip (#2b-iii), the DC-EPOCH-22 CI guard, and the CE-3c live venue crossing ALL LANDED (#2b-i/ii/iii 8d047dee/ee33cc4c/8232fe73 + the CI guard). CE-3c PROVEN LIVE 2026-06-29: two preview crossings (1338->1339 seam + 1339->1340 native), mark captured at the boundary point s_prev while the catch-up tip ran 70,655 slots ahead (proof ~/.cardano-ce3c-proof/). Status stays declared: the mechanism is live-proven but OBSERVE-ONLY in S3 -- the flip to enforced is the cluster-close event with the accumulator-as-authority (S4) + the CE-3d byte-exact differential, in step with DC-EPOCH-19/20/21.

Source

docs/clusters/LIVE-LEDGER-EPOCH-TRANSITION/SLICE-S3-boundary-gate.md section 3 + section 5 item #2b (BOUNDARY-ALIGNED-MARK-CAPTURE). The boundary mark is the only NEW live input the boundary transition needs; a naive read at the post-pass tip is byte-wrong in BOTH catch-up (the checkpoint is already past the boundary) and steady-state (the tip is the first block of the new epoch, whose UTxO delta must NOT be in the mark). The mark is sourced at the exact boundary point via the co-advancer, NOT the EVIEW BoundaryPromoted yield (which is EVIEW-gated and fires one block too late). Resolves the S2 observe-only boundary stall (MissingBoundaryStake, the forced ctx.boundary_mark = None).

Introduced in
LIVE-LEDGER-EPOCH-TRANSITION-S3

Enforcement trace

Code

no enforcing code — gap

Tests 11

  • ade_runtime::chaindb::epoch_accumulator_advance::tests::boundary_block_crosses_with_mark
  • ade_runtime::chaindb::epoch_accumulator_advance::tests::boundary_cross_is_idempotent
  • ade_runtime::chaindb::epoch_accumulator_advance::tests::boundary_cross_missing_block_is_a_fault
  • ade_runtime::chaindb::epoch_accumulator_store::tests::boundary_mark_witness_bind_read_clear_round_trip
  • ade_runtime::chaindb::epoch_accumulator_store::tests::boundary_mark_bind_requires_sealed
  • ade_runtime::chaindb::epoch_accumulator_store::tests::reset_to_bootstrap_drops_the_boundary_mark_binding
  • ade_runtime::chaindb::epoch_accumulator_store::tests::boundary_mark_binding_survives_reopen
  • ade_node::node_lifecycle::tests::co_advance_ledger_state::co_advance_crosses_a_boundary
  • ade_node::node_lifecycle::tests::co_advance_ledger_state::co_advance_checkpoint_only_when_no_accumulator
  • ade_node::node_lifecycle::tests::co_advance_ledger_state::co_advance_multi_boundary_catch_up
  • ade_node::node_lifecycle::tests::co_advance_ledger_state::co_advance_observe_only_when_no_checkpoint

Cross-references