feat(engine): add engine_getPayloadV4Hacked for megablock benchmarking#21092
Closed
feat(engine): add engine_getPayloadV4Hacked for megablock benchmarking#21092
Conversation
Add engine_getPayloadV4Hacked endpoint for compatibility with Nethermind's execution-payloads-benchmarks tool. This enables building megablocks (blocks with transactions from multiple source blocks) for benchmarking. The implementation: - Adds EngineApiHacked trait with getPayloadV4Hacked method - Reuses TestingApi's block building logic - Auto-derives parent and payload attributes from current head - Registers on auth RPC when testing module is enabled This matches Nethermind's cber/get-payload-hacked branch implementation that was a precursor to the testing_buildBlockV1 spec (execution-apis #710).
mattsse
requested changes
Jan 15, 2026
Comment on lines
+102
to
+103
| let gas_used = | ||
| builder.execute_transaction(tx).map_err(Eth::Error::from_eth_err)?; |
Collaborator
There was a problem hiding this comment.
this should skip invalid transactions like on this pr
basically gracful handle the execute, if this is an invalid transaction, simply skip the transaction
similar to:
reth/crates/ethereum/payload/src/lib.rs
Line 300 in 905de96
Collaborator
|
superseded by #21094 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
engine_getPayloadV4Hackedendpoint for compatibility with Nethermind's execution-payloads-benchmarks tool.This enables building megablocks (blocks with transactions from multiple source blocks merged together) for benchmarking execution client performance.
Background
Nethermind created the
cber/get-payload-hackedbranch (Oct 2025) as a quick solution for megablock benchmarking. This was later formalized astesting_buildBlockV1spec (execution-apis #710).This PR adds the hacked endpoint for backward compatibility with existing tooling, while reth already supports the standard
testing_buildBlockV1.Implementation
EngineApiHackedtrait withgetPayloadV4Hackedmethod inenginenamespaceTestingApi's block building logic (build_megablock())testingmodule is enabledHow to use
Start reth with
--http.api testingto enable both:testing_buildBlockV1on regular RPCengine_getPayloadV4Hackedon auth RPCAPI
{ "method": "engine_getPayloadV4Hacked", "params": [["0x02f8...", "0x02f8..."]], // raw tx RLP bytes "id": 1 }Returns
ExecutionPayloadEnvelopeV4with execution requests.