{
 "library": "bootstrap",
 "version": "0.11.0",
 "root": "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5",
 "license": null,
 "slug": "MonotonicCounter",
 "ref": "MonotonicCounter#d0d3",
 "hash": "sema:MonotonicCounter#mh:SHA-256:d0d3ce256be4bc080a29eab7fda36381a4352a280d9a12d59179c60e71cf9bd0",
 "stub": "d0d3",
 "layer": "Society",
 "type": "Protocols",
 "summary": "Value that never decreases",
 "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#c9c2 (or CRDT logic) to ensure the value never regresses.",
 "invariants": [
  "Value#37fd(T+1) >= Value#37fd(T).",
  "A merge yields at least each of its inputs: Merge(A, B) >= A and >= B."
 ],
 "parameters": {},
 "signature": [],
 "preconditions": [
  "Initial value defined"
 ],
 "postconditions": [
  "Order preserved"
 ],
 "failure_modes": [
  "Counter overflow (finite integer space)."
 ],
 "domain": "",
 "caution": "",
 "sources": [],
 "name": "MonotonicCounter",
 "builds_on": [
  {
   "alias": "state_lock",
   "relation": "references",
   "library": "bootstrap",
   "slug": "StateLock",
   "ref": "StateLock#c9c2",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/StateLock"
  },
  {
   "alias": "value",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Value",
   "ref": "Value#37fd",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Value"
  }
 ],
 "related": [],
 "used_by": [
  {
   "slug": "AuditTrail",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/AuditTrail"
  },
  {
   "slug": "Ballot",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Ballot"
  },
  {
   "slug": "TimeWarpLog",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/TimeWarpLog"
  }
 ],
 "url": "https://semahash.org/vocabularies/bootstrap/patterns/MonotonicCounter",
 "md_url": "https://semahash.org/vocabularies/bootstrap/patterns/MonotonicCounter.md",
 "library_url": "https://semahash.org/vocabularies/bootstrap"
}
