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 }
Expand description
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: BitField
early_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]
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]
&self,
store: &'db BS
) -> Result<Amt<'db, Partition, BS>, Box<dyn StdError>>
pub fn optimistic_proofs_amt<'db, BS: BlockStore>(
&self,
store: &'db BS
) -> Result<Amt<'db, WindowedPoSt, BS>, Box<dyn StdError>>
[src]
&self,
store: &'db BS
) -> Result<Amt<'db, WindowedPoSt, BS>, Box<dyn StdError>>
pub fn partitions_snapshot_amt<'db, BS: BlockStore>(
&self,
store: &'db BS
) -> Result<Amt<'db, Partition, BS>, Box<dyn StdError>>
[src]
&self,
store: &'db BS
) -> Result<Amt<'db, Partition, BS>, Box<dyn StdError>>
pub fn optimistic_proofs_snapshot_amt<'db, BS: BlockStore>(
&self,
store: &'db BS
) -> Result<Amt<'db, WindowedPoSt, BS>, Box<dyn StdError>>
[src]
&self,
store: &'db BS
) -> Result<Amt<'db, WindowedPoSt, BS>, Box<dyn StdError>>
pub fn load_partition<BS: BlockStore>(
&self,
store: &BS,
partition_idx: usize
) -> Result<Partition, Box<dyn StdError>>
[src]
&self,
store: &BS,
partition_idx: usize
) -> Result<Partition, Box<dyn StdError>>
pub fn load_partition_snapshot<BS: BlockStore>(
&self,
store: &BS,
partition_idx: usize
) -> Result<Partition, Box<dyn StdError>>
[src]
&self,
store: &BS,
partition_idx: usize
) -> Result<Partition, Box<dyn StdError>>
pub fn add_expiration_partitions<BS: BlockStore>(
&mut self,
store: &BS,
expiration_epoch: ChainEpoch,
partitions: &[usize],
quant: QuantSpec
) -> Result<(), 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]
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]
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]
&mut self,
store: &BS,
max_partitions: u64,
max_sectors: u64
) -> Result<(TerminationResult, bool), Box<dyn StdError>>
pub fn pop_expired_partitions<BS: BlockStore>(
&mut self,
store: &BS,
until: ChainEpoch,
quant: QuantSpec
) -> Result<(BitField, bool), Box<dyn StdError>>
[src]
&mut self,
store: &BS,
until: ChainEpoch,
quant: QuantSpec
) -> Result<(BitField, bool), Box<dyn StdError>>
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]
&mut self,
store: &BS,
sectors: &Sectors<'_, BS>,
epoch: ChainEpoch,
partition_sectors: &mut PartitionSectorMap,
sector_size: SectorSize,
quant: QuantSpec
) -> Result<PowerPair, Box<dyn StdError>>
pub fn remove_partitions<BS: BlockStore>(
&mut self,
store: &BS,
to_remove: &BitField,
quant: QuantSpec
) -> Result<(BitField, BitField, 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]
&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>>
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]
&mut self,
store: &BS,
sectors: &Sectors<'_, BS>,
sector_size: SectorSize,
partition_sectors: &mut PartitionSectorMap
) -> Result<(), Box<dyn StdError>>
pub fn process_deadline_end<BS: BlockStore>(
&mut self,
store: &BS,
quant: QuantSpec,
fault_expiration_epoch: ChainEpoch
) -> Result<(PowerPair, PowerPair), ActorError>
[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]
&self,
store: &BS,
f: impl FnMut(usize, &Partition) -> Result<(), Box<dyn StdError>>
) -> Result<(), Box<dyn StdError>>
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]
&self,
store: &BS,
partitions: BitField
) -> Result<DisputeInfo, Box<dyn StdError>>
pub fn is_live(&self) -> bool
[src]
impl Deadline
[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]
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]
&mut self,
store: &BS,
partitions: &BitField,
proofs: &[PoStProof]
) -> Result<(), Box<dyn StdError>>
pub fn take_post_proofs<BS: BlockStore>(
&mut self,
store: &BS,
idx: u64
) -> Result<(BitField, Vec<PoStProof>), Box<dyn StdError>>
[src]
&mut self,
store: &BS,
idx: u64
) -> Result<(BitField, Vec<PoStProof>), Box<dyn StdError>>
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]
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<'de> Deserialize<'de> for Deadline
[src]fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Deadline
impl Send for Deadline
impl Sync for Deadline
impl Unpin for Deadline
impl UnwindSafe for Deadline
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,