Skip to content

Rework engine API versioning#10786

Open
LukaszRozmej wants to merge 18 commits intomasterfrom
fix-fcuv2-return-38003
Open

Rework engine API versioning#10786
LukaszRozmej wants to merge 18 commits intomasterfrom
fix-fcuv2-return-38003

Conversation

@LukaszRozmej
Copy link
Member

Replaces #10770

Changes

Types of changes

What types of changes does your code introduce?

  • Refactoring

Testing

Requires testing

  • Yes

If yes, did you write tests?

  • Yes

Remarks

This should make additional changes in the future easier.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors Nethermind’s Engine API version handling from fork-name-based constants to per-method version constants, updating payload-attributes validation/error behavior to align with execution-apis#761 and making future Engine API evolution simpler.

Changes:

  • Introduce method-scoped Engine API version constants (EngineApiVersions.Fcu/NewPayload/GetPayload) and update call sites accordingly.
  • Simplify and document PayloadAttributes version validation, and remove the InvalidParams validation result path for payload attributes.
  • Update Merge/Optimism/Taiko handlers and tests to use FCU/NewPayload/GetPayload method versions and the updated error-code expectations.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Nethermind/Nethermind.Taiko/TaikoPayloadAttributes.cs Renames apiVersionfcuVersion in validation override and forwards updated version argument.
src/Nethermind/Nethermind.Optimism/Rpc/OptimismPayloadAttributes.cs Renames apiVersionfcuVersion in validation override and forwards updated version argument.
src/Nethermind/Nethermind.Optimism.Test/OptimismPayloadAttributesTests.cs Updates tests to use EngineApiVersions.Fcu.V3 instead of fork-name constant.
src/Nethermind/Nethermind.Merge.Plugin/Handlers/GetPayloadV6Handler.cs Uses EngineApiVersions.GetPayload.V6 (method version) instead of numeric literal.
src/Nethermind/Nethermind.Merge.Plugin/Handlers/GetPayloadV5Handler.cs Uses EngineApiVersions.GetPayload.V5 (method version) instead of numeric literal.
src/Nethermind/Nethermind.Merge.Plugin/Handlers/GetPayloadV4Handler.cs Uses EngineApiVersions.GetPayload.V4 (method version) instead of numeric literal.
src/Nethermind/Nethermind.Merge.Plugin/Handlers/GetPayloadV3Handler.cs Uses EngineApiVersions.GetPayload.V3 (method version) instead of numeric literal.
src/Nethermind/Nethermind.Merge.Plugin/Handlers/GetPayloadV2Handler.cs Uses EngineApiVersions.GetPayload.V2 (method version) instead of numeric literal.
src/Nethermind/Nethermind.Merge.Plugin/Handlers/GetPayloadV1Handler.cs Uses EngineApiVersions.GetPayload.V1 (method version) instead of numeric literal.
src/Nethermind/Nethermind.Merge.Plugin/Handlers/ForkchoiceUpdatedHandler.cs Removes InvalidParams mapping for payload-attributes validation results.
src/Nethermind/Nethermind.Merge.Plugin/EngineRpcModule.Shanghai.cs Updates FCU/NewPayload calls to pass method versions (Fcu.V2, NewPayload.V2).
src/Nethermind/Nethermind.Merge.Plugin/EngineRpcModule.Prague.cs Updates engine_newPayloadV4 to pass EngineApiVersions.NewPayload.V4.
src/Nethermind/Nethermind.Merge.Plugin/EngineRpcModule.Paris.cs Uses method versions for FCU/NewPayload and updates unsupported-fork error threshold to NewPayload.V2.
src/Nethermind/Nethermind.Merge.Plugin/EngineRpcModule.Cancun.cs Updates FCU/NewPayload calls to pass method versions (Fcu.V3, NewPayload.V3).
src/Nethermind/Nethermind.Merge.Plugin/EngineRpcModule.Amsterdam.cs Updates FCU/NewPayload calls to pass method versions (Fcu.V4, NewPayload.V5).
src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.V2.cs Updates FCUv2 withdrawals mismatch assertions to expect InvalidPayloadAttributes error code.
src/Nethermind/Nethermind.Consensus/Producers/PayloadAttributes.cs Reworks payload-attributes version validation around FCU method versions and removes InvalidParams result.
src/Nethermind/Nethermind.Consensus/EngineApiVersions.cs Introduces nested per-method version constants and documentation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

LukaszRozmej and others added 3 commits March 11, 2026 17:29
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@LukaszRozmej LukaszRozmej requested review from Copilot and rubo March 11, 2026 16:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

LukaszRozmej and others added 2 commits March 12, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

optimism refactoring taiko related to the taiko alethia rollup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants