Purpose
This article provides a more in-depth description of how hashes link blocks together and are used to prove the legitimacy of transactions.
Assumptions Made
This article assumes the reader understands the information in the following articles:
Blocks
Summary
In order for blocks to be chained together in a blockchain, there must be an identifier that irrefutably ties the next block to the one before it. The number which accomplishes this is known as a “hash”. There are "next" hashes and there are "previous" hashes. Each "next" hash takes the nonce, transactions, and "previous" hash of the current block into account and then runs them all through an algorithm to create a very long number representing that accumulation of data. Hashes can be thought of as a form of a summary of the block’s data in the form of a complex number. The previous hash of the current block is the same as the next hash of the previous block.
This creates a system where the summary of one block (next hash) is the beginning of the next block and is written as the “previous” hash. By using this system, no changes may be made to any part of a block after it is written. Even changing one transaction from +1.00 to +1.01 would completely change the “next” hash of the current block, making it no longer match the “previous” hash of the next block. Blockchains use this design to remain completely immutable and to allow networks to confirm the legitimacy of blocks before uploading them to the chain. Hashes may also be considered “signed” which means they begin with a specified number sequence such as 0x0000… In order to accomplish this, another type of nonce must be calculated to result in a “next” hash beginning with the specified sequence. This is further explained in our next article of this series: Nonces.