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)
- func SealProofTypeFromSectorSize(ssize abi.SectorSize, nv network.Version) (abi.RegisteredSealProof, error)
- type Config
- type FakeVerifier
- func (f *FakeVerifier) GenerateWinningPoStSectorChallenge(context.Context, abi.RegisteredPoStProof, abi.ActorID, abi.PoStRandomness, ...) ([]uint64, error)
- func (f *FakeVerifier) VerifyAggregateSeals(aggregate proof5.AggregateSealVerifyProofAndInfos) (bool, error)
- func (f *FakeVerifier) VerifySeal(proof5.SealVerifyInfo) (bool, error)
- func (f *FakeVerifier) VerifyWindowPoSt(context.Context, proof5.WindowPoStVerifyInfo) (bool, error)
- func (f *FakeVerifier) VerifyWinningPoSt(context.Context, proof5.WinningPoStVerifyInfo) (bool, error)
- type Sealer
- func (sb *Sealer) AddPiece(ctx context.Context, sector storage.SectorRef, ...) (abi.PieceInfo, error)
- func (sb *Sealer) FinalizeSector(ctx context.Context, sector storage.SectorRef, keepUnsealed []storage.Range) error
- func (sb *Sealer) GenerateWindowPoSt(ctx context.Context, minerID abi.ActorID, sectorInfo []proof5.SectorInfo, ...) ([]proof5.PoStProof, []abi.SectorID, error)
- func (sb *Sealer) GenerateWinningPoSt(ctx context.Context, minerID abi.ActorID, sectorInfo []proof5.SectorInfo, ...) ([]proof5.PoStProof, error)
- func (sb *Sealer) NewSector(ctx context.Context, sector storage.SectorRef) error
- func (sb *Sealer) ReadPiece(ctx context.Context, writer io.Writer, sector storage.SectorRef, ...) (bool, error)
- func (sb *Sealer) ReleaseUnsealed(ctx context.Context, sector storage.SectorRef, safeToFree []storage.Range) error
- func (sb *Sealer) Remove(ctx context.Context, sector storage.SectorRef) error
- func (sb *Sealer) SealCommit1(ctx context.Context, sector storage.SectorRef, ticket abi.SealRandomness, ...) (storage.Commit1Out, error)
- func (sb *Sealer) SealCommit2(ctx context.Context, sector storage.SectorRef, phase1Out storage.Commit1Out) (storage.Proof, error)
- func (sb *Sealer) SealPreCommit1(ctx context.Context, sector storage.SectorRef, ticket abi.SealRandomness, ...) (out storage.PreCommit1Out, err error)
- func (sb *Sealer) SealPreCommit2(ctx context.Context, sector storage.SectorRef, phase1Out storage.PreCommit1Out) (storage.SectorCids, error)
- func (sb *Sealer) Stop()
- func (sb *Sealer) UnsealPiece(ctx context.Context, sector storage.SectorRef, ...) error
- type SectorProvider
- type Storage
- type StorageSealer
- type Verifier
Constants ¶
This section is empty.
Variables ¶
View Source
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)
func SealProofTypeFromSectorSize ¶
func SealProofTypeFromSectorSize(ssize abi.SectorSize, nv network.Version) (abi.RegisteredSealProof, error)
Types ¶
type Config ¶
type Config struct { SealProofType abi.RegisteredSealProof // contains filtered or unexported fields }
type FakeVerifier ¶
type FakeVerifier struct { }
FakeVerifier is a simple mock Verifier for testing.
func (*FakeVerifier) GenerateWinningPoStSectorChallenge ¶
func (f *FakeVerifier) GenerateWinningPoStSectorChallenge(context.Context, abi.RegisteredPoStProof, abi.ActorID, abi.PoStRandomness, uint64) ([]uint64, error)
func (*FakeVerifier) VerifyAggregateSeals ¶ added in v0.9.7
func (f *FakeVerifier) VerifyAggregateSeals(aggregate proof5.AggregateSealVerifyProofAndInfos) (bool, error)
func (*FakeVerifier) VerifySeal ¶
func (f *FakeVerifier) VerifySeal(proof5.SealVerifyInfo) (bool, error)
func (*FakeVerifier) VerifyWindowPoSt ¶
func (f *FakeVerifier) VerifyWindowPoSt(context.Context, proof5.WindowPoStVerifyInfo) (bool, error)
func (*FakeVerifier) VerifyWinningPoSt ¶
func (f *FakeVerifier) VerifyWinningPoSt(context.Context, proof5.WinningPoStVerifyInfo) (bool, error)
type Sealer ¶ added in v0.9.1
type Sealer struct {
// contains filtered or unexported fields
}
func New ¶ added in v0.9.1
func New(sectors SectorProvider) (*Sealer, error)
func (*Sealer) FinalizeSector ¶ added in v0.9.1
func (*Sealer) GenerateWindowPoSt ¶ added in v0.9.1
func (*Sealer) GenerateWinningPoSt ¶ added in v0.9.1
func (*Sealer) ReleaseUnsealed ¶ added in v0.9.1
func (*Sealer) SealCommit1 ¶ added in v0.9.1
func (sb *Sealer) SealCommit1(ctx context.Context, sector storage.SectorRef, ticket abi.SealRandomness, seed abi.InteractiveSealRandomness, pieces []abi.PieceInfo, cids storage.SectorCids) (storage.Commit1Out, error)
func (*Sealer) SealCommit2 ¶ added in v0.9.1
func (*Sealer) SealPreCommit1 ¶ added in v0.9.1
func (*Sealer) SealPreCommit2 ¶ added in v0.9.1
func (sb *Sealer) SealPreCommit2(ctx context.Context, sector storage.SectorRef, phase1Out storage.PreCommit1Out) (storage.SectorCids, error)
func (*Sealer) UnsealPiece ¶ added in v0.9.1
func (sb *Sealer) UnsealPiece(ctx context.Context, sector storage.SectorRef, offset storiface.UnpaddedByteIndex, size abi.UnpaddedPieceSize, randomness abi.SealRandomness, commd cid.Cid) error
type SectorProvider ¶ added in v0.9.1
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 storage.SectorRef, existing storiface.SectorFileType, allocate storiface.SectorFileType, ptype storiface.PathType) (storiface.SectorPaths, func(), error) }
type Storage ¶ added in v0.9.1
type Storage interface { storage.Prover StorageSealer UnsealPiece(ctx context.Context, sector storage.SectorRef, offset storiface.UnpaddedByteIndex, size abi.UnpaddedPieceSize, randomness abi.SealRandomness, commd cid.Cid) error ReadPiece(ctx context.Context, writer io.Writer, sector storage.SectorRef, offset storiface.UnpaddedByteIndex, size abi.UnpaddedPieceSize) (bool, error) }
type StorageSealer ¶ added in v0.9.1
type Verifier ¶
type Verifier interface { VerifySeal(proof5.SealVerifyInfo) (bool, error) VerifyAggregateSeals(aggregate proof5.AggregateSealVerifyProofAndInfos) (bool, error) VerifyWinningPoSt(ctx context.Context, info proof5.WinningPoStVerifyInfo) (bool, error) VerifyWindowPoSt(ctx context.Context, info proof5.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.