Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateDataCommitment(ssize uint64, pieces []sectorbuilder.PublicPieceInfo) ([CommLen]byte, error)
- func GeneratePieceCommitment(piece io.Reader, pieceSize uint64) (commP [CommLen]byte, err error)
- func VerifyElectionPost(ctx context.Context, sectorSize uint64, sectorInfo SortedPublicSectorInfo, ...) (bool, error)
- func VerifyFallbackPost(ctx context.Context, sectorSize uint64, sectorInfo SortedPublicSectorInfo, ...) (bool, error)
- func VerifySeal(sectorSize uint64, commR, commD []byte, proverID address.Address, ...) (bool, error)
- type Config
- type EPostCandidate
- type Fault
- type JsonRSPCO
- type PublicPieceInfo
- type RawSealPreCommitOutput
- type SealCommitOutput
- type SealPreCommitOutput
- type SealRes
- type SealSeed
- type SealTicket
- type SectorBuilder
- 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(sectorID uint64, ticket SealTicket, seed SealSeed, pieces []PublicPieceInfo, ...) (proof []byte, err error)
- func (sb *SectorBuilder) SealPreCommit(sectorID uint64, ticket SealTicket, pieces []PublicPieceInfo) (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
- type SortedPublicSectorInfo
- type WorkerCfg
- type WorkerStats
- type WorkerTask
- type WorkerTaskType
Constants ¶
View Source
const CommLen = sectorbuilder.CommitmentBytesLen
View Source
const PoRepProofPartitions = 10
View Source
const PoStReservedWorkers = 1
Variables ¶
View Source
var UserBytesForSectorSize = sectorbuilder.GetMaxUserBytesPerStagedSector
Functions ¶
func GenerateDataCommitment ¶
func GenerateDataCommitment(ssize uint64, pieces []sectorbuilder.PublicPieceInfo) ([CommLen]byte, error)
func GeneratePieceCommitment ¶
func VerifyElectionPost ¶
func VerifyFallbackPost ¶
Types ¶
type EPostCandidate ¶
type EPostCandidate = sectorbuilder.Candidate
type PublicPieceInfo ¶
type PublicPieceInfo = sectorbuilder.PublicPieceInfo
type RawSealPreCommitOutput ¶
type RawSealPreCommitOutput sectorbuilder.RawSealPreCommitOutput
func (*RawSealPreCommitOutput) ToJson ¶
func (rspco *RawSealPreCommitOutput) ToJson() JsonRSPCO
type SealCommitOutput ¶
type SealCommitOutput = sectorbuilder.SealCommitOutput
type SealPreCommitOutput ¶
type SealPreCommitOutput = sectorbuilder.SealPreCommitOutput
type SealSeed ¶
type SealSeed = sectorbuilder.SealSeed
type SealTicket ¶
type SealTicket = sectorbuilder.SealTicket
type SectorBuilder ¶
func New ¶
func New(cfg *Config, ds dtypes.MetadataDS) (*SectorBuilder, error)
func NewStandalone ¶
func NewStandalone(cfg *Config) (*SectorBuilder, error)
func TempSectorbuilderDir ¶
func TempSectorbuilderDir(dir string, sectorSize uint64, ds dtypes.MetadataDS) (*SectorBuilder, error)
func (*SectorBuilder) AcquireSectorId ¶
func (sb *SectorBuilder) AcquireSectorId() (uint64, error)
func (*SectorBuilder) AddPiece ¶
func (sb *SectorBuilder) AddPiece(pieceSize uint64, sectorId uint64, file io.Reader, existingPieceSizes []uint64) (PublicPieceInfo, error)
func (*SectorBuilder) AddWorker ¶
func (sb *SectorBuilder) AddWorker(ctx context.Context, cfg WorkerCfg) (<-chan WorkerTask, error)
func (*SectorBuilder) ComputeElectionPoSt ¶
func (sb *SectorBuilder) ComputeElectionPoSt(sectorInfo SortedPublicSectorInfo, challengeSeed []byte, winners []EPostCandidate) ([]byte, error)
func (*SectorBuilder) GenerateEPostCandidates ¶
func (sb *SectorBuilder) GenerateEPostCandidates(sectorInfo SortedPublicSectorInfo, challengeSeed [CommLen]byte, faults []uint64) ([]EPostCandidate, error)
func (*SectorBuilder) GenerateFallbackPoSt ¶
func (sb *SectorBuilder) GenerateFallbackPoSt(sectorInfo SortedPublicSectorInfo, challengeSeed [CommLen]byte, faults []uint64) ([]EPostCandidate, []byte, error)
func (*SectorBuilder) GetPath ¶
func (sb *SectorBuilder) GetPath(typ string, sectorName string) (string, error)
func (*SectorBuilder) ImportFrom ¶
func (sb *SectorBuilder) ImportFrom(osb *SectorBuilder, symlink bool) error
func (*SectorBuilder) RateLimit ¶
func (sb *SectorBuilder) RateLimit() func()
func (*SectorBuilder) ReadPieceFromSealedSector ¶
func (sb *SectorBuilder) ReadPieceFromSealedSector(sectorID uint64, offset uint64, size uint64, ticket []byte, commD []byte) (io.ReadCloser, error)
func (*SectorBuilder) Scrub ¶ added in v0.1.5
func (sb *SectorBuilder) Scrub(sectorSet sectorbuilder.SortedPublicSectorInfo) []*Fault
func (*SectorBuilder) SealCommit ¶
func (sb *SectorBuilder) SealCommit(sectorID uint64, ticket SealTicket, seed SealSeed, pieces []PublicPieceInfo, rspco RawSealPreCommitOutput) (proof []byte, err error)
func (*SectorBuilder) SealPreCommit ¶
func (sb *SectorBuilder) SealPreCommit(sectorID uint64, ticket SealTicket, pieces []PublicPieceInfo) (RawSealPreCommitOutput, error)
func (*SectorBuilder) SealedSectorPath ¶
func (sb *SectorBuilder) SealedSectorPath(sectorID uint64) (string, error)
func (*SectorBuilder) SectorName ¶
func (sb *SectorBuilder) SectorName(sectorID uint64) string
func (*SectorBuilder) SectorSize ¶
func (sb *SectorBuilder) SectorSize() uint64
func (*SectorBuilder) SetLastSectorID ¶
func (sb *SectorBuilder) SetLastSectorID(id uint64) error
func (*SectorBuilder) StagedSectorPath ¶
func (sb *SectorBuilder) StagedSectorPath(sectorID uint64) string
func (*SectorBuilder) Stop ¶
func (sb *SectorBuilder) Stop()
func (*SectorBuilder) TrimCache ¶
func (sb *SectorBuilder) TrimCache(sectorID uint64) error
func (*SectorBuilder) WorkerStats ¶
func (sb *SectorBuilder) WorkerStats() WorkerStats
type SortedPrivateSectorInfo ¶
type SortedPrivateSectorInfo = sectorbuilder.SortedPrivateSectorInfo
func NewSortedPrivateSectorInfo ¶
func NewSortedPrivateSectorInfo(sectors []sectorbuilder.PrivateSectorInfo) SortedPrivateSectorInfo
type SortedPublicSectorInfo ¶
type SortedPublicSectorInfo = sectorbuilder.SortedPublicSectorInfo
func NewSortedPublicSectorInfo ¶
func NewSortedPublicSectorInfo(sectors []sectorbuilder.PublicSectorInfo) SortedPublicSectorInfo
type WorkerStats ¶
type WorkerTask ¶
type WorkerTask struct { Type WorkerTaskType TaskID uint64 SectorID uint64 // preCommit SealTicket SealTicket Pieces []PublicPieceInfo // commit SealSeed SealSeed Rspco RawSealPreCommitOutput }
type WorkerTaskType ¶
type WorkerTaskType int
const ( WorkerPreCommit WorkerTaskType = iota WorkerCommit )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.