Conversation
|
Claude finished @benaadams's task in 3m 40s —— View job PR Review: Fix Fcu hive, add Paris CI tests
SummaryThe core change — removing the cross-request finalized monotonicity check — is correct per the Engine API spec. The Paris spec only requires Adding FindingsMedium
Low
VerdictBehaviorally correct, spec-compliant fix. The missing two-step test coverage is the main gap before this can be considered fully regression-tested. |
|
@claude re-review |
|
Claude finished @benaadams's task in 2m 38s —— View job Re-Review: Fix Fcu hive, add Paris CI tests
Both findings from the previous review have been addressed. Previous findings — resolvedMedium (resolved): Tests now cover the actual cross-call regression. The renamed test
This directly regresses the monotonicity guard that was removed. The V1 + V3 payload-building variants round it out. Low (resolved):
VerdictNo remaining issues. Core logic is correct and spec-compliant. Test coverage now genuinely exercises the regression. Safe to merge. |
|
Claude finished @benaadams's task in 2m 39s —— View job PR Review: fix(merge): allow lower finalized FCUs and add Paris engine pyspec coverage
SummaryThis is a clean, spec-compliant fix. All issues from the previous review cycle have been resolved. Core change (
Test coverage: The three new tests (V1 cross-call + V1 payload-building + V3 payload-building) genuinely exercise the regression.
FindingsNo new findings. No unresolved issues. VerdictNo Critical, High, or Medium issues. Safe to merge. |
There was a problem hiding this comment.
Pull request overview
Adjusts engine_forkchoiceUpdated handling to accept request-local finalized/safe markers even when the finalized block regresses relative to a previously accepted FCU, aligning Nethermind with Engine API request-local consistency rules and fixing Hive regressions. Also expands test coverage (including pyspec engine fixtures) to prevent recurrence.
Changes:
- Stop enforcing cross-request finalized monotonicity in
ForkchoiceUpdatedHandler(keep request-local bounds + ancestry checks). - Update manual finalization tracking to reflect the current finalized marker (not a monotonic max).
- Add regression tests for “lower finalized” scenarios and register Paris engine pyspec fixtures for CI.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/Nethermind/Nethermind.Merge.Plugin/Handlers/ForkchoiceUpdatedHandler.cs |
Removes cross-request finalized monotonicity rejection; keeps per-FCU ordering/ancestry validation. |
src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.V3.cs |
Adds V3 regression test covering lower-finalized FCU while building payloads. |
src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.V1.cs |
Updates/extends V1 coverage for lower-finalized acceptance + payload-building scenario. |
src/Nethermind/Nethermind.Blockchain/ManualFinalizationManager.cs |
Makes LastFinalizedBlockLevel reflect the current finalized marker (can decrease). |
src/Nethermind/Nethermind.Blockchain/IBlockFinalizationManager.cs |
Updates documentation to match “current finalized level” semantics. |
src/Nethermind/Ethereum.Blockchain.Pyspec.Test/Tests.cs |
Registers ParisEngineBlockchainTests so Paris engine fixtures run in CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
LukaszRozmej
left a comment
There was a problem hiding this comment.
@claude can new added tests in this PR be TestCase/TestCaseSource with themselves or existing tests?
|
Claude finished @LukaszRozmej's task in 1m 24s —— View job Test parameterization analysis
Can the new tests use
|
| Test | File | What it tests |
|---|---|---|
forkchoiceUpdated_accepts_lower_finalized_than_previous_but_rejects_safe_before_finalized |
V1.cs | Cross-call lower-finalized acceptance + request-local safe-before-finalized rejection |
forkchoiceUpdatedV1_should_allow_lower_finalized_than_previous_when_building_payload |
V1.cs | Lower finalized accepted when payload-building (V1) |
ForkChoiceUpdatedV3_should_allow_lower_finalized_than_previous_when_building_payload |
V3.cs | Lower finalized accepted when payload-building (V3/Cancun) |
The two payload-building tests (V1 + V3)
These test the same logical scenario at different fork versions. A [TestCase(bool cancun)] could technically merge them, but the setup diverges substantially:
- V3 needs
CreateBlockchain(releaseSpec: Cancun.Instance, ...)+AddNewBlockV3helper; V1 usesProduceBranchV1. - V3
PayloadAttributeshas two extra fields (Withdrawals,ParentBeaconBlockRoot). - V1 calls
engine_forkchoiceUpdatedV1; V3 callsengine_forkchoiceUpdatedV3.
The existing codebase pattern keeps V1 and V3 in separate partial-class files precisely because of this divergence. Parameterizing them would mean either duplicating the setup inside a switch or extracting a factory — more noise than three clear, readable test methods.
The first V1 test
forkchoiceUpdated_accepts_lower_finalized_than_previous_but_rejects_safe_before_finalized combines two assertions (lower accepted + safe-before-finalized rejected) in a single flow. There's no natural boolean dimension to break it into a [TestCase] without splitting the two behaviors into separate tests, which is a style choice rather than a correctness concern.
Comparison with existing pattern
The [TestCase(bool cachedSafe)] on forkchoiceUpdated_rejects_repeated_hash_when_head_on_sibling_branch works well because the two cases differ in exactly one boolean with otherwise identical setup and assertion shape. The new tests don't have that clean symmetry.
Conclusion: The new tests are fine as standalone [Test] methods. There's no clear win from parameterizing them — the tests are short, their names are descriptive, and merging V1/V3 would require non-trivial indirection that the current three-test split avoids cleanly.
…verage (#11259) * Fix Fcu hive, add Paris CI tests * Feedback
Changes
This fixes a regression introduced after #11187 in engine_forkchoiceUpdated.
The ancestry validation from #11185 remains in place, but the handler no longer rejects a valid FCU just because the new finalizedBlockHash is lower than the previously accepted finalized level. We still enforce request-local ordering and ancestry:
This matches the Hive failures seen in:
Regression coverage added:
This PR also adds ParisEngineBlockchainTests to the Pyspec engine test registry so Paris engine fixtures run in CI as
well.
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?