Skip to content

refactor(cli-extract-config): Generate configs without hive - #3414

Closed
marioevz wants to merge 2 commits into
ethereum:forks/amsterdamfrom
marioevz:in-house-genesis-generation
Closed

refactor(cli-extract-config): Generate configs without hive#3414
marioevz wants to merge 2 commits into
ethereum:forks/amsterdamfrom
marioevz:in-house-genesis-generation

Conversation

@marioevz

Copy link
Copy Markdown
Member

Description

Previous version of extract_config command required hive running to start up a client with each genesis.json from every test in order to extract the configuration files that hive generates for each client. It also required accessing docker containers prepared by hive where the clients were running in order to extract the configs from them.

This PR models all genesis configuration files for Geth, Besu and Nethermind as pydantic models in order to no longer have to use a running hive instance.

The models also now should be self-updating and require no to low maintenance.

E.g. Nethermind config file requires to list each EIP enabled in the fork, and this list already exists in the testing framework, so the list of activated EIPs will be updated automatically in the genesis config passed to nethermind, instead of having to manually update in ethereum/hive every time.

This also opens the door for us to automatically include these files in each release, however the file size could be prohibitively high and needs consideration.

Related Issues or PRs

N/A.

Checklist

  • Ran fast static checks to avoid CI fails, see Code Standards & Verifying Changes: just static
  • PR title has the form <type>(<area>): <title>, where <type> and <area> come from an appropriate C-<type>, respectively A-<area>, label. The title should match the target squash commit message.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

refactor: move all files to `extract_config`

refactor: rewrite `extract_config`
@danceratopz danceratopz added A-test-cli Area: execution_testing.cli C-feat Category: an improvement or new feature labels Aug 24, 2026
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.54%. Comparing base (3d473e8) to head (ad5f74e).
⚠️ Report is 7 commits behind head on forks/amsterdam.

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #3414   +/-   ##
================================================
  Coverage            93.53%   93.54%           
================================================
  Files                  624      624           
  Lines                37074    37074           
  Branches              3394     3394           
================================================
+ Hits                 34679    34681    +2     
+ Misses                1645     1644    -1     
+ Partials               750      749    -1     
Flag Coverage Δ
unittests 93.54% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@danceratopz danceratopz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would definitely nice to avoid calling hive just to generate benchmark releases! I'm not entirely convinced this is the right approach, especially given the large code footprint. Who uses these artifacts atm? I believe, atm, it is only benchmarkoor? I'm curious how things would simplify if benchmarkoor took this over. But it looks like it might need to be on our side for sanity checking (can look deeper if need be).

But at the very least, I think we should move Nethermind over to use a geth-style genesis (valid from 1.38, released June '26):

Otherwise, how about relying on hive's source, instead of running it. I.e., we could treat the mapper files as the source of truth? Requires a hive clone, but not to run it.

Btw, any reason you're prioritizing his now, btw? Just cleaning out the pipeline, ready for the next benchmark releases?

@danceratopz

Copy link
Copy Markdown
Member

Just wanted to add. It's trivial to maintain this code these days, perhaps it's fine to add it 🙂

@danceratopz danceratopz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I revisited @raxhvl's approach in #2511 that uses hive's mapper files (as independently suggested above), and requires a clone, but not docker or a hive instance).

I prefer #2511's approach and think it's cleaner to let the consumer of these files generate the genesis; it's a better separation of concerns and gives a consumer more freedom to select:

  1. test content version - which EEST release you consume,
  2. transform version - which hive mapper vintage renders the configs,
  3. client version - which client image/binary you actually boot.

This is what a consumer needs:

  1. jq
  2. hive's clients/<client>/mapper.jq files (checked out or vendored, pinned)
  3. The ~15 lines of consume.sh: split the ingredients file, export the HIVE_* env, one jq -f mapper.jq per client.

I played around with it here, the required code footprint is minimal:

@raxhvl

raxhvl commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

I think Dan is on top of this but Im here to help, if needed

@marioevz

Copy link
Copy Markdown
Member Author

@danceratopz I think @raxhvl solution is the best one of the two, let's revisit and potentially rebase to prepare to merge some time in the future. I think the urgency of this is low, I thought this was somehow a blocker for Hegota devnet releases, but it's not, so feel free defer this until later. I'll close this PR for now!

@marioevz marioevz closed this Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-cli Area: execution_testing.cli C-feat Category: an improvement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants