1

In what order are the hash of the previous block, the root of the merkle and the nonce hashed to produce the hash of the next bitcoin block?

1
  • This is a forum for only bitcoin
    – Efe
    Apr 1 at 23:43

1 Answer 1

1

They are hashed in the order they appear in the network serialisation:

block

The block message is sent in response to a getdata message which requests transaction information from a block hash.

Field Size Description Data type Comments
4 version int32_t Block version information (note, this is signed)
32 prev_block char[32] The hash value of the previous block this particular block references
32 merkle_root char[32] The reference to a Merkle tree collection which is a hash of all transactions related to this block
4 timestamp uint32_t A Unix timestamp recording when this block was created (Currently limited to dates before the year 2106!)
4 bits uint32_t The calculated difficulty target being used for this block
4 nonce uint32_t The nonce used to generate this block… to allow variations of the header and compute different hashes
1+ txn_count var_int Number of transaction entries
? txns tx[] Block transactions, in format of "tx" command

The block header is hashed. So from version to nonce inclusive.


Related:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.