chainSyncer

package
v0.0.0-...-1d04f91 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 10 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 MxcL1 contract.

func New

func New(
	ctx context.Context,
	rpc *rpc.Client,
	state *state.State,
	p2pSyncVerifiedBlocks bool,
	p2pSyncTimeout time.Duration,
	signalServiceAddress common.Address,
) (*L2ChainSyncer, error)

New creates a new chain syncer instance.

func (*L2ChainSyncer) AheadOfProtocolVerifiedHead

func (s *L2ChainSyncer) AheadOfProtocolVerifiedHead() 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(l1End *types.Header) 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