-
Notifications
You must be signed in to change notification settings - Fork 268
RSK node on Windows
Here you have the steps to compile and run an RSK node on Windows.
This page is organized in this way:
First of all, you will need to install:
| Dependency | Link | Details |
|---|---|---|
| Git for Windows | Git | Command line tool |
| Java JDK 8 | Java 8 JDK | JAVA_HOME variable needs to be set. |
| IntelliJ IDEA | IntelliJ IDEA | Java IDE |
Using the installed command-line tool Git, you need to retrieve (or clone) the RskJ Github source code from here.
Run these commands on Git command line:
git clone --recursive https://github.com/rsksmart/rskj.git
cd rskj
git checkout tags/ORCHID-0.5.2 -b master
Note: it is better to download the code into a short path, like C:/RskjCode.
Ensure the security chain of the downloaded source code as explained here. Use Git Bash to run the commands on Windows.
Now, you have to double click over the configure.sh file located in rskj/ folder. It will install dependencies that the project need to compile, running over Git Bash (installed with Git for Windows -see Pre-requisites-).
After opening IDEA we need to load the RskJ project, this can be done by using the Import project option in IDEA.
To do that follow the next steps:
- Go to File -> New -> Project from Existing Sources...
- Browse in the RskJ downloaded code the file
rskj\build.gradleand select it. - Within the dialog select Use default gradle wrapper and then press Finish.

We need to create a new configuration profile to run the node from IDEA. That can be done by clicking on Run -> Edit Configurations or as shown in the following picture:

Then set the options as shown below:

- Main Class:
co.rsk.Start - Working directory:
/path/to/code/rskJ - Use classpath of module:
rskj-core_main - JRE need to be set as:
Default (1.8 - SDK of 'rsk-core_main' module)
Note:
- If it isn't configured the default JDK, you have to set it in: File -> Project Structure.
- If the IDE doesn't recognize the configuration options, open
rskj/rskj-core/build.gradleand sync it fromGradletab.
We are ready to run the node using IDEA, just press the Start button at the right of the configuration we've just created.

If everything is OK you should see the debug information like that:

And yes! Congratulations! Now you're running a local RSK node :)
You're joined to MainNet by default.
If you want to switch the network, add:
- For TestNet:
-Dblockchain.config.name=testnet - For RegTest:
-Dblockchain.config.name=regtest
Inside the field VM options in your run configuration.
We hope our Troubleshooting section can help you!