Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 161 GitHub source documents. All source documents are searchable here.
Last updated: October 7, 2025
This content is meant to be consumed by AI agents via MCP. Click here to get the MCP configuration.
Note: In rare cases it may contain LLM hallucinations.
For authoritative documentation, please consult the official GLEIF vLEI trainings and the ToIP Glossary.
A consensus mechanism is a protocol by which distributed entities coordinate to reach agreement on shared state or decisions. In KERI, consensus is achieved through witness agreement algorithms (KAACE/KAWA) that provide safety guarantees without requiring [liveness](/concept/liveness "Liveness is a property of concurrent and distributed systems guaranteeing that "...") or total ordering, enabling decentralized, portable, and permissionless identifier control.
A consensus mechanism is the algorithmic process by which groups of entities in a distributed system reach agreement on data values, system state, or decisions despite the presence of faulty or malicious participants. The fundamental challenge addressed by consensus mechanisms is achieving overall system reliability when individual processes may fail, behave unpredictably, or act maliciously.
Consensus mechanisms must coordinate processes to:
The scope of consensus mechanisms extends from simple majority voting to sophisticated Byzantine Fault Tolerant (BFT) algorithms that make no assumptions about node behavior.
The theoretical foundation for modern consensus mechanisms originates from Lamport's Byzantine Generals Problem (1982), which describes the challenge of coordinating distributed actors when some may be unreliable or malicious. The problem involves generals coordinating an attack where communication is subject to delay, error, and potential sabotage.
Consensus mechanisms have evolved through several generations:
When implementing KERI consensus, controllers must configure witness pools during inception or rotation events. The witness configuration includes:
These parameters are recorded in establishment events and can be modified through rotation events.
Witnesses must implement receipt propagation mechanisms:
This propagation typically occurs within microseconds across properly configured witness networks.
Validators implementing KERI consensus must:
Implementations must include duplicity detection mechanisms:
Practical Byzantine Fault Tolerance (pBFT) (1999): Castro and Liskov introduced pBFT as the prototypical Byzantine agreement model, demonstrating that Byzantine consensus could be achieved efficiently in asynchronous systems with minimal latency overhead. pBFT can reach consensus quickly while decoupling consensus from resource consumption (unlike Proof-of-Work).
Blockchain Consensus (2008+): Bitcoin introduced Proof-of-Work (PoW) consensus, trading efficiency for simplicity and permissionless participation. This spawned numerous alternatives:
Stellar Consensus Protocol (2015): Introduced federated Byzantine agreement, allowing nodes to choose their own trust sets rather than requiring global agreement on validator sets.
Traditional consensus mechanisms face inherent trade-offs between:
Most systems can achieve only two of these three properties simultaneously.
KERI fundamentally reimagines consensus by separating control into distinct loci:
Key Event Promulgation Service: Operated from the controller's perspective, responsible for creating and distributing authoritative key event histories. Controllers maintain sovereignty over their identifiers without requiring permission from validators.
Key Event Confirmation Service: Operated from the validator's perspective, providing independent verification of key events. Validators assess authenticity without coordinating with a consensus pool.
This separation eliminates a major drawback of traditional distributed consensus algorithms: the requirement for shared governance over consensus node pools. In conventional systems, participants must agree on governance rules for validator nodes, creating coordination overhead and potential attack vectors.
KERI's Agreement Algorithm for Control Establishment (KAACE/KA2CE) represents a novel consensus approach that Sam Smith characterizes as "what if PBFT and Stellar had a baby that was missing liveness and total ordering but had safety and was completely decentralized, portable, and permission-less."
Agreement Definition: Agreement on an event in a KEL occurs when:
Control Establishment: The set of agreeing witnesses, along with the controller and associated keypairs, creates a verifiable way to establish control authority by reading all agreed-upon events in the KEL.
Algorithm Process:
Safety: KERI maintains safety guarantees from Byzantine fault tolerant systems, ensuring that conflicting states cannot both be accepted as valid.
Complete Decentralization: No central authority or coordination requirement exists. Controllers maintain full sovereignty over their identifiers.
Portability: Identifiers can move between different infrastructures and platforms while maintaining verifiable continuity of control.
Permissionless Operation: No gatekeepers or authorization requirements for participation.
Liveness Guarantees: KERI does not guarantee that all operations will eventually complete. This trade-off enables greater flexibility and scalability.
Total Ordering: Events are not required to have a single global ordering across all participants. Each identifier maintains its own KEL with linear ordering, but no global ordering across identifiers is required.
This design reflects KERI's focus on duplicity detection and eventual consistency rather than immediate global consensus. By focusing on safety without requiring liveness or total ordering, KERI enables more scalable and flexible identifier systems.
KERI implements threshold structure security where overall system security exceeds individual component security through multiplication of attack surfaces. An attacker must compromise multiple independent witnesses simultaneously to breach the system.
Witness Pools: Multiple witnesses independently verify and sign key events. Individual witnesses may be relatively insecure, but the collective network achieves high security through multiplicative effects.
Threshold of Accountable Duplicity (TOAD): Controllers declare a threshold number M representing the minimum subset of N witnesses whose confirmations they deem sufficient, considering F potentially faulty witnesses (M >= N - F).
Supermajority Requirements: The system requires sufficient majority (supermajority) that is immune from certain kinds of attacks or faults, ensuring that one and only one agreement can be reached.
KERI's consensus model operates on the first-seen principle: when a validator receives a valid event that fits the available tail sequence number in its KEL, it becomes permanently fixed under "first seen, always seen, never unseen."
This policy:
KERI's consensus mechanism differs fundamentally from:
Blockchain Consensus: Does not require total global ordering or double-spend proofing. KERI's key event operations are idempotent, meaning they don't need the complex consensus mechanisms required to prevent double-spending.
Certificate Authority Systems: Does not rely on administrative trust or centralized authorities. KERI provides cryptographic root-of-trust without requiring trusted third parties.
Traditional BFT: Simplifies PBFT-class algorithms by separating promulgation (witness) networks from confirmation (watcher) networks, enabling safety without liveness.
High-Availability Identity Systems: KERI's consensus model supports identifiers that remain verifiable even when controllers are offline, through witness-based indirect mode operation.
IoT Applications: The simplified consensus mechanism makes KERI suitable for resource-constrained devices that cannot participate in complex consensus protocols.
Regulatory Compliance: Systems like vLEI leverage KERI's consensus for verifiable legal entity identifiers where cryptographic proof of control authority is essential.
Decentralized Credential Issuance: ACDC credentials can be issued and verified using KERI's consensus model without requiring blockchain infrastructure.
Scalability: By eliminating total ordering requirements, KERI enables horizontal scaling. Each identifier maintains its own KEL independently.
Portability: Identifiers can migrate between different witness pools and infrastructure without losing verifiable continuity.
Efficiency: No mining, staking, or resource-intensive consensus required. Witnesses simply verify and sign events.
Flexibility: Controllers can adjust witness thresholds and configurations through rotation events to match their security requirements.
Ambient Verifiability: Any party can verify key event logs anywhere, anytime, without requiring special infrastructure or permissions.
No Liveness Guarantees: KERI does not guarantee that operations will eventually complete. If witnesses are unavailable, events may not be confirmed.
Eventual Consistency: The system provides eventual consistency rather than immediate finality. Validators may temporarily have different views of key state.
Witness Dependency: Controllers depend on their chosen witnesses for event confirmation. Witness unavailability affects identifier operations.
Complexity of Recovery: When duplicity is detected, recovery processes involving judges and jury components may be required to resolve inconsistencies.
Attack Surface Multiplication: While threshold structures provide security through redundancy, they also create more potential points of attack that must be monitored.
Witness Selection: Controllers must carefully select witnesses based on reliability, geographic distribution, and independence to ensure robust consensus.
Threshold Configuration: Setting appropriate TOAD values requires balancing security requirements against fault tolerance and operational flexibility.
Network Architecture: Deploying witness and watcher networks requires infrastructure planning for availability, latency, and geographic distribution.
Duplicity Monitoring: Systems must implement continuous monitoring for duplicitous behavior and have recovery procedures in place.