Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 166 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.
The minimum required number of participants in an event needed to achieve a supermajority consensus, ensuring that one and only one agreement can be reached despite potentially faulty participants. Ample is a critical parameter in KERI's Agreement Algorithm for Control Establishment (KAACE) that establishes the threshold for witness consensus on key state.
Ample is a fundamental consensus parameter in the KERI protocol that defines the minimum number of participants required to achieve a supermajority consensus on an event. The term "ample" represents a sufficient majority that is labeled immune from certain kinds of attacks or faults, as specified in section 11.4.2.4 of the KERI whitepaper v2.60.
According to the formal specification:
"Satisfaction of this constraint guarantees that at most one sufficient agreement occurs or none at all despite a dishonest controller but where at most F of the witnesses are potentially faulty."
This formulation is precise: ample does not guarantee that agreement will occur, only that if agreement occurs, it will be unique. The alternative is no agreement at all. This property is essential for establishing accountability for a KERI controller—defining what actions a person who controls a KERI identifier may be held legally responsible for.
Ample is defined through a mathematical constraint involving three key parameters:
The constraint is governed by the inequalities:
f >= 1 if n > 0
n >= 3*f + 1
(n+f+1)/2 <= m <= n-f
These constraints ensure that the ample number is both sufficient to overcome potential faults and achievable given the total participant count. The relationship is the classic requirement, ensuring that the system can tolerate up to faulty nodes while still reaching unambiguous consensus.
Implementations must correctly calculate ample using the Byzantine fault tolerance constraint n >= 3*f + 1. The calculation has two modes:
Automatic fault tolerance: When f is not specified, calculate the maximum f that satisfies the constraint, then determine m based on whether to minimize (weak=True) or maximize (weak=False) the threshold.
Explicit fault tolerance: When f is specified, verify the Byzantine constraint is satisfied, then calculate m within the bounds (n+f+1)/2 <= m <= n-f.
When processing establishment events, implementations must validate that the specified TOAD (bt field) satisfies the ample constraint for the given witness pool size. If TOAD is set below ample, the configuration is insecure and should be rejected.
Implementations must track receipt collection to determine when ample consensus is achieved:
For multi-signature identifiers, the signing threshold (kt field) should be set to at least the ample number to prevent lockout scenarios. Implementations should warn or reject configurations where the signing threshold is below ample.
When rotating witness pools through establishment events:
To optimize ample consensus achievement:
Implementations should handle several error conditions:
n >= 3*f + 1fAmple applies to two distinct scenarios in KERI:
Witness Pools: For witnessed events, ample determines how many witnesses must confirm an event to establish its validity and prevent a dishonest controller from creating conflicting event versions.
Multi-Signature Groups: For multi-sig identifier control, ample sets the signing threshold for group operations, preventing accidental lockout scenarios where valid operations could be blocked.
Ample is a core component of KAACE (KERI's Agreement Algorithm for Control Establishment), which establishes consensus between witnesses on the key state of a KERI identifier. The algorithm uses ample to determine when sufficient witness agreement has been achieved.
The consensus architecture operates as follows:
While ample itself is a numeric parameter rather than a message format, it affects the structure and interpretation of several KERI message types:
Ample is implicitly defined through witness configuration fields in inception events and rotation events:
{
"v": "KERI10JSON00011c_",
"t": "icp",
"d": "EaU6JR2nmwyZ-i0d8JZAoTNZH3ULvYAfSVPzhzS6b5CM",
"i": "EaU6JR2nmwyZ-i0d8JZAoTNZH3ULvYAfSVPzhzS6b5CM",
"s": "0",
"kt": "1",
"k": ["DaU6JR2nmwyZ-i0d8JZAoTNZH3ULvYAfSVPzhzS6b5CM"],
"nt": "1",
"n": ["EZ-i0d8JZAoTNZH3ULvaU6JR2nmwyYAfSVPzhzS6b5CM"],
"bt": "2",
"b": [
"BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha",
"BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM",
"BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX"
],
"c": [],
"a": []
}
Key fields:
bt: Threshold of Accountable Duplicity (TOAD) - the minimum number of witness receipts requiredb: Array of witness AIDsn: Total number of witnesses (length of b array)The ample calculation uses these values: given n witnesses and TOAD bt, the system calculates the appropriate fault tolerance f and verifies that bt satisfies the ample constraint.
Receipt messages (rct) are the mechanism by which witnesses confirm events. The ample threshold determines how many receipts are required:
{
"v": "KERI10JSON00011c_",
"t": "rct",
"d": "EaU6JR2nmwyZ-i0d8JZAoTNZH3ULvYAfSVPzhzS6b5CM",
"i": "BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha",
"s": "0"
}
When the number of valid receipts reaches the ample threshold, the event achieves consensus.
The KERI protocol implements ample calculation through a deterministic algorithm that takes the total number of participants and optionally a fault number, then computes the minimum required participants for supermajority.
The algorithm operates in two modes:
Mode 1: Fault Number Not Specified
When f is not provided, the algorithm:
f that satisfies n >= 3*f + 1m based on the weak parameter:
weak=True: Minimizes m using m = (n+f+1)/2 (ceiling division)weak=False: Maximizes m using m = n-fMode 2: Fault Number Specified
When f is provided, the algorithm:
n >= 3*f + 1 (Byzantine constraint)m bounds: (n+f+1)/2 <= m <= n-fm based on the weak parameter (minimum or maximum bound)The protocol mechanics for achieving ample consensus:
m witnesses are collected, ample is achievedAmple consensus has important timing properties:
Ample is designed to provide security guarantees against several threat scenarios:
Dishonest Controller: A controller attempting to create conflicting versions of their key event log to different parties (duplicity attack).
Faulty Witnesses: Up to f witnesses may be compromised, offline, or behaving incorrectly.
Network Partitions: Temporary network failures that prevent some witnesses from communicating.
Eclipse Attacks: Attempts to isolate validators from honest witnesses.
The ample constraint provides several critical security properties:
Uniqueness of Agreement: At most one sufficient agreement can occur. If ample witnesses agree on an event, no other conflicting event can achieve ample agreement.
Duplicity Detection: If a controller creates conflicting events, at least one honest witness will detect the duplicity because achieving ample for both conflicting events is mathematically impossible.
Fault Tolerance: The system can tolerate up to f faulty witnesses while still achieving consensus among honest witnesses.
Accountability: Once ample consensus is achieved, the controller is accountable for that key state. Any attempt to present a different key state will be detectable as duplicity.
Sybil Attacks: Ample provides resistance to Sybil attacks because:
n >= 3*f + 1 constraint ensures sufficient honest witnessesCollusion Attacks: The Byzantine constraint n >= 3*f + 1 ensures that even if f witnesses collude with a dishonest controller, there are still enough honest witnesses to detect duplicity.
Denial of Service: While ample cannot prevent DoS attacks on witnesses, the threshold structure ensures that:
A critical security property of ample in multi-signature contexts is lockout prevention. If the signing threshold for a multi-sig group is set lower than the ample number, the group could experience accidental lockout where valid operations are blocked. By using ample as the minimum threshold, the system ensures:
Ample is deeply integrated with several KERI protocol components:
KEL (Key Event Log): Ample determines when events in a KEL have achieved sufficient witness consensus to be considered stable and accountable.
KERL (Key Event Receipt Log): The KERL contains both events and receipts. Ample defines how many receipts are required for an event to be considered fully witnessed.
KAACE: Ample is a core parameter in the KERI Agreement Algorithm for Control Establishment, determining the consensus threshold.
Witnesses: The witness pool size and configuration directly determine the ample calculation.
TOAD (Threshold of Accountable Duplicity): TOAD is the controller-specified threshold that must satisfy the ample constraint.
While ample is primarily a KERI protocol concept, it has implications for ACDC (Authentic Chained Data Container) credentials:
Issuer Key State: The key state used to sign an ACDC must have achieved ample consensus to be considered authoritative.
Delegation Chains: When ACDCs form delegation chains, each delegating identifier's key state must have achieved ample consensus.
Revocation Registries: TEL (Transaction Event Log) registries that track ACDC revocation status rely on ample consensus for their backing witnesses.
Ample differs from traditional consensus mechanisms:
vs. Blockchain Consensus: Unlike Proof-of-Work or Proof-of-Stake, ample does not require global ordering of all events. Each identifier has its own independent consensus domain.
vs. Practical Byzantine Fault Tolerance (PBFT): While both use Byzantine fault tolerance principles, ample is applied per-identifier rather than globally, enabling massive scalability.
vs. Raft/Paxos: These algorithms provide total ordering of events. Ample only requires ordering within a single identifier's event sequence.
Implementers must carefully consider witness pool size:
Minimum Viable Pool: The smallest practical witness pool is 3 witnesses with f=0, giving m=2. This provides minimal fault tolerance.
Recommended Pool: A pool of 5-7 witnesses with f=1 or f=2 provides good balance between security and operational complexity.
Large Pools: Pools of 10+ witnesses provide high fault tolerance but increase operational overhead and latency.
The Threshold of Accountable Duplicity must be set appropriately:
Too Low: Setting TOAD below ample creates security vulnerabilities where insufficient witnesses could confirm conflicting events.
Too High: Setting TOAD too high reduces availability, as more witnesses must be online and responsive for consensus.
Optimal Setting: TOAD should typically equal the ample number for the desired fault tolerance level.
Latency: Achieving ample consensus requires waiting for m witnesses to respond. Network latency and witness processing time affect overall system latency.
Throughput: The need to collect ample receipts limits the rate at which events can be confirmed. Parallel processing of receipts can improve throughput.
Scalability: Because ample is calculated per-identifier, the system scales horizontally. Adding more identifiers does not increase the consensus burden on any single witness pool.
Receipt Collection: Implementing efficient receipt collection and verification requires careful state management to track which witnesses have receipted which events.
Timeout Handling: Determining appropriate timeouts for witness responses requires balancing responsiveness with reliability.
Partial Receipts: Handling scenarios where some but not all witnesses respond requires implementing retry logic and fallback strategies.
Witness Rotation: When witnesses are rotated through establishment events, implementations must handle the transition period where old and new witnesses may both be active.
The KERI specification provides a reference table showing the relationship between total participants (N) and the minimum required ample number (M) for various fault tolerance levels. This table serves as a practical reference for system designers:
| N (Total) | F (Faults) | M (Ample) |
|---|---|---|
| 1 | 0 | 1 |
| 2 | 0 | 2 |
| 3 | 0 | 2 |
| 4 | 1 | 3 |
| 5 | 1 | 3 |
| 6 | 1 | 4 |
| 7 | 2 | 5 |
| 8 | 2 | 5 |
| 9 | 2 | 6 |
| 10 | 3 | 7 |
This table demonstrates how the ample number scales with the total participant count to maintain Byzantine fault tolerance properties.
Ample is a fundamental consensus parameter in KERI that ensures secure, fault-tolerant agreement on key state while enabling massive scalability through per-identifier consensus domains. By requiring a supermajority of witnesses to confirm events, ample provides strong security guarantees against dishonest controllers and faulty witnesses, while the mathematical constraints ensure that at most one valid consensus can emerge. This property is essential for establishing accountability in decentralized identity systems and forms the foundation for KERI's duplicity detection capabilities.
Test implementations should verify:
n and f values