-
Notifications
You must be signed in to change notification settings - Fork 267
Install 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.
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.4.3-BAMBOO-all.jar
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).
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.4.3-BAMBOO-all.jar
If you want to change some configuration, please refer to our RSK node configuration section.
We hope our Troubleshooting section can help you!