For the complete documentation index, see llms.txt
Ledger
The ledger in Midnight is a public record of contract states and token states, consisting of Zswap’s cryptographic commitments and a mapping of contract addresses to their respective states.
To download the component, click the appropriate link under Artifacts.
Release 8.1.3LATEST
2 October 2026
Artifacts
Summary
Security patch for critical advisory GHSA-wr7g-rr4v-jmj8: stricter validity rules for contract call transcripts
- Before this release, an attacker could get past the one-time checks of a smart contract, for example to claim the same payout more than once.
- Contract call transcripts must use canonical field values in
push,pushs, andidx-style path keys. A Merkle tree inpushorpushsmust be empty, and transcripts cannot containnoopwith a count of 0. - A node on 8.1.3 rejects some contract calls that a node on 8.1.2 accepts, so every block producer should run 8.1.3. Node 1.0.400 includes it.
- For transactions built with the Compact compiler and Midnight.js, nothing changes: the wire format, stored state, and TypeScript declarations match 8.1.2.
- Ledger 8.1.3 does not rewrite existing contract state. If your smart contract uses a
SetorMapas a one-time guard with keys that contain aField, such asSet<Field>or a struct key with aFieldmember, read the advisory and check the state of your contract. - The proof server image
midnightntwrk/proof-server:8.1.3is on Docker Hub, with a signed build manifest on theproof-server-8.1.3GitHub release. Docker Hub has no image for ledger 8.1.1 or 8.1.2. - Rust API: in
onchain-vm,Key::ValueholdsAlignedValueCheckedandOp::PushholdsStateValue<D, AlignedValueChecked>. Convert withAlignedValueChecked::try_fromorStateValue::try_into_checked.
Component versions by release
A Ledger release includes the on-chain runtime and ZKIR, the zero-knowledge intermediate representation. Each has its own version number. To choose versions for a DApp, see the compatibility matrix.
| Ledger | On-chain runtime | ZKIR |
|---|---|---|
| 8.1.3 | 3.1.2 | 2.1.1 |
| 8.1.2 | 3.1.1 | 2.1.1 |
| 8.1.1 | 3.1.0 | 2.1.0 |
| 8.1.0 | 3.1.0 | 2.1.0 |
| 8.0.3 | 3.0.0 | 2.1.0 |
| 8.0.2 | 3.0.0 | 2.1.0 |
| 7.0.0 | 2.0.0 | 2.1.0 |