Validator migration guide
Follow this guide to become a validator on the new Terra chain. This guide walks you through making a gentx
file that will be added to the validator chain. A gentx
is a special transaction included in the genesis file that accomplishes three things:
- Registers your validator account as a validator operator account.
- Self-delegates the specified amount of LUNA tokens for staking.
- Links the validator operator account with a Tendermint node pubkey used to sign blocks.
All validators that want to be included in the new Terra chain must follow the steps below.
Networks
- New Terra testnet:
pisco-1
- New Terra mainnet:
phoenix-1
Prerequisites
Supplemental Resources
- Official Terra Validator Genesis Guide
- Cosmos SDK: How to run a node
- What is GenTX
- Validator tutorial
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
This section covers how to take the pre- and post-attack snapshots. The following steps need to be run on your existing validator's machine.
- Stop your
columbus-5
node:
_1sudo systemctl stop terrad
- Clone, checkout, and install the Terra Core Genesis state exporter:
_3git clone https://github.com/terra-money/core-genesis-exporter_3cd core-genesis-exporter_3make install
- Verify the exporter binary version:
_1terrad version --long
The above command should result in the following:
_7terrad version --long_7name: terra_7server_name: terrad_7version: ""_7commit: 2565577ccf47d1b11a82d77500a0cb880080a70c_7build_tags: netgo,ledger_7go: go version go1.20 darwin/arm64
- Take the pre-attack snapshot:
_1terrad export --height 7544910 > pre-attack-snapshot.json
- Take the post-attack snapshot:
_1terrad export --height 7790000 > post-attack-snapshot.json
- Verify the SHA256 hash of the sorted pre-attack & post-attack export snapshots:
_7# pre-attack_7jq -S -c -M '' pre-attack-snapshot.json | shasum -a 256_70ac0d5b8f7ea49e500d9033687a6720a99818e99280aba8f12f00b39832a0d5c_7_7# post-attack_7jq -S -c -M '' post-attack-snapshot.json | shasum -a 256_79d294b300eb3d936d9567eb128bc66651d196b07c37583e2e051b3bced965766
Penultimate Genesis
The following steps need to be run on the same machine as your snapshot.
- Clone and checkout genesis builder:
_1git clone https://github.com/terra-money/genesis-tools
- Move pre-attack and post-attack snapshots into
genesis-tools
:
_1mv ./pre-attack-snapshot.json ./post-attack-snapshot.json ./genesis-tools
- Run genesis builder script:
_13_13# install dependency_13pip3 install bech32_13pip3 install python-dateutil_13_13python3 ./src/genesis_builder.py \_13 ./genesis-template.json \_13 ./pre-attack-snapshot.json \_13 ./post-attack-snapshot.json \_13 ./genesis-validators.json \_13 --genesis-time=2022-05-28T06:00:00.000000Z \_13 --chain-id=phoenix-1 \_13 > penultimate-genesis.json
- Verify the SHA256 of the sorted penultimate-genesis.json:
_2jq -S -c -M '' penultimate-genesis.json | shasum -a 256_2def346f3ef21e5f484c4e8634918d527382115b871786bd794fac5dacdf46c63
Set up a new validator
Set up a new validator on a new machine by following the steps outlined in the full node tutorial.
After configuring your general settings, continue to the next section.
GenTx
Complete the following steps on your new validator's machine.
- Checkout and install the new Terra core:
_5# checkout and install_5git clone https://github.com/terra-money/core_5cd core_5git checkout v2.0.0_5make install
- Verify the binary version:
_5terrad version --long_5core: v2.0.0_5git commit: [placeholder]_5go.sum hash: [placeholder]_5build tags: netgo ledger
- Prepare your environment:
_5# install or move penultimate-genesis.json to server_5wget https://phoenix-genesis.s3.us-west-1.amazonaws.com/penultimate-genesis.json_5_5# move genesis to config location_5mv ./penultimate-genesis.json ~/.terra/config/genesis.json
- Execute GenTx:
_13terrad gentx validator 1000000uluna \_13 --chain-id="phoenix-1" \_13 --pubkey=$(terrad tendermint show-validator) \_13 --min-self-delegation="1"\_13 --security-contact="[email protected]" \_13 --moniker=AAA \_13 --details="Trusted security provider for Terra Network and projects building on Terra." \_13 --identity="AAAAAAAAAAAA" \_13 --commission-rate="0.1" \_13 --commission-max-rate="0.2" \_13 --commission-max-change-rate="0.01" \ _13 --node-id="validator-moniker" \_13 --ip="0.0.0.0"
- Upload the generated GenTx file to this repository's gentx folder via PR:
_1ls ~/.terra/config/gentx/*
Collect GenTxs
The following steps need to be run on the same machine as your GenTx.
- Download gentx files and change into the terra home config:
_3git clone https://github.com/terra-money/genesis-tools_3cd genesis-tools_3mv ./gentx/* ~/.terra/config/gentx/
- Execute
collect-gentxs
:
_1terrad collect-gentxs
- Verify the SHA256 hash of the sorted final genesis:
_2jq -S -c -M '' ~/.terra/config/genesis.json | shasum -a 256_2[placeholder]
Launch Network
Execute the Terrad binary on your new validator's machine and wait until network launch:
_1sudo systemctl start terrad