Byzantine fault tolerance (BFT) is the ability of a distributed system to operate correctly even if some of its nodes fail, stop performing their functions properly, or start acting maliciously. This problem is named after a very famous byzantine generals' problem.
The Byzantine General Problem reflects a game theory problem that questions achieving consensus in a decentralized system where a trusted central party is absent.
A group of generals attacks a fortress, and every general has their preference about whether to attack or retreat. It has to be a coordinated attack or retreat to incur minimum losses. Thus, a consensus is held, and the majority decision is implemented. Suppose there is a treacherous general who sends conflicting messages to all other generals. Then some generals may end up attacking while others retreat, causing the army to lose.
A similar problem arises in decentralized/distributed networks such as blockchains. In blockchains, we've a network of nodes (generals), and they have to decide whether to add a block to the blockchain or not. All the nodes must make the same decision (either to add the block or not) to maintain a constant state of the blockchain across all the nodes. Otherwise, every node will end up with a different view of the blockchain, and it will be hard to maintain the network.
Note: Read more about byzantine generals' problem here.
Blockchains implement Byzantine fault tolerance through consensus algorithms. We use these to reach a common agreement about the current state of the distributed ledger.
Note: Read more about consensus algorithms in blockchain here.
Consensus algorithms restrict who can add a block to the blockchain. In some blockchains, we've to solve a complex mathematical problem to add a block (proof of work). While in some blockchains, we've to stake some amount of the blockchain's native currency to be able to add a new block(proof of stake). Moreover, every new block to be added to the blockchain is broadcasted to all the nodes in the network. Then all these nodes verify these blocks and their transactions before adding them to their