Struct forest_actor::miner::Deadline [−][src]
pub struct Deadline { pub partitions: Cid, pub expirations_epochs: Cid, pub post_submissions: BitField, pub early_terminations: BitField, pub live_sectors: u64, pub total_sectors: u64, pub faulty_power: PowerPair, }
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.
post_submissions: BitField
Partitions numbers with PoSt submissions since the proving period started.
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.
Implementations
impl Deadline
[src]
pub fn new(empty_array_cid: Cid) -> Self
[src]
pub fn partitions_amt<'db, BS: BlockStore>(
&self,
store: &'db BS
) -> Result<Amt<'db, Partition, BS>, ActorError>
[src]
&self,
store: &'db BS
) -> Result<Amt<'db, Partition, BS>, ActorError>
pub fn load_partition<BS: BlockStore>(
&self,
store: &BS,
partition_idx: u64
) -> Result<Partition, Box<dyn StdError>>
[src]
&self,
store: &BS,
partition_idx: u64
) -> Result<Partition, Box<dyn StdError>>
pub fn add_expiration_partitions<BS: BlockStore>(
&mut self,
store: &BS,
expiration_epoch: ChainEpoch,
partitions: &[u64],
quant: QuantSpec
) -> Result<(), Box<dyn StdError>>
[src]
&mut self,
store: &BS,
expiration_epoch: ChainEpoch,
partitions: &[u64],
quant: QuantSpec
) -> Result<(), Box<dyn StdError>>
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]
&mut self,
store: &BS,
until: ChainEpoch,
quant: QuantSpec
) -> Result<ExpirationSet, Box<dyn StdError>>
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,
sectors: &[SectorOnChainInfo],
sector_size: SectorSize,
quant: QuantSpec
) -> Result<PowerPair, Box<dyn StdError>>
[src]
&mut self,
store: &BS,
partition_size: u64,
sectors: &[SectorOnChainInfo],
sector_size: SectorSize,
quant: QuantSpec
) -> Result<PowerPair, Box<dyn StdError>>
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]
&mut self,
store: &BS,
to_remove: &BitField,
quant: QuantSpec
) -> Result<(BitField, BitField, PowerPair), Box<dyn StdError>>
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 declare_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]
&mut self,
store: &BS,
quant: QuantSpec,
fault_expiration_epoch: ChainEpoch
) -> Result<(PowerPair, PowerPair), ActorError>
Processes all PoSt submissions, marking unproven sectors as faulty and clearing failed recoveries. Returns any new faulty power and failed recovery power.
pub fn for_each<BS: BlockStore>(
&self,
store: &BS,
f: impl FnMut(u64, &Partition) -> Result<(), Box<dyn StdError>>
) -> Result<(), Box<dyn StdError>>
[src]
&self,
store: &BS,
f: impl FnMut(u64, &Partition) -> Result<(), Box<dyn StdError>>
) -> Result<(), Box<dyn StdError>>
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]
&mut self,
store: &BS,
sectors: &Sectors<'_, BS>,
sector_size: SectorSize,
quant: QuantSpec,
fault_expiration: ChainEpoch,
post_partitions: &mut [PoStPartition]
) -> Result<PoStResult, Box<dyn StdError>>
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 reschedule_sector_expirations<BS: BlockStore>(
&mut self,
store: &BS,
sectors: &Sectors<'_, BS>,
expiration: ChainEpoch,
partition_sectors: &mut PartitionSectorMap,
sector_size: SectorSize,
quant: QuantSpec
) -> Result<(), Box<dyn StdError>>
[src]
&mut self,
store: &BS,
sectors: &Sectors<'_, BS>,
expiration: ChainEpoch,
partition_sectors: &mut PartitionSectorMap,
sector_size: SectorSize,
quant: QuantSpec
) -> Result<(), Box<dyn StdError>>
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]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Serialize for Deadline
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,