IntersectMBO /cardano-ledger

The ledger implementation and specifications of the Cardano blockchain.

★ 298⑂ 184👁 47⑃ 4,121● 2,129▤ 2
HaskellApache-2.0Created 2018-09-24cardano-ledger.cardano.intersectmbo.org/
Download: cardano-ledger-spec-2023-04-03cardano-ledger-spec-2023-04-03 ↓032023-04-03
+0
Daily
298
stars
184
forks
47
watchers
4,121
prs
2,129
issues
2
releases

README

Cardano Ledger


  
  
  


This repository contains the formal specifications, executable models,
and implementations of the Cardano Ledger.

The documents can be accessed using the following links:

Era | Design Documents | Formal Specification | CDDL
----|------------------|----------------------|-----
Byron | | Chain Spec, Ledger Spec | CDDL, PDF
Shelley | Design | Spec | CDDL
Allegra | Same as Mary era below | Same as Mary era below | CDDL
Mary | Multi-Currency, UTXOma | Spec | CDDL
Alonzo | eUTXO| Spec | CDDL
Babbage | batch-verification, CIP-31, CIP-32, CIP-33 | Spec | CDDL
Conway | CIP-1694 | Spec | CDDL

Note that the formal specification documents present the specification in a
diff-style manner. That is, each document shows specification changes with
respect to documents of previous eras.

There is an ongoing effort to provide a full machine-verified formal
specification of the Cardano
Ledger that
will subsume the (formal specification) documents listed above. This effort is
complete for Conway but partially complete for previous eras.

Other Documents:
- Non-integer calculations specification: details on the parts of the Shelley specification that use real numbers.
- Stake pool ranking specification: details for a robust stake pool ranking mechanism.
- Explanation of the small-step-semantics framework: a guide to the notation and style used by our ledger rules.

In addition, there is a formalization of the Ledger Specification in Isabelle/HOL which can be found here.

Some user documentation is published on Read the Docs

Haddock code documentation of the latest master branch is available here.

 Repository structure

The directory structure of this repository is as follows:

- Byron
  - ledger
    - formal-spec
    - executable-spec
    - implementation
    - cddl
  - chain
    - formal-spec
    - executable-spec
- Shelley
  - design-spec
  - formal-spec
  - implementation
  - tests
  - cddl
- Allegra - Timelocks
  - formal-spec
  - implementation
  - tests
- Mary - Multi-Assets
  - formal-spec
  - implementation
  - tests
- Alonzo - Smart Contracts
  - formal-spec
  - implementation
  - cddl
  - tests
- Babbage
  - formal-spec
  - implementation
  - cddl
  - tests
- Conway - Governance
  - formal-spec
  - implementation
  - cddl
  - tests
- Libraries

 Building

It is recommended to use nix for building everything in this repository. Make sure you have a recent version of nix by following this guide.

Haskell files can be built with cabal inside of a nix shell, which can be entered by invoking nix develop from the root directory.

 Nix Cache

When using nix it is recommended that you setup the cache, so that it can
reuse built artifacts, reducing the compilation times dramatically:

If you are using NixOS add the snippet below to your
/etc/nixos/configuration.nix:


nix.settings = {
  experimental-features = [ "nix-command" "flakes" ];
  substituters = [
    "https://cache.nixos.org"
    "https://cache.iog.io"
  ];
  trusted-public-

Top issues

Latest release

cardano-ledger-spec-2023-04-03 cardano-ledger-spec-2023-04-03 2023-04-03

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON