debug

package
v4.0.0-...-b8b0360 Latest Latest
Warning

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

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

Documentation

Overview

Package debug defines a gRPC server implementation of a debugging service which allows for helpful endpoints to debug a beacon node at runtime, this server is gated behind the feature flag --enable-debug-rpc-endpoints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	BeaconDB           db.NoHeadAccessDatabase
	GenesisTimeFetcher blockchain.TimeFetcher
	StateGen           *stategen.State
	HeadFetcher        blockchain.HeadFetcher
	PeerManager        p2p.PeerManager
	PeersFetcher       p2p.PeersProvider
	ReplayerBuilder    stategen.ReplayerBuilder
}

Server defines a server implementation of the gRPC Debug service, providing RPC endpoints for runtime debugging of a node, this server is gated behind the feature flag --enable-debug-rpc-endpoints.

func (*Server) GetBeaconState

func (ds *Server) GetBeaconState(
	ctx context.Context,
	req *pbrpc.BeaconStateRequest,
) (*pbrpc.SSZResponse, error)

GetBeaconState retrieves an ssz-encoded beacon state from the beacon node by either a slot or block root.

func (*Server) GetBlock

func (ds *Server) GetBlock(
	ctx context.Context,
	req *pbrpc.BlockRequestByRoot,
) (*pbrpc.SSZResponse, error)

GetBlock in an ssz-encoded format by block root.

func (*Server) GetInclusionSlot

func (ds *Server) GetInclusionSlot(ctx context.Context, req *pbrpc.InclusionSlotRequest) (*pbrpc.InclusionSlotResponse, error)

GetInclusionSlot of an attestation in block.

func (*Server) GetPeer

func (ds *Server) GetPeer(_ context.Context, peerReq *zondpb.PeerRequest) (*zondpb.DebugPeerResponse, error)

GetPeer returns the data known about the peer defined by the provided peer id.

func (*Server) ListPeers

func (ds *Server) ListPeers(_ context.Context, _ *empty.Empty) (*zondpb.DebugPeerResponses, error)

ListPeers returns all peers known to the host node, regardless of if they are connected/ disconnected.

func (*Server) SetLoggingLevel

func (_ *Server) SetLoggingLevel(_ context.Context, req *pbrpc.LoggingLevelRequest) (*empty.Empty, error)

SetLoggingLevel of a beacon node according to a request type, either INFO, DEBUG, or TRACE.

Jump to

Keyboard shortcuts

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