Struct forest_actor::miner::Deadline[][src]

pub struct Deadline {
    pub partitions: Cid,
    pub expirations_epochs: Cid,
    pub partitions_posted: BitField,
    pub early_terminations: BitField,
    pub live_sectors: u64,
    pub total_sectors: u64,
    pub faulty_power: PowerPair,
    pub optimistic_post_submissions: Cid,
    // some fields omitted
}

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

Fields

partitions: Cid

Partitions in this deadline, in order. The keys of this AMT are always sequential integers beginning with zero.

expirations_epochs: Cid

Maps epochs to partitions that may have sectors that expire in or before that epoch, either on-time or early as faults. Keys are quantized to final epochs in each proving deadline.

NOTE: Partitions MUST NOT be removed from this queue (until the associated epoch has passed) even if they no longer have sectors expiring at that epoch. Sectors expiring at this epoch may later be recovered, and this queue will not be updated at that time.

partitions_posted: BitFieldearly_terminations: BitField

Partitions with sectors that terminated early.

live_sectors: u64

The number of non-terminated sectors in this deadline (incl faulty).

total_sectors: u64

The total number of sectors in this deadline (incl dead).

faulty_power: PowerPair

Memoized sum of faulty power in partitions.

optimistic_post_submissions: Cid

Implementations

impl Deadline[src]

pub fn new<BS: BlockStore>(store: &BS) -> Result<Self, Box<dyn StdError>>[src]

pub fn partitions_amt<'db, BS: BlockStore>(
    &self,
    store: &'db BS
) -> Result<Amt<'db, Partition, BS>, Box<dyn StdError>>
[src]

pub fn optimistic_proofs_amt<'db, BS: BlockStore>(
    &self,
    store: &'db BS
) -> Result<Amt<'db, WindowedPoSt, BS>, Box<dyn StdError>>
[src]

pub fn partitions_snapshot_amt<'db, BS: BlockStore>(
    &self,
    store: &'db BS
) -> Result<Amt<'db, Partition, BS>, Box<dyn StdError>>
[src]

pub fn optimistic_proofs_snapshot_amt<'db, BS: BlockStore>(
    &self,
    store: &'db BS
) -> Result<Amt<'db, WindowedPoSt, BS>, Box<dyn StdError>>
[src]

pub fn load_partition<BS: BlockStore>(
    &self,
    store: &BS,
    partition_idx: usize
) -> Result<Partition, Box<dyn StdError>>
[src]

pub fn load_partition_snapshot<BS: BlockStore>(
    &self,
    store: &BS,
    partition_idx: usize
) -> Result<Partition, Box<dyn StdError>>
[src]

pub fn add_expiration_partitions<BS: BlockStore>(
    &mut self,
    store: &BS,
    expiration_epoch: ChainEpoch,
    partitions: &[usize],
    quant: QuantSpec
) -> Result<(), Box<dyn StdError>>
[src]

Adds some partition numbers to the set expiring at an epoch.

pub fn pop_expired_sectors<BS: BlockStore>(
    &mut self,
    store: &BS,
    until: ChainEpoch,
    quant: QuantSpec
) -> Result<ExpirationSet, Box<dyn StdError>>
[src]

PopExpiredSectors terminates expired sectors from all partitions. Returns the expired sector aggregates.

pub fn add_sectors<BS: BlockStore>(
    &mut self,
    store: &BS,
    partition_size: u64,
    proven: bool,
    sectors: &[SectorOnChainInfo],
    sector_size: SectorSize,
    quant: QuantSpec
) -> Result<PowerPair, Box<dyn StdError>>
[src]

Adds sectors to a deadline. It’s the caller’s responsibility to make sure that this deadline isn’t currently “open” (i.e., being proved at this point in time). The sectors are assumed to be non-faulty.

pub fn pop_early_terminations<BS: BlockStore>(
    &mut self,
    store: &BS,
    max_partitions: u64,
    max_sectors: u64
) -> Result<(TerminationResult, bool), Box<dyn StdError>>
[src]

pub fn pop_expired_partitions<BS: BlockStore>(
    &mut self,
    store: &BS,
    until: ChainEpoch,
    quant: QuantSpec
) -> Result<(BitField, bool), Box<dyn StdError>>
[src]

pub fn terminate_sectors<BS: BlockStore>(
    &mut self,
    store: &BS,
    sectors: &Sectors<'_, BS>,
    epoch: ChainEpoch,
    partition_sectors: &mut PartitionSectorMap,
    sector_size: SectorSize,
    quant: QuantSpec
) -> Result<PowerPair, Box<dyn StdError>>
[src]

pub fn remove_partitions<BS: BlockStore>(
    &mut self,
    store: &BS,
    to_remove: &BitField,
    quant: QuantSpec
) -> Result<(BitField, BitField, PowerPair), Box<dyn StdError>>
[src]

RemovePartitions removes the specified partitions, shifting the remaining ones to the left, and returning the live and dead sectors they contained.

Returns an error if any of the partitions contained faulty sectors or early terminations.

pub fn record_faults<BS: BlockStore>(
    &mut self,
    store: &BS,
    sectors: &Sectors<'_, BS>,
    sector_size: SectorSize,
    quant: QuantSpec,
    fault_expiration_epoch: ChainEpoch,
    partition_sectors: &mut PartitionSectorMap
) -> Result<PowerPair, Box<dyn StdError>>
[src]

pub fn declare_faults_recovered<BS: BlockStore>(
    &mut self,
    store: &BS,
    sectors: &Sectors<'_, BS>,
    sector_size: SectorSize,
    partition_sectors: &mut PartitionSectorMap
) -> Result<(), Box<dyn StdError>>
[src]

pub fn process_deadline_end<BS: BlockStore>(
    &mut self,
    store: &BS,
    quant: QuantSpec,
    fault_expiration_epoch: ChainEpoch
) -> Result<(PowerPair, PowerPair), ActorError>
[src]

Processes all PoSt submissions, marking unproven sectors as faulty and clearing failed recoveries. It returns the power delta, and any power that should be penalized (new faults and failed recoveries).

pub fn for_each<BS: BlockStore>(
    &self,
    store: &BS,
    f: impl FnMut(usize, &Partition) -> Result<(), Box<dyn StdError>>
) -> Result<(), Box<dyn StdError>>
[src]

pub fn validate_state(&self) -> Result<(), &'static str>[src]

pub fn load_partitions_for_dispute<BS: BlockStore>(
    &self,
    store: &BS,
    partitions: BitField
) -> Result<DisputeInfo, Box<dyn StdError>>
[src]

pub fn is_live(&self) -> bool[src]

impl Deadline[src]

pub fn record_proven_sectors<BS: BlockStore>(
    &mut self,
    store: &BS,
    sectors: &Sectors<'_, BS>,
    sector_size: SectorSize,
    quant: QuantSpec,
    fault_expiration: ChainEpoch,
    post_partitions: &mut [PoStPartition]
) -> Result<PoStResult, Box<dyn StdError>>
[src]

Processes a series of posts, recording proven partitions and marking skipped sectors as faulty.

It returns a PoStResult containing the list of proven and skipped sectors and changes to power (newly faulty power, power that should have been proven recovered but wasn’t, and newly recovered power).

NOTE: This function does not actually verify any proofs. The returned sectors and ignored_sectors must subsequently be validated against the PoSt submitted by the miner.

pub fn record_post_proofs<BS: BlockStore>(
    &mut self,
    store: &BS,
    partitions: &BitField,
    proofs: &[PoStProof]
) -> Result<(), Box<dyn StdError>>
[src]

pub fn take_post_proofs<BS: BlockStore>(
    &mut self,
    store: &BS,
    idx: u64
) -> Result<(BitField, Vec<PoStProof>), Box<dyn StdError>>
[src]

pub fn reschedule_sector_expirations<BS: BlockStore>(
    &mut self,
    store: &BS,
    sectors: &Sectors<'_, BS>,
    expiration: ChainEpoch,
    partition_sectors: &mut PartitionSectorMap,
    sector_size: SectorSize,
    quant: QuantSpec
) -> Result<Vec<SectorOnChainInfo>, Box<dyn StdError>>
[src]

RescheduleSectorExpirations reschedules the expirations of the given sectors to the target epoch, skipping any sectors it can’t find.

The power of the rescheduled sectors is assumed to have not changed since initial scheduling.

Note: see the docs on State.RescheduleSectorExpirations for details on why we skip sectors/partitions we can’t find.

Trait Implementations

impl<'de> Deserialize<'de> for Deadline[src]

impl Serialize for Deadline[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,