Add testing_buildBlockV1 RPC Method#747
Conversation
…ures This commit adds comprehensive support for the testing_buildBlockV1 RPC method, which is used to generate test fixtures for Ethereum execution layer clients. Changes include: - New OpenRPC specification in src/testing/testing_buildBlockV1.yaml - Test fixtures for three scenarios: with transactions, with extra data, without extra data - Integration of testing methods into spec build process (scripts/build.js) - Client configuration to enable testing RPC namespace (tools/client.go) - Test generator implementation with comprehensive validation (tools/testgen/generators.go) - Wordlist update for spellcheck compliance All tests pass: ✅ npm run lint (OpenRPC validation) ✅ npm run test (speccheck validation) ✅ Spellcheck The implementation follows existing patterns and is backward compatible.
|
This PR is in draft mostly because of the requirement to use MariusVanDerWijden/testing-buildblock and it is directly addressing testing for #710 as well as some other minor issues found while running the complete test suite. Also, I'm getting some errors with the branch/fork of geth, which I think are actual geth bugs. |
|
Ok, now the tests are passing, but these changes still need to make it into go-ethereum |
|
I removed one of the tests because it was redundant. The tests cover all scenarios:
It also validates the go-ethereum responses to the spec to avoid regressions in the library |
|
Updated reference to the latest, spec now allows passing |
Resolve conflicts: - package.json: accept main's make-based build commands - scripts/build.js: delete (replaced by Go specgen tool) - tools/go.mod: accept main's deps, keep replace directive for geth fork - tools/go.sum: regenerated via go mod tidy - Makefile: add -methods 'src/testing' for testing_buildBlockV1
Update testing_buildBlockV1 fixture outputs to match current fill results, including slotNumber and blockTimestamp fields.
|
@fjl can merge |
## Summary Pin `ethereum/execution-apis` ref in hive rpc-compat tests, the same way `hive_ref` already pins the hive framework itself. - Add `execution_apis_ref` to `hive-versions.json` - Before hive builds the rpc-compat simulator image, clone execution-apis at the pinned ref, copy the `tests/` dir into the build context, and patch the Dockerfile to use the local copy (the Dockerfile already has a commented-out `ADD tests` for this purpose) - Only runs for the `rpc/compat` matrix entry, not engine sims ## Why The rpc-compat simulator's Dockerfile clones `ethereum/execution-apis` at `main` HEAD on every build (`ARG branch=main`). On April 6 at ~15:00 UTC, ethereum/execution-apis#747 added `testing_buildBlockV1` tests (200 → 208 tests). Erigon doesn't implement this method, causing 4 new failures and breaking ci-gate on **all PRs**. The hive framework was already pinned via `hive_ref`, but the test data it fetches was not. To bump execution-apis in the future, update `execution_apis_ref` in `hive-versions.json`. ## Test plan - [ ] ci-gate passes (rpc-compat runs pinned 200 tests, 0 failures) - [ ] Engine sims unaffected (step is skipped via matrix condition) --------- Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Summary Pin `ethereum/execution-apis` ref in hive rpc-compat tests, the same way `hive_ref` already pins the hive framework itself. - Add `execution_apis_ref` to `hive-versions.json` - Before hive builds the rpc-compat simulator image, clone execution-apis at the pinned ref, copy the `tests/` dir into the build context, and patch the Dockerfile to use the local copy (the Dockerfile already has a commented-out `ADD tests` for this purpose) - Only runs for the `rpc/compat` matrix entry, not engine sims ## Why The rpc-compat simulator's Dockerfile clones `ethereum/execution-apis` at `main` HEAD on every build (`ARG branch=main`). On April 6 at ~15:00 UTC, ethereum/execution-apis#747 added `testing_buildBlockV1` tests (200 → 208 tests). Erigon doesn't implement this method, causing 4 new failures and breaking ci-gate on **all PRs**. The hive framework was already pinned via `hive_ref`, but the test data it fetches was not. To bump execution-apis in the future, update `execution_apis_ref` in `hive-versions.json`. ## Test plan - [ ] ci-gate passes (rpc-compat runs pinned 200 tests, 0 failures) - [ ] Engine sims unaffected (step is skipped via matrix condition) --------- Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pin `ethereum/execution-apis` ref in hive rpc-compat tests, the same way `hive_ref` already pins the hive framework itself. - Add `execution_apis_ref` to `hive-versions.json` - Before hive builds the rpc-compat simulator image, clone execution-apis at the pinned ref, copy the `tests/` dir into the build context, and patch the Dockerfile to use the local copy (the Dockerfile already has a commented-out `ADD tests` for this purpose) - Only runs for the `rpc/compat` matrix entry, not engine sims The rpc-compat simulator's Dockerfile clones `ethereum/execution-apis` at `main` HEAD on every build (`ARG branch=main`). On April 6 at ~15:00 UTC, ethereum/execution-apis#747 added `testing_buildBlockV1` tests (200 → 208 tests). Erigon doesn't implement this method, causing 4 new failures and breaking ci-gate on **all PRs**. The hive framework was already pinned via `hive_ref`, but the test data it fetches was not. To bump execution-apis in the future, update `execution_apis_ref` in `hive-versions.json`. - [ ] ci-gate passes (rpc-compat runs pinned 200 tests, 0 failures) - [ ] Engine sims unaffected (step is skipped via matrix condition) --------- Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
I was not aware that this was the active one for this endpoint, I went to #710. There are some requests, this one in particular, which I'd like to see in this API. It is about adding the target gas limit to the API, to have control over the gas target of the block. This is necessary to fill certain benchmarks (for instance a mainnet fork where we want to bump the gas limit to twice the current value, and then create benchmark blocks) |
This PR adds comprehensive support for the testing_buildBlockV1 RPC method.
Changes
Testing Results
✅ All npm lint checks passing
✅ All speccheck tests passing
✅ Spellcheck validation passing