frontend

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 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
}

type QueryBackend

type QueryBackend interface {
	CheckMessage(identifier types.Identifier, payloadHash common.Hash) (types.SafetyLevel, error)
	CheckMessages(messages []types.Message, minSafety types.SafetyLevel) error
	CheckBlock(chainID *hexutil.U256, blockHash common.Hash, blockNumber hexutil.Uint64) (types.SafetyLevel, error)
}

type QueryFrontend

type QueryFrontend struct {
	Supervisor QueryBackend
}

func (*QueryFrontend) CheckBlock

func (q *QueryFrontend) CheckBlock(chainID *hexutil.U256, blockHash common.Hash, blockNumber hexutil.Uint64) (types.SafetyLevel, error)

CheckBlock checks the safety-level of an L2 block as a whole.

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.

Jump to

Keyboard shortcuts

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