Skip to content

Select the builder's roles from the supplied configs - #528

Open
0w3n-d wants to merge 1 commit into
developfrom
od/builder-sim-role-step1
Open

Select the builder's roles from the supplied configs#528
0w3n-d wants to merge 1 commit into
developfrom
od/builder-sim-role-step1

Conversation

@0w3n-d

@0w3n-d 0w3n-d commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Issue: #527 (step 1 of 10)

What this PR does

Gives helix-builder a second selectable role: simulation. Roles come from
which config file is supplied. --merging.config activates merging and is now
optional, the new --sim.config activates simulation, and neither is a startup
error. The relay signer loads only for merging, so a simulation-only deployment
needs no RELAY_KEY.

BuilderSpine::start blocks until its tiles stop, so merging still starts last.
Merging-only behavior is unchanged.

What this PR deliberately does not do

No validation work. The simulation role boots the node, logs its listen
addresses, and stops. The servers arrive in step 9 and the ethrex pipeline in
steps 3 to 8, so SimulationConfig is parsed but not yet consumed.

Tests

Written first and signed off before implementation
(crates/builder/src/config.rs, simulation_config_tests, 8 tests):

  • sim-config.example.yml parses; a minimal config gets its defaults.
  • ssz_addr equal to rpc_addr is rejected.
  • All four rows of the role table. The simulation-only case asserts no merging
    role, which is the observable form of "no RELAY_KEY needed".

Smoke-tested on the binary: no config errors before the node boots;
--sim.config with RELAY_KEY unset logs Simulation role active.

just fmt-check, just test and cargo clippy --all-features --no-deps -- -D warnings
are clean. cargo clippy -p helix-builder reports 4 pre-existing errors in
src/engine/, none in the files this PR touches. CI's just clippy passes no
-p/--workspace, so it only lints default-members and never covered them.

Reviewer checklist

  • CI (lint, unit-test) is green
  • Matches the linked issue/step
  • No unexplained scope creep or unrelated files touched

--merging.config activates merging, the new --sim.config activates
simulation, neither is a startup error. The relay signer loads only for
merging. The simulation role boots the node only; its servers come later.

Step 1 of #527.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants