Skip to main content

VerificationEntry

Struct VerificationEntry 

Source
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>,
    pub unresolved_retries: u32,
    pub no_holder_reported: bool,
}
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: VerificationState

Current 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: Instant

When this entry was created.

§next_verify_at: Instant

Earliest 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.

§unresolved_retries: u32

Consecutive verification rounds that left this key unresolved.

Counts deferrals, not rounds: it advances only when a round ends with no usable holder (or an inconclusive quorum) and the key is put back for a later retry. Zero means the key has not yet failed a round, so the next deferral is its first.

Drives the retry backoff. Lifetime is the entry’s own — eviction and re-admission start a fresh count.

Cleared by a round that did find a holder, so it counts consecutive failures rather than lifetime ones: a key held up only by a full fetch queue is making progress and must not inherit an earlier backoff.

§no_holder_reported: bool

Whether this entry’s one no-holder warning has already been emitted.

Deliberately not derived from Self::unresolved_retries. The two answer different questions: the counter asks “how many consecutive rounds failed”, which an inconclusive quorum legitimately advances, and this asks “have we told anyone”, which only a no-holder result may consume. Deriving one from the other loses the first — and only — warning for any key whose opening round is inconclusive.

Cleared alongside the counter, so “once per episode” is literal: a key that resolves and later becomes unresolvable again is reported again.

Implementations§

Source§

impl VerificationEntry

Source

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

Source§

fn clone(&self) -> VerificationEntry

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VerificationEntry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more