Install RskJ Using Fat JAR

Alejandro Cavallero edited this page Oct 10, 2018 · 12 revisions

Following the instructions below you will install and run the RSK node. By default, the node connects to MainNet. If you want to change the network read this section.

Install the node using RskJ Fat (or Uber) JAR

The Fat JAR or Uber JAR can be downloaded or compiled (in a reproducible way or not).

Once you have the JAR, you should install Java 8 JDK.

To run the node:

$ java -cp <PATH-TO-THE-RSKJ-FATJAR> co.rsk.Start 

Replace <PATH-TO-THE-RSKJ-FATJAR> with your path to the jar file. As an example: C:/RskjCode/rskj-core-0.5.2-ORCHID-all.jar

Check everything's working with an RPC call

If you see no output, then it means the node is running. To check, you can open a new console tab (it's important you don't close this one or interrupt the process) and issue a request to the node's RPC HTTP server. This is an example using cURL:

$ curl localhost:4444 -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

The response should be something like {"jsonrpc":"2.0","id":1,"result":"0xfc0"}, where the result property is the number of the latest block you've synced so far (in hexadecimal).

Switching networks

If you want to change the network use these commands:

  • MainNet: java -cp <PATH-TO-THE-RSKJ-FATJAR> co.rsk.Start
  • TestNet: java -cp <PATH-TO-THE-RSKJ-FATJAR> co.rsk.Start --testnet
  • RegTest: java -cp <PATH-TO-THE-RSKJ-FATJAR> co.rsk.Start --regtest

Replace <PATH-TO-THE-RSKJ-FATJAR> with your path to the jar file. As an example: C:/RskjCode/rskj-core-0.5.2-ORCHID-all.jar

If you want to change some configuration, please refer to our RSK node configuration section.

Any problems?

We hope our Troubleshooting section can help you!

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.