rpc

package
v1.22.7 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StreamBlockEvent               uint16 = 0x01
	StreamHeadEvent                uint16 = 0x02
	StreamFinalizedEvent           uint16 = 0x04
	StreamExecutionPayloadEvent    uint16 = 0x08
	StreamExecutionPayloadBidEvent uint16 = 0x10
	StreamInclusionListEvent       uint16 = 0x20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconClient

type BeaconClient struct {
	// contains filtered or unexported fields
}

func NewBeaconClient

func NewBeaconClient(name, endpoint string, headers map[string]string, sshcfg *sshtunnel.SshConfig, disableSSZ bool, logger logrus.FieldLogger) (*BeaconClient, error)

NewBeaconClient is used to create a new beacon client

func (*BeaconClient) GetBlobSidecarsByBlockroot

func (bc *BeaconClient) GetBlobSidecarsByBlockroot(ctx context.Context, blockroot []byte) ([]*deneb.BlobSidecar, error)

func (*BeaconClient) GetBlobsByBlockroot added in v1.19.9

func (bc *BeaconClient) GetBlobsByBlockroot(ctx context.Context, blockroot []byte) ([]*deneb.Blob, error)

func (*BeaconClient) GetBlockBodyByBlockroot

func (bc *BeaconClient) GetBlockBodyByBlockroot(ctx context.Context, blockroot phase0.Root) (*all.SignedBeaconBlock, error)

func (*BeaconClient) GetBlockHeaderByBlockroot

func (bc *BeaconClient) GetBlockHeaderByBlockroot(ctx context.Context, blockroot phase0.Root) (*v1.BeaconBlockHeader, error)

func (*BeaconClient) GetBlockHeaderBySlot

func (bc *BeaconClient) GetBlockHeaderBySlot(ctx context.Context, slot phase0.Slot) (*v1.BeaconBlockHeader, error)

func (*BeaconClient) GetConfigSpecs

func (bc *BeaconClient) GetConfigSpecs(ctx context.Context) (map[string]interface{}, error)

func (*BeaconClient) GetExecutionPayloadByBlockroot added in v1.21.0

func (bc *BeaconClient) GetExecutionPayloadByBlockroot(ctx context.Context, blockroot phase0.Root) (*all.SignedExecutionPayloadEnvelope, error)

func (*BeaconClient) GetExecutionProofsByBlockroot added in v1.21.0

func (bc *BeaconClient) GetExecutionProofsByBlockroot(ctx context.Context, blockroot []byte) (*ExecutionProofsResponse, error)

func (*BeaconClient) GetFinalityCheckpoints

func (bc *BeaconClient) GetFinalityCheckpoints(ctx context.Context) (*v1.Finality, error)

func (*BeaconClient) GetForkState

func (bc *BeaconClient) GetForkState(ctx context.Context, stateRef string) (*phase0.Fork, error)

func (*BeaconClient) GetGenesis

func (bc *BeaconClient) GetGenesis(ctx context.Context) (*v1.Genesis, error)

func (*BeaconClient) GetLatestBlockHead

func (bc *BeaconClient) GetLatestBlockHead(ctx context.Context) (*v1.BeaconBlockHeader, error)

func (*BeaconClient) GetNodeIdentity added in v1.11.2

func (bc *BeaconClient) GetNodeIdentity(ctx context.Context) (*NodeIdentity, error)

func (*BeaconClient) GetNodePeers

func (bc *BeaconClient) GetNodePeers(ctx context.Context) ([]*v1.Peer, error)

func (*BeaconClient) GetNodeSyncStatus

func (bc *BeaconClient) GetNodeSyncStatus(ctx context.Context) (*SyncStatus, error)

func (*BeaconClient) GetNodeSyncing

func (bc *BeaconClient) GetNodeSyncing(ctx context.Context) (*v1.SyncState, error)

func (*BeaconClient) GetNodeVersion

func (bc *BeaconClient) GetNodeVersion(ctx context.Context) (string, error)

func (*BeaconClient) GetState

func (bc *BeaconClient) GetState(ctx context.Context, stateRef string) (*all.BeaconState, error)

func (*BeaconClient) Initialize

func (bc *BeaconClient) Initialize(ctx context.Context) error

func (*BeaconClient) NewBlockStream

func (bc *BeaconClient) NewBlockStream(ctx context.Context, logger logrus.FieldLogger, events uint16) *BeaconStream

func (*BeaconClient) SubmitAttesterSlashing

func (bc *BeaconClient) SubmitAttesterSlashing(ctx context.Context, slashing *phase0.AttesterSlashing) error

func (*BeaconClient) SubmitBLSToExecutionChanges

func (bc *BeaconClient) SubmitBLSToExecutionChanges(ctx context.Context, blsChanges []*capella.SignedBLSToExecutionChange) error

func (*BeaconClient) SubmitProposerSlashing

func (bc *BeaconClient) SubmitProposerSlashing(ctx context.Context, slashing *phase0.ProposerSlashing) error

func (*BeaconClient) SubmitVoluntaryExits

func (bc *BeaconClient) SubmitVoluntaryExits(ctx context.Context, exit *phase0.SignedVoluntaryExit) error

type BeaconStream

type BeaconStream struct {
	ReadyChan chan *BeaconStreamStatus
	EventChan chan *BeaconStreamEvent
	// contains filtered or unexported fields
}

func (*BeaconStream) Close

func (bs *BeaconStream) Close()

func (*BeaconStream) UpdateEvents added in v1.21.0

func (bs *BeaconStream) UpdateEvents(events uint16)

UpdateEvents opens SSE requests for any new event bits without restarting already-running streams. Additive only.

type BeaconStreamEvent

type BeaconStreamEvent struct {
	Event uint16
	Data  interface{}
}

type BeaconStreamStatus

type BeaconStreamStatus struct {
	Ready bool
	Error error
}

type ExecutionProof added in v1.21.0

type ExecutionProof struct {
	Message        ExecutionProofMessage `json:"message"`
	ValidatorIndex string                `json:"validator_index"`
	Signature      string                `json:"signature"`
}

ExecutionProof represents a signed cryptographic proof attesting that an execution payload is valid, as returned by the Lighthouse /eth/v1/beacon/execution_proofs/{block_root} endpoint.

type ExecutionProofMessage added in v1.21.1

type ExecutionProofMessage struct {
	// Which proof type (zkVM+EL combination) this proof belongs to.
	ProofType uint8 `json:"proof_type"`

	// Hex-encoded proof bytes (e.g. "0x...").
	ProofData string `json:"proof_data"`

	// Public input the proof commits to.
	PublicInput ExecutionProofPublicInput `json:"public_input"`
}

ExecutionProofMessage is the inner message of an ExecutionProof.

type ExecutionProofPublicInput added in v1.21.1

type ExecutionProofPublicInput struct {
	NewPayloadRequestRoot string `json:"new_payload_request_root"`
}

ExecutionProofPublicInput is the public input committed to by an execution proof.

type ExecutionProofsResponse added in v1.21.0

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

ExecutionProofsResponse represents the API response for execution proofs

type NodeIdentity added in v1.11.2

type NodeIdentity struct {
	PeerID             string   `json:"peer_id"`
	Enr                string   `json:"enr"`
	P2PAddresses       []string `json:"p2p_addresses"`
	DiscoveryAddresses []string `json:"discovery_addresses"`
	Metadata           struct {
		Attnets           string      `json:"attnets"`
		Syncnets          string      `json:"syncnets"`
		SeqNumber         interface{} `json:"seq_number"`                    // Can be string or int depending on client
		CustodyGroupCount interface{} `json:"custody_group_count,omitempty"` // MetadataV3 field for Fulu
	} `json:"metadata"`
}

type SyncStatus

type SyncStatus struct {
	IsSyncing                bool
	IsOptimistic             bool
	HeadSlot                 uint64
	EstimatedHighestHeadSlot uint64
	SyncDistance             uint64
}

func NewSyncStatus

func NewSyncStatus(state *v1.SyncState) SyncStatus

func (*SyncStatus) Percent

func (s *SyncStatus) Percent() float64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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