Commands for RNode

Commands for calling rnode

Available shell commands

With RNode running, use --help to see available commands and subcommands.

Calling the API

The RNode API is a server side API. To access the local RNode server once you have RNode running, open a new window and invoke the RNode api with:

rnode <API call>

Calling the API from a remote server

You can call the API of a remote RNode server by specifying the host server and host server port.

Argument Format
Host ServerThe IP address of the server that will receive the call--grpc-host100.10.25.75
Host Server portThe port for the gRPC API on the server listening for calls--grpc-port40401

This is an example of an API call to a remote server

./bin/rnode --grpc-host IP.Address.of.server --grpc-port 40401 repl

Find your node address, version, and peer count

You can ask RNode to provide its status to report the RNode address, version, and peer count.

curl -s http://localhost:40403/status

Report status in Docker

sudo docker exec -ti <containername> curl -s http://localhost:40403/status

Example of a status request response

{"address":"rnode://4fa269b79e781af2c079713772cfc5dbd7dc1569@","version":"RChain Node 0.9.4.git8a4c9939 (8a4c99394c3a22831c2eadef7cdde7dec35238d7)","peers":7,"nodes":44}

RNode offers two types of counts of peers. peers are the number of nodes you are connected to via the Kademlia protocol and the ones that are able to pass messages such as blocks. nodes are the number of nodes found as part of node discovery.

Get a count of blocks in the DAG

Use this command to show the number of blocks in the DAG according to your node.

Report status in Docker

rnode show-blocks

Get a count of blocks in Docker

Report status in Docker

docker run -it --rm --network-id rnode-net --name rnode -v $HOME/var/rholang:/var/ rchain/rnode:latest --grpc-host rnode2 show-blocks

Generate a public/private key set

You can use the RNode software to generate either a secp256k1 public/private key set to use when deploying Rholang or in other scenarios where providing keys is a requirement. With the release of RNode v0.9.7 the platform uses the secp256k1 algorithm.

rnode keygen --algorithm secp256k1 --private-key-path <arg>

Edit this page on GitHub