The text on this page was automatically translated and hence may differ from the original. No rights can be derived from this translation.
How does a blockchain work? Part 2: blocks
In essence, a blockchain is best understood as a type of spreadsheet that is stored online ('in the cloud'). It is shared with multiple people, who can work on it simultaneously, and all changes are visible to everyone. This transparency also applies to the blockchain, where it is essential to only add information at the bottom. While you can make changes, the past always remains intact. A blockchain is therefore very transparent.
But let's start at the beginning: what does a 'block' actually look like? A block contains certain useful information, such as a digital transaction or an agreement between two parties.
To ensure that the blockchain accepts your block, the hash (or digital fingerprint, as explained in the previous article in this series) of the block must start with a predefined number of 'zeroes'. As explained in the previous article, this 'proves' that you have put in a certain amount of computational work when creating the block. This prevents, as seen last time, any single person from taking complete control of a blockchain.
To make the fingerprint start with the required number of zeroes, we need to 'try' many variations of the block until the fingerprint meets the requirement. To achieve this, we add a (previously unused) number to the content of the block: the nonce. You vary the nonce until the fingerprint of the block starts with the required number of zeroes.
The 'double spend'
The blockchain is a chain of blocks – the chain can only be extended by one block at a time. It is possible for someone to have calculated a new block at the same time as someone else. These blocks could conflict with each other: one may contain a transaction where money is spent on person A, while the other block may contain a transaction where money is spent on person B. Naturally, only one of these transactions can remain valid. How does the blockchain solve this?
In a blockchain, the longest chain ultimately 'wins'. So, if you manage to create a block first that follows another block, there is a higher chance that this block will eventually become part of 'the longest' chain. The example below illustrates this. Blocks 006406 and 006274 are created simultaneously. Since more blocks follow block 006406, this block eventually becomes part of the longest chain.

This principle also helps prevent changes in old blocks. When the blocks contain money transactions, you obviously do not want money that has already been spent to be withdrawn!
If I want to change the transaction in block '006406', what do I need to do? Changing the transaction alters the block, and therefore the fingerprint of the block (and as seen earlier, it is impossible to adjust the block in such a way that it has the exact same fingerprint as the old block). What is possible is to try adding the block again, and if you are persistent, recompute the following four blocks, creating a longer chain than the current one.
To mine five blocks in total, five correct fingerprints must be found. The longer the chain, the harder this becomes. Think of it like the Russian Matryoshka dolls: if you want to replace the innermost one, you need to disassemble and reassemble them one by one.

Meanwhile, other participants are still working on extending the longest chain (which includes the unwanted transaction). To be faster than the rest, you need significantly more computational power (to be precise, you need a 'majority' of >50% of the total network computational power!).
Thanks to the blockchain, historical information cannot be altered, and money can only be spent once, due to the required majority of computational power. Quite clever!