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, nv network.Version) (abi.RegisteredSealProof, error)
- func ToReadableFile(r io.Reader, n int64) (*os.File, func() error, error)
- type Config
- type FakeVerifier
- func (f *FakeVerifier) GenerateWinningPoStSectorChallenge(context.Context, abi.RegisteredPoStProof, abi.ActorID, abi.PoStRandomness, ...) ([]uint64, error)
- func (f *FakeVerifier) VerifySeal(proof.SealVerifyInfo) (bool, error)
- func (f *FakeVerifier) VerifyWindowPoSt(context.Context, proof.WindowPoStVerifyInfo) (bool, error)
- func (f *FakeVerifier) VerifyWinningPoSt(context.Context, proof.WinningPoStVerifyInfo) (bool, error)
- type PaddedByteIndex
- type UnpaddedByteIndex
- type Verifier
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSectorNotFound = errors.New("sector not found")
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, 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) VerifySeal ¶
func (f *FakeVerifier) VerifySeal(proof.SealVerifyInfo) (bool, error)
func (*FakeVerifier) VerifyWindowPoSt ¶
func (f *FakeVerifier) VerifyWindowPoSt(context.Context, proof.WindowPoStVerifyInfo) (bool, error)
func (*FakeVerifier) VerifyWinningPoSt ¶
func (f *FakeVerifier) VerifyWinningPoSt(context.Context, proof.WinningPoStVerifyInfo) (bool, error)
type PaddedByteIndex ¶
type PaddedByteIndex uint64
type UnpaddedByteIndex ¶
type UnpaddedByteIndex uint64
func (UnpaddedByteIndex) Padded ¶
func (i UnpaddedByteIndex) Padded() PaddedByteIndex
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) }
Click to show internal directories.
Click to hide internal directories.