Bitcoin Forum
April 21, 2018, 04:38:08 PM *
News: Latest stable version of Bitcoin Core: 0.16.0  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How to generate Merkle Root ?  (Read 715 times)
Vinion
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
October 27, 2016, 07:58:31 PM
 #1

Hello,

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

The slushpool's stratum protocol manual (https://f.com/help/#!/manual/stratum-protocol)
has an example of a mining job but it does not contain any merkle branches so I don't  really know if I generate the merkle root correctly.

This is the slushpool's mining notification string:
{"params": ["bf", "4d16b6f85af6e2198f44ae2a6de67f78487ae5611b77c6c0440b921e00000000",
"01000000010000000000000000000000000000000000000000000000000000000000000000fffff fff20020862062f503253482f04b8864e5008",
"072f736c7573682f000000000100f2052a010000001976a914d23fcdf86f7e756a64a7a9688ef99 03327048ed988ac00000000", [],
"00000002", "1c2ac4af", "504e86b9", false], "id": null, "method": "mining.notify"}



Thank you
1524328688
Hero Member
*
Offline Offline

Posts: 1524328688

View Profile Personal Message (Offline)

Ignore
1524328688
Reply with quote  #2

1524328688
Report to moderator
1524328688
Hero Member
*
Offline Offline

Posts: 1524328688

View Profile Personal Message (Offline)

Ignore
1524328688
Reply with quote  #2

1524328688
Report to moderator
No Gods or Kings. Only Bitcoin
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
pepethefrog
Member
**
Offline Offline

Activity: 120
Merit: 10


Pepe is NOT a hate symbol


View Profile
November 03, 2016, 08:17:11 AM
 #2

You need to get a list of all transaction hashes that will go into your block.
You also need them in the specific order in which they will be placed.

Bipcoin: bip1W2nq2vhM4f6kaHSsVD5J1LdRb1M3mCqftwq6erpEeKzsj8Kjrxy5xUs9VAtF233nNzcMQN2ZQfJ fvi2WensZ5tGJv2ysY8
Pepe is NOT a hate symbol.
sugarfly
Full Member
***
Offline Offline

Activity: 133
Merit: 100


---


View Profile
November 03, 2016, 09:51:25 AM
 #3

I agree with pepe,

does stratum allow you to query all tx hashes?
If yes, you can then very easily construct a merkle root.

-sf-
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!