One of the key issues faced by digital currencies is how to reach a consensus on who owns what on a distributed system, particularly when participants are self-interested and might not all be honest. A consensus protocol (aka consensus mechanism, algorithm or model) is used for a blockchain to reach a common agreement about the blockchain’s true state in real-time.
Bitcoin’s Proof-of-Work and Ethereum’s Proof-of-Stake are the best-known examples of consensus protocols.
These mechanisms are at the very core of blockchains. It is the auditing and processing layer that makes blockchains possible, replacing human verifiers with automated group verification with each node checking transactions. Levels of security, trust and transaction finality are made possible due to the overarching consensus mechanism. Different mechanisms emphasise some aspects, such as speed, scalability and energy efficiency, over other features.
These systems work to synchronise all network nodes and ensure transactions are secure and valid. Once nodes agree a transaction is legitimate, it is added to a block and recorded to the blockchain. The security and trust within a blockchain are supplemented as the consensus mechanism chooses which nodes are valid while ignoring malicious nodes, stopping attempts to defraud the chain.