Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for Berkeley upgrade details. #996

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,19 @@ where:

:warning: Running a replayer from scratch on a Devnet/Mainnet database can take up to a couple of days. The recommended best practice is to break the replayer into smaller parts by using the checkpoint capabilities of the replayer.

:warning: You must run the replayer using the Mainnet version. You can run it from the Docker image at `gcr.io/o1labs-192920/mina-archive:2.0.0-039296a-bullseye`.
:warning: You must run the replayer using the Mainnet version. You can run it from the Docker image at `minaprotocol/mina-archive:3.0.0-93e0279-bullseye`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should still be 2.0.0-039296a since this is patching the pre-fork DB


## Missing blocks

The daemon node unavailability can cause the archive node to miss some of the blocks. This recurring missing blocks issue consistently poses challenges. To address this issue, you can reapply missing blocks.

If you uploaded the missing blocks to Google Cloud, the missing blocks can be reapplied from precomputed blocks to preserve chain continuity.

1. To automatically verify and patch missing blocks, use the [download_missing_blocks.sh](https://raw.githubusercontent.com/MinaProtocol/mina/2.0.0berkeley_rc1/src/app/rosetta/download-missing-blocks.sh) script.
1. To automatically verify and patch missing blocks, use the [download-missing-blocks.sh](https://github.com/MinaProtocol/mina/blob/berkeley/scripts/archive/download-missing-blocks.sh) script.

The `download-missing-blocks` script uses `localhost` as the database host so the script assumes that psql is running on localhost on port 5432. Modify `PG_CONN` in `download_missing_block.sh` for your environment.

1. Install the required `mina-archive-blocks` and `mina-missing-blocks-auditor` scripts that are packed in the `gcr.io/o1labs-192920/mina-archive:2.0.0-039296a-bullseye` Docker image.
1. Install the required `mina-archive-blocks` and `mina-missing-blocks-auditor` scripts that are packed in the `minaprotocol/mina-archive:3.0.0-93e0279-bullseye` Docker image.

1. Export the `BLOCKS_BUCKET`:

Expand Down Expand Up @@ -183,7 +183,7 @@ O1labs maintains a Google bucket containing precomputed blocks from Devnet and M
Note: It's important to highlight that precomputed blocks for **Devnet** between heights `2` and `1582` have missing fields or incorrect transaction data. Utilizing these blocks to patch your Devnet archive database will result in failure. For those who rely on precomputed blocks from this bucket, please follow the outlined steps:

1. Download additional blocks from `gs://mina_network_block_data/devnet-extensional-bundle.tar.gz`.
2. Install the necessary `mina-archive-blocks` script contained within the `gcr.io/o1labs-192920/mina-archive:2.0.0-039296a-bullseye` Docker image.
2. Install the necessary `mina-archive-blocks` script contained within the `minaprotocol/mina-archive:3.0.0-93e0279-bullseye` Docker image.
3. Execute mina-archive-blocks to import the extracted blocks from step 1 using the provided command:

```sh
Expand Down
24 changes: 12 additions & 12 deletions docs/berkeley-upgrade/flags-configs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ keywords:

# Post-Upgrade Flags and Configurations for Mainnet

Please refer to the Berkeley node release notes [here](https://github.com/MinaProtocol/mina/releases/tag/2.0.0).
Please refer to the Berkeley node release notes [here](https://github.com/MinaProtocol/mina/releases/tag/3.0.0).

### Network details

```
Chain ID
5f704cc0c82e0ed70e873f0893d7e06f148524e3f0bdae2afb02e7819a0c24d1
a7351abc7ddf2ea92d1b38cc8e636c271c1dfd2c081c637f62ebc2af34eb7cc1

Git SHA-1
039296a260080ed02d0d0750d185921f030b6c9c
93e02797f72abe2cbf8dfca6f2328e9c8cd76546

Seed List
https://bootnodes.minaprotocol.com/networks/mainnet.txt
https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt

Node build
https://github.com/MinaProtocol/mina/releases/tag/2.0.0
https://github.com/MinaProtocol/mina/releases/tag/3.0.0
```

### Block Producers
### Block Producer's

Start your node post-upgrade in Mainnet with the flags and environment variables listed below.

Expand All @@ -42,7 +42,7 @@ mina daemon
--generate-genesis-proof true
--libp2p-keypair <keyfile path>
--log-json
--peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt
--peer-list-url https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt

ENVIRONMENT VARIABLES
RAYON_NUM_THREADS=6
Expand All @@ -60,7 +60,7 @@ mina daemon
--file-log-rotations 500
--libp2p-keypair <keyfile path>
--log-json
--peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt
--peer-list-url https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt
--run-snark-coordinator <public key>
--snark-worker-fee 0.001
--work-selection [seq|rand]
Expand All @@ -87,8 +87,8 @@ Running an Archive Node involves setting up a non-block-producing node and a Pos
For more information about running archive nodes, see [Archive Node](/node-operators/archive-node).

The PostgreSQL database requires two schemas:
1. The PostgreSQL schema used by the Mina archive database: in the [release notes](https://github.com/MinaProtocol/mina/releases/tag/2.0.0)
2. The PostgreSQL schema extensions to support zkApp commands: in the [release notes](https://github.com/MinaProtocol/mina/releases/tag/2.0.0)
1. The PostgreSQL schema used by the Mina archive database: in the [release notes](https://github.com/MinaProtocol/mina/releases/tag/3.0.0)
2. The PostgreSQL schema extensions to support zkApp commands: in the [release notes](https://github.com/MinaProtocol/mina/releases/tag/3.0.0)

The non-block-producing node must be configured with the following flags:
```
Expand All @@ -100,7 +100,7 @@ mina daemon
--generate-genesis-proof true
--libp2p-keypair <keyfile path>
--log-json
--peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt
--peer-list-url https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt

ENVIRONMENT VARIABLES
MINA_LIBP2P_PASS
Expand All @@ -127,7 +127,7 @@ docker run
--name rosetta --rm \
-p 3088:3088 \
--entrypoint '' \
gcr.io/o1labs-192920/mina-rosetta:<POST UPGRADE RELEASE> \
minaprotocol/mina-rosetta:3.0.0-93e0279-bullseye \
/usr/local/bin/mina-rosetta \
--archive-uri "${PG_CONNECTION_STRING}" \
--graphql-uri "${GRAPHQL_URL}" \
Expand Down
12 changes: 6 additions & 6 deletions docs/berkeley-upgrade/upgrade-steps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ Below it's the description in detail of all the upgrade steps and what which nod
- Review the [upgrade readiness checklist](https://docs.google.com/document/d/1rTmJvyaK33dWjJXMOSiUIGgf8z7turxolGHUpVHNxEU/edit#heading=h.2hqz0ixwjk3f) to confirm they have covered the required steps.
- Upgrade their nodes to the 1.4.1 stable version
- Ensure servers are provisioned to run Berkeley nodes, meeting the new hardware requirements
- Upgrade their nodes to the node version [2.0.0](https://github.com/MinaProtocol/mina/releases/tag/2.0.0), with stop-slots, when this version becomes available
- Upgrade their nodes to the node version [3.0.0](https://github.com/MinaProtocol/mina/releases/tag/3.0.0), with stop-slots, when this version becomes available
- Start the archive node initial migration if they run archive nodes and wish to perform the migration in a decentralized manner

**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 ([2.0.0](https://github.com/MinaProtocol/mina/releases/tag/2.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`
**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.0](https://github.com/MinaProtocol/mina/releases/tag/3.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`

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

### Archive Node Operators and Rosetta Operators
- Two migration 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.
Expand All @@ -42,15 +42,15 @@ Below it's the description in detail of all the upgrade steps and what which nod
- Perform the initial archive node migration. Since Mainnet is a long-lived network, the initial migration process can take up to 48 hours, depending on your server specification and infrastructure.
- If your Mina Daemon, archive node, or PostgreSQL database runs on different machines, the migration performance will be greatly impacted.
- For more information on the archive node migration process, please refer to the [Archive Migration](/berkeley-upgrade/archive-migration) section.
2. Upgrade all nodes to the latest stable version [2.0.0](https://github.com/MinaProtocol/mina/releases/tag/2.0.0).
2. Upgrade all nodes to the latest stable version [3.0.0](https://github.com/MinaProtocol/mina/releases/tag/3.0.0).
3. Provision servers that meet the minimum hardware requirements, primarily the new 32GB RAM requirement.
4. Upgrade their nodes to the version that includes built-in stop slots before the pre-defined _stop-transaction-slot_.

### Exchanges
1. Make sure to test your system integration with Berkeley's new features. Pay special attention to:
- If you use the **o1labs/client-sdk** library to sign transactions, you should switch to **mina-signer** https://www.npmjs.com/package/mina-signer. **o1labs/client-sdk was deprecated some time ago and will be unusable** once the network has been upgraded. Please review the migration instructions in [Appendix](/berkeley-upgrade/appendix)
- If you use the **o1labs/client-sdk** library to sign transactions, you should switch to **[mina-signer](https://www.npmjs.com/package/mina-signer)**. o1labs/client-sdk was **deprecated** some time ago and will be **unusable** once the network has been upgraded. Please review the migration instructions in [Appendix](/berkeley-upgrade/appendix).
- If you rely on the archive node SQL database tables, please review the schema changes in Appendix 1 of this document.
2. Upgrade all nodes to the latest stable version [2.0.0](https://github.com/MinaProtocol/mina/releases/tag/2.0.0).
2. Upgrade all nodes to the latest stable version [3.0.0](https://github.com/MinaProtocol/mina/releases/tag/3.0.0).
3. Provision servers that meet the minimum hardware requirements, particularly the new 32GB RAM requirement.
4. Upgrade your nodes to the version that includes built-in stop slots before the pre-defined _stop-transaction-slot_.

Expand Down
10 changes: 8 additions & 2 deletions docs/exchange-operators/rosetta/run-with-docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To run Mina Rosetta on Apple silicon, you can use the steps in [Building and run

:::note

If you want to build your own docker image, you can find more details in [Minas Rosetta repository](https://github.com/MinaProtocol/mina/blob/develop/src/app/rosetta/README.md). However, for most users, its not necessary to build your own image in order to interact with the API.
If you want to build your own docker image, you can find more details in [Mina's Rosetta repository](https://github.com/MinaProtocol/mina/blob/develop/src/app/rosetta/README.md). However, for most users, it's not necessary to build your own image in order to interact with the API.

:::

Expand All @@ -43,26 +43,32 @@ The container in `/rosetta` includes three entrypoints, which each run a differe

Run the container with following command (replace the image tag with one from dockerhub that's compatible with the network you are trying to connect to, also replace `--entrypoint` and any environment variable if needed):

```
docker run -it --rm --name rosetta \
--entrypoint=./docker-start.sh \
-p 10101:10101 -p 3085:3085 -p 3086:3086 -p 3087:3087 \
minaprotocol/mina-rosetta:3.0.0-93e0279-focal
```

You can also create a file with the environment variables and pass it to the docker run command with `--env-file` flag. For example, create a file named `mainnet.env` with the following content:

```
MINA_NETWORK=mainnet
PEERS_LIST_URL=https://bootnodes.minaprotocol.com/networks/mainnet.txt
PEERS_LIST_URL=https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt
MINA_ARCHIVE_DUMP_URL=https://storage.googleapis.com/mina-archive-dumps
MINA_GENESIS_LEDGER_URL=http://673156464838-mina-genesis-ledgers.s3-website-us-west-2.amazonaws.com/mainnet/genesis_ledger.json
BLOCKS_BUCKET=https://storage.googleapis.com/mina_network_block_data
```

Then run the container with the following command:

```
docker run -it --rm --name rosetta \
--entrypoint=./docker-start.sh \
-p 8302:8302 -p 3085:3085 -p 3086:3086 -p 3087:3087 \
--env-file mainnet.env \
minaprotocol/mina-rosetta:<tag>
```

Example environment files for public networks can be found in [this](https://github.com/MinaProtocol/mina/blob/develop/src/app/rosetta/scripts) directory of Mina's Rosetta repository.

Expand Down
4 changes: 2 additions & 2 deletions docs/node-operators/archive-node/docker-compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
ports:
- '5432:5432'
bootstrap_db:
image: 'gcr.io/o1labs-192920/mina-archive:3.0.0-dc6bf78-bullseye'
image: 'gcr.io/o1labs-192920/mina-archive:3.0.0-dc6bf78-bullseye-devnet'
command: >
bash -c '
curl -O https://raw.githubusercontent.com/MinaProtocol/mina/develop/src/app/archive/create_schema.sql;
Expand All @@ -43,7 +43,7 @@ services:
postgres:
condition: service_healthy
archive:
image: 'gcr.io/o1labs-192920/mina-archive:3.0.0-dc6bf78-bullseye'
image: 'gcr.io/o1labs-192920/mina-archive:3.0.0-dc6bf78-bullseye-devnet'
restart: always
command:
- mina-archive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ Auto-restart flows are in place to ensure your nodes perform optimally.
To start a mina node instance and connect to the live network:

```sh
mina daemon --peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt
mina daemon --peer-list-url https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt
```

The `--peer-list` argument specifies the source file of seed peer addresses for the initial peer to connect to on the network. Mina is a [peer-to-peer](/glossary#peer-to-peer) protocol, so there is no dependence on a single centralized server.

If you have a key with MINA stake and want to produce blocks:

```sh
mina daemon --peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt \
mina daemon --peer-list-url https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt \
--block-producer-key ~/keys/my-wallet
```

Expand Down Expand Up @@ -97,7 +97,7 @@ To produce blocks or otherwise customize the configuration for the mina daemon:

- External port 8302
- Change with `-external-port`
- Mainnet package [https://bootnodes.minaprotocol.com/networks/mainnet.txt](https://bootnodes.minaprotocol.com/networks/mainnet.txt)
- Mainnet seed peers list [https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt](https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt)
- Change with `--peer-list-url`

1. After your `.mina-env` file is ready, start a mina node instance and connect to the live network using systemctl to control systemd:
Expand Down Expand Up @@ -163,7 +163,7 @@ export MINA_PRIVKEY_PASS="My_V3ry_S3cure_Password"
LOG_LEVEL=Info
FILE_LOG_LEVEL=Debug
EXTRA_FLAGS=" --block-producer-key <BLOCK_PRODUCER_KEY_PATH>"
PEER_LIST_URL=https://bootnodes.minaprotocol.com/networks/mainnet.txt
PEER_LIST_URL=https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt
```

Replace `<BLOCK_PRODUCER_KEY_PATH>` with the full path to your block producer private key. For example, `/home/ubuntu/keys/my-wallet`.
Expand Down
10 changes: 5 additions & 5 deletions docs/node-operators/flags-configs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Git SHA-1
93e02797f72abe2cbf8dfca6f2328e9c8cd76546

Seed List
https://bootnodes.minaprotocol.com/networks/mainnet.txt
https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt

Node build
https://github.com/MinaProtocol/mina/releases/tag/3.0.0
Expand All @@ -42,7 +42,7 @@ mina daemon
--generate-genesis-proof true
--libp2p-keypair <keyfile path>
--log-json
--peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt
--peer-list-url https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt

ENVIRONMENT VARIABLES
RAYON_NUM_THREADS=6
Expand All @@ -60,7 +60,7 @@ mina daemon
--file-log-rotations 500
--libp2p-keypair <keyfile path>
--log-json
--peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt
--peer-list-url https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt
--run-snark-coordinator <public key>
--snark-worker-fee 0.001
--work-selection [seq|rand]
Expand Down Expand Up @@ -100,7 +100,7 @@ mina daemon
--generate-genesis-proof true
--libp2p-keypair <keyfile path>
--log-json
--peer-list-url https://bootnodes.minaprotocol.com/networks/mainnet.txt
--peer-list-url https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt

ENVIRONMENT VARIABLES
MINA_LIBP2P_PASS
Expand All @@ -127,7 +127,7 @@ docker run
--name rosetta --rm \
-p 3088:3088 \
--entrypoint '' \
gcr.io/o1labs-192920/mina-rosetta:3.0.0-93e0279 \
minaprotocol/mina-rosetta:3.0.0-93e0279-bullseye \
/usr/local/bin/mina-rosetta \
--archive-uri "${PG_CONNECTION_STRING}" \
--graphql-uri "${GRAPHQL_URL}" \
Expand Down
2 changes: 1 addition & 1 deletion docs/node-operators/seed-peers/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ MINA_LIBP2P_PASS="My_V3ry_S3cure_Password"
LOG_LEVEL=Info
FILE_LOG_LEVEL=Debug
EXTRA_FLAGS=" --libp2p-keypair <path-to-the-key-file> --seed --max-connection 100"
PEERS_LIST_URL=https://bootnodes.minaprotocol.com/networks/mainnet.txt
PEERS_LIST_URL=https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt
```

Please note that `<path-to-the-key-file>` could change in value depending on where you stored your libp2p keypair from the previous steps. In docker, the keypath will always be `/keys/filename` due to where volumes are mounted.
Expand Down
5 changes: 1 addition & 4 deletions docs/node-operators/seed-peers/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ Mina's seed peers are considered to be leaders among the community. They are not

For the full list of seed peers and information on how to contribute, please refer to the [Official Git Repository](https://github.com/MinaFoundation/seeds).

The lists are accessible at https://bootnodes.minaprotocol.com

- **Mainnet**: https://bootnodes.minaprotocol.com/networks/mainnet.txt
- **Mainnet**: https://storage.googleapis.com/mina-seed-lists/mainnet_seeds.txt
- **Devnet**: https://bootnodes.minaprotocol.com/networks/devnet.txt
- **Berkeley**: https://bootnodes.minaprotocol.com/networks/berkeley.txt

## Seed Peers

Expand Down
Loading
Loading