Expand description
Distributed state & consensus (§28, legal_logic.md) — multi-agent sync.
Human-centric obligations span many person-controlled vaults; no single node holds the complete global state. A multi-party obligation must therefore be suspended until consensus, a norm valid locally does not bind the network until synchronised, and a network partition must not silently break standing obligations (those established before the split survive; new joint obligations pause until healing). Complements the engine’s CRDT (LWW) layer with the deontic transaction semantics. Zero-heap, total predicates.
Enums§
- TxStatus
- The state of a multi-party obligation/transaction.
Functions§
- bft_
committed - Has a safe BFT quorum been reached (
votes ≥ bft_quorum(n))? - bft_
max_ faults - The maximum Byzantine faults
fa network ofnnodes tolerates:f = ⌊(n-1)/3⌋(BFT safety needsn ≥ 3f+1). - bft_
quorum - The BFT quorum size — the supermajority
2f+1that makes a commit safe despitefByzantine nodes (PBFT prepare/commit certificate, HotStuff QC). - can_
form_ joint_ during_ partition - During a partition, a NEW joint (multi-party) obligation may not be formed — it must wait for the network to heal so all parties can reach consensus.
- is_
active_ validator - Dynamic validator rotation: is validator
validator_idxin the active committee forepoch? A window ofactive_sizevalidators rotates by one position per epoch over a set ofset_size(round-robin), so committee membership churns deterministically. Indices and the window wrap moduloset_size. - is_
equivocation - Equivocation (a slashable Byzantine fault): a validator signed TWO DIFFERENT values at the
same height/round.
(height_a, value_a)vs(height_b, value_b)from the SAME validator. - is_
globally_ valid - Local validity ≠ global validity: a norm an agent holds in its local cell does not bind the network until it has been synchronised. Both must hold.
- lamport_
recv - Lamport clock on receiving a message stamped
msg:max(local, msg) + 1. - lamport_
tick - Lamport clock tick on a local event.
- light_
client_ accepts - A light client accepts consensus state only if a succinct zk proof of the quorum verifies (it
does NOT re-execute the chain): accept iff
proof_verifiedAND a BFT quorum was claimed. - survives_
partition - Partition tolerance: an obligation established before a partition remains active across the split (standing duties are not silently broken by a network event).
- transaction_
status - A multi-party obligation is
Committedonly when every party has assented; otherwise it isSuspended(Pending). An obligation with no parties cannot commit. - vc_
concurrent - Two vector clocks are concurrent iff neither happens-before the other.
- vc_
happens_ before - Vector-clock happens-before
a → b:a[i] ≤ b[i]for all i ANDa ≠ b. - vc_
merge - Merge vector clocks (componentwise max) into
out— partition-healing reconciliation. Zero-heap (caller-suppliedout).