After verification, transactions are relayed to other nodes in the peer-to-peer network. The other nodes will repeat the verification and relay the transaction to more nodes. Within seconds, the transaction should reach most of the nodes on the network. Transactions are then held in pools on the nodes awaiting insertion into the block chain, which is a public record of all transactions that have ever occurred in the Bitcoin network. The block chain is not just a simple list of transaction receipts though. It is specially designed to solve the double-spending problem for a peer-to-peer network of untrusted nodes. As discussed in the Double-Spending section, the goal is to determine the chronological ordering of transactions so that the first payment can be accepted and the second payment can be rejected. So the peer-to-peer network has to have a method to agree on an ordering of transactions even though some peers might be trying to sabotage the system.
This problem of coordinating a group of peers with possible saboteurs is known as the Byzantine Generals’ Problem. The name comes from a 1980 paper that described a situation in which the generals of the Byzantine Empire’s Army had to agree on whether to launch their attack on the enemy. The generals could communicate by messenger, but any of the generals could be a traitor trying to sabotage the attack. If a treasonous general or group of generals could confuse enough honest generals about the outcome of the decision, the army would be fragmented and meet with defeat. The challenge is to develop a protocol that ensures that the majority’s decision is heard by all generals even when not every general can communicate directly with every other general.
This is just like how all the nodes in the Bitcoin network have to know the majority’s decision about the chronological ordering of transactions, even though not all nodes can communicate directly and some nodes might be malicious attackers.
The block chain solves the Byzantine Generals’ Problem by using computational power as a voting system. First, nodes group transactions into blocks that are linked to form the block chain. Nodes broadcast blocks to the entire peer-to-peer network upon creation. Each block contains a hash of the previous block in the chain. Therefore, at the time a block was created, the previous block must have already existed or else the hash would be invalid and the block would be rejected. This provides verifiable proof of the chronological ordering of the blocks in the chain. But if blocks could easily be added by anyone, an attacker could just make an alternate chain that reassigns ownership arbitrarily.
The block chain is not really an easily scalable solution. All nodes have to see every transaction in the world and the block chain is stored in full on every node. In other words, Bitcoin is not a distributed system, it’s just massively replicated. Future versions of the Bitcoin software may make it possible to reduce the storage requirements for the block chain, but collecting all unprocessed transactions on every node is not a requirement that can be easily removed. It works fine currently, but if Bitcoin becomes more mainstream, scalability could be an issue. It may require such an expensive computer to operate a node that individuals wouldn’t be able to do it. At that point, Bitcoin loses some of its major benefits. For example, it would be easier for governments to regulate. Consider a situation in which a small number of companies control the majority of computational power in the Bitcoin network. The government could easily regulate these companies and force them to install software updates that give the government backdoors to manipulate the currency.”
Source: Clark, Chris - Bitcoin Internals