Blockchain By Example
上QQ阅读APP看书,第一时间看更新

Rootstock setup

To get started, we first need to install  RskJ (a Java implementation of the RSK protocol).  The setup process is quite straightforward, and uses the following commands:

sudo add-apt-repository ppa:rsksmart/rskj
sudo apt-get update
sudo apt-get install rskj

Once installation finishes, a configuration wizard will prompt you to select your network. Let's choose testnet:

To reconfigure your node once installed, you need to change the configuration files that are located in /etc/rsk/. Firstly, in node.conf, you have to enable account creation by adding  enabled = true  inside the wallet configuration section:

wallet {
accounts = []
enabled = true
}

Secondly, change the CORS parameter from  cors = "localhost"  to  cors = "*".

We also enable the prune service by setting the parameter enabled = true in the prune section.