AnswerBun.com

How to build Merkle root from merkle branches?

Bitcoin Asked on December 4, 2021

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"}

One Answer

This would indicate an empty block (no transactions). So only coinbase should be used to construct merkle root. So merkle root = Coinbase

Example block: https://www.blockchain.com/btc/block-index/512049/00000000000000000429a0c4fbe735b2d8b493daedf0207728543f748c262437

(edit: but please verify with others)

Answered by Fraggle on December 4, 2021

Add your own answers!

Related Questions

Name of attack where you pay a high fee to block others

2  Asked on October 24, 2021 by m-johnson

 

Configure Bitcoin full node in my local LAN

1  Asked on October 24, 2021 by miltonc

 

missing transaction not received

2  Asked on October 24, 2021 by n-w

 

I received an email that says someone sent me bitcoin

2  Asked on October 24, 2021 by user107566

 

OP_LSHIFT & OP_RSHIFT purpose & functionality

1  Asked on October 24, 2021 by bhala-t-r

 

What is proof-of-work?

3  Asked on October 24, 2021 by dr-haribo

     

How do I get hash to verify transaction?

1  Asked on October 24, 2021 by kriley

     

Blockchain API whitelist all IP addresses

1  Asked on October 24, 2021 by samuel-ralak

     

Error on Centos Minergate Installation

0  Asked on October 24, 2021 by centosminer

   

bitcoin-cli “Could not connect to the server”

1  Asked on October 24, 2021 by user97315

 

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir