Invariants / DC-SEED-01

DC-SEED-01

DC derived enforced

Canonical UtxoFingerprint determinism: the imported UTxOState uses BTreeMap<TxIn, TxOut> iteration order; UtxoFingerprint is Blake2b-256 over canonical CBOR map(N) [TxIn → TxOut] in that order. Re-importing the same JSON seed yields the same UtxoFingerprint byte-identically across runs.

Source

docs/planning/phase4-n-m-ledger-seed-invariants.md §1 (I-A2)

Enforcement trace

Tests 6

  • crates/ade_runtime/src/seed_import/importer.rs::tests::utxo_seed_two_imports_byte_identical
  • crates/ade_runtime/src/seed_import/importer.rs::tests::utxo_seed_btree_order_independent_of_json_order
  • crates/ade_runtime/src/seed_import/importer.rs::tests::utxo_seed_inline_datum_entry_round_trips
  • crates/ade_runtime/src/seed_import/importer.rs::tests::utxo_seed_reference_script_changes_fingerprint
  • crates/ade_runtime/src/seed_import/importer.rs::tests::utxo_seed_reference_script_deterministic_across_two_imports
  • crates/ade_runtime/src/seed_import/importer.rs::tests::utxo_seed_canonical_script_ref_encoder_known_vector

Cross-references

Strengthened in

Evidence notes

PHASE4-N-M-A S1 (2026-05-26): UtxoFingerprint = Blake2b-256 over canonical CBOR map(N) [TxIn → TxOut_raw] in BTreeMap iteration order. Source-order independence verified on real preprod data: shuffled JSON keys produce byte-identical fingerprints. PHASE4-N-M-A1.1 (2026-05-26) strengthened: reference-script content now participates in the fingerprint via field-3 of the Babbage TxOut canonical bytes; two-imports byte-identity covers entries with PlutusScriptV1/V2/V3 + SimpleScript referenceScripts. Mini preprod 129-entry sample produces deterministic fingerprint 13280fc1e11bbe6d908c91deff0c4cb3731f7b7e88b13c1d716e0211bc176378 across runs.