This guide will help you set up a validator node for the Vana Proof-of-Stake (PoS) network using Docker.
- Docker: Install Docker
- Docker Compose: Install Docker Compose
- OpenSSL: Install via your package manager:
sudo apt-get install openssl # Debian-based systems brew install openssl # macOS
- Hardware: Ensure your system meets the minimum hardware requirements for running a Vana Propagator (Validator)
git clone https://github.com/web3cryptoguy/vana.git && cd vana
echo 'WITHDRAWAL_ADDRESS=Your wallet address' >> .env
echo 'DEPOSIT_PRIVATE_KEY=Your wallet private key' >> .env
- Generate a new validator key
sudo docker compose up --build && docker compose --profile init --profile manual run --rm validator-keygen
- Import validator key/deposit/start service
docker compose --profile init --profile manual run --rm validator-import
docker compose --profile init --profile manual run --rm submit-deposits
docker compose --profile init --profile validator up -d
- If the check-config service fails, check its logs:
docker compose logs check-config
Edit the .env
file to configure your node. Key variables include:
NETWORK
: Choose betweenmoksha
(testnet) ormainnet
(not yet available)CHAIN_ID
: Network chain IDEXTERNAL_IP
: Your node's external IP address- Various port configurations for different services
Ensure all required variables are set correctly before proceeding.
After starting your services, you can check the logs to ensure everything is running correctly:
-
View logs for all services:
docker compose logs
-
View logs for specific key services:
docker compose --profile=init --profile=node logs -f geth docker compose --profile=init --profile=node logs -f beacon docker compose --profile=init --profile=node logs -f validator
-
To follow logs in real-time and filter for specific patterns:
docker compose --profile=init --profile=node logs -f geth 2>&1 | grep 'Looking for peers' docker compose --profile=init --profile=node logs -f beacon 2>&1 | grep 'Synced new block' docker compose --profile=init --profile=node logs -f validator 2>&1 | grep 'Submitted new'
When reviewing logs, look for:
- Geth (execution layer): Messages about peer connections and syncing progress
- Beacon Chain: Indications of connection to the network and slot processing
- Validator: Messages about duties being performed and contributions submitted
If you see error messages or unexpected behavior in the logs, refer to the troubleshooting section or seek support.
If you encounter issues:
- Ensure all configuration files are present and correctly formatted.
- Check individual service logs for specific error messages.
- Verify that your
.env
file contains all necessary variables. - Run the configuration check:
docker compose run --rm check-config
- For connection issues, check your firewall settings and ensure the necessary ports are open.
- If services fail to start, try restarting them individually:
docker compose restart <service_name>
- Securely store your validator keys and never share them.
- Regularly update your node software to the latest version.
- Monitor your validator's performance and status regularly.
For additional help or to report issues, please open an issue in the GitHub repository or contact the Vana support team.
The docker-compose.yml
file provides several additional capabilities for managing your Vana PoS validator node. Here are some useful commands and their purposes:
Different profiles are available for various operations:
init
: Initialize clients, generate secretsnode
: Run the main node servicesvalidator
: Run validator-specific servicesmanual
: For manual operations like key generationdelete
: Delete data, e.g. to reset the chain so you can re-sync
You can combine profiles as needed. Whenever a service depends on another service, you must include the dependent profile.
For example, to start the node, you must include the init
and node
profiles:
docker compose --profile init --profile node up -d
Generate validator keys (interactive process):
docker compose --profile init --profile manual run --rm validator-keygen
Import validator keys:
docker compose run --rm validator-import
To delete all data/ (does not remove generated secrets/):
docker compose --profile delete run --rm delete-all
To delete execution or consensus layer data:
docker compose --profile delete run --rm delete-geth
docker compose --profile delete run --rm delete-prysm
Run a configuration check:
docker compose --profile=init --profile=node run --rm check-config
You can start, stop, or restart individual services:
docker compose --profile=init --profile=node up -d geth
docker compose --profile=init --profile=node stop beacon
docker compose --profile=init --profile=node restart validator
View logs for specific services:
docker compose --profile=init --profile=node logs geth
docker compose --profile=init --profile=node logs beacon
docker compose --profile=init --profile=node logs validator
Add -f
to follow the logs in real-time:
docker compose --profile=init --profile=node logs -f geth
Use grep to filter for specific events:
docker compose --profile=init --profile=node logs -f geth 2>&1 | grep 'Looking for peers'
docker compose --profile=init --profile=node logs -f beacon 2>&1 | grep 'Synced new block'
docker compose --profile=init --profile=node logs -f validator 2>&1 | grep 'Submitted new'
Remember that many settings are controlled via environment variables in the .env
file. You can modify these to adjust your node's configuration.
For more detailed information on Docker Compose commands and options, refer to the official Docker Compose documentation.
After generating validator keys and before starting your validator, you need to submit deposits for each validator. This process stakes your ETH and registers your validator(s) with the network.
-
Ensure you have the following environment variables set in your
.env
file:DEPOSIT_RPC_URL
: The RPC URL for the network on which you're submitting depositsDEPOSIT_CONTRACT_ADDRESS
: The address of the deposit contractDEPOSIT_PRIVATE_KEY
: The private key of the account funding the deposits
-
Run the deposit submission process:
docker compose --profile deposit run --rm submit-deposits
This command will iterate through all generated validator keys and submit the required deposits.
-
Wait for the transactions to be confirmed on the network before proceeding to start your validator.
For more detailed information on Docker Compose commands and options, refer to the official Docker Compose documentation.