Part of https://www.notion.so/Create-stacks-for-mainnet-1f2a6b22d4728034be4be2c51decf94e - Add step for installing `zstd` in macOS - Use ansible command module for running docker commands Co-authored-by: Shreerang Kale <shreerangkale@gmail.com> Reviewed-on: #30 Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2.5 KiB
Export Testnet
Prerequisites
-
Machine where the SAPO testnet validator node is already running
-
Install
zstdusingsudo apt install zstd(Linux) orbrew install zstd(macOS) -
laconicd-stack
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
-
Export testnet state
-
Run the following steps in machine where the testnet node is already running (machine 1)
-
Export the testnet deployment directory as environment variable:
export TESTNET_DEPLOYMENT_DIR=<absolute/path/to/testnet/deployment> -
Get your private key from testnet deployment (should be available if steps for joining SAPO testnet was followed previously):
laconic-so deployment --dir $TESTNET_DEPLOYMENT_DIR exec laconicd "laconicd keys export <key-name> --unarmored-hex --unsafe --keyring-backend test"NOTE: Store this key securely as it is needed in later steps for signing bootstrap validator node gentx
-
Stop the node for SAPO testnet:
laconic-so deployment --dir $TESTNET_DEPLOYMENT_DIR stop -
Run script to export state from testnet chain:
~/cerc/laconicd-stack/scripts/export-testnet-state.sh $TESTNET_DEPLOYMENT_DIR- The compressed zst file will be generated at
$TESTNET_DEPLOYMENT_DIR/export/testnet-state.zst
- The compressed zst file will be generated at
-
The generated state file will be used in later steps for creating genesis.json file for mainnet
Prepare LPS distribution JSON
-
The following steps can be performed in any machine
-
Fetch laconicd-stack
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull -
Set envs:
# File path where LPS distribution JSON file will be created export LPS_DISTRIBUTION_PATH=<absolute/path/to/distribution.json> -
Generate lockup distribution JSON file with LPS distribution Google spreadsheet URL or downloaded CSV file path
~/cerc/laconicd-stack/scripts/generate-lps-lock.sh -i "<lps-distribution-spreadsheet-url-or-csv-file-path>" -o $LPS_DISTRIBUTION_PATH -
This will generate the JSON file at
$LPS_DISTRIBUTION_PATHwhich will be later required when creating genesis file
Requirements for Mainnet Genesis
- Exported testnet state
- LPS distribution JSON
- Account address for early supports
- This account will be allocated 20% of total LPS tokens
- Private key of account which will sign gentx for the bootstrap validator node