"Sui" DevNet - Node Launch | Upgrade

   Original DOCS HERE

 
STEP BY STEP INSTRUCTIONS
 

sudo apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC sudo apt-get install -y --no-install-recommends tzdata git ca-certificates curl build-essential libssl-dev pkg-config libclang-dev cmake jq

sudo curl https://sh.rustup.rs -sSf | sh

source $HOME/.cargo/env

cd $HOME; mkdir -p $HOME/sui-node/suidb

#I suggest to do everything in screen session because long compiling..
#While compiling U can exit from screen CTRL+A+D, after some time get back to session screen -r sui

screen -S sui

git clone https://github.com/MystenLabs/sui.git
cd $HOME/sui
git remote add upstream https://github.com/MystenLabs/sui
git fetch upstream; git checkout --track upstream/devnet
cargo build --release 

sudo cp $HOME/sui/target/release/{sui,sui-node} /usr/local/bin/
 
#template of "fullnode.yaml" file  U can find at ~/sui/crates/sui-config/data/fullnode-template.yaml
#but we just create ready to go file by command below 

tee $HOME/sui-node/fullnode.yaml << EOF
#Database path
db-path: "$HOME/sui-node/suidb"
#Port set(default)
network-address: "/dns/localhost/tcp/8080/http"
metrics-address: "0.0.0.0:9184"
json-rpc-address: "0.0.0.0:9000"
websocket-address: "0.0.0.0:9001"
enable-event-processing: true
#Genesis path
genesis:
 genesis-file-location: "$HOME/sui-node/genesis.blob"
#pruning config
authority-store-pruning-config:
 objects-num-latest-versions-to-retain: 5
 objects-pruning-period-secs: 86400
 objects-pruning-initial-delay-secs: 3600
 num-latest-epoch-dbs-to-retain: 3
 epoch-db-pruning-period-secs: 3600
EOF


wget -O $HOME/sui-node/genesis.blob https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob

sudo tee /etc/systemd/system/suid.service << EOF
[Unit]
Description=Sui Node
After=network.target
#
[Service]
User=$USER
Type=simple
ExecStart=$(which sui-node) --config-path $HOME/sui-node/fullnode.yaml
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
#
[Install]
WantedBy=multi-user.target
EOF


sudo systemctl daemon-reload
sudo systemctl enable suid.service 
sudo systemctl restart suid.service
sudo journalctl -u suid.service -f -o cat
 

You can check your node status HERE but please make sure you entered your server IP. 

NODE UPGRADE

#I suggest to do everything in screen session because long compiling..
#While compiling U can exit from screen CTRL+A+D, after some time get back to session screen -r sui

screen -S sui

#database reset
sudo systemctl stop suid
rm -rf $HOME/sui-node/suidb/* $HOME/sui-node/genesis.blob 

#version upgrade 
source $HOME/.cargo/env
cd $HOME/sui
git fetch upstream
git checkout -B devnet --track upstream/devnet
cargo build --release --bin sui-node

sudo cp $HOME/sui/target/release/sui-node /usr/local/bin/
wget -O $HOME/sui-node/genesis.blob https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob
sudo systemctl restart suid.service
sudo journalctl -u suid.service -f -o cat
 

GOOD LUCK!

AM Solutions © Copyright. All rights reserved.

We need your consent to load the translations

We use a third-party service to translate the website content that may collect data about your activity. Please review the details and accept the service to view the translations.