Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upInstall RskJ Using Fat JAR
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.6.0-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.6.0-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!