Documentation
¶
Index ¶
- Variables
- func IsUpgradeState(st SectorState) bool
- type SafeSectorPiece
- func (sp *SafeSectorPiece) DealInfo() UniversalPieceInfo
- func (sp *SafeSectorPiece) EndEpoch() (abi.ChainEpoch, error)
- func (sp *SafeSectorPiece) GetAllocation(ctx context.Context, aapi piece.AllocationAPI, tsk types.TipSetKey) (*verifreg.Allocation, error)
- func (sp *SafeSectorPiece) HasDealInfo() bool
- func (sp *SafeSectorPiece) Impl() piece.PieceDealInfo
- func (sp *SafeSectorPiece) KeepUnsealedRequested() bool
- func (sp *SafeSectorPiece) Key() piece.PieceKey
- func (sp *SafeSectorPiece) MarshalCBOR(w io.Writer) error
- func (sp *SafeSectorPiece) MarshalJSON() ([]byte, error)
- func (sp *SafeSectorPiece) Piece() abi.PieceInfo
- func (sp *SafeSectorPiece) PieceCID() cid.Cid
- func (sp *SafeSectorPiece) StartEpoch() (abi.ChainEpoch, error)
- func (sp *SafeSectorPiece) String() string
- func (sp *SafeSectorPiece) UnmarshalCBOR(r io.Reader) (err error)
- func (sp *SafeSectorPiece) UnmarshalJSON(b []byte) error
- func (sp *SafeSectorPiece) Valid(nv network.Version) error
- type SectorState
- type UniversalPieceInfo
Constants ¶
This section is empty.
Variables ¶
View Source
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: {},
}
Functions ¶
func IsUpgradeState ¶
func IsUpgradeState(st SectorState) bool
Types ¶
type SafeSectorPiece ¶
type SafeSectorPiece struct {
// contains filtered or unexported fields
}
SafeSectorPiece is a wrapper around SectorPiece which makes it hard to misuse especially by making it hard to access raw Deal / DDO info
func SafePiece ¶
func SafePiece(piece api.SectorPiece) SafeSectorPiece
func (*SafeSectorPiece) DealInfo ¶
func (sp *SafeSectorPiece) DealInfo() UniversalPieceInfo
func (*SafeSectorPiece) EndEpoch ¶
func (sp *SafeSectorPiece) EndEpoch() (abi.ChainEpoch, error)
func (*SafeSectorPiece) GetAllocation ¶
func (sp *SafeSectorPiece) GetAllocation(ctx context.Context, aapi piece.AllocationAPI, tsk types.TipSetKey) (*verifreg.Allocation, error)
func (*SafeSectorPiece) HasDealInfo ¶
func (sp *SafeSectorPiece) HasDealInfo() bool
func (*SafeSectorPiece) Impl ¶
func (sp *SafeSectorPiece) Impl() piece.PieceDealInfo
func (*SafeSectorPiece) KeepUnsealedRequested ¶
func (sp *SafeSectorPiece) KeepUnsealedRequested() bool
func (*SafeSectorPiece) Key ¶
func (sp *SafeSectorPiece) Key() piece.PieceKey
func (*SafeSectorPiece) MarshalCBOR ¶
func (sp *SafeSectorPiece) MarshalCBOR(w io.Writer) error
func (*SafeSectorPiece) MarshalJSON ¶
func (sp *SafeSectorPiece) MarshalJSON() ([]byte, error)
func (*SafeSectorPiece) Piece ¶
func (sp *SafeSectorPiece) Piece() abi.PieceInfo
func (*SafeSectorPiece) PieceCID ¶
func (sp *SafeSectorPiece) PieceCID() cid.Cid
func (*SafeSectorPiece) StartEpoch ¶
func (sp *SafeSectorPiece) StartEpoch() (abi.ChainEpoch, error)
func (*SafeSectorPiece) String ¶
func (sp *SafeSectorPiece) String() string
func (*SafeSectorPiece) UnmarshalCBOR ¶
func (sp *SafeSectorPiece) UnmarshalCBOR(r io.Reader) (err error)
cbor passthrough
func (*SafeSectorPiece) UnmarshalJSON ¶
func (sp *SafeSectorPiece) UnmarshalJSON(b []byte) error
json passthrough
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 (deprecated) 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 (deprecated) 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 UniversalPieceInfo ¶
type UniversalPieceInfo interface { Impl() piece.PieceDealInfo String() string Key() piece.PieceKey Valid(nv network.Version) error StartEpoch() (abi.ChainEpoch, error) EndEpoch() (abi.ChainEpoch, error) PieceCID() cid.Cid KeepUnsealedRequested() bool GetAllocation(ctx context.Context, aapi piece.AllocationAPI, tsk types.TipSetKey) (*verifreg.Allocation, error) }
Click to show internal directories.
Click to hide internal directories.