pub struct AuxiliaryPacketInfo {
pub packet_signals: PacketSignals,
pub num_surbs: usize,
pub num_evicted_surbs: usize,
pub min_return_path_hops: Option<u8>,
}Expand description
Contains some miscellaneous information about a received packet.
Fields§
§packet_signals: PacketSignalsPacket signals that the packet carried.
Zero if no signal flags were specified.
num_surbs: usizeNumber of SURBs that the packet carried.
num_evicted_surbs: usizeHow many SURBs the store lost on arrival: the ones that left it, or never entered it, because
the per-pseudonym buffer was already full (SurbInsertOutcome::evicted, a share-less newcomer
the store turned away included), plus the ones a newer SURB generation wiped or an older one
refused (SurbInsertOutcome::superseded). The batch the packet itself carries is counted in
num_surbs, so a refused older-generation batch shows up here as its own size.
This is the only point at which an overflow is visible per packet. The store gives up
share-less SURBs first, and refuses a share-less newcomer before it evicts a share-bearing
SURB, so what an eviction costs depends on what the buffer holds. A share-less SURB is only a
lost return path. A share-bearing one carries a partial SSA share that reaches the
reconstructor only when the SURB is used, so evicting it destroys the share. That only
happens once the buffer holds nothing but shares, which makes this count an upper bound on the
shares lost. The exact figure is SurbInsertOutcome::evicted_shares. It is deliberately not
carried here: it is the store’s own business, reported in its eviction summary (the
ring_share value of the cache label of hopr_surb_store_evictions_count, and a warning per
report interval). The redundancy budget that absorbs those losses is a fixed surplus per
polynomial, and emission is windowed, so on deployed dimensions a burst of roughly
surplus × SHARE_EMISSION_WINDOW evicted share-bearing SURBs (40 448 at the deployed 79 surplus
shares and a window of 512) is enough to put polynomials below their threshold — and a cycle
short of recovery is worth nothing at all. See
SurbStoreConfig::rb_capacity and
hopr_protocol_pix::SHARE_EMISSION_WINDOW.
The Exit’s Session books this count into its SURB flow estimate — an evicted SURB has left the
buffer just as a spent one has — so the meaning above must not change: it is the total of
SURBs that left or never entered the store, not the number of lost shares. The superseded
ones belong in it for the same reason: after the Entry advances the SURB generation, the Exit’s
stock is gone, and the keep-alive that reports its level must say so, or the Entry would read
the pre-wipe level back and never refill. See counterparty_buffer_capacity in
hopr-transport-session.
min_return_path_hops: Option<u8>Fewest intermediate hops on the return path of any SURB the packet carried, or None if it
carried none.
Read off each SURB’s Proof-of-Relay chain length (hops + 1), the same value the reply
ticket is priced by, so it is the SURB creator’s word rather than something this node checked.
Some(0) means at least one SURB routes the reply straight back to its creator, with no first
relayer to acknowledge it — and that acknowledgement is what a PIX share is decrypted with.
Trait Implementations§
Source§impl Clone for AuxiliaryPacketInfo
impl Clone for AuxiliaryPacketInfo
Source§fn clone(&self) -> AuxiliaryPacketInfo
fn clone(&self) -> AuxiliaryPacketInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AuxiliaryPacketInfo
Source§impl Debug for AuxiliaryPacketInfo
impl Debug for AuxiliaryPacketInfo
Source§impl Default for AuxiliaryPacketInfo
impl Default for AuxiliaryPacketInfo
Source§fn default() -> AuxiliaryPacketInfo
fn default() -> AuxiliaryPacketInfo
impl Eq for AuxiliaryPacketInfo
Source§impl PartialEq for AuxiliaryPacketInfo
impl PartialEq for AuxiliaryPacketInfo
impl StructuralPartialEq for AuxiliaryPacketInfo
Auto Trait Implementations§
impl Freeze for AuxiliaryPacketInfo
impl RefUnwindSafe for AuxiliaryPacketInfo
impl Send for AuxiliaryPacketInfo
impl Sync for AuxiliaryPacketInfo
impl Unpin for AuxiliaryPacketInfo
impl UnsafeUnpin for AuxiliaryPacketInfo
impl UnwindSafe for AuxiliaryPacketInfo
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more