Skip to content

Commit

Permalink
docs: provide genesis-start for testnet 71
Browse files Browse the repository at this point in the history
Refs #4087. Also lists an archive URL for `pd testnet join`.
  • Loading branch information
conorsch committed Mar 28, 2024
1 parent b0c8cc4 commit a23ed0c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
10 changes: 7 additions & 3 deletions docs/guide/src/pd/chain-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ After the node is restarted on the new version, it should be able to talk to the
Once enough validators with sufficient stake weight have upgraded, the network
will resume generating blocks.


## Genesis time

In order for the chain to start again after the upgrade, all nodes must be using the same genesis information,
Expand All @@ -39,6 +38,11 @@ until the `--genesis-start` time is reached, at which point it will resume proce
the community of validators can coordinate resumption of chain activity, even when operators perform migrate their ndoes
at slightly different times.

### Testnet 70 -> 71

For the first chain upgrade performed on a Penumbra testnet, use this value for genesis time: `{{ #include ../upgrade_genesis_time_70_71.md }}`.
See an example below for how to supply this value when performing the migration.

## Performing a chain upgrade

The following steps assume that `pd` is using the default home directory of `~/.penumbra/testnet_data/node0/pd`.
Expand All @@ -58,8 +62,8 @@ An example log message emitted by `pd migrate` without providing `--genesis-star
The value after `now=` is what should be copied. In practice, for testnets, Penumbra Labs will advise on a genesis time
and provide that value in the documentation. Or should we just pick a genesis start ahead of time, and use that for all?
-->
5. Apply the migration: `pd migrate --genesis-start "GENESIS_TIME" --target-directory ~/.penumbra/testnet_net/node0/pd-exported-state/ --migrate-archive ~/.penumbra/testnet_data/node0/pd-migrated-state-{{ #include ../penumbra_version.md }}.tar.gz`.
Replace `GENESIS_TIME` with the exact string: `XXXXX`.
5. Apply the migration: `pd migrate --genesis-start "{{ #include ../upgrade_genesis_time_70_71.md }}" --target-directory ~/.penumbra/testnet_net/node0/pd-exported-state/ --migrate-archive ~/.penumbra/testnet_data/node0/pd-migrated-state-{{ #include ../penumbra_version.md }}.tar.gz`.
You must use that precise genesis time, otherwise your node will not be able to reach consensus with the rest of the network.
6. Move the migrated state into place: `mkdir ~/.penumbra/testnet_data/node0/pd && mv ~/.penumbra/testnet_data/node0/pd-exported-state/rocksdb ~/.penumbra/testnet_data/node0/pd/`
7. Move the upgrade cometbft state into place: `cp ~/.penumbra/testnet_data/node0/pd-exported-state/genesis.json ~/.penumbra/testnet_data/node0/cometbft/config/genesis.json
&& cp ~/.penumbra/testnet_data/pd-exported-state/priv_validator_state.json ~/.penumbra/testnet_data/node0/cometbft/data/priv_validator_state.json`
Expand Down
6 changes: 3 additions & 3 deletions docs/guide/src/pd/join-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,27 @@ The following section describes how to join a testnet chain *which has never upg
Once a chain upgrade occurs, a new-joining node must have access to an archive
of historical, migrated state. When we upgrade the chain, we should update these
docs to switch to the archive-url version:
-->

```shell
pd testnet join --external-address IP_ADDRESS:26656 --moniker MY_NODE_NAME \
--archive-url "https://snapshots.penumbra.zone/testnet/pd-archived-stated-xxxxx.tar.gz
--archive-url "https://snapshots.penumbra.zone/testnet/pd-migrated-state-70-71.tar.gz"
```

where `IP_ADDRESS` (like `1.2.3.4`) is the public IP address of the node you're running,
and `MY_NODE_NAME` is a moniker identifying your node. Other peers will try to connect
to your node over port `26656/TCP`. Finally, the `--archive-url` flag will fetch
a tarball of historical blocks, so that your newly joining node can understand transactions
that occurred prior to the most recent chain upgrade.
-->

<!--
```shell
pd testnet join --external-address IP_ADDRESS:26656 --moniker MY_NODE_NAME
```
where `IP_ADDRESS` (like `1.2.3.4`) is the public IP address of the node you're running,
and `MY_NODE_NAME` is a moniker identifying your node. Other peers will try to connect
to your node over port `26656/TCP`.
<!--
### End join customization
-->

Expand Down
1 change: 1 addition & 0 deletions docs/guide/src/upgrade_genesis_time_70_71.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024-03-28T19:18:38.745760868Z

0 comments on commit a23ed0c

Please sign in to comment.