miner

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0, MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractMinerPreCommitEvents added in v0.11.0

func ExtractMinerPreCommitEvents(extState extraction.State, preCommits *miner.PreCommitChanges) minermodel.MinerSectorEventList

ExtractMinerPreCommitEvents transforms the added PreCommits from `preCommits` to a MinerSectorEventList.

func ExtractMinerSectorEvents added in v0.11.0

func ExtractMinerSectorEvents(extState extraction.State, sectors *miner.SectorChanges) minermodel.MinerSectorEventList

ExtractMinerSectorEvents transforms the added, extended and snapped sectors from `sectors` to a MinerSectorEventList.

func ExtractMinerSectorStateEvents added in v0.12.0

func ExtractMinerSectorStateEvents(extState extraction.State, events *SectorStateEvents) (minermodel.MinerSectorEventList, error)

ExtractMinerSectorStateEvents transforms the removed, recovering, faulted, and recovered sectors from `events` to a MinerSectorEventList.

func ExtractSectorDealsModel added in v0.10.1

func ExtractSectorDealsModel(ctx context.Context, ec extraction.State) (minermodel.MinerSectorDealList, error)

func ExtractSectorEvents added in v0.11.0

func ExtractSectorEvents(extState extraction.State, sectorChanges *miner.SectorChanges, preCommitChanges *miner.PreCommitChanges, sectorStateChanges *SectorStateEvents) (minermodel.MinerSectorEventList, error)

ExtractSectorEvents transforms sectorChanges, preCommitChanges, and sectorStateChanges to a MinerSectorEventList.

Types

type BeneficiaryExtractor added in v0.13.0

type BeneficiaryExtractor struct{}

func (BeneficiaryExtractor) Extract added in v0.13.0

type DeadlineInfoExtractor

type DeadlineInfoExtractor struct{}

func (DeadlineInfoExtractor) Extract

type FeeDebtExtractor

type FeeDebtExtractor struct{}

func (FeeDebtExtractor) Extract

type InfoExtractor

type InfoExtractor struct{}

func (InfoExtractor) Extract

type LockedFundsExtractor

type LockedFundsExtractor struct{}

func (LockedFundsExtractor) Extract

func (LockedFundsExtractor) Transform added in v0.17.0

type MinerStateExtractionContext

type MinerStateExtractionContext struct {
	PrevState miner.State
	PrevTs    *types.TipSet

	CurrActor            *types.Actor
	CurrState            miner.State
	CurrTs               *types.TipSet
	PreviousStatePresent bool
}

func (*MinerStateExtractionContext) HasPreviousState

func (m *MinerStateExtractionContext) HasPreviousState() bool

type PoStExtractor

type PoStExtractor struct{}

func (PoStExtractor) Extract

type PreCommitInfoExtractorV8 added in v0.13.0

type PreCommitInfoExtractorV8 struct{}

PreCommitInfoExtractorV8 extracts precommit infos for all miners v8 and previous.

func (PreCommitInfoExtractorV8) Extract added in v0.13.0

func (PreCommitInfoExtractorV8) Transform added in v0.17.0

type PreCommitInfoExtractorV9 added in v0.13.0

type PreCommitInfoExtractorV9 struct{}

func (PreCommitInfoExtractorV9) Extract added in v0.13.0

func (PreCommitInfoExtractorV9) Transform added in v0.17.0

type SectorDealsExtractor

type SectorDealsExtractor struct{}

func (SectorDealsExtractor) Extract

func (SectorDealsExtractor) Transform added in v0.17.0

type SectorEventsExtractor

type SectorEventsExtractor struct{}

func (SectorEventsExtractor) Extract

func (SectorEventsExtractor) Transform added in v0.17.0

type SectorInfoExtractor

type SectorInfoExtractor struct{}

func (SectorInfoExtractor) Extract

type SectorStateEvents added in v0.12.0

type SectorStateEvents struct {
	// Removed sectors this epoch
	Removed bitfield.BitField
	// Recovering sectors this epoch
	Recovering bitfield.BitField
	// Faulted sectors this epoch
	Faulted bitfield.BitField
	// Recovered sectors this epoch
	Recovered bitfield.BitField
}

SectorStateEvents contains bitfields for sectors that were removed, recovered, faulted, and recovering.

func DiffMinerSectorStates added in v0.12.0

func DiffMinerSectorStates(ctx context.Context, extState extraction.State) (*SectorStateEvents, error)

DiffMinerSectorStates loads the SectorStates for the current and parent miner states in parallel from `extState`. Then compares current and parent SectorStates to produce a SectorStateEvents structure containing all sectors that are removed, recovering, faulted, and recovered for the state transition from parent miner state to current miner state.

type SectorStates added in v0.12.0

type SectorStates struct {
	// Active sectors are those that are neither terminated nor faulty nor unproven, i.e. actively contributing power.
	Active bitfield.BitField
	// Live sectors are those that are not terminated (but may be faulty).
	Live bitfield.BitField
	// Faulty contains a subset of sectors detected/declared faulty and not yet recovered (excl. from PoSt).
	Faulty bitfield.BitField
	// Recovering contains a subset of faulty sectors expected to recover on next PoSt.
	Recovering bitfield.BitField
}

SectorStates contains a set of bitfields for active, live, fault, and recovering sectors.

func LoadSectorState added in v0.12.0

func LoadSectorState(ctx context.Context, state miner.State) (*SectorStates, error)

LoadSectorState loads all sectors from a miners partitions and returns a SectorStates structure containing individual bitfields for all active, live, faulty and recovering sector.

type V7SectorInfoExtractor

type V7SectorInfoExtractor struct{}

func (V7SectorInfoExtractor) Extract

func (V7SectorInfoExtractor) Transform added in v0.17.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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