Skip to content

Latest commit

 

History

History

sui

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Visit our website Join our discord Visit our website

Deploy your VPS using our referral link to get 20€ bonus

Sui node setup for devnet

Official documentation:

Minimum hardware requirements

  • CPU: 2 CPU
  • Memory: 4 GB RAM
  • Disk: 50 GB SSD Storage

Recommended hardware requirements

  • CPU: 2 CPU
  • Memory: 8 GB RAM
  • Disk: 50 GB SSD Storage

Storage requirements will vary based on various factors (age of the chain, transaction rate, etc) although we don't anticipate running a fullnode on devnet will require more than 50 GBs today given it is reset upon each release roughly every two weeks.

Set up your Sui full node

Option 1 (automatic)

You can setup your Sui full node in minutes by using automated script below

wget -O sui.sh https://raw.githubusercontent.com/kj89/testnet_manuals/main/sui/sui.sh && chmod +x sui.sh && ./sui.sh

Option 2 (manual)

You can follow manual guide if you better prefer setting up node manually

Make tests

Once the fullnode is up and running, test some of the JSON-RPC interfaces.

Check status of your node

curl -s -X POST http://127.0.0.1:9000 -H 'Content-Type: application/json' -d '{ "jsonrpc":"2.0", "method":"rpc.discover","id":1}' | jq .result.info

You should see something similar in the output:

{
  "title": "Sui JSON-RPC",
  "description": "Sui JSON-RPC API for interaction with the Sui network gateway.",
  "contact": {
    "name": "Mysten Labs",
    "url": "https://mystenlabs.com",
    "email": "[email protected]"
  },
  "license": {
    "name": "Apache-2.0",
    "url": "https://raw.githubusercontent.com/MystenLabs/sui/main/LICENSE"
  },
  "version": "0.1.0"
}

Get the five most recent transactions

curl --location --request POST 'http://127.0.0.1:9000/' --header 'Content-Type: application/json' \
--data-raw '{ "jsonrpc":"2.0", "id":1, "method":"sui_getRecentTransactions", "params":[5] }' | jq .

Get details about a specific transaction

curl --location --request POST 'http://127.0.0.1:9000/' --header 'Content-Type: application/json' \
--data-raw '{ "jsonrpc":"2.0", "id":1, "method":"sui_getTransaction", "params":["<RECENT_TXN_FROM_ABOVE>"] }' | jq .

Post installation

After setting up your Sui node you have to register it in the Sui Discord:

  1. navigate to #📋node-ip-application channel
  2. post your node endpoint url
http://<YOUR_NODE_IP>:9000/

Check your node health status

Enter your node IP into https://node.sui.zvalid.com/

Healthy node should look like this:

image

Generate wallet

echo -e "y\n" | sui client

!Please backup your wallet key files located in $HOME/.sui/sui_config/ directory!

Top up your wallet

  1. Get your wallet address:
sui client active-address
  1. Navigate to Sui Discord #devnet-faucet channel and top up your wallet
!faucet <YOUR_WALLET_ADDRESS>

image

  1. Wait until bot sends tokens to your wallet

image

  1. You can check your balance at https://explorer.devnet.sui.io/addresses/<YOUR_WALLET_ADDRESS>

image

  1. If you expand Coins than you can find that your wallet contains 5 unique objects with 50000 token balances

image image

Also you can get list of objects in your console by using command

sui client gas

image

Operations with objects

Now lets do some operations with objects

Merge two objects into one

JSON=$(sui client gas --json | jq -r)
FIRST_OBJECT_ID=$(echo $JSON | jq -r .[0].info.id)
SECOND_OBJECT_ID=$(echo $JSON | jq -r .[1].info.id)
sui client merge-coin --primary-coin ${FIRST_OBJECT_ID} --coin-to-merge ${SECOND_OBJECT_ID} --gas-budget 1000

You should see output like this:

----- Certificate ----
Transaction Hash: t3BscscUH2tMnMRfzYyc4Nr9HZ65nXuaL87BicUwXVo=
Transaction Signature: OCIYOWRPLSwpLG0bAmDTMixvE3IcyJgcRM5TEXJAOWvDv1xDmPxm99qQEJJQb0iwCgEfDBl74Q3XI6yD+AK7BQ==@U6zbX7hNmQ0SeZMheEKgPQVGVmdE5ikRQZIeDKFXwt8=
Signed Authorities Bitmap: RoaringBitmap<[0, 2, 3]>
Transaction Kind : Call
Package ID : 0x2
Module : coin
Function : join
Arguments : ["0x530720be83c5e8dffde5f602d2f36e467a24f6de", "0xb66106ac8bc9bf8ec58a5949da934febc6d7837c"]
Type Arguments : ["0x2::sui::SUI"]
----- Merge Coin Results ----
Updated Coin : Coin { id: 0x530720be83c5e8dffde5f602d2f36e467a24f6de, value: 100000 }
Updated Gas : Coin { id: 0xc0a3fa96f8e52395fa659756a6821c209428b3d9, value: 49560 }

Lets yet again check list of objects

sui client gas

We can see that two first objects are now merged into one and gas has been payed by third object

image

This is only one example of transactions that can be made at the moment. Other examples can be found at the official website

Usefull commands for sui fullnode

Check sui node status

systemctl status suid

Check node logs

journalctl -fu suid -o cat

Check sui client version

sui --version

Update sui version

wget -qO update.sh https://raw.githubusercontent.com/kj89/testnet_manuals/main/sui/tools/update.sh && chmod +x update.sh && ./update.sh

Recover your keys

Copy your keys into $HOME/.sui/sui_config/ directory and restart the node

Delete your node

systemctl stop suid
systemctl disable suid
rm -rf $HOME/.sui /usr/local/bin/sui*