Skip to content

Conversation

@luiz-lvj
Copy link
Collaborator

@luiz-lvj luiz-lvj commented Jan 29, 2026

This PR renames some variables to better align with the changes on ERC 7888

Summary by CodeRabbit

Release Notes

  • Refactor
    • Updated parameter naming across prover implementations to improve semantic clarity—renaming a parameter related to state validation for consistency across the codebase.
    • Corresponding documentation and test files updated to reflect the parameter naming changes.
    • No functional or behavioral changes; existing functionality remains intact.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

📝 Walkthrough

Walkthrough

This PR systematically renames the first parameter of verifyTargetStateCommitment functions across all prover implementations from homeBlockHash to homeStateCommitment. The same parameter rename is applied consistently across multiple chains (Arbitrum, Linea, Optimism, Scroll, Taiko, ZkSync), their associated tests, documentation, and mock contracts. No logic or control flow is modified.

Changes

Cohort / File(s) Summary
Arbitrum Provers
src/contracts/provers/arbitrum/ChildToParentProver.sol, src/contracts/provers/arbitrum/ParentToChildProver.sol
Renamed first parameter from homeBlockHash to homeStateCommitment in verifyTargetStateCommitment function signature and updated corresponding call to ProverUtils.getSlotFromBlockHeader.
Optimism Provers
src/contracts/provers/optimism/ChildToParentProver.sol, src/contracts/provers/optimism/ParentToChildProver.sol
Renamed first parameter from homeBlockHash to homeStateCommitment in verifyTargetStateCommitment function signature and updated internal usage.
Scroll Provers
src/contracts/provers/scroll/ChildToParentProver.sol, src/contracts/provers/scroll/ParentToChildProver.sol
Renamed first parameter from homeBlockHash to homeStateCommitment in verifyTargetStateCommitment function signature and updated internal calls.
Taiko Provers
src/contracts/provers/taiko/ChildToParentProver.sol, src/contracts/provers/taiko/ParentToChildProver.sol
Renamed first parameter from homeBlockHash to homeStateCommitment in verifyTargetStateCommitment function signature and updated ProverUtils.getSlotFromBlockHeader calls.
Linea Provers
src/contracts/provers/linea/ChildToParentProver.sol
Renamed first parameter from homeBlockHash to homeStateCommitment in verifyTargetStateCommitment function signature and updated internal utility call.
ZkSync Provers
src/contracts/provers/zksync/ChildToParentProver.sol
Renamed first parameter from homeBlockHash to homeStateCommitment in verifyTargetStateCommitment function signature and updated internal call.
Documentation
docs/provers/ARBITRUM.md, docs/provers/OPTIMISM.md, docs/provers/SCROLL.md, docs/provers/TAIKO.md
Updated documented code examples to reflect parameter rename from homeBlockHash to homeStateCommitment in function signatures and call sites.
Test Contracts
test/mocks/MockProver.sol, test/provers/arbitrum/*.t.sol, test/provers/optimism/*.t.sol, test/provers/scroll/*.t.sol, test/provers/taiko/*.t.sol
Updated local variables and function calls from homeBlockHash to homeStateCommitment; updated inline comments to reflect new parameter semantics.
Scripts
scripts/generate-optimism-test-payloads.ts
Updated documentation comment in payload generation to refer to homeStateCommitment instead of homeBlockHash.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

Suggested reviewers

  • nahimterrazas
  • pepebndc
  • frangio

Poem

🐰 Hopping through the code with glee,
Parameter names we now see,
From homeBlockHash to state so sweet,
homeStateCommitment's the treat,
Consistency across the prover suite! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Rename variables' is vague and generic, failing to specify which variables are being renamed or why the changes are significant. Use a more descriptive title such as 'Rename homeBlockHash to homeStateCommitment across provers' to clearly communicate the scope and purpose of the changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

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