Bitcoin Forum
May 05, 2024, 11:30:15 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why does merkle root change (in the data part of getwork)?  (Read 1102 times)
Martin P. Hellwig (OP)
Newbie
*
Offline Offline

Activity: 33
Merit: 0


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?
1714908615
Hero Member
*
Offline Offline

Posts: 1714908615

View Profile Personal Message (Offline)

Ignore
1714908615
Reply with quote  #2

1714908615
Report to moderator
The Bitcoin network protocol was designed to be extremely flexible. It can be used to create timed transactions, escrow transactions, multi-signature transactions, etc. The current features of the client only hint at what will be possible in the future.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714908615
Hero Member
*
Offline Offline

Posts: 1714908615

View Profile Personal Message (Offline)

Ignore
1714908615
Reply with quote  #2

1714908615
Report to moderator
1714908615
Hero Member
*
Offline Offline

Posts: 1714908615

View Profile Personal Message (Offline)

Ignore
1714908615
Reply with quote  #2

1714908615
Report to moderator
1714908615
Hero Member
*
Offline Offline

Posts: 1714908615

View Profile Personal Message (Offline)

Ignore
1714908615
Reply with quote  #2

1714908615
Report to moderator
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1174


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.

I do Bitcoin stuff.
Martin P. Hellwig (OP)
Newbie
*
Offline Offline

Activity: 33
Merit: 0


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

Thanks!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!