pub struct DPPTokenVersions {
pub identity_token_info_default_structure_version: FeatureVersion,
pub identity_token_status_default_structure_version: FeatureVersion,
pub token_contract_info_default_structure_version: FeatureVersion,
pub token_config_update_action_id_version: FeatureVersion,
pub token_set_price_action_id_version: FeatureVersion,
pub distribution_function_evaluate_version: FeatureVersion,
pub reward_distribution_max_cycle_moment_version: FeatureVersion,
pub distribution_function_cycle_epochs_version: FeatureVersion,
}Fields§
§identity_token_info_default_structure_version: FeatureVersion§identity_token_status_default_structure_version: FeatureVersion§token_contract_info_default_structure_version: FeatureVersion§token_config_update_action_id_version: FeatureVersionVersion for the token config update action_id calculation. v0: uses only the u8 discriminant of the config change item (vulnerable to value swap) v1: includes the full serialized config change item in the hash
token_set_price_action_id_version: FeatureVersionVersion for the set-price-for-direct-purchase action_id calculation. v0: uses only minimum_purchase_amount_and_price().1 (vulnerable to schedule swap) v1: includes the full serialized TokenPricingSchedule in the hash
distribution_function_evaluate_version: FeatureVersionVersion for the transcendental math (ln, exp, pow) in DistributionFunction::evaluate.
v0: std f64 methods, which link to the platform libm and differ by 1 ulp between
aarch64-musl and x86_64-musl (musl’s __FP_FAST_FMA branch); a claim amount can land
on either side of a floor boundary and split the app hash.
v1: the pinned pure-Rust libm crate, bit-identical on every target Platform builds for.
reward_distribution_max_cycle_moment_version: FeatureVersionVersion for RewardDistributionType::max_cycle_moment, the cap on how far a single
perpetual distribution claim may redeem.
v0: start + interval * cycles in the moment’s own width. For epoch-based distributions
that width is u16, so interval * 32_767 (the fixed-amount cycle cap) plus a nonzero
start wraps; release builds carry no overflow checks, the wrapped cap lands below the
start and the claim is refused as having no rewards, forever.
v1: computed in u64 with saturating arithmetic and capped before narrowing back; the
epoch cap is the last completed cycle moment (the previous epoch for an interval of
one, as in v0) so the evaluated range always ends on a cycle boundary.
distribution_function_cycle_epochs_version: FeatureVersionVersion for the epochs a perpetual distribution cycle spans, which weight an evonode
reward by participation in DistributionFunction::evaluate_interval.
v0: the cycle’s step index read as an epoch, right only for an interval of one; for a
wider interval it names epochs before the distribution started, which are outside
the claim’s epoch window, and the claim fails for want of their epoch info.
v1: the interval’s epochs ending at the cycle moment, the span the fixed-amount fast
path already weights.
Trait Implementations§
Source§impl Clone for DPPTokenVersions
impl Clone for DPPTokenVersions
Source§fn clone(&self) -> DPPTokenVersions
fn clone(&self) -> DPPTokenVersions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more