Skip to main content

DeferredGraph

Struct DeferredGraph 

Source
pub struct DeferredGraph {
Show 17 fields pub peer: String, pub topic: String, pub outpoint: String, pub score: u64, pub nodes: Vec<WalkedNode>, pub pending: Vec<PendingInput>, pub calls: u64, pub passes: u32, pub reason: String, pub configured: bool, pub idle_faults: u32, pub cursor_passable: bool, pub faults: u32, pub retry_at: u64, pub idle_resumes: u32, pub unanchorable_retries: u32, pub expiry: Option<u64>,
}
Expand description

The persisted partial walk of ONE graph (bsv-low #555): one record per (peer, topic, root outpoint), REPLACED on every deferral, never appended.

Fields§

§peer: String

The peer the graph is walked from.

§topic: String

The topic.

§outpoint: String

The root UTXO, txid.outputIndex.

§score: u64

The root UTXO’s score at the peer.

§nodes: Vec<WalkedNode>

The nodes fetched so far, with their proofs, in append order.

§pending: Vec<PendingInput>

The inputs still to ask for, a stack (the last is asked next).

§calls: u64

Calls spent on this graph over every pass.

§passes: u32

Passes that deferred it (its age, in passes).

§reason: String

Why it was last deferred: calls, time, bytes, nodes, fault, anchor_unavailable, anchor_walk_held (the E592 lens fold: the anchor’s walk past the budget, held until the root is served proven), not_landed or peer_deadline; for a root whose walk faulted (engine 0.1.9) retry:fault:<class> under UNANCHORABLE_AFTER_FAULTED_RUNS runs, unanchorable:<class> at it.

§configured: bool

Whether the peer is a CONFIGURED one (SyncTarget::Peers), not one ls_ship discovered (bsv-low #555, the delta-2 fold’s D2-M2): a storage reserves part of its ceiling for these (the worker: records of discovered peers hold at most half of it). Set by the storage adapter on every save; false in a record saved before the fold.

§idle_faults: u32

Consecutive RESUMED passes that faulted having appended no node (the delta-2 fold’s D2-M2): the record is dropped (idle_faults) when it reaches DEFERRED_GRAPH_MAX_IDLE_FAULTS; a pass that appends a node resets it.

§cursor_passable: bool

The cursor may pass this durable obligation. A false value also reads records written before independent resume support.

§faults: u32

Consecutive runs whose walk of this root faulted (engine 0.1.9): a record retry:fault:<class> under UNANCHORABLE_AFTER_FAULTED_RUNS, unanchorable:<class> at it. 0 in every other record (and not written, so their JSON is unchanged).

§retry_at: u64

Unix seconds before which an unanchorable root is not walked again (UNANCHORABLE_RETRY_SECS); 0 otherwise.

§idle_resumes: u32

Consecutive passes that RESUMED this held record and appended no node (engine 0.1.10): at IDLE_RESUMES_BEFORE_BACKOFF the record waits IDLE_RESUME_RETRY_SECS (its retry_at) before its next resume; a pass that appends a node resets it. 0 in every other record (and not written, so their JSON is unchanged).

§unanchorable_retries: u32

Retry reservations made after the unanchorable verdict, including cuts.

§expiry: Option<u64>

Advert expiry read by the topic manager from the content-addressed root.

Implementations§

Source§

impl DeferredGraph

Source

pub fn is_struck(&self) -> bool

Whether this record counts a root’s faulted runs (engine 0.1.9).

Source

pub fn is_unanchorable(&self) -> bool

Whether this record holds an unanchorable root (passable).

Source

pub fn is_dead(&self) -> bool

Source

pub fn waits_idle(&self, now: u64) -> bool

Whether this held record waits out the long backoff of its idle resumes at now (engine 0.1.10): not resumed, the cursor passes it. A fault record keeps its own backoff, a record that holds the cursor is never backed off.

Source

pub fn fault_class(&self) -> Option<&str>

The fault class the record names, if it counts faulted runs.

Source

pub fn byte_size(&self) -> usize

The record’s size as stored (its JSON): what the deferral’s log line and a storage’s byte budget read. Nothing refuses a record for it (bsv-low #585).

Trait Implementations§

Source§

impl Clone for DeferredGraph

Source§

fn clone(&self) -> Self

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 DeferredGraph

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DeferredGraph

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for DeferredGraph

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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<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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> 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, !>

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