Consensus: Blocklace + Cordial Miners

dregg federations use the Blocklace protocol with Cordial Miners for total ordering. This replaces the previous Morpheus DAG-BFT. The Blocklace is a CRDT DAG where equivocation is structurally detectable, and Cordial Miners provides 3-round BFT finality.

Three-Tier Execution Model

Not all operations require consensus. dregg provides three execution tiers with increasing coordination cost:

TierMechanismLatencyWhen Used
Sovereign (PCO) Local execution + STARK proof Instant Default. Agent proves own state transitions. No federation contact.
Optimistic (Stingray COD) Bounded counters, commit-on-demand Fast (local) Concurrent resource spending. Each silo debits locally within its budget slice.
Ordered (Cordial Miners) Blocklace DAG, 3-round BFT 3 rounds When total ordering is required: nullifier tracking, shared state, disputes.

Most turns execute at the sovereign tier. Agents escalate to ordered consensus only when they need it (double-spend prevention, public orderbooks, dispute resolution).

The Blocklace

The Blocklace is a DAG data structure where each block references all known tips (its causal predecessors). Key properties:

Blocklace DAG — 3 creators, 2 rounds, one finalized tip.

A three-node federation after two rounds. Each round-1 block references all known round-0 tips (its causal past). The highlighted ring marks the round-1 tip selected as leader by lowest-hash; its causal history is appended to the total order.

Cordial Miners (Total Ordering)

When total ordering is needed, Cordial Miners operates over the Blocklace:

  1. A miner creates a block referencing all known tips (cordial dissemination).
  2. When 2f+1 blocks at the same round are observed, the round is closed.
  3. A deterministic rule (lowest hash among qualifying round-r blocks) selects the leader for that round.
  4. The leader's causal past, minus already-committed blocks, is appended to the total order.

Finality requires 3 communication rounds. Safety relies on the Blocklace's equivocation-detection property. Tolerates f < n/3 Byzantine nodes.

A single-node federation (n=1) is simply Cordial Miners with a trivial committee. The same code path handles solo agents and large federations -- no special "solo mode."

Constitutional Consensus (Membership)

Federation membership is governed by Constitutional Consensus -- a democratic protocol built on the Blocklace:

This replaces epoch-based reconfiguration: membership changes are continuous and take effect as soon as the Blocklace records sufficient support.

Persistence and Bootstrapping

Nodes persist state across restarts using redb (ACID, WAL, crash-safe):

Fast-Sync for New Nodes

A new node joining a federation does not replay the full Blocklace history:

  1. Request the latest checkpoint from any federation peer (checkpoint serving API).
  2. Verify the checkpoint's attested root against a known trust anchor.
  3. Resume Blocklace participation from the checkpoint height.

Sync time is O(checkpoint_size), not O(history) -- typically seconds for a mature federation.

Network Dissemination