forked from ObolNetwork/charon-distributed-validator-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·35 lines (30 loc) · 1.17 KB
/
run.sh
File metadata and controls
executable file
·35 lines (30 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
apt-get update && apt-get install -y curl jq wget
while ! curl "${LIGHTHOUSE_BEACON_NODE_ADDRESS}/eth/v1/node/health" 2>/dev/null; do
echo "Waiting for ${LIGHTHOUSE_BEACON_NODE_ADDRESS} to become available..."
sleep 5
done
# Refer: https://lighthouse-book.sigmaprime.io/advanced-datadir.html
# Running a lighthouse VC involves two steps which needs to run in order:
# 1. Loading the validator keys
# 2. Actually running the VC
for f in /opt/charon/validator_keys/keystore-*.json; do
echo "Importing key ${f}"
lighthouse --network "${NETWORK}" account validator import \
--reuse-password \
--keystore "${f}" \
--datadir="/opt/data" \
--password-file "${f//json/txt}"
done
echo "Starting lighthouse validator client for ${NODE}"
exec lighthouse --network "${NETWORK}" validator \
--beacon-nodes ${LIGHTHOUSE_BEACON_NODE_ADDRESS} \
--suggested-fee-recipient "0x0000000000000000000000000000000000000000" \
--metrics \
--metrics-address "0.0.0.0" \
--metrics-allow-origin "*" \
--metrics-port "5064" \
--use-long-timeouts \
--datadir="/opt/data" \
--distributed \
$( [ "$BUILDER_API_ENABLED" = "true" ] && echo "--builder-proposals" )