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: StringThe peer the graph is walked from.
topic: StringThe topic.
outpoint: StringThe root UTXO, txid.outputIndex.
score: u64The 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: u64Calls spent on this graph over every pass.
passes: u32Passes that deferred it (its age, in passes).
reason: StringWhy 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: boolWhether 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: u32Consecutive 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: boolThe cursor may pass this durable obligation. A false value also reads records written before independent resume support.
faults: u32Consecutive 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: u64Unix seconds before which an unanchorable root is not walked again
(UNANCHORABLE_RETRY_SECS); 0 otherwise.
idle_resumes: u32Consecutive 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: u32Retry 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
impl DeferredGraph
Sourcepub fn is_struck(&self) -> bool
pub fn is_struck(&self) -> bool
Whether this record counts a root’s faulted runs (engine 0.1.9).
Sourcepub fn is_unanchorable(&self) -> bool
pub fn is_unanchorable(&self) -> bool
Whether this record holds an unanchorable root (passable).
pub fn is_dead(&self) -> bool
Sourcepub fn waits_idle(&self, now: u64) -> bool
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.
Sourcepub fn fault_class(&self) -> Option<&str>
pub fn fault_class(&self) -> Option<&str>
The fault class the record names, if it counts faulted runs.