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
Essentially, a blockchain can best be understood as a kind 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 also applies to the blockchain, where it is further stipulated that you can only add information at the 'bottom'. Therefore, you can make changes but the past always remains intact. A blockchain is thus quite transparent.
But let's begin at the start: what does a 'block' actually look like? A block contains specific useful information, such as a digital transaction, or an agreement between two parties.
In order for the blockchain to accept your block, the hash (or the digital fingerprint, see the previous article in this series) of the block must start with a predetermined number of 'zeroes'. As explained in the previous article, this 'proves' that you have put in a certain amount of computation work when creating the block. This mechanism prevents, as we saw last time, one person from completely taking control of a blockchain.
To ensure the fingerprint starts with the specified number of zeroes, we need to 'try' many variants of the block to see if the fingerprint meets the requirement. To do this, we include an (otherwise unused) number in the content of the block: the nonce. The nonce is changed repeatedly until the fingerprint of the block starts with the specified 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 may contradict each other: one may contain a transaction where money is spent on person A, and the other block may contain a transaction where money is spent on person B. Naturally, only one of these transactions can be valid. How does the blockchain resolve this?
In a blockchain, the longest chain ultimately 'wins'. Therefore, if you are the first to create a block that follows another block, it is more likely that your block will eventually become part of 'the longest' chain. The example below illustrates this. Blocks 006406 and 006274 are created simultaneously. Because more blocks follow 006406, this block eventually becomes part of the longest chain.

This principle also helps in preventing modifications in old blocks. When the blocks contain money transactions, you certainly do not want money that has already been spent to be withdrawn!
If I wanted to change the transaction in block '006406', what would I need to do? Changing the transaction alters the block, and therefore the fingerprint of the block is changed (and as seen earlier, it is impossible to modify the block in such a way that it has the exact same fingerprint as the old block). However, what is possible is to try adding the block again, and crazily enough recalculate the following four blocks, thereby creating a longer chain than the current one.
To mine five blocks in total, five valid fingerprints must be found. The longer the chain, the more challenging this becomes. Imagine the Russian Matryoshka dolls: if you want to replace the innermost one, you must dismantle them all one by one and reassemble them one by one.

Meanwhile, other participants are still working to extend the longest chain (to which the unwanted transaction belongs). To be faster than the rest, you require significantly more computational power (specifically, 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. Cleverly designed!