fix(rsk): run installed BlockVerifier regardless of TrustRPC - #44
fix(rsk): run installed BlockVerifier regardless of TrustRPC#44fedejinich wants to merge 3 commits into
Conversation
|
PR Triager kept |
There was a problem hiding this comment.
Pull request overview
This PR updates op-service/sources EthClient verification behavior for the RSK fork to enforce the approved “hybrid policy”: TrustRPC=true skips the default Ethereum block verification, but an explicitly installed BlockVerifier hook must still run on blockCall/payloadCall paths (while headerCall remains fully gated by !TrustRPC).
Changes:
- Run
BlockVerifierfromblockCallandpayloadCallwhenTrustRPC=true(hook present), preserving upstream behavior when the hook is nil. - Clarify the intended TrustRPC/hook interaction via updated in-code comments.
- Add RSK-specific tests covering hook execution under TrustRPC, mismatch propagation/no-cache behavior, and the known
TrustRPC=falseRSKIP-92 header fallback limitation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| op-service/sources/eth_client.go | Adjusts block/payload verification gating to always execute an installed BlockVerifier hook even when TrustRPC=true, while leaving header verification behavior unchanged. |
| op-service/sources/eth_client_rsk_test.go | Adds characterization/coverage tests for the hybrid policy behavior and related RSK-specific boundaries. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Pull request was converted to draft
This reverts commit c304876.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
op-service/sources/eth_client.go:265
- The comment says that with trustRPC=true "no header verification runs at all", but headerCall still runs post-merge validation via rpcHdr.Header(true, mustBePostMerge). This is really about skipping hash verification (default VerifyHash / HeaderVerifier hook), not all checks; the current wording is misleading for readers.
// Unlike blockCall/payloadCall, header verification stays gated on !trustRPC
// even when a HeaderVerifier hook is set: with trustRPC=true no header
// verification runs at all (hybrid policy, PAYROLLUP-117).
Summary
BlockVerifierfromblockCallandpayloadCalleven whenTrustRPC=trueTrustRPC=falseRSKIP-92 header fallback limitheaderCall, andGetProofunchangedImplements the fork portion of PAYROLLUP-117. Jira comment
176763records the approved hybrid policy, rationale, header-verifier exclusion, and trust limits.Validation
go test ./op-service/sources/... -run 'TestRSK_' -count=1— PASSgo test ./op-service/sources/... -count=1— PASSgo build ./op-service/sources/...— PASScd op-service && just test— PASSmise exec -- just lint-go— not run:miseis not installedjust lint-gofallback — reports two pre-existinggoimportsfindings inop-service/txmgr/cli.goandop-service/txmgr/metrics/tx_metrics.go; both files have an empty diff againstrsk/develop, and the touched package has no lint findingCorrection validation on
f3360d4f189b9cdaa64ae64ef5fc19fde0b7a8b4:AGENTS_rsk.mdexpansion is reverted; the complete fork tree matches code/test headf139cc22adfd9c260f400b461bd23624749ca97cgit diff --check— PASSop-service/sources— PASSgo test ./op-service/sources/... -count=1— PASSPort review
PASS: fork/rebase and L1-hook groups checked;
go.workabsent; receipts production unchanged; deploy/config N/A. Rootstack parent PR ethereum-optimism#83 pinsf3360d4f189b9cdaa64ae64ef5fc19fde0b7a8b4; detailed divergence documentation remains Rootstack-owned. After squash merge, Rootstack must reconcile the gitlink to the resultingrsk/developcommit before merge.