Skip to content

Command Line Interface

Getting Started

Once SASEUL is installed on your node machine, the node is now ready to run. You can execute various predefined SASEUL commands on cli to directly operate your SASEUL node.

You can execute SASEUL commands like below.

  1. For docker installed nodes,

    Terminal window
    docker exec -i saseul-node saseul-script {commandName}
  2. For source code installed nodes, move to the path below.

    Terminal window
    cd <Path to source code>
    ./src/saseul-script

Basic Operation

Log

  • Display debug logs

Usage: : $ saseul-script Log : $ saseul-script Log —count 10

OptionTypeDescription
-n —countint (count)Number of lines of logs to output (0: all)
-c —clearClears all logs.
-f —followOutput appended logs as the file grows
-h —helphelp

Start

  • Start the node.
  • However, mining does not start automatically.

Usage: : $ saseul-script Start


Stop

  • Stop the node.
  • If the stop command fails, the process will be killed.

Usage: : $ saseul-script Stop


Restart

  • Restart the node.
  • Execute the Start command followed by the Stop command in sequence.

Usage: : $ saseul-script Restart


Kill

  • Kill all running processes.

Usage: : $ saseul-script Kill


StartMining

  • Starts the mining process.
  • It only works when the saseul process is running.

Usage: : $ saseul-script StartMining


StopMining

  • Stops the mining process.
  • It only works when the saseul process is running.

Usage: : $ saseul-script StopMining


Info

  • Display current status information of the node.

Usage: : $ saseul-script Info


Setup Operation

SetEnv

  • Set the env information of the node.
  • You can configure node information, peer information, miner address, and node endpoint.

Usage: : $ saseul-script SetEnv : $ saseul-script SetEnv —miner

OptionTypeDescription
-a —allSet all env information.
-n —nodestring Set node key
-p —peerstring Set peer key
-m —minerstring
Set miner address
-e —endpointstring host:portSet endpoint ("": reset)
-h —helphelp

GetEnv

  • Display all env information of the node.
  • You can check the node information, peer information, miner address, and node endpoint.

Usage: : $ saseul-script SetEnv : $ saseul-script SetEnv —miner

OptionTypeDescription
-a —allDisplay all information
-n —node(null, private_key, public_key, address)Display node information
-p —peer(null, private_key, public_key, address)Display peer information
-m —minerDisplay miner address
-e —endpointDisplay endpoint
-h —helphelp

Tracker Operation

AddTracker

  • Adding a tracker to the peer-to-peer search algorithm.
  • If the node is running, peers will typically connect within about 2-3 minutes on average.

Usage: : $ saseul-script AddTracker —peer


ResetTracker

  • Deletes all tracker information.
  • The peer information is reset to main.saseul.net, aroma.saseul.net, and blanc.saseul.net.

Usage: : $ saseul-script ResetTracker


Peer

  • Display peer information.
  • Peers containing the node’s data are connected as “Peer”
  • Peers not containing the node’s data are connected as “Known Hosts”
  • Unreachable peers are not displayed.

Usage: : $ saseul-script Peer


Data Operation

Reset

  • Delete all data.
  • Tracker data and environment information data will not be deleted.

Usage: : $ saseul-script Reset


ForceSync

  • Synchronize blocks quickly from a specific peer.
  • The data consistency check is performed after synchronization, so if a malicious node synchronizes, the node can be forked from the network.

Usage: : $ saseul-script ForceSync —peer


RestoreBlock

  • Delete some of the latest blocks and resynchronize.
  • Deletes the specified number of Resource Blocks and also the Main Blocks recorded in the Resource Blocks.
  • This is a feature used to recover block data in case the network is forked.

Usage: : $ saseul-script RestoreBlock —count


RewindBlock

  • Delete unfinalized resource blocks and resynchronize.
  • This is a function used when there is an error in the consistency of the latest block data.

Usage: : $ saseul-script RewindBlock —count


Rebundling

  • Recomputes the status data based on block information.
  • This is a function used when there is an error in the consistency of the latest block data.

Usage: : $ saseul-script Rebundling


Smart Contracts and Requests

SendTransaction

  • Execute the method of the smart contract to create a transaction and broadcast it.

Usage: : $ saseul-script SendTransaction : $ saseul-script SendTransaction —method Send —data ’{“to”:"

",“amount”:“1000000”}‘

OptionTypeDescription
-c —cidstring Enter the contract ID to call.
-m —methodstring Enter the name of the method to be called.
-k —keystring Enter the private key to sign the transaction (Optional)
-d —datastring Enter transaction data (JSON Format)
-h —helphelp

LocalRequest

  • Execute the method of a smart contract based on data stored in the current node, and display the information

Usage: : $ saseul-script LocalRequest : $ saseul-script LocalRequest —method GetBalance —data ’{“address”:"

"}‘

OptionTypeDescription
-c —cidstring Enter the contract ID to call.
-m —methodstring Enter the name of the method to be called.
-k —keystring Enter the private key to sign the request (Optional)
-d —datastring Enter request data (JSON Format)
-h —helphelp