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 jqInstall Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustup update
rustup default stableInstall Sui Binaries
Clone the Sui repository:
git clone https://github.com/MystenLabs/sui.git
cd suiSwitch to the stable branch:
git checkout -b stable origin/stableBuild the binaries:
cargo build --releaseAdd binaries to your PATH:
sudo mv ~/sui/target/release/sui* /usr/local/bin/Configure the Validator
Download the validator configuration template:
wget -O ~/sui/validator-template.yaml https://github.com/MystenLabs/sui/raw/main/crates/sui-config/data/validator-template.yamlEdit 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.blobGenerate validator keys:
sui keytool generate --key-file ~/sui/validator.keyInitialize validator configuration:
sui genesis --validator-template ~/sui/validator-template.yaml --working-dir ~/sui/data --validator-key ~/sui/validator.keyStart the Validator
Run the validator manually:
sui-node --config-path ~/sui/data/fullnode-template.yamlSet up a systemd service for automated startup:
sudo nano /etc/systemd/system/sui-validator.serviceAdd 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.targetEnable and start the service:
sudo systemctl enable sui-validator
sudo systemctl start sui-validatorJoin 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 -fUpdate the validator:
Stop the validator:
sudo systemctl stop sui-validatorUpdate 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