pub struct Policy {
Show 44 fields pub max_aggregated_sectors: u64, pub min_aggregated_sectors: u64, pub max_aggregated_proof_size: usize, pub max_replica_update_proof_size: usize, pub pre_commit_sector_batch_max_size: usize, pub prove_replica_updates_max_size: usize, pub expired_pre_commit_clean_up_delay: i64, pub wpost_proving_period: ChainEpoch, pub wpost_challenge_window: ChainEpoch, pub wpost_period_deadlines: u64, pub wpost_max_chain_commit_age: ChainEpoch, pub wpost_dispute_window: ChainEpoch, pub sectors_max: usize, pub max_partitions_per_deadline: u64, pub max_control_addresses: usize, pub max_peer_id_length: usize, pub max_multiaddr_data: usize, pub addressed_partitions_max: u64, pub declarations_max: u64, pub addressed_sectors_max: u64, pub max_pre_commit_randomness_lookback: ChainEpoch, pub pre_commit_challenge_delay: ChainEpoch, pub wpost_challenge_lookback: ChainEpoch, pub fault_declaration_cutoff: ChainEpoch, pub fault_max_age: ChainEpoch, pub worker_key_change_delay: ChainEpoch, pub min_sector_expiration: i64, pub max_sector_expiration_extension: i64, pub deal_limit_denominator: u64, pub consensus_fault_ineligibility_duration: ChainEpoch, pub new_sectors_per_period_max: usize, pub chain_finality: ChainEpoch, pub valid_post_proof_type: HashSet<RegisteredPoStProof>, pub valid_pre_commit_proof_type: HashSet<RegisteredSealProof>, pub minimum_verified_allocation_size: StoragePower, pub minimum_verified_allocation_term: i64, pub maximum_verified_allocation_term: i64, pub maximum_verified_allocation_expiration: i64, pub end_of_life_claim_drop_period: ChainEpoch, pub deal_updates_interval: i64, pub prov_collateral_percent_supply_num: i64, pub prov_collateral_percent_supply_denom: i64, pub market_default_allocation_term_buffer: i64, pub minimum_consensus_power: StoragePower,
}

Fields§

§max_aggregated_sectors: u64

Maximum amount of sectors that can be aggregated.

§min_aggregated_sectors: u64

Minimum amount of sectors that can be aggregated.

§max_aggregated_proof_size: usize

Maximum total aggregated proof size.

§max_replica_update_proof_size: usize

Maximum total replica update proof size.

§pre_commit_sector_batch_max_size: usize

The maximum number of sector pre-commitments in a single batch. 32 sectors per epoch would support a single miner onboarding 1 EiB of 32 GiB sectors in 1 year.

§prove_replica_updates_max_size: usize

The maximum number of sector replica updates in a single batch.

§expired_pre_commit_clean_up_delay: i64

The delay between pre-commit expiration and clean up from state. This enforces that expired pre-commits stay in state for a period of time creating a grace period during which a late-running aggregated prove-commit can still prove its non-expired pre-commits without resubmitting a message

§wpost_proving_period: ChainEpoch

The period over which all a miner’s active sectors will be challenged.

§wpost_challenge_window: ChainEpoch

The duration of a deadline’s challenge window, the period before a deadline when the challenge is available.

§wpost_period_deadlines: u64

The number of non-overlapping PoSt deadlines in each proving period.

§wpost_max_chain_commit_age: ChainEpoch

The maximum distance back that a valid Window PoSt must commit to the current chain.

§wpost_dispute_window: ChainEpoch

WPoStDisputeWindow is the period after a challenge window ends during which PoSts submitted during that period may be disputed.

§sectors_max: usize

The maximum number of sectors that a miner can have simultaneously active. This also bounds the number of faults that can be declared, etc.

§max_partitions_per_deadline: u64

Maximum number of partitions that will be assigned to a deadline. For a minimum storage of up-to 1 EiB, we need 300 partitions per deadline. 48 * 32 GiB * 2349 * 300 = 1.00808144 EiB So, to support up-to 10 Eib storage, we set this to 3000.

§max_control_addresses: usize

Maximum number of control addresses a miner may register.

§max_peer_id_length: usize

MaxPeerIDLength is the maximum length allowed for any on-chain peer ID. Most Peer IDs are expected to be less than 50 bytes.

§max_multiaddr_data: usize

MaxMultiaddrData is the maximum amount of data that can be stored in Multiaddrs.

§addressed_partitions_max: u64

The maximum number of partitions that may be required to be loaded in a single invocation. This limits the number of simultaneous fault, recovery, or sector-extension declarations. With 48 deadlines (half-hour), 200 partitions per declaration permits loading a full EiB of 32 GiB sectors with 1 message per epoch within a single half-hour deadline. A miner can of course submit more messages.

§declarations_max: u64

Maximum number of unique “declarations” in batch operations.

§addressed_sectors_max: u64

The maximum number of sector infos that may be required to be loaded in a single invocation.

§max_pre_commit_randomness_lookback: ChainEpoch§pre_commit_challenge_delay: ChainEpoch

Number of epochs between publishing the pre-commit and when the challenge for interactive PoRep is drawn used to ensure it is not predictable by miner.

§wpost_challenge_lookback: ChainEpoch

Look-back from the deadline’s challenge window opening from which to sample chain randomness for the challenge seed. This lookback exists so that deadline windows can be non-overlapping (which make the programming simpler) but without making the miner wait for chain stability before being able to start on PoSt computation. The challenge is available this many epochs before the window is actually open to receiving a PoSt.

§fault_declaration_cutoff: ChainEpoch

Minimum period before a deadline’s challenge window opens that a fault must be declared for that deadline. This lookback must not be less than WPoStChallengeLookback lest a malicious miner be able to selectively declare faults after learning the challenge value.

§fault_max_age: ChainEpoch

The maximum age of a fault before the sector is terminated.

§worker_key_change_delay: ChainEpoch

Staging period for a miner worker key change. Finality is a harsh delay for a miner who has lost their worker key, as the miner will miss Window PoSts until it can be changed. It’s the only safe value, though. We may implement a mitigation mechanism such as a second key or allowing the owner account to submit PoSts while a key change is pending.

§min_sector_expiration: i64

Minimum number of epochs past the current epoch a sector may be set to expire.

§max_sector_expiration_extension: i64

Maximum number of epochs past the current epoch a sector may be set to expire. The actual maximum extension will be the minimum of CurrEpoch + MaximumSectorExpirationExtension and sector.ActivationEpoch + sealProof.SectorMaximumLifetime()

§deal_limit_denominator: u64

Ratio of sector size to maximum deals per sector. The maximum number of deals is the sector size divided by this number (2^27) which limits 32 GiB sectors to 256 deals and 64 GiB sectors to 512

§consensus_fault_ineligibility_duration: ChainEpoch

Number of epochs after a consensus fault for which a miner is ineligible for permissioned actor methods and winning block elections.

§new_sectors_per_period_max: usize

The maximum number of new sectors that may be staged by a miner during a single proving period.

§chain_finality: ChainEpoch

Epochs after which chain state is final with overwhelming probability (hence the likelihood of two fork of this size is negligible) This is a conservative value that is chosen via simulations of all known attacks.

§valid_post_proof_type: HashSet<RegisteredPoStProof>

Allowed post proof types for new miners

§valid_pre_commit_proof_type: HashSet<RegisteredSealProof>

Allowed pre-commit proof types for new miners

§minimum_verified_allocation_size: StoragePower

Minimum verified deal size

§minimum_verified_allocation_term: i64

Minimum term for a verified data allocation (epochs)

§maximum_verified_allocation_term: i64

Maximum term for a verified data allocation (epochs)

§maximum_verified_allocation_expiration: i64

Maximum time a verified allocation can be active without being claimed (epochs). Supports recovery of erroneous allocations and prevents indefinite squatting on Datacap.

§end_of_life_claim_drop_period: ChainEpoch§deal_updates_interval: i64

The number of blocks between payouts for deals

§prov_collateral_percent_supply_num: i64

Numerator of the percentage of normalized circulating supply that must be covered by provider collateral

§prov_collateral_percent_supply_denom: i64

Denominator of the percentage of normalized circulating supply that must be covered by provider collateral

§market_default_allocation_term_buffer: i64

The default duration after a verified deal’s nominal term to set for the corresponding allocation’s maximum term.

§minimum_consensus_power: StoragePower

Minimum miner consensus power

Implementations§

source§

impl Policy

source

pub fn mainnet() -> Self

source

pub fn calibnet() -> Self

Trait Implementations§

source§

impl Clone for Policy

source§

fn clone(&self) -> Policy

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Policy

source§

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

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

impl<'de> Deserialize<'de> for Policy

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 PartialEq<Policy> for Policy

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Policy

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

source§

impl StructuralEq for Policy

source§

impl StructuralPartialEq for Policy

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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.

§

impl<T> References<RawCodec> for T

§

fn references<R, E>(_c: RawCodec, _r: &mut R, _set: &mut E) -> Result<(), Error>where R: Read, E: Extend<Cid<64>>,

Scrape the references from an impl Read. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,