I understand the role that the nonce plays in the block header for calculating a hash for a valid proof of work.
But what I ask is: Do we consider the nonce in the prevBlockHash
calculation of the previous block because, well, it's in the block header already (for the proof-of-work calculation), and it would be silly to write a calcPrevBlockHash
function that calculates the previous block's header by ignoring the nonce?
Or is there a specific security property or assurance that we get when including the nonce in the prevBlockHash
calculation of the subsequent block?
For instance, you could argue that we hash the timestamp because we want to capture the time that the block was generated. See answer here: Why the timestamp component of the block header? I guess you can argue the same for the nonce field.
But I claim that we could still have the nonce in the block header, and not hash it during the prevBlockHash
calculation of the subsequent block, and things would still work. You would still be (a) able to validate this block, and (b) unable to mess around with the transactions in the block, because that would modify the hashMerkeRoot
field, and thus render the block invalid.