Documentation
¶
Index ¶
- Constants
- func AnvilAMD() bool
- func CleanCmds(sudo bool, isLinux bool) []string
- func Exec(ctx context.Context, args ...string) error
- func ExecCompose(ctx context.Context, dir string, args ...string) error
- func ExecComposeVerbose(ctx context.Context, dir string, args ...string) error
- func ExecEVMInit(ctx context.Context, dir string, evmInitFilename string) error
- func GenerateComposeFile(def ComposeDef) ([]byte, error)
- func GenerateOmniEVMInitFile(def ComposeDef) ([]byte, error)
- func NewInfraData(manifest types.Manifest) (types.InfrastructureData, error)
- func ReplaceUpgradeImage(dir, service string) error
- type ComposeDef
- type Provider
Constants ¶
const AnvilAMDENV = "ANVIL_AMD"
const ProviderName = "docker"
Variables ¶
This section is empty.
Functions ¶
func AnvilAMD ¶ added in v0.13.0
func AnvilAMD() bool
AnvilAMD return whether to force amd64 anvil images. It returns true by default, since this was always the default. Some MacOS however require arm64 images, devs must set ANVIL_AMD=false to use amd64.
func CleanCmds ¶
CleanCmds returns generic docker commands to clean up docker containers and networks. This bypasses the need to a specific docker-compose context.
func ExecCompose ¶
ExecCompose runs a Docker Compose command for a testnet.
func ExecComposeVerbose ¶
ExecComposeVerbose runs a Docker Compose command for a testnet and displays its output.
func GenerateComposeFile ¶
func GenerateComposeFile(def ComposeDef) ([]byte, error)
func GenerateOmniEVMInitFile ¶
func GenerateOmniEVMInitFile(def ComposeDef) ([]byte, error)
func NewInfraData ¶
func NewInfraData(manifest types.Manifest) (types.InfrastructureData, error)
NewInfraData returns a new InfrastructureData for the given manifest. In addition to normal.
func ReplaceUpgradeImage ¶
ReplaceUpgradeImage replaces the docker image of the provided service with the version specified in comments. Expected format below upgrades node0 from main v1.0 to v2.0:
services: node0: labels: e2e: true container_name: node0 image: omniops/halo:main # Upgrade node0:omniops/halo:v1.0 restart: unless-stopped
Types ¶
type ComposeDef ¶
type ComposeDef struct { Network bool NetworkName string NetworkCIDR string BindAll bool UpgradeVersion string // Halo target upgrade version GethVerbosity int // Geth log level (1=error,2=warn,3=info(default),4=debug,5=trace) GethInitTags map[int]string // Optional geth initial tags. Defaults to latest if empty. EphemeralGenesis string // Optional network upgrade to use from genesis AnvilAMD bool // Force amd64 for anvil images Nodes []*e2e.Node OmniEVMs []types.OmniEVM Anvils []types.AnvilChain Monitor bool Relayer bool Solver bool Prometheus bool MonitorTag string RelayerTag string SolverTag string AnvilProxyTag string }
func SetImageTags ¶
func SetImageTags(def ComposeDef, manifest types.Manifest, omniImgTag string) ComposeDef
SetImageTags returns a new ComposeDef with the image tags set. This is a convenience function to avoid setting the tags manually.
func (ComposeDef) CustomGenesisVar ¶ added in v0.13.0
func (c ComposeDef) CustomGenesisVar(node string) string
CustomGenesisVar returns the environment variable to set the custom genesis binary for a node or empty if not required.
func (ComposeDef) InitialGethTag ¶ added in v0.11.0
func (c ComposeDef) InitialGethTag(index int) string
InitialGethTag return the geth docker image tag to initially deploy.
func (ComposeDef) NodeOmniEVMs ¶
func (c ComposeDef) NodeOmniEVMs() map[string]string
NodeOmniEVMs returns a map of node name to OmniEVM instance name; map[node_name]omni_evm.
func (ComposeDef) UpgradeGeth ¶ added in v0.11.0
func (c ComposeDef) UpgradeGeth(index int) bool
UpgradeGeth returns true if the geth nodes should be upgraded.
func (ComposeDef) UpgradeGethTag ¶ added in v0.11.0
func (ComposeDef) UpgradeGethTag() string
UpgradeGethTag returns the geth docker image tag to upgrade to.
type Provider ¶
Provider wraps the cometBFT docker provider, writing a different compose file.
func NewProvider ¶
NewProvider returns a new Provider.
func (*Provider) Setup ¶
Setup generates the docker-compose file and write it to disk, erroring if any of these operations fail.