Skip to content

[Provers N08] Inconsistent Declaration of Decoded Data#78

Closed
pepebndc wants to merge 2 commits intomainfrom
fix/provers-N08
Closed

[Provers N08] Inconsistent Declaration of Decoded Data#78
pepebndc wants to merge 2 commits intomainfrom
fix/provers-N08

Conversation

@pepebndc
Copy link
Copy Markdown
Collaborator

@pepebndc pepebndc commented Feb 10, 2026

Summary by CodeRabbit

  • Refactor
    • Standardized internal implementation patterns across proof verification contract modules to improve code consistency and maintainability.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 10, 2026

📝 Walkthrough

Walkthrough

This PR standardizes the return signatures of verifyStorageSlot functions across all network-specific prover contracts by converting from named return values to unnamed return tuples. The implementations are refactored to explicitly declare local variables and include explicit return statements, while preserving functional equivalence.

Changes

Cohort / File(s) Summary
Arbitrum Provers
src/contracts/provers/arbitrum/ChildToParentProver.sol, src/contracts/provers/arbitrum/ParentToChildProver.sol
Changed verifyStorageSlot return signature from named (address account, uint256 slot, bytes32 value) to unnamed (address, uint256, bytes32). Reorganized local variable declarations and added explicit return statements.
Linea Provers
src/contracts/provers/linea/ChildToParentProver.sol, src/contracts/provers/linea/ParentToChildProver.sol
Converted verifyStorageSlot from named to unnamed returns with explicit local variable declarations and return statements. Refactored input decoding to align with unnamed return pattern.
Optimism Provers
src/contracts/provers/optimism/ChildToParentProver.sol, src/contracts/provers/optimism/ParentToChildProver.sol
Updated verifyStorageSlot return signature to use unnamed returns with explicit value variable and return statement. Consolidated decoding patterns in ChildToParentProver.verifyTargetStateCommitment.
Scroll Provers
src/contracts/provers/scroll/ChildToParentProver.sol, src/contracts/provers/scroll/ParentToChildProver.sol
Standardized verifyStorageSlot to unnamed returns with explicit local value variable declarations and return statements. Enhanced decoding clarity with explicit named variable bindings.
Taiko Provers
src/contracts/provers/taiko/ChildToParentProver.sol, src/contracts/provers/taiko/ParentToChildProver.sol
Changed verifyStorageSlot from named to unnamed returns with explicit value variable assignment and return statement. Refactored input decoding for consistency.
zkSync Prover
src/contracts/provers/zksync/ChildToParentProver.sol
Converted verifyStorageSlot return signature to unnamed returns with explicit local variable handling and explicit return statement. Restructured ABI decoding with multiline formatting.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • nahimterrazas
  • frangio

Poem

🐰 A named return hops away,
Unnamed tuples come to stay,
Through Arbitrum, Linea, and more,
Consistency we now restore!
Return statements, explicit and bright,

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change across all modified files: converting named return values to unnamed returns in verifyStorageSlot functions across multiple prover contracts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/provers-N08

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/contracts/provers/taiko/ParentToChildProver.sol (1)

100-125: NatDoc @return tags are inconsistent across prover files.

This file includes @return tags (lines 103–105) for verifyStorageSlot, but the analogous functions in optimism/ParentToChildProver.sol, optimism/ChildToParentProver.sol, arbitrum/ParentToChildProver.sol, arbitrum/ChildToParentProver.sol, and linea/ChildToParentProver.sol omit them. Since this PR is about consistency, consider either adding @return tags to all prover contracts or removing them here and in the other files that have them (taiko/ChildToParentProver.sol, linea/ParentToChildProver.sol).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/contracts/provers/taiko/ParentToChildProver.sol` around lines 100 - 125,
Remove the extra NatSpec `@return` tags so the prover NatSpec comments are
consistent across contracts: delete the `@return account`, `@return slot`, and
`@return value` lines from the `verifyStorageSlot` function's comment in
ParentToChildProver (and similarly remove the `@return` lines in the other
prover files that currently have them such as the Taiko `ChildToParentProver`
and Linea `ParentToChildProver`), leaving the parameter and notice tags intact
to match the other prover contracts' style.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/contracts/provers/taiko/ParentToChildProver.sol`:
- Around line 100-125: Remove the extra NatSpec `@return` tags so the prover
NatSpec comments are consistent across contracts: delete the `@return account`,
`@return slot`, and `@return value` lines from the `verifyStorageSlot`
function's comment in ParentToChildProver (and similarly remove the `@return`
lines in the other prover files that currently have them such as the Taiko
`ChildToParentProver` and Linea `ParentToChildProver`), leaving the parameter
and notice tags intact to match the other prover contracts' style.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7714c79 and df1a797.

📒 Files selected for processing (11)
  • src/contracts/provers/arbitrum/ChildToParentProver.sol
  • src/contracts/provers/arbitrum/ParentToChildProver.sol
  • src/contracts/provers/linea/ChildToParentProver.sol
  • src/contracts/provers/linea/ParentToChildProver.sol
  • src/contracts/provers/optimism/ChildToParentProver.sol
  • src/contracts/provers/optimism/ParentToChildProver.sol
  • src/contracts/provers/scroll/ChildToParentProver.sol
  • src/contracts/provers/scroll/ParentToChildProver.sol
  • src/contracts/provers/taiko/ChildToParentProver.sol
  • src/contracts/provers/taiko/ParentToChildProver.sol
  • src/contracts/provers/zksync/ChildToParentProver.sol

@luiz-lvj
Copy link
Copy Markdown
Collaborator

I believe it's more clear to have the return of the verifyStorageSlot function inline as (address account, uint256 slot, bytes32 value), but to do this some variables have to be declared before the abi.decode call

@pepebndc pepebndc closed this Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants