Skip to content

Commit

Permalink
add halt height details
Browse files Browse the repository at this point in the history
  • Loading branch information
hard-nett committed Mar 24, 2024
1 parent 3542823 commit 4f8660e
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions testnet/upgrades/v4.2.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,36 @@ This upgrade follows the state export the network, so that we are using the same
### Release Details
* Go version has been frozen at `1.21`. If you are going to build `terpd` binary from source, make sure you are using the right GO version!

### Exported state
## Halt height
This upgrade requires `terpd` halting execution at a pre-selected halt-height. Failing to stop at halt-height may cause a consensus failure during chain execution at a later time.

The snapshot of the state was taken at block height [], by the following command:
```sh
terpd export --height 3578710 --for-zero-height >> 90u-3-export.json
There are two mutually exclusive options for this stage:

### Option 1: Set the halt height by modifying app.toml
- Stop the terpd process.
- Edit the application configuration file at `~/.terp/config/app.toml` so that halt-height reflects the upgrade plan:
```yaml
# Note: Commitment of state will be attempted on the corresponding block.
halt-height = 3686838
```
- restart terpd process
- Wait for the upgrade height and confirm that the node has halted

### Option 2: Restart the terpd binary with command line flags
- Stop the terpd process.
- Do not modify `app.toml`. Restart the terpd process with the flag `--halt-height`:
```
terpd start --halt-height 3686838
```
- Wait for the upgrade height and confirm that the node has halted

removing the logs from the result file, the snapshot's resulting checksum then becomes:
Upon reaching the halt-height you need to replace the `v4.2.0`terpd binary with the new terpd `v4.2.0` binary and remove the halt-height constraint. Depending on your setup, you may need to set halt-height = 0 in your app.toml before resuming operations.

### Exported state

The snapshot of the state was taken at block height [3686837](https://testnet.itrocket.net/terp/block/3686837), one block before the halt height, by the following command:
```sh
sha256sum 90u-3-export.json
# 8ef745fcbccbe4fe393a913fa71179e561cab82d45133003d0b454ce33f8d4c3 90u-3-export.json
terpd export --height 3686837 --for-zero-height >> 90u-3-export.json
```

# Performing the co-ordinated upgrade
Expand All @@ -33,12 +52,13 @@ sudo cp -r $HOME/.terp $HOME/.terp.backup

reset local node directory
```sh
terpd tendermint unsafe-reset-all --home $HOME/.terp
terpd tendermint unsafe-reset-all --home $HOME/.terp
```
download the new genesis file
```sh
wget -O $HOME/.terp/config/genesis.json https://raw.githubusercontent.com/hard-nett/networks/90u-3/testnet/90u-3/genesis.json
```

configure new peers
```sh
SEEDS="e3f7a6a37f9b1bc7648603360b24312493c031f1@testnet-peer.terp.network:26656"
Expand All @@ -63,6 +83,6 @@ terpd start # starts the v4.2.0 node
```

if all is well, remove the backup state
```
```shell
rm -rf $HOME/.terp.backup
```

0 comments on commit 4f8660e

Please sign in to comment.