The blockchain is a decentralized, distributed, peer-to-peer ledger system. All nodes or peers on the network have to maintain the same ledger, thus any new transactions that are added to the ledger only can be done so once they are verified via the “consensus mechanism”.
The consensus mechanism is a dynamic way of achieving agreement across all network nodes to ensure the validity and security of the distributed ledger. The larger the size of the network, the more challenging it becomes to achieve consensus and verify which data or transactions being added to the ledger are valid. This problem is called the “Byzantine Generals’ Problem”.