5

Is there any help/tutorial on how to build the Merkle root from stratum data?

The Slushpool's stratum protocol has an example of a mining job but it does not contain any Merkle branches and I don't know if I am generating the Merkle root correctly.

Here is the string from Slushpool:

{"params": ["bf", "4d16b6f85af6e2198f44ae2a6de67f78487ae5611b77c6c0440b921e00000000",
"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff20020862062f503253482f04b8864e5008",
"072f736c7573682f000000000100f2052a010000001976a914d23fcdf86f7e756a64a7a9688ef9903327048ed988ac00000000", [],
"00000002", "1c2ac4af", "504e86b9", false], "id": null, "method": "mining.notify"}

1 Answer 1

1

This would indicate an empty block (no transactions). So only the coinbase transaction should be used to construct merkle root. In that case, the merkle root is the coinbase transaction’s hash.

For example block 512,048 was an empty block, and you can see that the coinbase transaction hash and Merkle root are the same:

Example of a block’s details showing that coinbase transaction hash and Merkle root are identical

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.