Documentation ¶
Index ¶
Constants ¶
View Source
const IdealEndEpochBuffer = 2 * builtin.EpochsInDay
View Source
const MaxEndEpochBufferUnverified = 180 * builtin.EpochsInDay
Variables ¶
View Source
var SnapImmutableDeadlineEpochsBuffer = abi.ChainEpoch(40)
assuming that snap takes up to 20min to get to submitting the message we want to avoid sectors from deadlines which will become immutable in the next 20min (40 epochs) NOTE: Don't set this value to more than one deadline (60 epochs)
Functions ¶
Types ¶
type Ingester ¶
type Ingester interface { AllocatePieceToSector(ctx context.Context, tx *harmonydb.Tx, maddr address.Address, piece lpiece.PieceDealInfo, rawSize int64, source url.URL, header http.Header) (*abi.SectorNumber, *abi.RegisteredSealProof, error) GetExpectedSealDuration() abi.ChainEpoch }
type PieceIngester ¶
type PieceIngester struct {
// contains filtered or unexported fields
}
func NewPieceIngester ¶
func NewPieceIngester(ctx context.Context, db *harmonydb.DB, api PieceIngesterApi, miners []address.Address, cfg *config.CurioConfig) (*PieceIngester, error)
func (*PieceIngester) AllocatePieceToSector ¶
func (p *PieceIngester) AllocatePieceToSector(ctx context.Context, tx *harmonydb.Tx, maddr address.Address, piece lpiece.PieceDealInfo, rawSize int64, source url.URL, header http.Header) (*abi.SectorNumber, *abi.RegisteredSealProof, error)
func (*PieceIngester) GetExpectedSealDuration ¶
func (p *PieceIngester) GetExpectedSealDuration() abi.ChainEpoch
func (*PieceIngester) Seal ¶
func (p *PieceIngester) Seal() error
type PieceIngesterApi ¶
type PieceIngesterApi interface { ChainHead(context.Context) (*types.TipSet, error) StateMinerInfo(context.Context, address.Address, types.TipSetKey) (api.MinerInfo, error) StateMinerAllocated(ctx context.Context, a address.Address, key types.TipSetKey) (*bitfield.BitField, error) StateNetworkVersion(ctx context.Context, key types.TipSetKey) (network.Version, error) StateGetAllocation(ctx context.Context, clientAddr address.Address, allocationId verifregtypes.AllocationId, tsk types.TipSetKey) (*verifregtypes.Allocation, error) StateGetAllocationForPendingDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*verifregtypes.Allocation, error) StateGetAllocationIdForPendingDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (verifregtypes.AllocationId, error) StateLookupID(context.Context, address.Address, types.TipSetKey) (address.Address, error) StateSectorGetInfo(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorOnChainInfo, error) StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok types.TipSetKey) (*miner.SectorLocation, error) StateMinerPartitions(ctx context.Context, m address.Address, dlIdx uint64, tsk types.TipSetKey) ([]api.Partition, error) StateMinerProvingDeadline(context.Context, address.Address, types.TipSetKey) (*dline.Info, error) }
type PieceIngesterSnap ¶
type PieceIngesterSnap struct {
// contains filtered or unexported fields
}
func NewPieceIngesterSnap ¶
func NewPieceIngesterSnap(ctx context.Context, db *harmonydb.DB, api PieceIngesterApi, miners []address.Address, cfg *config.CurioConfig) (*PieceIngesterSnap, error)
func (*PieceIngesterSnap) AllocatePieceToSector ¶
func (p *PieceIngesterSnap) AllocatePieceToSector(ctx context.Context, tx *harmonydb.Tx, maddr address.Address, piece lpiece.PieceDealInfo, rawSize int64, source url.URL, header http.Header) (*abi.SectorNumber, *abi.RegisteredSealProof, error)
func (*PieceIngesterSnap) GetExpectedSealDuration ¶
func (p *PieceIngesterSnap) GetExpectedSealDuration() abi.ChainEpoch
func (*PieceIngesterSnap) Seal ¶
func (p *PieceIngesterSnap) Seal() error
Click to show internal directories.
Click to hide internal directories.