Program Details
Last Revised: June 17, 2026
The primary goal of the Emergency Hard Fork drill is to validate the unplanned upgrade path for Mesa-era operators when the network has not been gracefully halted via a stop-slot release. In this scenario, the upgrade must pivot to an out-of-band-announced fork-point block (which may still be pending / non-finalized at announcement time). All actor classes — Block Producers, SNARK Worker Operators, zkApp developers, and Archive/Rosetta operators — must converge on the same fork point and discard everything above it.
Tests assume everyone has safely and successfully upgraded to the Mesa network with no significant errors requiring rollback to Berkeley.There are no significant Mesa-era changes to Rosetta, zkApp semantics, or BP workflow, so this is primarily regression testing — but with a different operational model: the upgrade is reactive, the fork point is announced on Discord, and operators must re-canonicalize their archive to the chosen branch before applying the Mesa schema.
If something goes wrong at any stage — missing blocks, fork point mismatch, replayer failure, Rosetta reconciliation drift, BP producing on the wrong branch, zkApp tx lost in rollback. — find detailed information in the docs and post in #mesa-upgrade-testnet Discord channel. Do not try to recover silently; others may be hitting the same issue.
Actors
|
Actor |
What they run |
What they care about |
|
Block Producer (BP) |
Mina daemon with block-producer keys |
Producing on the right branch post-fork; not double-producing across the rollback boundary; new coinbase / slot duration |
|
zkApp Developer |
o1js app |
That their submitted transactions either land or are cleanly rolled back; that o1js bindings + verification key still validate post-fork |
|
Snark worker operators |
Mina internal snark-worker against a coordinator/daemon, or a standalone worker pool |
Not wasting compute on work that will be rolled back; fees they earned actually surviving the rollback; their worker is using the right proving/verification keys post-fork; their bundles are being accepted into the new SNARK pool |
|
Archive / Rosetta operator |
Archive node + Rosetta + Daemon on top of Postgres Data |
DB integrity across the rollback; replayer convergence; Rosetta serving the right network |
|
STAGE 1: Mesa-based Test Network |
|
Goals:
Runbook:
mina-missing-blocks-auditor --archive-uri "$PG_URI" # or as daemon DB_USERNAME=.. \ PGPASSWORD=... \ DB_HOST=... \ DB_PORT=... \ DB_NAME=.. \ MINA_NETWORK=... \ PRECOMPUTED_BLOCKS_URL=.... \ TIMEOUT=600 \ mina-missing-blocks-guardian daemon 2. Ensure you are connected to correct network # ROSETTA_URL env var points to base rosetta url (e.g. http://localhost:3087) curl -s -X POST $ROSETTA_URL/network/list -H 'Content-Type: application/json' -d '{}' | jq . # Expect: { "network_identifiers":[{"blockchain":"mina","network":"testnet"}] } curl -s -X POST $ROSETTA_URL/network/status -H 'Content-Type: application/json' \ -d "{\"network_identifier\":{\"blockchain\":\"mina\",\"network\":\"testnet\"}}" | jq '.current_block_identifier, .genesis_block_identifier' Find more detailed information in the docs and reach out in Discord if you experience any issues. |
|
STAGE 2: EMERGENCY HF DRILL Step 1 – Fork point announcement (Emergency Hardfork Day, ~ noon UTC) |
|
Goals:
FORK_HEIGHT=302442 FORK_STATE_HASH=3NKfDPqtvJyVLVYn2eabjxXspH336eqkjHDkPus5WzbJ8iczckKs FORK_GLOBAL_SLOT=460817 # global_slot_since_genesis (slotSinceGenesis) LATEST_STATE_HASH=3NKj4ir6iRTRmxnrbu92VkUCqnpJ2waatiTAEraZs97iJ7mAFLPz #height 302455 - used for confirmation depth check REQUIRED_CONFIRMATIONS=19 # k MESA_GENESIS_TIMESTAMP=2026-06-017T14:00:00Z The block must be pending (< `REQUIRED_CONFIRMATIONS` deep) at announcement time — o1Labs only announces a fork point once it is confirmed in their archive by more than 15 blocks. BPs, zkApp devs, Archive ops – must align on this tuple.
Runbook:
mina-archive-hardfork-toolbox fork-candidate is-in-best-chain \
--postgres-uri "$PG_URI" \
--fork-state-hash "$FORK_STATE_HASH" \
--fork-height "$FORK_HEIGHT" \
--fork-slot "$FORK_GLOBAL_SLOT"
mina-archive-hardfork-toolbox fork-candidate confirmations \
--postgres-uri "$PG_URI" \
--latest-state-hash "$LATEST_STATE_HASH" \
--fork-slot "$FORK_GLOBAL_SLOT" \
--required-confirmations "$REQUIRED_CONFIRMATIONS"
⚠ is-in-best-chain – confirms the block is on your best chain; confirmation – is the gate that proves it is canonical (k-deep) If is-in-best-chain fails, your archive does not yet have this block on its best chain — wait or pull from the precomputed-blocks bucket. If confirmations fail, either your archive is behind on tip ingestion, or the announcement is wrong. Never proceed against a pending fork point. b. Final missing block auditor pass before destructive changes mina-missing-blocks-auditor --archive-uri "$PG_URI"; echo "exit=$?" c. Snapshot the DB pg_dump "$PG_URI" -Fc -f archive_pre_emergency_hf_$(date +%s).dump
d. Ensure replayer successful run Check that replayer can verify correctness of your postgres database by replaying all transactions from archive db and validating that final ledger is correct mina-replayer --input-file (last checkpoint) --archive-uri postgres://....
⚠ If you want to replay from beginning of network you can convert genesis ledger to replayer input file: jq -c '{genesis_ledger: {accounts: .ledger.accounts, num_accounts: .ledger.num_accounts}}' genesis.json > replayer_input_file.json
|
| Step 2 – Upgrade daemon to the Mesa build distributed by o1Labs. |
|
Goals:
Runbook:
curl -s $GRAPHQL_URL -H 'Content-Type: application/json' \ -d '{"query":"{ bestChain(maxLength:5){ protocolState { previousStateHash consensusState blockHeight slotSinceGenesis blockchainLength } } stateHash creator } }"}' | jq . 2. Snark Work Operator
3.Zkapp Developer
4. Archive/Rosetta Operator
|
| Step 3 – Re-canonicalize archive to the fork point (Archive Operators only) |
|
Goals:
Runbook:
```bash # Stop daemon + Rosetta first so they don't race new inserts. mina-archive-hardfork-toolbox convert-chain-to-canonical \ --postgres-uri "$PG_URI" \ --target-block-hash "$FORK_STATE_HASH" \ --protocol-version "3.0.0" \ --stop-at-slot "$FORK_GLOBAL_SLOT" \ | tee convert_to_canonical.log ``` Then re-run the toolbox to confirm the archive is in the expected shape: ```bash mina-archive-hardfork-toolbox validate-fork \ --postgres-uri "$PG_URI" \ --fork-state-hash "$FORK_STATE_HASH" \ --fork-slot "$FORK_GLOBAL_SLOT" mina-archive-hardfork-toolbox fork-candidate last-filled-block \ --postgres-uri "$PG_URI" | jq . # Expect: height=$FORK_HEIGHT, state_hash=$FORK_STATE_HASH, slot_since_genesis=$FORK_GLOBAL_SLOT mina-missing-blocks-auditor --archive-uri "$PG_URI"; echo "exit=$?" ``` ⚠ Unlike the standard plan, there is **no `stop_transaction_slot` / `stop_network_slot`** to monitor. The “halt” is operator-driven via `convert-chain-to-canonical`. Find more detailed information in the docs and reach out in Discord if you experience any issues. |
| Step 4 – Post Hard fork Network Monitoring (Emergency Hardfork Day, evening UTC) |
|
Goals:
Runbook:
Run Replayer on post hardfork: # Install config: sudo apt-get install -y mina-mesa-config=4.0.0-preflight-3f038cb # Produce new input replayer file post-fork-replayer-intput.json: { "start_slot_since_genesis":{global slot since genesis for first block on post fork network}, "genesis_ledger": { "add_genesis_winner": false, "hash": "{ledger hash of first block on post fork network}", "s3_data_hash": "{s3 data hash}" } } # Run replayer: mina-replayer --input-file post-fork-replayer-input.json --archive-uri postgres://postgres:....
2. Block Producers
3. zkApp developers
Find more detailed information in the docs and reach out in Discord if you experience any issues. |
About Mina Protocol
Mina is the world’s lightest blockchain, powered by participants. Rather than apply brute computing force, Mina uses advanced cryptography and recursive zk-SNARKs to design an entire blockchain that is about 22kb, the size of a couple of tweets. It is the first layer-1 to enable efficient implementation and easy programmability of zero knowledge smart contracts (zkApps). With its unique privacy features and ability to connect to any website, Mina is building a private gateway between the real world and crypto—and the secure, democratic future we all deserve.