snap

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: 37 Imported by: 0

Documentation

Index

Constants

View Source
const MinSnapSchedInterval = 10 * time.Second

Variables

View Source
var ImmutableSubmitGate = abi.ChainEpoch(2) // don't submit more than 2 minutes before the deadline becomes immutable

Functions

func DropSectorPieceRefsSnap added in v1.23.1

func DropSectorPieceRefsSnap(ctx context.Context, db *harmonydb.DB, sid abi.SectorID) error

Types

type EncodeTask

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

func NewEncodeTask

func NewEncodeTask(sc *ffi.SealCalls, db *harmonydb.DB, max int) *EncodeTask

func (*EncodeTask) Adder

func (e *EncodeTask) Adder(taskFunc harmonytask.AddTaskFunc)

func (*EncodeTask) CanAccept

func (e *EncodeTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)

func (*EncodeTask) Do

func (e *EncodeTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)

func (*EncodeTask) GetSectorID added in v1.23.1

func (e *EncodeTask) GetSectorID(db *harmonydb.DB, taskID int64) (*abi.SectorID, error)

func (*EncodeTask) GetSpid

func (e *EncodeTask) GetSpid(db *harmonydb.DB, taskID int64) string

func (*EncodeTask) TypeDetails

func (e *EncodeTask) TypeDetails() harmonytask.TaskTypeDetails

type MoveStorageTask

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

func NewMoveStorageTask

func NewMoveStorageTask(sc *ffi.SealCalls, db *harmonydb.DB, max int) *MoveStorageTask

func (*MoveStorageTask) Adder

func (m *MoveStorageTask) Adder(taskFunc harmonytask.AddTaskFunc)

func (*MoveStorageTask) CanAccept

func (*MoveStorageTask) Do

func (m *MoveStorageTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)

func (*MoveStorageTask) GetSectorID added in v1.23.1

func (m *MoveStorageTask) GetSectorID(db *harmonydb.DB, taskID int64) (*abi.SectorID, error)

func (*MoveStorageTask) GetSpid

func (m *MoveStorageTask) GetSpid(db *harmonydb.DB, taskID int64) string

func (*MoveStorageTask) TypeDetails

func (m *MoveStorageTask) TypeDetails() harmonytask.TaskTypeDetails

type ProveTask

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

func NewProveTask

func NewProveTask(sc *ffi.SealCalls, db *harmonydb.DB, paramck func() (bool, error), max int) *ProveTask

func (*ProveTask) Adder

func (p *ProveTask) Adder(taskFunc harmonytask.AddTaskFunc)

func (*ProveTask) CanAccept

func (p *ProveTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)

func (*ProveTask) Do

func (p *ProveTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)

func (*ProveTask) GetSectorID added in v1.23.1

func (p *ProveTask) GetSectorID(db *harmonydb.DB, taskID int64) (*abi.SectorID, error)

func (*ProveTask) GetSpid

func (p *ProveTask) GetSpid(db *harmonydb.DB, taskID int64) string

func (*ProveTask) TypeDetails

func (p *ProveTask) TypeDetails() harmonytask.TaskTypeDetails

type SubmitTask

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

func (*SubmitTask) Adder

func (s *SubmitTask) Adder(taskFunc harmonytask.AddTaskFunc)

func (*SubmitTask) CanAccept

func (s *SubmitTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)

func (*SubmitTask) Do

func (s *SubmitTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)

func (*SubmitTask) GetSectorID added in v1.23.1

func (s *SubmitTask) GetSectorID(db *harmonydb.DB, taskID int64) (*abi.SectorID, error)

func (*SubmitTask) GetSpid

func (s *SubmitTask) GetSpid(db *harmonydb.DB, taskID int64) string

func (*SubmitTask) TypeDetails

func (s *SubmitTask) TypeDetails() harmonytask.TaskTypeDetails

type SubmitTaskNodeAPI

type SubmitTaskNodeAPI interface {
	StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorLocation, error)
	StateGetAllocation(ctx context.Context, clientAddr address.Address, allocationId verifregtypes9.AllocationId, tsk types.TipSetKey) (*verifregtypes9.Allocation, error)
	ChainHead(ctx context.Context) (*types.TipSet, error)

	WalletBalance(context.Context, address.Address) (types.BigInt, error)
	WalletHas(context.Context, address.Address) (bool, error)
	StateAccountKey(context.Context, address.Address, types.TipSetKey) (address.Address, 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)

	StateMinerInfo(context.Context, address.Address, types.TipSetKey) (api.MinerInfo, error)
	StateMinerAvailableBalance(context.Context, address.Address, types.TipSetKey) (big.Int, error)
	StateMinerInitialPledgeForSector(ctx context.Context, sectorDuration abi.ChainEpoch, sectorSize abi.SectorSize, verifiedSize uint64, tsk types.TipSetKey) (types.BigInt, error)
	StateGetActor(ctx context.Context, actor address.Address, tsk types.TipSetKey) (*types.Actor, error)
	StateVMCirculatingSupplyInternal(ctx context.Context, tsk types.TipSetKey) (api.CirculatingSupply, error)

	StateMinerProvingDeadline(context.Context, address.Address, types.TipSetKey) (*dline.Info, error)
}

Jump to

Keyboard shortcuts

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