Invariants / T-ENC-03

T-ENC-03

T true enforced

Round-trip identity: encode(decode(bytes)) == bytes for valid encodings

Source

Project constitution §2, D-3

Cluster
CL-CRYPTO-VERIFY
Authority surface
CBOR wire-byte encode/decode on 10,500 contiguous blocks across 7 eras; per-variant round-trip across all 11 Ouroboros mini-protocol message taxonomies (S-A2); plus real-capture corpora from cardano-node 11.0.1 across N2N handshake (mainnet), chain-sync, block-fetch, keep-alive, peer-sharing (preprod local) and N2C handshake (preprod local Unix socket)

Enforcement trace

Tests 19

  • full_corpus_round_trip::all_42_blocks_round_trip_byte_identical
  • full_corpus_round_trip::all_42_blocks_fields_match_reference
  • codec::handshake::tests::roundtrip_every_variant
  • codec::n2c_handshake::tests::roundtrip_every_variant
  • codec::chain_sync::tests::roundtrip_every_variant
  • codec::block_fetch::tests::roundtrip_every_variant
  • codec::tx_submission::tests::roundtrip_every_variant
  • codec::keep_alive::tests::roundtrip_every_variant
  • codec::peer_sharing::tests::roundtrip_every_variant
  • codec::local_chain_sync::tests::roundtrip_every_variant
  • codec::local_tx_submission::tests::roundtrip_every_variant
  • codec::local_state_query::tests::roundtrip_every_variant
  • codec::local_tx_monitor::tests::roundtrip_every_variant
  • handshake_real_capture_corpus::real_capture_round_trips_byte_identical
  • chain_sync_real_capture_corpus::real_capture_round_trips_byte_identical
  • block_fetch_real_capture_corpus::real_capture_round_trips_byte_identical
  • keep_alive_real_capture_corpus::real_capture_round_trips_byte_identical
  • peer_sharing_real_capture_corpus::real_capture_round_trips_byte_identical
  • n2c_handshake_real_capture_corpus::real_capture_round_trips_byte_identical

Cross-references

Strengthened in