Midnight.js v5.0.3 release notes
For the complete documentation index, see llms.txt
- Version: v5.0.3
- Date: 2026-11-24
- Environment: Mainnet, Preview, Preprod
- Node.js requirement: 22.12 or later
High-level summary
Midnight.js 5.0.3 is a patch release for the ledger 9 stack. The HTTP proof provider now also retries when the proof server answers 429, waits for the Retry-After header, and refuses proof server redirects instead of following them. A random failure when merging the calls of a contract-scoped transaction is fixed. The ledger 9 pins don't change, so no contract recompile or redeploy is needed.
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:
- Build DApps with Midnight.js 5.0.x on Mainnet, Preview, or Preprod
- Prove transactions against a remote proof server
- Use contract-scoped transactions with more than one call
Summary of updates
- The HTTP proof provider also retries when the proof server answers 429, and it waits for the
Retry-Afterheader when the server sends one. It already retried 500, 503, and network failures. It doesn't retry 502 or 504. - The HTTP proof provider refuses proof server redirects instead of following them.
- Scoped contract calls move colliding segment identifiers before merging, so merged calls keep distinct segments.
- Contract calls refuse a ledger era they don't know instead of treating it as the current era. This prepares for future eras and changes nothing on today's networks.
- The repository's end-to-end test stacks move to node 2.1.101 and indexer 4.4.101. These stacks aren't part of the npm packages.
- Dependencies refresh from the npm minor and patch group. The ledger 9 pins stay at the 5.0.1 set:
@midnightntwrk/ledger-v91.0.2,@midnightntwrk/onchain-runtime-v44.0.2, Compact.js 3.0.2, and proof server 9.0.2. - Documentation: two API documentation updates and contributor agent skills for the compactc bump and end-to-end test workflows.
- As in 5.0.2, the GitHub release attaches its test evidence and a
published-packagesfile listing the sha512 integrity of each published@midnightntwrkpackage, so you can compare it withnpm view <package>@<version> dist.integrity.
Fixed issues
- A contract-scoped transaction with more than one call could fail at random with
key (segment_id) collision during intents merge. With two calls, this happened about once in 65,535 runs. The calls now get distinct segments before they merge. - The generated API documentation listed the root module of
@midnightntwrk/midnight-jsas an unnamed, empty link. The root module is now namedindex.
Breaking changes
None. The public API doesn't change. One behavior changes: the HTTP proof provider no longer follows redirects. If your proof server URL redirects, for example from http to https or to another host, requests now fail with ProofServerError. Set the final proof server URL in your configuration.
Upgrade
Move every @midnightntwrk/midnight-js-* package and @midnightntwrk/testkit-js to 5.0.3 together, installing from npm. No code changes are needed unless your proof server URL redirects, and you don't need to recompile or redeploy your contracts.
Run proof server 9.0.2 and Wallet SDK 2.0.1 with this release, unchanged from 5.0.1. For the full set of versions, see the compatibility matrix.
Known issues
- 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.