model

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CreateEpochMetricsTable = `` /* 381-byte string literal not displayed */

	UpsertEpoch = `` /* 920-byte string literal not displayed */

)

Postgres intregration variables

View Source
var (
	CreateProposerDutiesTable = `` /* 155-byte string literal not displayed */

	InsertProposerDuty = `
	INSERT INTO t_proposer_duties (
		f_val_idx, 
		f_proposer_slot)
		VALUES ($1, $2)
		ON CONFLICT DO NOTHING;
	`
)

Postgres intregration variables

View Source
var (
	CreateValidatorRewardsTable = `` /* 482-byte string literal not displayed */

	UpsertValidator = `` /* 1171-byte string literal not displayed */

)

Postgres intregration variables

Functions

This section is empty.

Types

type EpochMetrics

type EpochMetrics struct {
	Epoch                 uint64
	Slot                  uint64
	PrevNumAttestations   int
	PrevNumAttValidators  int
	PrevNumValidators     int
	TotalBalance          float32
	AttEffectiveBalance   float32
	TotalEffectiveBalance float32

	MissingSource int
	MissingTarget int
	MissingHead   int

	MissedBlocks string
}

func NewEmptyEpochMetrics

func NewEmptyEpochMetrics() EpochMetrics

func NewEpochMetrics

func NewEpochMetrics(iEpoch uint64,
	iSlot uint64,
	iNumAtt uint64,
	iNumAttVals uint64,
	iNumVals uint64,
	iTotBal uint64,
	iAttEfBal uint64,
	iTotEfBal uint64,
	iMissingSource uint64,
	iMissingTarget uint64,
	iMissingHead uint64,
	iMissedBlocks []uint64) EpochMetrics

type ProposerDuties

type ProposerDuties struct {
	ValIdx       uint64
	ProposerSlot uint64
}

func NewEmptyProposerDuties

func NewEmptyProposerDuties() ProposerDuties

func NewProposerDuties

func NewProposerDuties(
	iValIdx uint64,
	iProposerSlot uint64) ProposerDuties

type ValidatorRewards

type ValidatorRewards struct {
	ValidatorIndex       uint64
	Slot                 int
	Epoch                int
	ValidatorBalance     float32
	Reward               int64
	MaxReward            uint64
	AttestationReward    uint64
	InclusionDelayReward uint64
	FlagIndexReward      uint64
	SyncCommitteeReward  uint64
	BaseReward           uint64
	AttSlot              uint64
	InclusionDelay       int64
	InSyncCommittee      bool
	ProposerSlot         int64
	MissingSource        bool
	MissingTarget        bool
	MissingHead          bool
	Status               string
}

func NewEmptyValidatorRewards

func NewEmptyValidatorRewards() ValidatorRewards

func NewValidatorRewards

func NewValidatorRewards(
	iValIdx uint64,
	iSlot uint64,
	iEpoch uint64,
	iValBal uint64,
	iReward int64,
	iMaxReward uint64,
	iMaxAttReward uint64,
	iMaxInDelayReward uint64,
	iMaxFlagReward uint64,
	iMaxSyncComReward uint64,
	iAttSlot uint64,
	iInclusionDelay int64,
	iBaseReward uint64,
	iSyncCommittee bool,
	iProposerSlot int64,
	iMissingSource bool,
	iMissingTarget bool,
	iMissingHead bool,
	iStatus string) ValidatorRewards

Jump to

Keyboard shortcuts

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