Merge.Plugin: make testing_commitBlockV1 txRlps nullable#11649
Merged
Conversation
The spec for testing_commitBlockV1 defines txRlps as oneOf [array, null] where null instructs the client that it MAY build from the local txpool. testing_buildBlockV1 already takes IEnumerable<byte[]>? on this branch, but the commit variant still takes a non-nullable IEnumerable<byte[]>, so JSON-RPC requests with a null txRlps fail at parameter binding with -32602 "Missing parameter does not have a default value" before ever reaching the implementation. ProduceBlockAsync already handles `txRlps is null` correctly (it falls back to env.TxSource.GetTransactions). Making the entry-point parameter nullable on both ITestingRpcModule and TestingRpcModule is enough to make the spec-compliant null case dispatch. Spec and cross-client fixtures: ethereum/execution-apis#801
2 tasks
LukaszRozmej
approved these changes
May 18, 2026
LukaszRozmej
left a comment
Member
There was a problem hiding this comment.
Should this parameter be optional and default to one of the values?
This was referenced May 18, 2026
svlachakis
approved these changes
May 18, 2026
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
The OpenRPC spec for
testing_commitBlockV1declarestxRlpsasoneOf [array, null], wherenullmeans the client MAY build from the local txpool. On the current master,testing_buildBlockV1already takesIEnumerable<byte[]>? txRlps, buttesting_commitBlockV1still takes a non-nullableIEnumerable<byte[]>. JSON-RPC requests withnullfor that parameter fail at parameter binding with-32602 \"Missing parameter does not have a default value\"before ever reaching the implementation.ProduceBlockAsyncalready handles thetxRlps is nullcase correctly (it falls back toenv.TxSource.GetTransactions). Making the entry-point parameter nullable on bothITestingRpcModuleandTestingRpcModuleis enough to let the spec-compliant null case dispatch.This is a 2-character change.
Companion PRs
Test plan
rpc-compatsimulator'stesting_commitBlockV1/commit-block-z-from-mempooltest (which passestxRlps: null) goes from failing on Nethermind master to passing with this changetesting_buildBlockV1+testing_commitBlockV1subtests pass against patched Nethermind under hive