miner

package
v0.9.1-rc1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0, MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PreCommitAdded   = "PRECOMMIT_ADDED"
	PreCommitExpired = "PRECOMMIT_EXPIRED"

	CommitCapacityAdded = "COMMIT_CAPACITY_ADDED"

	SectorAdded      = "SECTOR_ADDED"
	SectorExtended   = "SECTOR_EXTENDED"
	SectorFaulted    = "SECTOR_FAULTED"
	SectorRecovering = "SECTOR_RECOVERING"
	SectorRecovered  = "SECTOR_RECOVERED"

	SectorExpired    = "SECTOR_EXPIRED"
	SectorTerminated = "SECTOR_TERMINATED"

	// specs-actors v7
	SectorSnapped = "SECTOR_SNAPPED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MinerCurrentDeadlineInfo

type MinerCurrentDeadlineInfo struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	MinerID   string `pg:",pk,notnull"`
	StateRoot string `pg:",pk,notnull"`

	DeadlineIndex uint64 `pg:",notnull,use_zero"`
	PeriodStart   int64  `pg:",notnull,use_zero"`
	Open          int64  `pg:",notnull,use_zero"`
	Close         int64  `pg:",notnull,use_zero"`
	Challenge     int64  `pg:",notnull,use_zero"`
	FaultCutoff   int64  `pg:",notnull,use_zero"`
	// contains filtered or unexported fields
}

func (*MinerCurrentDeadlineInfo) Persist

type MinerCurrentDeadlineInfoList

type MinerCurrentDeadlineInfoList []*MinerCurrentDeadlineInfo

func (MinerCurrentDeadlineInfoList) Persist

type MinerFeeDebt

type MinerFeeDebt struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	MinerID   string `pg:",pk,notnull"`
	StateRoot string `pg:",pk,notnull"`

	FeeDebt string `pg:"type:numeric,notnull"`
	// contains filtered or unexported fields
}

func (*MinerFeeDebt) AsVersion

func (m *MinerFeeDebt) AsVersion(version model.Version) (interface{}, bool)

func (*MinerFeeDebt) Persist

func (m *MinerFeeDebt) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type MinerFeeDebtList

type MinerFeeDebtList []*MinerFeeDebt

func (MinerFeeDebtList) Persist

func (ml MinerFeeDebtList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type MinerFeeDebtV0

type MinerFeeDebtV0 struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	MinerID   string `pg:",pk,notnull"`
	StateRoot string `pg:",pk,notnull"`

	FeeDebt string `pg:",notnull"`
	// contains filtered or unexported fields
}

type MinerInfo

type MinerInfo struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	MinerID   string `pg:",pk,notnull"`
	StateRoot string `pg:",pk,notnull"`

	OwnerID  string `pg:",notnull"`
	WorkerID string `pg:",notnull"`

	NewWorker         string
	WorkerChangeEpoch int64 `pg:",notnull,use_zero"`

	ConsensusFaultedElapsed int64 `pg:",notnull,use_zero"`

	PeerID           string
	ControlAddresses []string
	MultiAddresses   []string

	SectorSize uint64 `pg:",notnull,use_zero"`
	// contains filtered or unexported fields
}

func (*MinerInfo) Persist

func (m *MinerInfo) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type MinerInfoList

type MinerInfoList []*MinerInfo

func (MinerInfoList) Persist

func (ml MinerInfoList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type MinerLockedFund

type MinerLockedFund struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	MinerID   string `pg:",pk,notnull"`
	StateRoot string `pg:",pk,notnull"`

	LockedFunds       string `pg:"type:numeric,notnull"`
	InitialPledge     string `pg:"type:numeric,notnull"`
	PreCommitDeposits string `pg:"type:numeric,notnull"`
	// contains filtered or unexported fields
}

func (*MinerLockedFund) AsVersion

func (m *MinerLockedFund) AsVersion(version model.Version) (interface{}, bool)

func (*MinerLockedFund) Persist

func (m *MinerLockedFund) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type MinerLockedFundV0

type MinerLockedFundV0 struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	MinerID   string `pg:",pk,notnull"`
	StateRoot string `pg:",pk,notnull"`

	LockedFunds       string `pg:",notnull"`
	InitialPledge     string `pg:",notnull"`
	PreCommitDeposits string `pg:",notnull"`
	// contains filtered or unexported fields
}

type MinerLockedFundsList

type MinerLockedFundsList []*MinerLockedFund

func (MinerLockedFundsList) Persist

type MinerPreCommitInfo

type MinerPreCommitInfo struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	MinerID   string `pg:",pk,notnull"`
	SectorID  uint64 `pg:",pk,use_zero"`
	StateRoot string `pg:",pk,notnull"`

	SealedCID       string `pg:",notnull"`
	SealRandEpoch   int64  `pg:",use_zero"`
	ExpirationEpoch int64  `pg:",use_zero"`

	PreCommitDeposit   string `pg:"type:numeric,notnull"`
	PreCommitEpoch     int64  `pg:",use_zero"`
	DealWeight         string `pg:"type:numeric,notnull"`
	VerifiedDealWeight string `pg:"type:numeric,notnull"`

	IsReplaceCapacity      bool
	ReplaceSectorDeadline  uint64 `pg:",use_zero"`
	ReplaceSectorPartition uint64 `pg:",use_zero"`
	ReplaceSectorNumber    uint64 `pg:",use_zero"`
	// contains filtered or unexported fields
}

func (*MinerPreCommitInfo) AsVersion

func (mpi *MinerPreCommitInfo) AsVersion(version model.Version) (interface{}, bool)

func (*MinerPreCommitInfo) Persist

func (mpi *MinerPreCommitInfo) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type MinerPreCommitInfoList

type MinerPreCommitInfoList []*MinerPreCommitInfo

func (MinerPreCommitInfoList) Persist

type MinerPreCommitInfoV0

type MinerPreCommitInfoV0 struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	MinerID   string `pg:",pk,notnull"`
	SectorID  uint64 `pg:",pk,use_zero"`
	StateRoot string `pg:",pk,notnull"`

	SealedCID       string `pg:",notnull"`
	SealRandEpoch   int64  `pg:",use_zero"`
	ExpirationEpoch int64  `pg:",use_zero"`

	PreCommitDeposit   string `pg:",notnull"`
	PreCommitEpoch     int64  `pg:",use_zero"`
	DealWeight         string `pg:",notnull"`
	VerifiedDealWeight string `pg:",notnull"`

	IsReplaceCapacity      bool
	ReplaceSectorDeadline  uint64 `pg:",use_zero"`
	ReplaceSectorPartition uint64 `pg:",use_zero"`
	ReplaceSectorNumber    uint64 `pg:",use_zero"`
	// contains filtered or unexported fields
}

type MinerSectorDeal

type MinerSectorDeal struct {
	Height   int64  `pg:",pk,notnull,use_zero"`
	MinerID  string `pg:",pk,notnull"`
	SectorID uint64 `pg:",pk,use_zero"`
	DealID   uint64 `pg:",pk,use_zero"`
	// contains filtered or unexported fields
}

func (*MinerSectorDeal) Persist

func (ds *MinerSectorDeal) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type MinerSectorDealList

type MinerSectorDealList []*MinerSectorDeal

func (MinerSectorDealList) Persist

type MinerSectorEvent

type MinerSectorEvent struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	MinerID   string `pg:",pk,notnull"`
	SectorID  uint64 `pg:",pk,use_zero"`
	StateRoot string `pg:",pk,notnull"`

	Event string `pg:"type:miner_sector_event_type" pg:",pk,notnull"` //lint:ignore SA5008 duplicate tag allowed by go-pg
	// contains filtered or unexported fields
}

func (*MinerSectorEvent) Persist

func (mse *MinerSectorEvent) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type MinerSectorEventList

type MinerSectorEventList []*MinerSectorEvent

func (MinerSectorEventList) Persist

type MinerSectorInfoV0

type MinerSectorInfoV0 struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	MinerID   string `pg:",pk,notnull"`
	SectorID  uint64 `pg:",pk,use_zero"`
	StateRoot string `pg:",pk,notnull"`

	SealedCID string `pg:",notnull"`

	ActivationEpoch int64 `pg:",use_zero"`
	ExpirationEpoch int64 `pg:",use_zero"`

	DealWeight         string `pg:",notnull"`
	VerifiedDealWeight string `pg:",notnull"`

	InitialPledge         string `pg:",notnull"`
	ExpectedDayReward     string `pg:",notnull"`
	ExpectedStoragePledge string `pg:",notnull"`
	// contains filtered or unexported fields
}

type MinerSectorInfoV1_6 added in v0.8.6

type MinerSectorInfoV1_6 struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	MinerID   string `pg:",pk,notnull"`
	SectorID  uint64 `pg:",pk,use_zero"`
	StateRoot string `pg:",pk,notnull"`

	SealedCID string `pg:",notnull"`

	ActivationEpoch int64 `pg:",use_zero"`
	ExpirationEpoch int64 `pg:",use_zero"`

	DealWeight         string `pg:"type:numeric,notnull"`
	VerifiedDealWeight string `pg:"type:numeric,notnull"`

	InitialPledge         string `pg:"type:numeric,notnull"`
	ExpectedDayReward     string `pg:"type:numeric,notnull"`
	ExpectedStoragePledge string `pg:"type:numeric,notnull"`
	// contains filtered or unexported fields
}

MinerSectorInfoV1_6 is exported from the miner actor iff the actor code is less than v7. The table keeps its original name since that's a requirement to support lily backfills

func (*MinerSectorInfoV1_6) AsVersion added in v0.8.6

func (msi *MinerSectorInfoV1_6) AsVersion(version model.Version) (interface{}, bool)

func (*MinerSectorInfoV1_6) Persist added in v0.8.6

func (msi *MinerSectorInfoV1_6) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type MinerSectorInfoV1_6List added in v0.8.6

type MinerSectorInfoV1_6List []*MinerSectorInfoV1_6

func (MinerSectorInfoV1_6List) Persist added in v0.8.6

type MinerSectorInfoV7 added in v0.8.6

type MinerSectorInfoV7 struct {
	Height    int64  `pg:",pk,notnull,use_zero"`
	MinerID   string `pg:",pk,notnull"`
	SectorID  uint64 `pg:",pk,use_zero"`
	StateRoot string `pg:",pk,notnull"`

	SealedCID string `pg:",notnull"`

	ActivationEpoch int64 `pg:",use_zero"`
	ExpirationEpoch int64 `pg:",use_zero"`

	DealWeight         string `pg:"type:numeric,notnull"`
	VerifiedDealWeight string `pg:"type:numeric,notnull"`

	InitialPledge         string `pg:"type:numeric,notnull"`
	ExpectedDayReward     string `pg:"type:numeric,notnull"`
	ExpectedStoragePledge string `pg:"type:numeric,notnull"`

	// added in specs-actors v7, will be null for all sectors and only gets set on the first ReplicaUpdate
	SectorKeyCID string
	// contains filtered or unexported fields
}

MinerSectorInfoV7 is the default model exported from the miner actor extractor. the table is returned iff the miner actor code is greater than or equal to v7. The table receives a new name since we cannot rename the miner_sector_info table, else we will break backfill.

func (*MinerSectorInfoV7) AsVersion added in v0.8.6

func (msi *MinerSectorInfoV7) AsVersion(version model.Version) (interface{}, bool)

func (*MinerSectorInfoV7) Persist added in v0.8.6

func (msi *MinerSectorInfoV7) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type MinerSectorInfoV7List added in v0.8.6

type MinerSectorInfoV7List []*MinerSectorInfoV7

func (MinerSectorInfoV7List) Persist added in v0.8.6

type MinerSectorPost

type MinerSectorPost struct {
	Height   int64  `pg:",pk,notnull,use_zero"`
	MinerID  string `pg:",pk,notnull"`
	SectorID uint64 `pg:",pk,notnull,use_zero"`

	PostMessageCID string
	// contains filtered or unexported fields
}

func (*MinerSectorPost) Persist

func (msp *MinerSectorPost) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

type MinerSectorPostList

type MinerSectorPostList []*MinerSectorPost

func (MinerSectorPostList) Persist

type MinerTaskResult

type MinerTaskResult struct {
	Posts MinerSectorPostList

	MinerInfoModel           *MinerInfo
	FeeDebtModel             *MinerFeeDebt
	LockedFundsModel         *MinerLockedFund
	CurrentDeadlineInfoModel *MinerCurrentDeadlineInfo
	PreCommitsModel          MinerPreCommitInfoList
	SectorsModelV1_6         MinerSectorInfoV1_6List
	SectorsModelV7           MinerSectorInfoV7List
	SectorEventsModel        MinerSectorEventList
	SectorDealsModel         MinerSectorDealList
}

func (*MinerTaskResult) Persist

func (res *MinerTaskResult) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error

Jump to

Keyboard shortcuts

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