Society · Protocols

MonotonicCounter

Value that never decreases

Definition

Mechanism

A distributed coordination primitive where a value (clock, version, balance) never decreases. This simplifies consensus: a node seeing a higher value knows it is seeing later state, without needing to compare histories. It is the foundation of logical clocks and CRDTs, and relies on a StateLock (or CRDT logic) to ensure the value never regresses.

Preconditions

  1. Initial value defined

Postconditions

  1. Order preserved

Invariants

  1. Value(T+1) >= Value(T).
  2. A merge yields at least each of its inputs: Merge(A, B) >= A and >= B.

Risks

Failure modes

  1. Counter overflow (finite integer space).

Relationships

Builds on

References

StateLock

Atomic coordination via temporary state fusion

Infrastructure

Value

A measure of utility

Used by

References

Infrastructure

AuditTrail

Immutable append-only log of agent actions for compliance and debugging

Infrastructure

Ballot

Immutable record of one agent's cast choice

Infrastructure

TimeWarpLog

Handling relativistic event ordering

Reference

Identity

Ref
MonotonicCounter#d0d3
Sema ID
sema:MonotonicCounter#mh:SHA-256:d0d3ce256be4bc080a29eab7fda36381a4352a280d9a12d59179c60e71cf9bd0
Ring
0
Tier
1
Updated
2026-11-11
Supersedes
  • sema:MonotonicCounter#mh:SHA-256:f5a36a7775fe69757b2ab6fbf2dc66eab6689a1487b65005ae7ddef04dbd8235
  • sema:MonotonicCounter#mh:SHA-256:40968470b9f8326f0171ebdc2ca7253982dc677e69aedfec61957a4ea5489131
  • sema:MonotonicCounter#mh:SHA-256:33824eaaf148d996cbc3ccd7521b62dbba087070d23b5421918a446df3f01c8b
  • sema:MonotonicCounter#mh:SHA-256:21c63e6bc594106fb6bd773e2d91a2ecb0aebb43e550d55cfbe901e6a38628a3