Author

Topic: Block header hashing (Read 455 times)

full member
Activity: 196
Merit: 100
June 05, 2013, 12:39:01 PM
#9
Yes, of course. Thanks for that explanation, I should have known better.

Statistics can be a little counter intuitive and the sunk cost fallacy seems engrained in the human psyche. Perhaps it has some evolutionary advantage, or maybe its just tagging on for the ride through life's slings and arrows ...
lbr
sr. member
Activity: 423
Merit: 254
June 05, 2013, 12:34:10 PM
#8
By a simple matter of probability, eventually you'll hit the jackpot. Smiley
http://en.wikipedia.org/wiki/Gambler's_fallacy
legendary
Activity: 1106
Merit: 1004
June 05, 2013, 12:29:28 PM
#7
As DannyHamilton said. It's not a "continuous work" that gets closer from being finished with time. It's more like playing on the lottery, billions of times per second. By a simple matter of probability, eventually you'll hit the jackpot. Smiley
legendary
Activity: 3472
Merit: 4794
June 05, 2013, 12:17:24 PM
#6
The mined block header have a merkle root, which is a hash of all transactions in it. You can't simply change it, because the hash will change too. Until block is mined, it is easy to add transactions, because we can just change merkle root and continue hashing.

Hmm, I'm not convinced about this. The block hash is a search with a chance of 1 / (difficulty * 4294967296) success per operation. So if you throw away the block and start again you're just wasting effort. Or is this the fallacy of sunk cost?. Genuinely interested. My logic has been challenged once already since I escaped noobie land, so I'm open to education

Rolling a 1 on a die is search with a chance of 1 / 6 success per roll.  If you roll the die and get something other than a 6, then pick the die up and roll again, are your chances any better or worse?  Are you just wasting effort?

Every attempt to "solve" a block involves changing the data in the block header (by incrementing a nonce).  Why is it any different to change the merkle root instead of the nonce?
full member
Activity: 196
Merit: 100
June 05, 2013, 11:55:35 AM
#5
The mined block header have a merkle root, which is a hash of all transactions in it. You can't simply change it, because the hash will change too. Until block is mined, it is easy to add transactions, because we can just change merkle root and continue hashing.

Hmm, I'm not convinced about this. The block hash is a search with a chance of 1 / (difficulty * 4294967296) success per operation. So if you throw away the block and start again you're just wasting effort. Or is this the fallacy of sunk cost?. Genuinely interested. My logic has been challenged once already since I escaped noobie land, so I'm open to education
legendary
Activity: 1106
Merit: 1004
June 05, 2013, 11:25:22 AM
#4
Yes. Once it's found, you broadcast it immediately. New transactions go to a new block.
newbie
Activity: 10
Merit: 0
June 05, 2013, 11:21:07 AM
#3
Oh, so does that mean every time a transaction is added the merkle root changes? If so , then even if you find a valid block and a transaction comes in , is it ignored and put in the next mined block ?
newbie
Activity: 14
Merit: 0
June 05, 2013, 11:02:45 AM
#2
The mined block header have a merkle root, which is a hash of all transactions in it. You can't simply change it, because the hash will change too. Until block is mined, it is easy to add transactions, because we can just change merkle root and continue hashing.
newbie
Activity: 10
Merit: 0
June 05, 2013, 10:55:10 AM
#1
Hi guys,
           I realize that in the mining process the block header is constantly hashed using  sha256  and if it generates a value less than the target then the block is created. However the wiki doesnt mention anything about adding transactions to the block. Lets say a solo miner finds such a block before anyone else does. Now how does bitcoin know what transactions to enter into the block when he submits his Json-rpc block found status?  Or does it do that automatically ?
Jump to: