mstat

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TerminationPenaltyRatio float64 = 0.5

Functions

func ComputeEDRLazy1

func ComputeEDRLazy1(ctx context.Context, minerAddr address.Address, ts *types.TipSet, api *api.FullNodeStruct) (*big.Int, error)

func ComputeFilPerTiB

func ComputeFilPerTiB(ctx context.Context, ts *types.TipSet, api *api.FullNodeStruct) (*float64, error)

func LoadMinerActor

func LoadMinerActor(ctx context.Context, api *api.FullNodeStruct, minerAddr address.Address, ts *types.TipSet) (*types.ActorV5, miner.State, error)

Types

type MinerStats

type MinerStats struct {
	MinerInfo           *api.MinerInfo
	Balance             *big.Int
	PenaltyTermination  *big.Int
	ExpectedDailyReward *big.Int
	PenaltyFaultPerDay  *big.Int
	PledgedFunds        *big.Int
	VestingFunds        *big.Int
	GreenScore          *big.Int
	QualityAdjPower     *big.Int
	LiveSectors         *big.Int
	FaultySectors       *big.Int
	HasMinPower         bool
}

TODO: add fault info

func ComputeMinerStats

func ComputeMinerStats(ctx context.Context, minerAddr address.Address, ts *types.TipSet, api *api.FullNodeStruct) (*MinerStats, error)

func ComputeMinersStats

func ComputeMinersStats(ctx context.Context, minerAddrs []address.Address, ts *types.TipSet, api *api.FullNodeStruct) (*MinerStats, error)

func NewMinerStats

func NewMinerStats() *MinerStats

create a new miner stats struct

type SectorStatus

type SectorStatus struct {
	Live   *big.Int
	Active *big.Int
	Faults *big.Int
}

Jump to

Keyboard shortcuts

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