The Cardano Conway ledger, compiled from MoonBit and run in your browser
Selûne rebuilds the Conway-era ledger rules from the pinned Haskell sources and checks them in five lanes of evidence. The ledger uses Silverfire, the Selûne cryptography library, for CIP-49 signatures, state commitments and its category diagrams. The scenarios, tallies, traces and diagrams below run on the same compiled code that passes the four-target test suite. The evidence counts come from the pinned receipts.
One transaction, two paths
The Conway LEDGER rule decides the order of every sub-rule. The pinned source, Ledger.hs lines 383 to 457, sends a valid transaction through certificates and governance first. It then hands UTXOW the certificate state from before certificates ran.
The four-epoch trace
The canonical trace runs four epoch boundaries: a constitution that delays its successor, a treasury withdrawal and an info action that expires. The roots below come from the compiled ledger on this page. The same roots are pinned in the test suite on native, wasm, wasm-gc and js.
Parallel schedules match serial order
The block executor runs the same transactions under five schedules from crypto_execution. Each must reach the serial state root, and the faulted schedule must also reach the serial receipt root.
Outside the build
These boundaries carry the unsupported verdict. No test, model or proof on this page reaches past them.
Scripts, signatures and collateral
Each scenario builds a ledger state, uses the CIP-49 test vector and applies the transaction through UTXOW. The script hook calls verify_secp256k1_cip49 in Silverfire. A malformed input is an error. A well-formed bad signature is false.
Conservation and collateral
Consumed value must equal produced value. Net collateral must cover the fee at the collateral percentage. When the transaction is Phase2Invalid, the ledger keeps the net collateral as the fee and credits no donation. Values are whole lovelace from 0 to 2,147,483,647.
The ratification tally
An action ratifies when the constitutional committee, the DReps and the stake pools each meet their threshold. A delaying action enacted earlier in the epoch blocks it. Resigned members, abstentions and expired DReps leave the denominator. A positive threshold over an empty denominator rejects.
Epoch scenarios
Priority, ties and lineage
RATIFY visits proposals in this priority order. Proposals of equal priority keep the order in which they arrived. The ledger demo does not expose this fold, so each rule below lists the evidence that checks it.
| Rule | Quint invariant | Mutant | Lean |
|---|
The ledger as string diagrams
silverfire_cat checks each diagram as a typed term and draws it in the current theme. A counterfactual applies a forbidden rewrite. The checker rejects it and names the rule that it breaks.
Six decisions fixed before the code
Three specialists questioned the specification before any ledger code existed. Each decision below lists the question ids that raised it. Select a role to see the decisions that role raised.
Five lanes of evidence
Each clause closes in one lane. A bounded model or a test replay records passed. Only a discharged proof records proved.
| Lane | Verdict | Result | What it checks |
|---|
moon prove goals
In proofs/cardano/conway_kernels.mbt.
Lean declarations
A control states that a broken variant fails.
Quint mutants
| Id | Change | Invariant it breaks |
|---|