ffi

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

Documentation

Index

Constants

View Source
const C1CheckNumber = 3

Variables

This section is empty.

Functions

This section is empty.

Types

type ReleaseStorageFunc

type ReleaseStorageFunc func() // free storage reservation

type SealCalls

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

type ExternPrecommit2 func(ctx context.Context, sector storiface.SectorRef, cache, sealed string, pc1out storiface.PreCommit1Out) (sealedCID cid.Cid, unsealedCID cid.Cid, err error)

type ExternalSealer struct {
	PreCommit2 ExternPrecommit2
}

func NewSealCalls

func NewSealCalls(st *paths.Remote, ls *paths.Local, si paths.SectorIndex) *SealCalls

func (*SealCalls) CheckUnsealedCID added in v1.23.1

func (sb *SealCalls) CheckUnsealedCID(ctx context.Context, s storiface.SectorRef) (cid.Cid, error)

func (*SealCalls) DecodeSDR added in v1.23.1

func (sb *SealCalls) DecodeSDR(ctx context.Context, taskID harmonytask.TaskID, sector storiface.SectorRef) error

func (*SealCalls) DecodeSnap added in v1.23.1

func (sb *SealCalls) DecodeSnap(ctx context.Context, taskID harmonytask.TaskID, commD, commK cid.Cid, sector storiface.SectorRef) error

func (*SealCalls) EncodeUpdate added in v1.23.0

func (sb *SealCalls) EncodeUpdate(
	ctx context.Context,
	sectorKeyCid cid.Cid,
	taskID harmonytask.TaskID,
	proofType abi.RegisteredUpdateProof,
	sector storiface.SectorRef,
	data io.Reader,
	pieces []abi.PieceInfo,
	keepUnsealed bool) (sealedCID cid.Cid, unsealedCID cid.Cid, err error)

func (*SealCalls) FinalizeSector

func (sb *SealCalls) FinalizeSector(ctx context.Context, sector storiface.SectorRef, keepUnsealed bool) error

func (*SealCalls) GenerateSDR

func (sb *SealCalls) GenerateSDR(ctx context.Context, taskID harmonytask.TaskID, into storiface.SectorFileType, sector storiface.SectorRef, ticket abi.SealRandomness, commDcid cid.Cid) error

func (*SealCalls) GenerateSynthPoRep

func (sb *SealCalls) GenerateSynthPoRep()

func (*SealCalls) LocalStorage

func (sb *SealCalls) LocalStorage(ctx context.Context) ([]storiface.StoragePath, error)

func (*SealCalls) MoveStorage

func (sb *SealCalls) MoveStorage(ctx context.Context, sector storiface.SectorRef, taskID *harmonytask.TaskID) error

func (*SealCalls) MoveStorageSnap added in v1.23.0

func (sb *SealCalls) MoveStorageSnap(ctx context.Context, sector storiface.SectorRef, taskID *harmonytask.TaskID) error

func (*SealCalls) PieceReader

func (sb *SealCalls) PieceReader(ctx context.Context, id storiface.PieceNumber) (io.ReadCloser, error)

func (*SealCalls) PoRepSnark

func (sb *SealCalls) PoRepSnark(ctx context.Context, sn storiface.SectorRef, sealed, unsealed cid.Cid, ticket abi.SealRandomness, seed abi.InteractiveSealRandomness) ([]byte, error)

func (*SealCalls) PreFetch

func (sb *SealCalls) PreFetch(ctx context.Context, sector storiface.SectorRef, task *harmonytask.TaskID) (fsPath, pathID storiface.SectorPaths, releaseSector func(...storiface.SectorFileType), err error)

PreFetch fetches the sector file to local storage before SDR and TreeRC Tasks

func (*SealCalls) ProveUpdate added in v1.23.0

func (sb *SealCalls) ProveUpdate(ctx context.Context, proofType abi.RegisteredUpdateProof, sector storiface.SectorRef, key, sealed, unsealed cid.Cid) ([]byte, error)

func (*SealCalls) RemovePiece

func (sb *SealCalls) RemovePiece(ctx context.Context, id storiface.PieceNumber) error

func (*SealCalls) Storage

func (sb *SealCalls) Storage(taskToSectorRef func(taskID harmonytask.TaskID) (SectorRef, error), alloc, existing storiface.SectorFileType, ssize abi.SectorSize, pathType storiface.PathType, MinFreeStoragePercentage float64) *TaskStorage

func (*SealCalls) SyntheticProofs added in v1.23.0

func (sb *SealCalls) SyntheticProofs(ctx context.Context, task *harmonytask.TaskID, sector storiface.SectorRef, sealed cid.Cid, unsealed cid.Cid, randomness abi.SealRandomness, pieces []abi.PieceInfo) error

func (*SealCalls) TreeD

func (sb *SealCalls) TreeD(ctx context.Context, sector storiface.SectorRef, unsealed cid.Cid, size abi.PaddedPieceSize, data io.Reader, unpaddedData bool, fspaths, pathIDs storiface.SectorPaths) error

func (*SealCalls) TreeRC

func (sb *SealCalls) TreeRC(ctx context.Context, task *harmonytask.TaskID, sector storiface.SectorRef, unsealed cid.Cid, randomness abi.SealRandomness, pieces []abi.PieceInfo) (scid cid.Cid, ucid cid.Cid, err error)

func (*SealCalls) WritePiece

func (sb *SealCalls) WritePiece(ctx context.Context, taskID *harmonytask.TaskID, pieceID storiface.PieceNumber, size int64, data io.Reader) error

type SectorRef

type SectorRef struct {
	SpID         int64                   `db:"sp_id"`
	SectorNumber int64                   `db:"sector_number"`
	RegSealProof abi.RegisteredSealProof `db:"reg_seal_proof"`
}

func (SectorRef) ID

func (sr SectorRef) ID() abi.SectorID

func (SectorRef) Ref

func (sr SectorRef) Ref() storiface.SectorRef

type StorageReservation

type StorageReservation struct {
	SectorRef SectorRef
	Release   ReleaseStorageFunc
	Paths     storiface.SectorPaths
	PathIDs   storiface.SectorPaths

	Alloc, Existing storiface.SectorFileType
}

type TaskStorage

type TaskStorage struct {

	// Minimum free storage percentage cutoff for reservation rejection
	MinFreeStoragePercentage float64
	// contains filtered or unexported fields
}

func (*TaskStorage) Claim

func (t *TaskStorage) Claim(taskID int) (func() error, error)

func (*TaskStorage) HasCapacity

func (t *TaskStorage) HasCapacity() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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