Bitcoin Forum
January 23, 2017, 02:48:43 PM *
News: Latest stable version of Bitcoin Core: 0.13.2  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Why does merkle root change (in the data part of getwork)?  (Read 898 times)
Martin P. Hellwig
Jr. Member
*
Offline Offline

Activity: 33


View Profile
June 08, 2011, 03:14:16 PM
 #1

Hi all,

I am making a parser in python for the 'data' part of the getwork json-rpc call.
All well so far but I am getting a bit confused why merkle root changes.

According to https://en.bitcoin.it/wiki/Block_hashing_algorithm it should change every time a transaction is accepted. But as far as I can tell no transaction change has been incoming (checking with tcpdump) and even when I do two repeated calls so that the timestamp is the same it still changes.

What else contributes to merkle root being different on subsequent getwork calls?
1485182923
Hero Member
*
Offline Offline

Posts: 1485182923

View Profile Personal Message (Offline)

Ignore
1485182923
Reply with quote  #2

1485182923
Report to moderator
1485182923
Hero Member
*
Offline Offline

Posts: 1485182923

View Profile Personal Message (Offline)

Ignore
1485182923
Reply with quote  #2

1485182923
Report to moderator
Creating a Bitcoin client that fully implements the network protocol is extremely difficult. Bitcoin-Qt is the only known safe implementation of a full node. Some other projects attempt to compete, but it is not recommended to use such software for anything serious. (Lightweight clients like Electrum and MultiBit are OK.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1036


View Profile WWW
June 08, 2011, 03:46:24 PM
 #2

The first transaction is always the coinbase, to claim generated coins and fees. Instead of an normal input script, there is arbitrary data, used as an additional nonce. This either this nonce or the block header's timestamp is changed for every invocation of getwork.

aka sipa, core dev team

Tips and donations: 1KwDYMJMS4xq3ZEWYfdBRwYG2fHwhZsipa
Martin P. Hellwig
Jr. Member
*
Offline Offline

Activity: 33


View Profile
June 10, 2011, 02:14:19 PM
 #3

Thanks!
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!