Skip to main content

Module envelope

Module envelope 

Source
Expand description

WireEnvelope codec; per-type decoders register through bb_ir::slot_value::register_type_node!. WireEnvelope codec

Encodes/decodes the canonical WireEnvelope proto message via prost. The envelope carries a resolved dest_peer_addresses: repeated bytes ordered address list plus one or more typed SlotFills. Each fill’s dest_suffix identifies the local destination (data-plane slot or control-plane component op) via intra-node address segments; receivers route by parsing the suffix. The wire syscall resolves PeerId → Vec<Address> via the framework’s AddressBook before shipping; the host transport picks one entry by capability.

Structs§

EnvelopeCaps
bounded-decode caps applied by EnvelopeCodec::decode_capped before any prost allocation. Production deployments override via NodeConfig (); the defaults match the design’s “16 MiB / 256 / 4 MiB / 4 KiB” recommendation in docs-plan/CORRECTED_ARCHITECTURE.md §Edge bounds.
EnvelopeCodec
Envelope encode + decode helper. Stateless; thin façade over prost’s Message::encode_to_vec / Message::decode.
SlotFill
One slot-fill record carried inside a WireEnvelope. Each fill names its destination via a multiaddr suffix that’s appended to the receiver’s self-identity to form the full address.
WireCorrelation
Correlation header. Empty wire_req_id (= 0) is valid only when kind == NONE.
WireEnvelope
The unit of wire delivery — one delivery to one peer. Per the analyzer’s batching (ANALYSIS.md §9 analyze_wire_edges), a Send op with N typed inputs packs all N as fills so one envelope completes the data-plane DAG.

Enums§

CorrelationKind
Request/response correlation discriminator.
EnvelopeDecodeError
Errors EnvelopeCodec::decode_capped can surface.

Constants§

ENVELOPE_SCHEMA_VERSION
Current WireEnvelope schema version. Bumped when a field’s semantics changes in a way old code cannot soundly handle.
SUPPORTED_SCHEMA_VERSIONS
Supported schema versions this build will accept on decode_capped. Mismatch surfaces as EnvelopeDecodeError::VersionMismatch.