Versions in this module Expand all Collapse all v0 v0.0.1 Jan 14, 2020 Changes in this version + const CommLen + const MaxFallbackPostChallengeCount + const PoRepProofPartitions + const PoStReservedWorkers + const SectorChallengeRatioDiv + var ProofVerifier = proofVerifier + var UserBytesForSectorSize = sectorbuilder.GetMaxUserBytesPerStagedSector + func ElectionPostChallengeCount(sectors uint64, faults uint64) uint64 + func GenerateDataCommitment(ssize uint64, pieces []sectorbuilder.PublicPieceInfo) ([CommLen]byte, error) + func GeneratePieceCommitment(piece io.Reader, pieceSize uint64) (commP [CommLen]byte, err error) + type Config struct + Dir string + FallbackLastID uint64 + Miner address.Address + NoCommit bool + NoPreCommit bool + SectorSize uint64 + WorkerThreads uint8 + type EPostCandidate = sectorbuilder.Candidate + type Fault struct + Err error + SectorID uint64 + type Interface interface + AcquireSectorId func() (uint64, error) + AddPiece func(uint64, uint64, io.Reader, []uint64) (PublicPieceInfo, error) + AddWorker func(context.Context, WorkerCfg) (<-chan WorkerTask, error) + ComputeElectionPoSt func(sectorInfo SortedPublicSectorInfo, challengeSeed []byte, ...) ([]byte, error) + GenerateEPostCandidates func(sectorInfo SortedPublicSectorInfo, challengeSeed [CommLen]byte, ...) ([]EPostCandidate, error) + GenerateFallbackPoSt func(SortedPublicSectorInfo, [CommLen]byte, []uint64) ([]EPostCandidate, []byte, error) + GetPath func(string, string) (string, error) + RateLimit func() func() + ReadPieceFromSealedSector func(sectorID uint64, offset uint64, size uint64, ticket []byte, commD []byte) (io.ReadCloser, error) + Scrub func(SortedPublicSectorInfo) []*Fault + SealCommit func(context.Context, uint64, SealTicket, SealSeed, []PublicPieceInfo, ...) ([]byte, error) + SealPreCommit func(context.Context, uint64, SealTicket, []PublicPieceInfo) (RawSealPreCommitOutput, error) + SectorSize func() uint64 + TaskDone func(context.Context, uint64, SealRes) error + WorkerStats func() WorkerStats + type JsonRSPCO struct + CommD []byte + CommR []byte + type PublicPieceInfo = sectorbuilder.PublicPieceInfo + type RawSealPreCommitOutput sectorbuilder.RawSealPreCommitOutput + func (rspco *RawSealPreCommitOutput) ToJson() JsonRSPCO + type SealCommitOutput = sectorbuilder.SealCommitOutput + type SealPreCommitOutput = sectorbuilder.SealPreCommitOutput + type SealRes struct + Err string + GoErr error + Proof []byte + Rspco JsonRSPCO + type SealSeed = sectorbuilder.SealSeed + type SealTicket = sectorbuilder.SealTicket + type SectorBuilder struct + Miner address.Address + func New(cfg *Config, ds datastore.Batching) (*SectorBuilder, error) + func NewStandalone(cfg *Config) (*SectorBuilder, error) + func TempSectorbuilderDir(dir string, sectorSize uint64, ds datastore.Batching) (*SectorBuilder, error) + func (sb *SectorBuilder) AcquireSectorId() (uint64, error) + func (sb *SectorBuilder) AddPiece(pieceSize uint64, sectorId uint64, file io.Reader, existingPieceSizes []uint64) (PublicPieceInfo, error) + func (sb *SectorBuilder) AddWorker(ctx context.Context, cfg WorkerCfg) (<-chan WorkerTask, error) + func (sb *SectorBuilder) ComputeElectionPoSt(sectorInfo SortedPublicSectorInfo, challengeSeed []byte, ...) ([]byte, error) + func (sb *SectorBuilder) GenerateEPostCandidates(sectorInfo SortedPublicSectorInfo, challengeSeed [CommLen]byte, ...) ([]EPostCandidate, error) + func (sb *SectorBuilder) GenerateFallbackPoSt(sectorInfo SortedPublicSectorInfo, challengeSeed [CommLen]byte, ...) ([]EPostCandidate, []byte, error) + func (sb *SectorBuilder) GetPath(typ string, sectorName string) (string, error) + func (sb *SectorBuilder) ImportFrom(osb *SectorBuilder, symlink bool) error + func (sb *SectorBuilder) RateLimit() func() + func (sb *SectorBuilder) ReadPieceFromSealedSector(sectorID uint64, offset uint64, size uint64, ticket []byte, commD []byte) (io.ReadCloser, error) + func (sb *SectorBuilder) Scrub(sectorSet sectorbuilder.SortedPublicSectorInfo) []*Fault + func (sb *SectorBuilder) SealCommit(ctx context.Context, sectorID uint64, ticket SealTicket, seed SealSeed, ...) (proof []byte, err error) + func (sb *SectorBuilder) SealPreCommit(ctx context.Context, sectorID uint64, ticket SealTicket, ...) (RawSealPreCommitOutput, error) + func (sb *SectorBuilder) SealedSectorPath(sectorID uint64) (string, error) + func (sb *SectorBuilder) SectorName(sectorID uint64) string + func (sb *SectorBuilder) SectorSize() uint64 + func (sb *SectorBuilder) SetLastSectorID(id uint64) error + func (sb *SectorBuilder) StagedSectorPath(sectorID uint64) string + func (sb *SectorBuilder) Stop() + func (sb *SectorBuilder) TaskDone(ctx context.Context, task uint64, res SealRes) error + func (sb *SectorBuilder) TrimCache(sectorID uint64) error + func (sb *SectorBuilder) WorkerStats() WorkerStats + type SortedPrivateSectorInfo = sectorbuilder.SortedPrivateSectorInfo + type SortedPublicSectorInfo = sectorbuilder.SortedPublicSectorInfo + func NewSortedPublicSectorInfo(sectors []sectorbuilder.PublicSectorInfo) SortedPublicSectorInfo + type Verifier interface + VerifyElectionPost func(ctx context.Context, sectorSize uint64, sectorInfo SortedPublicSectorInfo, ...) (bool, error) + VerifyFallbackPost func(ctx context.Context, sectorSize uint64, sectorInfo SortedPublicSectorInfo, ...) (bool, error) + VerifySeal func(sectorSize uint64, commR, commD []byte, proverID address.Address, ...) (bool, error) + type WorkerCfg struct + NoCommit bool + NoPreCommit bool + type WorkerStats struct + AddPieceWait int + CommitWait int + LocalFree int + LocalReserved int + LocalTotal int + PreCommitWait int + RemotesFree int + RemotesTotal int + UnsealWait int + type WorkerTask struct + Pieces []PublicPieceInfo + Rspco RawSealPreCommitOutput + SealSeed SealSeed + SealTicket SealTicket + SectorID uint64 + TaskID uint64 + Type WorkerTaskType + type WorkerTaskType int + const WorkerCommit + const WorkerPreCommit