Skip to content

Commit 7822f4b

Browse files
committed
Add prysm and teku VCs
1 parent 47bf41a commit 7822f4b

5 files changed

Lines changed: 143 additions & 0 deletions

File tree

.env.sample.holesky

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ CL=cl-lighthouse
1414
# Validator client to be used in a DV setup. Uncomment only the desired client.
1515
VC=vc-lodestar
1616
#VC=vc-nimbus
17+
#VC=vc-prysm
18+
#VC=vc-teku
1719

1820
# MEV client to be used in a DV setup. Uncomment only the desired client.
1921
MEV=mev-mevboost
@@ -75,6 +77,14 @@ LIDO_EXECUTION_LAYER_REWARDS_ADDRESS=0xE73a3602b99f1f913e72F8bdcBC235e206794Ac8
7577
# See available tags https://hub.docker.com/r/statusim/nimbus-validator-client/tags
7678
#VC_NIMBUS_VERSION=
7779

80+
# Prysm validator client docker container image version.
81+
# See available tags https://hub.docker.com/r/offchainlabs/prysm-validator/tags
82+
#VC_PRYSM_VERSION=
83+
84+
# Teku validator client docker container image version.
85+
# See available tags https://hub.docker.com/r/consensys/teku/tags
86+
#VC_TEKU_VERSION=
87+
7888
######### MEV Config #########
7989

8090
# MEV timeouts.
@@ -215,6 +225,8 @@ LIDODVEXIT_EXIT_EPOCH=256
215225
#CHARON_PROMTAIL_MONITORED=false
216226
#VC_LODESTAR_PROMTAIL_MONITORED=false
217227
#VC_NIMBUS_PROMTAIL_MONITORED=false
228+
#VC_PRYSM_PROMTAIL_MONITORED=false
229+
#VC_TEKU_PROMTAIL_MONITORED=false
218230
#MEV_MEV_BOOST_PROMTAIL_MONITORED=false
219231
#MEV_COMMIT_BOOST_PROMTAIL_MONITORED=false
220232
#EJECTOR_PROMTAIL_MONITORED=false

.env.sample.hoodi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ CL=cl-lighthouse
1414
# Validator client to be used in a DV setup. Uncomment only the desired client.
1515
VC=vc-lodestar
1616
#VC=vc-nimbus
17+
#VC=vc-prysm
18+
#VC=vc-teku
1719

1820
# MEV client to be used in a DV setup. Uncomment only the desired client.
1921
MEV=mev-mevboost
@@ -75,6 +77,14 @@ LIDO_EXECUTION_LAYER_REWARDS_ADDRESS=0xE73a3602b99f1f913e72F8bdcBC235e206794Ac8
7577
# See available tags https://hub.docker.com/r/statusim/nimbus-validator-client/tags
7678
#VC_NIMBUS_VERSION=
7779

80+
# Prysm validator client docker container image version.
81+
# See available tags https://hub.docker.com/r/offchainlabs/prysm-validator/tags
82+
#VC_PRYSM_VERSION=
83+
84+
# Teku validator client docker container image version.
85+
# See available tags https://hub.docker.com/r/consensys/teku/tags
86+
#VC_TEKU_VERSION=
87+
7888
######### MEV Config #########
7989

8090
# MEV timeouts.
@@ -215,6 +225,8 @@ LIDODVEXIT_EXIT_EPOCH=256
215225
#CHARON_PROMTAIL_MONITORED=false
216226
#VC_LODESTAR_PROMTAIL_MONITORED=false
217227
#VC_NIMBUS_PROMTAIL_MONITORED=false
228+
#VC_PRYSM_PROMTAIL_MONITORED=false
229+
#VC_TEKU_PROMTAIL_MONITORED=false
218230
#MEV_MEV_BOOST_PROMTAIL_MONITORED=false
219231
#MEV_COMMIT_BOOST_PROMTAIL_MONITORED=false
220232
#EJECTOR_PROMTAIL_MONITORED=false

.env.sample.mainnet

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ CL=cl-lighthouse
1414
# Validator client to be used in a DV setup. Uncomment only the desired client.
1515
VC=vc-lodestar
1616
#VC=vc-nimbus
17+
#VC=vc-prysm
18+
#VC=vc-teku
1719

1820
# MEV client to be used in a DV setup. Uncomment only the desired client.
1921
MEV=mev-mevboost
@@ -75,6 +77,14 @@ LIDO_EXECUTION_LAYER_REWARDS_ADDRESS=0x388C818CA8B9251b393131C08a736A67ccB19297
7577
# See available tags https://hub.docker.com/r/statusim/nimbus-validator-client/tags
7678
#VC_NIMBUS_VERSION=
7779

80+
# Prysm validator client docker container image version.
81+
# See available tags https://hub.docker.com/r/offchainlabs/prysm-validator/tags
82+
#VC_PRYSM_VERSION=
83+
84+
# Teku validator client docker container image version.
85+
# See available tags https://hub.docker.com/r/consensys/teku/tags
86+
#VC_TEKU_VERSION=
87+
7888
######### MEV Config #########
7989

8090
# MEV timeouts.
@@ -215,6 +225,8 @@ LIDODVEXIT_EXIT_EPOCH=194048
215225
#CHARON_PROMTAIL_MONITORED=false
216226
#VC_LODESTAR_PROMTAIL_MONITORED=false
217227
#VC_NIMBUS_PROMTAIL_MONITORED=false
228+
#VC_PRYSM_PROMTAIL_MONITORED=false
229+
#VC_TEKU_PROMTAIL_MONITORED=false
218230
#MEV_MEV_BOOST_PROMTAIL_MONITORED=false
219231
#MEV_COMMIT_BOOST_PROMTAIL_MONITORED=false
220232
#EJECTOR_PROMTAIL_MONITORED=false

compose-vc.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,56 @@ services:
5151
- .charon/validator_keys:/home/validator_keys
5252
- ./data/vc-nimbus:/home/user/data
5353
restart: unless-stopped
54+
55+
# _ __ _ __ _ _ ___ _ __ ___
56+
# | '_ \| '__| | | / __| '_ ` _ \
57+
# | |_) | | | |_| \__ \ | | | | |
58+
# | .__/|_| \__, |___/_| |_| |_|
59+
# |_| |___/
60+
61+
vc-prysm:
62+
profiles: [vc-prysm]
63+
image: offchainlabs/prysm-validator:${VC_PRYSM_VERSION:-v6.0.4}
64+
platform: "linux/amd64"
65+
depends_on: [charon]
66+
networks: [dvnode]
67+
entrypoint: /home/prysm/run.sh
68+
environment:
69+
BEACON_NODE_ADDRESS: http://charon:3600
70+
NETWORK: ${NETWORK}
71+
labels:
72+
- "promtail-monitored=${VC_PRYSM_PROMTAIL_MONITORED:-true}"
73+
volumes:
74+
- ./prysm/run.sh:/home/prysm/run.sh
75+
- ./data/vc-prysm:/data/vc
76+
- .charon/validator_keys:/home/charon/validator_keys
77+
restart: unless-stopped
78+
79+
# _ _
80+
# | |_ ___| | ___ _
81+
# | __/ _ \ |/ / | | |
82+
# | || __/ <| |_| |
83+
# \__\___|_|\_\\__,_|
84+
85+
vc-teku:
86+
profiles: [vc-teku]
87+
image: consensys/teku:${VC_TEKU_VERSION:-25.7.1}
88+
command: |
89+
validator-client
90+
--beacon-node-api-endpoint "http://charon:3600"
91+
--network="${NETWORK}"
92+
--data-base-path=/home/data
93+
--validator-keys="/opt/charon/validator_keys:/opt/charon/validator_keys"
94+
--validators-keystore-locking-enabled false
95+
--validators-external-signer-slashing-protection-enabled true
96+
--validators-builder-registration-default-enabled true
97+
--validators-proposer-default-fee-recipient "0x0000000000000000000000000000000000000000"
98+
--Xobol-dvt-integration-enabled true
99+
depends_on: [charon]
100+
networks: [dvnode]
101+
labels:
102+
- "promtail-monitored=${VC_TEKU_PROMTAIL_MONITORED:-true}"
103+
volumes:
104+
- .charon/validator_keys:/opt/charon/validator_keys
105+
- ./data/vc-teku:/home/data
106+
restart: unless-stopped

prysm/run.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/usr/bin/env bash
2+
3+
WALLET_DIR="/prysm-wallet"
4+
5+
# Cleanup wallet directories if already exists.
6+
rm -rf $WALLET_DIR
7+
mkdir $WALLET_DIR
8+
9+
# Refer: https://docs.prylabs.network/docs/install/install-with-script#step-5-run-a-validator-using-prysm
10+
# Running a prysm VC involves two steps which need to run in order:
11+
# 1. Import validator keys in a prysm wallet account.
12+
# 2. Run the validator client.
13+
WALLET_PASSWORD="prysm-validator-secret"
14+
echo $WALLET_PASSWORD > /wallet-password.txt
15+
/app/cmd/validator/validator wallet create --accept-terms-of-use --wallet-password-file=wallet-password.txt --keymanager-kind=direct --wallet-dir="$WALLET_DIR"
16+
17+
tmpkeys="/home/validator_keys/tmpkeys"
18+
mkdir -p ${tmpkeys}
19+
20+
for f in /home/charon/validator_keys/keystore-*.json; do
21+
echo "Importing key ${f}"
22+
23+
# Copy keystore file to tmpkeys/ directory.
24+
cp "${f}" "${tmpkeys}"
25+
26+
# Import keystore with password.
27+
/app/cmd/validator/validator accounts import \
28+
--accept-terms-of-use=true \
29+
--wallet-dir="$WALLET_DIR" \
30+
--keys-dir="${tmpkeys}" \
31+
--account-password-file="${f//json/txt}" \
32+
--wallet-password-file=wallet-password.txt
33+
34+
# Delete tmpkeys/keystore-*.json file that was copied before.
35+
filename="$(basename ${f})"
36+
rm "${tmpkeys}/${filename}"
37+
done
38+
39+
# Delete the tmpkeys/ directory since it's no longer needed.
40+
rm -r ${tmpkeys}
41+
42+
echo "Imported all keys"
43+
44+
# Now run prysm VC
45+
/app/cmd/validator/validator --wallet-dir="$WALLET_DIR" \
46+
--accept-terms-of-use=true \
47+
--datadir="/data/vc" \
48+
--wallet-password-file="/wallet-password.txt" \
49+
--enable-beacon-rest-api \
50+
--beacon-rest-api-provider="${BEACON_NODE_ADDRESS}" \
51+
--beacon-rpc-provider="${BEACON_NODE_ADDRESS}" \
52+
--beacon-rpc-gateway-provider="${BEACON_NODE_ADDRESS}" \
53+
--"${NETWORK}" \
54+
--distributed

0 commit comments

Comments
 (0)