Invariants / DC-MEM-10

DC-MEM-10

DC derived enforced

The v2 UTxO fingerprint component is a NAMED commutative set commitment (Ristretto255 ECMH) binding (TxIn, TxOut) over the canonical encodings, domain-separated and version-tagged (fingerprint_version: v1 vs v2 are EXPLICIT and never silently mixed). It enables an O(delta)/block post_fp (the prerequisite for the on-disk UTxO backend, DC-MEM-05). post_fp remains the full-state replay hash ('state after this block'); only the UTxO-component construction + version change. Per-block incremental maintenance MUST equal the full recompute. Internal replay contract only -- no peer-facing/Cardano-consensus change. NOT a naive XOR/sum.

Source

MEM-OPT-UTXO-DISK S1.5 (docs/clusters/MEM-OPT-UTXO-DISK/S1.5-fp-v2-incremental.md); DC-MEM-05; OQ-UD-3

Introduced in
MEM-OPT-UTXO-DISK

Enforcement trace

Tests 12

  • order_independent
  • add_remove_is_exact_inverse
  • binds_value_not_just_key
  • golden_empty_digest
  • golden_single_entry_digest
  • golden_two_entry_digest
  • v1_and_v2_utxo_components_differ_only_the_utxo_changes
  • fingerprint_v2_is_deterministic
  • fingerprint_v2_utxo_is_insertion_order_independent
  • incremental_v2_equals_full_recompute_after_each_block
  • incremental_produce_spend_is_exact_inverse
  • v1_unversioned_store_is_rejected_fail_closed

Cross-references

Strengthened in

Evidence notes

PARTIAL at MEM-OPT-UTXO-DISK S1.5a (2026-06-16). The named construction is LOCKED + ENFORCED: ade_crypto::utxo_set_commitment is a Ristretto255 ECMH (curve25519-dalek 4) -- entry(bytes) = RistrettoPoint::from_uniform_bytes(blake2b_512('ade.utxo.fp.v2.entry' || canonical_txin || canonical_txout)); commitment = identity + group_sum(entries); digest = blake2b_256('ade/fp/utxo/v2' || compressed_point). Proven commutative (order_independent), add/remove exact inverse, value-binding (not key-only), deterministic, golden-vector-pinned (3 FROZEN vectors). ade_ledger::fingerprint_utxo_v2 = the FULL recompute over the BTreeMap (the ORACLE); fingerprint_v2 swaps only the UTxO component (the other 6 + the rollup unchanged). Versioned: FINGERPRINT_VERSION_V1=1 / V2=2 explicit; S1.5a does NOT flip production (fingerprint() stays v1; the existing v1 fingerprint tests + the DC-WAL-03 replay corpus + admission_replay_equivalence stay GREEN). S1.5b PART A done (2026-06-16): the PER-BLOCK incremental maintenance is PROVEN == the full-recompute oracle -- ade_ledger::fingerprint::IncrementalUtxoFp (produce/spend over the SHARED v2_entry_bytes; the oracle fingerprint_utxo_v2 refactored to the same helper so they hash identical bytes), proven by incremental_v2_equals_full_recompute_after_each_block (a multi-block produce/spend sequence, digest checked == fingerprint_utxo_v2 after EVERY block) + incremental_produce_spend_is_exact_inverse. Membership is not tracked in the commitment -- the ledger's utxo_delete (InputNotFound) is what fails closed on a bad spend; the incremental fp mirrors only valid post-validation deltas. S1.5b PART B DONE (2026-06-16) -- the PRODUCTION cutover: fingerprint() now delegates to fingerprint_v2, so the admission post_fp, the seed_to_snapshot anchor, snapshot encode/decode, recovery, forward-sync, and produce-mode ALL move to v2 together (one shared entry, no per-site drift). The original v1 construction is preserved as fingerprint_v1 (FROZEN, historical verification) -- the v1 fingerprint goldens + the 12 boundary-snapshot pins were repointed at it. The store carries a FINGERPRINT_VERSION=2 marker (chaindb META, persistent.rs) checked FAIL-CLOSED on open: a v1/unversioned store is REJECTED (ChainDbError::FingerprintVersionMismatch), never silently upgraded or replayed (v1_unversioned_store_is_rejected_fail_closed). The full workspace suite is GREEN under v2. NO peer-facing change; the AgreementVerdict (block-hash) path is untouched. OQ-UD-3 RESOLVED -> S2 (the on-disk UTxO backend) is now UNBLOCKED.