Documentation ¶
Index ¶
- Variables
- func GenerateUnsealedCID(proofType abi.RegisteredSealProof, pieces []abi.PieceInfo) (cid.Cid, error)
- func GetRequiredPadding(oldLength abi.PaddedPieceSize, newPieceLength abi.PaddedPieceSize) ([]abi.PaddedPieceSize, abi.PaddedPieceSize)
- type ExternPrecommit2
- type ExternalSealer
- type FFIWrapperOpt
- type FFIWrapperOpts
- type Sealer
- func (sb *Sealer) AddPiece(ctx context.Context, sector storiface.SectorRef, ...) (abi.PieceInfo, error)
- func (sb *Sealer) DataCid(ctx context.Context, pieceSize abi.UnpaddedPieceSize, pieceData storiface.Data) (abi.PieceInfo, error)
- func (sb *Sealer) DownloadSectorData(ctx context.Context, sector storiface.SectorRef, finalized bool, ...) error
- func (sb *Sealer) FinalizeReplicaUpdate(ctx context.Context, sector storiface.SectorRef) error
- func (sb *Sealer) FinalizeSector(ctx context.Context, sector storiface.SectorRef) error
- func (sb *Sealer) FinalizeSectorInto(ctx context.Context, sector storiface.SectorRef, dest string) error
- func (sb *Sealer) GenerateSectorKeyFromData(ctx context.Context, sector storiface.SectorRef, commD cid.Cid) error
- func (sb *Sealer) GenerateSingleVanillaProof(replica ffi.PrivateSectorInfo, challenges []uint64) ([]byte, error)
- func (sb *Sealer) GenerateWindowPoSt(ctx context.Context, minerID abi.ActorID, ...) ([]proof.PoStProof, []abi.SectorID, error)
- func (sb *Sealer) GenerateWindowPoStWithVanilla(ctx context.Context, proofType abi.RegisteredPoStProof, minerID abi.ActorID, ...) (proof.PoStProof, error)
- func (sb *Sealer) GenerateWinningPoSt(ctx context.Context, minerID abi.ActorID, ...) ([]proof.PoStProof, error)
- func (sb *Sealer) GenerateWinningPoStWithVanilla(ctx context.Context, proofType abi.RegisteredPoStProof, minerID abi.ActorID, ...) ([]proof.PoStProof, error)
- func (sb *Sealer) NewSector(ctx context.Context, sector storiface.SectorRef) error
- func (sb *Sealer) ProveReplicaUpdate1(ctx context.Context, sector storiface.SectorRef, ...) (storiface.ReplicaVanillaProofs, error)
- func (sb *Sealer) ProveReplicaUpdate2(ctx context.Context, sector storiface.SectorRef, ...) (storiface.ReplicaUpdateProof, error)
- func (sb *Sealer) ReadPiece(ctx context.Context, writer io.Writer, sector storiface.SectorRef, ...) (bool, error)
- func (sb *Sealer) ReleaseReplicaUpgrade(ctx context.Context, sector storiface.SectorRef) error
- func (sb *Sealer) ReleaseSealed(ctx context.Context, sector storiface.SectorRef) error
- func (sb *Sealer) ReleaseSectorKey(ctx context.Context, sector storiface.SectorRef) error
- func (sb *Sealer) ReleaseUnsealed(ctx context.Context, sector storiface.SectorRef, ...) error
- func (sb *Sealer) Remove(ctx context.Context, sector storiface.SectorRef) error
- func (sb *Sealer) ReplicaUpdate(ctx context.Context, sector storiface.SectorRef, pieces []abi.PieceInfo) (storiface.ReplicaUpdateOut, error)
- func (sb *Sealer) SealCommit1(ctx context.Context, sector storiface.SectorRef, ticket abi.SealRandomness, ...) (storiface.Commit1Out, error)
- func (sb *Sealer) SealCommit2(ctx context.Context, sector storiface.SectorRef, ...) (storiface.Proof, error)
- func (sb *Sealer) SealPreCommit1(ctx context.Context, sector storiface.SectorRef, ticket abi.SealRandomness, ...) (out storiface.PreCommit1Out, err error)
- func (sb *Sealer) SealPreCommit2(ctx context.Context, sector storiface.SectorRef, ...) (storiface.SectorCids, error)
- func (sb *Sealer) Stop()
- func (sb *Sealer) UnsealPiece(ctx context.Context, sector storiface.SectorRef, ...) error
- type SectorProvider
Constants ¶
This section is empty.
Variables ¶
var PC2CheckRounds = 3
var ProofProver = proofProver{}
var ProofVerifier = proofVerifier{}
Functions ¶
func GenerateUnsealedCID ¶
func GenerateUnsealedCID(proofType abi.RegisteredSealProof, pieces []abi.PieceInfo) (cid.Cid, error)
func GetRequiredPadding ¶
func GetRequiredPadding(oldLength abi.PaddedPieceSize, newPieceLength abi.PaddedPieceSize) ([]abi.PaddedPieceSize, abi.PaddedPieceSize)
Types ¶
type ExternPrecommit2 ¶ added in v1.25.2
type ExternPrecommit2 func(ctx context.Context, sector storiface.SectorRef, cache, sealed string, pc1out storiface.PreCommit1Out) (sealedCID cid.Cid, unsealedCID cid.Cid, err error)
func MakeExternPrecommit2 ¶ added in v1.25.2
func MakeExternPrecommit2(command string) ExternPrecommit2
MakeExternPrecommit2 creates an implementation of ExternPrecommit2 backed by an external command specified by the command string.
The command will be called with a number of environment variables set: * EXTSEAL_PC2_SECTOR_NUM: the sector number * EXTSEAL_PC2_SECTOR_MINER: the miner id * EXTSEAL_PC2_PROOF_TYPE: the proof type * EXTSEAL_PC2_SECTOR_SIZE: the sector size in bytes * EXTSEAL_PC2_CACHE: the path to the cache directory * EXTSEAL_PC2_SEALED: the path to the sealed sector file (initialized with unsealed data by the caller) * EXTSEAL_PC2_PC1OUT: output from rust-fil-proofs precommit1 phase (base64 encoded json)
The command is expected to: * Create cache sc-02-data-tree-r* files * Create cache sc-02-data-tree-c* files * Create cache p_aux / t_aux files * Transform the sealed file in place
type ExternalSealer ¶ added in v1.25.2
type ExternalSealer struct {
PreCommit2 ExternPrecommit2
}
type FFIWrapperOpt ¶ added in v1.25.2
type FFIWrapperOpt func(*FFIWrapperOpts)
func WithExternalSealCalls ¶ added in v1.25.2
func WithExternalSealCalls(ext ExternalSealer) FFIWrapperOpt
type FFIWrapperOpts ¶ added in v1.25.2
type FFIWrapperOpts struct {
// contains filtered or unexported fields
}
type Sealer ¶
type Sealer struct {
// contains filtered or unexported fields
}
func New ¶
func New(sectors SectorProvider, opts ...FFIWrapperOpt) (*Sealer, error)
func (*Sealer) DownloadSectorData ¶ added in v1.17.2
func (*Sealer) FinalizeReplicaUpdate ¶
func (*Sealer) FinalizeSector ¶
func (*Sealer) FinalizeSectorInto ¶ added in v1.17.2
func (sb *Sealer) FinalizeSectorInto(ctx context.Context, sector storiface.SectorRef, dest string) error
FinalizeSectorInto is like FinalizeSector, but writes finalized sector cache into a new path
func (*Sealer) GenerateSectorKeyFromData ¶
func (*Sealer) GenerateSingleVanillaProof ¶ added in v1.27.1
func (*Sealer) GenerateWindowPoSt ¶
func (*Sealer) GenerateWindowPoStWithVanilla ¶
func (*Sealer) GenerateWinningPoSt ¶
func (*Sealer) GenerateWinningPoStWithVanilla ¶
func (*Sealer) ProveReplicaUpdate1 ¶
func (*Sealer) ProveReplicaUpdate2 ¶
func (sb *Sealer) ProveReplicaUpdate2(ctx context.Context, sector storiface.SectorRef, sectorKey, newSealed, newUnsealed cid.Cid, vanillaProofs storiface.ReplicaVanillaProofs) (storiface.ReplicaUpdateProof, error)
func (*Sealer) ReleaseReplicaUpgrade ¶
func (*Sealer) ReleaseSealed ¶
func (*Sealer) ReleaseSectorKey ¶
func (*Sealer) ReleaseUnsealed ¶
func (*Sealer) ReplicaUpdate ¶
func (*Sealer) SealCommit1 ¶
func (sb *Sealer) SealCommit1(ctx context.Context, sector storiface.SectorRef, ticket abi.SealRandomness, seed abi.InteractiveSealRandomness, pieces []abi.PieceInfo, cids storiface.SectorCids) (storiface.Commit1Out, error)
func (*Sealer) SealCommit2 ¶
func (*Sealer) SealPreCommit1 ¶
func (*Sealer) SealPreCommit2 ¶
func (sb *Sealer) SealPreCommit2(ctx context.Context, sector storiface.SectorRef, phase1Out storiface.PreCommit1Out) (storiface.SectorCids, error)
func (*Sealer) UnsealPiece ¶
func (sb *Sealer) UnsealPiece(ctx context.Context, sector storiface.SectorRef, offset storiface.UnpaddedByteIndex, size abi.UnpaddedPieceSize, randomness abi.SealRandomness, commd cid.Cid) error
type SectorProvider ¶
type SectorProvider interface { // * returns storiface.ErrSectorNotFound if a requested existing sector doesn't exist // * returns an error when allocate is set, and existing isn't, and the sector exists AcquireSector(ctx context.Context, id storiface.SectorRef, existing storiface.SectorFileType, allocate storiface.SectorFileType, ptype storiface.PathType) (storiface.SectorPaths, func(), error) // AcquireSector, but a copy to preseve its long-term storage location. AcquireSectorCopy(ctx context.Context, id storiface.SectorRef, existing storiface.SectorFileType, allocate storiface.SectorFileType, ptype storiface.PathType) (storiface.SectorPaths, func(), error) }