Skip to content

Commit 1170b45

Browse files
auricomclaude
andcommitted
docs(ha): fix RPC endpoints, init ordering, and snap_count CLI flag
Replace incorrect CometBFT RPC calls (port 26657/status) with the actual ev-node HTTP API (port 7331 /health/ready, /raft/node) and EVM execution layer (cast block latest) throughout both guides. Align single-to-ha Step 2 init ordering with cluster-setup: create passphrase file before evm init so the signer key is encrypted from the start, and pass --evnode.node.aggregator and passphrase_file flags. Fix Step 9a fallback kill in single-to-ha to use mapfile cardinality check, matching the pattern already applied in cluster-setup. Add --evnode.raft.snap_count=3 to the CLI start example to match the YAML config block. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2ee46f1 commit 1170b45

2 files changed

Lines changed: 47 additions & 14 deletions

File tree

docs/guides/ha/cluster-setup.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ Start all five nodes as close together as possible. The order does not matter bu
231231
--evnode.raft.send_timeout="50ms" \
232232
--evnode.raft.trailing_logs=18000 \
233233
--evnode.raft.snapshot_threshold=5000 \
234+
--evnode.raft.snap_count=3 \
234235
--evnode.p2p.listen_address="/ip4/0.0.0.0/tcp/26656" \
235236
--evnode.p2p.peers="/ip4/10.0.0.2/tcp/26656/p2p/<PEER_ID_NODE_2>,/ip4/10.0.0.3/tcp/26656/p2p/<PEER_ID_NODE_3>,/ip4/10.0.0.4/tcp/26656/p2p/<PEER_ID_NODE_4>,/ip4/10.0.0.5/tcp/26656/p2p/<PEER_ID_NODE_5>" \
236237
--evnode.signer.passphrase_file=/etc/ev-node/passphrase \
@@ -262,24 +263,37 @@ INF raft: entering follower state leader=node-1
262263
INF block applied from raft log height=1 hash=0xabc...
263264
```
264265

266+
### Check node health
267+
268+
Verify each node's HTTP API is responding:
269+
270+
```bash
271+
# ev-node exposes its health endpoint on port 7331 by default
272+
curl http://10.0.0.1:7331/health/ready
273+
274+
# Check which node is the current leader
275+
curl http://10.0.0.1:7331/raft/node | jq '{node_id, is_leader}'
276+
```
277+
265278
### Check block production
266279

267-
Query the RPC endpoint of any node to confirm blocks are being produced:
280+
For EVM chains, query the execution layer to confirm blocks are being produced:
268281

269282
```bash
270-
curl http://10.0.0.1:26657/status | jq '.result.sync_info.latest_block_height'
283+
# Run from any node; the height should increase each time
284+
cast block latest --rpc-url http://10.0.0.1:8545
271285
```
272286

273-
Increment a few seconds and check again — the height should be increasing.
287+
Repeat after a few seconds — the block number should be increasing.
274288

275289
### Verify all nodes are synced
276290

277-
Query each node; all five should report the same `latest_block_height` (or within 1–2 blocks of each other):
291+
Query each node; all five should report the same block height (or within 1–2 blocks of each other):
278292

279293
```bash
280294
for ip in 10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4 10.0.0.5; do
281295
echo -n "$ip: height="
282-
curl -s http://$ip:26657/status | jq -r '.result.sync_info.latest_block_height'
296+
cast block latest --rpc-url http://$ip:8545 | jq -r '.number'
283297
done
284298
```
285299

docs/guides/ha/single-to-ha.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,20 @@ On each of the four new machines, install the same ev-node binary version as the
6363
./evm version
6464
```
6565

66+
Create the passphrase file before initializing so the signer key is encrypted from the start:
67+
68+
```bash
69+
# On each new node
70+
sudo mkdir -p /etc/ev-node
71+
echo -n "<YOUR_PASSPHRASE>" | sudo tee /etc/ev-node/passphrase > /dev/null
72+
sudo chmod 600 /etc/ev-node/passphrase
73+
```
74+
6675
Initialize each new node's home directory:
6776

6877
```bash
69-
# On each new node — do NOT pass --evnode.node.aggregator here yet
70-
./evm init
78+
# On each new node
79+
./evm init --evnode.node.aggregator=true --evnode.signer.passphrase_file /etc/ev-node/passphrase
7180
```
7281

7382
---
@@ -122,8 +131,8 @@ rsync -avz ~/.evm/data/ user@10.0.0.5:~/.evm/data/
122131
After the copy, note the **latest block height** — this is your reference point:
123132

124133
```bash
125-
# Note the height before shutdown
126-
cast block --rpc-url http://<EV_RETH_IP>:<EV_RETH_TCP>
134+
# Note the height before shutdown — replace 8545 with your EVM RPC port
135+
cast block latest --rpc-url http://10.0.0.1:8545 | jq -r '.number'
127136
```
128137

129138
**Restart the existing sequencer now** so the chain keeps producing blocks while you prepare the remaining nodes (Steps 6–8). The chain will run uninterrupted until the planned cutover in Step 9.
@@ -239,7 +248,17 @@ This is the planned maintenance window. The chain pauses block production from w
239248

240249
```bash
241250
# On node-1 (existing sequencer)
242-
systemctl stop ev-node # or kill -SIGTERM $(pgrep evm)
251+
# Preferred: use systemd if the node runs as a service
252+
sudo systemctl stop ev-node
253+
254+
# Fallback: stop the process directly
255+
mapfile -t PIDS < <(pgrep -f "evm start")
256+
if [ "${#PIDS[@]}" -ne 1 ]; then
257+
echo "Expected exactly 1 evm PID, found ${#PIDS[@]}: ${PIDS[*]}"
258+
exit 1
259+
fi
260+
echo "Stopping PID ${PIDS[0]}"
261+
kill -SIGTERM "${PIDS[0]}"
243262
```
244263

245264
Confirm it has stopped:
@@ -310,14 +329,14 @@ INF block applied from raft log height=<N+1>
310329

311330
### Verify block height continuity
312331

313-
The new cluster must continue from exactly where the old sequencer left off. Query the RPC:
332+
The new cluster must continue from exactly where the old sequencer left off. Query the EVM execution layer:
314333

315334
```bash
316335
# From the existing sequencer's last known height (noted in step 5)
317336
LAST_HEIGHT=<height-before-shutdown>
318337
319-
# Query node-1 (or any node)
320-
NEW_HEIGHT=$(cast block --rpc-url http://<EV_RETH_IP>:<EV_RETH_TCP>)
338+
# Query node-1 (or any node) — replace 8545 with your EVM RPC port
339+
NEW_HEIGHT=$(cast block latest --rpc-url http://10.0.0.1:8545 | jq -r '.number')
321340
322341
echo "Last old height: $LAST_HEIGHT"
323342
echo "New cluster height: $NEW_HEIGHT"
@@ -330,7 +349,7 @@ echo "New cluster height: $NEW_HEIGHT"
330349
```bash
331350
for ip in 10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4 10.0.0.5; do
332351
echo -n "$ip: height="
333-
curl -s http://$ip:26657/status | jq -r '.result.sync_info.latest_block_height'
352+
cast block latest --rpc-url http://$ip:8545 | jq -r '.number'
334353
done
335354
```
336355

0 commit comments

Comments
 (0)