Skip to content

Commit 087520f

Browse files
committed
appendix fix and renaming berkeley -> mesa
1 parent e19daf8 commit 087520f

4 files changed

Lines changed: 34 additions & 39 deletions

File tree

docs/mesa-upgrade/appendix.mdx

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Below we present details of what changed in the archive node database schema bet
1717

1818
### Extended zkApp State Fields
1919

20+
Both zkApp state tables have been modified to support additional state elements:
21+
2022
**zkapp_states_nullable table**
2123
- Added columns `element8` through `element31` (nullable integer fields)
2224
- Each new column references `zkapp_field(id)`
@@ -39,31 +41,24 @@ ALTER TABLE zkapp_states ADD COLUMN IF NOT EXISTS element8 INT DEFAULT <zero_fie
3941
ALTER TABLE zkapp_states ADD COLUMN IF NOT EXISTS element31 INT DEFAULT <zero_field_id> NOT NULL REFERENCES zkapp_field(id);
4042
```
4143

42-
### Migration History Tracking
44+
This expansion allows zkApps to store up to 31 state elements instead of the previous 8, significantly increasing the state storage capacity for complex smart contracts.
4345

44-
The upgrade introduces a new `migration_history` table to track database schema migrations. This helps manage future upgrades and prevents applying the same migration multiple times.
46+
### Version Tracking
4547

46-
**migration_status enum type**
47-
```sql
48-
CREATE TYPE migration_status AS ENUM ('starting', 'applied', 'failed');
49-
```
48+
The upgrade introduces a new `version` table to keep track of the database schema version. The purpose of this table is to help with future database migrations. The table tracks which migration scripts were applied and when.
5049

51-
**migration_history table**
50+
**version table**
5251
```sql
53-
CREATE TABLE IF NOT EXISTS migration_history (
54-
commit_start_at TIMESTAMPTZ NOT NULL DEFAULT NOW() PRIMARY KEY,
55-
protocol_version TEXT NOT NULL,
56-
migration_version TEXT NOT NULL,
57-
description TEXT NOT NULL,
58-
status migration_status NOT NULL
52+
CREATE TABLE IF NOT EXISTS version (
53+
version_num INT PRIMARY KEY,
54+
applied_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
5955
);
6056
```
6157

62-
The table tracks:
63-
- **commit_start_at**: Timestamp when the migration started
64-
- **protocol_version**: Target protocol version (e.g., '4.0.0' for Mesa)
65-
- **migration_version**: Version of the migration script itself (e.g., '0.0.5')
66-
- **description**: Human-readable description of the migration
67-
- **status**: Current state of the migration (starting, applied, or failed)
58+
The version table provides:
59+
- **Migration tracking**: Records which migrations have been applied
60+
- **Timestamp tracking**: Shows when each migration was executed
61+
- **Idempotency**: Prevents duplicate migration runs
62+
- **Version identification**: Easily identify the current database schema version
6863

69-
The migration script uses protocol version '3.0.0' for Berkeley and '4.0.0' for Mesa, with built-in safety checks to prevent reapplying migrations or running them on incorrect database versions.
64+
The table is created if it does not exist already. Rollback and upgrade scripts will insert a new row with the version number and timestamp when the script was applied.

docs/mesa-upgrade/flags-configs.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ sidebar_label: Post-Upgrade Flags and Configurations
44
hide_title: true
55
description: Post-Upgrade Flags and Configurations for Mainnet
66
keywords:
7-
- Berkeley
7+
- Mesa
88
- upgrade
99
- flags
1010
- configurations
1111
---
1212

1313
# Post-Upgrade Flags and Configurations for Mainnet
1414

15-
Please refer to the Berkeley node release notes [here](https://github.com/MinaProtocol/mina/releases/tag/3.0.3).
15+
Please refer to the Mesa node release notes [here](https://github.com/MinaProtocol/mina/releases/tag/4.0.0).
1616

1717
### Network details
1818

@@ -27,7 +27,7 @@ Seed List
2727
https://bootnodes.minaprotocol.com/networks/mainnet.txt
2828
2929
Node build
30-
https://github.com/MinaProtocol/mina/releases/tag/3.0.3
30+
https://github.com/MinaProtocol/mina/releases/tag/4.0.0
3131
```
3232

3333
### Block Producer's
@@ -87,8 +87,8 @@ Running an Archive Node involves setting up a non-block-producing node and a Pos
8787
For more information about running archive nodes, see [Archive Node](/node-operators/archive-node).
8888

8989
The PostgreSQL database requires two schemas:
90-
1. The PostgreSQL schema used by the Mina archive database: in the [release notes](https://github.com/MinaProtocol/mina/releases/tag/3.0.3)
91-
2. The PostgreSQL schema extensions to support zkApp commands: in the [release notes](https://github.com/MinaProtocol/mina/releases/tag/3.0.3)
90+
1. The PostgreSQL schema used by the Mina archive database: in the [release notes](https://github.com/MinaProtocol/mina/releases/tag/4.0.0)
91+
2. The PostgreSQL schema extensions to support zkApp commands: in the [release notes](https://github.com/MinaProtocol/mina/releases/tag/4.0.0)
9292

9393
The non-block-producing node must be configured with the following flags:
9494
```
@@ -127,7 +127,7 @@ docker run
127127
--name rosetta --rm \
128128
-p 3088:3088 \
129129
--entrypoint '' \
130-
minaprotocol/mina-rosetta:3.1.0-ae112d3-bullseye-mainnet \
130+
minaprotocol/mina-rosetta:4.0.0-bullseye-mainnet \
131131
/usr/local/bin/mina-rosetta \
132132
--archive-uri "${PG_CONNECTION_STRING}" \
133133
--graphql-uri "${GRAPHQL_URL}" \

docs/mesa-upgrade/requirements.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
title: Requirements
33
sidebar_label: Requirements
44
hide_title: true
5-
description: Berkeley upgrade is a major upgrade that requires all nodes in a network to upgrade to a newer version. It is not backward compatible.
5+
description: Mesa upgrade is a major upgrade that requires all nodes in a network to upgrade to a newer version. It is not backward compatible.
66
keywords:
7-
- Berkeley
7+
- Mesa
88
- upgrade
99
- hardware requirements
1010
---
@@ -30,7 +30,7 @@ Please note the following are the hardware requirements for each node type after
3030

3131
:::caution
3232

33-
If you have `mina-generate-keypair` installed, you will need to first `sudo apt remove mina-generate-keypair` before installing `mina-mainnet=3.1.0-ae112d3`.
33+
If you have `mina-generate-keypair` installed, you will need to first `sudo apt remove mina-generate-keypair` before installing `mina-mainnet=4.0.0`.
3434
The `mina-generate-keypair` binary is now installed as part of the mina-mainnet package.
3535

3636
:::

docs/mesa-upgrade/upgrade-steps.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,31 @@ Below it's the description in detail of all the upgrade steps and what which nod
2525
- Review the [upgrade readiness checklist](https://docs.google.com/document/d/1rTmJvyaK33dWjJXMOSiUIGgf8z7turxolGHUpVHNxEU/edit#heading=h.2hqz0ixwjk3f) to confirm they have covered the required steps.
2626
- Upgrade their nodes to the 3.2.0 stable version
2727
- Ensure servers are provisioned to run Mesa nodes, meeting the new hardware requirements
28-
- Upgrade their nodes to the node version [3.0.3](https://github.com/MinaProtocol/mina/releases/tag/3.0.3), with stop-slots, when this version becomes available
28+
- Upgrade their nodes to the node version [4.0.0](https://github.com/MinaProtocol/mina/releases/tag/4.0.0), with stop-slots, when this version becomes available
2929
- Run upgrade script for the archive node if they run archive nodes and wish to upgrade in a decentralized manner
3030

31-
**Please note:** a simplified Node Status service will be part of the upgrade tooling and enabled by default in Pre-Upgrade release with the stop-slots ([3.0.3](https://github.com/MinaProtocol/mina/releases/tag/3.0.3)). This feature will allow for a safe upgrade by monitoring the amount of upgraded active stake. Only non-sensitive data will be reported. If operators are not comfortable sharing their node version, they will have the option to disable the node version reports by using the appropriate node flag `--node-stats-type none`
31+
**Please note:** a simplified Node Status service will be part of the upgrade tooling and enabled by default in Pre-Upgrade release with the stop-slots ([4.0.0](https://github.com/MinaProtocol/mina/releases/tag/4.0.0)). This feature will allow for a safe upgrade by monitoring the amount of upgraded active stake. Only non-sensitive data will be reported. If operators are not comfortable sharing their node version, they will have the option to disable the node version reports by using the appropriate node flag `--node-stats-type none`
3232

3333
### Block Producers and SNARK Workers
3434
1. Review the [upgrade readiness checklist](https://docs.google.com/document/d/1rTmJvyaK33dWjJXMOSiUIGgf8z7turxolGHUpVHNxEU).
35-
1. Provision servers that meet the minimum hardware requirements, including the new 32GB RAM requirement and support for _AVX_ and _BMI2_ CPU instructions.
36-
1. Upgrade nodes to node version [3.0.3](https://github.com/MinaProtocol/mina/releases/tag/3.0.3) ([3.0.3](https://github.com/MinaProtocol/mina/releases/tag/3.0.3) has built-in stop slots).
35+
1. Provision servers that meet the minimum hardware requirements, including 32GB RAM and support for _AVX_ and _BMI2_ CPU instructions.
36+
1. Upgrade nodes to node version [4.0.0](https://github.com/MinaProtocol/mina/releases/tag/4.0.0) ([4.0.0](https://github.com/MinaProtocol/mina/releases/tag/4.0.0) has built-in stop slots).
3737

3838
### Archive Node Operators and Rosetta Operators
3939
- Two upgrade processes will be available to archive node operators: _trustless_ and _trustful_. If the archive node operator wants to perform the _trustless_ migration, they should follow these steps; otherwise, proceed to the Upgrade phase. The _trustful_ migration will rely on o1Labs database exports and Docker images to migrate the archive node database and doesn’t require any actions at this stage.
4040

4141
1. Trustless migration:
4242
- Perform the archive node upgrade. Since Mainnet is a long-lived network, the upgrade process is a very fast operation and boils down to running the upgrade script against your archive. It should not take more than 1 minute, depending on your server specification and infrastructure.
4343
- For more information on the archive node upgrade process, please refer to the [Archive Upgrade](/mesa-upgrade/archive-upgrade) section.
44-
2. Upgrade all nodes to the latest stable version [3.0.3](https://github.com/MinaProtocol/mina/releases/tag/3.0.3).
45-
3. Provision servers that meet the minimum hardware requirements, primarily the new 32GB RAM requirement.
44+
2. Upgrade all nodes to the latest stable version [4.0.0](https://github.com/MinaProtocol/mina/releases/tag/4.0.0).
45+
3. Provision servers that meet the minimum hardware requirements, primarily 32GB RAM.
4646
4. Upgrade their nodes to the version that includes built-in stop slots before the pre-defined _stop-transaction-slot_.
4747

4848
### Exchanges
4949
1. Make sure to test your system integration with Mesa's new features. Pay special attention to:
5050
- If you rely on the archive node SQL database tables, please review the schema changes in Appendix 1 of this document.
51-
2. Upgrade all nodes to the latest stable version [3.0.3](https://github.com/MinaProtocol/mina/releases/tag/3.0.3).
52-
3. Provision servers that meet the minimum hardware requirements, particularly the new 32GB RAM requirement.
51+
2. Upgrade all nodes to the latest stable version [4.0.0](https://github.com/MinaProtocol/mina/releases/tag/4.0.0).
52+
3. Provision servers that meet the minimum hardware requirements, particularly 32GB RAM.
5353
4. Upgrade your nodes to the version that includes built-in stop slots before the pre-defined _stop-transaction-slot_.
5454

5555
***
@@ -83,7 +83,7 @@ Remember that although you might be able to submit transactions, the majority of
8383
## Upgrade
8484

8585
- 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 windows that the Mesa network infrastructure will be bootstrapped, and seed nodes will become available. o1Labs will also finalize the archive node migration and publish the PostgreSQL database dumps for import by the archive node operators who wish to bootstrap their archives in a trustful manner.
86-
- There is a tool available to validate that the Mesa node was built from the pre-upgrade network state. To validate, follow the instructions provided in this [location](https://github.com/MinaProtocol/mina/blob/berkeley/docs/upgrading-to-berkeley.md)
86+
- There is a tool available to validate that the Mesa node was built from the pre-upgrade network state. To validate, follow the instructions provided in this [location](https://github.com/MinaProtocol/mina/blob/mesa/docs/upgrading-to-mesa.md)
8787

8888
### Block Producers and SNARK Workers
8989
1. During the upgrade phase (between _stop-network-slot_ and the publishing of the Mesa release), block producers can shut down their nodes.
@@ -109,7 +109,7 @@ There will be both Docker images and archive node releases available to choose f
109109
## Post-Upgrade
110110
- At approximately 1 hour after the publishing of the Mesa node release, at a predefined slot (Mesa genesis timestamp), block production will start, and the network is successfully upgraded.
111111
- Node operators can monitor their nodes and provide feedback to the technical team in case of any issues. Builders can start deploying zkApps.
112-
- **Please note:** The Node Status service will not be enabled by default in the Mesa release. If you wish to provide Node Status and Error metrics and reports to Mina Foundation, helping monitor the network in the initial phase, please use the following flags when running your nodes:
112+
- **Please note:** The Node Status service will not be enabled by default in the Mesa release. If you wish to provide Node Status and Error metrics and reports to o1Labs, helping monitor the network in the initial phase, please use the following flags when running your nodes:
113113
- `--node-stats-type [full|simple]`
114114
- `--node-status-url https://nodestats.minaprotocol.com/submit/stats`
115115
- `--node-error-url https://nodestats.minaprotocol.com/submit/stats`

0 commit comments

Comments
 (0)