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 Prover
- 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) GenerateSectorKeyFromData(ctx context.Context, sector storage.SectorRef, commD cid.Cid) error
- func (sb *Sealer) GenerateWindowPoSt(ctx context.Context, minerID abi.ActorID, ...) ([]proof.PoStProof, []abi.SectorID, error)
- func (sb *Sealer) GenerateWinningPoSt(ctx context.Context, minerID abi.ActorID, ...) ([]proof.PoStProof, error)
- func (sb *Sealer) NewSector(ctx context.Context, sector storage.SectorRef) error
- func (sb *Sealer) ProveReplicaUpdate1(ctx context.Context, sector storage.SectorRef, ...) (storage.ReplicaVanillaProofs, error)
- func (sb *Sealer) ProveReplicaUpdate2(ctx context.Context, sector storage.SectorRef, ...) (storage.ReplicaUpdateProof, error)
- func (sb *Sealer) ReadPiece(ctx context.Context, writer io.Writer, sector storage.SectorRef, ...) (bool, error)
- func (sb *Sealer) ReleaseReplicaUpgrade(ctx context.Context, sector storage.SectorRef) error
- func (sb *Sealer) ReleaseSealed(ctx context.Context, sector storage.SectorRef) error
- func (sb *Sealer) ReleaseSectorKey(ctx context.Context, sector storage.SectorRef) 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) ReplicaUpdate(ctx context.Context, sector storage.SectorRef, pieces []abi.PieceInfo) (storage.ReplicaUpdateOut, 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 Validator
- type Verifier
Constants ¶
This section is empty.
Variables ¶
View Source
var PC2CheckRounds = 3
View Source
var ProofProver = proofProver{}
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)
Types ¶
type Prover ¶ added in v1.10.0
type Prover interface {
AggregateSealProofs(aggregateInfo proof.AggregateSealVerifyProofAndInfos, proofs [][]byte) ([]byte, error)
}
Prover contains cheap proving-related methods
type Sealer ¶
type Sealer struct {
// contains filtered or unexported fields
}
func New ¶
func New(sectors SectorProvider) (*Sealer, error)
func (*Sealer) FinalizeSector ¶
func (*Sealer) GenerateSectorKeyFromData ¶ added in v1.14.0
func (*Sealer) GenerateWindowPoSt ¶
func (*Sealer) GenerateWinningPoSt ¶
func (*Sealer) ProveReplicaUpdate1 ¶ added in v1.14.0
func (*Sealer) ProveReplicaUpdate2 ¶ added in v1.14.0
func (sb *Sealer) ProveReplicaUpdate2(ctx context.Context, sector storage.SectorRef, sectorKey, newSealed, newUnsealed cid.Cid, vanillaProofs storage.ReplicaVanillaProofs) (storage.ReplicaUpdateProof, error)
func (*Sealer) ReleaseReplicaUpgrade ¶ added in v1.14.0
func (*Sealer) ReleaseSealed ¶ added in v1.14.0
func (*Sealer) ReleaseSectorKey ¶ added in v1.14.0
func (*Sealer) ReleaseUnsealed ¶
func (*Sealer) ReplicaUpdate ¶ added in v1.14.0
func (*Sealer) SealCommit1 ¶
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 ¶
func (*Sealer) SealPreCommit1 ¶
func (*Sealer) SealPreCommit2 ¶
func (sb *Sealer) SealPreCommit2(ctx context.Context, sector storage.SectorRef, phase1Out storage.PreCommit1Out) (storage.SectorCids, error)
func (*Sealer) UnsealPiece ¶
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 ¶
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 ¶
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 Validator ¶
type Validator interface { CanCommit(sector storiface.SectorPaths) (bool, error) CanProve(sector storiface.SectorPaths) (bool, error) }
type Verifier ¶
type Verifier interface { VerifySeal(proof.SealVerifyInfo) (bool, error) VerifyAggregateSeals(aggregate proof.AggregateSealVerifyProofAndInfos) (bool, error) VerifyReplicaUpdate(update proof.ReplicaUpdateInfo) (bool, error) VerifyWinningPoSt(ctx context.Context, info proof.WinningPoStVerifyInfo) (bool, error) VerifyWindowPoSt(ctx context.Context, info proof.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.