pub struct ExpirationQueue<'db, BS> {
    pub amt: Amt<'db, ExpirationSet, BS>,
    pub quant: QuantSpec,
}
Expand description

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.

Fields

amt: Amt<'db, ExpirationSet, BS>quant: QuantSpec

Implementations

Loads a queue root.

Epochs provided to subsequent method calls will be quantized upwards to quanta mod offsetSeed before being written to/read from queue entries.

Adds a collection of sectors to their on-time target expiration entries (quantized). The sectors are assumed to be active (non-faulty). Returns the sector numbers, power, and pledge added.

Reschedules some sectors to a new (quantized) expiration epoch. The sectors being rescheduled are assumed to be not faulty, and hence are removed from and re-scheduled for on-time rather than early expiration. The sectors’ power and pledge are assumed not to change, despite the new expiration.

Re-schedules sectors to expire at an early expiration epoch (quantized), if they wouldn’t expire before then anyway. The sectors must not be currently faulty, so must be registered as expiring on-time rather than early. The pledge for the now-early sectors is removed from the queue. Returns the total power represented by the sectors.

Re-schedules all sectors to expire at an early expiration epoch, if they wouldn’t expire before then anyway.

Removes sectors from any queue entries in which they appear that are earlier then their scheduled expiration epoch, and schedules them at their expected termination epoch. Pledge for the sectors is re-added as on-time. Power for the sectors is changed from faulty to active (whether rescheduled or not). Returns the newly-recovered power. Fails if any sectors are not found in the queue.

Removes some sectors and adds some others. The sectors being replaced must not be faulty, so must be scheduled for on-time rather than early expiration. The sectors added are assumed to be not faulty. Returns the old a new sector number bitfields, and delta to power and pledge, new minus old.

Remove some sectors from the queue. The sectors may be active or faulty, and scheduled either for on-time or early termination. Returns the aggregate of removed sectors and power, and recovering power. Fails if any sectors are not found in the queue.

Removes and aggregates entries from the queue up to and including some epoch.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.