From 31d6cc418168321b4e40aae8c23f74bb64d479aa Mon Sep 17 00:00:00 2001 From: sai Date: Mon, 27 May 2024 08:15:20 -0500 Subject: [PATCH 1/3] fix formatting --- docs/upgrading-to-berkeley.md | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/docs/upgrading-to-berkeley.md b/docs/upgrading-to-berkeley.md index 14e28e4547b..78d2686789f 100644 --- a/docs/upgrading-to-berkeley.md +++ b/docs/upgrading-to-berkeley.md @@ -63,6 +63,7 @@ done ## Verifying packaged configuration + A script is installed (from `./scripts/mina-verify-packaged-fork-config`) that automates this process. If you want to verify that an installed Mina package was generated from the same configuration as the one exported earlier, it is as easy as: ``` @@ -70,3 +71,52 @@ mina-verify-packaged-fork-config (mainnet|devnet) fork_config.json /tmp/mina-ver ``` Many of the script inputs are environment variables that default to the locations used by the debs. If you are building from source, inspect the script, determine what you need to change, and then run it. + +Here are some general instructions that should help you get most of the way there. + +### Package Verification + +#### Environment Setup +1. **Use a Debian Environment:** + - It is recommended to perform package verification in a Debian environment because macOS Intel emulation doesn’t support the required AVX instructions for libp2p. + +2. **Environment Preparation:** + - **Install mina-create-legacy-genesis** + - ``` bash + echo "deb [trusted=yes] http://packages.o1test.net bullseye stable" > /etc/apt/sources.list.d/o1.list + apt-get update + apt-get install mina-create-legacy-genesis=1.4.1-97f7d8c + ``` + - **Prepare Environment Variables:** Set up the necessary environment variables manually to match the expected configuration for verification. + - **Create `genesis_ledgers` Directory:** Temporarily, create a new directory named `genesis_ledgers` in the working directory and place the daemon config for the required chain, typically `mainnet.json` there. Alternatively, make sure that `genesis_ledgers/mainnet.json` is present. The script assumes that it is running in a directory where this is present. + +3. **Set Environment Variables:** + - **GSUTIL Path:** + ```bash + export GSUTIL=/usr/bin/gsutil + ``` + - **Download Block Data:** + - Example command to download the block data: + ```bash + gsutil cp gs://mina_network_block_data/mainnet-.json ./block_data.json + export PRECOMPUTED_FORK_BLOCK=./block_data.json + ``` + - **Verify Additional Variables:** + - Confirm the following variables are properly set: + ```bash + CONFIG_JSON_GZ_URL= ex: "https://storage.googleapis.com/fork-config-dryrun.json.gz" + GENESIS_TIMESTAMP= ex: "2024-05-03T00:00:00Z" + NETWORK_NAME= ex: mainnet + PRECOMPUTED_BLOCK_GS_PREFIX= ex: "gs://mina_network_block_data/mainnet" + ``` + +#### Verification Process +1. **Run the Verification Command:** + - If the fork config is not already on your machine, you can download it with a command similiar to: + ```bash + curl https://storage.googleapis.com/fork-config-dryrun.json.gz > config.json.gz && gunzip config.json.gz && mina-verify-packaged-fork-config mainnet config.json /workdir/verification gs://mina_network_block_data/mainnet-pre-hf-dry-run-2 + ``` + - If the fork config is already available locally, use: + ```bash + mina-verify-packaged-fork-config mainnet fork-config-dryrun.json /tmp/mina-verification + ``` From e3ef4955e8ec43a0121790b802202b8b6f5fcb02 Mon Sep 17 00:00:00 2001 From: sai Date: Mon, 27 May 2024 08:22:56 -0500 Subject: [PATCH 2/3] fixing code snippet formatting --- docs/upgrading-to-berkeley.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/upgrading-to-berkeley.md b/docs/upgrading-to-berkeley.md index 78d2686789f..ed93d92baf6 100644 --- a/docs/upgrading-to-berkeley.md +++ b/docs/upgrading-to-berkeley.md @@ -82,7 +82,7 @@ Here are some general instructions that should help you get most of the way ther 2. **Environment Preparation:** - **Install mina-create-legacy-genesis** - - ``` bash + ```bash echo "deb [trusted=yes] http://packages.o1test.net bullseye stable" > /etc/apt/sources.list.d/o1.list apt-get update apt-get install mina-create-legacy-genesis=1.4.1-97f7d8c From 9c610245baff029447af226dc0e2cb3ccf4cc75a Mon Sep 17 00:00:00 2001 From: Sai Vegasena Date: Mon, 27 May 2024 12:44:02 -0500 Subject: [PATCH 3/3] Update upgrading-to-berkeley.md --- docs/upgrading-to-berkeley.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/upgrading-to-berkeley.md b/docs/upgrading-to-berkeley.md index ed93d92baf6..29379b9fcc0 100644 --- a/docs/upgrading-to-berkeley.md +++ b/docs/upgrading-to-berkeley.md @@ -107,7 +107,7 @@ Here are some general instructions that should help you get most of the way ther CONFIG_JSON_GZ_URL= ex: "https://storage.googleapis.com/fork-config-dryrun.json.gz" GENESIS_TIMESTAMP= ex: "2024-05-03T00:00:00Z" NETWORK_NAME= ex: mainnet - PRECOMPUTED_BLOCK_GS_PREFIX= ex: "gs://mina_network_block_data/mainnet" + PRECOMPUTED_BLOCK_GS_PREFIX= ex: "gs://mina_network_block_data/mainnet" ``` #### Verification Process