RUNG 01
Refuse New Peerings
When aggregate pressure exceeds 75% of declared capacity, incoming peering requests are declined with code CAPACITY_EXCEEDED.
Active connections continue normally.
subsystems · capacity & strain · § Grants · § Capacity ladder · § Strain ledger
Capacity management in meshnode: aggregate host ceilings, four-rung load shedding in node/capacity.py, and directional anomaly tracking in node/strain.py.
Subsystem Summary
Fleetmesh provides defensive node capacity management. Nodes scale throughput through verified traffic, shed load sequentially under peak pressure, and track directional strain locally without broadcasting unprovable claims.
The reference implementation provides two dedicated subsystems: node/capacity.py manages host aggregate ceilings through a four-rung load-shedding ladder, and node/strain.py records operational anomalies to calibrate internal reserves and detect single-peer topological bottlenecks.
Problem Architecture
Evaluating bilateral grants with static limits introduces two critical vulnerabilities:
The meshnode daemon resolves both issues by tying additive recovery to active utilization and enforcing an aggregate host capacity ladder.
events_in limits after an S1 halving. Under the load-weighted algorithm, active peers carrying real volume recover in eight windows, while idle peers remain restricted to baseline capacity.
Subsystem 01 · node/capacity.py
A node declares its aggregate capacity ceiling under capacity in config.json.
This configuration is live: operators can adjust or remove ceilings on a running node, and the daemon applies changes on its next scheduler tick.
RUNG 01
Refuse New Peerings
When aggregate pressure exceeds 75% of declared capacity, incoming peering requests are declined with code CAPACITY_EXCEEDED.
Active connections continue normally.
RUNG 02
Narrow Shard Scope
At 85% sustained pressure, the node pauses claims on non-essential mesh-replicated shards, conserving bandwidth for first-hand shards.
Replication slows; core relays stay up.
RUNG 03
Proportional Amendment
At 95% pressure, the node amends outbound grants downward proportionally across active peers, retaining original limits in memory for subsequent restoration.
Prevents resource exhaustion.
RUNG 04
Leaf Mode
At 100% capacity, the node halts ingress pull requests and opens no new sessions until pressure subsides, while continuing to serve accounting receipts.
Preserves bilateral accounting integrity.
# Inspect current capacity and load-shedding status python3 -m node.meshnode capacity /var/lib/meshnode # Output: # aggregate capacity: events_in 500,000 / hr bytes_in 500 MB / hr # current pressure: 42% (peak observed: 68%) # engaged rungs: none (normal operations) # historical peak: window 496810 (340,120 events)
Subsystem 02 · node/strain.py
Transient network anomalies—such as client reconnects, temporary socket timeouts, dropped subscriptions, and minor clock drift—occur routinely. Fleetmesh treats these events as local operational noise rather than formal fraud disputes.
The StrainLedger subsystem in node/strain.py stores survived anomalies in accounts.sqlite. These records remain local to the node and adjust internal operational parameters:
When a node receives most volume from a single upstream partner, it develops topological fragility. If that sole peer fails, the dependent node loses connectivity.
StrainLedger groups telemetry by direction (a tuple of (peer, shard, transport)) and weights observations using the peer trust tier:
0.0. Unverified accounts cannot alter node strain metrics or trigger directional alerts.1.0. Established peers contribute to topological health indicators.# Inspect strain metrics and directional topology python3 -m node.meshnode strain /var/lib/meshnode # Output: # distinct directions: 4 # dominant share: 31% (f22c163a211c50e3 / bristol / wss) # flag tree status: healthy (no unilateral structural dependence) # reserve multiple: 1.2x (normal backoff and retention)
Core Invariants
Reference implementations for capacity and strain tracking are available in
node/capacity.py and node/strain.py. Relevant specification sections include
§ Grants & receipts,
§ Severity ladder, and
§ Trust weighting.