Skip to content

Commit 21e2c87

Browse files
authored
docs: Update operations docs (wormhole-foundation#3883)
* docs: always pull latest guardian image to run a spy * doc: how to run the guardian node behind a NAT Shoutout to @0xshipthecode and the RockawayX Infra team for helping test and develop the patch for this in wormhole-foundation#3786. * docs: add section to the ops docs on telemetry This shows new guardians how to enable telemetry. * docs: update wording on bootstrap peers * docs: remove terra light client daemon comment The lcd was built directly into the terra binary a long time ago and no longer requires a separate service for the lcd. This happened more than a year ago. * docs: wh dashboard and the fly healthcheck * mention the wormhole-dashboard github hosted instance * mention how to run the fly healthcheck to verify a guardian * docs: evm node requirements for archive nodes * docs: section on cosmos / ibc connected chains So that guardians know which nodes they need to run and which they can rely on wormchain for. * docs: split out the per-chain bits for terra * Since wormhole supports 30+ chains now and not just 5 chains, the solana, eth, terra, bsc bits were removed * The solana and terra content had the urls updated to reflect reality and moved into their own sections. * Made a reference to docs.wormhole.com's constants reference for chains * docs: clarify guardiand wormchain URL and ports Also mention threshold signing via horcrux and using the sentry node architecture to protect the validator from volumetric attacks. * docs: adding wormchain useful commands * docs: minor updates and ntt accountant enablement * high level overview of how to enable the NTT Accountant * emphasize all guardians need to run wormchain validators * remove the reference to checking out a v2.x branch as the main branch is for wormholev2 now and has been for some time. * docs: add section on ccq * docs: cspell updates * docs: remove default ccq port from operations.md Review feedback from: @bruce-riley * docs: review feedback Co-authored-by: @evan-gray * docs: operations wording clarification * docs: update header in operations doc Try to make things consistent for @evan-gray. * docs: fix a small tyop
1 parent a4aad23 commit 21e2c87

File tree

2 files changed

+263
-25
lines changed

2 files changed

+263
-25
lines changed

cspell-custom-words.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ bscscan
2323
BUILDKIT
2424
bytecodes
2525
callstack
26+
ccqlistener
2627
CCTP
2728
celestia
2829
Celestia
@@ -63,9 +64,12 @@ GUARDIAND
6364
guardiand's
6465
Hacken
6566
hashdump
67+
healthcheck
68+
Healthcheck
6669
hexdump
6770
holesky
6871
Holesky
72+
horcrux
6973
ICCO
7074
incentivized
7175
incentivizing
@@ -140,6 +144,7 @@ readyz
140144
regen
141145
reinit
142146
reobservation
147+
reobserved
143148
repoint
144149
rustup
145150
satoshi

docs/operations.md

Lines changed: 258 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,12 @@
1-
# Running a Wormhole node
1+
# Running a Wormhole Guardian Node
22

33
![](images/nodearchitecture.svg)
44

55
## Connected chains
66

7-
In addition to Wormhole itself, you need to run your own verifying node for every chain that Wormhole connects to:
8-
9-
- **Solana**. There is no light client for Solana yet, so you'll have to run a full solana-validator node. It does not
10-
have to actually be a validator - you can run solana-validator in non-validating mode if you are not a validator.
11-
12-
Refer to the [Solana documentation](https://docs.solana.com/running-validator) on how to run a validator. The validator
13-
requirements as stated in their docs are excessive - for the current iteration for mainnet-beta, the "low end" config
14-
with no GPU is perfectly adequate, and will have enough spare capacity.
15-
[Solana's Discord server](https://solana.com/community) is a great resource for questions regarding validator ops.
16-
17-
- **Ethereum**. See below - you need at least a light client. For stability reasons, a full node is recommended.
18-
19-
- **Terra** requires a full node and an [LCD server](https://docs.terra.money/terracli/lcd.html#light-client-daemon)
20-
pointing to your full node. Refer to the [Terra documentation](https://docs.terra.money/node/join-network.html)
21-
on how to run a full node. From a security point of view, running only an LCD server with `--trust-node=false` pointed
22-
to somebody else's full node would be sufficient, but you'd then depend on that single node for availability unless
23-
you set up a load balancer pointing to a set of nodes.
24-
25-
- **Binance Smart Chain**: Same requirements as Ethereum. Note that BSC has higher throughput than Ethereum and
26-
roughly requires twice as many compute resources.
7+
In addition to Wormhole itself, you need to run your own verifying node for every chain that Wormhole connects to except
8+
for newer IBC connected chains that integrate through Wormhole Gateway. Please refer to the [constants reference](https://docs.wormhole.com/wormhole/reference/constants)
9+
for all chains that Wormhole connects to.
2710

2811
**Do NOT use third-party RPC service providers** for any of the chains! You'd fully trust them, and they could lie to
2912
you on whether an event has actually been observed. The whole point of Wormhole is not to rely on centralized nodes!
@@ -33,6 +16,12 @@ so you can test changes for your mainnet full nodes and gain operational experie
3316

3417
### Solana node requirements
3518

19+
Refer to the [Solana documentation](https://docs.solanalabs.com/operations/setup-an-rpc-node) on how to run an RPC
20+
(full) node. [Solana's Discord server](https://solana.com/community) is a great resource for questions regarding
21+
operations.
22+
23+
The `#rpc-server-operators` channel is especially useful for setting up Solana RPC nodes.
24+
3625
Your Solana RPC node needs the following parameters enabled:
3726

3827
```
@@ -102,6 +91,146 @@ since only very few nodes support the light client protocol.
10291
Running a full node typically requires ~500G of SSD storage, 8G of RAM and 4-8 CPU threads (depending on clock
10392
frequency). Light clients have much lower hardware requirements.
10493

94+
95+
### Terra
96+
97+
Terra is also sometimes referred to as Terra 2, but the correct name is just simply "Terra". The previous version was renamed to "Terra Classic".
98+
99+
Refer to the [Terra documentation](https://docs.terra.money/full-node/run-a-full-terra-node/set-up-production/) on how to run a full node.
100+
101+
#### Terra Classic
102+
103+
Refer to the [Terra Classic documentation](https://classic-docs.terra.money/docs/full-node/run-a-full-terra-node/README.html) on how to run a full node.
104+
105+
106+
### Wormchain
107+
108+
All guardians **must run validators for wormchain**, the codename of [Wormhole Gateway](https://wormhole.com/gateway/).
109+
110+
The ``--wormchainURL` argument to the guardian node should point to `<validator address>:9090` which is the `grpc` port
111+
in the app.toml.
112+
113+
Example port setup:
114+
115+
<!-- cspell:disable -->
116+
117+
config.toml:
118+
119+
```toml
120+
[rpc]
121+
laddr = "tcp://0.0.0.0:26657"
122+
grpc_laddr = ""
123+
pprof_laddr = "localhost:6060"
124+
125+
[p2p]
126+
laddr = "tcp://0.0.0.0:26656"
127+
external_address = ""
128+
```
129+
130+
app.toml:
131+
132+
```toml
133+
[grpc]
134+
address = "0.0.0.0:9090"
135+
136+
[grpc-web]
137+
address = "0.0.0.0:9091"
138+
```
139+
140+
<!-- cspell:enable -->
141+
142+
For signing, consider setting up a remote threshold signer such as
143+
[horcrux](https://github.com/strangelove-ventures/horcrux) and adopting the sentry node architecture with sentry nodes
144+
in front of your wormchain validator.
145+
146+
#### Wormchain Useful Commands
147+
148+
Check the latest guardian set:
149+
150+
<!-- cspell:disable -->
151+
152+
```shell
153+
$ wormchaind query wormhole latest-guardian-set-index
154+
latestGuardianSetIndex: 4
155+
```
156+
157+
<!-- cspell:enable -->
158+
159+
Upgrade the guardian set (with a valid governance vaa):
160+
161+
<!-- cspell:disable -->
162+
163+
```shell
164+
wormchaind tx wormhole execute-governance-vaa <guardian_set_upgrade_VAA_in_hex_format>
165+
```
166+
167+
<!-- cspell:enable -->
168+
169+
View Validator information:
170+
171+
<!-- cspell:disable -->
172+
173+
```shell
174+
$ wormchaind q staking validators
175+
... snip ...
176+
- commission:
177+
commission_rates:
178+
max_change_rate: "0.020000000000000000"
179+
max_rate: "0.200000000000000000"
180+
rate: "0.000000000000000000"
181+
update_time: "2024-04-16T19:13:45.210176030Z"
182+
consensus_pubkey:
183+
'@type': /cosmos.crypto.ed25519.PubKey
184+
key: T+hsVX52EarrsL+mOwv3mL0byWa2EctsG6XmikUMFiQ=
185+
delegator_shares: "0.000000000000000000"
186+
description:
187+
details: ""
188+
identity: 11A4103C4BCBD2B4
189+
moniker: RockawayX
190+
security_contact: ""
191+
website: https://rockawayx.com/infrastructure
192+
jailed: false
193+
min_self_delegation: "0"
194+
operator_address: wormholevaloper1thl5syhmscgnj7whdyrydw3w6vy80044278fxp
195+
status: BOND_STATUS_BONDED
196+
tokens: "0"
197+
unbonding_height: "0"
198+
unbonding_time: "1970-01-01T00:00:00Z"
199+
```
200+
201+
<!-- cspell:enable -->
202+
203+
### EVM node requirements
204+
205+
Some non-Ethereum EVM compatible blockchains need to run in archive mode for [Queries](https://wormhole.com/queries)
206+
to function correctly. By default in geth, [historical state is only kept in memory for the previous 128 blocks](https://github.com/ethereum/go-ethereum/blob/4458905f261d5d9ba5fda3d664f9bb80346ab404/core/state/statedb.go#L1259-L1265).
207+
After 128 blocks, older states are garbage collected. Many of these chains are forks of geth that maintain this
208+
historical limitation.
209+
210+
* Arbitrum
211+
* Base
212+
* Optimism
213+
214+
Newer execution clients such as [reth](https://github.com/paradigmxyz/reth) lack this limitation and are worth
215+
investigating once they are stable.
216+
217+
Additionally, if there is ever a scenario where the network fails to come to consensus on an EVM compatible chain due to
218+
a hard fork or some unforeseen scenario, it might be required to run archive nodes for those chains temporarily to ensure
219+
the transactions can be reobserved.
220+
221+
### Cosmos / IBC connected nodes
222+
223+
All modern Cosmos integrations happen by Wormhole observing IBC transactions on Gateway (wormchain). Guardian node operators do not need to run full nodes for these networks. For Cosmos based chains that were added before this functionality, a full node is still necessary.
224+
225+
The following Cosmos based nodes were added prior to Gateway and guardians need to run full nodes:
226+
227+
* Injective
228+
* Terra
229+
* Terra Classic
230+
* XPLA
231+
232+
**NOTE**: All guardians must run validators for wormchain.
233+
105234
## Building guardiand
106235

107236
For security reasons, we do not provide a pre-built binary. You need to check out the repo and build the
@@ -113,7 +242,6 @@ First, check out the version of the Wormhole repo that you want to deploy:
113242

114243
```bash
115244
git clone https://github.com/wormhole-foundation/wormhole && cd wormhole
116-
git checkout v2.0.x
117245
```
118246

119247
Then, compile the release binary as an unprivileged build user:
@@ -157,7 +285,8 @@ We strongly recommend a separate user and systemd services for the Wormhole serv
157285
See the separate [wormhole-networks](https://github.com/wormhole-foundation/wormhole-networks) repository for examples
158286
on how to set up the guardiand unit for a specific network.
159287

160-
You need to open port 8999/udp in your firewall for the P2P network. Nothing else has to be exposed externally.
288+
You need to open port 8999/udp in your firewall for the P2P network and 8996/udp for
289+
[Cross Chain Queries](../whitepapers/0013_ccq.md). Nothing else has to be exposed externally if you do not run a public RPC.
161290

162291
journalctl can show guardiand's colored output using the `-a` flag for binary output, i.e.: `journalctl -a -f -u guardiand`.
163292

@@ -169,11 +298,18 @@ Refer to [devnet/](../devnet) for example k8s deployments as a starting point fo
169298
have to build your own containers. Unless you already run Kubernetes in production, we strongly recommend a traditional
170299
deployment on a dedicated instance - it's easier to understand and troubleshoot.
171300

301+
When running in kubernetes, or behind any kind of NAT, pass `--gossipAdvertiseAddress=external.ip.address` to the
302+
guardiand node process to ensure the external address is advertized in p2p. If this is not done, reobservation
303+
requests and [CCQ](https://wormhole.com/queries) will not function as intended.
304+
172305
### Monitoring
173306

174307
Wormhole exposes a status server for readiness and metrics. By default, it listens on port 6060 on localhost.
175308
You can use a command line argument to expose it publicly: `--statusAddr=[::]:6060`.
176309

310+
**NOTE:** Parsing the log output for monitoring is NOT recommended. Log output is meant for human consumption and is
311+
not considered a stable API. Log messages may be added, modified or removed without notice. Use the metrics :-)
312+
177313
#### `/readyz`
178314

179315
This endpoint returns a 200 OK status code once the Wormhole node is ready to serve requests. A node is
@@ -193,9 +329,92 @@ alerting will be documented here.
193329

194330
See [Wormhole.json](../dashboards/Wormhole.json) for an example Grafana dashboard.
195331

332+
#### Wormhole Dashboard
333+
334+
There is a [dashboard](https://wormhole-foundation.github.io/wormhole-dashboard) which shows the overall health of the
335+
network and has metrics on individual guardians.
336+
196337
**NOTE:** Parsing the log output for monitoring is NOT recommended. Log output is meant for human consumption and is
197338
not considered a stable API. Log messages may be added, modified or removed without notice. Use the metrics :-)
198339

340+
#### Wormhole Fly Healthcheck
341+
342+
In the [wormhole-dashboard](https://github.com/wormhole-foundation/wormhole-dashboard) repository, there is a small
343+
[healthcheck application](https://github.com/wormhole-foundation/wormhole-dashboard/tree/main/fly/cmd/healthcheck)
344+
which verifies that the guardian is gossiping out heartbeats, is submitting chain observations, and has a working
345+
heartbeats API available. This is a very good way to verify a specific guardian is functioning as intended.
346+
347+
You can clone the repo and run the check against the [MCF Guardian](https://github.com/wormhole-foundation/wormhole-networks/blob/649dcc48f29d462fe6cb0062cb6530021d36a417/mainnetv2/guardianset/v3.prototxt#L58):
348+
349+
```shell
350+
git clone https://github.com/wormhole-foundation/wormhole-dashboard
351+
cd wormhole-dashboard/fly/cmd/healthcheck
352+
353+
# Run the fly
354+
$ go run main.go --pubKey 0xDA798F6896A3331F64b48c12D1D57Fd9cbe70811 --url https://wormhole-v2-mainnet-api.mcf.rocks
355+
✅ guardian heartbeat received {12D3KooWDZVv7BhZ8yFLkarNdaSWaB43D6UbQwExJ8nnGAEmfHcU: [/ip4/185.188.42.109/udp/8999/quic-v1]}
356+
✅ 44 observations received
357+
✅ /v1/heartbeats
358+
```
359+
360+
If the guardian public RPC is not exposed, the `--url` flag can be omitted:
361+
362+
```shell
363+
$ go run main.go --pubKey 0xDA798F6896A3331F64b48c12D1D57Fd9cbe70811
364+
✅ guardian heartbeat received {12D3KooWDZVv7BhZ8yFLkarNdaSWaB43D6UbQwExJ8nnGAEmfHcU: [/ip4/185.188.42.109/udp/8999/quic-v1]}
365+
✅ 41 observations received
366+
ℹ️ --url not defined, skipping web checks
367+
```
368+
369+
The bootstrap nodes and network defaults to mainnet and the values can be found in the [network constants](../node/pkg/p2p/network_consts.go).
370+
371+
It can also be used to test a specific bootstrap node/s:
372+
373+
```shell
374+
$ go run main.go --pubKey 0xDA798F6896A3331F64b48c12D1D57Fd9cbe70811 --bootstrap /dns4/wormhole.mcf.rocks/udp/8999/quic/p2p/12D3KooWDZVv7BhZ8yFLkarNdaSWaB43D6UbQwExJ8nnGAEmfHcU
375+
✅ guardian heartbeat received {12D3KooWDZVv7BhZ8yFLkarNdaSWaB43D6UbQwExJ8nnGAEmfHcU: [/ip4/185.188.42.109/udp/8999/quic-v1]}
376+
✅ 44 observations received
377+
ℹ️ --url not defined, skipping web checks
378+
```
379+
380+
## Native Token Transfers
381+
382+
[NTT](https://github.com/wormhole-foundation/example-native-token-transfers) is an exciting feature of wormhole that builds upon the core bridge to allow mint/burn style transfers. Ensuring it runs correctly requires integrating it with the NTT Accountant. To enable this feature, create a **new** wormchain key. Do not reuse an existing global accountant key and add the following parameters:
383+
384+
<!-- cspell:disable -->
385+
386+
```shell
387+
# You may already have these.
388+
--wormchainURL URL_TO_YOUR_WORMCHAIN_NODE
389+
--accountantWS HTTP_URL_OF_YOUR_WORMCHAIN_NODE
390+
391+
# This is the mainnet contract.
392+
--accountantNttContract wormhole1mc23vtzxh46e63vq22e8cnv23an06akvkqws04kghkrxrauzpgwq2hmwm7
393+
394+
--accountantNttKeyPath PATH_TO_YOUR_NTT_ACCOUNTANT_KEY_FILE
395+
--accountantNttKeyPassPhrase YOUR_NTT_ACCOUNTANT_KEY_PASS_PHRASE
396+
```
397+
398+
<!-- cspell:enable -->
399+
400+
Please remember to allowlist the new NTT Accountant key for use with Wormchain! For instructions on how to do that, speak with someone from the Wormhole Foundation.
401+
402+
## Cross-Chain Queries
403+
404+
[CCQ](https://github.com/wormhole-foundation/wormhole/blob/main/whitepapers/0013_ccq.md) also known as [Wormhole Queries](https://wormhole.com/queries) is a feature to allow pulling attestations in a cross chain manner. To run ccq, a few additional flags need to be enabled on the guardian node:
405+
406+
<!-- cspell:disable -->
407+
408+
```shell
409+
--ccqEnabled=true \
410+
--ccqAllowedPeers="[ALLOWED,PEERS,GO,HERE]" \
411+
--ccqAllowedRequesters="[ALLOWED,REQUESTORS,GO,HERE" \
412+
```
413+
414+
<!-- cspell:enable -->
415+
416+
To test query functionality, follow the instructions in [node/hack/query/ccqlistener/ccqlistener.go](../node/hack/query/ccqlistener/ccqlistener.go).
417+
199418
## Running a public API endpoint
200419

201420
Wormhole v2 no longer uses Solana as a data availability layer (see [design document](../whitepapers/0005_data_availability.md)).
@@ -223,6 +442,17 @@ It is safe to expose the publicWeb port on signing nodes. For better resiliency
223442
future guardiand releases will include listen-only mode such that multiple guardiand instances without guardian keys
224443
can be operated behind a load balancer.
225444

445+
## Enabling Telemetry
446+
447+
Optionally, the guardian can send telemetry to [Grafana Cloud Logs](https://grafana.com/products/cloud/logs/) aka "loki".
448+
To enable this functionality, add the following flag:
449+
450+
```bash
451+
--telemetryLokiURL=$PER_GUARDIAN_LOKI_URL_WITH_TOKEN
452+
```
453+
454+
New guardians should talk to the Wormhole Foundation to get a Loki url.
455+
226456
### Binding to privileged ports
227457

228458
If you want to bind `--publicWeb` to a port <1024, you need to assign the CAP_NET_BIND_SERVICE capability.
@@ -265,8 +495,9 @@ may include support for remote signing.
265495

266496
## Bootstrap Peers
267497

268-
The list of supported bootstrap peers is defined in `node/pkg/p2p/network_consts.go`. That file also provides golang functions
269-
for obtaining the network parameters (network ID and bootstrap peers) based on the environment (mainnet or testnet).
498+
The list of supported bootstrap peers is defined in [node/pkg/p2p/network_consts.go](../node/pkg/p2p/network_consts.go).
499+
That file also provides golang functions for obtaining the network parameters (network ID and bootstrap peers) based on
500+
the environment (mainnet or testnet).
270501

271502
The common Wormhole applications (guardiand, spy and query proxy server) use those functions, so it is not necessary to specify
272503
the actual bootstrap parameters in their configs. Developers of any new applications are strongly urged to do the same, and not
@@ -282,6 +513,7 @@ Start the spy against the testnet wormhole guardian:
282513

283514
```bash
284515
docker run \
516+
--pull=always \
285517
--platform=linux/amd64 \
286518
-p 7073:7073 \
287519
--entrypoint /guardiand \
@@ -297,6 +529,7 @@ To run the spy against mainnet:
297529

298530
```bash
299531
docker run \
532+
--pull=always \
300533
--platform=linux/amd64 \
301534
-p 7073:7073 \
302535
--entrypoint /guardiand \

0 commit comments

Comments
 (0)