chainsyncer

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: 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,
	p2pSyncVerifiedBlocks bool,
	p2pSyncTimeout time.Duration,
	maxRetrieveExponent uint64,
	blobServerEndpoint *url.URL,

) (*L2ChainSyncer, error)

New creates a new chain syncer instance.

func (*L2ChainSyncer) AheadOfProtocolVerifiedHead

func (s *L2ChainSyncer) AheadOfProtocolVerifiedHead(verifiedHeightToCompare uint64) bool

AheadOfProtocolVerifiedHead checks whether the L2 chain is ahead of verified head in protocol.

func (*L2ChainSyncer) BeaconSyncer

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

BeaconSyncer returns the inner beacon syncer.

func (*L2ChainSyncer) CalldataSyncer

func (s *L2ChainSyncer) CalldataSyncer() *calldata.Syncer

CalldataSyncer returns the inner calldata 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