fix: correct hive errors#12063
Conversation
|
Claude finished @DarkLord017's task in 4m 57s —— View job PR Review
SummaryTwo distinct bugs fixed, both targeting Engine API spec compliance. The logic is correct in both cases. No blocking issues found.
|
| Severity | File | Note |
|---|---|---|
| Low | PayloadAttributes.cs:166 |
Comment wording is a sentence fragment — suggestion left inline |
| Low | IExecutionPayloadParams.cs:91 |
ValidationResult.Fail choice is correct but non-obvious; a one-line comment would help future readers — suggestion left inline |
No critical, high, or medium findings. Mergeable.
|
Claude finished @DarkLord017's task in 4m 10s —— View job PR Review
SummaryTwo focused spec-compliance fixes with no critical, high, or medium issues. Both behavioral changes are correct and tested. The two Low findings from the previous review remain unaddressed (inline suggestions still pending).
|
actualVersion |
timestampVersion |
fcuVersion |
Old result | New result | Correct? |
|---|---|---|---|---|---|
| 3 (V3 attrs) | 2 (Shanghai) | 2 (FCUv2) | UnsupportedFork |
InvalidPayloadAttributes |
✓ (spec: attrs have future fields → INVALID_PAYLOAD_ATTRIBUTES) |
| 2 (V2 attrs) | 3 (Cancun) | 2 (FCUv2) | UnsupportedFork |
UnsupportedFork |
✓ (attrs are behind; FCU doesn't support Cancun) |
| 3 (V3 attrs) | 2 (Shanghai) | 3 (FCUv3) | UnsupportedFork |
InvalidPayloadAttributes |
✓ (attrs carry future fields regardless of FCU version) |
| 2 (V2 attrs) | 3 (Cancun) | 3 (FCUv3) | UnsupportedFork |
InvalidPayloadAttributes |
✓ (FCU matches fork, attrs missing required field) |
The pre-Paris (V1 timestamp) case also holds: timestampVersion >= V2 is false, so the unsupportedFork guard always yields false → InvalidPayloadAttributes, which is correct since Paris has no UNSUPPORTED_FORK concept.
IExecutionPayloadParams.cs — null guard for blobVersionedHashes
Correct fix. Without the guard, null was implicitly converted to default(ReadOnlySpan<Hash256?>) (empty) in FlattenedHashesEqual, which would pass if no blob transactions were present. ValidationResult.Fail → ErrorCodes.InvalidParams (-32602) is the right protocol-level error per the Engine API spec (null is not a valid JSON value for this array parameter).
Tests
All new and updated test expectations are consistent with the spec:
PayloadAttributesValidateTests: the new case(isAmsterdam=false, withSlot=true, fcu=V3) → InvalidPayloadAttributestraces correctly with the new logic (actualVersion(4) < timestampVersion(3)is false, sounsupportedFork = false).EngineModuleTests.V3.cs: "Zero Beacon Root" cases reclassified fromUnsupportedFork→InvalidPayloadAttributes. The FCUv2/v3 with non-nullParentBeaconBlockRootat a Shanghai timestamp is unambiguouslyINVALID_PAYLOAD_ATTRIBUTESper spec.NewPayloadV3_should_decline_null_blobversionedhashesalready existed and now correctly expectsErrorCodes.InvalidParamsthanks to the null guard.
Findings
| Severity | Location | Note |
|---|---|---|
| Low | PayloadAttributes.cs:166–167 |
Comment is a sentence fragment: "from a more advanced fork than the" — incomplete. Inline suggestion was left in the previous review. |
| Low | IExecutionPayloadParams.cs:93 |
ValidationResult.Fail is correct but non-obvious vs Invalid; a brief inline comment would help. Inline suggestion was left in the previous review. |
No critical, high, or medium findings. Mergeable.
…nection When a P2P session drops, the peer's IP remains blocked in NodeFilter for 5 minutes, preventing reconnection. This caused withdrawal sync and snap sync hive tests to fail: the secondary client connects briefly, then disconnects, and the server's ShouldRejectInbound blocks the reconnection attempt. Also restore the missing _invalidChainTracker.OnInvalidBlock call that was dropped when RecordBadBlock was expanded inline in NewPayloadHandler.
Fixes failing hive tests
✖ ForkchoiceUpdatedV2 To Request Shanghai Payload, Non-Null Beacon Root (Cancun) (nethermind)
✖ NewPayloadV3 Versioned Hashes, Nil Hashes, Syncing=False (Cancun) (nethermind)
✖ NewPayloadV3 Versioned Hashes, Nil Hashes, Syncing=True (Cancun) (nethermind)
Changes
InvalidPayloadAttributeswhen actualVersion > timestampVersionTypes of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Documentation
Requires documentation update
Requires explanation in Release Notes