Skip to main content
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.

Link to related documentation

To download the component, click the appropriate link under Artifacts.


Release 9.1.0.2LATEST

16 November 2026

Artifacts

Summary

Client-side patch on the ledger 9 line: fixes transcript partitioning and WASM contract state loading, with proof server 9.0.2

  • Client-side patch release that promotes 9.1.0.2-rc.0 after QA approval. It does not change transaction validation, state hashes, or anything a node computes, and the node needs no change.
  • Transcript partitioning now sizes the guaranteed section against the predicted transaction time-to-dismiss allowance and rehearses each call with the widest commitment tree indices the chain could assign.
  • New TransactionShape API: callers can pass the expected shape of the final transaction through partition_transcripts_with_tx_shape, Transaction::add_calls_with_tx_shape, and the optional WASM expectedTxShape argument.
  • The WASM API now loads contract state that an ordinary map write can leave in a non-canonical trie shape, through the scoped ALLOW_SHORT_EXTENSION_CHAINS leniency in midnight-storage 3.1.0. Nodes and consensus code must never enable it.
  • Proof server 9.0.2 moves to ZKIR v3 3.2.1, which fixes proving for Compact circuits whose chip requirements earlier versions missed, passes docker run arguments through to the server, and sets MIDNIGHT_PP=/var/cache/midnight/zk-params.
  • No breaking changes, no deprecations, and no required configuration updates. The new WASM arguments are optional and the new Rust functions sit beside the existing ones.
  • npm packages: @midnightntwrk/ledger-v9 1.0.2 and @midnightntwrk/onchain-runtime-v4 4.0.2, also published under the legacy @midnight-ntwrk scope. Crates: midnight-ledger-v9 1.0.2, midnight-storage 3.1.0, and midnight-transient-crypto 3.1.0.

Component versions by release​

A Ledger release includes the on-chain runtime, ZKIR (the zero-knowledge intermediate representation), and the proof server. Each has its own version number. To choose versions for a DApp, see the compatibility matrix.

Mainnet runs ledger 9 after the ledger 9 network upgrade. Preview relaunched as a new ledger 9 chain on 7 November 2026, and Preprod moved to ledger 9 in place on 9 November 2026. To prepare for the change, see the ledger 9 upgrade page.

The node embeds ledger 9.1.0.1. The packages that DApp and wallet builders use carry ledger 9.1.0.2, from the 1.1 patch of 17 November 2026. Ledger 9.1.0.2 changes only what clients compute, not what the node validates.

LedgerOn-chain runtimeZKIRProof server
9.1.0.24.0.23.2.19.0.2
9.1.0.14.0.13.2.09.0.1
9.1.0.04.0.03.2.09.0.0
8.1.33.1.22.1.18.1.3
8.1.23.1.12.1.1None. Use 8.1.3
8.1.13.1.02.1.0None. Use 8.1.3
8.1.03.1.02.1.08.1.0
8.0.33.0.02.1.08.0.3
8.0.23.0.02.1.08.0.2
7.0.02.0.02.1.07.0.0