app

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: GPL-3.0 Imports: 74 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppAddressTCP  = "tcp://127.0.0.1:30000"
	AppAddressUNIX = "unix:///var/run/app.sock"

	PrivvalAddressTCP  = "tcp://0.0.0.0:27559"
	PrivvalAddressUNIX = "unix:///var/run/privval.sock"
	PrivvalKeyFile     = "config/priv_validator_key.json"
	PrivvalStateFile   = "data/priv_validator_state.json"
	NetworkConfigFile  = "config/network.json"
)

Variables

This section is empty.

Functions

func AVSDeploy

func AVSDeploy(ctx context.Context, def Definition) error

AVSDeploy deploys the Omni AVS contracts.

func Cleanup

func Cleanup(ctx context.Context, def Definition) error

Cleanup removes the infra containers and testnet directory.

func Create3Deploy

func Create3Deploy(ctx context.Context, def Definition, cfg Create3DeployConfig) error

Create3Deploy deploys the Omni Create3 contracts.

func Deploy

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, secrets agent.Secrets) error

E2ETest runs a full e2e test.

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

func LoadManifest(path string) (types.Manifest, error)

LoadManifest loads a manifest from disk.

func LogMetrics

func LogMetrics(ctx context.Context, def Definition) error

func MakeConfig

func MakeConfig(node *e2e.Node, nodeDir string) (*config.Config, error)

MakeConfig generates a CometBFT config for a node.

func MonitorCProvider

func MonitorCProvider(ctx context.Context, node *e2e.Node, network netconf.Network) error

func MonitorCursors

func MonitorCursors(ctx context.Context, portals map[uint64]netman.Portal, network netconf.Network) error

func NoNodesTestnet

func NoNodesTestnet(manifest types.Manifest, infd types.InfrastructureData, cfg DefinitionConfig) (types.Testnet, error)

func SendXMsgs

func SendXMsgs(ctx context.Context, 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, agentSecrets agent.Secrets, testCfg bool) error

Setup sets up the testnet configuration.

func SetupOnlyMonitor

func SetupOnlyMonitor(ctx context.Context, def Definition, agentSecrets agent.Secrets) error

func StartInitial

func StartInitial(ctx context.Context, testnet *e2e.Testnet, p infra.Provider) error

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

func StartRemaining(ctx context.Context, testnet *e2e.Testnet, p infra.Provider) error

StartRemaining starts the remaining nodes (start_at>0).

func StartSendingXMsgs

func StartSendingXMsgs(ctx context.Context, netman netman.Manager, backends ethbackend.Backends, batches ...int) <-chan error

func StartValidatorUpdates

func StartValidatorUpdates(ctx context.Context, def Definition) func() error

func Test

func Test(ctx context.Context, def Definition, deployInfo types.DeployInfos, verbose bool) error

Test runs test cases under tests/.

func TestnetFromManifest

func TestnetFromManifest(manifest types.Manifest, infd types.InfrastructureData, cfg DefinitionConfig) (types.Testnet, error)

func Upgrade

func Upgrade(ctx context.Context, def Definition) error

Upgrade generates all local artifacts, but only copies the docker-compose file to the VMs. It them calls docker-compose up.

func Wait

func Wait(ctx context.Context, testnet *e2e.Testnet, blocks int64) error

Wait waits for a number of blocks to be produced, and for all nodes to catch up with it.

func WaitAllSubmissions

func WaitAllSubmissions(ctx context.Context, portals map[uint64]netman.Portal, minimum uint64) error

func WaitUntil

func WaitUntil(ctx context.Context, testnet *e2e.Testnet, height int64) error

WaitUntil waits until a given height has been reached.

func WriteGethConfigTOML

func WriteGethConfigTOML(cfg types.GethConfig, path string) error

WriteGethConfigTOML writes the toml config to disk.

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
	Netman   netman.Manager
	Backends ethbackend.Backends
}

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)

type DefinitionConfig

type DefinitionConfig struct {
	ManifestFile  string
	InfraProvider string

	// Secrets (not required for devnet)
	DeployKeyFile  string
	RelayerKeyFile string
	FireAPIKey     string
	FireKeyPath    string
	RPCOverrides   map[string]string

	InfraDataFile string // Not required for docker provider
	OmniImgTag    string // OmniImgTag is the docker image tag used for halo and relayer.
}

DefinitionConfig is the configuration required to create a full Definition.

func DefaultDefinitionConfig

func DefaultDefinitionConfig() DefinitionConfig

DefaultDefinitionConfig returns a default configuration for a Definition.

type DeployConfig

type DeployConfig struct {
	AgentSecrets agent.Secrets
	PingPongN    uint64
	// 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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