Documentation ¶
Index ¶
- Constants
- Variables
- func CleanInfra(ctx context.Context, def Definition) error
- func CleanupDir(ctx context.Context, dir string) error
- func Create3Deploy(ctx context.Context, def Definition, cfg Create3DeployConfig) error
- func Deploy(ctx context.Context, def Definition, cfg DeployConfig) (*pingpong.XDapp, error)
- func E2ETest(ctx context.Context, def Definition, cfg E2ETestConfig) error
- func FundEOAAccounts(ctx context.Context, def Definition, dryRun bool) error
- func FundValidatorsForTesting(ctx context.Context, def Definition) error
- func LoadManifest(path string) (types.Manifest, error)
- func LogMetrics(ctx context.Context, def Definition) error
- func MakeConfig(network netconf.ID, node *e2e.Node, nodeDir string) (*config.Config, error)
- func MonitorCProvider(ctx context.Context, node *e2e.Node, network netconf.Network) error
- func MonitorCursors(ctx context.Context, portals map[uint64]netman.Portal, network netconf.Network) error
- func NoNodesTestnet(manifest types.Manifest, infd types.InfrastructureData, cfg DefinitionConfig) (types.Testnet, error)
- func SendXMsgs(ctx context.Context, network netconf.ID, netman netman.Manager, ...) error
- func Setup(ctx context.Context, def Definition, depCfg DeployConfig) error
- func SetupOnlyMonitor(ctx context.Context, def Definition) error
- func StartInitial(ctx context.Context, testnet *e2e.Testnet, p infra.Provider) error
- func StartMonitoringReceipts(ctx context.Context, def Definition) func() error
- func StartRemaining(ctx context.Context, testnet *e2e.Testnet, p infra.Provider) error
- func StartSendingXMsgs(ctx context.Context, network netconf.ID, netman netman.Manager, ...) <-chan error
- func StartValidatorUpdates(ctx context.Context, def Definition) func() error
- func Test(ctx context.Context, def Definition, verbose bool) error
- func TestnetFromManifest(ctx context.Context, manifest types.Manifest, infd types.InfrastructureData, ...) (types.Testnet, error)
- func Upgrade(ctx context.Context, def Definition, cfg DeployConfig, ...) error
- func Wait(ctx context.Context, testnet *e2e.Testnet, blocks int64) error
- func WaitAllSubmissions(ctx context.Context, network netconf.Network, portals map[uint64]netman.Portal, ...) error
- func WaitUntil(ctx context.Context, testnet *e2e.Testnet, height int64) error
- type BridgeTest
- type Create3DeployConfig
- type Definition
- type DefinitionConfig
- type DeployConfig
- type E2ETestConfig
Constants ¶
const ( AppAddressTCP = "tcp://127.0.0.1:30000" AppAddressUNIX = "unix:///var/run/app.sock" PrivvalKeyFile = "config/priv_validator_key.json" PrivvalStateFile = "data/priv_validator_state.json" )
const ( EnvInfraType = "INFRASTRUCTURE_TYPE" EnvInfraFile = "INFRASTRUCTURE_FILE" EnvE2EManifest = "E2E_MANIFEST" EnvE2ENode = "E2E_NODE" EnvE2ERPCEndpoints = "E2E_RPC_ENDPOINTS" EnvE2EDeployInfo = "E2E_DEPLOY_INFO" )
Variables ¶
var ToL1BridgeTests = []BridgeTest{ { To: common.HexToAddress("0x1111111111111111111111111111111111111111"), Amount: ether(100), }, { To: common.HexToAddress("0x2222222222222222222222222222222222222222"), Amount: ether(100), }, { To: common.HexToAddress("0x3333333333333333333333333333333333333333"), Amount: ether(100), }, }
var ToNativeBridgeTests = []BridgeTest{ { To: common.HexToAddress("0x1111111111111111111111111111111111111111"), Amount: ether(1000), }, { To: common.HexToAddress("0x2222222222222222222222222222222222222222"), Amount: ether(1000), }, { To: common.HexToAddress("0x3333333333333333333333333333333333333333"), Amount: ether(1000), }, }
Functions ¶
func CleanInfra ¶
func CleanInfra(ctx context.Context, def Definition) error
CleanInfra stops and removes the infra containers.
func CleanupDir ¶
CleanupDir cleans up a testnet directory.
func Create3Deploy ¶
func Create3Deploy(ctx context.Context, def Definition, cfg Create3DeployConfig) error
Create3Deploy deploys the Omni Create3 contracts.
func Deploy ¶
func Deploy(ctx context.Context, def Definition, cfg DeployConfig) (*pingpong.XDapp, error)
Deploy a new e2e network. It also starts all services in order to deploy private portals. It also returns an optional deployed ping pong contract is enabled.
func E2ETest ¶
func E2ETest(ctx context.Context, def Definition, cfg E2ETestConfig) error
E2ETest runs a full e2e test.
func FundEOAAccounts ¶ added in v0.1.4
func FundEOAAccounts(ctx context.Context, def Definition, dryRun bool) error
FundEOAAccounts funds the EOAs that need funding to their target balance.
func FundValidatorsForTesting ¶
func FundValidatorsForTesting(ctx context.Context, def Definition) error
FundValidatorsForTesting funds validators in ephemeral networks: devnet and staging. This is required by load generation for periodic validator self-delegation.
func LoadManifest ¶
LoadManifest loads a manifest from disk.
func LogMetrics ¶
func LogMetrics(ctx context.Context, def Definition) error
func MakeConfig ¶
MakeConfig generates a CometBFT config for a node.
func MonitorCProvider ¶
func MonitorCursors ¶
func NoNodesTestnet ¶
func NoNodesTestnet(manifest types.Manifest, infd types.InfrastructureData, cfg DefinitionConfig) (types.Testnet, error)
func SendXMsgs ¶
func SendXMsgs(ctx context.Context, network netconf.ID, netman netman.Manager, backends ethbackend.Backends, count int) error
SendXMsgs sends <count> xmsgs from every chain to every other chain, then waits for them to be mined.
func Setup ¶
func Setup(ctx context.Context, def Definition, depCfg DeployConfig) error
Setup sets up the testnet configuration.
func SetupOnlyMonitor ¶
func SetupOnlyMonitor(ctx context.Context, def Definition) error
func StartInitial ¶
StartInitial starts the initial nodes (start_at==0).
func StartMonitoringReceipts ¶
func StartMonitoringReceipts(ctx context.Context, def Definition) func() error
StartMonitoringReceipts starts goroutines that streams all xblock receipts ensuring all are successful. It returns a stopfunc that returns an error if any failed receipt was detected before the stopfunc was called.
func StartRemaining ¶
StartRemaining starts the remaining nodes (start_at>0).
func StartSendingXMsgs ¶
func StartValidatorUpdates ¶
func StartValidatorUpdates(ctx context.Context, def Definition) func() error
func Test ¶
func Test(ctx context.Context, def Definition, verbose bool) error
Test runs test cases under tests/.
func TestnetFromManifest ¶
func TestnetFromManifest(ctx context.Context, manifest types.Manifest, infd types.InfrastructureData, cfg DefinitionConfig) (types.Testnet, error)
func Upgrade ¶
func Upgrade(ctx context.Context, def Definition, cfg DeployConfig, upgradeCfg types.UpgradeConfig) error
Upgrade generates all local artifacts, but only copies the docker-compose file to the VMs. It them calls docker-compose up.
func Wait ¶
Wait waits for a number of blocks to be produced, and for all nodes to catch up with it.
func WaitAllSubmissions ¶
Types ¶
type Create3DeployConfig ¶
type Create3DeployConfig struct {
ChainID uint64 // chain id of the chain to deploy to
}
func (Create3DeployConfig) Validate ¶
func (cfg Create3DeployConfig) Validate() error
Validate validates the Create3DeployConfig.
type Definition ¶
type Definition struct { Manifest types.Manifest Testnet types.Testnet // Note that testnet is the cometBFT term. Infra types.InfraProvider Cfg DefinitionConfig // Original config used to construct the Definition. // contains filtered or unexported fields }
Definition defines a e2e network. All (sub)commands of the e2e cli requires a definition operate. Armed with a definition, a e2e network can be deployed, started, tested, stopped, etc.
func MakeDefinition ¶
func MakeDefinition(ctx context.Context, cfg DefinitionConfig, commandName string) (Definition, error)
func (Definition) Backends ¶
func (d Definition) Backends() ethbackend.Backends
Backends returns the backends.
func (Definition) DeployInfos ¶
func (d Definition) DeployInfos() types.DeployInfos
DeployInfos returns the deploy information of the OmniPortal and OmniAVS contracts.
func (Definition) InitLazyNetwork ¶
func (d Definition) InitLazyNetwork() error
InitLazyNetwork initializes the lazy network, which is the backends and netman.
type DefinitionConfig ¶
type DefinitionConfig struct { AgentSecrets agent.Secrets ManifestFile string InfraProvider string // Secrets (not required for devnet) DeployKeyFile string FireAPIKey string FireKeyPath string RPCOverrides map[string]string // map[chainName]rpcURL1,rpcURL2,... InfraDataFile string // Not required for docker provider OmniImgTag string // OmniImgTag is the docker image tag used for halo and relayer. TracingEndpoint string TracingHeaders string }
DefinitionConfig is the configuration required to create a full Definition.
func DefaultDefinitionConfig ¶
func DefaultDefinitionConfig(ctx context.Context) DefinitionConfig
DefaultDefinitionConfig returns a default configuration for a Definition.
type DeployConfig ¶
type DeployConfig struct { PingPongN uint64 // Number of hops per ping pong. PingPongP uint64 // Number of parallel ping pongs to start per edge. PingPongL uint64 // Number of parallel ping pongs to use Latest confirmation level. // contains filtered or unexported fields }
func DefaultDeployConfig ¶
func DefaultDeployConfig() DeployConfig
type E2ETestConfig ¶
type E2ETestConfig struct {
Preserve bool
}
E2ETestConfig is the configuration required to run a full e2e test.
func DefaultE2ETestConfig ¶
func DefaultE2ETestConfig() E2ETestConfig
DefaultE2ETestConfig returns a default configuration for a e2e test.