heddleStatic

fun CoroutineScope.heddleStatic(seam: Seam, self: ReplicaId, root: GroupId, mint: Map<ReplicaId, Long>, topology: List<AttachmentRecord> = emptyList(), clock: () -> Instant, config: HeddleConfig, epoch: Long): HeddleNode

Bootstrap a HeddleNode over seam with a fixed roster and a pre-partitioned mint supplied at bootstrap — the static front door of design §9. There is no runtime mint and no consensus dependency: entitlement is created once here, topology changes are local strict-drain operations (HeddleNode.prepare/HeddleNode.activate/…), and any overlapping reshape simply surfaces as a conflict for the operator to drain. This is the right shape for small fixed rosters and tests; the Raft-backed heddleGoverned front door (mint + reshape serialization on the log) arrives in a later phase.

Every peer calls heddleStatic with the same root, mint, and topology, so each derives a byte-identical initial ledger (the mint is keyed by a fixed nonce, and the topology records are applied in id order); the ledgers therefore converge from t0 with no replication needed for the bootstrap state itself. Runtime mutations replicate over the seam.

Time is a dependency (design §11): clock is required, never a wall-clock default — tests inject a controlled () -> Instant.

Receiver

the scope the node's owned coroutines (replication, demand collection, liveness) live on; cancel it to tear the node down.

Parameters

seam

the fabric this peer participates over; the node multiplexes ledger, demand, and liveness channels onto it.

self

this peer's replica identity; must match Seam.selfId by string value.

root

the root group of the fairness tree.

mint

the pre-partitioned root supply — how much entitlement each peer starts holding at the root. Amounts are non-negative.

topology

the initial attachment records, all prepared and activated at bootstrap. Runtime additions go through HeddleNode.prepare/HeddleNode.activate.

clock

the injected wall clock, used for demand TTL and liveness timing.

config

the policy caps, §8.2 bound cap, TTL, and replication/liveness knobs.

epoch

a per-process-boot value that MUST be fresh and strictly increasing on every incarnation of this peer (a persisted monotonic boot counter is canonical). It seeds the high bits of the demand-board clock so a restarted peer's demand always out-clocks its dead incarnation's regardless of TTL timing (#1666). Required, not defaulted — the node cannot self-generate restart-freshness; never derive it from a test-seedable Random. Must be in [0, 2^31).