Skip to main content

LaneSnapshot

Struct LaneSnapshot 

Source
pub struct LaneSnapshot {
    pub pool_id: String,
    pub counterparty: String,
    pub voucher_signer: String,
    pub last_nonce: u64,
    pub outstanding_micro_usdc: u64,
    pub deposit_micro_usdc: u64,
    pub seconds_since_last_voucher: Option<u64>,
    pub settlement_eligible: bool,
}
Expand description

JSON view of one lane this node provides against a PaymentPool, emitted by admin_v1_lanes (issue #749). A lane is keyed by (pool_id, signer, provider) — decdn_incentive::LaneKey. Defined separately from decdn-incentive’s internal LaneState so the replay-critical last_* accessors, the U256 money types, and any future internal fields can’t leak into the wire format: every field here is a plain owned wire value. Shared between the server (serializes) and decdn node lanes (deserializes via the generated client).

Money amounts are reported in micro-USDC (u64) — the same base unit blockchain.redeem_threshold_micro_usdc is configured in. The underlying LaneState carries them as U256; the server narrows with u64::try_from(...).unwrap_or(u64::MAX), so a value that somehow exceeded u64::MAX micro-USDC (~1.8e13 USDC — unreachable for a real pool) saturates rather than wraps.

Fields§

§pool_id: String

Lowercase hex of the on-chain PaymentPool id (LaneKey::pool_id), 0x-prefixed — same 32-byte encoding alloy’s B256 Display produces. Shared by every lane drawing from the same pool.

§counterparty: String

The pool owner’s Ethereum address — the deposit owner and refund destination, and the subject of the ADR-011 blacklist gates. Rendered as an EIP-55 mixed-case checksummed hex string (0x-prefixed) — alloy’s Address Display. Note this differs from an iroh node id, which is plain lowercase hex of an Ed25519 public key (a different identity type, not an EVM address). It is not necessarily the voucher signer — see Self::voucher_signer.

§voucher_signer: String

The capability signer authorizing vouchers on this lane (LaneKey::signer): the EIP-712 recovery target for every voucher, in the same EIP-55 rendering as Self::counterparty. Equal to counterparty for the ordinary self-signing case, and a distinct delegate key when the pool owner delegated signing.

§last_nonce: u64

Sequence number of the most-recently-accepted voucher. Not tracked in the shared-pool model (a pool has no per-lane nonce), so this always reports 0.

§outstanding_micro_usdc: u64

Cumulative amount of the most-recently-accepted voucher, in micro-USDC (LaneState::last_amount). This is the node’s total accrued claim on this lane — the figure that crosses the redemption threshold. 0 before any voucher.

§deposit_micro_usdc: u64

Not tracked in the shared-pool model (the pool’s deposit is shared across every lane it funds, so no single lane owns a deposit), so this always reports 0.

§seconds_since_last_voucher: Option<u64>

Whole seconds since this process last accepted a voucher on this lane, or None when no voucher has been observed since the node started. The activity clock is in-memory: a lane hydrated from lanes.redb at boot reports None until its next voucher, because the persisted LaneState carries no last-voucher wall-clock. Operators use this to spot stale lanes (high outstanding but no recent vouchers).

§settlement_eligible: bool

true when the accrued claim (outstanding_micro_usdc) has reached the node’s configured redemption threshold (blockchain.redeem_threshold_micro_usdc), i.e. the redeemer would redeem this lane on its next tick. This is an upper-bound signal: the admin surface does not read the on-chain redeemed amount, so it compares the full accrued claim (not the un-redeemed delta) against the threshold. A lane that already redeemed up to its current claim may still report true until the next voucher advances it — surfaced so operators can see which lanes are at or above the redemption bar.

Trait Implementations§

Source§

impl Clone for LaneSnapshot

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 LaneSnapshot

Source§

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

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

impl<'de> Deserialize<'de> for LaneSnapshot

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 LaneSnapshot

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<'de, T> BorrowedRpcObject<'de> for T
where T: RpcBorrow<'de> + RpcSend,

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> 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> MaybeSend for T
where T: Send,

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<'de, T> RpcBorrow<'de> for T
where T: Deserialize<'de> + Debug + Send + Sync + Unpin,

Source§

impl<T> RpcObject for T
where T: RpcSend + RpcRecv,

Source§

impl<T> RpcRecv for T
where T: DeserializeOwned + Debug + Send + Sync + Unpin + 'static,

Source§

impl<T> RpcSend for T
where T: Serialize + Clone + Debug + Send + Sync + Unpin,

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