state

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const SixDecimalRound = 6

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricDetails

type MetricDetails struct {

	// done
	SdPrice float64

	EthPrice float64
	// done
	TotalValidators *big.Int
	// done
	TotalActiveValidators *big.Int
	// done
	TotalQueuedValidators float64
	// done
	TotalOperators *big.Int
	// done
	TotalStakedSd float64
	// done
	TotalStakedEthByNos *big.Int
	// done
	TotalEthxSupply float64
	// done
	TotalStakedEthByUsers *big.Int
	// done
	MinEthThreshold float64
	// done
	MaxEthThreshold float64

	// done
	TotalSDUtilized float64

	// done
	SDUtilizationTVL float64

	// done
	ActiveValidators *big.Int
	// done
	StaderQueuedValidators *big.Int
	// done
	BeaconChainQueuedValidators *big.Int
	// done
	SlashedValidators *big.Int
	// done
	ExitingValidators *big.Int
	// done
	WithdrawnValidators *big.Int
	// done
	InitializedValidators *big.Int
	// done
	InvalidSignatureValidators *big.Int
	// done
	FrontRunValidators *big.Int
	// done
	FundsSettledValidators *big.Int
	// done
	ValidatorStatusMap map[types.ValidatorPubkey]beacon.ValidatorStatus
	ValidatorInfoMap   map[types.ValidatorPubkey]contracts.Validator

	// done
	CumulativePenalty float64
	// done
	UnclaimedClRewards float64
	// done
	UnclaimedNonSocializingPoolElRewards float64
	// done
	CollateralRatio float64
	//
	CollateralRatioInSd float64

	// done
	ClaimedSocializingPoolElRewards float64
	// done
	ClaimedSocializingPoolSdRewards float64
	// done
	UnclaimedSocializingPoolElRewards float64
	// done
	UnclaimedSocializingPoolSDRewards float64
	// done
	NextSocializingPoolRewardCycle types.RewardCycleDetails
	// done
	OperatorStakedSd      float64
	OperatorStakedSdInEth float64
	// done
	OperatorEthCollateral float64

	// done
	OperatorSDUtilized float64
	// done
	SdUtilityPoolBalance float64

	// The utilize amount + fee
	OperatorSDUtilizationPosition float64

	// The amount SD self bond
	OperatorSDSelfBond float64

	// done
	OperatorSDInterest float64

	// done
	SdCollateralPct float64

	// done
	LockedEth float64

	// done
	HealthFactor float64

	// done
	LiquidationStatus float64

	ClaimVaultBalance float64
}

type MetricsCache

type MetricsCache struct {
	// Block / slot for this state
	ElBlockNumber    uint64
	BeaconSlotNumber uint64
	BeaconConfig     beacon.Eth2Config

	StaderNetworkDetails MetricDetails

	// Validator details
	ValidatorDetails map[types.ValidatorPubkey]beacon.ValidatorStatus
	// contains filtered or unexported fields
}

func CreateMetricsCache

func CreateMetricsCache(
	c *cli.Context,
	cfg *config.StaderNodeConfig,
	ec stader.ExecutionClient,
	bc beacon.Client,
	log *log.ColorLogger,
	slotNumber uint64,
	beaconConfig beacon.Eth2Config,
	nodeAddress common.Address,
) (*MetricsCache, error)

type MetricsCacheManager

type MetricsCacheManager struct {
	Config       *config.StaderConfig
	Network      cfgtypes.Network
	ChainID      uint
	BeaconConfig beacon.Eth2Config
	// contains filtered or unexported fields
}

func NewMetricsCache

Create a new manager for the network state

func (*MetricsCacheManager) GetHeadSlot

func (m *MetricsCacheManager) GetHeadSlot() (uint64, error)

func (*MetricsCacheManager) GetHeadState

func (m *MetricsCacheManager) GetHeadState(nodeAddress common.Address) (*MetricsCache, error)

func (*MetricsCacheManager) GetHeadStateForNode

func (m *MetricsCacheManager) GetHeadStateForNode(nodeAddress common.Address) (*MetricsCache, error)

Jump to

Keyboard shortcuts

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