CIP-0165, Canonical Ledger State, proposes to standardize how the Cardano ledger state is represented and serialized so that:
- Different node implementations can exchange equivalent snapshots of the ledger state.
- Tools such as db-sync, Mithril, and other off-chain systems can rely on a stable, documented, versioned format.
- Upgrading nodes across protocol versions becomes easier, because the canonical representation can serve as a migration target.
The proposal focuses on:
- Defining a canonical encoding (currently CBOR described via CDDL).
- Supporting explicit versioning of the ledger state.
- Allowing partial hashing and verification of selected components such as stake distribution or protocol parameters.
- Remaining compatible with ongoing work on UTxO-HD / LSM trees so that canonical snapshots can be built or validated efficiently.
Links
- CIP text (Tweag branch): https://github.com/tweag/CIPs/tree/cip-canonical/CIP-0165
- Upstream CIPs repository: https://github.com/cardano-foundation/CIPs
- Implementation work: https://github.com/tweag/cardano-canonical-ledger
- Namespace CDDL / implementation PRs: https://github.com/tweag/cardano-canonical-ledger/pulls