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: StringLowercase 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: StringThe 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: StringThe 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: u64Sequence 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: u64Cumulative 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: u64Not 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: booltrue 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
impl Clone for LaneSnapshot
Source§impl Debug for LaneSnapshot
impl Debug for LaneSnapshot
Source§impl<'de> Deserialize<'de> for LaneSnapshot
impl<'de> Deserialize<'de> for LaneSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for LaneSnapshot
impl RefUnwindSafe for LaneSnapshot
impl Send for LaneSnapshot
impl Sync for LaneSnapshot
impl Unpin for LaneSnapshot
impl UnsafeUnpin for LaneSnapshot
impl UnwindSafe for LaneSnapshot
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<'de, T> BorrowedRpcObject<'de> for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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