Skip to content

Merge.Plugin: make testing_commitBlockV1 txRlps nullable#11649

Merged
LukaszRozmej merged 1 commit into
NethermindEth:masterfrom
MysticRyuujin:testing-fix
May 18, 2026
Merged

Merge.Plugin: make testing_commitBlockV1 txRlps nullable#11649
LukaszRozmej merged 1 commit into
NethermindEth:masterfrom
MysticRyuujin:testing-fix

Conversation

@MysticRyuujin

@MysticRyuujin MysticRyuujin commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

The OpenRPC spec for testing_commitBlockV1 declares txRlps as oneOf [array, null], where null means the client MAY build from the local txpool. On the current master, testing_buildBlockV1 already takes IEnumerable<byte[]>? txRlps, but testing_commitBlockV1 still takes a non-nullable IEnumerable<byte[]>. JSON-RPC requests with null for that parameter fail at parameter binding with -32602 \"Missing parameter does not have a default value\" before ever reaching the implementation.

ProduceBlockAsync already handles the txRlps is null case correctly (it falls back to env.TxSource.GetTransactions). Making the entry-point parameter nullable on both ITestingRpcModule and TestingRpcModule is enough to let the spec-compliant null case dispatch.

This is a 2-character change.

Companion PRs

Test plan

  • hive rpc-compat simulator's testing_commitBlockV1/commit-block-z-from-mempool test (which passes txRlps: null) goes from failing on Nethermind master to passing with this change
  • All 9 testing_buildBlockV1 + testing_commitBlockV1 subtests pass against patched Nethermind under hive

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

@LukaszRozmej LukaszRozmej left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this parameter be optional and default to one of the values?

@svlachakis svlachakis requested a review from DarkLord017 May 18, 2026 14:54
@LukaszRozmej LukaszRozmej merged commit 35551fe into NethermindEth:master May 18, 2026
686 of 693 checks passed
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.

3 participants