Blockchain Validator Setup
Validator — not just "node with money". It's infrastructure responsibility: validator downtime leads to slashing (stake cuts), double signing — to significant financial losses. Different networks have fundamentally different punishment mechanisms, and before setup you must clearly understand risks of the specific network you're working with.
Ethereum: Beacon Chain Validator
Ethereum Proof-of-Stake requires 32 ETH per validator. Slashing conditions:
- Double voting (equivocation): signing two different blocks on one slot — immediate slashing ~1 ETH + forced exit
- Surround vote: attestation surrounding another — same
Slashing for simple downtime — no. Only inactivity leak on long offline: gradual balance decrease until network reaches finality without you.
Key Components:
Execution Client (Geth/Nethermind)
+
Consensus Client (Lighthouse/Prysm/Teku)
+
Validator Client (separate process with keys)
Validator client — separate service from beacon node. Important: validator keys shouldn't live on same server as node (for protection on compromise).
Key Generation:
# Official Ethereum Foundation tool
pip install staking-deposit-cli
./deposit.sh new-mnemonic \
--num_validators 1 \
--chain mainnet \
--eth1_withdrawal_address 0xYOUR_ETH_ADDRESS
Generates deposit_data-*.json (for deposit contract) and keystore-*.json (for validator client). Mnemonic — only way to recover keys: store offline, in multiple physical locations.
Import Keys to Lighthouse:
lighthouse account validator import \
--directory ./validator_keys \
--network mainnet
Double-Signing Protection: Slashing Protection
Most critical operation — validator migration to another server. If you run two validator client instances with same keys simultaneously — slashing inevitable.
Safe migration protocol:
- Stop validator client on old server
- Export slashing protection database
- Wait 2–3 epochs (without activity)
- Import slashing protection to new server
- Start only after that
# Export (old server)
lighthouse account validator slashing-protection export \
--network mainnet \
slashing_protection.json
# Import (new server)
lighthouse account validator slashing-protection import \
--network mainnet \
slashing_protection.json
Cosmos SDK / Tendermint Validators
Cosmos networks (Cosmos Hub, Osmosis, Evmos etc) use Tendermint BFT consensus. Slashing stricter than Ethereum:
| Violation | Slash | Jail |
|---|---|---|
| Downtime (>10% missed blocks over 10000-block window) | 0.01% stake | Yes, manual exit via unjail |
| Double signing | 5% stake | Tombstone (forever) |
Cosmos Validator Setup (Cosmos Hub example):
# Install gaiad
git clone https://github.com/cosmos/gaia && cd gaia
make install
# Initialize
gaiad init myvalidator --chain-id cosmoshub-4
# Create operator key
gaiad keys add validator-key --keyring-backend file
# Synchronization (State sync — faster than full sync)
# In config.toml:
# [statesync]
# enable = true
# rpc_servers = "https://rpc.cosmos.network:443,https://rpc2.cosmos.network:443"
# trust_height = <recent_height>
# trust_hash = "<block_hash_at_trust_height>"
# Create validator (after sync)
gaiad tx staking create-validator \
--amount 1000000uatom \
--from validator-key \
--commission-rate 0.05 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(gaiad tendermint show-validator) \
--moniker "My Validator" \
--chain-id cosmoshub-4 \
--gas auto --fees 5000uatom
Double-Signing Protection: tmkms
For production Cosmos validators use tmkms (Tendermint Key Management System) — separate service for key storage and usage. Key is not on node server, but in protected environment (HSM or separate server).
tmkms supports: YubiHSM2, AWS CloudHSM, SoftHSM (for testing).
# tmkms.toml
[[validator]]
addr = "tcp://validator-node:26659"
chain_id = "cosmoshub-4"
reconnect = true
secret_key = "/etc/tmkms/secret_connection.key"
Monitoring: What to Alert
- No signed blocks for last N minutes → immediate alert
- Missed attestations (Ethereum) > 5% per epoch → warning
- Validator balance decreased (slashing?) → critical
- Peer count < 10 → warning (isolation)
- Disk free < 20% → warning
Grafana dashboards: Ethereum — ethereum-validator-dashboard from Stereum/EthStaker; Cosmos — official dashboard in cosmos/tools repo.







