storage

package
v0.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2020 License: Apache-2.0, MIT Imports: 22 Imported by: 4

Documentation

Index

Constants

View Source
const Inactive = 0
View Source
const StartConfidence = 4 // TODO: config

Variables

This section is empty.

Functions

This section is empty.

Types

type FPoStScheduler added in v0.2.8

type FPoStScheduler struct {
	// contains filtered or unexported fields
}

func NewFPoStScheduler added in v0.2.8

func NewFPoStScheduler(api storageMinerApi, sb sectorbuilder.Interface, actor address.Address, worker address.Address) *FPoStScheduler

func (*FPoStScheduler) Run added in v0.2.8

func (s *FPoStScheduler) Run(ctx context.Context)

type Miner

type Miner struct {
	// contains filtered or unexported fields
}

func NewMiner

func NewMiner(api storageMinerApi, maddr, worker address.Address, h host.Host, ds datastore.Batching, sb sectorbuilder.Interface, tktFn sealing.TicketFn) (*Miner, error)

func (*Miner) AllocatePiece

func (m *Miner) AllocatePiece(size uint64) (sectorID uint64, offset uint64, err error)

func (*Miner) ForceSectorState added in v0.2.5

func (m *Miner) ForceSectorState(ctx context.Context, id uint64, state api.SectorState) error

func (*Miner) GetSectorInfo

func (m *Miner) GetSectorInfo(sid uint64) (sealing.SectorInfo, error)

func (*Miner) ListSectors

func (m *Miner) ListSectors() ([]sealing.SectorInfo, error)

func (*Miner) PledgeSector

func (m *Miner) PledgeSector() error

func (*Miner) Run

func (m *Miner) Run(ctx context.Context) error

func (*Miner) SealPiece

func (m *Miner) SealPiece(ctx context.Context, size uint64, r io.Reader, sectorID uint64, dealID uint64) error

func (*Miner) Stop

func (m *Miner) Stop(ctx context.Context) error

type SectorBuilderEpp

type SectorBuilderEpp struct {
	// contains filtered or unexported fields
}

func NewElectionPoStProver

func NewElectionPoStProver(sb sectorbuilder.Interface) *SectorBuilderEpp

func (*SectorBuilderEpp) ComputeProof

func (epp *SectorBuilderEpp) ComputeProof(ctx context.Context, ssi sectorbuilder.SortedPublicSectorInfo, rand []byte, winners []sectorbuilder.EPostCandidate) ([]byte, error)

func (*SectorBuilderEpp) GenerateCandidates

func (epp *SectorBuilderEpp) GenerateCandidates(ctx context.Context, ssi sectorbuilder.SortedPublicSectorInfo, rand []byte) ([]sectorbuilder.EPostCandidate, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL