rpc

package
v0.0.0-...-92d349b Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconRpcP2P

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

BeaconRpcP2P represents a beacon chain RPC client.

func NewBeaconRpcP2P

func NewBeaconRpcP2P(ctx context.Context, sentinel sentinel.SentinelClient, beaconConfig *clparams.BeaconChainConfig, genesisConfig *clparams.GenesisConfig) *BeaconRpcP2P

NewBeaconRpcP2P creates a new BeaconRpcP2P struct and returns a pointer to it. It takes a context, a sentinel.Sent

func (*BeaconRpcP2P) Peers

func (b *BeaconRpcP2P) Peers() (uint64, error)

Peers retrieves peer count.

func (*BeaconRpcP2P) PropagateBlock

func (b *BeaconRpcP2P) PropagateBlock(block *cltypes.SignedBeaconBlock) error

func (*BeaconRpcP2P) SendBeaconBlocksByRangeReq

func (b *BeaconRpcP2P) SendBeaconBlocksByRangeReq(start, count uint64) ([]*cltypes.SignedBeaconBlock, error)

SendBeaconBlocksByRangeReq retrieves blocks range from beacon chain.

func (*BeaconRpcP2P) SendBeaconBlocksByRootReq

func (b *BeaconRpcP2P) SendBeaconBlocksByRootReq(roots [][32]byte) ([]*cltypes.SignedBeaconBlock, error)

SendBeaconBlocksByRootReq retrieves blocks by root from beacon chain.

func (*BeaconRpcP2P) SendLightClientBootstrapReqV1

func (b *BeaconRpcP2P) SendLightClientBootstrapReqV1(root libcommon.Hash) (*cltypes.LightClientBootstrap, error)

SendLightClientBootstrapReqV1 sends a request for a LightClientBootstrap message to a beacon chain node. It returns a LightClientBootstrap struct or an error if one occurred.

func (*BeaconRpcP2P) SendLightClientFinaltyUpdateReqV1

func (b *BeaconRpcP2P) SendLightClientFinaltyUpdateReqV1() (*cltypes.LightClientFinalityUpdate, error)

SendLightClientFinalityUpdateReqV1 sends a request for a LightClientFinalityUpdate message to a beacon chain node. It returns a LightClientFinalityUpdate struct or an error if one occurred.

func (*BeaconRpcP2P) SendLightClientOptimisticUpdateReqV1

func (b *BeaconRpcP2P) SendLightClientOptimisticUpdateReqV1() (*cltypes.LightClientOptimisticUpdate, error)

SendLightClientOptimisticUpdateReqV1 sends a request for a LightClientOptimisticUpdate message to a beacon chain node. It returns a LightClientOptimisticUpdate struct or an error if one occurred.

func (*BeaconRpcP2P) SendLightClientUpdatesReqV1

func (b *BeaconRpcP2P) SendLightClientUpdatesReqV1(period uint64) (*cltypes.LightClientUpdate, error)

SendLightClientUpdatesReqV1 retrieves one lightclient update.

func (*BeaconRpcP2P) SetStatus

func (b *BeaconRpcP2P) SetStatus(finalizedRoot libcommon.Hash, finalizedEpoch uint64, headRoot libcommon.Hash, headSlot uint64) error

Jump to

Keyboard shortcuts

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