checkpoint_sync

package
v1.9.7-0...-ba03429 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadOrFetchLatestBeaconState

func ReadOrFetchLatestBeaconState(ctx context.Context, dirs datadir.Dirs, beaconCfg *clparams.BeaconChainConfig, caplinConfig clparams.CaplinConfig, genesisDB genesisdb.GenesisDB) (*state.CachingBeaconState, error)

ReadOrFetchLatestBeaconState reads the latest beacon state from disk or fetches it from the network.

Types

type CheckpointSyncer

type CheckpointSyncer interface {
	GetLatestBeaconState(ctx context.Context) (*state.CachingBeaconState, error)
}

func NewLocalCheckpointSyncer

func NewLocalCheckpointSyncer(genesisState *state.CachingBeaconState, dir afero.Fs) CheckpointSyncer

The local checkpoint syncer, loads a checkpoint from the local disk or uses the genesis state.

func NewRemoteCheckpointSync

func NewRemoteCheckpointSync(beaconConfig *clparams.BeaconChainConfig, net clparams.NetworkType) CheckpointSyncer

type LocalCheckpointSyncer

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

func (*LocalCheckpointSyncer) GetLatestBeaconState

func (l *LocalCheckpointSyncer) GetLatestBeaconState(ctx context.Context) (*state.CachingBeaconState, error)

type RemoteCheckpointSync

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

RemoteCheckpointSync is a CheckpointSyncer that fetches the checkpoint state from a remote endpoint.

func (*RemoteCheckpointSync) GetLatestBeaconState

func (r *RemoteCheckpointSync) GetLatestBeaconState(ctx context.Context) (*state.CachingBeaconState, error)

Jump to

Keyboard shortcuts

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