Documentation ¶
Index ¶
- Constants
- Variables
- func IsUpgradeState(st SectorState) bool
- type AddressSelector
- type AggregateInput
- type BasicPreCommitPolicy
- type Chain
- type CommitBatcher
- func (b *CommitBatcher) AddCommit(ctx context.Context, s SectorInfo, in AggregateInput) (res sealiface.CommitBatchRes, err error)
- func (b *CommitBatcher) Flush(ctx context.Context) ([]sealiface.CommitBatchRes, error)
- func (b *CommitBatcher) Pending(ctx context.Context) ([]abi.SectorID, error)
- func (b *CommitBatcher) Stop(ctx context.Context) error
- type CommitBatcherApi
- type Context
- type CurrentDealInfo
- type CurrentDealInfoAPI
- type CurrentDealInfoManager
- type ErrApi
- type ErrBadCommD
- type ErrBadPR
- type ErrBadRU
- type ErrBadSeed
- type ErrBadTicket
- type ErrCommitWaitFailed
- type ErrExpiredDeals
- type ErrExpiredTicket
- type ErrInvalidDeals
- type ErrInvalidPiece
- type ErrInvalidProof
- type ErrNoDeals
- type ErrNoPrecommit
- type ErrPrecommitOnChain
- type ErrSectorNumberAllocated
- type Events
- type Ignorable
- type Log
- type PreCommitBatcher
- func (b *PreCommitBatcher) AddPreCommit(ctx context.Context, s SectorInfo, deposit abi.TokenAmount, ...) (res sealiface.PreCommitBatchRes, err error)
- func (b *PreCommitBatcher) Flush(ctx context.Context) ([]sealiface.PreCommitBatchRes, error)
- func (b *PreCommitBatcher) Pending(ctx context.Context) ([]abi.SectorID, error)
- func (b *PreCommitBatcher) Stop(ctx context.Context) error
- type PreCommitBatcherApi
- type PreCommitPolicy
- type ReturnState
- type Sealing
- func (m *Sealing) Address() address.Address
- func (m *Sealing) CommitFlush(ctx context.Context) ([]sealiface.CommitBatchRes, error)
- func (m *Sealing) CommitPending(ctx context.Context) ([]abi.SectorID, error)
- func (m *Sealing) ForceSectorState(ctx context.Context, id abi.SectorNumber, state SectorState) error
- func (m *Sealing) GetSectorInfo(sid abi.SectorNumber) (SectorInfo, error)
- func (m *Sealing) HandleRecoverDealIDs(ctx statemachine.Context, sector SectorInfo) error
- func (m *Sealing) ListSectors() ([]SectorInfo, error)
- func (m *Sealing) MarkForUpgrade(ctx context.Context, id abi.SectorNumber) error
- func (m *Sealing) NextSectorNumber(ctx context.Context) (abi.SectorNumber, error)
- func (m *Sealing) NumAssignerMeta(ctx context.Context) (api.NumAssignerMeta, error)
- func (m *Sealing) NumFree(ctx context.Context, name string) error
- func (m *Sealing) NumReservations(ctx context.Context) (map[string]bitfield.BitField, error)
- func (m *Sealing) NumReserve(ctx context.Context, name string, reserving bitfield.BitField, force bool) error
- func (m *Sealing) NumReserveCount(ctx context.Context, name string, count uint64) (bitfield.BitField, error)
- func (m *Sealing) Plan(events []statemachine.Event, user interface{}) (interface{}, uint64, error)
- func (m *Sealing) PledgeSector(ctx context.Context) (storiface.SectorRef, error)
- func (m *Sealing) Receive(ctx context.Context, meta api.RemoteSectorMeta) error
- func (m *Sealing) RemoveSector(ctx context.Context, sid abi.SectorNumber) error
- func (m *Sealing) Run(ctx context.Context)
- func (m *Sealing) SectorAbortUpgrade(sid abi.SectorNumber) error
- func (m *Sealing) SectorAddPieceToAny(ctx context.Context, size abi.UnpaddedPieceSize, data storiface.Data, ...) (api.SectorOffset, error)
- func (m *Sealing) SectorMatchPendingPiecesToOpenSectors(ctx context.Context) error
- func (m *Sealing) SectorPreCommitFlush(ctx context.Context) ([]sealiface.PreCommitBatchRes, error)
- func (m *Sealing) SectorPreCommitPending(ctx context.Context) ([]abi.SectorID, error)
- func (m *Sealing) SectorsStatus(ctx context.Context, sid abi.SectorNumber, showOnChainInfo bool) (api.SectorInfo, error)
- func (m *Sealing) StartPackingSector(sid abi.SectorNumber) error
- func (m *Sealing) Stop(ctx context.Context) error
- func (m *Sealing) TerminateFlush(ctx context.Context) (*cid.Cid, error)
- func (m *Sealing) TerminatePending(ctx context.Context) ([]abi.SectorID, error)
- func (m *Sealing) TerminateSector(ctx context.Context, sid abi.SectorNumber) error
- type SealingAPI
- type SealingStateEvt
- type SectorAbortUpgrade
- type SectorAddPiece
- type SectorAddPieceFailed
- type SectorChainPreCommitFailed
- type SectorCommitAggregateSent
- type SectorCommitFailed
- type SectorCommitSubmitted
- type SectorCommitted
- type SectorComputeProofFailed
- type SectorDeadlineImmutable
- type SectorDeadlineMutable
- type SectorDealsExpired
- type SectorFatalError
- type SectorFaultReported
- type SectorFaultedFinal
- type SectorFaulty
- type SectorFinalizeFailed
- type SectorFinalized
- type SectorFinalizedAvailable
- type SectorForceState
- type SectorInfo
- type SectorInvalidDealIDs
- type SectorKeyReleased
- type SectorMarkForUpdate
- type SectorOldTicket
- type SectorPacked
- type SectorPieceAdded
- type SectorPreCommit1
- type SectorPreCommit2
- type SectorPreCommitBatch
- type SectorPreCommitBatchSent
- type SectorPreCommitLanded
- type SectorPreCommitted
- type SectorProofReady
- type SectorProveReplicaUpdate
- type SectorProveReplicaUpdateFailed
- type SectorProving
- type SectorReceive
- type SectorReceived
- type SectorReleaseKeyFailed
- type SectorRemoteCommit1Failed
- type SectorRemoteCommit2Failed
- type SectorRemove
- type SectorRemoveFailed
- type SectorRemoved
- type SectorReplicaUpdate
- type SectorReplicaUpdateLanded
- type SectorReplicaUpdateSubmitted
- type SectorRestart
- type SectorRetryCommitWait
- type SectorRetryComputeProof
- type SectorRetryFinalize
- type SectorRetryInvalidProof
- type SectorRetryPreCommit
- type SectorRetryPreCommitWait
- type SectorRetryProveReplicaUpdate
- type SectorRetryReplicaUpdate
- type SectorRetrySealPreCommit1
- type SectorRetrySealPreCommit2
- type SectorRetrySubmitCommit
- type SectorRetrySubmitReplicaUpdate
- type SectorRetrySubmitReplicaUpdateWait
- type SectorRetryWaitDeals
- type SectorRetryWaitSeed
- type SectorRevertUpgradeToProving
- type SectorSealPreCommit1Failed
- type SectorSealPreCommit2Failed
- type SectorSeedReady
- type SectorStart
- type SectorStartCC
- type SectorStartCCUpdate
- type SectorStartPacking
- type SectorState
- type SectorStateNotifee
- type SectorStats
- type SectorSubmitCommitAggregate
- type SectorSubmitReplicaUpdateFailed
- type SectorTerminate
- type SectorTerminateFailed
- type SectorTerminated
- type SectorTerminating
- type SectorTicket
- type SectorTicketExpired
- type SectorUpdateActive
- type SectorUpdateDealIDs
- type SectorUpdateReplicaFailed
- type TerminateBatcher
- func (b *TerminateBatcher) AddTermination(ctx context.Context, s abi.SectorID) (mcid cid.Cid, terminated bool, err error)
- func (b *TerminateBatcher) Flush(ctx context.Context) (*cid.Cid, error)
- func (b *TerminateBatcher) Pending(ctx context.Context) ([]abi.SectorID, error)
- func (b *TerminateBatcher) Stop(ctx context.Context) error
- type TerminateBatcherApi
Constants ¶
const ( RetPreCommit1 = ReturnState(PreCommit1) RetPreCommitting = ReturnState(PreCommitting) RetPreCommitFailed = ReturnState(PreCommitFailed) RetCommitFailed = ReturnState(CommitFailed) )
const InteractivePoRepConfidence = 6
Epochs
const SectorStorePrefix = "/sectors"
Variables ¶
var DealSectorPriority = 1024
var ErrTooManySectorsSealing = xerrors.New("too many sectors sealing")
var ExistSectorStateList = map[SectorState]struct{}{
Empty: {},
WaitDeals: {},
Packing: {},
AddPiece: {},
AddPieceFailed: {},
GetTicket: {},
PreCommit1: {},
PreCommit2: {},
PreCommitting: {},
PreCommitWait: {},
SubmitPreCommitBatch: {},
PreCommitBatchWait: {},
WaitSeed: {},
Committing: {},
CommitFinalize: {},
CommitFinalizeFailed: {},
SubmitCommit: {},
CommitWait: {},
SubmitCommitAggregate: {},
CommitAggregateWait: {},
FinalizeSector: {},
Proving: {},
Available: {},
FailedUnrecoverable: {},
SealPreCommit1Failed: {},
SealPreCommit2Failed: {},
PreCommitFailed: {},
ComputeProofFailed: {},
RemoteCommitFailed: {},
CommitFailed: {},
PackingFailed: {},
FinalizeFailed: {},
DealsExpired: {},
RecoverDealIDs: {},
Faulty: {},
FaultReported: {},
FaultedFinal: {},
Terminating: {},
TerminateWait: {},
TerminateFinality: {},
TerminateFailed: {},
Removing: {},
RemoveFailed: {},
Removed: {},
SnapDealsWaitDeals: {},
SnapDealsAddPiece: {},
SnapDealsPacking: {},
UpdateReplica: {},
ProveReplicaUpdate: {},
SubmitReplicaUpdate: {},
WaitMutable: {},
ReplicaUpdateWait: {},
UpdateActivating: {},
ReleaseSectorKey: {},
FinalizeReplicaUpdate: {},
SnapDealsAddPieceFailed: {},
SnapDealsDealsExpired: {},
SnapDealsRecoverDealIDs: {},
ReplicaUpdateFailed: {},
ReleaseSectorKeyFailed: {},
FinalizeReplicaUpdateFailed: {},
AbortUpgrade: {},
ReceiveSector: {},
}
var MaxTicketAge = policy.MaxPreCommitRandomnessLookback
var MinRetryTime = 1 * time.Minute
var SectorBitfieldsDSPrefix = "/storage/sectorsids/"
var SectorReservationsDSPrefix = "/storage/sectorsids/reserved/"
var StorageCounterDSPrefix = "/storage/nextid"
Functions ¶
func IsUpgradeState ¶
func IsUpgradeState(st SectorState) bool
Types ¶
type AddressSelector ¶ added in v1.17.2
type AggregateInput ¶
type AggregateInput struct { Spt abi.RegisteredSealProof Info proof.AggregateSealVerifyInfo Proof []byte }
type BasicPreCommitPolicy ¶
type BasicPreCommitPolicy struct {
// contains filtered or unexported fields
}
BasicPreCommitPolicy satisfies PreCommitPolicy. It has two modes:
Mode 1: The sector contains a non-zero quantity of pieces with deal info Mode 2: The sector contains no pieces with deal info
The BasicPreCommitPolicy#Expiration method is given a slice of the pieces which the miner has encoded into the sector, and from that slice picks either the first or second mode.
If we're in Mode 1: The pre-commit expiration epoch will be the maximum deal end epoch of a piece in the sector.
If we're in Mode 2: The pre-commit expiration epoch will be set to the current epoch + the provided default duration.
func NewBasicPreCommitPolicy ¶
func NewBasicPreCommitPolicy(api Chain, cfgGetter dtypes.GetSealingConfigFunc, provingBuffer abi.ChainEpoch) BasicPreCommitPolicy
NewBasicPreCommitPolicy produces a BasicPreCommitPolicy.
The provided duration is used as the default sector expiry when the sector contains no deals. The proving boundary is used to adjust/align the sector's expiration.
func (*BasicPreCommitPolicy) Expiration ¶
func (p *BasicPreCommitPolicy) Expiration(ctx context.Context, ps ...api.SectorPiece) (abi.ChainEpoch, error)
Expiration produces the pre-commit sector expiration epoch for an encoded replica containing the provided enumeration of pieces and deals.
type CommitBatcher ¶
type CommitBatcher struct {
// contains filtered or unexported fields
}
func NewCommitBatcher ¶
func NewCommitBatcher(mctx context.Context, maddr address.Address, api CommitBatcherApi, addrSel AddressSelector, feeCfg config.MinerFeeConfig, getConfig dtypes.GetSealingConfigFunc, prov storiface.Prover) *CommitBatcher
func (*CommitBatcher) AddCommit ¶
func (b *CommitBatcher) AddCommit(ctx context.Context, s SectorInfo, in AggregateInput) (res sealiface.CommitBatchRes, err error)
register commit, wait for batch message, return message CID
func (*CommitBatcher) Flush ¶
func (b *CommitBatcher) Flush(ctx context.Context) ([]sealiface.CommitBatchRes, error)
type CommitBatcherApi ¶
type CommitBatcherApi interface { MpoolPushMessage(context.Context, *types.Message, *api.MessageSendSpec) (*types.SignedMessage, error) StateMinerInfo(context.Context, address.Address, types.TipSetKey) (api.MinerInfo, error) ChainHead(ctx context.Context) (*types.TipSet, error) StateSectorPreCommitInfo(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorPreCommitOnChainInfo, error) StateMinerInitialPledgeCollateral(context.Context, address.Address, miner.SectorPreCommitInfo, types.TipSetKey) (big.Int, error) StateNetworkVersion(ctx context.Context, tsk types.TipSetKey) (network.Version, error) StateMinerAvailableBalance(context.Context, address.Address, types.TipSetKey) (big.Int, error) // Address selector WalletBalance(context.Context, address.Address) (types.BigInt, error) WalletHas(context.Context, address.Address) (bool, error) StateAccountKey(context.Context, address.Address, types.TipSetKey) (address.Address, error) StateLookupID(context.Context, address.Address, types.TipSetKey) (address.Address, error) }
type CurrentDealInfo ¶
type CurrentDealInfoAPI ¶
type CurrentDealInfoAPI interface { ChainGetMessage(context.Context, cid.Cid) (*types.Message, error) StateLookupID(context.Context, address.Address, types.TipSetKey) (address.Address, error) StateMarketStorageDeal(context.Context, abi.DealID, types.TipSetKey) (*api.MarketDeal, error) StateSearchMsg(ctx context.Context, from types.TipSetKey, msg cid.Cid, limit abi.ChainEpoch, allowReplaced bool) (*api.MsgLookup, error) StateNetworkVersion(ctx context.Context, tsk types.TipSetKey) (network.Version, error) }
type CurrentDealInfoManager ¶
type CurrentDealInfoManager struct {
CDAPI CurrentDealInfoAPI
}
func (*CurrentDealInfoManager) CheckDealEquality ¶
func (mgr *CurrentDealInfoManager) CheckDealEquality(ctx context.Context, tsk types.TipSetKey, p1, p2 market.DealProposal) (bool, error)
func (*CurrentDealInfoManager) GetCurrentDealInfo ¶
func (mgr *CurrentDealInfoManager) GetCurrentDealInfo(ctx context.Context, tsk types.TipSetKey, proposal *market.DealProposal, publishCid cid.Cid) (CurrentDealInfo, error)
GetCurrentDealInfo gets the current deal state and deal ID. Note that the deal ID is assigned when the deal is published, so it may have changed if there was a reorg after the deal was published.
type ErrApi ¶
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 ¶
type ErrBadCommD struct {
// contains filtered or unexported fields
}
type ErrBadSeed ¶
type ErrBadSeed struct {
// contains filtered or unexported fields
}
type ErrBadTicket ¶
type ErrBadTicket struct {
// contains filtered or unexported fields
}
type ErrCommitWaitFailed ¶
type ErrCommitWaitFailed struct {
// contains filtered or unexported fields
}
type ErrExpiredDeals ¶
type ErrExpiredDeals struct {
// contains filtered or unexported fields
}
type ErrExpiredTicket ¶
type ErrExpiredTicket struct {
// contains filtered or unexported fields
}
type ErrInvalidDeals ¶
type ErrInvalidDeals struct {
// contains filtered or unexported fields
}
type ErrInvalidPiece ¶
type ErrInvalidPiece struct {
// contains filtered or unexported fields
}
type ErrInvalidProof ¶
type ErrInvalidProof struct {
// contains filtered or unexported fields
}
type ErrNoDeals ¶
type ErrNoDeals struct {
// contains filtered or unexported fields
}
type ErrNoPrecommit ¶
type ErrNoPrecommit struct {
// contains filtered or unexported fields
}
type ErrPrecommitOnChain ¶
type ErrPrecommitOnChain struct {
// contains filtered or unexported fields
}
type ErrSectorNumberAllocated ¶
type ErrSectorNumberAllocated struct {
// contains filtered or unexported fields
}
type Events ¶
type Events interface {
ChainAt(ctx context.Context, hnd events.HeightHandler, rev events.RevertHandler, confidence int, h abi.ChainEpoch) error
}
type Log ¶
type PreCommitBatcher ¶
type PreCommitBatcher struct {
// contains filtered or unexported fields
}
func NewPreCommitBatcher ¶
func NewPreCommitBatcher(mctx context.Context, maddr address.Address, api PreCommitBatcherApi, addrSel AddressSelector, feeCfg config.MinerFeeConfig, getConfig dtypes.GetSealingConfigFunc) *PreCommitBatcher
func (*PreCommitBatcher) AddPreCommit ¶
func (b *PreCommitBatcher) AddPreCommit(ctx context.Context, s SectorInfo, deposit abi.TokenAmount, in *miner.SectorPreCommitInfo) (res sealiface.PreCommitBatchRes, err error)
register PreCommit, wait for batch message, return message CID
func (*PreCommitBatcher) Flush ¶
func (b *PreCommitBatcher) Flush(ctx context.Context) ([]sealiface.PreCommitBatchRes, error)
type PreCommitBatcherApi ¶
type PreCommitBatcherApi interface { MpoolPushMessage(context.Context, *types.Message, *api.MessageSendSpec) (*types.SignedMessage, error) StateMinerInfo(context.Context, address.Address, types.TipSetKey) (api.MinerInfo, error) StateMinerAvailableBalance(context.Context, address.Address, types.TipSetKey) (big.Int, error) ChainHead(ctx context.Context) (*types.TipSet, error) StateNetworkVersion(ctx context.Context, tsk types.TipSetKey) (network.Version, error) // Address selector WalletBalance(context.Context, address.Address) (types.BigInt, error) WalletHas(context.Context, address.Address) (bool, error) StateAccountKey(context.Context, address.Address, types.TipSetKey) (address.Address, error) StateLookupID(context.Context, address.Address, types.TipSetKey) (address.Address, error) }
type PreCommitPolicy ¶
type PreCommitPolicy interface {
Expiration(ctx context.Context, ps ...api.SectorPiece) (abi.ChainEpoch, error)
}
type ReturnState ¶
type ReturnState string
type Sealing ¶
type Sealing struct { Api SealingAPI DealInfo *CurrentDealInfoManager // contains filtered or unexported fields }
func New ¶
func New(mctx context.Context, api SealingAPI, fc config.MinerFeeConfig, events Events, maddr address.Address, ds datastore.Batching, sealer sealer.SectorManager, verif storiface.Verifier, prov storiface.Prover, pcp PreCommitPolicy, gc dtypes.GetSealingConfigFunc, journal journal.Journal, addrSel AddressSelector) *Sealing
func (*Sealing) CommitFlush ¶
func (*Sealing) CommitPending ¶
func (*Sealing) ForceSectorState ¶
func (m *Sealing) ForceSectorState(ctx context.Context, id abi.SectorNumber, state SectorState) error
func (*Sealing) GetSectorInfo ¶
func (m *Sealing) GetSectorInfo(sid abi.SectorNumber) (SectorInfo, error)
func (*Sealing) HandleRecoverDealIDs ¶
func (m *Sealing) HandleRecoverDealIDs(ctx statemachine.Context, sector SectorInfo) error
func (*Sealing) ListSectors ¶
func (m *Sealing) ListSectors() ([]SectorInfo, error)
func (*Sealing) MarkForUpgrade ¶ added in v1.17.2
func (*Sealing) NextSectorNumber ¶ added in v1.17.2
func (*Sealing) NumAssignerMeta ¶ added in v1.17.2
func (*Sealing) NumReservations ¶ added in v1.17.2
NumReservations returns a list of named sector reservations
func (*Sealing) NumReserve ¶ added in v1.17.2
func (m *Sealing) NumReserve(ctx context.Context, name string, reserving bitfield.BitField, force bool) error
NumReserve creates a new sector reservation
func (*Sealing) NumReserveCount ¶ added in v1.17.2
func (*Sealing) PledgeSector ¶
func (*Sealing) RemoveSector ¶ added in v1.17.2
func (*Sealing) SectorAbortUpgrade ¶ added in v1.17.2
func (m *Sealing) SectorAbortUpgrade(sid abi.SectorNumber) error
func (*Sealing) SectorAddPieceToAny ¶
func (m *Sealing) SectorAddPieceToAny(ctx context.Context, size abi.UnpaddedPieceSize, data storiface.Data, deal api.PieceDealInfo) (api.SectorOffset, error)
func (*Sealing) SectorMatchPendingPiecesToOpenSectors ¶ added in v1.17.2
func (*Sealing) SectorPreCommitFlush ¶
func (*Sealing) SectorPreCommitPending ¶
func (*Sealing) SectorsStatus ¶ added in v1.17.2
func (m *Sealing) SectorsStatus(ctx context.Context, sid abi.SectorNumber, showOnChainInfo bool) (api.SectorInfo, error)
func (*Sealing) StartPackingSector ¶ added in v1.17.2
func (m *Sealing) StartPackingSector(sid abi.SectorNumber) error
func (*Sealing) TerminateFlush ¶
func (*Sealing) TerminatePending ¶
func (*Sealing) TerminateSector ¶ added in v1.17.2
type SealingAPI ¶
type SealingAPI interface { StateWaitMsg(ctx context.Context, cid cid.Cid, confidence uint64, limit abi.ChainEpoch, allowReplaced bool) (*api.MsgLookup, error) StateSearchMsg(ctx context.Context, from types.TipSetKey, msg cid.Cid, limit abi.ChainEpoch, allowReplaced bool) (*api.MsgLookup, error) StateSectorPreCommitInfo(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorPreCommitOnChainInfo, error) StateComputeDataCID(ctx context.Context, maddr address.Address, sectorType abi.RegisteredSealProof, deals []abi.DealID, tsk types.TipSetKey) (cid.Cid, error) StateSectorGetInfo(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorOnChainInfo, error) StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tsk types.TipSetKey) (*lminer.SectorLocation, error) StateLookupID(context.Context, address.Address, types.TipSetKey) (address.Address, error) StateMinerPreCommitDepositForPower(context.Context, address.Address, miner.SectorPreCommitInfo, types.TipSetKey) (big.Int, error) StateMinerInitialPledgeCollateral(context.Context, address.Address, miner.SectorPreCommitInfo, types.TipSetKey) (big.Int, error) StateMinerInfo(context.Context, address.Address, types.TipSetKey) (api.MinerInfo, error) StateMinerAvailableBalance(context.Context, address.Address, types.TipSetKey) (big.Int, error) StateMinerSectorAllocated(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (bool, error) StateMarketStorageDeal(context.Context, abi.DealID, types.TipSetKey) (*api.MarketDeal, error) StateNetworkVersion(ctx context.Context, tsk types.TipSetKey) (network.Version, error) StateMinerProvingDeadline(context.Context, address.Address, types.TipSetKey) (*dline.Info, error) StateMinerDeadlines(context.Context, address.Address, types.TipSetKey) ([]api.Deadline, error) StateMinerPartitions(ctx context.Context, m address.Address, dlIdx uint64, tsk types.TipSetKey) ([]api.Partition, error) MpoolPushMessage(context.Context, *types.Message, *api.MessageSendSpec) (*types.SignedMessage, error) ChainHead(ctx context.Context) (*types.TipSet, error) ChainGetMessage(ctx context.Context, mc cid.Cid) (*types.Message, error) StateGetRandomnessFromBeacon(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) ChainReadObj(context.Context, cid.Cid) ([]byte, error) StateMinerAllocated(context.Context, address.Address, types.TipSetKey) (*bitfield.BitField, error) StateGetAllocationForPendingDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*verifregtypes.Allocation, error) // Address selector WalletBalance(context.Context, address.Address) (types.BigInt, error) WalletHas(context.Context, address.Address) (bool, error) StateAccountKey(context.Context, address.Address, types.TipSetKey) (address.Address, error) }
type SealingStateEvt ¶ added in v1.17.2
type SealingStateEvt struct { SectorNumber abi.SectorNumber SectorType abi.RegisteredSealProof From SectorState After SectorState Error string }
SealingStateEvt is a journal event that records a sector state transition.
type SectorAbortUpgrade ¶
type SectorAbortUpgrade struct {
// contains filtered or unexported fields
}
func (SectorAbortUpgrade) FormatError ¶
func (evt SectorAbortUpgrade) FormatError(xerrors.Printer) (next error)
type SectorAddPiece ¶
type SectorAddPiece struct{}
type SectorAddPieceFailed ¶
type SectorAddPieceFailed struct {
// contains filtered or unexported fields
}
func (SectorAddPieceFailed) FormatError ¶
func (evt SectorAddPieceFailed) FormatError(xerrors.Printer) (next error)
type SectorChainPreCommitFailed ¶
type SectorChainPreCommitFailed struct {
// contains filtered or unexported fields
}
func (SectorChainPreCommitFailed) FormatError ¶
func (evt SectorChainPreCommitFailed) FormatError(xerrors.Printer) (next error)
type SectorCommitAggregateSent ¶
type SectorCommitAggregateSent struct {
Message cid.Cid
}
type SectorCommitFailed ¶
type SectorCommitFailed struct {
// contains filtered or unexported fields
}
func (SectorCommitFailed) FormatError ¶
func (evt SectorCommitFailed) FormatError(xerrors.Printer) (next error)
type SectorCommitSubmitted ¶
type SectorCommitSubmitted struct {
Message cid.Cid
}
type SectorCommitted ¶
type SectorCommitted struct {
Proof []byte
}
type SectorComputeProofFailed ¶
type SectorComputeProofFailed struct {
// contains filtered or unexported fields
}
func (SectorComputeProofFailed) FormatError ¶
func (evt SectorComputeProofFailed) FormatError(xerrors.Printer) (next error)
type SectorDeadlineImmutable ¶ added in v1.19.0
type SectorDeadlineImmutable struct{}
type SectorDeadlineMutable ¶ added in v1.19.0
type SectorDeadlineMutable struct{}
type SectorDealsExpired ¶
type SectorDealsExpired struct {
// contains filtered or unexported fields
}
func (SectorDealsExpired) FormatError ¶
func (evt SectorDealsExpired) FormatError(xerrors.Printer) (next error)
type SectorFatalError ¶
type SectorFatalError struct {
// contains filtered or unexported fields
}
func (SectorFatalError) FormatError ¶
func (evt SectorFatalError) FormatError(xerrors.Printer) (next error)
type SectorFaultReported ¶
type SectorFaultReported struct {
// contains filtered or unexported fields
}
type SectorFaultedFinal ¶
type SectorFaultedFinal struct{}
type SectorFaulty ¶
type SectorFaulty struct{}
type SectorFinalizeFailed ¶
type SectorFinalizeFailed struct {
// contains filtered or unexported fields
}
func (SectorFinalizeFailed) FormatError ¶
func (evt SectorFinalizeFailed) FormatError(xerrors.Printer) (next error)
type SectorFinalized ¶
type SectorFinalized struct{}
type SectorFinalizedAvailable ¶
type SectorFinalizedAvailable struct{}
type SectorForceState ¶
type SectorForceState struct {
State SectorState
}
type SectorInfo ¶
type SectorInfo struct { State SectorState SectorNumber abi.SectorNumber SectorType abi.RegisteredSealProof // Packing CreationTime int64 // unix seconds Pieces []api.SectorPiece // PreCommit1 TicketValue abi.SealRandomness TicketEpoch abi.ChainEpoch PreCommit1Out storiface.PreCommit1Out // PreCommit2 CommD *cid.Cid CommR *cid.Cid // SectorKey Proof []byte PreCommitDeposit big.Int PreCommitMessage *cid.Cid PreCommitTipSet types.TipSetKey PreCommit2Fails uint64 // WaitSeed SeedValue abi.InteractiveSealRandomness SeedEpoch abi.ChainEpoch // Committing CommitMessage *cid.Cid InvalidProofs uint64 // failed proof computations (doesn't validate with proof inputs; can't compute) // CCUpdate CCUpdate bool CCPieces []api.SectorPiece UpdateSealed *cid.Cid UpdateUnsealed *cid.Cid ReplicaUpdateProof storiface.ReplicaUpdateProof ReplicaUpdateMessage *cid.Cid // Faults FaultReportMsg *cid.Cid // Recovery / Import Return ReturnState // Termination TerminateMessage *cid.Cid TerminatedAt abi.ChainEpoch // Remote import RemoteDataUnsealed *storiface.SectorLocation RemoteDataSealed *storiface.SectorLocation RemoteDataCache *storiface.SectorLocation RemoteCommit1Endpoint string RemoteCommit2Endpoint string RemoteSealingDoneEndpoint string RemoteDataFinalized bool // 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) (err error)
type SectorInvalidDealIDs ¶
type SectorInvalidDealIDs struct {
Return ReturnState
}
type SectorKeyReleased ¶
type SectorKeyReleased struct{}
type SectorMarkForUpdate ¶
type SectorMarkForUpdate struct{}
type SectorOldTicket ¶
type SectorOldTicket struct{}
type SectorPacked ¶
type SectorPieceAdded ¶
type SectorPieceAdded struct {
NewPieces []api.SectorPiece
}
type SectorPreCommit1 ¶
type SectorPreCommit1 struct {
PreCommit1Out storiface.PreCommit1Out
}
type SectorPreCommit2 ¶
type SectorPreCommit2 struct { Sealed cid.Cid Unsealed cid.Cid }
type SectorPreCommitBatch ¶
type SectorPreCommitBatch struct{}
type SectorPreCommitBatchSent ¶
type SectorPreCommitBatchSent struct {
Message cid.Cid
}
type SectorPreCommitLanded ¶
type SectorPreCommitted ¶
type SectorPreCommitted struct { Message cid.Cid PreCommitDeposit big.Int PreCommitInfo miner.SectorPreCommitInfo }
type SectorProofReady ¶
type SectorProofReady struct {
Proof []byte
}
like SectorCommitted, but finalizes before sending the proof to the chain
type SectorProveReplicaUpdate ¶
type SectorProveReplicaUpdate struct {
Proof storiface.ReplicaUpdateProof
}
type SectorProveReplicaUpdateFailed ¶
type SectorProveReplicaUpdateFailed struct {
// contains filtered or unexported fields
}
func (SectorProveReplicaUpdateFailed) FormatError ¶
func (evt SectorProveReplicaUpdateFailed) FormatError(xerrors.Printer) (next error)
type SectorProving ¶
type SectorProving struct{}
type SectorReceive ¶ added in v1.17.2
type SectorReceive struct {
State SectorInfo
}
type SectorReceived ¶ added in v1.17.2
type SectorReceived struct{}
type SectorReleaseKeyFailed ¶
type SectorReleaseKeyFailed struct {
// contains filtered or unexported fields
}
func (SectorReleaseKeyFailed) FormatError ¶
func (evt SectorReleaseKeyFailed) FormatError(xerrors.Printer) (next error)
type SectorRemoteCommit1Failed ¶ added in v1.17.2
type SectorRemoteCommit1Failed struct {
// contains filtered or unexported fields
}
func (SectorRemoteCommit1Failed) FormatError ¶ added in v1.17.2
func (evt SectorRemoteCommit1Failed) FormatError(xerrors.Printer) (next error)
type SectorRemoteCommit2Failed ¶ added in v1.17.2
type SectorRemoteCommit2Failed struct {
// contains filtered or unexported fields
}
func (SectorRemoteCommit2Failed) FormatError ¶ added in v1.17.2
func (evt SectorRemoteCommit2Failed) FormatError(xerrors.Printer) (next error)
type SectorRemove ¶
type SectorRemove struct{}
type SectorRemoveFailed ¶
type SectorRemoveFailed struct {
// contains filtered or unexported fields
}
func (SectorRemoveFailed) FormatError ¶
func (evt SectorRemoveFailed) FormatError(xerrors.Printer) (next error)
type SectorRemoved ¶
type SectorRemoved struct{}
type SectorReplicaUpdate ¶
type SectorReplicaUpdate struct {
Out storiface.ReplicaUpdateOut
}
type SectorReplicaUpdateLanded ¶
type SectorReplicaUpdateLanded struct{}
type SectorReplicaUpdateSubmitted ¶
type SectorReplicaUpdateSubmitted struct {
Message cid.Cid
}
type SectorRestart ¶
type SectorRestart struct{}
type SectorRetryCommitWait ¶
type SectorRetryCommitWait struct{}
type SectorRetryComputeProof ¶
type SectorRetryComputeProof struct{}
type SectorRetryFinalize ¶
type SectorRetryFinalize struct{}
type SectorRetryInvalidProof ¶
type SectorRetryInvalidProof struct{}
type SectorRetryPreCommit ¶
type SectorRetryPreCommit struct{}
type SectorRetryPreCommitWait ¶
type SectorRetryPreCommitWait struct{}
type SectorRetryProveReplicaUpdate ¶
type SectorRetryProveReplicaUpdate struct{}
type SectorRetryReplicaUpdate ¶
type SectorRetryReplicaUpdate struct{}
type SectorRetrySealPreCommit1 ¶
type SectorRetrySealPreCommit1 struct{}
type SectorRetrySealPreCommit2 ¶
type SectorRetrySealPreCommit2 struct{}
type SectorRetrySubmitCommit ¶
type SectorRetrySubmitCommit struct{}
type SectorRetrySubmitReplicaUpdate ¶
type SectorRetrySubmitReplicaUpdate struct{}
type SectorRetrySubmitReplicaUpdateWait ¶
type SectorRetrySubmitReplicaUpdateWait struct{}
type SectorRetryWaitDeals ¶
type SectorRetryWaitDeals struct{}
type SectorRetryWaitSeed ¶
type SectorRetryWaitSeed struct{}
type SectorRevertUpgradeToProving ¶
type SectorRevertUpgradeToProving struct{}
type SectorSealPreCommit1Failed ¶
type SectorSealPreCommit1Failed struct {
// contains filtered or unexported fields
}
func (SectorSealPreCommit1Failed) FormatError ¶
func (evt SectorSealPreCommit1Failed) FormatError(xerrors.Printer) (next error)
type SectorSealPreCommit2Failed ¶
type SectorSealPreCommit2Failed struct {
// contains filtered or unexported fields
}
func (SectorSealPreCommit2Failed) FormatError ¶
func (evt SectorSealPreCommit2Failed) FormatError(xerrors.Printer) (next error)
type SectorSeedReady ¶
type SectorSeedReady struct { SeedValue abi.InteractiveSealRandomness SeedEpoch abi.ChainEpoch }
type SectorStart ¶
type SectorStart struct { ID abi.SectorNumber SectorType abi.RegisteredSealProof }
type SectorStartCC ¶
type SectorStartCC struct { ID abi.SectorNumber SectorType abi.RegisteredSealProof }
type SectorStartCCUpdate ¶
type SectorStartCCUpdate struct{}
type SectorStartPacking ¶
type SectorStartPacking struct{}
func (SectorStartPacking) Ignore ¶
func (evt SectorStartPacking) Ignore()
type SectorState ¶
type SectorState string
const ( UndefinedSectorState SectorState = "" // happy path Empty SectorState = "Empty" // deprecated WaitDeals SectorState = "WaitDeals" // waiting for more pieces (deals) to be added to the sector AddPiece SectorState = "AddPiece" // put deal data (and padding if required) into the sector Packing SectorState = "Packing" // sector not in sealStore, and not on chain GetTicket SectorState = "GetTicket" // generate ticket PreCommit1 SectorState = "PreCommit1" // do PreCommit1 PreCommit2 SectorState = "PreCommit2" // do PreCommit2 PreCommitting SectorState = "PreCommitting" // on chain pre-commit PreCommitWait SectorState = "PreCommitWait" // waiting for precommit to land on chain SubmitPreCommitBatch SectorState = "SubmitPreCommitBatch" PreCommitBatchWait SectorState = "PreCommitBatchWait" WaitSeed SectorState = "WaitSeed" // waiting for seed Committing SectorState = "Committing" // compute PoRep CommitFinalize SectorState = "CommitFinalize" // cleanup sector metadata before submitting the proof (early finalize) CommitFinalizeFailed SectorState = "CommitFinalizeFailed" // single commit SubmitCommit SectorState = "SubmitCommit" // send commit message to the chain CommitWait SectorState = "CommitWait" // wait for the commit message to land on chain SubmitCommitAggregate SectorState = "SubmitCommitAggregate" CommitAggregateWait SectorState = "CommitAggregateWait" FinalizeSector SectorState = "FinalizeSector" Proving SectorState = "Proving" Available SectorState = "Available" // proving CC available for SnapDeals // snap deals / cc update SnapDealsWaitDeals SectorState = "SnapDealsWaitDeals" SnapDealsAddPiece SectorState = "SnapDealsAddPiece" SnapDealsPacking SectorState = "SnapDealsPacking" UpdateReplica SectorState = "UpdateReplica" ProveReplicaUpdate SectorState = "ProveReplicaUpdate" SubmitReplicaUpdate SectorState = "SubmitReplicaUpdate" WaitMutable SectorState = "WaitMutable" ReplicaUpdateWait SectorState = "ReplicaUpdateWait" FinalizeReplicaUpdate SectorState = "FinalizeReplicaUpdate" UpdateActivating SectorState = "UpdateActivating" ReleaseSectorKey SectorState = "ReleaseSectorKey" // external import ReceiveSector SectorState = "ReceiveSector" // error modes FailedUnrecoverable SectorState = "FailedUnrecoverable" AddPieceFailed SectorState = "AddPieceFailed" SealPreCommit1Failed SectorState = "SealPreCommit1Failed" SealPreCommit2Failed SectorState = "SealPreCommit2Failed" PreCommitFailed SectorState = "PreCommitFailed" ComputeProofFailed SectorState = "ComputeProofFailed" RemoteCommitFailed SectorState = "RemoteCommitFailed" CommitFailed SectorState = "CommitFailed" PackingFailed SectorState = "PackingFailed" // TODO: deprecated, remove FinalizeFailed SectorState = "FinalizeFailed" DealsExpired SectorState = "DealsExpired" RecoverDealIDs SectorState = "RecoverDealIDs" // snap deals error modes SnapDealsAddPieceFailed SectorState = "SnapDealsAddPieceFailed" SnapDealsDealsExpired SectorState = "SnapDealsDealsExpired" SnapDealsRecoverDealIDs SectorState = "SnapDealsRecoverDealIDs" AbortUpgrade SectorState = "AbortUpgrade" ReplicaUpdateFailed SectorState = "ReplicaUpdateFailed" ReleaseSectorKeyFailed SectorState = "ReleaseSectorKeyFailed" FinalizeReplicaUpdateFailed SectorState = "FinalizeReplicaUpdateFailed" Faulty SectorState = "Faulty" // sector is corrupted or gone for some reason FaultReported SectorState = "FaultReported" // sector has been declared as a fault on chain FaultedFinal SectorState = "FaultedFinal" // fault declared on chain Terminating SectorState = "Terminating" TerminateWait SectorState = "TerminateWait" TerminateFinality SectorState = "TerminateFinality" TerminateFailed SectorState = "TerminateFailed" Removing SectorState = "Removing" RemoveFailed SectorState = "RemoveFailed" Removed SectorState = "Removed" )
cmd/lotus-miner/info.go defines CLI colors corresponding to these states update files there when adding new states
type SectorStateNotifee ¶
type SectorStateNotifee func(before, after SectorInfo)
type SectorStats ¶
type SectorStats struct {
// contains filtered or unexported fields
}
type SectorSubmitCommitAggregate ¶
type SectorSubmitCommitAggregate struct{}
type SectorSubmitReplicaUpdateFailed ¶
type SectorSubmitReplicaUpdateFailed struct{}
type SectorTerminate ¶
type SectorTerminate struct{}
type SectorTerminateFailed ¶
type SectorTerminateFailed struct {
// contains filtered or unexported fields
}
func (SectorTerminateFailed) FormatError ¶
func (evt SectorTerminateFailed) FormatError(xerrors.Printer) (next error)
type SectorTerminated ¶
type SectorTerminated struct{ TerminatedAt abi.ChainEpoch }
type SectorTerminating ¶
type SectorTerminating struct{ Message *cid.Cid }
type SectorTicket ¶
type SectorTicket struct { TicketValue abi.SealRandomness TicketEpoch abi.ChainEpoch }
type SectorTicketExpired ¶
type SectorTicketExpired struct {
// contains filtered or unexported fields
}
func (SectorTicketExpired) FormatError ¶
func (evt SectorTicketExpired) FormatError(xerrors.Printer) (next error)
type SectorUpdateActive ¶
type SectorUpdateActive struct{}
type SectorUpdateDealIDs ¶
type SectorUpdateReplicaFailed ¶
type SectorUpdateReplicaFailed struct {
// contains filtered or unexported fields
}
func (SectorUpdateReplicaFailed) FormatError ¶
func (evt SectorUpdateReplicaFailed) FormatError(xerrors.Printer) (next error)
type TerminateBatcher ¶
type TerminateBatcher struct {
// contains filtered or unexported fields
}
func NewTerminationBatcher ¶
func NewTerminationBatcher(mctx context.Context, maddr address.Address, api TerminateBatcherApi, addrSel AddressSelector, feeCfg config.MinerFeeConfig, getConfig dtypes.GetSealingConfigFunc) *TerminateBatcher
func (*TerminateBatcher) AddTermination ¶
func (b *TerminateBatcher) AddTermination(ctx context.Context, s abi.SectorID) (mcid cid.Cid, terminated bool, err error)
register termination, wait for batch message, return message CID can return cid.Undef,true if the sector is already terminated on-chain
func (*TerminateBatcher) Flush ¶
func (b *TerminateBatcher) Flush(ctx context.Context) (*cid.Cid, error)
type TerminateBatcherApi ¶
type TerminateBatcherApi interface { StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tsk types.TipSetKey) (*lminer.SectorLocation, error) MpoolPushMessage(context.Context, *types.Message, *api.MessageSendSpec) (*types.SignedMessage, error) StateMinerInfo(context.Context, address.Address, types.TipSetKey) (api.MinerInfo, error) StateMinerProvingDeadline(context.Context, address.Address, types.TipSetKey) (*dline.Info, error) StateMinerPartitions(ctx context.Context, m address.Address, dlIdx uint64, tsk types.TipSetKey) ([]api.Partition, error) // Address selector WalletBalance(context.Context, address.Address) (types.BigInt, error) WalletHas(context.Context, address.Address) (bool, error) StateAccountKey(context.Context, address.Address, types.TipSetKey) (address.Address, error) StateLookupID(context.Context, address.Address, types.TipSetKey) (address.Address, error) }
Source Files ¶
- cbor_gen.go
- checks.go
- commit_batch.go
- constants.go
- currentdealinfo.go
- fsm.go
- fsm_events.go
- garbage.go
- input.go
- numassign.go
- precommit_batch.go
- precommit_policy.go
- receive.go
- sealing.go
- sector_state.go
- states_failed.go
- states_proving.go
- states_replica_update.go
- states_sealing.go
- stats.go
- terminate_batch.go
- types.go
- upgrade_queue.go
- utils.go
Directories ¶
Path | Synopsis |
---|---|
lib
|
|
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |