pub struct VerificationEntry {
pub state: VerificationState,
pub verified_sources: Vec<PeerId>,
pub tried_sources: HashSet<PeerId>,
pub created_at: Instant,
pub next_verify_at: Instant,
pub hint_sources: HashSet<PeerId>,
pub replica_hint_sources: HashSet<PeerId>,
}Expand description
Entry in the pending-verification table.
Tracks a single key through the verification FSM, recording which peers responded and which have been tried for fetch.
Fields§
§state: VerificationStateCurrent state in the verification FSM.
verified_sources: Vec<PeerId>Peers that responded Present during verification (verified fetch
sources).
tried_sources: HashSet<PeerId>Peers already tried for fetch (to avoid retrying the same source).
created_at: InstantWhen this entry was created.
next_verify_at: InstantEarliest time this key should be included in another verification round.
hint_sources: HashSet<PeerId>Routing-table peers that advertised this key and have not subsequently departed. Duplicate hints add to this set instead of being discarded.
replica_hint_sources: HashSet<PeerId>Subset of Self::hint_sources that advertised a replica hint and
therefore claimed chunk possession. Paid-only advertisers are excluded.
Implementations§
Source§impl VerificationEntry
impl VerificationEntry
Sourcepub fn pipeline(&self) -> HintPipeline
pub fn pipeline(&self) -> HintPipeline
Which pipeline this key arrived on.
Derived from Self::replica_hint_sources rather than stored: the
pipeline is “did any peer claim to hold this key”, so a stored copy
can only drift from its own definition as advertisers are merged in and
departed peers are pruned out.
This describes hint provenance, not authorization. It selects fetch
sources (only a peer claiming possession is worth fetching from) and
scopes sole-source trust penalties. It must never gate storage:
possession claims come from the sender, so treating one as permission to
store lets a peer conscript a node that carries no responsibility for
the key. Storage responsibility is decided separately, against live
routing state, by is_responsible(storage_admission_width) at the point
of download.
Trait Implementations§
Source§impl Clone for VerificationEntry
impl Clone for VerificationEntry
Source§fn clone(&self) -> VerificationEntry
fn clone(&self) -> VerificationEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for VerificationEntry
impl RefUnwindSafe for VerificationEntry
impl Send for VerificationEntry
impl Sync for VerificationEntry
impl Unpin for VerificationEntry
impl UnsafeUnpin for VerificationEntry
impl UnwindSafe for VerificationEntry
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,
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> 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