Skip to main content

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:

  1. Registers your validator account as a validator operator account.
  2. Self-delegates the specified amount of LUNA tokens for staking.
  3. 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

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.

  1. Stop your columbus-5 node:

_1
sudo systemctl stop terrad

  1. Clone, checkout, and install the Terra Core Genesis state exporter:

_3
git clone https://github.com/terra-money/core-genesis-exporter
_3
cd core-genesis-exporter
_3
make install

  1. Verify the exporter binary version:

_1
terrad version --long

Which will return the following:


_7
terrad version --long
_7
name: terra
_7
server_name: terrad
_7
version: ""
_7
commit: 2565577ccf47d1b11a82d77500a0cb880080a70c
_7
build_tags: netgo,ledger
_7
go: go version go1.18 darwin/arm64

  1. Take the pre-attack snapshot:

_1
terrad export --height 7544910 > pre-attack-snapshot.json

  1. Take the post-attack snapshot:

_1
terrad export --height 7790000 > post-attack-snapshot.json

  1. Verify the SHA256 hash of the (sorted) pre-attack & post-attack export snapshots:

_7
# pre-attack
_7
jq -S -c -M '' pre-attack-snapshot.json | shasum -a 256
_7
0ac0d5b8f7ea49e500d9033687a6720a99818e99280aba8f12f00b39832a0d5c
_7
_7
# post-attack
_7
jq -S -c -M '' post-attack-snapshot.json | shasum -a 256
_7
9d294b300eb3d936d9567eb128bc66651d196b07c37583e2e051b3bced965766

Penultimate Genesis

The following steps need to be run on the same machine as your snapshot.

  1. Clone and checkout genesis builder:

_1
git clone https://github.com/terra-money/genesis-tools

  1. Move pre-attack and post-attack snapshots into genesis-tools:

_1
mv ./pre-attack-snapshot.json ./post-attack-snapshot.json ./genesis-tools

  1. Run genesis builder script:

_13
_13
# install dependency
_13
pip3 install bech32
_13
pip3 install python-dateutil
_13
_13
python3 ./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

  1. Verify the SHA256 of the (sorted) penultimate-genesis.json:

_2
jq -S -c -M '' penultimate-genesis.json | shasum -a 256
_2
def346f3ef21e5f484c4e8634918d527382115b871786bd794fac5dacdf46c63

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.

  1. Checkout and install the new Terra core:

_5
# checkout and install
_5
git clone https://github.com/terra-money/core
_5
cd core
_5
git checkout v2.0.0
_5
make install

  1. Verify the binary version:

_5
terrad version --long
_5
core: v2.0.0
_5
git commit: [placeholder]
_5
go.sum hash: [placeholder]
_5
build tags: netgo ledger

  1. Prepare your environment:

_5
# install or move penultimate-genesis.json to server
_5
wget https://phoenix-genesis.s3.us-west-1.amazonaws.com/penultimate-genesis.json
_5
_5
# move genesis to config location
_5
mv ./penultimate-genesis.json ~/.terra/config/genesis.json

  1. Execute GenTx:

_13
terrad 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"

  1. Upload the generated GenTx file to this repository's gentx folder via PR:

_1
ls ~/.terra/config/gentx/*

Collect GenTxs

The following steps need to be run on the same machine as your GenTx.

  1. Download gentx files and change into the terra home config:

_3
git clone https://github.com/terra-money/genesis-tools
_3
cd genesis-tools
_3
mv ./gentx/* ~/.terra/config/gentx/

  1. Execute collect-gentxs:

_1
terrad collect-gentxs

  1. Verify the SHA256 hash of the (sorted) final genesis:

_2
jq -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:


_1
sudo systemctl start terrad