diff --git a/e2e/app/setup.go b/e2e/app/setup.go index 8f3d4a956..467044913 100644 --- a/e2e/app/setup.go +++ b/e2e/app/setup.go @@ -101,10 +101,8 @@ func Setup(ctx context.Context, def Definition, depCfg DeployConfig) error { } logCfg := logConfig(def) - if def.Testnet.HasArchiveNode() { - if err := writeMonitorConfig(ctx, def, logCfg, valPrivKeys); err != nil { - return err - } + if err := writeMonitorConfig(ctx, def, logCfg, valPrivKeys); err != nil { + return err } if err := writeRelayerConfig(ctx, def, logCfg); err != nil { @@ -489,10 +487,15 @@ func writeRelayerConfig(ctx context.Context, def Definition, logCfg log.Config) return errors.Wrap(err, "write private key") } + archiveNode, ok := def.Testnet.ArchiveNode() + if !ok { + return errors.New("archive node not found") + } + relayCfg := relayapp.DefaultConfig() relayCfg.PrivateKey = privKeyFile relayCfg.Network = def.Testnet.Network - relayCfg.HaloURL = def.Testnet.RandomHaloAddr() + relayCfg.HaloURL = archiveNode.AddressRPC() relayCfg.RPCEndpoints = endpoints if err := relayapp.WriteConfigTOML(relayCfg, logCfg, filepath.Join(confRoot, configFile)); err != nil { diff --git a/e2e/docker/docker.go b/e2e/docker/docker.go index 8c30c9b21..b89a179d1 100644 --- a/e2e/docker/docker.go +++ b/e2e/docker/docker.go @@ -271,10 +271,7 @@ func additionalServices(testnet types.Testnet) []string { resp = append(resp, "prometheus") } - // Monitor must connect to an archive node. - if testnet.HasArchiveNode() { - resp = append(resp, "monitor") - } + resp = append(resp, "monitor") // In monitor only mode, we only start monitor and prometheus. if testnet.OnlyMonitor { diff --git a/e2e/manifests/devnet0.toml b/e2e/manifests/devnet0.toml index a17a15bc5..873aa3561 100644 --- a/e2e/manifests/devnet0.toml +++ b/e2e/manifests/devnet0.toml @@ -1,7 +1,10 @@ -# Devnet0 is a tiny devnet. Only a single validator and two anvils. +# Devnet0 is a tiny devnet. Only a single validator, an archive node (for the relayer), and two anvils. # This is aimed at local dev environments. network = "devnet" anvil_chains = ["mock_op", "mock_arb"] [node.validator01] + +[node.fullnode01] +mode="archive" diff --git a/e2e/types/testnet.go b/e2e/types/testnet.go index ab22fec88..b6caf084f 100644 --- a/e2e/types/testnet.go +++ b/e2e/types/testnet.go @@ -107,17 +107,6 @@ func (t Testnet) BroadcastNode() *e2e.Node { return t.Nodes[0] } -// HasArchiveNode returns whether the Testnet has any nodes running in ModeArchive. -func (t Testnet) HasArchiveNode() bool { - for _, node := range t.Nodes { - if node.Mode == ModeArchive { - return true - } - } - - return false -} - // ArchiveNode returns the first node running in ModeArchive. // Note that this is different from the CometBFT Testnet.ArchiveNodes() method. func (t Testnet) ArchiveNode() (*e2e.Node, bool) {