Skip to content

Commit e2c8b7d

Browse files
authored
chore(docs): update wormchain information (#4881)
* chore(docs): update wormchain syncing information CryptoCrew removed the wormchain bits, Polkachu is behind ~4 months, and MCF serves up to date snapshots. * chore(docs): new wormchain setup operations * chore(docs): reference syncing wormchain from snap * chore(docs): make the clankers happy Shoutout to my boi @copilot * chore(docs): address nits from @johnsaigle
1 parent 2a9269c commit e2c8b7d

2 files changed

Lines changed: 126 additions & 15 deletions

File tree

docs/operations.md

Lines changed: 114 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,16 +202,127 @@ To generate wormchain keys, run the following command:
202202
This command will create a `<key-name>.info` file. To extract the key, run the following command:
203203

204204
```bash
205-
wormchaind keys export <key_name> --home /path/to/wormchain/directory --keyring-dir . --keyring-backend file
205+
wormchaind keys export <key-name> --home /path/to/wormchain/directory --keyring-dir . --keyring-backend file
206206
```
207207

208208
This command will ask for a passphrase to be created for it. Both `wormchain.key` and `passphrase` will be used by the following `guardiand` flags:
209209

210210
- `--accountantKeyPath`
211211
- `--accountantKeyPassPhrase`
212212

213-
**Note**
214-
These steps could be executed directly on the `guardiand` node, having previously built the `wormchaind` binary.
213+
Feel free to run these directly on the `guardiand` node, having previously built the `wormchaind` binary.
214+
215+
**NOTE**: Share the wormchain public key for your validator with the Wormhole Foundation. It should be in the format: `wormhole1xxx`.
216+
217+
#### Allowlist your new validator
218+
219+
Work with the Wormhole Foundation to have another guardian add your new wormchain validator to the allowlist.
220+
221+
For transparency, the guardian adding your key to the allowlist would run a command like this (`<allowlisting-guardian-key-name>` is from the `.info` file created previously):
222+
223+
```bash
224+
wormchaind tx wormhole create-allowed-address "<new-validator-address>" "<new-validator-name>" \
225+
--home /path/to/wormchain/directory \
226+
--from <allowlisting-guardian-key-name> \
227+
--keyring-backend file \
228+
--chain-id wormchain \
229+
--broadcast-mode block \
230+
--node tcp://127.0.0.1:26657
231+
```
232+
233+
They will also need to send you at least 1 `utest` token which is the native gas token for wormchain (and has no inherent value). This is an example command they run to do this for you:
234+
235+
```bash
236+
wormchaind tx bank send <sender-address> <new-validator-address> 1utest \
237+
--home /path/to/wormchain/directory \
238+
--from <key-name> \
239+
--keyring-backend file \
240+
--chain-id wormchain \
241+
--broadcast-mode block \
242+
--node tcp://127.0.0.1:26657
243+
```
244+
245+
#### Sync from a snapshot
246+
247+
The easiest way to sync your wormchain node is via a snapshot. Follow [these instructions](../wormchain/syncing.md#sync-from-snapshot) to sync from a snapshot.
248+
249+
**NOTE**: past tx might be held up in the governor if you sync wormchain while running an active guardian. Disable the governor feature before syncing in existing guardians. In general, this should only *ever* happen for initial new guardian setup prior to entering the active set via the vote to update the guardian set.
250+
251+
#### Create your validator via a transaction
252+
253+
The final step before the governance VAA to add your new validator into the guardian set is the `create-validator` wormchain command. Use `<key-name>` from when the `.info` file was created above and run this command:
254+
255+
<!-- cspell:disable -->
256+
257+
```bash
258+
wormchaind tx staking create-validator \
259+
--amount=1000000uworm \
260+
--pubkey=$(wormchaind tendermint show-validator --home /path/to/wormchain) \
261+
--moniker="<your-validator-name>" \
262+
--chain-id=wormchain \
263+
--commission-rate="0.00" \
264+
--commission-max-rate="0.20" \
265+
--commission-max-change-rate="0.02" \
266+
--min-self-delegation="1" \
267+
--from=<key-name> \
268+
--keyring-backend=file \
269+
--home=/path/to/wormchain \
270+
--node=<wormchain-rpc-endpoint>
271+
```
272+
273+
The native wormchain gas token is `utest` and it is denominated in `uworm`, much like ETH vs gwei. Since wormchain is a permissioned blockchain, these tokens have no inherent value and are solely for submitting transactions.
274+
275+
<!-- cspell:enable -->
276+
277+
After this, all that remains to add your node to the active set is a governance VAA that the existing guardian set must vote on.
278+
279+
##### Creating your validator via an offline transaction
280+
281+
Get the `key` for the `--pubkey` flag from `consensus_pubkey` via `wormchaind q staking validators`.
282+
283+
Generate the offline transaction to sign:
284+
285+
<!-- cspell:disable -->
286+
287+
```bash
288+
wormchaind tx staking create-validator \
289+
--from <key-name> \
290+
--amount 0uworm \
291+
--min-self-delegation 0 \
292+
--pubkey '{"@type":"/cosmos.crypto.ed25519.PubKey","key":"<your-consensus-pubkey>"}' \
293+
--moniker "<your-validator-name>" \
294+
--commission-rate 0.0 \
295+
--commission-max-rate 0.2 \
296+
--commission-max-change-rate 0.01 \
297+
--chain-id wormchain \
298+
--home /path/to/wormchain \
299+
--generate-only > tx.json
300+
```
301+
302+
<!-- cspell:enable -->
303+
304+
Sign the offline transaction:
305+
306+
```bash
307+
wormchaind tx sign tx.json \
308+
--from <key-name> \
309+
--offline \
310+
--account-number 0 \
311+
--sequence 0 \
312+
--chain-id wormchain \
313+
--keyring-backend file \
314+
--home /path/to/wormchain > tx-signed.json
315+
```
316+
317+
Broadcast the signed transaction out to the network:
318+
319+
```bash
320+
wormchaind tx broadcast tx-signed.json \
321+
--node tcp://localhost:26657 \
322+
-o json
323+
```
324+
325+
Once the governance VAA vote passes, your guardian and wormchain will be added into the active set.
215326

216327
#### Wormchain Useful Commands
217328

wormchain/syncing.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ make build/wormchaind
2525

2626
Please ask the Wormhole contributors for a recent Wormchain snapshot to use.
2727

28-
You can also use daily snapshots exported by various teams:
29-
- Polkachu: [https://polkachu.com/tendermint_snapshots/wormchain/](https://polkachu.com/tendermint_snapshots/wormchain/)
30-
- CryptoCrew: [https://github.com/clemensgg/CryptoCrew-Validators/blob/main/chains/wormchain/service_Node_Snapshot.md](https://github.com/clemensgg/CryptoCrew-Validators/blob/main/chains/wormchain/service_Node_Snapshot.md)
28+
You can also use regular snapshots exported by various teams:
29+
- [MCF](https://mcf.rocks/mcf-wormchain-snapshots.rpy)
30+
- [Polkachu](https://polkachu.com/tendermint_snapshots/wormchain/)
3131

3232
## Download and Clean Snapshot
3333

@@ -43,7 +43,7 @@ Now you should be able to successfully start your node!
4343
### Troubleshooting
4444

4545
> We were just able to successfully statesync when retaining the `wasm` folder and deleting the wasm cache, just fyi:
46-
>
46+
>
4747
> - you need the `wasm` folder from a synced node
4848
> - then configure statesync + `unsafe-reset-all`
4949
> - then copy in wasm state `cp -r <your-wasm-folder-location> $DAEMON_HOME/data`
@@ -138,17 +138,17 @@ cp ../mainnet/* config/
138138
## Sync with v2.18.1
139139

140140
```bash
141-
./build/wormchaind-v2.18.1 start --home . --moniker <your-moniker> --halt-height 4411562
141+
./wormchaind-v2.18.1 start --home . --moniker <your-moniker> --halt-height 4411562
142142
# check sync status
143143
./wormchaind-v2.18.1 status | jq ".SyncInfo.latest_block_height"
144-
# sync until block 4411562
144+
# sync until block 4411562
145145
```
146146

147147
## Sync with v2.18.1.1
148148

149149
```bash
150-
./build/wormchaind-v2.18.1.1 rollback --home .
151-
./build/wormchaind-v2.18.1.1 start --home . --moniker <your-moniker>
150+
./wormchaind-v2.18.1.1 rollback --home .
151+
./wormchaind-v2.18.1.1 start --home . --moniker <your-moniker>
152152
# sync will stop automatically on block 4449129
153153
# after this stops, you just need to restart your wormchain node with v2.23.0
154154
# no rollback is required.
@@ -157,17 +157,17 @@ cp ../mainnet/* config/
157157
## Sync with v2.23.0
158158

159159
```bash
160-
./build/wormchaind-v2.23.0 start --home . --moniker <your-moniker>
160+
./wormchaind-v2.23.0 start --home . --moniker <your-moniker>
161161
# check sync status
162-
./build/wormchaind-v2.23.0 status | jq ".SyncInfo.latest_block_height"
162+
./wormchaind-v2.23.0 status | jq ".SyncInfo.latest_block_height"
163163
# Error in validation err="wrong Block.Header.LastResultsHash. Expected 4C349D91FFFC2B84588E703A5459CBB29D6053D788C32B8AF1445F44CFCD988B, got D2D3EBC9D1249733EE2CBD7CA9C9A63509BB28436BFF200CEB6162BCBA282EC3" module=blockchain
164164
# Block 8630308
165165
```
166166

167167
## Sync with v2.24.2-wormchaind
168168

169169
```bash
170-
./build/wormchaind-v2.24.2-wormchaind rollback --home .
171-
./build/wormchaind-v2.24.2-wormchaind start --home . --moniker <your-moniker>
170+
./wormchaind-v2.24.2-wormchaind rollback --home .
171+
./wormchaind-v2.24.2-wormchaind start --home . --moniker <your-moniker>
172172
# this will sync until the latest block!
173173
```

0 commit comments

Comments
 (0)