Attention: The content is slightly out of date. The information in the text could therefore no longer be correct.
Mining bitcoins is a computationally intensive process and forms the basis of the proof of work. Validating a block of the blockchain, on the other hand, is quite easy.
In order to validate a block of the Bitcoin blockchain, we need the information from the block header of the
block to be validated. The block header contains the following information [2]:
Version The block version number.
Previous block hash SHA256 hash of the previous block header.
Merkel root hash SHA256 hash based on all the transactions in the block. In short: All
Transaction hashes are paired, hashed, paired, hashed, ... until just one hash remains, the merkel root.
Timestamp Timestamp of the block.
Difficulty bits The proof-of-work algorithm difficulty target for this block. The target
determines the difficulty and therefore affects how long it takes to find a solution to the proof-of-work
algorithm [1,4].
Nonce During the process of mining, the nonce is altered to find a value that results in
a block header hash that is less than the number represented by the difficulty target. Since the hash
algorithm is a one-way function, the condition can only be satisfied by simple guessing nonce values [1,4].
In order to calculate a practical example, we need the data of already existing blocks. At the time of writing
this article, blocks 729574 and 729575 are reasonably current. Just follow the links to see the details. To validate
block 729575 we use the following values:
A. M. Antonopoulos: Mastering Bitcoin: programming the open blockchain, Second edition. Sebastopol,
CA: O’Reilly, 2017.
Protocol documentation - Bitcoin Wiki, Jul. 30, 2021, Accessed on Mar. 30, 2022. [Online]. Available:
https://en.bitcoin.it/wiki/Protocol_documentation#Block_Headers
Bitcoin Core integration/staging tree. Bitcoin, 2022. Accessed on Mar. 30, 2022. [Online]. Available:
https://github.com/bitcoin/bitcoin/blob/7c08d81e119570792648fe95bbacddbb1d5f9ae2/src/validation.cpp
M. Oettler: How To Calculate and Verify a Hash Of a Block, Blockchain Academy, Oct 12, 2021.
[Online]. Available:
https://blockchain-academy.hs-mittweida.de/courses/blockchain-introduction-technical-beginner-to-intermediate/lessons/lesson-13-bitcoin-block-hash-verification/topic/how-to-calculate-and-verify-a-hash-of-a-block/.
Did you like the content? If you want to do something good for me, you can pour a little coffee into my empty pot. Just click the PayPal.Me-Button* below. Thank you very much!