wdpost

package
v1.20.0-hyperspace-0131 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0, MIT Imports: 36 Imported by: 6

Documentation

Index

Constants

View Source
const (
	SubmitConfidence    = 4
	ChallengeConfidence = 1
)
View Source
const (
	// SchedulerStateStarted gets recorded when a WdPoSt cycle for an
	// epoch begins.
	SchedulerStateStarted = SchedulerState("started")
	// SchedulerStateAborted gets recorded when a WdPoSt cycle for an
	// epoch is aborted, normally because of a chain reorg or advancement.
	SchedulerStateAborted = SchedulerState("aborted")
	// SchedulerStateFaulted gets recorded when a WdPoSt cycle for an
	// epoch terminates abnormally, in which case the error is also recorded.
	SchedulerStateFaulted = SchedulerState("faulted")
	// SchedulerStateSucceeded gets recorded when a WdPoSt cycle for an
	// epoch ends successfully.
	SchedulerStateSucceeded = SchedulerState("succeeded")
)

Variables

View Source
var RecoveringSectorLimit uint64 = 0

Functions

func NewDeadlineInfo

func NewDeadlineInfo(periodStart abi.ChainEpoch, deadlineIdx uint64, currEpoch abi.ChainEpoch) *dline.Info

Types

type CompleteGeneratePoSTCb

type CompleteGeneratePoSTCb func(posts []miner.SubmitWindowedPoStParams, err error)

type CompleteSubmitPoSTCb

type CompleteSubmitPoSTCb func(err error)

type NodeAPI

type NodeAPI interface {
	ChainHead(context.Context) (*types.TipSet, error)
	ChainNotify(context.Context) (<-chan []*api.HeadChange, error)

	StateMinerInfo(context.Context, address.Address, types.TipSetKey) (api.MinerInfo, error)
	StateMinerProvingDeadline(context.Context, address.Address, types.TipSetKey) (*dline.Info, error)
	StateMinerSectors(context.Context, address.Address, *bitfield.BitField, types.TipSetKey) ([]*miner.SectorOnChainInfo, error)
	StateNetworkVersion(context.Context, types.TipSetKey) (network.Version, error)
	StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error)
	StateGetRandomnessFromBeacon(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error)
	StateWaitMsg(ctx context.Context, cid cid.Cid, confidence uint64, limit abi.ChainEpoch, allowReplaced bool) (*api.MsgLookup, error)
	StateMinerPartitions(context.Context, address.Address, uint64, types.TipSetKey) ([]api.Partition, error)
	StateLookupID(context.Context, address.Address, types.TipSetKey) (address.Address, error)
	StateAccountKey(context.Context, address.Address, types.TipSetKey) (address.Address, error)
	StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok types.TipSetKey) (*lminer.SectorLocation, error)

	MpoolPushMessage(context.Context, *types.Message, *api.MessageSendSpec) (*types.SignedMessage, error)

	GasEstimateMessageGas(context.Context, *types.Message, *api.MessageSendSpec, types.TipSetKey) (*types.Message, error)
	GasEstimateFeeCap(context.Context, *types.Message, int64, types.TipSetKey) (types.BigInt, error)
	GasEstimateGasPremium(_ context.Context, nblocksincl uint64, sender address.Address, gaslimit int64, tsk types.TipSetKey) (types.BigInt, error)

	WalletBalance(context.Context, address.Address) (types.BigInt, error)
	WalletHas(context.Context, address.Address) (bool, error)
}

type SchedulerState

type SchedulerState string

SchedulerState defines the possible states in which the scheduler could be, for the purposes of journalling.

type SubmitState

type SubmitState string
const (
	SubmitStateStart      SubmitState = "SubmitStateStart"
	SubmitStateSubmitting SubmitState = "SubmitStateSubmitting"
	SubmitStateComplete   SubmitState = "SubmitStateComplete"
)

type WdPoStFaultsProcessedEvt

type WdPoStFaultsProcessedEvt struct {
	Declarations []miner.FaultDeclaration
	MessageCID   cid.Cid `json:",omitempty"`
	// contains filtered or unexported fields
}

WdPoStFaultsProcessedEvt is the journal event that gets recorded when Windowed PoSt faults have been processed.

type WdPoStProofsProcessedEvt

type WdPoStProofsProcessedEvt struct {
	Partitions []miner.PoStPartition
	MessageCID cid.Cid `json:",omitempty"`
	// contains filtered or unexported fields
}

WdPoStProofsProcessedEvt is the journal event that gets recorded when Windowed PoSt proofs have been processed.

type WdPoStRecoveriesProcessedEvt

type WdPoStRecoveriesProcessedEvt struct {
	Declarations []miner.RecoveryDeclaration
	MessageCID   cid.Cid `json:",omitempty"`
	// contains filtered or unexported fields
}

WdPoStRecoveriesProcessedEvt is the journal event that gets recorded when Windowed PoSt recoveries have been processed.

type WdPoStSchedulerEvt

type WdPoStSchedulerEvt struct {
	State SchedulerState
	// contains filtered or unexported fields
}

WdPoStSchedulerEvt is the journal event that gets recorded on scheduler actions.

type WindowPoStScheduler

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

WindowPoStScheduler is the coordinator for WindowPoSt submissions, fault declaration, and recovery declarations. It watches the chain for reverts and applies, and schedules/run those processes as partition deadlines arrive.

WindowPoStScheduler watches the chain though the changeHandler, which in turn turn calls the scheduler when the time arrives to do work.

func NewWindowedPoStScheduler

func NewWindowedPoStScheduler(api NodeAPI,
	cfg config.MinerFeeConfig,
	pcfg config.ProvingConfig,
	as *ctladdr.AddressSelector,
	sp storiface.ProverPoSt,
	verif storiface.Verifier,
	ft sealer.FaultTracker,
	j journal.Journal,
	actor address.Address) (*WindowPoStScheduler, error)

NewWindowedPoStScheduler creates a new WindowPoStScheduler scheduler.

func (*WindowPoStScheduler) BatchPartitions added in v1.18.0

func (s *WindowPoStScheduler) BatchPartitions(partitions []api.Partition, nv network.Version) ([][]api.Partition, error)

Note: Partition order within batches must match original partition order in order for code following the user code to work

func (*WindowPoStScheduler) ComputePoSt

func (*WindowPoStScheduler) ManualFaultRecovery added in v1.17.2

func (s *WindowPoStScheduler) ManualFaultRecovery(ctx context.Context, maddr address.Address, sectors []abi.SectorNumber) ([]cid.Cid, error)

func (*WindowPoStScheduler) Run

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

Jump to

Keyboard shortcuts

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