You command a Mongoloid tribe that is invading the Byzantine Empire. Set in the period of Marcus Aurelius in Ancient Greece, you must connect with six other generals who are besieging Byzantium. The majority of you have encircled the city, but everyone must determine when to assault.

If all of the generals and you assault at the same moment, they will win; if they attack at separate times, they will lose.
A Byzantine spy can intercept every message the generals send, making their communication channel insecure.
The question then arises: how can the generals arrange themselves at the same time?
To put it another way, how can a vast, disparate group of individuals agree on what is true if they have no way of recognizing each other? This difficulty, as you’ll see, only exists in systems where a group of individuals must make the final choice on a result.
This is decentralization.
These institutions function as third-party facilitators of money transfers, and each charges you a commission fee for their services.
They act as intermediaries between you and your money.
Retail businesses such as Costco and Pricesmart are another example of centralization. Senior executives at the headquarters make critical decisions about product pricing and inventories. Branch managers often adhere to agreed-upon operational protocols, and store managers do the same.
An example of a decentralized system in the wild would be the Bitcoin network.
This is because the software required to participate in the network is dispersed among thousands of computers, known as nodes.
The Bitcoin network is unique in that anyone may participate by running a node. There is no registration, user ID, login, or anything else. There is nothing that would link your identity to the node being run.
The circumstances that these Byzantine generals faced are comparable to this one. They do know who may send or receive the messages.
A node's purpose can be divided into three major categories:
- Abide by a set of rules, keeping out bad actors.
- Sharing information on the Bitcoin network and tracking newly entered transaction data.
- Keep a copy of all confirmed transactions. keeping track of a long list of transactions that have already been confirmed as valid and have been etched into the ledger with a long list of transactions (the blockchain).
- Each node has already been programmed for what it needs to do, and it makes its own decision as a result.
Therefore, the Bitcoin network is made up of a series of nodes making their own decisions, but they each make the same decisions as one another.
So we know that the Bitcoin network is decentralized and runs on nodes, but since no one knows who runs the nodes, how can they reach an agreement on the truth of the transactions they validate and reach a consensus?
Thereby solving the problems faced by the generals raiding Byzantium.
They can all reach a final agreement thanks to the software running on each node of the Bitcoin network. As stated before, each node runs on software that has the same set of rules.
When a node gets a new group of transactions (a block), it checks this block against a long set of rules. Here is the list of rules each node abides by:
- The block data structure is syntactically valid.
- The block header hash is equal to or less than the target (enforces the proof-of-work).
- The block timestamp is less than two hours in the future (allowing for time errors).
- The block size is within acceptable limits.
- The first transaction (and only the first) is a coinbase transaction.
- All transactions within the block are valid using the transaction checklist discussed in Independent Verification of Transactions.
- If errors are discovered and the block does not check all of the boxes, processing stops and the block is not etched into the blockchain (rejected), and the node that receives it does not distribute it to other nodes on the network.
In the instance where no errors are found, the node will go ahead and add this block to the blockchain and send the block to its neighbors.
Those nearby blocks also undergo the same set of validations.
The entire validation procedure stops nodes from “going rogue” or cheating.
We know that nodes (miners) receive rewards for using their computational capacity to determine the correct nonce under the target value for etching blocks into the network.
Often referred to as proof of work.
What stops a miner from creating rewards for themselves?
This is also due to the validation procedure.
An invalid transaction invalidates the entire block, causing it to be rejected, which means that transaction will never appear on the blockchain.
There you have it: how each Bitcoin node decides which blocks to add to the blockchain.