Skip to main content

Module gates

Module gates 

Source
Expand description

Framework-inserted TX/RX gate ops. Each gate is a compiler- inserted graph op that consults a framework primitive (PeerGovernor, BackoffTable, InboundDedup) and either forwards its envelope/trigger downstream or drops + emits a lifecycle event.

TX-side chain (around wire::Send): wire::SendPeerHealthGateTxBackoffGateTx → outbound

RX-side chain (around wire::Recv): wire::RecvDedupGateRxPeerHealthGateRxBackoffGateRx → user consumer

Modules§

backoff_rx
BackoffGateRx syscall op - gate inserted by the compiler pass bb-compiler/src/insert_backoff_gate_rx.rs in the RX chain. Consults bb_runtime::framework::BackoffTable for the inbound envelope’s source peer and forwards the input value on retry- eligible; drops with a cooldown reason when the peer is still in backoff.
backoff_tx
BackoffGateTx syscall op - gate inserted by the compiler pass bb-compiler/src/insert_backoff_gate_tx.rs between PeerHealthGateTx and wire::Send. Consults bb_runtime::framework::BackoffTable and drops the send if the destination peer is still in cooldown.
dedup_rx
DedupGateRx syscall op - gate inserted by the compiler pass bb-compiler/src/insert_dedup_gate_rx.rs at the head of the RX gate chain. Consults bb_runtime::framework::InboundDedup and drops envelopes whose payload hash has been seen recently.
peer_health_rx
PeerHealthGateRx syscall op - gate inserted by the compiler pass bb-compiler/src/insert_peer_health_gate_rx.rs between every synthesized wire::Recv and its downstream consumers.
peer_health_tx
PeerHealthGateTx syscall op - gate inserted by the compiler pass bb-compiler/src/insert_peer_health_gate_tx.rs upstream of every wire::Send. Consults bb_runtime::framework::PeerGovernor and emits a TriggerValue on Allow; the downstream wire::Send fires only on Allow. On Deny the op returns an OpError whose detail carries a stable label (blocklisted / not_allowlisted / cooldown).