Skip to content

Commit

Permalink
Fix Builder Testing For Multiclient Runs (#13091)
Browse files Browse the repository at this point in the history
  • Loading branch information
nisdas authored Oct 23, 2023
1 parent 0920fb1 commit beebb56
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
8 changes: 7 additions & 1 deletion testing/endtoend/component_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,13 @@ func (c *componentHandler) setup() {
if multiClientActive {
lighthouseNodes = components.NewLighthouseBeaconNodes(config)
g.Go(func() error {
if err := helpers.ComponentsStarted(ctx, []e2etypes.ComponentRunner{eth1Nodes, proxies, bootNode, beaconNodes}); err != nil {
wantedComponents := []e2etypes.ComponentRunner{eth1Nodes, bootNode, beaconNodes}
if config.UseBuilder {
wantedComponents = append(wantedComponents, builders)
} else {
wantedComponents = append(wantedComponents, proxies)
}
if err := helpers.ComponentsStarted(ctx, wantedComponents); err != nil {
return errors.Wrap(err, "lighthouse beacon nodes require proxies, execution, beacon and boot node to run")
}
lighthouseNodes.SetENR(bootNode.ENR())
Expand Down
3 changes: 3 additions & 0 deletions testing/endtoend/components/lighthouse_beacon.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ func (node *LighthouseBeaconNode) Start(ctx context.Context) error {
args = append(args,
fmt.Sprintf("--trusted-peers=%s", flagVal))
}
if node.config.UseBuilder {
args = append(args, fmt.Sprintf("--builder=%s:%d", "http://127.0.0.1", e2e.TestParams.Ports.Eth1ProxyPort+prysmNodeCount+index))
}
cmd := exec.CommandContext(ctx, binaryPath, args...) /* #nosec G204 */
// Write stderr to log files.
stderr, err := os.Create(path.Join(e2e.TestParams.LogPath, fmt.Sprintf("lighthouse_beacon_node_%d_stderr.log", index)))
Expand Down
4 changes: 4 additions & 0 deletions testing/endtoend/components/lighthouse_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ func (v *LighthouseValidatorNode) Start(ctx context.Context) error {
"--suggested-fee-recipient=0x878705ba3f8bc32fcf7f4caa1a35e72af65cf766",
}

if v.config.UseBuilder {
args = append(args, "--builder-proposals")
}

cmd := exec.CommandContext(ctx, binaryPath, args...) // #nosec G204 -- Safe

// Write stderr to log files.
Expand Down

0 comments on commit beebb56

Please sign in to comment.