Inside RSK Java implementation: the project

In this year, thanks to my job at RSK as software developer, I have had the opportunity to give talks presenting the rskj project to other software developers. Although it is a project with many interesting details to comment, I can begin to gradually publish some of the topics that I have discussed.

First, the repository is at this link. It is a Java project to compile using JDK 1.8. It can be compiled from the command line or from an IDE (I use IntelliJ Community Edition). It’s a gradle-based project. The project is the implementation of an Ethereum-like client (I prefer to call it “a node”, instead of a “client”).

A good thing that appeals to my simplicity taste: it is only ONE project. I have come across developments that when opened contain more than a dozen projects (without exaggeration). In this case it is like other Ethereum and Bitcoin implementations: one project is enough.

One nuance is that you cannot compile or open as is. FIRST you must run a command:


The command completes the project, and it is compatible with Windows (I run the above command using git bash). If you miss this step, you cannot compile or open the project.

Then, you can compile the project from the command line using:

./gradlew build -x test

The result (in .jar files) will be at rskj-core/build/libs folder.

As usual, you can find more and detailed info at RSK Developers Portal.

The packages

The project was born, at the end of 2015, as a fork of EthereumJ (now deprecated project). There are still packages and classes in the org.ethereum packages:

Some packages are under org.ethereum

But along the years, new functionality was added to the co.rsk package:

New functionality

Some notable packages:

  • peg package, containing the implementation of the 2-way peg with Bitcoin, having a precompiled contract called the Bridge
  • remasc package: the implementation of the miner and other participants main reward algorithm, with a precompiled contrat in Remasc
  • mine package: with the merge mining logic, having a MinerServer that builds new blocks that are provided to an external miner (usually a mining pool). But also with a MinerClient that can be used as the local miner
  • config package: with many classes containing configuration options for the bridge, miner, remasc, virtual machine, etc

There are many interesting topics to visit, maybe a lot. In the next post I will start commenting the core entities, like blocks, transactions, transaction receipts, accounts.

Related posts:

Angel “Java” Lopez