Cover photo

Hướng dẫn chạy fullnode trên Sui Testnet

✅ SUI gần đây đã công bố Testnet Wave 2 và tất cả mọi người đều có thể chạy Fullnode trên Testnet.

‼️ LƯU Ý: Chưa có xác nhận rằng Node runner sẽ được nhận bất cứ phần thưởng nào trong tương lai.

📌Cấu hình phần cứng được gợi ý để chạy Fullnode Sui Testnet:

  • CPUs: 10 core

  • RAM: 32 GB

  • Storage (SSD): 1 TB

‼️ Hướng dẫn đăng ký và thuê VPS chạy node có thể xem Tại đây

✅Các bước cài đặt

  • Kiểm tra và cài đặt các gói update cho VPS

sudo apt update && sudo apt upgrade -y

post image
sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends \
tzdata \
ca-certificates \
build-essential \
libssl-dev \
libclang-dev \
pkg-config \
openssl \
protobuf-compiler \
cmake
post image
  • Cài đặt và kiểm tra Rust version

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

    source $HOME/.cargo/env

    rustc --version

post image
  • Cài đặt git

    apt install git

post image
  • Mở firewall cho các port dịch vụ cần thiết

sudo ufw allow 8080
sudo ufw allow 8084
sudo ufw allow 9000
sudo ufw allow 9001
sudo ufw allow 9184
sudo ufw allow 9100
post image
  • Cài đặt lần lượt

    !! Việc cài đặt có thể diễn ra khá lâu , tùy thuộc tốc độ phần cứng VPS của bạn

    cd $HOME

    git clone https://github.com/MystenLabs/sui.git

    cd sui

    git remote add upstream https://github.com/MystenLabs/sui

    git fetch upstream

    git checkout -B testnet --track upstream/testnet

  • Download genesis file

    mkdir $HOME/.sui

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

post image
  • Copy fullnode.yaml và update đường dẫn tới DB và genesis file

    cp $HOME/sui/crates/sui-config/data/fullnode-template.yaml $HOME/.sui/fullnode.yaml

    sed -i.bak "s|db-path:.|db-path: "$HOME/.sui/db"| ; s|genesis-file-location:.|genesis-file-location: "$HOME/.sui/genesis.blob"| ; s|127.0.0.1|0.0.0.0|" $HOME/.sui/fullnode.yaml

  • Add thêm peer cho fullnode

    sudo tee -a $HOME/.sui/fullnode.yaml  >/dev/null <<EOF
    
    p2p-config:
      seed-peers:
       - address: "/ip4/65.109.32.171/udp/8084"
       - address: "/ip4/65.108.44.149/udp/8084"
       - address: "/ip4/95.214.54.28/udp/8080"
       - address: "/ip4/136.243.40.38/udp/8080"
       - address: "/ip4/84.46.255.11/udp/8084"
       - address: "/ip4/135.181.6.243/udp/8088"
    EOF
    
post image
  • Cài đặt các gói SUI binaries và kiểm tra lại Fullnode version

    cargo build --release --bin sui-node

post image

mv ~/sui/target/release/sui-node /usr/local/bin/

sui-node -V

post image
  • Tạo Suid service (copy toàn bộ)

    echo "[Unit]
    Description=Sui Node
    After=network.target
    
    [Service]
    User=$USER
    Type=simple
    ExecStart=/usr/local/bin/sui-node --config-path $HOME/.sui/fullnode.yaml
    Restart=on-failure
    LimitNOFILE=65535
    
    [Install]
    WantedBy=multi-user.target" > $HOME/suid.service
    
    mv $HOME/suid.service /etc/systemd/system/
    
    sudo tee <<EOF >/dev/null /etc/systemd/journald.conf
    Storage=persistent
    EOF
    
  • Chạy node

    sudo systemctl restart systemd-journald

    sudo systemctl daemon-reload

    sudo systemctl enable suid

    sudo systemctl restart suid

  • Tạo cửa sổ check logs

    apt-get install screen

    screen -S sui_node

    journalctl -u suid -f

post image
post image

🌐Sui explorer

post image

Subsribe và theo dõi nhiều hơn tại FFcrypto team