lightclient

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, Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const MinSyncCommitteeParticipants = 1

Variables

View Source
var DomainSyncCommittee = common.Hex2Bytes("07000000")

Functions

This section is empty.

Types

type ChainTipSubscriber

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

ChainTipSubscriber tells us what are the newly received gossip arguments

func NewChainTipSubscriber

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

func (*ChainTipSubscriber) GetLastBlock

func (c *ChainTipSubscriber) GetLastBlock() *cltypes.BeaconBlock

func (*ChainTipSubscriber) PopLastUpdate

func (c *ChainTipSubscriber) PopLastUpdate() *cltypes.LightClientUpdate

func (*ChainTipSubscriber) StartLoop

func (c *ChainTipSubscriber) StartLoop()

type LightClient

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

func NewLightClient

func NewLightClient(ctx context.Context, genesisConfig *clparams.GenesisConfig, beaconConfig *clparams.BeaconChainConfig,
	execution remote.ETHBACKENDServer, executionClient remote.ETHBACKENDClient, sentinel sentinel.SentinelClient,
	highestSeen uint64, verbose bool) (*LightClient, error)

func (*LightClient) BootstrapCheckpoint

func (l *LightClient) BootstrapCheckpoint(ctx context.Context, finalized [32]byte) error

func (*LightClient) FetchUpdate

func (l *LightClient) FetchUpdate(ctx context.Context, period uint64) (*cltypes.LightClientUpdate, error)

func (*LightClient) Start

func (l *LightClient) Start()

type LightClientStore

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

func NewLightClientStore

func NewLightClientStore(trustedRoot [32]byte, bootstrap *cltypes.LightClientBootstrap) (*LightClientStore, error)

* A light client maintains its state in a store object of type LightClientStore. * initialize_light_client_store initializes a new store with a * received LightClientBootstrap derived from a given trusted_block_root.

Jump to

Keyboard shortcuts

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