CN-GENESIS-01
CN derived enforcedThe Shelley genesis closed-contract parser accepts a real cardano-cli shelley-genesis.json and produces a canonical GenesisAnchor. Required fields (networkMagic, systemStart, slotLength, slotsPerKESPeriod, maxKESEvolutions) fail-closed on missing / malformed / wrong-type input. No implicit defaults (e.g., 'if missing, assume preprod' rejected). No stringly fallback (e.g., "1" rejected for u32 fields). Extra unknown keys accepted-and-ignored for forward compatibility, iff they do not alter interpretation — the GenesisAnchor produced from an extra-key fixture MUST byte-equal the canonical fixture's GenesisAnchor. The kes_anchor_slot is operator-supplied (not in genesis) and passed to the parser as a separate argument. systemStart parsing uses a deterministic ISO 8601 → Unix epoch milliseconds conversion (Howard Hinnant proleptic Gregorian).
- Source
docs/planning/phase4-n-r-invariants.md §1 (I7); §2 (N7); §3 (D5); N-R-A A1 OQ7 fixtures
- Cluster
- PHASE4-N-R-C
- Introduced in
- PHASE4-N-R-C
Enforcement trace
Tests 6
- accepted_shelley_genesis_parses_to_expected_anchor
- missing_required_field_emits_structured_error
- stringly_int_emits_malformed_field_type
- extra_inert_keys_produce_byte_identical_anchor
- malformed_numeric_negative_slot_length_rejected
- iso8601_parse_anchors_to_known_unix_ms_values