debug

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: 15 Imported by: 4

Documentation

Overview

Package debug defines a gRPC beacon service implementation, following the official API standards https://ethereum.github.io/beacon-apis/#/. This package includes the beacon and config endpoints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForkChoiceDumpExtraData added in v4.2.0

type ForkChoiceDumpExtraData struct {
	UnrealizedJustifiedCheckpoint *shared.Checkpoint `json:"unrealized_justified_checkpoint"`
	UnrealizedFinalizedCheckpoint *shared.Checkpoint `json:"unrealized_finalized_checkpoint"`
	ProposerBoostRoot             string             `json:"proposer_boost_root"`
	PreviousProposerBoostRoot     string             `json:"previous_proposer_boost_root"`
	HeadRoot                      string             `json:"head_root"`
}

type ForkChoiceHead added in v4.2.0

type ForkChoiceHead struct {
	Root                string `json:"root"`
	Slot                string `json:"slot"`
	ExecutionOptimistic bool   `json:"execution_optimistic"`
}

type ForkChoiceNode added in v4.2.0

type ForkChoiceNode struct {
	Slot               string                   `json:"slot"`
	BlockRoot          string                   `json:"block_root"`
	ParentRoot         string                   `json:"parent_root"`
	JustifiedEpoch     string                   `json:"justified_epoch"`
	FinalizedEpoch     string                   `json:"finalized_epoch"`
	Weight             string                   `json:"weight"`
	Validity           string                   `json:"validity"`
	ExecutionBlockHash string                   `json:"execution_block_hash"`
	ExtraData          *ForkChoiceNodeExtraData `json:"extra_data"`
}

type ForkChoiceNodeExtraData added in v4.2.0

type ForkChoiceNodeExtraData struct {
	UnrealizedJustifiedEpoch string `json:"unrealized_justified_epoch"`
	UnrealizedFinalizedEpoch string `json:"unrealized_finalized_epoch"`
	Balance                  string `json:"balance"`
	ExecutionOptimistic      bool   `json:"execution_optimistic"`
	TimeStamp                string `json:"timestamp"`
}

type GetBeaconStateV2Response added in v4.2.0

type GetBeaconStateV2Response struct {
	Version             string          `json:"version"`
	ExecutionOptimistic bool            `json:"execution_optimistic"`
	Finalized           bool            `json:"finalized"`
	Data                json.RawMessage `json:"data"` // represents the state values based on the version
}

type GetForkChoiceDumpResponse added in v4.2.0

type GetForkChoiceDumpResponse struct {
	JustifiedCheckpoint *shared.Checkpoint       `json:"justified_checkpoint"`
	FinalizedCheckpoint *shared.Checkpoint       `json:"finalized_checkpoint"`
	ForkChoiceNodes     []*ForkChoiceNode        `json:"fork_choice_nodes"`
	ExtraData           *ForkChoiceDumpExtraData `json:"extra_data"`
}

type GetForkChoiceHeadsV2Response added in v4.2.0

type GetForkChoiceHeadsV2Response struct {
	Data []*ForkChoiceHead `json:"data"`
}

type Server

type Server struct {
	BeaconDB              db.ReadOnlyDatabase
	HeadFetcher           blockchain.HeadFetcher
	Stater                lookup.Stater
	OptimisticModeFetcher blockchain.OptimisticModeFetcher
	ForkFetcher           blockchain.ForkFetcher
	ForkchoiceFetcher     blockchain.ForkchoiceFetcher
	FinalizationFetcher   blockchain.FinalizationFetcher
	ChainInfoFetcher      blockchain.ChainInfoFetcher
}

Server defines a server implementation of the gRPC Beacon Chain service, providing RPC endpoints to access data relevant to the Ethereum Beacon Chain.

func (*Server) GetBeaconStateSSZ

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

GetBeaconStateSSZ returns the SSZ-serialized version of the full beacon state object for given state ID.

DEPRECATED: please use GetBeaconStateV2 instead

func (*Server) GetBeaconStateV2

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

GetBeaconStateV2 returns the full beacon state for a given state ID.

func (*Server) GetForkChoice

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

GetForkChoice returns a dump fork choice store.

func (*Server) GetForkChoiceHeadsV2 added in v4.2.0

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

GetForkChoiceHeadsV2 retrieves the leaves of the current fork choice tree.

Jump to

Keyboard shortcuts

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