chainsyncer

package
v0.0.0-...-361c26a Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type L2ChainSyncer

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

L2ChainSyncer is responsible for keeping the L2 execution engine's local chain in sync with the one in TaikoL1 contract.

func New

func New(
	ctx context.Context,
	rpc *rpc.Client,
	state *state.State,
	p2pSync bool,
	p2pSyncTimeout time.Duration,
	maxRetrieveExponent uint64,
	blobServerEndpoint *url.URL,
	socialScanEndpoint *url.URL,
) (*L2ChainSyncer, error)

New creates a new chain syncer instance.

func (*L2ChainSyncer) AheadOfHeadToSync

func (s *L2ChainSyncer) AheadOfHeadToSync(heightToSync uint64) bool

AheadOfHeadToSync checks whether the L2 chain is ahead of the head to sync in protocol.

func (*L2ChainSyncer) BeaconSyncer

func (s *L2ChainSyncer) BeaconSyncer() *beaconsync.Syncer

BeaconSyncer returns the inner beacon syncer.

func (*L2ChainSyncer) BlobSyncer

func (s *L2ChainSyncer) BlobSyncer() *blob.Syncer

BlobSyncer returns the inner blob syncer.

func (*L2ChainSyncer) Sync

func (s *L2ChainSyncer) Sync() error

Sync performs a sync operation to L2 execution engine's local chain.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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