Sui
Instructions to set up your Sui node.
Requirements
- Setup your Axelar validator
- Minimum hardware requirements: CPUs: 8 physical cores / 16 vCPUs RAM: 128 GB Storage (SSD): 4 TB NVMe drive
- Ubuntu 22.04
- Official Documentation
Prerequisites
sudo apt-get install jq -y
Install Sui
Check the appropriate version for the network accordingly in their docs
# This is an example - check their docs and release page to opt for the right versionSUI_SHA=2aadf14aab3a5174d219131058e032533ab3bcd0
# verify correct versionecho SUI_SHA
# create a temp dir for binariescd $HOMEmkdir binaries && cd binaries
# if you are on linux amdwget https://releases.sui.io/$SUI_SHA/sui-node https://releases.sui.io/$SUI_SHA/suichmod +x *sudo mv * /usr/bin/# verify versionsui-node --versioncd $HOME
Download genesis and config files
https://github.com/MystenLabs/sui-genesis/raw/main/mainnet/genesis.blob wget-O fullnode.yamlhttps://raw.githubusercontent.com/MystenLabs/sui/main/crates/sui-config/data/fullnode-template.yamlls
Edit the fullnode.yaml file to include peer nodes for state synchronization. Append the following to the end of the current configuration
/dns/mel-00.mainnet.sui.io/udp/8084 peer-id:d32b55bdf1737ec415df8c88b3bf91e194b59ee3127e3f38ea46fd88ba2e7849 - address:/dns/ewr-00.mainnet.sui.io/udp/8084 peer-id:c7bf6cb93ca8fdda655c47ebb85ace28e6931464564332bf63e27e90199c50ee - address:/dns/ewr-01.mainnet.sui.io/udp/8084 peer-id:3227f8a05f0faa1a197c075d31135a366a1c6f3d4872cb8af66c14dea3e0eb66 - address:/dns/lhr-00.mainnet.sui.io/udp/8084 peer-id:c619a5e0f8f36eac45118c1f8bda28f0f508e2839042781f1d4a9818043f732c - address:/dns/sui-mainnet-ssfn-1.nodeinfra.com/udp/8084 peer-id:0c52ca8d2b9f51be4a50eb44ace863c05aadc940a7bd15d4d3f498deb81d7fc6 - address:/dns/sui-mainnet-ssfn-2.nodeinfra.com/udp/8084 peer-id:1dbc28c105aa7eb9d1d3ac07ae663ea638d91f2b99c076a52bbded296bd3ed5c - address:/dns/sui-mainnet-ssfn-ashburn-na.overclock.run/udp/8084 peer-id:5ff8461ab527a8f241767b268c7aaf24d0312c7b923913dd3c11ee67ef181e45 - address:/dns/sui-mainnet-ssfn-dallas-na.overclock.run/udp/8084 peer-id:e1a4f40d66f1c89559a195352ba9ff84aec28abab1d3aa1c491901a252acefa6 - address:/dns/ssn01.mainnet.sui.rpcpool.com/udp/8084 peer-id:fadb7ccb0b7fc99223419176e707f5122fef4ea686eb8e80d1778588bf5a0bcd - address:/dns/ssn02.mainnet.sui.rpcpool.com/udp/8084 peer-id:13783584a90025b87d4604f1991252221e5fd88cab40001642f4b00111ae9b7e
Setup systemd
Create the systemd service file /etc/systemd/system/sui.service
sudo tee /etc/systemd/system/suid.service &>/dev/null <<EOF[Unit]Description=Sui Node
[Service]User=$USERWorkingDirectory=/opt/sui/Environment=RUST_BACKTRACE=1Environment=RUST_LOG=info,sui_core=debug,narwhal=debug,narwhal-primary::helper=info,LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so,MALLOC_CONF=prof:true,prof_prefix:/opt/sui/jeprof/jeprof.out,lg_prof_interval:36ExecStart=/usr/bin/sui-node --config-path /opt/sui/config/fullnode.yamlRestart=alwaysRestartSec=10
[Install]WantedBy=multi-user.targetEOF
Start the service
sudo systemctl daemon-reloadsudo systemctl enable suidsudo systemctl restart suid
Check logs
# change log settings to persistent if not alreadysed -i 's/#Storage=auto/Storage=persistent/g' /etc/systemd/journald.confsudo systemctl restart systemd-journaldjournalctl -u suid.service -f -n 100 -o cat
Logs should appear like this
2024-05-13T15:42:10.253723Z INFO sui_core::authority::authority_store: Cur epoch: 02024-05-13T15:42:11.339716Z INFO AuthorityPerEpochStore::new{epoch=0}: sui_core::authority::authority_per_epoch_store: authenticator_state disabled2024-05-13T15:42:12.274692Z WARN anemo::network: msg="expected socket send buffer size to be at least 20971520, got 425984"2024-05-13T15:42:12.274704Z WARN anemo::network: msg="expected socket receive buffer size to be at least 20971520, got 425984"2024-05-13T15:42:12.274821Z INFO sui_node: P2p network started on 0.0.0.0:8080 server_name="sui-35834a8a"2024-05-13T15:42:12.274857Z INFO sui_network::discovery: Discovery started2024-05-13T15:42:12.274870Z INFO connection-manager{peer=b99cd7fa}: anemo::network::connection_manager: ConnectionManager started2024-05-13T15:42:12.274871Z INFO sui_network::state_sync: State-Synchronizer started2024-05-13T15:42:12.274899Z INFO sui_core::authority: current protocol version is now ProtocolVersion(4)2024-05-13T15:42:12.274903Z INFO sui_core::authority: supported versions are: SupportedProtocolVersions { min: ProtocolVersion(1), max: ProtocolVersion(44) }
Verify RPC
Once your sui
node is fully synced, you can run a cURL request to see the latest epoch on your node:
curl -H "Content-Type: application/json" -d '{ "jsonrpc": "2.0", "id": 1, "method": "suix_getLatestSuiSystemState", "params": []}' localhost:9000 | jq .result.epoch
Compare the epoch number with explorer
Configure vald
In order for vald
to connect to your node, your rpc_addr
should be exposed in
vald’s config.toml
start-with-bridge = true
start-with-bridge = true