interop

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: MIT, 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 InteropBackend

type InteropBackend interface {
	CheckBlock(ctx context.Context,
		chainID types.ChainID, blockHash common.Hash, blockNumber uint64) (types.SafetyLevel, error)
}

type InteropDeriver

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

InteropDeriver watches for update events (either real changes to block safety, or updates published upon request), checks if there is some local data to cross-verify, and then checks with the interop-backend, to try to promote to cross-verified safety.

func NewInteropDeriver

func NewInteropDeriver(log log.Logger, cfg *rollup.Config,
	driverCtx context.Context, backend InteropBackend, l2 L2Source) *InteropDeriver

func (*InteropDeriver) AttachEmitter

func (d *InteropDeriver) AttachEmitter(em event.Emitter)

func (*InteropDeriver) OnEvent

func (d *InteropDeriver) OnEvent(ev event.Event) bool

type L2Source

type L2Source interface {
	L2BlockRefByNumber(context.Context, uint64) (eth.L2BlockRef, error)
}

Jump to

Keyboard shortcuts

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