Giter Club home page Giter Club logo

sui's Introduction

SUI

  • The instructions are how to setup a dev node.
  • Most people out there are abusing the faucet.
Instance Resouces:
  • EC2 Instance (ap-southeast-1)

Screenshot 2023-04-05 at 23 34 18

Screenshot 2023-04-05 at 23 34 27

Screenshot 2023-04-05 at 23 34 44

Connection:

chmod 400 SUI.pem

ssh -i "SUI.pem" [email protected]

sudo su # always run as sudo user #root

Prep:

sudo apt update && sudo apt upgrade -y

sudo apt install wget jq git libclang-dev cmake -y

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Type "1" and click enter.

source "$HOME/.cargo/env"

rustc --version

Installation:

mkdir $HOME/.sui

git clone https://github.com/MystenLabs/sui.git --branch devnet

cd sui

cargo build --release

Debug Code:

version=`wget -qO- https://api.github.com/repos/SecorD0/Sui/releases/latest | jq -r ".tag_name"`;\

wget -qO- "https://github.com/SecorD0/Sui/releases/download/${version}/sui-linux-amd64-${version}.tar.gz" | tar -C /usr/bin/ -xzf -
If the last action failed and filed already exists:
rm -rf sui sui-faucet sui-node sui-indexer

Be extract careful when executing...

mv $HOME/sui/target/release/{sui,sui-node,sui-faucet} /usr/bin/

cd && wget -qO $HOME/.sui/genesis.blob https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob

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

sed -i -e "s%db-path:.*%db-path: \"$HOME/.sui/db\"%; "\
"s%metrics-address:.*%metrics-address: \"0.0.0.0:9184\"%; "\
"s%json-rpc-address:.*%json-rpc-address: \"0.0.0.0:9000\"%; "\ 
"s%genesis-file-location:.*%genesis-file-location: \"$HOME/.sui/genesis.blob\"%; " $HOME/.sui/fullnode.yaml

sudo ufw allow 9000 && sudo ufw allow 9184
printf "[Unit]
Description=Sui node
After=network-online.target

[Service]
User=$USER
ExecStart=`which sui-node` --config-path $HOME/.sui/fullnode.yaml
Restart=on-failure RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target" > /etc/systemd/system/suid.service
sudo systemctl daemon-reload
sudo systemctl enable suid
sudo systemctl restart suid && journalctl -u suid -f

Done!, Visit:

https://node.sui.zvalid.com

How to update the node:

systemctl stop suid

rm -rf $HOME/.sui/db

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

cd $HOME/sui

git fetch upstream

cargo build --release

mv $HOME/sui/target/release/{sui,sui-node,sui-faucet} /usr/bin/

sui -V

systemctl restart suid

sui's People

Contributors

vimoppa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.