miner

package
v1.25.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0, MIT Imports: 52 Imported by: 90

Documentation

Index

Constants

View Source
const FaultDeclarationCutoff = minertypes.FaultDeclarationCutoff
View Source
const MinAggregatedSectors = minertypes.MinAggregatedSectors
View Source
const MinSectorExpiration = minertypes.MinSectorExpiration
View Source
const WPoStChallengeLookback = minertypes.WPoStChallengeLookback
View Source
const WPoStPeriodDeadlines = minertypes.WPoStPeriodDeadlines

Variables

View Source
var MinSyntheticPoRepVersion = network.Version21
View Source
var QAPowerMax = minertypes.QAPowerMax
View Source
var WPoStChallengeWindow = func() abi.ChainEpoch { return minertypes.WPoStChallengeWindow }
View Source
var WPoStProvingPeriod = func() abi.ChainEpoch { return minertypes.WPoStProvingPeriod }

Functions

func AllCodes added in v1.20.0

func AllCodes() []cid.Cid

func AllPartSectors

func AllPartSectors(mas State, sget func(Partition) (bitfield.BitField, error)) (bitfield.BitField, error)

func PreferredSealProofTypeFromWindowPoStType added in v1.4.2

func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof, configWantSynthetic bool) (abi.RegisteredSealProof, error)

func SealProofTypeFromSectorSize added in v1.2.0

func SealProofTypeFromSectorSize(ssize abi.SectorSize, nv network.Version, synthetic bool) (abi.RegisteredSealProof, error)

SealProofTypeFromSectorSize returns preferred seal proof type for creating new miner actors and new sectors

func WindowPoStProofTypeFromSectorSize added in v1.13.2

func WindowPoStProofTypeFromSectorSize(ssize abi.SectorSize, nv network.Version) (abi.RegisteredPoStProof, error)

WindowPoStProofTypeFromSectorSize returns preferred post proof type for creating new miner actors and new sectors

func WinningPoStProofTypeFromWindowPoStProofType added in v1.4.2

func WinningPoStProofTypeFromWindowPoStProofType(nver network.Version, proof abi.RegisteredPoStProof) (abi.RegisteredPoStProof, error)

Types

type BeneficiaryTerm added in v1.20.0

type BeneficiaryTerm = minertypes.BeneficiaryTerm

type CompactPartitionsParams added in v1.24.0

type CompactPartitionsParams = minertypes.CompactPartitionsParams

type Deadline

type Deadline interface {
	LoadPartition(idx uint64) (Partition, error)
	ForEachPartition(cb func(idx uint64, part Partition) error) error
	PartitionsPoSted() (bitfield.BitField, error)

	PartitionsChanged(Deadline) (bool, error)
	DisputableProofCount() (uint64, error)
}

type DeadlineDiff added in v0.9.0

type DeadlineDiff map[uint64]*PartitionDiff

func DiffDeadline added in v0.9.0

func DiffDeadline(pre, cur Deadline) (DeadlineDiff, error)

type DeadlinesDiff added in v0.9.0

type DeadlinesDiff map[uint64]DeadlineDiff

func DiffDeadlines added in v0.9.0

func DiffDeadlines(pre, cur State) (DeadlinesDiff, error)

type DeclareFaultsParams

type DeclareFaultsParams = minertypes.DeclareFaultsParams

type DeclareFaultsRecoveredParams

type DeclareFaultsRecoveredParams = minertypes.DeclareFaultsRecoveredParams

type ExpirationExtension2 added in v1.24.0

type ExpirationExtension2 = minertypes.ExpirationExtension2

type ExtendSectorExpiration2Params added in v1.24.0

type ExtendSectorExpiration2Params = minertypes.ExtendSectorExpiration2Params

type FaultDeclaration

type FaultDeclaration = minertypes.FaultDeclaration

type LockedFunds

type LockedFunds struct {
	VestingFunds             abi.TokenAmount
	InitialPledgeRequirement abi.TokenAmount
	PreCommitDeposits        abi.TokenAmount
}

func (LockedFunds) TotalLockedFunds added in v0.10.1

func (lf LockedFunds) TotalLockedFunds() abi.TokenAmount

type MinerInfo

type MinerInfo = minertypes.MinerInfo

type Partition

type Partition interface {
	// AllSectors returns all sector numbers in this partition, including faulty, unproven, and terminated sectors
	AllSectors() (bitfield.BitField, error)

	// Subset of sectors detected/declared faulty and not yet recovered (excl. from PoSt).
	// Faults ∩ Terminated = ∅
	FaultySectors() (bitfield.BitField, error)

	// Subset of faulty sectors expected to recover on next PoSt
	// Recoveries ∩ Terminated = ∅
	RecoveringSectors() (bitfield.BitField, error)

	// Live sectors are those that are not terminated (but may be faulty).
	LiveSectors() (bitfield.BitField, error)

	// Active sectors are those that are neither terminated nor faulty nor unproven, i.e. actively contributing power.
	ActiveSectors() (bitfield.BitField, error)

	// Unproven sectors in this partition. This bitfield will be cleared on
	// a successful window post (or at the end of the partition's next
	// deadline). At that time, any still unproven sectors will be added to
	// the faulty sector bitfield.
	UnprovenSectors() (bitfield.BitField, error)
}

type PartitionDiff added in v0.9.0

type PartitionDiff struct {
	Removed    bitfield.BitField
	Recovered  bitfield.BitField
	Faulted    bitfield.BitField
	Recovering bitfield.BitField
}

func DiffPartition added in v0.9.0

func DiffPartition(pre, cur Partition) (*PartitionDiff, error)

type PendingBeneficiaryChange added in v1.20.0

type PendingBeneficiaryChange = minertypes.PendingBeneficiaryChange

type PoStPartition

type PoStPartition = minertypes.PoStPartition

type PreCommitChanges

type PreCommitChanges struct {
	Added   []SectorPreCommitOnChainInfo
	Removed []SectorPreCommitOnChainInfo
}

func DiffPreCommits

func DiffPreCommits(pre, cur State) (*PreCommitChanges, error)

type PreCommitSectorBatchParams added in v1.24.0

type PreCommitSectorBatchParams = minertypes.PreCommitSectorBatchParams

type PreCommitSectorBatchParams2 added in v1.24.0

type PreCommitSectorBatchParams2 = minertypes.PreCommitSectorBatchParams2

type ProveCommitAggregateParams added in v1.11.0

type ProveCommitAggregateParams = minertypes.ProveCommitAggregateParams

type ProveCommitSectorParams

type ProveCommitSectorParams = minertypes.ProveCommitSectorParams

type ProveReplicaUpdatesParams added in v1.14.0

type ProveReplicaUpdatesParams = minertypes.ProveReplicaUpdatesParams

type RecoveryDeclaration

type RecoveryDeclaration = minertypes.RecoveryDeclaration

type ReplicaUpdate added in v1.14.0

type ReplicaUpdate = minertypes.ReplicaUpdate

type SectorChanges

type SectorChanges struct {
	Added    []SectorOnChainInfo
	Extended []SectorExtensions
	Removed  []SectorOnChainInfo
}

func DiffSectors

func DiffSectors(pre, cur State) (*SectorChanges, error)

type SectorClaim added in v1.24.0

type SectorClaim = minertypes.SectorClaim

type SectorExpiration

type SectorExpiration struct {
	OnTime abi.ChainEpoch

	// non-zero if sector is faulty, epoch at which it will be permanently
	// removed if it doesn't recover
	Early abi.ChainEpoch
}

type SectorExtensions

type SectorExtensions struct {
	From SectorOnChainInfo
	To   SectorOnChainInfo
}

type SectorLocation

type SectorLocation struct {
	Deadline  uint64
	Partition uint64
}

type SectorOnChainInfo

type SectorOnChainInfo = minertypes.SectorOnChainInfo

type SectorPreCommitInfo

type SectorPreCommitInfo = minertypes.SectorPreCommitInfo

type SectorPreCommitOnChainInfo

type SectorPreCommitOnChainInfo = minertypes.SectorPreCommitOnChainInfo

type State

type State interface {
	cbor.Marshaler

	Code() cid.Cid
	ActorKey() string
	ActorVersion() actorstypes.Version

	// Total available balance to spend.
	AvailableBalance(abi.TokenAmount) (abi.TokenAmount, error)
	// Funds that will vest by the given epoch.
	VestedFunds(abi.ChainEpoch) (abi.TokenAmount, error)
	// Funds locked for various reasons.
	LockedFunds() (LockedFunds, error)
	FeeDebt() (abi.TokenAmount, error)

	// Returns nil, nil if sector is not found
	GetSector(abi.SectorNumber) (*SectorOnChainInfo, error)
	FindSector(abi.SectorNumber) (*SectorLocation, error)
	GetSectorExpiration(abi.SectorNumber) (*SectorExpiration, error)
	GetPrecommittedSector(abi.SectorNumber) (*SectorPreCommitOnChainInfo, error)
	ForEachPrecommittedSector(func(SectorPreCommitOnChainInfo) error) error
	LoadSectors(sectorNos *bitfield.BitField) ([]*SectorOnChainInfo, error)
	NumLiveSectors() (uint64, error)
	IsAllocated(abi.SectorNumber) (bool, error)
	// UnallocatedSectorNumbers returns up to count unallocated sector numbers (or less than
	// count if there aren't enough).
	UnallocatedSectorNumbers(count int) ([]abi.SectorNumber, error)
	GetAllocatedSectors() (*bitfield.BitField, error)

	// Note that ProvingPeriodStart is deprecated and will be renamed / removed in a future version of actors
	GetProvingPeriodStart() (abi.ChainEpoch, error)
	// Testing only
	EraseAllUnproven() error

	LoadDeadline(idx uint64) (Deadline, error)
	ForEachDeadline(cb func(idx uint64, dl Deadline) error) error
	NumDeadlines() (uint64, error)
	DeadlinesChanged(State) (bool, error)

	Info() (MinerInfo, error)
	MinerInfoChanged(State) (bool, error)

	DeadlineInfo(epoch abi.ChainEpoch) (*dline.Info, error)
	DeadlineCronActive() (bool, error)

	GetState() interface{}
	// contains filtered or unexported methods
}

func Load

func Load(store adt.Store, act *types.Actor) (State, error)

func MakeState added in v1.11.0

func MakeState(store adt.Store, av actors.Version) (State, error)

type SubmitWindowedPoStParams

type SubmitWindowedPoStParams = minertypes.SubmitWindowedPoStParams

type WindowPostVerifyInfo added in v1.16.0

type WindowPostVerifyInfo = proof.WindowPoStVerifyInfo

type WithdrawBalanceParams added in v1.24.0

type WithdrawBalanceParams = minertypes.WithdrawBalanceParams

type WorkerKeyChange added in v1.16.0

type WorkerKeyChange = minertypes.WorkerKeyChange

Jump to

Keyboard shortcuts

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