Ganache local network runs like what RSK calls autominer mode
, it:
To configure the node, we are going to:
--regtest
modeThe configuration we need to use is:
miner.client.autoMine = true
Create a autominer.conf
file in the root of the repo (or other dir., remember to use the correct path afterwards)
This option can be activated when using the node in different modes
On top of the default configuration (Java version and main class), we will need to add
--regtest
and optionally --reset
for database reset on restart-Drsk.conf.file=./autominer.conf
(or the path you chose)It should look like this:
To setup autominer on CLI, use the command below;
Use this if you are running with JAR.
java -cp rskj-core-4.1.0-HOP-all.jar -Drsk.conf.file=./autominer.conf co.rsk.Start --regtest --reset
Now you have an RSK node running locally! It will create blocks only for new transactions, or arbitrarily by using the evm_mine
RPC call.
See gif image below for example on how to do this;
Go to top