Structs

Miner Actor here in order to update the Power Actor to v3.

Base penalty for a successful disputed window post proof.

Base reward for successfully disputing a window posts proofs.

Wrapper for working with an AMTChainEpoch*Bitfield functioning as a queue, bucketed by epoch. Keys in the queue are quantized (upwards), modulo some offset, to reduce the cardinality of keys.

Deadline holds the state for all sectors due at a specific deadline.

Maps deadlines to partition maps.

Deadlines contains Deadline objects, describing the sectors due at the given deadline and their state (faulty, terminated, recovering, etc.).

A queue of expiration sets by epoch, representing the on-time or early termination epoch for a collection of sectors. Wraps an AMTChainEpoch*ExpirationSet. Keys in the queue are quantized (upwards), modulo some offset, to reduce the cardinality of keys.

ExpirationSet is a collection of sector numbers that are expiring, either due to expected “on-time” expiration at the end of their life, or unexpected “early” termination due to being faulty for too long consecutively. Note that there is not a direct correspondence between on-time sectors and active power; a sector may be faulty but expiring on-time if it faults just prior to expected termination. Early sectors are always faulty, and active power always represents on-time sectors.

Storage miner actor constructor params are defined here so the power actor can send them to the init actor to instantiate miners.

Static information about miner

Maps partitions to sector bitfields.

Information stored on-chain for a proven sector.

Information stored on-chain for a pre-committed sector.

Balance of Miner Actor should be greater than or equal to the sum of PreCommitDeposits and LockedFunds. It is possible for balance to fall below the sum of PCD, LF and InitialPledgeRequirements, and this is a bad state (IP Debt) that limits a miner actor’s behavior (i.e. no balance withdrawals) Excess balance as computed by st.GetAvailableBalance will be withdrawable or usable for pre-commit deposit or pledge lock-up.

Information submitted by a miner to provide a Window PoSt.

Specification for a linear vesting schedule.

Represents the vesting table state for the miner. It is a slice of (VestingEpoch, VestingAmount). The slice will always be sorted by the VestingEpoch.

Enums

Storage Miner actor methods available

Constants

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 32GiB sectors with 1 message per epoch within a single half-hour deadline. A miner can of course submit more messages.

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

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.

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

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 32GiB sectors to 256 deals and 64GiB sectors to 512

Maximum number of unique “declarations” in batch operations.

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 precommits without resubmitting a message

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.

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

Maximum total aggregated proof size.

Maximum amount of sectors that can be aggregated.

Maximum number of control addresses a miner may register.

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

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

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

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()

Minimum amount of sectors that can be aggregated.

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

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

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

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

Prefix for sealed sector CIDs (CommR).

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

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.

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

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

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

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

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

Functions

Checks whether a seal proof type is supported for new miners and sectors.

List of proof types which can be used when creating new miner actors

Returns true if the deadline at the given index is currently mutable.

The projected block reward a sector would earn over some period. Also known as “BR(t)”. BR(t) = ProjectedRewardFraction(t) * SectorQualityAdjustedPower ProjectedRewardFraction(t) is the sum of estimated reward over estimated total power over all epochs in the projection period [t t+projectionDuration]

Computes the pledge requirement for committing new quality-adjusted power to the network, given the current network total and baseline power, per-epoch reward, and circulating token supply. The pledge comprises two parts:

The maximum number of partitions that may be required to be loaded in a single invocation, when all the sector infos for the partitions will be loaded.

Returns the amount of a reward to vest, and the vesting schedule, for a reward amount.

Maximum duration to allow for the sealing process for seal algorithms. Dependent on algorithm and sector size

The penalty for a sector continuing faulty for another proving period. It is a projection of the expected reward earned by the sector. Also known as “FF(t)”

Penalty to locked pledge collateral for the termination of a sector before scheduled expiry. SectorAge is the time between the sector’s activation and termination.

This is the SP(t) penalty for a newly faulty sector that has not been declared. SP(t) = UndeclaredFaultFactor * BR(t)

Computes the PreCommit deposit given sector qa weight and current network conditions. PreCommit Deposit = BR(PreCommitDepositProjectionPeriod)

Returns the quality-adjusted power for a sector.

Returns the power for a sector size and weight.

Maximum duration to allow for the sealing process for seal algorithms. Dependent on algorithm and sector size

Determine maximum number of deal miner’s sector can hold

Type Definitions