Run a DV on mainnet
Distributed Validators created for goerli cannot be used on mainnet and vice versa, please take caution when creating, backing up, and activating mainnet validators.
This section is intended for users who wish to run their Distributed Validator on Ethereum mainnet.
- Ensure you have docker installed.
- Ensure you have git installed.
- Make sure
dockeris running before executing the commands below.
- Clone the charon-distributed-validator-node repo and
cdinto the directory.
# Clone this repo
git clone https://github.com/ObolNetwork/charon-distributed-validator-node.git
# Change directory
If you have already cloned the repo, make sure that it is up-to-date.
cp -n .env.sample .env
- In your
.envfile, uncomment and set values for
# Overrides network for all the relevant services.
# Checkpoint sync url used by lighthouse to fast sync.
Note that you can choose any checkpoint sync url from https://eth-clients.github.io/checkpoint-sync-endpoints/#mainnet.
Your DV stack is now mainnet ready 🎉
Remote mainnet beacon node
Using a remote beacon node will impact the performance of your Distributed Validator and should be used sparingly.
If you already have a mainnet beacon node running somewhere and you want to use that instead of running EL (
geth) & CL (
lighthouse) as part of the repo, you can disable these images. To do so, follow these steps:
- Copy the
cp -n docker-compose.override.yml.sample docker-compose.override.yml
- Uncomment the
profiles: [disable]section for both
lighthouse. The override file should now look like this
# Disable geth
# Bind geth internal ports to host ports
#- 8545:8545 # JSON-RPC
#- 8551:8551 # AUTH-RPC
#- 6060:6060 # Metrics
# Disable lighthouse
# Bind lighthouse internal ports to host ports
#- 5052:5052 # HTTP
#- 5054:5054 # Metrics
- Then, uncomment and set the
CHARON_BEACON_NODE_ENDPOINTSvariable in the
.envfile to your mainnet beacon node's URL
# Connect to one or more external beacon nodes. Use a comma separated list excluding spaces.
Exit a mainnet distributed validator
If you want to exit your mainnet validator, you need to uncomment and set the
EXIT_EPOCH variable in the
# Cluster wide consistent exit epoch. Set to latest for fork version, see `curl $BEACON_NODE/eth/v1/config/fork_schedule`
# Currently, the latest fork is capella (epoch: 194048)
EXIT_EPOCH should be
194048 after the shapella fork.