Skip to content

Latest commit

 

History

History
177 lines (142 loc) · 4.2 KB

LAUNCH.md

File metadata and controls

177 lines (142 loc) · 4.2 KB

Instructions

The following document describes the necessary steps involved that a validator must take in order to prepare phoenix-1. The Terra team will post an official updated penultimate-genesis.json and genesis.json file, but it is recommended that validators execute the following instructions in order to verify the resulting genesis file.

Timeline (Expected)

  • Fri May 27 2022 18:00:00 GMT+0900 (KST)

  • Thu May 27 2022 09:00:00 GMT+0000 (UTC)

    Share preultimate-genesis.json and start to collect gen_txs from the validators.

  • Sat May 28 2022 12:00:00 GMT+0900 (KST)

  • Sat May 28 2022 03:00:00 GMT+0000 (UTC)

    Finish collecting gen_txs and build & share genesis.json

  • Sat May 28 2022 15:00:00 GMT+0900 (KST)

  • Sat May 28 2022 06:00:00 GMT+0000 (UTC)

    Launch network

Snapshot

  1. Stop node
sudo systemctl stop terrad
  1. Checkout state exporter and install
git clone https://github.com/terra-money/core-genesis-exporter
cd core-genesis-exporter
make install
  1. Verify the exporter binary versions
terrad version --long
core: [placeholder]
git commit: [placeholder]
go.sum hash: [placeholder]
build tags: netgo ledger
  1. Take pre-attack snapshot
terrad export --height 7544910 > pre-attack-snapshot.json
  1. Take post-attack snapshot
terrad export --height 7790000 > post-attack-snapshot.json
  1. Verify the SHA256 of the (sorted) pre-attack & post-attack export snapshots
# pre-attack
jq -S -c -M '' pre-attack-snapshot.json | shasum -a 256
[placeholder]

# post-attack
jq -S -c -M '' post-attack-snapshot.json | shasum -a 256
[placeholder]

Penultimate Genesis

Assume this steps will be happening in the same machine with Snapshot.

  1. Checkout genesis builder
git clone https://github.com/terra-money/genesis-tools
  1. Move pre-attack and post-attack snapshots into genesis-tools
mv ./pre-attack-snapshot.json ./post-attack-snapshot.json ./genesis-tools
  1. Run genesis builder script
# install dependency
pip3 install bech32
pip3 install python-dateutil

python3 ./src/genesis_builder.py \
    ./genesis-template.json \
    ./pre-attack-snapshot.json \
    ./post-attack-snapshot.json \
    ./genesis-validators.json \
    --genesis-time=2022-05-28T06:00:00.000000Z \
    --chain-id=phoenix-1 \
    > penultimate-genesis.json
  1. Verify the SHA256 of the (sorted) penultimate-genesis.json
jq -S -c -M '' penultimate-genesis.json | shasum -a 256
[placeholder]

GenTx

Assume this steps will be happening in new validator machine with validator setup (terra init).

  1. Checkout and install Terra 2.0 core
# checkout and install
git clone https://github.com/terra-money/core
cd core
git checkout v2.0.0
make install
  1. Verify the binary version
terrad version --long
core: v2.0.0
git commit: [placeholder]
go.sum hash: [placeholder]
build tags: netgo ledger
  1. Prepare Environment
# install or move penultimate-genesis.json to server
wget [placeholder]

# move genesis to config location
mv ./penultimate-genesis.json ~/.terra/config/genesis.json
  1. Execute GenTx
terrad gentx validator 1000000uluna \
    --chain-id="phoenix-1" \
    --pubkey=$(terrad tendermint show-validator) \
    --min-self-delegation="1"\
    --security-contact="[email protected]" \
    --moniker=AAA \
    --details="Trusted security provider for Terra Network and projects building on Terra." \
    --identity="AAAAAAAAAAAA" \
    --commission-rate="0.1" \
    --commission-max-rate="0.2" \
    --commission-max-change-rate="0.01"
  1. Upload generated GenTx file to this repository's gentx folder via PR.
ls ~/.terra/config/gentx/*

Collect GenTxs

Assume this steps will be happening in the same machine with GenTx.

  1. Download gentx files and locate to terra home config.
git clone https://github.com/terra-money/genesis-tools
cd genesis-tools
mv ./gentx/* ~/.terra/config/gentx/
  1. Execute collect-gentxs
terrad collect-gentxs
  1. Verify the SHA256 of the (sorted) final genesis
jq -S -c -M '' ~/.terra/config/genesis.json | shasum -a 256
[placeholder]

Launch Network

Execute binary and wait until network launch

sudo systemctl start terrad