Skip to content

[Provers N01] Use Custom Errors#74

Merged
luiz-lvj merged 1 commit intomainfrom
fix/provers-N01
Feb 18, 2026
Merged

[Provers N01] Use Custom Errors#74
luiz-lvj merged 1 commit intomainfrom
fix/provers-N01

Conversation

@pepebndc
Copy link
Collaborator

@pepebndc pepebndc commented Feb 10, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved error reporting with more specific error messages for validation failures, providing clearer feedback when issues occur.

@coderabbitai
Copy link

coderabbitai bot commented Feb 10, 2026

📝 Walkthrough

Walkthrough

The pull request replaces generic revert failures with five specific custom error types in the ParentToChildProver contract, improving error handling precision for validation failures including home block header mismatches, missing anchor game accounts, game proxy code issues, and root claim preimage mismatches.

Changes

Cohort / File(s) Summary
Custom Error Declarations and Implementation
src/contracts/provers/optimism/ParentToChildProver.sol
Added five custom error types (InvalidHomeBlockHeader, AnchorGameAccountDoesNotExist, InvalidGameProxyCode, InvalidRootClaimPreimage, InvalidGameProxy) and replaced corresponding generic require statements with explicit revert calls for improved error specificity in validation checks.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested Reviewers

  • nahimterrazas

Poem

🐰 Errors now speak with crystalline voice,
Custom reverts give validators choice—
No more generic fails in the night,
Each mishap shines specific 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 '[Provers N01] Use Custom Errors' directly and accurately reflects the main change: replacing generic require/revert statements with custom error definitions throughout the ParentToChildProver contract.
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-N01

No actionable comments were generated in the recent review. 🎉


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.

@luiz-lvj luiz-lvj merged commit 36b1626 into main Feb 18, 2026
3 checks passed
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