As I understand the merkle tree hash is a (semi)unique hash of the combination of the new transactions and the previous blocks hash.

I'm assuming this hash changes when a new transaction is added to the block. Now since there are multiple transactions per second on average (with BTC), this means the nonce is "reset" each time.

As I've understood here: Restarting mining on new transaction 'restarting' is not really a valid concept, since every 'try' for mining a block is the same probability chance.

Since everyone would want to have the newest block to include as much transactions as possible, how is this managed.

Is it wrong to see it like this:

  • Every miner hopes to find a new block in 1 second (which means billions of nonces tried if I understand correctly, given you have a fast miner).
  • If it doesn't find the nonce in that 1 second, it will grab as many new transactions as possible, and starts bursting out new block hashes, until one is 'difficult' enough. And then advertises that block and everyone will have to verify and then accept/deal with this amount of transactions in the new block.

Is it wrong to think that it doesn't really matter if a miner spends 5 minutes on the same block, or switch to a new block every second or even faster? Since the probability is the same.

My question is basically if there is anything wrong with the above statements or assumptions.

  • Small error in your assumption: Merkle tree doesn't contain the previous block hash, only hashes of all the transactions in the current block. Which indeed keep changing whenever a transaction is added to or remove from (or moved within) the block. I don't think this matters for the rest of your question, as the PoW does cover the whole block header, which does include the hash of the previous block. – Jannes Sep 9 '16 at 13:32
  • Side question: I believe the block header also contains the nonce, so when the nonce changes, the hash that you calculate with nonce also changes? So essentially you never are really incrementing the nonce, without changing the hash to calculate with? – BlockChange Sep 9 '16 at 13:47
  • 1
    related: How often do miners update their block transaction list?, also have a look at the tag transaction-selection. – Murch Sep 9 '16 at 14:28
  • @BlockChange Correct. That's the whole point of the nonce (although changed in other fields also have this effect) : to force a change in the header and therefore in the hash. – Jannes Sep 9 '16 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.