pub struct EnvelopeCaps {
pub max_total_bytes: usize,
pub max_slot_fills: usize,
pub max_per_fill_bytes: usize,
pub max_dest_suffix_bytes: usize,
pub max_src_peer_addresses: usize,
pub max_src_peer_address_bytes: usize,
}Expand description
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.
Fields§
§max_total_bytes: usizeReject inbound buffers whose length exceeds this.
max_slot_fills: usizeReject envelopes whose fills.len() exceeds this.
max_per_fill_bytes: usizeReject any SlotFill whose payload.len() exceeds this.
max_dest_suffix_bytes: usizeReject any SlotFill whose dest_suffix.len() exceeds this.
max_src_peer_addresses: usizeReject envelopes whose src_peer_addresses.len() exceeds
this. Caps sender-driven AddressBook growth at the receiver.
max_src_peer_address_bytes: usizeReject any src_peer_addresses entry whose length exceeds
this. Caps per-address allocation to a single multiaddr’s
realistic envelope.
Implementations§
Source§impl EnvelopeCaps
impl EnvelopeCaps
Trait Implementations§
Source§impl Clone for EnvelopeCaps
impl Clone for EnvelopeCaps
Source§fn clone(&self) -> EnvelopeCaps
fn clone(&self) -> EnvelopeCaps
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EnvelopeCaps
Source§impl Debug for EnvelopeCaps
impl Debug for EnvelopeCaps
Auto Trait Implementations§
impl Freeze for EnvelopeCaps
impl RefUnwindSafe for EnvelopeCaps
impl Send for EnvelopeCaps
impl Sync for EnvelopeCaps
impl Unpin for EnvelopeCaps
impl UnsafeUnpin for EnvelopeCaps
impl UnwindSafe for EnvelopeCaps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedComponent for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request