Skip to content

fix(rsk): run installed BlockVerifier regardless of TrustRPC - #44

Open
fedejinich wants to merge 3 commits into
rsk/developfrom
rsk/PAYROLLUP-117-hybrid-l1-validation
Open

fix(rsk): run installed BlockVerifier regardless of TrustRPC#44
fedejinich wants to merge 3 commits into
rsk/developfrom
rsk/PAYROLLUP-117-hybrid-l1-validation

Conversation

@fedejinich

@fedejinich fedejinich commented Aug 12, 2026

Copy link
Copy Markdown

Summary

  • run an installed BlockVerifier from blockCall and payloadCall even when TrustRPC=true
  • preserve upstream behavior when the hook is nil
  • add RSK-specific coverage for hook execution, mismatch propagation/no-cache behavior, and the known TrustRPC=false RSKIP-92 header fallback limit
  • leave receipts production, headerCall, and GetProof unchanged

Implements the fork portion of PAYROLLUP-117. Jira comment 176763 records the approved hybrid policy, rationale, header-verifier exclusion, and trust limits.

Validation

  • go test ./op-service/sources/... -run 'TestRSK_' -count=1 — PASS
  • go test ./op-service/sources/... -count=1 — PASS
  • go build ./op-service/sources/... — PASS
  • cd op-service && just test — PASS
  • mise exec -- just lint-go — not run: mise is not installed
  • just lint-go fallback — reports two pre-existing goimports findings in op-service/txmgr/cli.go and op-service/txmgr/metrics/tx_metrics.go; both files have an empty diff against rsk/develop, and the touched package has no lint finding

Correction validation on f3360d4f189b9cdaa64ae64ef5fc19fde0b7a8b4:

  • the rejected AGENTS_rsk.md expansion is reverted; the complete fork tree matches code/test head f139cc22adfd9c260f400b461bd23624749ca97c
  • git diff --check — PASS
  • focused PAYROLLUP-117 regression tests in op-service/sources — PASS
  • go test ./op-service/sources/... -count=1 — PASS

Port review

PASS: fork/rebase and L1-hook groups checked; go.work absent; receipts production unchanged; deploy/config N/A. Rootstack parent PR ethereum-optimism#83 pins f3360d4f189b9cdaa64ae64ef5fc19fde0b7a8b4; detailed divergence documentation remains Rootstack-owned. After squash merge, Rootstack must reconcile the gitlink to the resulting rsk/develop commit before merge.

@fedejinich
fedejinich requested a review from a team as a code owner August 12, 2026 02:35
@fedejinich
fedejinich requested review from asoto-iov and a lite review from Copilot August 12, 2026 02:35
@github-actions github-actions Bot added the risk/high Touches a sensitive area; review carefully label Aug 12, 2026
@github-actions

Copy link
Copy Markdown

PR Triager kept risk/high. It was already set, so the model was not consulted again for this revision. It came either from a path listed in .github/rsk-pr-triager.yml or from an earlier revision's assessment.

@github-actions github-actions Bot added the triaged This revision was risk-triaged label Aug 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 BlockVerifier from blockCall and payloadCall when TrustRPC=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=false RSKIP-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.

Comment thread op-service/sources/eth_client_rsk_test.go
@fedejinich
fedejinich enabled auto-merge (squash) August 12, 2026 02:38
@fedejinich
fedejinich marked this pull request as draft August 12, 2026 04:21
auto-merge was automatically disabled August 12, 2026 04:21

Pull request was converted to draft

@fedejinich
fedejinich marked this pull request as ready for review August 12, 2026 22:41
@github-actions github-actions Bot added triaged This revision was risk-triaged and removed triaged This revision was risk-triaged labels Aug 12, 2026
Copilot AI review requested due to automatic review settings August 13, 2026 00:51
@github-actions github-actions Bot added triaged This revision was risk-triaged and removed triaged This revision was risk-triaged labels Aug 13, 2026
@github-actions github-actions Bot added triaged This revision was risk-triaged and removed triaged This revision was risk-triaged labels Aug 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@github-actions github-actions Bot added triaged This revision was risk-triaged and removed triaged This revision was risk-triaged labels Aug 13, 2026
Copilot AI review requested due to automatic review settings August 13, 2026 00:58
@github-actions github-actions Bot added triaged This revision was risk-triaged and removed triaged This revision was risk-triaged labels Aug 13, 2026
@github-actions github-actions Bot added triaged This revision was risk-triaged and removed triaged This revision was risk-triaged labels Aug 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk/high Touches a sensitive area; review carefully triaged This revision was risk-triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants