Help us shape the future of Go! Take the 2026 Go Developer Survey

aggoracle

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0, MIT Imports: 10 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 types.EthChainReader,
	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"`
	WaitPeriodNextGER        types.Duration           `mapstructure:"WaitPeriodNextGER"`
	EVMSender                chaingersender.EVMConfig `mapstructure:"EVMSender"`
	EnableAggOracleCommittee bool                     `mapstructure:"EnableAggOracleCommittee"`
}

type L1InfoTreeSyncer added in v0.7.0

type L1InfoTreeSyncer interface {
	GetLatestL1InfoGER(ctx context.Context) (common.Hash, 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