rewards

package
v4.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: GPL-3.0 Imports: 25 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttestationRewards added in v4.0.7

type AttestationRewards struct {
	IdealRewards []IdealAttestationReward `json:"ideal_rewards"`
	TotalRewards []TotalAttestationReward `json:"total_rewards"`
}

type AttestationRewardsResponse added in v4.0.7

type AttestationRewardsResponse struct {
	Data                AttestationRewards `json:"data"`
	ExecutionOptimistic bool               `json:"execution_optimistic"`
	Finalized           bool               `json:"finalized"`
}

type BlockRewardService added in v4.2.0

type BlockRewardService struct {
	Replayer stategen.ReplayerBuilder
}

BlockRewardService implements BlockRewardsFetcher and can be declared to access the underlying functions

func (*BlockRewardService) GetBlockRewardsData added in v4.2.0

GetBlockRewardsData returns the BlockRewards Object which is used for the BlockRewardsResponse and ProduceBlockV3

func (*BlockRewardService) GetStateForRewards added in v4.2.0

GetStateForRewards returns the state replayed up to the block's slot

type BlockRewards

type BlockRewards struct {
	ProposerIndex     string `json:"proposer_index"`
	Total             string `json:"total"`
	Attestations      string `json:"attestations"`
	SyncAggregate     string `json:"sync_aggregate"`
	ProposerSlashings string `json:"proposer_slashings"`
	AttesterSlashings string `json:"attester_slashings"`
}

type BlockRewardsFetcher added in v4.2.0

BlockRewardsFetcher is a interface that provides access to reward related responses

type BlockRewardsResponse

type BlockRewardsResponse struct {
	Data                *BlockRewards `json:"data"`
	ExecutionOptimistic bool          `json:"execution_optimistic"`
	Finalized           bool          `json:"finalized"`
}

type IdealAttestationReward added in v4.0.7

type IdealAttestationReward struct {
	EffectiveBalance string `json:"effective_balance"`
	Head             string `json:"head"`
	Target           string `json:"target"`
	Source           string `json:"source"`
	Inactivity       string `json:"inactivity"`
}

type Server

type Server struct {
	Blocker               lookup.Blocker
	OptimisticModeFetcher blockchain.OptimisticModeFetcher
	FinalizationFetcher   blockchain.FinalizationFetcher
	TimeFetcher           blockchain.TimeFetcher
	Stater                lookup.Stater
	HeadFetcher           blockchain.HeadFetcher
	BlockRewardFetcher    BlockRewardsFetcher
}

func (*Server) AttestationRewards added in v4.0.7

func (s *Server) AttestationRewards(w http.ResponseWriter, r *http.Request)

AttestationRewards retrieves attestation reward info for validators specified by array of public keys or validator index. If no array is provided, return reward info for every validator.

func (*Server) BlockRewards

func (s *Server) BlockRewards(w http.ResponseWriter, r *http.Request)

BlockRewards is an HTTP handler for Beacon API getBlockRewards.

func (*Server) SyncCommitteeRewards added in v4.0.8

func (s *Server) SyncCommitteeRewards(w http.ResponseWriter, r *http.Request)

SyncCommitteeRewards retrieves rewards info for sync committee members specified by array of public keys or validator index. If no array is provided, return reward info for every committee member.

type SyncCommitteeReward added in v4.0.8

type SyncCommitteeReward struct {
	ValidatorIndex string `json:"validator_index"`
	Reward         string `json:"reward"`
}

type SyncCommitteeRewardsResponse added in v4.0.8

type SyncCommitteeRewardsResponse struct {
	Data                []SyncCommitteeReward `json:"data"`
	ExecutionOptimistic bool                  `json:"execution_optimistic"`
	Finalized           bool                  `json:"finalized"`
}

type TotalAttestationReward added in v4.0.7

type TotalAttestationReward struct {
	ValidatorIndex string `json:"validator_index"`
	Head           string `json:"head"`
	Target         string `json:"target"`
	Source         string `json:"source"`
	Inactivity     string `json:"inactivity"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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