sealing

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2020 License: Apache-2.0, MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const SectorStorePrefix = "/sectors"

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrApi added in v0.2.6

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

TODO: For now we handle this by halting state execution, when we get jsonrpc reconnecting

We should implement some wait-for-api logic

type ErrBadCommD added in v0.2.6

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

type ErrExpiredDeals added in v0.2.6

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

type ErrExpiredTicket added in v0.2.6

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

type ErrInvalidDeals added in v0.2.6

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

type Log added in v0.2.6

type Log struct {
	Timestamp uint64
	Trace     string // for errors

	Message string

	// additional data (Event info)
	Kind string
}

func (*Log) MarshalCBOR added in v0.2.6

func (t *Log) MarshalCBOR(w io.Writer) error

func (*Log) UnmarshalCBOR added in v0.2.6

func (t *Log) UnmarshalCBOR(r io.Reader) error

type Piece

type Piece struct {
	DealID uint64

	Size  uint64
	CommP []byte
}

func (*Piece) MarshalCBOR

func (t *Piece) MarshalCBOR(w io.Writer) error

func (*Piece) UnmarshalCBOR

func (t *Piece) UnmarshalCBOR(r io.Reader) error

type SealSeed

type SealSeed struct {
	BlockHeight uint64
	TicketBytes []byte
}

func (*SealSeed) Equals

func (t *SealSeed) Equals(o *SealSeed) bool

func (*SealSeed) MarshalCBOR

func (t *SealSeed) MarshalCBOR(w io.Writer) error

func (*SealSeed) SB

func (*SealSeed) UnmarshalCBOR

func (t *SealSeed) UnmarshalCBOR(r io.Reader) error

type SealTicket

type SealTicket struct {
	BlockHeight uint64
	TicketBytes []byte
}

func (*SealTicket) MarshalCBOR

func (t *SealTicket) MarshalCBOR(w io.Writer) error

func (*SealTicket) SB

func (*SealTicket) UnmarshalCBOR

func (t *SealTicket) UnmarshalCBOR(r io.Reader) error

type Sealing

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

func New

func New(api sealingApi, events *events.Events, maddr address.Address, worker address.Address, ds datastore.Batching, sb sectorbuilder.Interface, tktFn TicketFn) *Sealing

func (*Sealing) AllocatePiece

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

func (*Sealing) ForceSectorState

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

func (*Sealing) GetSectorInfo

func (m *Sealing) GetSectorInfo(sid uint64) (SectorInfo, error)

func (*Sealing) ListSectors

func (m *Sealing) ListSectors() ([]SectorInfo, error)

func (*Sealing) Plan

func (m *Sealing) Plan(events []statemachine.Event, user interface{}) (interface{}, error)

func (*Sealing) PledgeSector

func (m *Sealing) PledgeSector() error

func (*Sealing) Run

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

func (*Sealing) SealPiece

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

func (*Sealing) Stop

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

type SectorCommitFailed

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

type SectorCommitted

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

type SectorComputeProofFailed added in v0.2.6

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

type SectorFatalError

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

type SectorFaultReported

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

type SectorFaultedFinal

type SectorFaultedFinal struct{}

type SectorFaulty

type SectorFaulty struct{}

type SectorForceState

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

type SectorInfo

type SectorInfo struct {
	State    api.SectorState
	SectorID uint64
	Nonce    uint64 // TODO: remove

	Pieces []Piece

	// PreCommit
	CommD  []byte
	CommR  []byte
	Proof  []byte
	Ticket SealTicket

	PreCommitMessage *cid.Cid

	// WaitSeed
	Seed SealSeed

	// Committing
	CommitMessage *cid.Cid

	// Faults
	FaultReportMsg *cid.Cid

	// Debug
	LastErr string

	Log []Log
}

func (*SectorInfo) MarshalCBOR

func (t *SectorInfo) MarshalCBOR(w io.Writer) error

func (*SectorInfo) UnmarshalCBOR

func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error

type SectorPacked

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

type SectorPackingFailed added in v0.2.6

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

type SectorPreCommitFailed

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

type SectorPreCommitted

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

type SectorProving

type SectorProving struct{}

type SectorRestart

type SectorRestart struct{}

type SectorRetryPreCommit added in v0.2.6

type SectorRetryPreCommit struct{}

type SectorRetrySeal added in v0.2.6

type SectorRetrySeal struct{}

type SectorRetryWaitSeed added in v0.2.6

type SectorRetryWaitSeed struct{}

type SectorSealFailed

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

type SectorSealed

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

type SectorSeedReady

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

type SectorStart

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

type TicketFn

type TicketFn func(context.Context) (*sectorbuilder.SealTicket, error)

Jump to

Keyboard shortcuts

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