Photo by Esther Jiao on Unsplash

Analyzing RSK Blocks: Miners

Some months ago, I wrote about Command Line Tools for RSK Node; now those tools are included in the latest RSKJ release (under the package with name

Using a local testnet database, I exported 5000 blocks with the command:

These days, I wrote new commands in JavaScript to analyze that info, specially to obtain the blocks mined by each miner account.

Counting the Blocks

Using count.js, I executed:

The output was:

It’s interesting to see that the number of uncles included into a BLOCK that belongs to the same miner that the one that builds the block, it’s only around 2/3, so each miner uses the blocks received from other miners.

Blocks by Miner

Using miners.js, I executed:

the output was:

There are only two miners in RSK testnet. More interesting result could be obtained from mainnet block ranges.

Blocks and Uncles by Miner

I also wrote minersu.js and executed:

This time not only the blocks were processed but also their uncles. The result was:

Pending Work

The minersu.js command was written thinking on processing NOT only the blocks that were included into the main chain, but also siblings (avoiding to count repeated uncles more than once). I should modify the export blocks commands to export the known siblings in the working database (it could vary from node to node). Now, that command line tools only exports the blocks included in the mainchain.

I want to add also more analysis, ie, the works executed by federated accounts (ie which one sends more transaction and info, etc)

Angel “Java” Lopez