githubEdit

Create a DV With a Group

This quickstart guide will walk you through creating a Distributed Validator Cluster with a number of other node operators.

Pre-requisites

Step 1: Get your ENR

In order to prepare for a distributed key generation ceremony, you need to create an ENR for your Charon client. This ENR is a public/private key pair that allows the other Charon clients in the DKG to identify and connect to your node. If you are creating a cluster but not taking part as a node operator in it, you can skip this step.

# Clone the repo
git clone https://github.com/ObolNetwork/charon-distributed-validator-node.git
# Change directory
cd charon-distributed-validator-node/
# Use docker to create an ENR. Backup the file `.charon/charon-enr-private-key`.
docker run --rm -v "$(pwd):/opt/charon" obolnetwork/charon:v1.8.0 create enr

You should expect to see a console output like this:

Created ENR private key: .charon/charon-enr-private-key
enr:-JG4QGQpV4qYe32QFUAbY1UyGNtNcrVMip83cvJRhw1brMslPeyELIz3q6dsZ7GblVaCjL_8FKQhF6Syg-O_kIWztimGAYHY5EvPgmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQKzMe_GFPpSqtnYl-mJr8uZAUtmkqccsAx7ojGmFy-FY4N0Y3CCDhqDdWRwgg4u
circle-exclamation
circle-check

For Step 2 of the quickstart:

  • Select the Creator tab if you are coordinating the creation of the cluster (this role holds no position of privilege in the cluster, it only sets the initial terms of the cluster that the other operators agree to).

  • Select the Operator tab if you are accepting an invitation to operate a node in a cluster, proposed by the cluster creator.

Step 2: Create a cluster or accept an invitation to a cluster

Collect addresses, configure the cluster, share the invitation

Before starting the cluster creation process, you will need to collect an Ethereum address for each operator in the cluster. They will need to be able to sign messages through MetaMask with this address. (Broader wallet support will be added in future.) With these addresses in hand, go through the cluster creation flow.

You will use the Launchpad to create an invitation, and share it with the operators. This video shows the flow within the DV Launchpad

The following are the steps for creating a cluster.

  1. Go to the DV Launchpad

  2. Connect your wallet

  3. Select Create a Cluster with a group then Get Started.

  4. Follow the flow and accept the advisories.

  5. Configure the Cluster

    1. Input the Cluster Name & Cluster Size (i.e. number of operators in the cluster). The threshold will update automatically, it shows the number of nodes that need to be functioning for the validator(s) to stay active.

  6. Input the Ethereum addresses for each operator that you collected previously. If you will be taking part as an operator, click the "Use My Address" button for Operator 1.

    1. Select the desired amount of validators (32 ETH each) the cluster will run.

    2. If you are taking part in the cluster, enter the ENR you generated in step one in the "What is your charon client's ENR?" field.

    3. Choose the suitable withdrawal configuration:

    • Split only rewards: Deploys an OVM contract as withdrawal address to a principal address of your choice, and a splitter as fee recipient. OVM is used to distribute amounts to principal and fee recipient. It requires two inputs:

      • Owner address: The Owner address is the super-admin of the OVM. It has access to all the roles - deposit, withdraw, distribute etc and it can also give roles to other addresses. For security purposes, it is recommended to either use a trusted address or a multi-sig wallet like SAFEarrow-up-right so all the transactions are approved by a quorum of addresses inside the SAFE. For testing purposes on Hoodi, protofirearrow-up-right can be used.

      • Principal address: This is the address that will receive the amount after the principal threshold amount is crossed. Read more about it here where it is explained.

    • Split Everything: Deploys an OVM contract as withdrawal address, with principal and fee recipient addresses both as splitter contracts. In this case both principal and rewards are distributed. It just requires Owner address as input which is again recommended to be a SAFE wallet.

    • Lido CSM: Deploys the clusters with Lido's withdrawal vault as withdrawal address and execution vault as fee recipient. Read more about the process to register CSM cluster here.

    • Custom: Enter the Principal address which should receive the principal 32 ETH and the accrued consensus layer rewards when the validator is exited. This can optionally be set to the contract address of a multisig / splitter contract. Enter the Fee Recipient address to which the execution layer rewards will go. This can be the same as the principal address, or it can be a different address. This can optionally be set to the contract address of a multisig / splitter contract.

  7. Click Create Cluster Configuration. Review that all the details are correct, and press Confirm and Sign You will be prompted to sign two or three transactions with your MetaMask wallet. These are:

    1. The config_hash. This is a hashed representation of the details of this cluster, to ensure everyone is agreeing to an identical setup.

    2. The operator_config_hash. This is your acceptance of the terms and conditions to participate as a node operator.

    3. Your ENR. Signing your ENR authorises the corresponding private key to act on your behalf in the cluster.

  8. Share your cluster invite link with the operators. Following the link will show you a screen waiting for other operators to accept the configuration you created.

  9. You can use the link to monitor how many of the operators have already signed their approval of the cluster configuration and submitted their ENR.

Once every participating operator is ready, the next step is the distributed key generation amongst the operators.

  • If you are not planning on operating a node, and were only configuring the cluster for the operators, your journey ends here. Well done!

  • If you are one of the cluster operators, continue to the next step.

Step 3: Run the Distributed Key Generation (DKG) ceremony

circle-check
  1. Once all operators successfully signed, your screen will automatically advance to the next step and look like this. Click Continue. (If you closed the tab, you can always go back to the invite link shared by the leader and connect your wallet.)

  2. Copy and run the docker command on the screen into your terminal. It will retrieve the remote cluster details and begin the DKG process.

  3. Assuming the DKG is successful, a number of artefacts will be created in the .charon folder of the node. These include:

    • A deposit-data.json file. This contains the information needed to activate the validator on the Ethereum network.

    • A cluster-lock.json file. This contains the information needed by Charon to operate the distributed validator cluster with its peers.

    • A validator_keys/ folder. This folder contains the private key shares and passwords for the created distributed validators.

triangle-exclamation
circle-info

The cluster-lock and deposit-data files are identical for each operator, if lost, they can be copied from one operator to another.

Now that the DKG has been completed, all operators can start their nodes.

Step 4: Start your Distributed Validator Node

With the DKG ceremony over, the last phase before activation is to prepare your node for validating over the long-term.

The CDVN repositoryarrow-up-right is configured to sync an execution layer client (Nethermind) and a consensus layer client (Lighthouse) using Docker Compose. Further client combinations can be prepared using Sedge. You can also leverage alternative ways to run a node such as Ansible, Helm, or Kubernetes manifests.

circle-info

Currently, the CDVN repoarrow-up-right has defaults for the Hoodi testnet and for mainnet.

Start by copying the appropriate .env.sample.<NETWORK> file to .env, and modifying values as needed.

In the same folder where you created your ENR in Step 1, and ran the DKG in Step 3, start your node in the DV cluster with docker compose.

triangle-exclamation

If at any point you need to turn off your node, you can run:

You should use the Grafana dashboard that accompanies the quickstart repo to see whether your cluster is healthy.

In particular you should check:

  • That your Charon client can connect to the configured beacon client.

  • That your Charon client can connect to all peers directly.

  • That your validator client is connected to Charon, and has the private keys it needs loaded and accessible. Most components in the dashboard have some help text there to assist you in understanding your cluster performance. You might notice that there are logs indicating that a validator cannot be found and that APIs are returning 404. This is to be expected at this point, as the validator public keys listed in the lock file have not been deposited and acknowledged on the consensus layer yet (usually it takes ~16 hours after the deposit is made).

circle-check

If you have gotten to this stage, every node is up, synced and connected, congratulations. You can now move forward to activating your validator to begin staking.

FAQ

chevron-rightWhat happens if I lose my ENR private key?hashtag

If you lose your ENR private key (.charon/charon-enr-private-key), you won't be able to participate in the DKG ceremony or start the DV cluster successfully. It's critical to back up this file securely before proceeding with the cluster creation process.

chevron-rightCan I change the cluster configuration after it's been created?hashtag

Once a cluster configuration has been created and signed by all operators, it cannot be changed. If you need to modify the cluster settings, you'll need to create a new cluster configuration and have all operators sign the new configuration.

chevron-rightWhat if one operator doesn't show up for the DKG ceremony?hashtag

All operators must participate simultaneously in the DKG ceremony for it to complete successfully. If an operator is unable to participate, you'll need to wait for them or create a new cluster configuration without that operator. It's recommended to schedule the DKG ceremony at a time when all operators can participate.

chevron-rightHow do I know if my node is properly connected to the cluster?hashtag

You can verify your node's connection status by checking the Grafana dashboard (if using CDVN) or monitoring the Charon logs. Your Charon client should be able to connect to all peers directly, and you should see successful handshakes in the logs. The dashboard will show connection status for each peer in the cluster.

chevron-rightWhat should I do if the DKG ceremony fails?hashtag

If the DKG ceremony fails, check the logs for error messages. Common issues include network connectivity problems, mismatched cluster definitions, or operators not running the command simultaneously. Ensure all operators have the correct cluster-definition.json file and are running the DKG command at the same time. You may need to restart the DKG process after resolving any issues.

chevron-rightCan I use different client combinations for different operators in the cluster?hashtag

Yes, each operator can use different execution and consensus clients. The Charon client handles the coordination between different client implementations, so operators can choose the clients that work best for their infrastructure while still participating in the same distributed validator cluster.

chevron-rightWhat happens if I need to replace an operator in the cluster?hashtag

Replacing an operator requires creating a new cluster configuration with the new operator's details and having all remaining operators plus the new operator sign the new configuration. This will require running a new DKG ceremony. For more information, see the operator rotation guide.

chevron-rightHow should I set the validator count for compounding rewards?hashtag

We recommend setting the validator count such that each validator's maxEB is capped at 1920 ETH, allowing rewards to compound for two years until it reaches 2048 ETH. Read more

Unlike a standard bank account where interest compounds daily, validator rewards follow a step-function. Your effective balance (which earns rewards) only increases when your real balance exceeds the current effective balance by 1.25 ETH. This "hysteresis" means growth is slightly slower than pure continuous compounding, as 'dust' rewards sit idle until they accumulate enough to trigger a balance update.

Recommendation: The 1920 ETH Strategy

To maximize compounding efficiency, avoid depositing the full 2048 ETH cap immediately. Leaving ~128 ETH of "headroom" allows your validators to compound rewards autonomously for approximately 2 years (at 3% APR) before hitting the 2048 ETH effective balance cap.

Last updated

Was this helpful?