Time to read: 1 min
Implementation Guide
Here are the steps needed to add Rootstock (RSK) merged mining capabilities to mining pool software.
What do you need to do
Add the Rootstock merged mining information in Bitcoin block as a commitment, the complete steps are as follows:
1. Get the work from Rootstock node
Use the mnr_getWork method from the Rootstock node's JSON-RPC API. This method returns the information of the current block for merged mining, the boundary condition to be met ("target"), and some other data.
2. Put the information for merged mining in the Bitcoin block
Format
OP_RETURN + Length + RSKBLOCK: + RskBlockInfo
OP_RETURN:is0x6aLengthis0x29and represents the length of the information included after theOP_RETURNopcodeRSKBLOCK:is the ASCII string for0x52534b424c4f434b3aRskBlockInfois the block information in binary format.
For example, if RskBlockInfo is e5aad3b6b9dc71a3eb98a069bd29ca32211aee8b03fd462f4ffbbe97cc75a174
the merged mining information is 6a2952534b424c4f434b3ae5aad3b6b9dc71a3eb98a069bd29ca32211aee8b03fd462f4ffbbe97cc75a174