@pwngh/economy-lab
    Preparing search index...

    Interface ClusterNodeOptions

    The node's identity and peers, plus the two bounds the epoch-age law binds together: every epoch on this node rotates within epochMaxAgeMs, and a due rotation is only observed a sweep cadence later, so the orphan sweep settles nothing younger than twice that bound. Construction throws CONFIG_INVALID on a settleOlderThanMs under 2 * epochMaxAgeMs — a lower bound would let the sweep settle an epoch a live node could still be filling.

    interface ClusterNodeOptions {
        epochMaxAgeMs?: number;
        nodeId: string;
        nodes: readonly string[];
        sweep?: { limit?: number; settleOlderThanMs: number };
    }
    Index
    epochMaxAgeMs?: number

    The rotation bound every epoch on this node lives under — the lane manager's epochMaxAgeMs when lanes run here (see laneOptions), the host's own rotation cadence for raw sessions. Default 60_000 ms.

    nodeId: string

    This node's name; must appear in nodes.

    nodes: readonly string[]

    Every node in the deployment. All nodes must construct from the same list.

    sweep?: { limit?: number; settleOlderThanMs: number }

    Orphan settling opt-in (settling moves money). Absent, sweepOrphans still reports crashed epochs; it settles nothing.

    Type Declaration

    • Optionallimit?: number

      Max sessions inspected per sweep run. Default 100.

    • settleOlderThanMs: number

      The sweep settles sessions at least this old (ms). Held to the epoch-age law: at least 2 * epochMaxAgeMs, enforced at construction.