frontend

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminBackend

type AdminBackend interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
	AddL2RPC(ctx context.Context, rpc string) error
}

type AdminFrontend

type AdminFrontend struct {
	Supervisor Backend
}

func (*AdminFrontend) AddL2RPC added in v1.9.3

func (a *AdminFrontend) AddL2RPC(ctx context.Context, rpc string) error

AddL2RPC adds a new L2 chain to the supervisor backend

func (*AdminFrontend) Start

func (a *AdminFrontend) Start(ctx context.Context) error

Start starts the service, if it was previously stopped.

func (*AdminFrontend) Stop

func (a *AdminFrontend) Stop(ctx context.Context) error

Stop stops the service, if it was previously started.

type Backend

type Backend interface {
	AdminBackend
	QueryBackend
	UpdatesBackend
}

type QueryBackend

type QueryBackend interface {
	CheckMessage(identifier types.Identifier, payloadHash common.Hash) (types.SafetyLevel, error)
	CheckMessages(messages []types.Message, minSafety types.SafetyLevel) error
	CrossDerivedFrom(ctx context.Context, chainID types.ChainID, derived eth.BlockID) (derivedFrom eth.BlockRef, err error)
	UnsafeView(ctx context.Context, chainID types.ChainID, unsafe types.ReferenceView) (types.ReferenceView, error)
	SafeView(ctx context.Context, chainID types.ChainID, safe types.ReferenceView) (types.ReferenceView, error)
	Finalized(ctx context.Context, chainID types.ChainID) (eth.BlockID, error)
}

type QueryFrontend

type QueryFrontend struct {
	Supervisor QueryBackend
}

func (*QueryFrontend) CheckMessage

func (q *QueryFrontend) CheckMessage(identifier types.Identifier, payloadHash common.Hash) (types.SafetyLevel, error)

CheckMessage checks the safety-level of an individual message. The payloadHash references the hash of the message-payload of the message.

func (*QueryFrontend) CheckMessages added in v1.9.1

func (q *QueryFrontend) CheckMessages(
	messages []types.Message,
	minSafety types.SafetyLevel) error

CheckMessage checks the safety-level of a collection of messages, and returns if the minimum safety-level is met for all messages.

func (*QueryFrontend) CrossDerivedFrom added in v1.9.5

func (q *QueryFrontend) CrossDerivedFrom(ctx context.Context, chainID types.ChainID, derived eth.BlockID) (derivedFrom eth.BlockRef, err error)

func (*QueryFrontend) Finalized added in v1.9.5

func (q *QueryFrontend) Finalized(ctx context.Context, chainID types.ChainID) (eth.BlockID, error)

func (*QueryFrontend) SafeView added in v1.9.5

func (*QueryFrontend) UnsafeView added in v1.9.5

func (q *QueryFrontend) UnsafeView(ctx context.Context, chainID types.ChainID, unsafe types.ReferenceView) (types.ReferenceView, error)

type UpdatesBackend added in v1.9.5

type UpdatesBackend interface {
	UpdateLocalUnsafe(ctx context.Context, chainID types.ChainID, head eth.BlockRef) error
	UpdateLocalSafe(ctx context.Context, chainID types.ChainID, derivedFrom eth.BlockRef, lastDerived eth.BlockRef) error
	UpdateFinalizedL1(ctx context.Context, chainID types.ChainID, finalized eth.BlockRef) error
}

type UpdatesFrontend added in v1.9.5

type UpdatesFrontend struct {
	Supervisor UpdatesBackend
}

func (*UpdatesFrontend) UpdateFinalizedL1 added in v1.9.5

func (u *UpdatesFrontend) UpdateFinalizedL1(ctx context.Context, chainID types.ChainID, finalized eth.BlockRef) error

func (*UpdatesFrontend) UpdateLocalSafe added in v1.9.5

func (u *UpdatesFrontend) UpdateLocalSafe(ctx context.Context, chainID types.ChainID, derivedFrom eth.BlockRef, lastDerived eth.BlockRef) error

func (*UpdatesFrontend) UpdateLocalUnsafe added in v1.9.5

func (u *UpdatesFrontend) UpdateLocalUnsafe(ctx context.Context, chainID types.ChainID, head eth.BlockRef) error

Jump to

Keyboard shortcuts

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