Conversation
There was a problem hiding this comment.
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
PayloadAttributesversion validation, and remove theInvalidParamsvalidation 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 apiVersion→fcuVersion in validation override and forwards updated version argument. |
| src/Nethermind/Nethermind.Optimism/Rpc/OptimismPayloadAttributes.cs | Renames apiVersion→fcuVersion 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.
src/Nethermind/Nethermind.Consensus/Producers/PayloadAttributes.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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.
src/Nethermind/Nethermind.Consensus/Producers/PayloadAttributes.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
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.
src/Nethermind/Nethermind.Merge.Plugin/BlockProduction/Boost/BoostBlockImprovementContext.cs
Show resolved
Hide resolved
src/Nethermind/Nethermind.Consensus/Producers/PayloadAttributes.cs
Outdated
Show resolved
Hide resolved
…V2.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…s.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
src/Nethermind/Nethermind.Consensus/Producers/PayloadAttributes.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Consensus/Producers/PayloadAttributes.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Marc <Marchhill@users.noreply.github.com>
Replaces #10770
Changes
PayloadAttributes.ValidateVersionand document it moreTypes of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Remarks
This should make additional changes in the future easier.