Documentation ¶
Index ¶
- type Info
- func (d *Info) FaultCutoffPassed() bool
- func (d *Info) HasElapsed() bool
- func (d *Info) IsOpen() bool
- func (d *Info) Last() abi.ChainEpoch
- func (d *Info) NextNotElapsed() *Info
- func (d *Info) NextOpen() abi.ChainEpoch
- func (d *Info) NextPeriodStart() abi.ChainEpoch
- func (d *Info) PeriodElapsed() bool
- func (d *Info) PeriodEnd() abi.ChainEpoch
- func (d *Info) PeriodStarted() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct { // Deadline parameters CurrentEpoch abi.ChainEpoch // Epoch at which this info was calculated. PeriodStart abi.ChainEpoch // First epoch of the proving period (<= CurrentEpoch). Index uint64 // A deadline index, in [0..d.WPoStProvingPeriodDeadlines) unless period elapsed. Open abi.ChainEpoch // First epoch from which a proof may be submitted (>= CurrentEpoch). Close abi.ChainEpoch // First epoch from which a proof may no longer be submitted (>= Open). Challenge abi.ChainEpoch // Epoch at which to sample the chain for challenge (< Open). FaultCutoff abi.ChainEpoch // First epoch at which a fault declaration is rejected (< Open). // Protocol parameters WPoStPeriodDeadlines uint64 WPoStProvingPeriod abi.ChainEpoch // the number of epochs in a window post proving period WPoStChallengeWindow abi.ChainEpoch WPoStChallengeLookback abi.ChainEpoch FaultDeclarationCutoff abi.ChainEpoch }
Deadline calculations with respect to a current epoch. "Deadline" refers to the window during which proofs may be submitted. Windows are non-overlapping ranges [Open, Close), but the challenge epoch for a window occurs before the window opens. The current epoch may not necessarily lie within the deadline or proving period represented here.
func NewInfo ¶
func NewInfo(periodStart abi.ChainEpoch, deadlineIdx uint64, currEpoch abi.ChainEpoch, wPoStPeriodDeadlines uint64, wPoStProvingPeriod, wPoStChallengeWindow, wPoStChallengeLookback, faultDeclarationCutoff abi.ChainEpoch) *Info
Returns deadline-related calculations for a deadline in some proving period and the current epoch.
func (*Info) FaultCutoffPassed ¶
Whether the deadline's fault cutoff has passed.
func (*Info) HasElapsed ¶
Whether the current deadline has already closed.
func (*Info) Last ¶
func (d *Info) Last() abi.ChainEpoch
The last epoch during which a proof may be submitted.
func (*Info) NextNotElapsed ¶
Returns the next instance of this deadline that has not yet elapsed.
func (*Info) NextOpen ¶
func (d *Info) NextOpen() abi.ChainEpoch
Epoch at which the subsequent deadline opens.
func (*Info) NextPeriodStart ¶
func (d *Info) NextPeriodStart() abi.ChainEpoch
The first epoch in the next proving period.
func (*Info) PeriodElapsed ¶
Whether the proving period has elapsed.
func (*Info) PeriodEnd ¶
func (d *Info) PeriodEnd() abi.ChainEpoch
The last epoch in the proving period.
func (*Info) PeriodStarted ¶
Whether the proving period has begun.