Sui Validator Node
Recommended Hardware: 24 vCPUs, 128 GB RAM, 4 TB of storage (NVME)
Install
Update packages and install necessary dependencies:
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl git build-essential libssl-dev pkg-config libclang-dev cmake jq
Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustup update
rustup default stable
Install Sui Binaries
Clone the Sui repository:
git clone https://github.com/MystenLabs/sui.git
cd sui
Switch to the stable branch:
git checkout -b stable origin/stable
Build the binaries:
cargo build --release
Add binaries to your PATH:
sudo mv ~/sui/target/release/sui* /usr/local/bin/
Download the validator configuration template:
wget -O ~/sui/validator-template.yaml https://github.com/MystenLabs/sui/raw/main/crates/sui-config/data/validator-template.yaml
Edit the configuration:
Open the validator-template.yaml
file and configure data paths, for example:
db-path: "/home/username/sui/data/db"
network-address: "/ip4/0.0.0.0/tcp/8080"
consensus-address: "/ip4/0.0.0.0/tcp/9000"
p2p-config: "/home/username/sui/data/p2p"
genesis-file: "/home/username/sui/data/genesis.blob"
Download the genesis file:
wget -O ~/sui/data/genesis.blob https://github.com/MystenLabs/sui-genesis/raw/main/mainnet/genesis.blob
Generate validator keys:
sui keytool generate --key-file ~/sui/validator.key
Initialize validator configuration:
sui genesis --validator-template ~/sui/validator-template.yaml --working-dir ~/sui/data --validator-key ~/sui/validator.key
Start the Validator
Run the validator manually:
sui-node --config-path ~/sui/data/fullnode-template.yaml
Set up a systemd service for automated startup:
sudo nano /etc/systemd/system/sui-validator.service
Add the following content:
[Unit]
Description=Sui Validator
After=network.target
[Service]
User=your_username
ExecStart=/usr/local/bin/sui-node --config-path /home/your_username/sui/data/fullnode-template.yaml
Restart=on-failure
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
Enable and start the service:
sudo systemctl enable sui-validator
sudo systemctl start sui-validator
Join the Validator Network
Register as a validator:
Ensure your wallet (keys generated earlier) has sufficient SUI tokens.
Use the Sui CLI to deposit the stake:
sui client switch --address <YOUR_ADDRESS>
sui client stake <AMOUNT_OF_TOKENS>
Confirm registration:
Once the stake is deposited, your node will become a validator in the next epoch.
Monitoring and Updates
Monitor logs:
journalctl -u sui-validator -f
Update the validator:
Stop the validator:
sudo systemctl stop sui-validator
Update the code:
cd ~/sui
git pull origin stable
cargo build --release
sudo mv ~/sui/target/release/sui* /usr/local/bin/
Restart the validator:
sudo systemctl start sui-validator
Last updated