envs

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: Apache-2.0, MIT Imports: 22 Imported by: 0

README

E2E envs

The different E2E envs found on this directory have been generated using the snapshot feature.

op-pp

This network has a single OP PP network.

  • Kurtosis commit 566ac102b9098f40475c6cc306f03e9750f2ff97
  • Kurtosis config file:
args:
  l1_electra_fork_epoch: 0
  l1_fulu_fork_epoch: 18446744073709551615

  sequencer_type: op-geth
  consensus_contract_type: ecdsa-multisig
  aggkit_image: ghcr.io/agglayer/aggkit:0.8.0

  # aggsender-validator related params (required for aggkit 0.8.0)
  use_agg_sender_validator: True
  agg_sender_validator_total_number: 1
  agg_sender_multisig_threshold: 1

  # Override additional_services to exclude bridge_spammer
  additional_services:
    - agglogger

  optimism_package:
    chains:
      "001":
        proposer_params:
          enabled: false  # ✅ No state root proposals
        batcher_params:
          max_channel_duration: 999999  # ✅ Delays batching ~11 days

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindEnvsDir

func FindEnvsDir() (string, error)

FindEnvsDir finds the envs directory dynamically Works when running from repo root (Makefile) or from test package directory (IDE)

Types

type ClientsConfig

type ClientsConfig struct {
	L1            *ethclient.Client
	L2            *ethclient.Client
	BridgeService *client.Client
}

ClientsConfig contains RPC clients

type ENVName

type ENVName string

ENVName represents a valid E2E test environment name

const (
	// EnvOpPP is a testing env that has a single OP-PP network deployed
	EnvOpPP ENVName = "op-pp"
)

type Env

type Env struct {
	L1      L1Config
	L2      L2Config
	Clients ClientsConfig
	Keys    KeysConfig
	EnvDir  string
	// contains filtered or unexported fields
}

Env represents a loaded E2E test environment

func LoadEnv

func LoadEnv(ctx context.Context, envName ENVName) (*Env, error)

LoadEnv loads an E2E test environment by name

func (*Env) CheckEnv

func (e *Env) CheckEnv(ctx context.Context) error

CheckEnv validates that the environment is correctly configured and all services are accessible. It is intended to be called as a pre-test sanity check in TestMain after loading the environment.

func (*Env) StartAggkit

func (e *Env) StartAggkit(ctx context.Context) error

StartAggkit starts the aggkit service and waits for the bridge service to be ready.

func (*Env) Stop

func (e *Env) Stop(ctx context.Context) error

Stop stops the E2E test environment by running docker compose down Only stops if this Env instance started the docker compose environment

func (*Env) StopAggkit

func (e *Env) StopAggkit(ctx context.Context) error

StopAggkit stops only the aggkit service so the test can use the aggoracle key without conflicting with the running aggkit.

type KeyPool

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

KeyPool is a mutex-guarded pool of pre-funded private keys for parallel tests

func (*KeyPool) Checkout

func (p *KeyPool) Checkout() (*bind.TransactOpts, *ecdsa.PrivateKey, error)

Checkout removes a key from the pool and returns transact opts and the key; caller must Return the key when done

func (*KeyPool) Return

func (p *KeyPool) Return(key *ecdsa.PrivateKey)

Return returns a key to the pool so it can be checked out again

type KeysConfig

type KeysConfig struct {
	L1Keys         *KeyPool
	L2Keys         *KeyPool
	AggOracle      *ecdsa.PrivateKey
	SovereignAdmin *ecdsa.PrivateKey
}

KeysConfig exposes key pools and special keys for tests

type L1Config

type L1Config struct {
	ChainID    *big.Int
	Contracts  L1Contracts
	Transactor *bind.TransactOpts
}

L1Config contains L1 network configuration

type L1Contracts

type L1Contracts struct {
	RollupManager *agglayermanager.Agglayermanager
	Bridge        *agglayerbridge.Agglayerbridge
}

L1Contracts contains initialized L1 contract bindings

type L2Config

type L2Config struct {
	ChainID    *big.Int
	NetworkID  uint32
	Contracts  L2Contracts
	Transactor *bind.TransactOpts
}

L2Config contains L2 network configuration

type L2Contracts

type L2Contracts struct {
	L2Bridge        *agglayerbridgel2.Agglayerbridgel2
	L2BridgeAddress common.Address
	GlobalExitRoot  *agglayergerl2.Agglayergerl2
}

L2Contracts contains initialized L2 contract bindings

Jump to

Keyboard shortcuts

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