Documentation
¶
Index ¶
- Constants
- Variables
- func TruncateAndMoveUnsealed(tempUnsealed, unsealed string, ssize abi.SectorSize) error
- func WindowPoStCuzk(ctx context.Context, cuzkClient *cuzk.Client, ...) (proof2.PoStProof, error)
- func WinningPoStCuzk(ctx context.Context, cuzkClient *cuzk.Client, ...) ([]proof2.PoStProof, error)
- type ReleaseStorageFunc
- type SealCalls
- func (sb *SealCalls) CheckSealedCommR(ctx context.Context, s storiface.SectorRef) (cid.Cid, error)
- func (sb *SealCalls) CheckUnsealedCID(ctx context.Context, s storiface.SectorRef) (cid.Cid, error)
- func (sb *SealCalls) CheckUpdateCommR(ctx context.Context, s storiface.SectorRef) (cid.Cid, error)
- func (sb *SealCalls) DecodeSDR(ctx context.Context, taskID harmonytask.TaskID, sector storiface.SectorRef) error
- func (sb *SealCalls) DecodeSnap(ctx context.Context, taskID harmonytask.TaskID, commD, commK cid.Cid, ...) error
- func (sb *SealCalls) EncodeUpdate(ctx context.Context, sectorKeyCid cid.Cid, taskID harmonytask.TaskID, ...) (sealedCID cid.Cid, unsealedCID cid.Cid, err error)
- func (sb *SealCalls) FinalizeSector(ctx context.Context, sector storiface.SectorRef, keepUnsealed bool) error
- func (sb *SealCalls) GenerateSDR(ctx context.Context, taskID harmonytask.TaskID, into storiface.SectorFileType, ...) error
- func (sb *SealCalls) GenerateSynthPoRep()
- func (sb *SealCalls) GenerateUnsealedSector(ctx context.Context, sector storiface.SectorRef, ...) error
- func (sb *SealCalls) LocalStorage(ctx context.Context) ([]storiface.StoragePath, error)
- func (sb *SealCalls) MoveStorage(ctx context.Context, sector storiface.SectorRef, taskID *harmonytask.TaskID) error
- func (sb *SealCalls) MoveStorageSnap(ctx context.Context, sector storiface.SectorRef, taskID *harmonytask.TaskID) error
- func (sb *SealCalls) PieceReader(ctx context.Context, id storiface.PieceNumber) (io.ReadCloser, error)
- func (sb *SealCalls) PoRepSnark(ctx context.Context, sn storiface.SectorRef, sealed, unsealed cid.Cid, ...) ([]byte, error)
- func (sb *SealCalls) PoRepSnarkCuzk(ctx context.Context, cuzkClient *cuzk.Client, sn storiface.SectorRef, ...) ([]byte, error)
- func (sb *SealCalls) PreFetch(ctx context.Context, sector storiface.SectorRef, task *harmonytask.TaskID) (fsPath, pathID storiface.SectorPaths, ...)
- func (sb *SealCalls) ProveUpdate(ctx context.Context, proofType abi.RegisteredUpdateProof, ...) ([]byte, error)
- func (sb *SealCalls) ProveUpdateCuzk(ctx context.Context, cuzkClient *cuzk.Client, ...) ([]byte, error)
- func (sb *SealCalls) RemovePiece(ctx context.Context, id storiface.PieceNumber) error
- func (sb *SealCalls) Storage(taskToSectorRef func(taskID harmonytask.TaskID) (SectorRef, error), ...) *TaskStorage
- func (sb *SealCalls) StorageMulti(taskToSectorRef func(taskID harmonytask.TaskID) ([]SectorRef, error), ...) *TaskStorage
- func (sb *SealCalls) SyntheticProofs(ctx context.Context, task *harmonytask.TaskID, sector storiface.SectorRef, ...) error
- func (sb *SealCalls) TreeD(ctx context.Context, sector storiface.SectorRef, unsealed cid.Cid, ...) error
- func (sb *SealCalls) TreeRC(ctx context.Context, task *harmonytask.TaskID, sector storiface.SectorRef, ...) (scid cid.Cid, ucid cid.Cid, err error)
- func (sb *SealCalls) WritePiece(ctx context.Context, taskID *harmonytask.TaskID, pieceID storiface.PieceNumber, ...) error
- func (sb *SealCalls) WriteUploadPiece(ctx context.Context, pieceID storiface.PieceNumber, size int64, data io.Reader, ...) (abi.PieceInfo, uint64, error)
- type SectorRef
- type StorageReservation
- type TaskStorage
Constants ¶
const C1CheckNumber = 3
Variables ¶
var Measures = struct { encActivePhase *stats.Int64Measure }{ // contains filtered or unexported fields }
var TreeRTimeout = 20 * time.Minute
Functions ¶
func TruncateAndMoveUnsealed ¶ added in v1.24.4
func TruncateAndMoveUnsealed(tempUnsealed, unsealed string, ssize abi.SectorSize) error
func WindowPoStCuzk ¶ added in v1.28.1
func WindowPoStCuzk(ctx context.Context, cuzkClient *cuzk.Client, proofType abi.RegisteredPoStProof, minerID abi.ActorID, randomness abi.PoStRandomness, vanillaProofs [][]byte, partitionIdx int) (proof2.PoStProof, error)
WindowPoStCuzk sends per-sector vanilla proofs to the cuzk daemon for SNARK computation, returning the single-partition PoStProof. The vanilla proofs must already be generated locally (reading challenge data from sealed sectors).
func WinningPoStCuzk ¶ added in v1.28.1
func WinningPoStCuzk(ctx context.Context, cuzkClient *cuzk.Client, proofType abi.RegisteredPoStProof, minerID abi.ActorID, randomness abi.PoStRandomness, vanillaProofs [][]byte) ([]proof2.PoStProof, error)
WinningPoStCuzk sends per-sector vanilla proofs to the cuzk daemon for SNARK computation, returning the WinningPoSt proof. This is time-critical — must complete within the epoch window.
Types ¶
type ReleaseStorageFunc ¶
type ReleaseStorageFunc func() // free storage reservation
type SealCalls ¶
type SealCalls struct {
Sectors *storageProvider
}
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 (*SealCalls) CheckSealedCommR ¶ added in v1.27.3
CheckSealedCommR verifies a sealed sector's CommR by recomputing tree-r from the sealed file. It uses supraseal's GPU-accelerated tree-r computation. Returns the computed CommR CID.
func (*SealCalls) CheckUnsealedCID ¶ added in v1.23.1
func (*SealCalls) CheckUpdateCommR ¶ added in v1.27.3
CheckUpdateCommR verifies a snap-updated sector's CommR by recomputing tree-r from the update file. It uses supraseal's GPU-accelerated tree-r computation. Returns the computed CommR CID.
func (*SealCalls) DecodeSnap ¶ added in v1.23.1
func (*SealCalls) EncodeUpdate ¶ added in v1.23.0
func (*SealCalls) FinalizeSector ¶
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) GenerateUnsealedSector ¶ added in v1.24.4
func (*SealCalls) LocalStorage ¶
func (*SealCalls) MoveStorage ¶
func (*SealCalls) MoveStorageSnap ¶ added in v1.23.0
func (*SealCalls) PieceReader ¶
func (sb *SealCalls) PieceReader(ctx context.Context, id storiface.PieceNumber) (io.ReadCloser, error)
func (*SealCalls) PoRepSnark ¶
func (*SealCalls) PoRepSnarkCuzk ¶ added in v1.28.1
func (sb *SealCalls) PoRepSnarkCuzk(ctx context.Context, cuzkClient *cuzk.Client, sn storiface.SectorRef, sealed, unsealed cid.Cid, ticket abi.SealRandomness, seed abi.InteractiveSealRandomness) ([]byte, error)
PoRepSnarkCuzk generates the vanilla proof locally (needs sector data on disk), then delegates the SNARK computation to the cuzk daemon via gRPC. The proof is verified locally after cuzk returns.
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 (*SealCalls) ProveUpdateCuzk ¶ added in v1.28.1
func (sb *SealCalls) ProveUpdateCuzk(ctx context.Context, cuzkClient *cuzk.Client, proofType abi.RegisteredUpdateProof, sector storiface.SectorRef, key, sealed, unsealed cid.Cid) ([]byte, error)
ProveUpdateCuzk reads the snap vanilla proof from storage, then delegates the SNARK computation to the cuzk daemon via gRPC.
func (*SealCalls) RemovePiece ¶
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) StorageMulti ¶ added in v1.26.0
func (sb *SealCalls) StorageMulti(taskToSectorRef func(taskID harmonytask.TaskID) ([]SectorRef, error), alloc, existing storiface.SectorFileType, ssize abi.SectorSize, pathType storiface.PathType, MinFreeStoragePercentage float64, ohs map[storiface.SectorFileType]int) *TaskStorage
func (*SealCalls) SyntheticProofs ¶ added in v1.23.0
func (*SealCalls) WritePiece ¶
type SectorRef ¶
type SectorRef struct {
SpID int64 `db:"sp_id"`
SectorNumber int64 `db:"sector_number"`
RegSealProof abi.RegisteredSealProof `db:"reg_seal_proof"`
}
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
Overheads map[storiface.SectorFileType]int
// contains filtered or unexported fields
}
func (*TaskStorage) HasCapacity ¶
func (t *TaskStorage) HasCapacity() bool