Midnight.js v5.0.1 release notes
For the complete documentation index, see llms.txt
- Version: v5.0.1
- Date: 2026-11-17
- Environment: Mainnet, Preview, Preprod
- Node.js requirement: 22.12 or later
High-level summary
Midnight.js 5.0.1 is the Midnight.js release in the 1.1 patch to the ledger 9 networks. It moves the ledger 9 stack to the final releases of ledger 9.1.0.2, Compact.js 3.0.2, Wallet SDK 2.0.1, and proof server 9.0.2. Those releases fix contract calls that the networks rejected with Midnight.js 5.0.0. The API doesn't change, and you don't need to recompile or redeploy your contracts.
The networks didn't change for this patch. They still run node 2.1.101, ledger 9.1.0.1, and indexer 4.4.101.
Audience
This release note is relevant for developers who:
- Run a DApp on Mainnet, Preview, or Preprod with Midnight.js 5.0.0
- Call contracts that spend shielded coins they hold, or pay fees with a single DUST spend
- Use testkit-js against a local network
Summary of updates
- Pins
@midnightntwrk/ledger-v91.0.2 and@midnightntwrk/onchain-runtime-v44.0.2, from ledger 9.1.0.2. - Pins
@midnight-ntwrk/compact-js3.0.2. - testkit-js moves to
@midnightntwrk/wallet-sdkand@midnightntwrk/wallet-sdk-prover-client2.0.1,@midnightntwrk/zkir-v33.2.1, and themidnightntwrk/proof-server:9.0.2image. @midnightntwrk/wallet-sdk-address-formatmoves to 4.0.1.@midnight-ntwrk/compact-runtimestays at 0.21.0, and contracts compiled with Compact toolchain 0.36.0 or 0.36.1 work unchanged.
Fixed issues
These fixes come from ledger 9.1.0.2, which Midnight.js 5.0.1 pins:
- A contract call that spends a shielded coin the contract already holds and writes the change back is no longer rejected with
Custom error: 104(ran out of gas budget). Calls are now rehearsed with the widest commitment tree indices. See midnight-ledger#839. - A contract call whose fee is paid with exactly one DUST spend no longer fails with
OutsideTimeToDismiss. Transcripts are now partitioned against the expected shape of the transaction. See midnight-ledger#838. - After a contract writes to a map, clients can load the contract's state again. This is a short-term fix; the full fix ships with a later hard fork. See midnight-ledger#857.
Breaking changes
None.
Upgrade
Move every @midnight-ntwrk/midnight-js-* package and @midnight-ntwrk/testkit-js to 5.0.1 together. If your project pins @midnightntwrk/ledger-v9, @midnightntwrk/onchain-runtime-v4, or @midnightntwrk/compact-js through overrides or resolutions, raise those pins to 1.0.2, 4.0.2, and 3.0.2, or remove them. Otherwise they keep the earlier versions, and the fixed issues stay.
Run proof server 9.0.2 and Wallet SDK 2.0.1 with this release. For the full set of versions, see the compatibility matrix.
Known issues
- The runtime refuses a transaction that declares more than 1,024 nodes. Raising the limit needs a runtime upgrade. See midnight-node#2386.
- A trie insert in the ledger can produce a malformed trie that fails to deserialize. The full fix needs a hard fork. See midnight-ledger#865.