Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

Comments

fix(supervisor/rpc): fix checkAccessList errors#2765

Merged
dhyaniarun1993 merged 1 commit intomainfrom
fix/checkAccessList-error
Aug 26, 2025
Merged

fix(supervisor/rpc): fix checkAccessList errors#2765
dhyaniarun1993 merged 1 commit intomainfrom
fix/checkAccessList-error

Conversation

@dhyaniarun1993
Copy link
Collaborator

@dhyaniarun1993 dhyaniarun1993 commented Aug 26, 2025

This PR fixes checkAccessList errors as per the golang implementation.

@dhyaniarun1993 dhyaniarun1993 self-assigned this Aug 26, 2025
@dhyaniarun1993 dhyaniarun1993 added K-fix Kind: fix A-rpc Area: rpc W-supervisor Workstream: supervisor labels Aug 26, 2025
@claude
Copy link
Contributor

claude bot commented Aug 26, 2025

Claude finished @dhyaniarun1993's task —— View job


Code Review Complete

This PR fixes checkAccessList errors in the supervisor RPC module through error handling improvements and cleanup.

Todo List:

  • Read and analyze the changed files
  • Understand the context of checkAccessList error handling changes
  • Review code quality and best practices
  • Check for potential bugs or issues
  • Evaluate performance considerations
  • Assess security concerns
  • Review test coverage implications
  • Provide comprehensive feedback

✅ Code Review Feedback

Changes Summary

This PR makes targeted improvements to error handling in the check_access_list function while cleaning up unused error variants:

  1. Error Cleanup (crates/supervisor/core/src/error.rs): Removed unused InteropNotEnabled and InteropValidationError variants
  2. Enhanced Error Mapping (crates/supervisor/core/src/supervisor.rs): Added proper error conversion for critical operations

Positive Aspects

  • Clean Error Handling: The new .map_err() calls properly convert errors to spec-compliant SuperchainDAError::ConflictingData
  • Better Debugging: Added structured logging with error context for failed operations
  • Code Cleanup: Removing unused error variants reduces code complexity
  • Consistent Error Mapping: Both operations now follow the same error handling pattern

Code Quality Assessment

🟢 Good Practices:

  • Proper error logging with contextual information (%err, %initiating_chain_id)
  • Consistent use of map_err() for error transformation
  • Following Rust idioms for error handling
  • Maintaining backward compatibility in RPC responses

🟡 Minor Considerations:

  1. Error Context: Lines 312 and 334 in supervisor.rs:312,334 - Consider if ConflictingData is the most appropriate error type for all validation failures
  2. Import Cleanup: The removed use kona_interop::InteropValidationError; import should be verified across the codebase

Potential Issues

🟢 No Critical Issues Found

The changes appear safe and well-targeted:

  • No breaking API changes
  • Maintains existing error handling semantics
  • Proper error logging added

Security Assessment

🟢 Security: Good

  • Error messages don't leak sensitive information
  • Validation logic remains intact
  • No new attack vectors introduced

Performance Impact

🟢 Performance: Neutral/Positive

  • Minimal overhead from additional error mapping
  • Reduced enum size from removing unused variants
  • Improved debugging efficiency through better logging

Test Coverage Recommendations

While I cannot see specific test files for check_access_list, consider:

  1. Testing error scenarios for validate_interop_timestamps()
  2. Testing error scenarios for verify_checksum()
  3. Verifying that errors are properly mapped to ConflictingData

Suggestions for Future

  1. Consider adding more specific error types for different validation failures
  2. Document the error mapping decisions in the code comments
  3. Ensure all files importing removed error variants are updated

Overall Assessment: ✅ APPROVED

This is a solid improvement that enhances error handling robustness while cleaning up unused code. The changes are focused, well-implemented, and maintain backward compatibility.


@dhyaniarun1993 dhyaniarun1993 marked this pull request as ready for review August 26, 2025 07:23
Copilot AI review requested due to automatic review settings August 26, 2025 07:23
@claude
Copy link
Contributor

claude bot commented Aug 26, 2025

Claude finished @dhyaniarun1993's task —— View job


Code Review Complete

This PR fixes checkAccessList errors in the supervisor RPC module through error handling improvements and cleanup.

Todo List:

  • Read and analyze the changed files
  • Understand the context of checkAccessList error handling changes
  • Review code quality and best practices
  • Check for potential bugs or issues
  • Evaluate performance considerations
  • Assess security concerns
  • Review test coverage implications
  • Provide comprehensive feedback

✅ Code Review Feedback

Changes Summary

This PR makes targeted improvements to error handling in the check_access_list function while cleaning up unused error variants:

  1. Error Cleanup (crates/supervisor/core/src/error.rs): Removed unused InteropNotEnabled and InteropValidationError variants
  2. Enhanced Error Mapping (crates/supervisor/core/src/supervisor.rs): Added proper error conversion for critical operations

Positive Aspects

  • Clean Error Handling: The new .map_err() calls properly convert errors to spec-compliant SuperchainDAError::ConflictingData
  • Better Debugging: Added structured logging with error context for failed operations
  • Code Cleanup: Removing unused error variants reduces code complexity
  • Consistent Error Mapping: Both operations now follow the same error handling pattern

Code Quality Assessment

🟢 Good Practices:

  • Proper error logging with contextual information (%err, %initiating_chain_id)
  • Consistent use of map_err() for error transformation
  • Following Rust idioms for error handling
  • Maintaining backward compatibility in RPC responses

🟡 Minor Considerations:

  1. Error Context: Lines 312 and 334 in crates/supervisor/core/src/supervisor.rs:312,334 - Consider if ConflictingData is the most appropriate error type for all validation failures
  2. Import Cleanup: The removed use kona_interop::InteropValidationError; import should be verified across the codebase

Potential Issues

🟢 No Critical Issues Found

The changes appear safe and well-targeted:

  • No breaking API changes
  • Maintains existing error handling semantics
  • Proper error logging added

Security Assessment

🟢 Security: Good

  • Error messages don't leak sensitive information
  • Validation logic remains intact
  • No new attack vectors introduced

Performance Impact

🟢 Performance: Neutral/Positive

  • Minimal overhead from additional error mapping
  • Reduced enum size from removing unused variants
  • Improved debugging efficiency through better logging

Test Coverage Recommendations

While I cannot see specific test files for check_access_list, consider:

  1. Testing error scenarios for validate_interop_timestamps()
  2. Testing error scenarios for verify_checksum()
  3. Verifying that errors are properly mapped to ConflictingData

Suggestions for Future

  1. Consider adding more specific error types for different validation failures
  2. Document the error mapping decisions in the code comments
  3. Ensure all files importing removed error variants are updated

Overall Assessment: ✅ APPROVED

This is a solid improvement that enhances error handling robustness while cleaning up unused code. The changes are focused, well-implemented, and maintain backward compatibility.


Copy link
Contributor

Copilot AI left a comment

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 fixes error handling in the supervisor's RPC checkAccessList implementation to align with the golang specification. The changes improve error reporting and remove unused error variants.

  • Replaces generic error propagation with specific error mapping and logging
  • Removes unused InteropValidationError and InteropNotEnabled error variants
  • Adds detailed error logging for validation failures

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/supervisor/core/src/supervisor.rs Adds error mapping and logging for timestamp validation and checksum verification failures
crates/supervisor/core/src/error.rs Removes unused error variants and their implementations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Aug 26, 2025

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.0%. Comparing base (2de7891) to head (3d1c59f).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/supervisor/core/src/supervisor.rs 0.0% 8 Missing ⚠️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dhyaniarun1993 dhyaniarun1993 added this pull request to the merge queue Aug 26, 2025
Merged via the queue into main with commit 837cdd5 Aug 26, 2025
41 of 45 checks passed
@dhyaniarun1993 dhyaniarun1993 deleted the fix/checkAccessList-error branch August 26, 2025 09:17
@github-project-automation github-project-automation bot moved this from In Review to Done in Project Tracking Aug 26, 2025
executing_descriptor.timeout,
)?;
).map_err(|err| {
error!(target: "supervisor::service", %err, "Failed to validate interop timestamps");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it require to be error log as this is user/caller error

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you for pointing that out.
Nope. It should be debug/warn. I will fix it in a separate PR

theochap pushed a commit that referenced this pull request Aug 26, 2025
This PR fixes checkAccessList errors as per the golang implementation.
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
This PR fixes checkAccessList errors as per the golang implementation.
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 14, 2026
This PR fixes checkAccessList errors as per the golang implementation.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A-rpc Area: rpc K-fix Kind: fix W-supervisor Workstream: supervisor

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants