state

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 *big.Int
	// 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
	ActiveValidators *big.Int
	// done
	QueuedValidators *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
}

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