Expand description
Construction-time configuration for a Node.
The local peer identity is required at construction; every other field carries a production-conservative default (cycle-op budget, in-flight async cap, outbound-queue cap, bus capacity).
Structs§
- Node
Config - Construction-time configuration for a
Node.
Constants§
- DEFAULT_
BUS_ CAPACITY - Default bus capacity.
- DEFAULT_
CYCLE_ OP_ BUDGET - Default per-cycle Op budget.
Some(1000)yields voluntarily after 1000 op-invocations per poll; an emit ofEngineStep::CycleBudgetExceededtells the host the engine paused so other work can run.Nonedisables the budget guard. - DEFAULT_
INGRESS_ BYTE_ BUDGET - Default cap on total in-flight ingress bytes the engine may hold
across the ingress queue, slot table, and pending async
completion buffers at any instant. 256 MiB. Wire and application
boundaries
try_chargeagainst this cap before admitting a payload; overflow emits the appropriateBudgetExceededInfraEventand drops the offending bytes. - DEFAULT_
MAX_ APP_ EVENT_ BYTES - Default per-
AppEventpayload cap consulted byNode::deliver_event. 1 MiB. Oversize payloads returnDeliveryError::OversizePayloadsynchronously AND emitAppIngressError { kind: PerItemCapExceeded }on the bus. - DEFAULT_
MAX_ COMPLETION_ RESULT_ BYTES - Default per-
CompletionHandleresult-payload cap. 4 MiB. Larger completions emitAppIngressError { kind: PerItemCapExceeded }and the component sees an async-op timeout in place of the dropped completion. - DEFAULT_
MAX_ INVOKE_ BYTES - Default per-
Invokecumulative payload cap. 10 MiB. Sum of every(name, bytes)entry’s payload length. - DEFAULT_
MAX_ INVOKE_ INPUTS - Default per-
Invokeinput-count cap. 100 inputs. Caller-side guard against pathologicalinvoke()calls; the cap rejects before any per-input allocation runs. - DEFAULT_
MAX_ OUTBOUND_ QUEUE - Default cap on the outbound envelope queue depth.
Some(10_000)drops the oldest envelope when the cap is hit (FIFO drop) and emitsEngineStep::OutboundDropped.Nonedisables the cap. - DEFAULT_
MAX_ PENDING_ ASYNC - Default cap on the number of in-flight
DispatchResult::Asynccommands.Some(10_000)rejects further async dispatches withOpError("pending-async limit exceeded")once the cap is hit - protects against a runaway component returningAsync(_)in a tight loop.Nonedisables the cap. - DEFAULT_
PER_ HOP_ BUDGET_ NS - Default per-target-boundary-hop
budget for sizing async deadlines on wire.Send NodeProtos.
100 ms in nanoseconds. The compiler’s
analyze_wire_dependenciesstamps a staticchain_depthcount on each Send; the engine multiplies by this budget at deadline-stamp time so a Send whose downstream chain reachesNtarget boundaries getsN * per_hop_budget_nsto respond. - EDGE_
INGRESS_ BYTE_ BUDGET - Edge preset for
NodeConfig::ingress_byte_budget. 8 MiB. - EDGE_
MAX_ APP_ EVENT_ BYTES - Edge preset for
NodeConfig::max_app_event_bytes. 64 KiB. - EDGE_
MAX_ COMPLETION_ RESULT_ BYTES - Edge preset for
NodeConfig::max_completion_result_bytes. 64 KiB. - EDGE_
MAX_ INVOKE_ BYTES - Edge preset for
NodeConfig::max_invoke_bytes. 256 KiB. - EDGE_
MAX_ INVOKE_ INPUTS - Edge preset for
NodeConfig::max_invoke_inputs. 16 inputs.