Skip to main content

GetRewardDistributorResult

Struct GetRewardDistributorResult 

Source
pub struct GetRewardDistributorResult {
Show 14 fields pub launcher_id: HexId, pub store_id: HexId, pub root: HexId, pub epoch_seconds: u64, pub first_epoch_start: u64, pub payout_threshold: u64, pub fee_bps: u16, pub withdrawal_share_bps: u16, pub reserve_base_units: u64, pub entry_count: u64, pub current_distributor_epoch: u64, pub last_entry_write_at: Option<u64>, pub entry_set_stale: bool, pub observed_at: u64,
}
Expand description

Result for dig.getRewardDistributor — SPEC §2.6, third method: chain-derived distributor state only, never the local prover loop’s own state (see RewardProverStatus for that).

§entry_set_stale lives HERE, never on RewardProverStatus

This is the one boolean in the reward-distributor surface, and it belongs here specifically: per SPEC §12.4 it is computed by the responder from the distributor singleton’s on-chain spend history at read time, not self-reported by a possibly-wedged writer. Copying it onto RewardProverStatus would reintroduce exactly the self-reported-health failure that type’s doc comment forbids — see that type for the full argument.

Fields§

§launcher_id: HexId

The distributor singleton’s launcher id (64-hex).

§store_id: HexId

The backing store’s launcher id (64-hex).

§root: HexId

The store’s current generation root (64-hex).

§epoch_seconds: u64

The payout epoch length, in seconds.

§first_epoch_start: u64

Unix seconds the first epoch started.

§payout_threshold: u64

The reserve threshold, in base units, that triggers a payout.

§fee_bps: u16

The distributor’s fee, in basis points.

§withdrawal_share_bps: u16

The share of a clawed-back commitment the committer recovers, in basis points — SPEC §7.5. withdrawal_share_bps = 9000 means a clawback returns 90% of the committed value; the remaining 10% is forfeited to the reserve as a deterrent against the funder (SPEC §7.5 clause 1: it is priced correctly and is not compensation to induced mirrors). Curried at launch and immutable, same as Self::fee_bps beside it.

§reserve_base_units: u64

The current reserve, in base units.

§entry_count: u64

The current entry-set size.

§current_distributor_epoch: u64

The current epoch index (0-based from first_epoch_start).

§last_entry_write_at: Option<u64>

Unix seconds of the most recent entry-set write on chain, if any. None together with a non-zero reserve_base_units implies stale: an entry set that has never been written is maximally stale, not unknown, and a consumer MUST NOT render it as blank or “unknown” (SPEC §2.4 cl. 1 — silence is not an acceptable representation of “not distributing”).

§entry_set_stale: bool

true when the entry set has not changed in STALE_ENTRY_SET_SECONDS = 172_800 (48 h) while the reserve is non-zero — SPEC §12.4. A drained distributor with a frozen entry set is not stale, it is Unfunded; the non-zero-reserve conjunct exists to keep the two states distinct. The responder computes this at read time from the singleton’s own on-chain spend history — it is not self-reported, so a wedged prover cannot fake it. See the type doc for why this boolean is safe here and forbidden on RewardProverStatus.

§observed_at: u64

Unix seconds this result was assembled.

Trait Implementations§

Source§

impl Clone for GetRewardDistributorResult

Source§

fn clone(&self) -> GetRewardDistributorResult

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 GetRewardDistributorResult

Source§

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

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

impl<'de> Deserialize<'de> for GetRewardDistributorResult

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 Eq for GetRewardDistributorResult

Source§

impl PartialEq for GetRewardDistributorResult

Source§

fn eq(&self, other: &GetRewardDistributorResult) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for GetRewardDistributorResult

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

impl StructuralPartialEq for GetRewardDistributorResult

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