Skip to content

Add testing_buildBlockV1 RPC Method#747

Draft
MysticRyuujin wants to merge 11 commits intoethereum:mainfrom
MysticRyuujin:buildBlockV1
Draft

Add testing_buildBlockV1 RPC Method#747
MysticRyuujin wants to merge 11 commits intoethereum:mainfrom
MysticRyuujin:buildBlockV1

Conversation

@MysticRyuujin
Copy link

@MysticRyuujin MysticRyuujin commented Feb 2, 2026

This PR adds comprehensive support for the testing_buildBlockV1 RPC method.

Changes

  • New OpenRPC specification for testing_buildBlockV1
  • 4 test fixtures validating various scenarios
  • Build system integration
  • Client configuration updates
  • Test generator implementation
  • Auto-generated documentation

Testing Results

✅ All npm lint checks passing
✅ All speccheck tests passing
✅ Spellcheck validation passing

…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.
@MysticRyuujin
Copy link
Author

MysticRyuujin commented Feb 2, 2026

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.

@MysticRyuujin
Copy link
Author

Ok, now the tests are passing, but these changes still need to make it into go-ethereum

@MysticRyuujin
Copy link
Author

I removed one of the tests because it was redundant. The tests cover all scenarios:

  1. Empty block with no TXs and no extraData
  2. Passing a TX with extraData
  3. Attempting to pass an invalid tx

It also validates the go-ethereum responses to the spec to avoid regressions in the library

@MysticRyuujin
Copy link
Author

Updated reference to the latest, spec now allows passing null for the transaction array to build a block from mempool. This may result in hive diffs, not sure, but we can deal with that later.

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.

1 participant