aggoracle

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SupportedChainTypes = []TargetChainType{EVMChain}
)

Functions

This section is empty.

Types

type AggOracle

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

func New

func New(
	logger *log.Logger,
	chainSender ChainSender,
	l1Client ethereum.ChainReader,
	l1InfoTreeSyncer L1InfoTreeSyncer,
	waitPeriodNextGER time.Duration,
) (*AggOracle, error)

New creates a new AggOracle instance that will monitor the L1 info tree for new Global Exit Roots (GERs)

func (*AggOracle) Start

func (a *AggOracle) Start(ctx context.Context)

Start starts the AggOracle process that checks for new GERs and injects them if not already injected

type ChainSender

type ChainSender interface {
	IsGERInjected(ger common.Hash) (bool, error)
	InjectGER(ctx context.Context, ger common.Hash) error
	ProposeGER(ctx context.Context, ger common.Hash) error
	IsGERProposed(ger common.Hash) (bool, error)
	ProcessGER(ctx context.Context, ger common.Hash) error
}

ChainSender is an interface that defines the methods required to send Global Exit Roots (GERs) to the chain

type Config

type Config struct {
	TargetChainType          TargetChainType          `mapstructure:"TargetChainType"`
	URLRPCL1                 string                   `mapstructure:"URLRPCL1"`
	WaitPeriodNextGER        types.Duration           `mapstructure:"WaitPeriodNextGER"`
	EVMSender                chaingersender.EVMConfig `mapstructure:"EVMSender"`
	EnableAggOracleCommittee bool                     `mapstructure:"EnableAggOracleCommittee"`
}

type L1InfoTreeSyncer added in v0.7.0

type L1InfoTreeSyncer interface {
	GetLatestL1InfoLeaf(ctx context.Context) (*l1infotreesync.L1InfoTreeLeaf, error)
}

L1InfoTreeSyncer is an interface that defines the methods required to interact with the L1 info tree syncer

type TargetChainType

type TargetChainType string
const (
	EVMChain TargetChainType = "EVM"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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