# Midnight Indexer v4.0.0 release notes

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

* **Version**: v4.0.0
* **Date**: 2026-03-17

***

## High-level summary[​](#high-level-summary "Direct link to High-level summary")

This release upgrades the Indexer API to v4 and adds support for Node 0.22 and Ledger 8. It also includes performance, reliability, and internal storage updates.

For compatibility, `/api/v3` is currently available as an alias to `/api/v4`, but v4 should be treated as the target API version.

***

## Audience[​](#audience "Direct link to Audience")

This release note is relevant for developers who:

* Use the Midnight Indexer via the Indexer API
* Run and operate the Midnight Indexer

***

## What changed (Summary of updates)[​](#what-changed-summary-of-updates "Direct link to What changed (Summary of updates)")

The updates below summarize the core changes for client integrators and Indexer operators.

* Upgraded Indexer API from v3 to v4
* Added `/api/v3` alias for `/api/v4` for short-term backward compatibility
* Added support for Node 0.22 and Ledger 8
* Replaced deterministic session IDs with random per-session tokens (`indexer-api`)
* Updated to `storage-core` v1.1 with layout v2
* Replaced a window function with a scalar subquery in ledger events query paths
* Batched `ledger_db_nodes` inserts to reduce SQL round trips
* Added lazy loading for ledger state deserialization to avoid recursion depth limit issues

***

## New features[​](#new-features "Direct link to New features")

Below are the new features introduced in this release.

### Indexer API v4[​](#indexer-api-v4 "Direct link to Indexer API v4")

The Indexer API is now v4. This is the recommended API version for all new integrations.

### Temporary v3 compatibility alias[​](#temporary-v3-compatibility-alias "Direct link to Temporary v3 compatibility alias")

`/api/v3` is available as an alias of `/api/v4` to support migration windows for existing clients.

***

## Improvements[​](#improvements "Direct link to Improvements")

* Replaced deterministic session IDs with random per-session tokens (`indexer-api`)
* Batched `ledger_db_nodes` inserts to reduce SQL round trips
* Replaced a window function with a scalar subquery in ledger event query logic
* Added lazy loading for ledger state deserialization to avoid recursion depth limits

***

## Breaking changes[​](#breaking-changes "Direct link to Breaking changes")

Below are the breaking changes and required actions for developers.

### API version update to v4[​](#api-version-update-to-v4 "Direct link to API version update to v4")

**What changed**: The primary Indexer API version is now v4.

**What breaks**: Clients pinned to older API assumptions may fail when they do not align with v4 schema and behavior.

**Required actions**: Update clients to API v4 and validate schema compatibility. Treat `/api/v3` as transitional.

### Internal database storage format update[​](#internal-database-storage-format-update "Direct link to Internal database storage format update")

**What changed**: Internal database format moved to `storage-core` v1.1 with layout v2.

**What breaks**: Existing database state from earlier layout versions is not compatible for in-place reuse.

**Required actions**: Start from a fresh or empty database when deploying this release.

***

## Links and references[​](#links-and-references "Direct link to Links and references")

* **Schema**: [Indexer API v4 schema](https://github.com/midnightntwrk/midnight-indexer/blob/v4.0.0/indexer-api/graphql/schema-v4.graphql)
* **API reference**: [Midnight Indexer API v4](https://docs.midnight.network/api-reference/midnight-indexer.md)
* **Docker image**: [Midnight Indexer Docker image](https://hub.docker.com/r/midnightntwrk/indexer-api)
