pub struct RewardDistributorCommitment {
pub epoch_start: u64,
pub clawback_puzzle_hash: HexId,
pub rewards_base_units: u64,
pub recoverable_base_units: u64,
}Expand description
One clawback commitment slot for a distributor epoch — SPEC §7.4 clause 5.
§recoverable_base_units is NOT rewards_base_units
Committed is not recoverable: SPEC §7.4 clause 4 / §7.5 return only
withdrawal_share_bps / 10000 of the committed value on clawback (the
remainder is forfeited to the reserve — see
GetRewardDistributorResult::withdrawal_share_bps). Reporting only
rewards_base_units and letting a caller label it “recoverable” would
overstate every clawback by the forfeit fraction — exactly the
one-balance-figure money-honesty failure SPEC §7.4 clause 5 forbids,
relocated from a single total into a single per-slot figure. So the
responder must compute recoverable_base_units itself, with integer
arithmetic in the order rewards_base_units * withdrawal_share_bps / 10_000 — multiply then divide, no floats, truncated (never rounded up:
rounding up would promise money the chain will not return). This type
does not enforce that computation — see below.
Only the holder of the key for clawback_puzzle_hash may claw this slot
back — not an operator role, not the manager singleton, and not the
launcher (SPEC §7.4 clause 3). This field is the proof of entitlement; a
reader must not mistake it for a display label.
This type does not enforce any of the above: recoverable_base_units is
a bare pub u64 with no constructor or validation. The responder
must compute it in the order described; nothing here checks that it did.
Fields§
§epoch_start: u64The epoch this commitment slot funds.
clawback_puzzle_hash: HexIdThe chain’s clawback_ph (SPEC / chia-sdk-types
RewardDistributorCommitmentSlotValue): the puzzle hash whose key
holder alone may claw this slot back.
rewards_base_units: u64The committed amount, in base units.
recoverable_base_units: u64The amount actually recoverable on clawback, in base units —
rewards_base_units * withdrawal_share_bps / 10_000, integer
arithmetic, truncated down. See the type doc for why this must never
be derived by a caller from rewards_base_units alone.
This is share arithmetic only. It is NOT an eligibility claim: it
says what fraction of the slot would return, not that the caller may
claw it back. Entitlement is key-holding against
clawback_puzzle_hash and nothing else (SPEC §7.4 cl. 3).
Trait Implementations§
Source§impl Clone for RewardDistributorCommitment
impl Clone for RewardDistributorCommitment
Source§fn clone(&self) -> RewardDistributorCommitment
fn clone(&self) -> RewardDistributorCommitment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more