Skip to content

catsmile100/Fullnode-SUI-Devnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 

Repository files navigation

Sui node devnet

Official documentation:

Minimum Hardware

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

Recommended Hardware

  • 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

Automatic

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

wget -O sui.sh https://raw.githubusercontent.com//catsmile100/Fullnode-SUI-Devnet/sui.sh && chmod +x sui.sh && ./sui.sh

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

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:

Generate wallet

echo -e "y\n\n0\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>
  1. Wait until bot sends tokens to your wallet

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

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

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

sui client gas

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].id.id)
SECOND_OBJECT_ID=$(echo $JSON | jq -r .[1].id.id)
sui client merge-coin --primary-coin ${FIRST_OBJECT_ID} --coin-to-merge ${SECOND_OBJECT_ID} --gas-budget 1000

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

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

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*

About

Instalation Fullnode SUI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages