Skip to content

Commit 6a9acaa

Browse files
committed
Add Nimbus VC
1 parent 33a967b commit 6a9acaa

6 files changed

Lines changed: 97 additions & 3 deletions

File tree

.env.sample.holesky

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ EL=el-nethermind
1111
# Available options: lighthouse, grandine.
1212
CL=cl-lighthouse
1313
# Validator client to be used in a DV setup.
14-
# Available options: lodestar.
14+
# Available options: lodestar, nimbus.
1515
VC=vc-lodestar
1616
# MEV client to be used in a DV setup.
1717
# Available options: mevboost, commitboost.
@@ -69,6 +69,10 @@ LIDO_EXECUTION_LAYER_REWARDS_ADDRESS=0xE73a3602b99f1f913e72F8bdcBC235e206794Ac8
6969

7070
#VC_LODESTAR_BUILDER_SELECTION=
7171

72+
# Nimbus validator client docker container image version.
73+
# See available tags https://hub.docker.com/r/statusim/nimbus-validator-client/tags
74+
#VC_NIMBUS_VERSION=
75+
7276
######### MEV Config #########
7377

7478
# MEV timeouts.
@@ -208,6 +212,7 @@ LIDODVEXIT_EXIT_EPOCH=256
208212
#CL_GRANDINE_PROMTAIL_MONITORED=false
209213
#CHARON_PROMTAIL_MONITORED=false
210214
#VC_LODESTAR_PROMTAIL_MONITORED=false
215+
#VC_NIMBUS_PROMTAIL_MONITORED=false
211216
#MEV_MEV_BOOST_PROMTAIL_MONITORED=false
212217
#MEV_COMMIT_BOOST_PROMTAIL_MONITORED=false
213218
#EJECTOR_PROMTAIL_MONITORED=false

.env.sample.hoodi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ EL=el-nethermind
1111
# Available options: lighthouse, grandine.
1212
CL=cl-lighthouse
1313
# Validator client to be used in a DV setup.
14-
# Available options: lodestar.
14+
# Available options: lodestar, nimbus.
1515
VC=vc-lodestar
1616
# MEV client to be used in a DV setup.
1717
# Available options: mevboost, commitboost.
@@ -69,6 +69,10 @@ LIDO_EXECUTION_LAYER_REWARDS_ADDRESS=0xE73a3602b99f1f913e72F8bdcBC235e206794Ac8
6969

7070
#VC_LODESTAR_BUILDER_SELECTION=
7171

72+
# Nimbus validator client docker container image version.
73+
# See available tags https://hub.docker.com/r/statusim/nimbus-validator-client/tags
74+
#VC_NIMBUS_VERSION=
75+
7276
######### MEV Config #########
7377

7478
# MEV timeouts.
@@ -208,6 +212,7 @@ LIDODVEXIT_EXIT_EPOCH=256
208212
#CL_GRANDINE_PROMTAIL_MONITORED=false
209213
#CHARON_PROMTAIL_MONITORED=false
210214
#VC_LODESTAR_PROMTAIL_MONITORED=false
215+
#VC_NIMBUS_PROMTAIL_MONITORED=false
211216
#MEV_MEV_BOOST_PROMTAIL_MONITORED=false
212217
#MEV_COMMIT_BOOST_PROMTAIL_MONITORED=false
213218
#EJECTOR_PROMTAIL_MONITORED=false

.env.sample.mainnet

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ EL=el-nethermind
1111
# Available options: lighthouse, grandine.
1212
CL=cl-lighthouse
1313
# Validator client to be used in a DV setup.
14-
# Available options: lodestar.
14+
# Available options: lodestar, nimbus.
1515
VC=vc-lodestar
1616
# MEV client to be used in a DV setup.
1717
# Available options: mevboost, commitboost.
@@ -69,6 +69,10 @@ LIDO_EXECUTION_LAYER_REWARDS_ADDRESS=0x388C818CA8B9251b393131C08a736A67ccB19297
6969

7070
#VC_LODESTAR_BUILDER_SELECTION=
7171

72+
# Nimbus validator client docker container image version.
73+
# See available tags https://hub.docker.com/r/statusim/nimbus-validator-client/tags
74+
#VC_NIMBUS_VERSION=
75+
7276
######### MEV Config #########
7377

7478
# MEV timeouts.
@@ -208,6 +212,7 @@ LIDODVEXIT_EXIT_EPOCH=194048
208212
#CL_GRANDINE_PROMTAIL_MONITORED=false
209213
#CHARON_PROMTAIL_MONITORED=false
210214
#VC_LODESTAR_PROMTAIL_MONITORED=false
215+
#VC_NIMBUS_PROMTAIL_MONITORED=false
211216
#MEV_MEV_BOOST_PROMTAIL_MONITORED=false
212217
#MEV_COMMIT_BOOST_PROMTAIL_MONITORED=false
213218
#EJECTOR_PROMTAIL_MONITORED=false

compose-vc.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,27 @@ services:
2727
- .charon/validator_keys:/home/charon/validator_keys
2828
- ./data/lodestar:/opt/data # Keep data in lodestar and not vc-lodestar for backwards compatibility
2929
restart: unless-stopped
30+
31+
# _ _
32+
# _ __ (_)_ __ ___ | |__ _ _ ___
33+
# | '_ \| | '_ ` _ \| '_ \| | | / __|
34+
# | | | | | | | | | | |_) | |_| \__ \
35+
# |_| |_|_|_| |_| |_|_.__/ \__,_|___/
36+
37+
vc-nimbus:
38+
profiles: [vc-nimbus]
39+
build:
40+
context: nimbus
41+
args:
42+
VERSION: ${VC_NIMBUS_VERSION:-multiarch-v25.6.0}
43+
depends_on: [charon]
44+
networks: [dvnode]
45+
environment:
46+
BEACON_NODE_ADDRESS: http://charon:3600
47+
labels:
48+
- "promtail-monitored=${VC_NIMBUS_PROMTAIL_MONITORED:-true}"
49+
volumes:
50+
- ./nimbus/run.sh:/home/user/data/run.sh
51+
- .charon/validator_keys:/home/validator_keys
52+
- ./data/vc-nimbus:/home/user/data
53+
restart: unless-stopped

nimbus/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
ARG VERSION
2+
3+
FROM statusim/nimbus-eth2:${VERSION} AS nimbusbn
4+
5+
FROM statusim/nimbus-validator-client:${VERSION}
6+
7+
COPY --from=nimbusbn /home/user/nimbus_beacon_node /home/user/nimbus_beacon_node
8+
9+
ENTRYPOINT ["/home/user/data/run.sh"]

nimbus/run.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env bash
2+
3+
# Cleanup nimbus directories if they already exist.
4+
rm -rf /home/user/data
5+
6+
# Refer: https://nimbus.guide/keys.html
7+
# Running a nimbus VC involves two steps which need to run in order:
8+
# 1. Importing the validator keys
9+
# 2. And then actually running the VC
10+
tmpkeys="/home/validator_keys/tmpkeys"
11+
mkdir -p ${tmpkeys}
12+
13+
for f in /home/validator_keys/keystore-*.json; do
14+
echo "Importing key ${f}"
15+
16+
# Read password from keystore-*.txt into $password variable.
17+
password=$(<"${f//json/txt}")
18+
19+
# Copy keystore file to tmpkeys/ directory.
20+
cp "${f}" "${tmpkeys}"
21+
22+
# Import keystore with the password.
23+
echo "$password" |
24+
/home/user/nimbus_beacon_node deposits import \
25+
--data-dir=/home/user/data \
26+
/home/validator_keys/tmpkeys
27+
28+
# Delete tmpkeys/keystore-*.json file that was copied before.
29+
filename="$(basename ${f})"
30+
rm "${tmpkeys}/${filename}"
31+
done
32+
33+
# Delete the tmpkeys/ directory since it's no longer needed.
34+
rm -r ${tmpkeys}
35+
36+
echo "Imported all keys"
37+
38+
# Now run nimbus VC
39+
exec /home/user/nimbus_validator_client \
40+
--data-dir=/home/user/data \
41+
--beacon-node="http://charon:3600" \
42+
--doppelganger-detection=false \
43+
--metrics \
44+
--metrics-address=0.0.0.0 \
45+
--payload-builder=true \
46+
--distributed

0 commit comments

Comments
 (0)