Documentation ¶
Index ¶
- Constants
- type Miner
- func (m *Miner) AllocatePiece(size uint64) (sectorID uint64, offset uint64, err error)
- func (m *Miner) GetSectorInfo(sid uint64) (SectorInfo, error)
- func (m *Miner) ListSectors() ([]SectorInfo, error)
- func (m *Miner) PledgeSector() error
- func (m *Miner) Run(ctx context.Context) error
- func (m *Miner) SealPiece(ctx context.Context, size uint64, r io.Reader, sectorID uint64, dealID uint64) error
- func (m *Miner) Stop(ctx context.Context) error
- func (m *Miner) UpdateSectorState(ctx context.Context, sector uint64, snonce uint64, state api.SectorState) error
- type Piece
- type SealSeed
- type SealTicket
- type SectorBuilderEpp
- func (epp *SectorBuilderEpp) ComputeProof(ctx context.Context, ssi sectorbuilder.SortedPublicSectorInfo, rand []byte, ...) ([]byte, error)
- func (epp *SectorBuilderEpp) GenerateCandidates(ctx context.Context, ssi sectorbuilder.SortedPublicSectorInfo, rand []byte) ([]sectorbuilder.EPostCandidate, error)
- type SectorInfo
- type TicketFn
Constants ¶
View Source
const Inactive = 0
View Source
const NonceIncrement = math.MaxUint64
View Source
const SectorStorePrefix = "/sectors"
View Source
const StartConfidence = 4 // TODO: config
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Miner ¶
type Miner struct {
// contains filtered or unexported fields
}
func (*Miner) AllocatePiece ¶
func (*Miner) GetSectorInfo ¶
func (m *Miner) GetSectorInfo(sid uint64) (SectorInfo, error)
func (*Miner) ListSectors ¶
func (m *Miner) ListSectors() ([]SectorInfo, error)
func (*Miner) PledgeSector ¶
func (*Miner) UpdateSectorState ¶
type SealTicket ¶
func (*SealTicket) MarshalCBOR ¶
func (t *SealTicket) MarshalCBOR(w io.Writer) error
func (*SealTicket) SB ¶
func (t *SealTicket) SB() sectorbuilder.SealTicket
func (*SealTicket) UnmarshalCBOR ¶
func (t *SealTicket) UnmarshalCBOR(r io.Reader) error
type SectorBuilderEpp ¶
type SectorBuilderEpp struct {
// contains filtered or unexported fields
}
func NewElectionPoStProver ¶
func NewElectionPoStProver(sb sectorbuilder.Interface) *SectorBuilderEpp
func (*SectorBuilderEpp) ComputeProof ¶
func (*SectorBuilderEpp) GenerateCandidates ¶
func (epp *SectorBuilderEpp) GenerateCandidates(ctx context.Context, ssi sectorbuilder.SortedPublicSectorInfo, rand []byte) ([]sectorbuilder.EPostCandidate, error)
type SectorInfo ¶
type SectorInfo struct { State api.SectorState SectorID uint64 Nonce uint64 Pieces []Piece // PreCommit CommD []byte CommR []byte Proof []byte Ticket SealTicket PreCommitMessage *cid.Cid // PreCommitted Seed SealSeed // Committing CommitMessage *cid.Cid // Faults FaultReportMsg *cid.Cid // Debug LastErr string }
func (*SectorInfo) MarshalCBOR ¶
func (t *SectorInfo) MarshalCBOR(w io.Writer) error
func (*SectorInfo) UnmarshalCBOR ¶
func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error
type TicketFn ¶
type TicketFn func(context.Context) (*sectorbuilder.SealTicket, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.