Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I verify the version of RSK running on a node?

Tags:

rpc

rsk

I have RPC access to a private deployment of an RSK node, but no direct access to the file system. How can I check what version of the RSK node is running on that system?

like image 909
serlokiyo Avatar asked Aug 30 '21 12:08

serlokiyo


1 Answers

Without direct access to the file system, you cannot verify the version of RSKj (the RSK node implementation) that is running on that machine. However, you can check the version that it claims to be running, using an RPC request: web3_clientVersion.

For example, using the public public node:

curl \
  -X POST \
  -H "Content-Type:application/json" \
  --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' \
  https://public-node.rsk.co/

(replace https://public-node.rsk.co/ with the RPC endpoint URL of your target deployment.)

This should output the following:

{"jsonrpc":"2.0","id":1,"result":"RskJ/3.0.0/Linux/Java1.8/IRIS-ba01ea2"}

You can then view RSKj's tagged releases on the RSKj github repo. For example, the above output corresponds to https://github.com/rsksmart/rskj/releases/tag/IRIS-3.0.0


Note that if you see the following output:

{"jsonrpc":"2.0","id":1,"result":"RskJ/2.2.0/Linux/Java1.8/PAPYRUS-dev"}

That means you are still running an older version of the RSK node, and prior to the Iris consensus changes, and you should upgrade to the latest version and re-sync your blocks!

like image 63
bguiz Avatar answered Oct 17 '22 07:10

bguiz