> For the complete documentation index, see [llms.txt](https://docs.midnight.network/llms.txt)

# Onchain Runtime

On-chain runtime releases are now part of Ledger

Starting with Ledger 7.0.0, on-chain runtime versions appear on the [Ledger page](https://docs.midnight.network/relnotes/ledger.md), not on this page. The on-chain runtime keeps its own version number. For example, Ledger 8.1.2 includes on-chain runtime 3.1.1. For other releases, see [Component versions by release](https://docs.midnight.network/relnotes/ledger.md#component-versions-by-release). To choose the version for a DApp, see the [compatibility matrix](https://docs.midnight.network/relnotes/support-matrix.md).

Release 4.0.0 on this page takes its number from Ledger 4.0.0, released on 12 May 2025. The on-chain runtime package in that release is `@midnight-ntwrk/onchain-runtime` 0.3.0, so it predates on-chain runtime 2.0.0 and every later version.

Onchain Runtime is a component of the Midnight infrastructure that enables zero-knowledge proof generation, transaction verification, and privacy-preserving transaction processing.

[Link to related documentation](https://docs.midnight.network/api-reference/onchain-runtime.md)

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

***

<!-- -->

Version4.0.0

StatusAll

### [Release <!-- -->4.0.0](https://docs.midnight.network/relnotes/onchain-runtime/onchain-runtime-4-0-0.md)UNSUPPORTED

12 May 2025

#### Artifacts

* [Onchain Runtime](https://www.npmjs.com/package/@midnight-ntwrk/onchain-runtime)

#### Summary

* Integrated with the new storage model, making required objects `Storable` to allow storing MPT leafs as `Sp`s.
* Added segment IDs to Zswap constructors. These should be set to `1` for fallible offers, and `0` for guaranteed offers.
* Renamed `ZswapLocalStateNoKeys` to `ZswapLocalState`, removing the existing (with keys) state.
* Switch from Pluto-Eris to BLS12-381.
* Switched to using data providers instead of direct prover keys and parameters.
* Add a data provider to fetch key material for Midnight. The source of this may be overridden with the `MIDNIGHT_PARAM_SOURCE` environment variable.
