Documentation ¶
Index ¶
- Variables
- func GeneratePieceCIDFromFile(proofType abi.RegisteredSealProof, piece io.Reader, ...) (cid.Cid, error)
- func GenerateUnsealedCID(proofType abi.RegisteredSealProof, pieces []abi.PieceInfo) (cid.Cid, error)
- func GetRequiredPadding(oldLength abi.PaddedPieceSize, newPieceLength abi.PaddedPieceSize) ([]abi.PaddedPieceSize, abi.PaddedPieceSize)
- func SealProofTypeFromSectorSize(ssize abi.SectorSize) (abi.RegisteredSealProof, error)
- func ToReadableFile(r io.Reader, n int64) (*os.File, func() error, error)
- type Config
- type Sealer
- func (sb *Sealer) AddPiece(ctx context.Context, sector abi.SectorID, ...) (abi.PieceInfo, error)
- func (sb *Sealer) FinalizeSector(ctx context.Context, sector abi.SectorID, keepUnsealed []storage.Range) error
- func (sb *Sealer) GenerateWindowPoSt(ctx context.Context, minerID abi.ActorID, sectorInfo []proof2.SectorInfo, ...) ([]proof2.PoStProof, []abi.SectorID, error)
- func (sb *Sealer) GenerateWinningPoSt(ctx context.Context, minerID abi.ActorID, sectorInfo []proof2.SectorInfo, ...) ([]proof2.PoStProof, error)
- func (sb *Sealer) NewSector(ctx context.Context, sector abi.SectorID) error
- func (sb *Sealer) ReadPiece(ctx context.Context, writer io.Writer, sector abi.SectorID, ...) (bool, error)
- func (sb *Sealer) ReleaseUnsealed(ctx context.Context, sector abi.SectorID, safeToFree []storage.Range) error
- func (sb *Sealer) Remove(ctx context.Context, sector abi.SectorID) error
- func (sb *Sealer) SealCommit1(ctx context.Context, sector abi.SectorID, ticket abi.SealRandomness, ...) (storage.Commit1Out, error)
- func (sb *Sealer) SealCommit2(ctx context.Context, sector abi.SectorID, phase1Out storage.Commit1Out) (storage.Proof, error)
- func (sb *Sealer) SealPreCommit1(ctx context.Context, sector abi.SectorID, ticket abi.SealRandomness, ...) (out storage.PreCommit1Out, err error)
- func (sb *Sealer) SealPreCommit2(ctx context.Context, sector abi.SectorID, phase1Out storage.PreCommit1Out) (storage.SectorCids, error)
- func (sb *Sealer) SealProofType() abi.RegisteredSealProof
- func (sb *Sealer) SectorSize() abi.SectorSize
- func (sb *Sealer) Stop()
- func (sb *Sealer) UnsealPiece(ctx context.Context, sector abi.SectorID, offset storiface.UnpaddedByteIndex, ...) error
- type SectorProvider
- type Storage
- type StorageSealer
- type Validator
- type Verifier
Constants ¶
This section is empty.
Variables ¶
View Source
var ProofVerifier = proofVerifier{}
Functions ¶
func GeneratePieceCIDFromFile ¶
func GeneratePieceCIDFromFile(proofType abi.RegisteredSealProof, piece io.Reader, pieceSize abi.UnpaddedPieceSize) (cid.Cid, error)
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)
func SealProofTypeFromSectorSize ¶
func SealProofTypeFromSectorSize(ssize abi.SectorSize) (abi.RegisteredSealProof, error)
Types ¶
type Config ¶
type Config struct { SealProofType abi.RegisteredSealProof // contains filtered or unexported fields }
type Sealer ¶
type Sealer struct {
// contains filtered or unexported fields
}
func (*Sealer) FinalizeSector ¶
func (*Sealer) GenerateWindowPoSt ¶
func (*Sealer) GenerateWinningPoSt ¶
func (*Sealer) ReleaseUnsealed ¶
func (*Sealer) SealCommit1 ¶
func (sb *Sealer) SealCommit1(ctx context.Context, sector abi.SectorID, ticket abi.SealRandomness, seed abi.InteractiveSealRandomness, pieces []abi.PieceInfo, cids storage.SectorCids) (storage.Commit1Out, error)
func (*Sealer) SealCommit2 ¶
func (*Sealer) SealPreCommit1 ¶
func (*Sealer) SealPreCommit2 ¶
func (sb *Sealer) SealPreCommit2(ctx context.Context, sector abi.SectorID, phase1Out storage.PreCommit1Out) (storage.SectorCids, error)
func (*Sealer) SealProofType ¶
func (sb *Sealer) SealProofType() abi.RegisteredSealProof
func (*Sealer) SectorSize ¶
func (sb *Sealer) SectorSize() abi.SectorSize
func (*Sealer) UnsealPiece ¶
func (sb *Sealer) UnsealPiece(ctx context.Context, sector abi.SectorID, 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 abi.SectorID, existing stores.SectorFileType, allocate stores.SectorFileType, ptype stores.PathType) (stores.SectorPaths, func(), error) }
type Storage ¶
type Storage interface { storage.Prover StorageSealer UnsealPiece(ctx context.Context, sector abi.SectorID, offset storiface.UnpaddedByteIndex, size abi.UnpaddedPieceSize, randomness abi.SealRandomness, commd cid.Cid) error ReadPiece(ctx context.Context, writer io.Writer, sector abi.SectorID, offset storiface.UnpaddedByteIndex, size abi.UnpaddedPieceSize) (bool, error) }
type Validator ¶
type Validator interface { CanCommit(sector stores.SectorPaths) (bool, error) CanProve(sector stores.SectorPaths) (bool, error) }
type Verifier ¶
type Verifier interface { VerifySeal(proof2.SealVerifyInfo) (bool, error) VerifyWinningPoSt(ctx context.Context, info proof2.WinningPoStVerifyInfo) (bool, error) VerifyWindowPoSt(ctx context.Context, info proof2.WindowPoStVerifyInfo) (bool, error) GenerateWinningPoStSectorChallenge(context.Context, abi.RegisteredPoStProof, abi.ActorID, abi.PoStRandomness, uint64) ([]uint64, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.