Validator Cluster Deployment Guide
Deploy a local multi-validator Gravity EVM cluster using Gravity SDK in minutes — the fastest way to run a high-performance, EVM-compatible chain from scratch.
Gravity SDK makes it straightforward to spin up your own EVM-compatible chain with the same AptosBFT consensus and parallel execution engine that powers the Gravity L1. Whether you want to run a local devnet for development, benchmark raw throughput, or evaluate the technology, this guide walks you through a complete cluster deployment in five steps.
For a deeper dive into the SDK architecture and how to build production-grade chains, see Build Your Own 100k+ TPS Chain Using Gravity SDK.
Prerequisites
Ensure you have the following installed:
Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shFoundry (for genesis contract deployment):
curl -L https://foundry.paradigm.xyz | bashthenfoundryupPython 3: For parsing configurations.
envsubst: Usually part of the
gettextpackage (sudo apt install gettexton Ubuntu).
Quick Start (4-Node Cluster)
1. Clone the Repository
git clone https://github.com/Galxe/gravity-sdk.git
cd gravity-sdk2. Build the Node Binary
Benchmark results are only meaningful when the node is compiled with optimizations:
Refer to gravity-sdk/readme.md for full build options.
3. Setup Configuration
The default configuration sets up 4 nodes on localhost. Edit genesis.toml to customize validators, stake amounts, and network parameters. Edit cluster.toml to adjust ports or the path to your binary.
4. Initialize Node Keys
This generates identity.yaml for each validator node.
5. Generate Genesis (New Networks Only)
Outputs ./output/genesis.json and ./output/waypoint.txt.
Note:
genesis.shclonesgravity_chain_core_contractsintoexternal/on first run but does not auto-update it. To update manually:cd external/gravity_chain_core_contracts && git pull origin main
6. Deploy and Start
Your cluster is now running. Useful commands:
Configuration Reference
genesis.toml (New Networks Only)
[genesis]
Core genesis parameters (chain ID, epoch interval, etc.)
[genesis.faucet]
Pre-funded faucet account for testing
[genesis.validator_config]
Validator bond limits and restrictions
[[genesis_validators]]
Genesis validator list with addresses and stake
Key validator fields:
address— Validator's ETH address (required)stake_amount— Initial stake in Wei (required)voting_power— Initial voting power (must be ≥ stake_amount)
cluster.toml (Node Deployment)
[cluster]
Cluster name and base directory
[build]
Path to the gravity_node binary
[genesis_source]
Paths to genesis.json and waypoint.txt
[[nodes]]
Node definitions with ports and roles
[faucet_init]
Optional faucet initialization config
Node roles:
genesis— Included in the genesis validator setvalidator— Validator that joins via on-chain transactionvfn— Full node using on-chain discovery
Makefile Reference
make genesis
Generate genesis.json + waypoint.txt
make init
Generate node identity keys
make deploy
Prepare runtime environment for each node
make start
Start all nodes
make stop
Stop all nodes
make status
Check cluster status
make faucet
Initialize faucet accounts
make clean
Remove generated artifacts
make deploy_start
Deploy and start (convenience)
make restart
Stop, deploy, and start
Next Steps
Once your cluster is running, follow the Benchmark Reproduction Guide to benchmark throughput and latency using gravity_bench.
Last updated
Was this helpful?

