Invariants / CN-CONS-IN-01

CN-CONS-IN-01

CN release enforced

Single LiveConsensusInputs importer authority: exactly one pub fn ade_runtime::consensus_inputs::importer::import_live_consensus_inputs converts a cardano-cli JSON bundle into a typed, validated LiveConsensusInputsCanonical. The BLUE admission path consumes only the canonicalized form. The raw JSON is RED / operational evidence; it never enters BLUE.

Required canonical fields: network_magic, genesis_hash, era, epoch_no, epoch_start_slot, epoch_end_slot, active_slots_coeff, epoch_nonce, pool_distribution, pool_vrf_keyhashes, protocol_params_hash, source_cardano_node_version, source_query_command, source_tip_hash, source_tip_slot, fingerprint.

Source

docs/planning/phase4-n-m-c-operator-pass-invariants.md §1 (I-C1)

Enforcement trace

Tests 5

  • consensus_inputs::importer::tests::minimal_round_trip_imports_to_typed
  • consensus_inputs::importer::tests::unsupported_era_fails_fast
  • consensus_inputs::importer::tests::import_is_deterministic_across_repeated_calls
  • consensus_inputs::canonical::tests::import_round_trip_yields_canonical_form_with_fingerprint
  • consensus_inputs::canonical::tests::fingerprint_is_deterministic_across_repeated_imports

Cross-references

Strengthened in

Evidence

  • PHASE4-N-M-C S1a (2026-05-26) shipped the typed-validated raw form + closed error sum + sole-authority gate. PHASE4-N-M-C S1b (2026-05-26) added the Canonical form with the canonical-CBOR Blake2b-256 fingerprint — import_live_consensus_inputs is the SOLE Canonical-returning authority. ade_runtime::consensus_inputs::importer::import_live_consensus_inputs the rule statement names is the C1b file-variant; the C1a raw importer is the lower-tier authority that C1b composes. PHASE4-N-M-SCHED (2026-05-27) strengthens by wiring canonical.epoch_no through to the admission bootstrap's make_schedule_for_imported_window, so the era schedule reports the correct epoch for every imported-window slot — the load-bearing fix that unblocked C5 BlockAdmitted (committed transcript at docs/evidence/phase4-n-m-c-operator-pass-transcript.jsonl).