lotusinfo

package
v0.0.0-...-72fc9f5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MethodAccount  = []string{"Constructor", "Constructor"}
	MethodInit     = []string{"Constructor", "Exec"}
	MethodCron     = []string{"Constructor", "EpochTick"}
	MethodReward   = []string{"Constructor", "AwardBlockReward", "ThisEpochReward", "UpdateNetworkKPI"}
	MethodMultisig = []string{"Constructor", "Propose", "Approve", "Cancel", "AddSigner", "RemoveSigner", "SwapSigner",
		"ChangeNumApprovalsThreshold", "LockBalance"}
	MethodPaymentChannel = []string{"Constructor", "UpdateChannelState", "Settle", "Collect"}
	MethodStorageMarket  = []string{"Constructor", "AddBalance", "WithdrawBalance", "PublishStorageDeals",
		"VerifyDealsForActivation", "ActivateDeals", "OnMinerSectorsTerminate", "ComputeDataCommitment", "CronTick"}
	MethodStoragePower = []string{"Constructor", "CreateMiner", "UpdateClaimedPower", "EnrollCronEvent",
		"OnEpochTickEnd", "UpdatePledgeTotal", "Deprecated1", "SubmitPoRepForBulkVerify", "CurrentTotalPower"}
	MethodStorageMiner = []string{"Constructor", "ControlAddresses", "ChangeWorkerAddress", "ChangePeerID",
		"SubmitWindowedPoSt", "PreCommitSector", "ProveCommitSector", "ExtendSectorExpiration", "TerminateSectors",
		"DeclareFaults", "DeclareFaultsRecovered", "OnDeferredCronEvent", "CheckSectorProven", "ApplyRewards",
		"ReportConsensusFault", "WithdrawBalance", "ConfirmSectorProofsValid", "ChangeMultiaddrs", "CompactPartitions",
		"CompactSectorNumbers", "ConfirmUpdateWorkerKey", "RepayDebt", "ChangeOwnerAddress", "DisputeWindowedPoSt"}
	MethodVerifiedRegistry = []string{"Constructor", "AddVerifier", "RemoveVerifier", "AddVerifiedClient", "UseBytes",
		"RestoreBytes"}
	MethodMessageType = map[string][]string{"account": MethodAccount, "init": MethodInit, "cron": MethodCron,
		"reward": MethodReward, "multisig": MethodMultisig, "paymentchannel": MethodPaymentChannel,
		"storagemarket": MethodStorageMarket, "storagepower": MethodStoragePower, "storageminer": MethodStorageMiner,
		"verifiedregistry": MethodVerifiedRegistry}
)

Functions

func GetBaseInfo

func GetBaseInfo(ctx context.Context, fu lotusapi.FullNodeStruct, minerId string, chainHeight int64, chainTipSetKey *types.TipSet) (eligibility int)

func GetChainBasefee

func GetChainBasefee(chainTipSetKey *types.TipSet) int64

func GetChainHeight

func GetChainHeight(chainTipSetKey *types.TipSet) int64

func GetLocalTime

func GetLocalTime() (localTime int64)

func GetMinerID

func GetMinerID(ctx context.Context, mi lotusapi.StorageMinerStruct) (id string, err error)

func GetMinerVersion

func GetMinerVersion(ctx context.Context, mi lotusapi.StorageMinerStruct) (miVer string, err error)

func GetPowerList

func GetPowerList(ctx context.Context, fu lotusapi.FullNodeStruct, minerId string, chainTipSetKey *types.TipSet) (mpRW int64, mpQw int64, tpRw int64, tpQw int64)

func GetTipsetKey

func GetTipsetKey(ctx context.Context, fu lotusapi.FullNodeStruct) (tipSet *types.TipSet, err error)

func GetWalletBalance

func GetWalletBalance(ctx context.Context, fu lotusapi.FullNodeStruct, addrStg string) (balance float64)

func GetWalletlist

func GetWalletlist(ctx context.Context, fu lotusapi.FullNodeStruct) (mpoolTotal int)

func Strval

func Strval(value interface{}) string

Types

type ApiConnInfo

type ApiConnInfo struct {
	Addr  string
	Token []byte
}

func ParseApiInfo

func ParseApiInfo(s string) ApiConnInfo

type ChainSyncState

type ChainSyncState struct {
	CSWorkerID string
	CSDiff     int64
	CSStatus   int
}

func GetChainSyncState

func GetChainSyncState(ctx context.Context, fu lotusapi.FullNodeStruct) []ChainSyncState

type DaemonInfo

type DaemonInfo struct {
	Network string
	Version string
	Value   int64
}

func GetInfo

func GetInfo(ctx context.Context, fu lotusapi.FullNodeStruct, chainHead *types.TipSet) (daemonInfo DaemonInfo, err error)

type JobInfoStruct

type JobInfoStruct struct {
	JjobId         string
	Jsector        string
	Jhost          string
	Jtask          string
	JjobStartTime  string
	JrunWait       string
	JjobStartEpoch int
}

func GetWorkerJobs

func GetWorkerJobs(ctx context.Context, mi lotusapi.StorageMinerStruct) (jobInfo []JobInfoStruct)

type LockedInfoStruct

type LockedInfoStruct struct {
	LockedType string
	Balance    float64
}

func GetLockedFunds

func GetLockedFunds(ctx context.Context, fu lotusapi.FullNodeStruct, minerId string, chainTipSetKey *types.TipSet) (linfo []LockedInfoStruct)

type MinerInfoStruct

type MinerInfoStruct struct {
	Owner        string
	OwnerAddr    string
	Worker       string
	WorkerAddr   string
	Control0     string
	Control0Addr string
	SectorSize   uint64
}

func GetMinerInfo

func GetMinerInfo(ctx context.Context, fu lotusapi.FullNodeStruct, minerId string, chainTipSetKey *types.TipSet) (info MinerInfoStruct, err error)

type MpoolMsg

type MpoolMsg struct {
	Mfrom       string
	Mto         string
	Mnonce      uint64
	Mvalue      int64
	Mgaslimit   int64
	Mgasfeecap  int64
	Mgaspremium int64
	Mmethod     int64
	Mmethodtype string
	Mactortype  string
}

func GetMpoolInfo

func GetMpoolInfo(ctx context.Context, fu lotusapi.FullNodeStruct, chainTipSetKey *types.TipSet, addrList []string) (mpoolTotal int, localMpollTotal int, messageList []MpoolMsg)

type SchedDiagInfo

type SchedDiagInfo struct {
	Requests    []SchedDiagRequestInfo
	OpenWindows []string
}

type SchedDiagRequestInfo

type SchedDiagRequestInfo struct {
	Sector   abi.SectorID
	TaskType sealtasks.TaskType
	Priority int
}

type SchedInfoStruct

type SchedInfoStruct struct {
	Sector string
	Task   string
}

type SchedParse

type SchedParse struct {
	SchedInfo    SchedDiagInfo
	ReturnedWork []string
	Waiting      []string
	CallToWork   map[string]string
	EarlyRet     []string
}

type WalletInfo

type WalletInfo struct {
	Name    string
	Address string
	Balance uint64
}

type WorkerInfoStuct

type WorkerInfoStuct struct {
	WHost        string
	WCpu         uint64
	WGpu         int
	WRamTotal    uint64
	WRamReserved int
	WRamTasks    uint64
	WVmemTotal   uint64
	WVmemReseved int
	WvmemTasks   uint64
	WCpuUsed     uint64
	WGpuUsed     int
}

func GetWorkerInfo

func GetWorkerInfo(ctx context.Context, mi lotusapi.StorageMinerStruct) (workers []WorkerInfoStuct)

Jump to

Keyboard shortcuts

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