From 8d6afb3afdd69828a9fc03b1d3b974ce86c8b49d Mon Sep 17 00:00:00 2001 From: Nishant Das Date: Thu, 7 Apr 2022 09:52:24 +0800 Subject: [PATCH] Fix Issues From Multiclient E2E (#10486) * fix it * fix index addition * fix sync issues * make it nicer --- testing/endtoend/components/beacon_node.go | 2 +- testing/endtoend/components/eth1/node.go | 6 +++++- testing/endtoend/endtoend_test.go | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/testing/endtoend/components/beacon_node.go b/testing/endtoend/components/beacon_node.go index 57c93fb0f..bc02f73ab 100644 --- a/testing/endtoend/components/beacon_node.go +++ b/testing/endtoend/components/beacon_node.go @@ -126,7 +126,7 @@ func (node *BeaconNode) Start(ctx context.Context) error { fmt.Sprintf("--%s=%s", cmdshared.LogFileName.Name, stdOutFile.Name()), fmt.Sprintf("--%s=%s", flags.DepositContractFlag.Name, e2e.TestParams.ContractAddress.Hex()), fmt.Sprintf("--%s=%d", flags.RPCPort.Name, e2e.TestParams.Ports.PrysmBeaconNodeRPCPort+index), - fmt.Sprintf("--%s=http://127.0.0.1:%d", flags.HTTPWeb3ProviderFlag.Name, e2e.TestParams.Ports.Eth1RPCPort), + fmt.Sprintf("--%s=http://127.0.0.1:%d", flags.HTTPWeb3ProviderFlag.Name, e2e.TestParams.Ports.Eth1RPCPort+index), fmt.Sprintf("--%s=%s", flags.ExecutionJWTSecretFlag.Name, jwtPath), fmt.Sprintf("--%s=%d", flags.MinSyncPeers.Name, 1), fmt.Sprintf("--%s=%d", cmdshared.P2PUDPPort.Name, e2e.TestParams.Ports.PrysmBeaconNodeUDPPort+index), diff --git a/testing/endtoend/components/eth1/node.go b/testing/endtoend/components/eth1/node.go index db0d9a338..c2ce89b35 100644 --- a/testing/endtoend/components/eth1/node.go +++ b/testing/endtoend/components/eth1/node.go @@ -89,7 +89,11 @@ func (node *Node) Start(ctx context.Context) error { "--ipcdisable", "--verbosity=4", } - + // If we are testing sync, geth needs to be run via full sync as snap sync does not + // work in our setup. + if node.index == e2e.TestParams.BeaconNodeCount+e2e.TestParams.LighthouseBeaconNodeCount { + args = append(args, []string{"--syncmode=full"}...) + } runCmd := exec.CommandContext(ctx, binaryPath, args...) // #nosec G204 -- Safe file, err := helpers.DeleteAndCreateFile(e2e.TestParams.LogPath, "eth1_"+strconv.Itoa(node.index)+".log") if err != nil { diff --git a/testing/endtoend/endtoend_test.go b/testing/endtoend/endtoend_test.go index 281cc137b..5ca595a05 100644 --- a/testing/endtoend/endtoend_test.go +++ b/testing/endtoend/endtoend_test.go @@ -369,7 +369,7 @@ func (r *testRunner) testTxGeneration(ctx context.Context, g *errgroup.Group, ke func (r *testRunner) testBeaconChainSync(ctx context.Context, g *errgroup.Group, conns []*grpc.ClientConn, tickingStartTime time.Time, bootnodeEnr, minerEnr string) error { t, config := r.t, r.config - index := e2e.TestParams.BeaconNodeCount + index := e2e.TestParams.BeaconNodeCount + e2e.TestParams.LighthouseBeaconNodeCount ethNode := eth1.NewNode(index, minerEnr) g.Go(func() error { return ethNode.Start(ctx)