feat(test-cli): Add support for testing block building via simulator#2679
feat(test-cli): Add support for testing block building via simulator#2679fselmo wants to merge 3 commits intoethereum:forks/amsterdamfrom
Conversation
- Test build building via ``testing_buildBlockV1``, validating the built block, and re-consuming against the client
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2679 +/- ##
================================================
Coverage 86.25% 86.26%
================================================
Files 599 599
Lines 37032 37038 +6
Branches 3795 3795
================================================
+ Hits 31943 31949 +6
Misses 4525 4525
Partials 564 564
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Wire up slotnum for `testing_buildBlockV1` for `bal-devnet-3` branch We are experimenting testing block building through hive via EELS (PR [here](ethereum/execution-specs#2679)). This is the only change needed to test against `bal-devnet-3` - missing slotnum.
marioevz
left a comment
There was a problem hiding this comment.
Looks great! Just two comments to try to improve maintainability.
5852e2d to
795a4f9
Compare
|
@marioevz lmk if the last commit here is what you meant. I re-ran against geth |
| "-p", | ||
| "execution_testing.cli.pytest_commands.plugins.consume.simulators.build_block.conftest", | ||
| ] | ||
| ) |
There was a problem hiding this comment.
This is not important but maybe we could have something like this for the entire if-else comparison:
command_name = self.command_name
simulator_command_list = ["engine", "enginex", ...]
if command_name in simulator_command_list:
modified_args.extend(
[
"-p",
f"execution_testing.cli.pytest_commands.plugins.consume.simulators.{command_name}.conftest",
]
)
else:
raise ValueError(f"Unknown command name: {self.command_name}")i would like to continue on reviewing the remaining part of the PR!
🗒️ Description
Adds a hive-based simulator that verifies EL clients build correct blocks via
testing_buildBlockV1For each payload in a blockchain_test_engine fixture, the test sends the expected transactions and block attributes to the client's block building endpoint. The resulting block is validated against the fixture's expected output (
state_root,receipts_root, etc). The fixture block is then imported viaengine_newPayloadVXto advance the chain for subsequent blocks.gas_limitis validated a bit different for now, sincetesting_buildBlockV1doesn't accept a gas limit parameter. The client picks its own within the EIP-1559 adjustment range so we validate it is within that range until we can actually account for the gas limit. For this reason,block_hashis also excluded from comparison as it depends ongas_limit.Also looking for recs on the naming (
uv run build-block). We could go withbuildby itself but it feels vague to me. That said, I can be easily convinced here 😄.🔗 Related Issues or PRs
closes #2560
✅ Checklist
just statictype(scope):.Cute Animal Picture