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§
- Envelope
Caps - bounded-decode caps applied by
EnvelopeCodec::decode_cappedbefore any prost allocation. Production deployments override viaNodeConfig(); the defaults match the design’s “16 MiB / 256 / 4 MiB / 4 KiB” recommendation indocs-plan/CORRECTED_ARCHITECTURE.md§Edge bounds. - Envelope
Codec - Envelope encode + decode helper. Stateless; thin façade over
prost’s
Message::encode_to_vec/Message::decode. - Slot
Fill - 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. - Wire
Correlation - Correlation header. Empty
wire_req_id(= 0) is valid only whenkind == NONE. - Wire
Envelope - 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
fillsso one envelope completes the data-plane DAG.
Enums§
- Correlation
Kind - Request/response correlation discriminator.
- Envelope
Decode Error - Errors
EnvelopeCodec::decode_cappedcan surface.
Constants§
- ENVELOPE_
SCHEMA_ VERSION - Current
WireEnvelopeschema 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 asEnvelopeDecodeError::VersionMismatch.