market

package
v1.24.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2024 License: Apache-2.0, MIT Imports: 28 Imported by: 0

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

func SealNow added in v1.23.0

func SealNow(ctx context.Context, node SealNowNodeApi, db *harmonydb.DB, act address.Address, sector abi.SectorNumber, synthetic bool) error

SealNow is triggerred by the user to seal a sector immediately. Can be from the CLI or the web interface.

Types

type Ingester

type Ingester interface {
	AllocatePieceToSector(ctx context.Context, maddr address.Address, piece lpiece.PieceDealInfo, rawSize int64, source url.URL, header http.Header) (api.SectorOffset, error)
	SectorStartSealing(context.Context, abi.SectorNumber) error
}

type PieceIngester

type PieceIngester struct {
	// contains filtered or unexported fields
}

func NewPieceIngester

func NewPieceIngester(ctx context.Context, db *harmonydb.DB, api PieceIngesterApi, maddr address.Address, sealRightNow bool, maxWaitTime time.Duration, synth bool) (*PieceIngester, error)

func (*PieceIngester) AllocatePieceToSector

func (p *PieceIngester) AllocatePieceToSector(ctx context.Context, maddr address.Address, piece lpiece.PieceDealInfo, rawSize int64, source url.URL, header http.Header) (api.SectorOffset, error)

func (*PieceIngester) Seal

func (p *PieceIngester) Seal() error

func (*PieceIngester) SectorStartSealing

func (p *PieceIngester) SectorStartSealing(ctx context.Context, sector abi.SectorNumber) 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 added in v1.23.0

type PieceIngesterSnap struct {
	// contains filtered or unexported fields
}

func NewPieceIngesterSnap added in v1.23.0

func NewPieceIngesterSnap(ctx context.Context, db *harmonydb.DB, api PieceIngesterApi, maddr address.Address, sealRightNow bool, maxWaitTime time.Duration) (*PieceIngesterSnap, error)

func (*PieceIngesterSnap) AllocatePieceToSector added in v1.23.0

func (p *PieceIngesterSnap) AllocatePieceToSector(ctx context.Context, maddr address.Address, piece lpiece.PieceDealInfo, rawSize int64, source url.URL, header http.Header) (api.SectorOffset, error)

func (*PieceIngesterSnap) Seal added in v1.23.0

func (p *PieceIngesterSnap) Seal() error

func (*PieceIngesterSnap) SectorStartSealing added in v1.23.0

func (p *PieceIngesterSnap) SectorStartSealing(ctx context.Context, sector abi.SectorNumber) error

type SealNowNodeApi added in v1.23.0

type SealNowNodeApi interface {
	StateMinerInfo(ctx context.Context, addr address.Address, tsk types.TipSetKey) (api.MinerInfo, error)
	StateNetworkVersion(ctx context.Context, tsk types.TipSetKey) (networkVersion network.Version, err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL