Here you have the steps to compile and run an RSK node on Mac.
This page is organized in this way:
First of all, you will need to install:
|Git for Mac||Download this Git command line tool|
|Java 8 JDK||Follow the steps to install Java. To check if installation went correctly, check the version with command:
|IntelliJ IDEA Community||Install this Java IDE|
To complete Java installation you need to configure the
JAVA_HOME environment variable.
You have to run the following commands on terminal:
➜ /usr/libexec/java_home ➜ export JAVA_HOME=`/usr/libexec/java_home` ➜ launchctl setenv JAVA_HOME `/usr/libexec/java_home`
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/PAPYRUS-2.0.1 -b PAPYRUS-2.0.1
Note: It is better to download the code into a short path.
Ensure the security chain of the downloaded source code.
Before you can launch IntelliJ IDEA, there is an important step.
Browse in your RskJ cloned directory and then launch
configure.sh with the following terminal command:
This will download and set important components (e.g. Gradle Wrapper).
Now, you can launch IntelliJ IDEA. When IntelliJ IDEA is launched you should have a window with different choices.
rskj\build.gradleand select it. Click NEXT.
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:
Default (1.8 - SDK of 'rsk-core_main' module)
We are ready to run the node using IDEA, just press the Start (green arrow) 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:
Inside the field
Program arguments in your run configuration.
We hope our troubleshooting section can help you!
Go to top