Documentation ¶
Index ¶
- Constants
- type MinerCurrentDeadlineInfo
- type MinerCurrentDeadlineInfoList
- type MinerFeeDebt
- type MinerFeeDebtList
- type MinerFeeDebtV0
- type MinerInfo
- type MinerInfoList
- type MinerLockedFund
- type MinerLockedFundV0
- type MinerLockedFundsList
- type MinerPreCommitInfo
- type MinerPreCommitInfoList
- type MinerPreCommitInfoV0
- type MinerSectorDeal
- type MinerSectorDealList
- type MinerSectorEvent
- type MinerSectorEventList
- type MinerSectorInfo
- type MinerSectorInfoList
- type MinerSectorInfoV0
- type MinerSectorPost
- type MinerSectorPostList
- type MinerTaskLists
- type MinerTaskResult
- type MinerTaskResultList
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" )
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"` }
func (*MinerCurrentDeadlineInfo) Persist ¶
func (m *MinerCurrentDeadlineInfo) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error
type MinerCurrentDeadlineInfoList ¶
type MinerCurrentDeadlineInfoList []*MinerCurrentDeadlineInfo
func (MinerCurrentDeadlineInfoList) Persist ¶
func (ml MinerCurrentDeadlineInfoList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error
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 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"` }
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"` }
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 MinerLockedFundsList ¶
type MinerLockedFundsList []*MinerLockedFund
func (MinerLockedFundsList) Persist ¶
func (ml MinerLockedFundsList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error
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 ¶
func (ml MinerPreCommitInfoList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error
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"` }
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 ¶
func (ml MinerSectorDealList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error
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"` // https://github.com/go-pg/pg/issues/993 // override the SQL type with enum type, see 1_chainwatch.go for enum definition //lint:ignore SA5008 duplicate tag allowed by go-pg Event string `pg:"type:miner_sector_event_type" pg:",pk,notnull"` }
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 ¶
func (l MinerSectorEventList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error
type MinerSectorInfo ¶
type MinerSectorInfo 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"` }
func (*MinerSectorInfo) AsVersion ¶
func (msi *MinerSectorInfo) AsVersion(version model.Version) (interface{}, bool)
func (*MinerSectorInfo) Persist ¶
func (msi *MinerSectorInfo) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error
type MinerSectorInfoList ¶
type MinerSectorInfoList []*MinerSectorInfo
func (MinerSectorInfoList) Persist ¶
func (ml MinerSectorInfoList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error
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 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 ¶
func (msp *MinerSectorPost) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error
type MinerSectorPostList ¶
type MinerSectorPostList []*MinerSectorPost
func (MinerSectorPostList) Persist ¶
func (ml MinerSectorPostList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error
type MinerTaskLists ¶
type MinerTaskLists struct { MinerInfoModel MinerInfoList FeeDebtModel MinerFeeDebtList LockedFundsModel MinerLockedFundsList CurrentDeadlineInfoModel MinerCurrentDeadlineInfoList PreCommitsModel MinerPreCommitInfoList SectorsModel MinerSectorInfoList SectorEventsModel MinerSectorEventList SectorDealsModel MinerSectorDealList SectorPostModel MinerSectorPostList }
MinerTaskLists allow better batched insertion of Miner-related models.
func (*MinerTaskLists) Persist ¶
func (mtl *MinerTaskLists) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error
Persist PersistModel with every field of MinerTasklists
type MinerTaskResult ¶
type MinerTaskResult struct { Posts MinerSectorPostList MinerInfoModel *MinerInfo FeeDebtModel *MinerFeeDebt LockedFundsModel *MinerLockedFund CurrentDeadlineInfoModel *MinerCurrentDeadlineInfo PreCommitsModel MinerPreCommitInfoList SectorsModel MinerSectorInfoList SectorEventsModel MinerSectorEventList SectorDealsModel MinerSectorDealList }
func (*MinerTaskResult) Persist ¶
func (res *MinerTaskResult) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error
type MinerTaskResultList ¶
type MinerTaskResultList []*MinerTaskResult
func (MinerTaskResultList) Persist ¶
func (ml MinerTaskResultList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error
Click to show internal directories.
Click to hide internal directories.