🎉 The o1Labs team is proud to announce that the 4.0.2 Stable Release is now ready and available for Mainnet & Devnet! 🎉
4.0.2 is a performance and stability release for the Mesa networks. It cuts the memory that block producers and SNARK workers need, speeds up block production and gossip, fixes several ways a node could stall or penalise good peers, and repairs Rosetta transaction search paging. No protocol change is included.
If you run into any issues, please include Release: 4.0.2 in the name of any issues you create. Please report any issues you encounter here or join the discussion!
What's Included in 4.0.2?
Memory
- Prover memory: the prover needs about 45% less memory per proof (peak live memory on a 2^15 circuit drops from 1110 MiB to 628 MiB). Proofs are byte-identical to 4.0.1.
- Memory-mapped proving keys: proving keys are now loaded from a memory-mapped cache instead of being decoded into the heap. The operating system can reclaim the pages under memory pressure, and processes on one host share them. With four SNARK workers on one machine, total worker memory falls from about 6.5 GB to about 2.7 GB, and each extra worker costs about 0.55 GB instead of 1.6 GB. The cache is on by default; set
MINA_USE_MMAP_CACHE=0to opt out. It writes.mmapfiles beside the existing keys, converts existing keys on first start instead of regenerating them, and nodes in either mode can share a cache directory. To share pages between containers, the cache directory must be on a disk-backed filesystem that they all mount. - Verification-key-only processes: a process that only verifies no longer keeps proving keys and constraint systems resident. Its memory falls from about 1 GB to about 210 MB.
- Cached wrap verification keys are now read correctly after their header, so they are no longer re-derived from the proving key on every start.
- Memory growth during block production, transition processing and catchup is reduced, especially when the node is overloaded or invalidates stale catchup jobs.
- Transaction pool: a verification-key refcount leak is fixed, so dropped commands no longer hold cache handles until restart.
Performance
- Block production: selecting transactions and completed work for a block is now linear in the number of candidates instead of quadratic. Blocks with many transactions are produced noticeably faster; the blocks themselves are unchanged.
- Gossip and block application: detailed per-transaction log messages are built only when the log level will print them. On a test network with a thousand transactions per block this removed about 9% of the block producer's CPU.
- SNARK work selection runs on statements and builds a proving spec only for the job that is dispatched, instead of building every spec on each best-tip change.
- SNARK worker: an artificial 0.5-second pause between work items is removed, so proof generation flows continuously.
Networking
- Duplicate blocks: a peer that sends a block the node already has is no longer penalised after a timeout. On well-connected nodes this affected a large share of incoming blocks. Read more
- Gossip rate limiting: a node at its gossip limit now waits exactly as long as it needs to, instead of spinning on CPU or pausing for minutes.
- Seed peers: connections to seed peers made while networking was still starting are now reported to the daemon, so a node no longer waits up to 60 seconds for peers it is already connected to, and no longer reports
Connectingwhile connected. - Bootstrap and catchup: two stall fixes. The downloader now wakes when a peer becomes useful again instead of waiting for a brand-new peer, and its flush delay is bounded instead of being reset on every enqueue.
- Bootstrap threshold now uses the configured
kconstant.
Daemon
--precomputed-blocks-dir DIR: writes each precomputed block to its own file named<network>-<height>-<state-hash>.json, the same naming as the precomputed block bucket, so the directory can be uploaded as is. Blocks are written by a background job, so a slow disk no longer delays block processing.--precomputed-blocks-fileis deprecated and logs a warning.- Startup diagnostics: unhandled exceptions at startup are logged as structured JSON with full details before the process exits, instead of crashing silently.
- Packaging: the daemon and archive packages now depend on
curl, which they use to download ledgers. A fresh install on a host withoutcurlno longer fails withCould not find a ledger tar file for hash ….
Archive node
Mina_Archive_ingest_duration_ms: a new Prometheus histogram of how long each block waited in the ingest queue, labelled by source (diff,precomputed,extensional).mina-archive-healthcheck: new--skip-block-recencyflag forreadyandwait, so a readiness probe does not fail after a restore from a dump or while blocks arrive more than--max-delayapart. Read moremina advanced test submit-to-archivenow assigns nonces in application order, so the blocks it submits are no longer empty.
Rosetta
/search/transactions:total_countis now the size of the whole result on every page, pages add up to the whole result, and a response lists user, then internal, then zkApp commands. Paging past the user commands no longer skips internal and zkApp commands. Read more
Release engineering
- Packages are also published to the signed
stable.apt.packages.minaprotocol.comrepository (see below).
Complete Changelog since 4.0.1:
Supported environments include Linux (Debian 12, Ubuntu 22.04 LTS & Ubuntu 24.04 LTS), and any host machine with Docker.
🚨NOTE - Ubuntu 20.04 (focal) and Debian 11 (bullseye) have reached EOL and are no longer supported. This release ships no packages or images for them.🚨
Upgrading & Connecting to Mainnet
Debian Packages:
Debian Repository: First, set up and update the signed stable Debian Repository for your platform with the following commands:
sudo rm -f /etc/apt/sources.list.d/mina*.list
curl -fsSL https://stable.apt.packages.minaprotocol.com/repo-signing-key.asc | sudo gpg --dearmor -o /usr/share/keyrings/mina.gpg
echo "deb [signed-by=/usr/share/keyrings/mina.gpg] https://stable.apt.packages.minaprotocol.com $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/mina.list
sudo apt-get update
The unsigned packages.o1test.net repository is still supported and also carries 4.0.2. The signed repository is preferred, because apt verifies the package signatures. If you keep using packages.o1test.net, set it up with:
sudo rm -f /etc/apt/sources.list.d/mina*.list
echo "deb [trusted=yes] http://packages.o1test.net $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/mina.list
sudo apt-get update
Then, install the package(s) that you need:
Mina Daemon: sudo apt-get install --allow-downgrades -y mina-mainnet=4.0.2-84b8d96
Mina Archive: sudo apt-get install --allow-downgrades -y mina-archive-mainnet=4.0.2-84b8d96
Mina Rosetta: sudo apt-get install --allow-downgrades -y mina-rosetta-mainnet=4.0.2-84b8d96
Mina Archive Schema: create_schema.sql
Config File: /var/lib/coda/config_84b8d969.json
Docker Images:
Every docker image is built for each of the supported platforms, replace CODENAME in the images below with your choice of jammy, noble, or bookworm to select the base docker image.
Mina Daemon: minaprotocol/mina-daemon:4.0.2-84b8d96-CODENAME-mainnet
Mina Archive: minaprotocol/mina-archive:4.0.2-84b8d96-CODENAME-mainnet
Mina Rosetta: minaprotocol/mina-rosetta:4.0.2-84b8d96-CODENAME-mainnet
Step by Step Guide:
Docker only Make sure to run with:
--peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt or add PEER_LIST_URL=https://bootnodes.minaprotocol.com/networks/mainnet.txt to your .mina-env.
Run mina daemon with:
mina daemon --peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt
Check out our documentation for complete instructions on using this version to connect to Mainnet.
If you are running the correct version on the correct network MAINNET, mina client status will show:
Chain id: 0718f61ab88f9d0fa643ff4dc3a3d5998dd6d51a6008b2b0339b0dbb26133886
Git SHA-1: 84b8d96954b218f372b93f65a071abf528e6bb61
Upgrading & Connecting to Devnet
Use the same Debian repository setup as above, then install:
Mina Daemon: sudo apt-get install --allow-downgrades -y mina-devnet=4.0.2-84b8d96
Mina Archive: sudo apt-get install --allow-downgrades -y mina-archive-devnet=4.0.2-84b8d96
Mina Rosetta: sudo apt-get install --allow-downgrades -y mina-rosetta-devnet=4.0.2-84b8d96
Config File: /var/lib/coda/config_84b8d969.json
Docker Images:
Mina Daemon: minaprotocol/mina-daemon:4.0.2-84b8d96-CODENAME-devnet
Mina Archive: minaprotocol/mina-archive:4.0.2-84b8d96-CODENAME-devnet
Mina Rosetta: minaprotocol/mina-rosetta:4.0.2-84b8d96-CODENAME-devnet
Run mina daemon with:
mina daemon --peer-list-url https://bootnodes.minaprotocol.com/networks/devnet.txt
If you are running the correct version on the correct network DEVNET, mina client status will show:
Chain id: ebfce0d570bc22eb041e1a7b0a46bbc3ed5d0a1030ef2ab5e36eef908b93eba8
Git SHA-1: 84b8d96954b218f372b93f65a071abf528e6bb61