Repository navigation
op-node,op-acceptance-tests: run the gap_clp2p INVALID-payload test on any EL and CL - #24073
Conversation
75cb1e2 to
a5bf7d8
Compare
a5bf7d8 to
0dc90ba
Compare
49a39e8 to
44f786d
Compare
sebastianst
left a comment
There was a problem hiding this comment.
Approving. Both CL lanes pass the new test on op-reth, and their logs show the EL answering INVALID (Unexpected type flag, latestValidHash null) and the CL keeping its unsafe head, then taking the valid block. Mutating insertUnsafePayload three ways (accept INVALID, rewind on rejection, drop the PayloadInvalidEvent) makes the unit test fail each time. Not checked: the test was not run on op-geth, so its decode-before-parent-lookup order is taken from the description.
The earlier red memory-all-opn-op-reth-fusaka on this PR was safedb_parity's TestSafeHeadRecordsMatchAfterKonaCLRestart (an EOF from the kona-node RPC after its restart), which this stack doesn't touch.
On closing #18125: agreed for latestValidHash: null. An INVALID whose latestValidHash points below the unsafe head is the part op-node still ignores. I think that's acceptable with signed gossip; the inline comment asks to scope the wording.
🤖 Co-created with Claude Opus 5.5 and Claude Fable 5.2
44f786d to
ad67b36
Compare
sebastianst
left a comment
There was a problem hiding this comment.
Re-approving after the rebase onto develop: both commits are unchanged (git range-diff shows =). The three inline comments from the previous review are non-blocking.
🤖 Co-created with Claude Fable 5.2
…it test TestCLUnsafeNotRewoundOnInvalidDuringELSync relied on op-geth rejecting a payload with malformed extraData before looking up its parent. Neither the Engine API nor the OP specs require that check before SYNCING, and op-reth buffers the payload and returns SYNCING instead. The test was skipped on op-reth, and op-geth skips Karst chains, so it ran in no configuration. Cover the op-node behaviour it asserted with a unit test that does not depend on the EL: an INVALID newPayload during EL sync leaves the unsafe head in place, sends no forkchoice update, and reports the payload invalid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add TestCLUnsafeKeptOnInvalidPayloadDuringELSync, which checks the same behaviour as the op-node unit test against a running verifier, so it also covers kona-node. The payload is invalidated with an undecodable transaction. The Engine API lists INVALID as the response for invalid transaction entries, and op-geth and op-reth both decode the transactions before looking for the parent, so they answer INVALID without it; the test also asks the EL directly to confirm. A zero-length transaction is not usable: go-ethereum and alloy compute different transaction roots for an empty entry, so kona-node's admin API rejects the block hash op-node computes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ad67b36 to
89b3e9e
Compare
Stacked on #23827.
TestCLUnsafeNotRewoundOnInvalidDuringELSyncforced an INVALID response by sending the EL a payload with malformedextraDatawhose parent the EL does not have. Only op-geth rejects that payload before it looks up the parent, through an OP-specific check of its own; neither the Engine API nor the OP specs require that check before answering SYNCING. op-reth buffers the payload and returns SYNCING, so the test could never pass on op-reth, and op-geth skips every Karst chain, so it ran in no CI configuration. This removes one of the op-reth skips listed in #23317.It is replaced by
TestCLUnsafeKeptOnInvalidPayloadDuringELSync, which checks the same CL behaviour and now runs on op-reth with both op-node and kona-node: an INVALIDnewPayloadduring EL sync neither moves the unsafe head onto the payload nor rewinds it, and the valid block at that height is still accepted afterwards. The payload is invalidated with an undecodable transaction, which the Engine API lists as INVALID and which op-geth and op-reth both reject before looking for the parent; the test asks the EL directly to confirm it answers INVALID, not SYNCING. A zero-length transaction, the case the spec names, cannot be used: go-ethereum and alloy compute different transaction roots for an empty entry, so kona-node's admin API rejects the block hash. Making op-node accept INVALID during EL sync makes the new test fail. An op-node unit test also covers the decision, including that no forkchoice update is sent, which the acceptance test cannot observe. No effect on users.This also settles #18125, which asked whether op-node should rewind its unsafe head after an INVALID during EL sync. Both CLs keep the current behaviour: an INVALID for one payload says nothing about the payloads before it, which the EL may still be syncing toward, and the specs do not ask the rollup node to rewind.
Closes #18125
go-code-reviewerran on both commits and its findings are applied, except one: it expected kona-node to retry the INVALID insert forever and block the valid payload. kona drops an insert that gets INVALID (EngineTask::execute_innerinrust/kona/crates/node/engine/src/task_queue/tasks/task.rs), and the kona run shows the drop and then the valid block being accepted.deletion-reviewerwas not run: the only deleted name is a test function, and a whole-tree search finds no other reference to it. op-geth was not run, because these chains activate Karst.🤖 Generated with Claude Code