Ledger v9.1.0.2 release notes
For the complete documentation index, see llms.txt
- Version: v9.1.0.2
- Date: November 16, 2026
High-level summary
Ledger 9.1.0.2 is a client-side patch release on the ledger-9 line. It promotes 9.1.0.2-rc.0 after QA approval. It does not change transaction validation, state hashes, or anything a node computes.
It fixes two ways in which wallets and DApps built transactions that the node then rejected. Transcript partitioning now sizes the guaranteed section against the time to dismiss the final transaction will be allowed, and callers can pass the expected shape of that transaction through the new TransactionShape. Partitioning also rehearses each call with the widest commitment tree indices the chain could assign, so contracts that store a coin's mt_index declare enough written bytes.
It also lets the WASM API load contract state that an ordinary map write can leave in a non-canonical trie shape, which earlier releases rejected, leaving the contract unreadable to clients.
Since the release candidate, the proof server moves to ZKIR v3 3.2.1, which fixes proving for Compact circuits whose chip requirements earlier versions missed, and its image passes docker run arguments through to the server.
Audience
This release note is important for:
- Developers using the ledger WASM bindings, in particular wallets and DApps that partition transcripts or call
Transaction.addCalls - Integrators who build transactions with the
ledger-9Rust crates - Proof server operators
- Node developers, only to note that the node needs no change and must not enable the new
storageleniency
Released packages
| Package | Version |
|---|---|
npm @midnightntwrk/ledger-v9 | 1.0.2 |
npm @midnightntwrk/onchain-runtime-v4 | 4.0.2 |
| proof server | 9.0.2 |
crates.io midnight-ledger-v9 | 1.0.2 |
crates.io midnight-storage | 3.1.0 |
crates.io midnight-transient-crypto | 3.1.0 |
The npm packages are also published under the legacy @midnight-ntwrk scope. Every other package, including @midnightntwrk/zkir-v2, midnight-zswap, and the onchain-* crates, is unchanged from 9.1.0.1.
Build pins, read from the lockfile: midnight-circuits 7.3.0, midnight-zk-stdlib 2.4.0, and ZKIR v3 (midnight-zkir, from crates.io) 3.2.1.
Summary of updates
Transcript partitioning
- Fix: transcript partitioning sizes the guaranteed section against the predicted transaction's time-to-dismiss allowance,
max(min_time_to_dismiss, time_to_dismiss_per_byte * size), minus a reserve, instead of a fixed floor. - Fix: the predicted size and the reserve come from a mock transaction of the calls'
TransactionShape. The reserve covers every call's proof verification, including calls that end up fully fallible, priced by each call's own public inputs. Partitioning therefore reserves more than before, and may keep fewer calls guaranteed for the same input. - Fix: partitioning rehearses each call with the widest commitment tree indices the chain could assign.
- Feature:
TransactionShapecounts a transaction's non-call parts: intents, Night and non-Night unshielded spends and outputs, Dust spends, Zswap inputs, outputs and transients, and Dust registrations and deregistrations.TransactionShape::for_callsderives the counts of the balanced transaction from the calls. - Feature:
partition_transcripts_with_tx_shapeandTransaction::add_calls_with_tx_shapepartition against a caller-supplied shape. Use them when the final transaction has more parts than the calls imply, such as a payment from several Night UTXOs.add_callsfolds the Zswap parts it is given into the shape. - Feature: the WASM API exposes
TransactionShapeas a class obtained fromTransactionShape.forCalls, with one accessor per count, and adds an optionalexpectedTxShapeargument topartitionTranscriptsandTransaction.addCalls.
Contract state loading
- Fix: the WASM API deserializes contract state, transactions, and ledger state that contain a trie with a short
Extensionchain. - Feature:
storage::merkle_patricia_trie::ALLOW_SHORT_EXTENSION_CHAINSis a scoped thread-local, unset by default. While it is set, decoding accepts a trie in which anExtensionnode shorter than 255 nibbles has anExtensionchild; every other invariant still applies.onchain-runtime-wasmsets it while deserializing, so both npm packages get the leniency. Nodes and consensus code must never set it.
Proof server
- Fix: ZKIR v3 moves to
3.2.1, which derives a circuit's chip architecture from every instruction rather than only its inputs and entry points. Proving failed for Compact circuits that needed a chip only through another instruction, such as a foreign-field constant. Existing proving and verifying keys remain valid. - Fix: the image passes trailing
docker runarguments to the server (docker run <image> -vnow works; previously thebash -centrypoint silently dropped them). The oldmidnight-proof-server ...command forms still work. - Feature: the image sets
MIDNIGHT_PP=/var/cache/midnight/zk-params; mount a volume there to skip the parameter download on restart.
Dependencies
- Feature:
midnight-transient-crypto3.1.0 addsPureGeneratorPedersen::smallest_representable, whichmidnight-ledger-v91.0.2 requires. midnight-storage3.1.0 addsALLOW_SHORT_EXTENSION_CHAINSand depends onscoped-tls.
New features requiring configuration updates
None in this release. Mounting a volume at MIDNIGHT_PP for the proof server is optional.
Deprecations
None in this release.
Breaking changes or required actions for developers
None in this release. The new WASM arguments are optional, and the new Rust functions sit beside the existing ones. To pick up the fixes, update @midnightntwrk/ledger-v9 to 1.0.2 and @midnightntwrk/onchain-runtime-v4 to 4.0.2 (refresh your lockfile; wallet SDK 2.0.1 pins ledger-v9 1.0.2), and run proof server 9.0.2.
Bug fixes and quality improvements
| Component | Description |
|---|---|
| ledger | A contract call paid with exactly one DUST spend could fail with OutsideTimeToDismiss, because partitioning sized the guaranteed section against a floor rather than the transaction's allowance (midnight-ledger#838). |
| ledger | A contract that stores a coin's mt_index under-declared its written bytes once the commitment tree grew past 255 entries, and the node rejected the call with Custom error: 104 (ran out of gas budget) (midnight-ledger#839). |
| ledger-wasm, onchain-runtime-wasm | After a map write, a contract's state could fail to deserialize in the WASM API, so clients could neither read the contract nor build calls to it (midnight-ledger#856). |
| proof server | Proving failed for ZKIR v3 circuits that need a chip only through an instruction other than their inputs and entry points (fixed in midnight-zkir 3.2.1). |
| proof server | The image dropped trailing docker run arguments. |
Known issues
MerklePatriciaTrieinsertion can still build the shortExtensionchain that strict decoding rejects. Nodes agree on that shape, and changing it changes state hashes, so the fix needs a hard fork. This release only lets clients load such state. Workaround: load affected state through the WASM API, or withALLOW_SHORT_EXTENSION_CHAINSset, in client code only.