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: 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 MinerBeneficiary added in v0.13.0

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

	Beneficiary string `pg:",notnull"`

	Quota      string `pg:"type:numeric,notnull"`
	UsedQuota  string `pg:"type:numeric,notnull"`
	Expiration int64  `pg:",notnull,use_zero"`

	NewBeneficiary        string
	NewQuota              string `pg:"type:numeric"`
	NewExpiration         int64  `pg:",use_zero"`
	ApprovedByBeneficiary bool
	ApprovedByNominee     bool
}

func (*MinerBeneficiary) Persist added in v0.13.0

type MinerBeneficiaryList added in v0.13.0

type MinerBeneficiaryList []*MinerBeneficiary

func (MinerBeneficiaryList) Persist added in v0.13.0

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"`
}

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"`
}

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"`
}

func (*MinerInfo) Persist

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

type MinerInfoList

type MinerInfoList []*MinerInfo

func (MinerInfoList) Persist

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"`
}

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"`
}

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 MinerPreCommitInfoV9 added in v0.13.0

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

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

	SealedCID       string   `pg:",notnull"`
	SealRandEpoch   int64    `pg:",use_zero"`
	ExpirationEpoch int64    `pg:",use_zero"`
	DealIDS         []uint64 `pg:",array"`
	UnsealedCID     string   `pg:",notnull"`
	// contains filtered or unexported fields
}

func (*MinerPreCommitInfoV9) AsVersion added in v0.13.0

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

func (*MinerPreCommitInfoV9) Persist added in v0.13.0

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

type MinerPreCommitInfoV9List added in v0.13.0

type MinerPreCommitInfoV9List []*MinerPreCommitInfoV9

func (MinerPreCommitInfoV9List) Persist added in v0.13.0

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"`
}

func (*MinerSectorDeal) Persist

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:",pk,type:miner_sector_event_type,notnull"` // nolint: staticcheck
}

func (*MinerSectorEvent) Persist

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
}

func (*MinerSectorPost) Persist

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