---
library: "bootstrap"
slug: "Consensus"
name: "Consensus"
ref: "Consensus#01ac"
hash: "sema:Consensus#mh:SHA-256:01ac4767cb432556d48461ff65dc553651ec559f28b7e438d55a292ea0c6106e"
type: "Coordination"
layer: "Society"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/Consensus"
---

# Consensus

Distributed agreement process

Society · Coordination

## Mechanism

A distributed protocol allowing a set of agents to agree on a single data value or state transition. It orchestrates [Vote](https://semahash.org/vocabularies/bootstrap/patterns/Vote.md) exchange and uses [Quorum](https://semahash.org/vocabularies/bootstrap/patterns/Quorum.md) to validate the result. It ensures safety and liveness in an adversarial network, accepting a [Proposal](https://semahash.org/vocabularies/bootstrap/patterns/Proposal.md) and yielding a [Value](https://semahash.org/vocabularies/bootstrap/patterns/Value.md).

## Invariants

- Agreement: All correct agents who decide must decide the same [Value](https://semahash.org/vocabularies/bootstrap/patterns/Value.md).
- Validity: If all agents propose V, then the [Value](https://semahash.org/vocabularies/bootstrap/patterns/Value.md) must be V.
- Termination: Eventually, every correct agent decides on a [Value](https://semahash.org/vocabularies/bootstrap/patterns/Value.md).

## Preconditions

- Group of agents is defined (Membership List)
- Communication channel is available
- [Proposal](https://semahash.org/vocabularies/bootstrap/patterns/Proposal.md) received

## Postconditions

- A single [Value](https://semahash.org/vocabularies/bootstrap/patterns/Value.md) is committed to the shared state
- All agents are notified of the [Value](https://semahash.org/vocabularies/bootstrap/patterns/Value.md)

## Failure modes

- Split Brain: Network partition causes two subgroups to reach different [Value](https://semahash.org/vocabularies/bootstrap/patterns/Value.md)s.
- Liveness Failure: The system stalls and never reaches agreement on the [Proposal](https://semahash.org/vocabularies/bootstrap/patterns/Proposal.md).
- Sybil Attack: One malicious actor creates multiple identities to sway the [Vote](https://semahash.org/vocabularies/bootstrap/patterns/Vote.md).
- Byzantine Failure: Agents lying or acting maliciously to prevent consensus.

## Caution

Governance decisions susceptible to coordinated voting blocs.

## Where this came from

—

## Builds on

- [Quorum](https://semahash.org/vocabularies/bootstrap/patterns/Quorum.md) (composes_with)
- [Vote](https://semahash.org/vocabularies/bootstrap/patterns/Vote.md) (composes_with)
- [Value](https://semahash.org/vocabularies/bootstrap/patterns/Value.md) (yields)
- [Proposal](https://semahash.org/vocabularies/bootstrap/patterns/Proposal.md) (accepts)

## Used by

- [AnchorDrop](https://semahash.org/vocabularies/bootstrap/patterns/AnchorDrop.md) (references)
- [ConsensusFinder](https://semahash.org/vocabularies/bootstrap/patterns/ConsensusFinder.md) (references)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: Consensus#01ac
- Hash: sema:Consensus#mh:SHA-256:01ac4767cb432556d48461ff65dc553651ec559f28b7e438d55a292ea0c6106e

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/Consensus
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/Consensus.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
