Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump alloy deps #3012

Merged
merged 2 commits into from
Feb 12, 2025
Merged

chore: bump alloy deps #3012

merged 2 commits into from
Feb 12, 2025

Conversation

kariy
Copy link
Member

@kariy kariy commented Feb 12, 2025

Summary by CodeRabbit

  • Chores

    • Updated several underlying libraries to their latest versions.
    • Reorganized dependency sections for improved clarity and maintainability.
  • New Features

    • Simplified the event declaration for LogMessageToL2, enhancing event handling efficiency.

Copy link

coderabbitai bot commented Feb 12, 2025

Ohayo sensei! Here’s the review of the changes:

Walkthrough

This pull request updates several alloy dependencies in the Cargo.toml file. It downgrades the patch version for alloy-primitives and alloy-sol-types from "0.8.3" to "0.8", while bumping the versions for alloy-contract, alloy-json-rpc, alloy-network, alloy-provider, alloy-rpc-types-eth, alloy-signer, and alloy-transport from "0.3" to "0.4". Additionally, header comments have been modified to categorize these dependencies into "alloy core" and "alloy". No other configurations were affected.

Changes

File Change Summary
Cargo.toml * Updated dependency versions:
- alloy-primitives & alloy-sol-types: "0.8.3" → "0.8"
- alloy-contract, alloy-json-rpc, alloy-network, alloy-provider, alloy-rpc-types-eth, alloy-signer, alloy-transport: "0.3" → "0.4"
* Modified header comments for dependency categorization.
crates/.../ethereum.rs * Simplified event declaration for LogMessageToL2 by removing the contract wrapper.
* Updated l1_handler_tx_from_log to decode logs directly from LogMessageToL2.

Suggested reviewers

  • glihm

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@kariy kariy force-pushed the katana/update-alloy branch from 0e7961e to 1786959 Compare February 12, 2025 22:29
Copy link

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
crates/katana/messaging/src/ethereum.rs (1)

189-189: Consider adding proper error handling here, sensei!

The unwrap() call could cause runtime panics if the log decoding fails. Consider using map_err to provide a more graceful error handling approach.

-    let log = LogMessageToL2::decode_log(log.as_ref(), false).unwrap();
+    let log = LogMessageToL2::decode_log(log.as_ref(), false)
+        .map_err(|e| Error::Custom(format!("Failed to decode LogMessageToL2: {}", e)))?;
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1786959 and 2987b55.

📒 Files selected for processing (1)
  • crates/katana/messaging/src/ethereum.rs (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: docs
  • GitHub Check: ensure-wasm
  • GitHub Check: clippy
  • GitHub Check: build
🔇 Additional comments (2)
crates/katana/messaging/src/ethereum.rs (2)

33-41: Ohayo sensei! The event declaration looks much cleaner now!

The simplified event structure aligns well with alloy's best practices, making the code more maintainable.


264-272: Test adaptation looks good, sensei!

The test has been properly updated to use the new event construction syntax while maintaining the same verification coverage.

@glihm glihm enabled auto-merge (squash) February 12, 2025 23:11
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.41%. Comparing base (a1b21bf) to head (2987b55).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3012   +/-   ##
=======================================
  Coverage   56.40%   56.41%           
=======================================
  Files         434      434           
  Lines       58077    58063   -14     
=======================================
- Hits        32761    32755    -6     
+ Misses      25316    25308    -8     

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

@glihm glihm merged commit 6e10516 into main Feb 12, 2025
15 checks passed
@glihm glihm deleted the katana/update-alloy branch February 12, 2025 23:34
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