# Upgrade

> Upgrade phase of the Mesa hard fork — network halt, state export, and Mesa build publication.

Canonical URL: https://docs.minaprotocol.com/network-upgrades/mesa/upgrade-steps/upgrade

Starting at the _stop-network-slot_ the network will not produce nor accept new blocks, resulting in halting the network. During the upgrade period, o1Labs will use automated tooling to export the network state based on the block at the slot just before the _stop-transaction-slot_. The exported state will then be baked into the new Mesa build, which will be used to initiate the upgraded network. It is during the upgrade window that the Mesa network infrastructure will be bootstrapped, and seed nodes will become available. o1Labs will also finalize the archive node upgrade and publish the PostgreSQL database dumps for import by the archive node operators who wish to bootstrap their archives in a trustful manner.

There are tools available to validate that the Mesa node was built from the pre-upgrade network state. To reproduce the packaged genesis ledgers and runtime configuration from the exported fork configuration, see [Verify the Release](/network-upgrades/mesa/verify-the-release). To check fork-block integrity in the archive database, see [In-Depth Validation](/network-upgrades/mesa/upgrade-steps/post-upgrade#in-depth-validation) for the `mina-archive-hardfork-toolbox` commands (`validate-fork`, `fork-candidate no-commands-after`).

## Per-actor summary

| Actor                          | During this phase                                                                                                                                                                                                              |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Block Producers (automode)** | Nothing. Your node transitions to Mesa automatically and will start producing blocks at the Mesa genesis timestamp.                                                                                                            |
| **Block Producers (manual)**   | Stop your node. Wait for the Mesa release announcement, then install the new package and restart with [updated flags](/network-upgrades/mesa/upgrade-steps/post-upgrade).                                                      |
| **SNARK Coordinators**         | Same as block producers — automode transitions automatically; manual requires stop, install, and restart.                                                                                                                      |
| **Standalone SNARK Workers**   | Stop old workers. After the Mesa release is published, redeploy and start workers against the Mesa coordinator — an older worker cannot submit work to a Mesa coordinator.                                                     |
| **Archive Node Operators**     | Install the Mesa archive node release. Point it at your upgraded database (trustless) or import the o1Labs SQL dump (trustful).                                                                                                |
| **Rosetta Operators**          | Follow the archive node upgrade procedure for your archive database. Install the Mesa Rosetta release when published.                                                                                                          |
| **Exchanges**                  | Install the Mesa release if running node infrastructure. **Keep deposits/withdrawals disabled** until block production is confirmed on the Mesa chain (see [Post-Upgrade](/network-upgrades/mesa/upgrade-steps/post-upgrade)). |

## Block Producers and SNARK Workers

:::info
If you are using [Automode](/network-upgrades/mesa/upgrade-modes), your node handles this phase automatically. It will transition to the Mesa network without manual intervention. Skip to [Post-Upgrade](/network-upgrades/mesa/upgrade-steps/post-upgrade) for monitoring guidance.
:::

If you are using **Manual mode**:

1. During the upgrade phase (between _stop-network-slot_ and the publishing of the Mesa release), block producers can shut down their nodes.
2. After the publication of the Mesa node release, block producers and SNARK workers should upgrade their nodes and be prepared for block production at the Mesa genesis timestamp, which is when the first Mesa block will be produced.
3. It is possible to continue using the same libp2p key after the upgrade. Pass it to the Mesa daemon with the [`--libp2p-keypair`](/node-operators/block-producer-node/getting-started) flag. All daemon flags carry over unchanged from Berkeley — see the [Post-Upgrade flag reference](/network-upgrades/mesa/upgrade-steps/post-upgrade#flag-and-configuration-reference) for the full per-role configuration.

## Archive Node Operators and Rosetta Operators

1. Upon publishing the archive node Mesa release, archive node operators and Rosetta operators should upgrade their systems. There will be both Docker images and archive node releases available to choose from.
2. Depending on the chosen upgrade method:
   - _Trustless_
     - Operators should direct their Mesa archive process to the previously upgraded database.
   - _Trustful_
     - Operators shall import the SQL dump file provided by o1Labs to a freshly created database.
     - Operators should direct their Mesa archive process to the newly created database.
