Skip to content

fix(katana): bump blockifier to widen MsgToL1.to_address to Felt - #3050

Merged
glihm merged 3 commits into
dojoengine:mainfrom
glihm:katana/piltover-msg-patch
Feb 19, 2025
Merged

fix(katana): bump blockifier to widen MsgToL1.to_address to Felt#3050
glihm merged 3 commits into
dojoengine:mainfrom
glihm:katana/piltover-msg-patch

Conversation

@glihm

@glihm glihm commented Feb 18, 2025

Copy link
Copy Markdown
Contributor

@kariy this ensures piltover is deployed with the patch while computing messages hashes. As mentioned, we will address later the integration of the EthAddress to ContractAddress. 👍

Summary by CodeRabbit

  • Chores
    • Updated a subproject to its latest version to ensure consistency and maintainability.
    • Updated dependency revisions for starknet_api and blockifier to their latest commits, which may enhance functionality.
  • Bug Fixes
    • Removed a function for converting Ethereum addresses, simplifying address handling in L2 to L1 messages.

@coderabbitai

coderabbitai Bot commented Feb 18, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Ohayo, sensei! This change updates the subproject commit hash for the Piltover contract within the Katana crate, modifying the reference from fb9d9889100f9c88eba1ff91f619c1a67afc2a71 to 4ac41d3ef0c296eb1eb8bf1f2fa3afe7281a1f51. Additionally, the Cargo.toml files for the katana-cairo and katana-executor packages have been updated to reflect new revisions for their respective dependencies, starknet_api and blockifier. Furthermore, a function has been removed from utils.rs, altering how Ethereum addresses are processed.

Changes

File Change Summary
crates/katana/contracts/piltover Updated subproject commit hash from fb9d9889100f9c88eba1ff91f619c1a67afc2a71 to 4ac41d3ef0c296eb1eb8bf1f2fa3afe7281a1f51
crates/katana/cairo/Cargo.toml Updated starknet_api dependency revision from adae779 to d860f498
crates/katana/executor/Cargo.toml Updated blockifier dependency revision from adae779 to d860f498
crates/katana/executor/src/implementation/blockifier/utils.rs Removed function starknet_api_ethaddr_to_felt and modified variable assignment in to_l2_l1_messages function

Suggested reviewers

  • glihm

📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between bb5cfb2 and 207ff08.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • crates/katana/cairo/Cargo.toml (1 hunks)
  • crates/katana/executor/Cargo.toml (1 hunks)
  • crates/katana/executor/src/implementation/blockifier/utils.rs (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: fmt
🔇 Additional comments (4)
crates/katana/executor/src/implementation/blockifier/utils.rs (2)

50-50: LGTM! Import update for better organization.

The addition of specific imports from katana_primitives improves code organization.


666-666:

Details

✅ Verification successful

Verify the impact of direct address assignment.

The change to directly use m.message.to_address without conversion might affect message handling between L2 and L1.

Let's verify the usage pattern:


🏁 Script executed:

#!/bin/bash
# Search for other L2 to L1 message handling patterns
rg -A 5 "L2ToL1Message.*to_address"

Length of output: 605


Ohayo sensei! Direct assignment of to_address verified as consistent.

After examining the usage of to_address, particularly in the instantiation of OrderedL2ToL1Message (via the grep output from crates/katana/executor/src/implementation/blockifier/utils.rs), it appears that the codebase consistently uses direct assignment without conversion for L2 to L1 messages. There is no alternate conversion pattern elsewhere, so this change should not adversely affect message handling between L2 and L1.

crates/katana/cairo/Cargo.toml (1)

21-21:

Details

❓ Verification inconclusive

Ohayo sensei! Verify the dependency update compatibility.

The update of starknet_api to revision d860f498 needs to be verified for compatibility with the address handling changes.

Let's check the changes in the new revision:


🏁 Script executed:

#!/bin/bash
# Fetch and show the changes between the revisions
gh api repos/dojoengine/sequencer/compare/adae779...d860f498 --jq '.commits[].commit.message'

Length of output: 190


Ohayo sensei! I've reviewed the commit messages in the updated starknet_api revision:

  • "use generic felt for messages addresses" indicates that the API now uses a generic felt type for message addresses.
  • "test(blockifier): send msg to l1 using non eth address" confirms that non-ETH address handling has been explicitly tested.

These changes suggest that the dependency upgrade is intended to address compatibility with non-ETH/address handling by shifting to generic felt types. However, please verify that our existing address transformation logic (if any) aligns with this new approach and that all related integration points function correctly.

crates/katana/executor/Cargo.toml (1)

17-17:

Details

✅ Verification successful

Ensure synchronized dependency updates.

The blockifier revision update to d860f498 aligns with the starknet_api update, which is good practice.

Let's verify the dependency compatibility:


🏁 Script executed:

#!/bin/bash
# Check if both dependencies use the same base revision
gh api repos/dojoengine/sequencer/commits/d860f498 --jq '.commit.message'

Length of output: 128


Ohayo sensei, dependency update verified – everything looks in sync.

  • The commit message "test(blockifier): send msg to l1 using non eth address" confirms that the revision update to d860f498 was intentional and aligns with the associated starknet_api update.
  • No further changes are required based on this verification.

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

@glihm
glihm marked this pull request as draft February 18, 2025 22:30
@codecov

codecov Bot commented Feb 18, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 57.66%. Comparing base (e9f7e18) to head (69d781d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...na/executor/src/implementation/blockifier/utils.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3050      +/-   ##
==========================================
+ Coverage   56.88%   57.66%   +0.77%     
==========================================
  Files         439      439              
  Lines       59762    59437     -325     
==========================================
+ Hits        33995    34273     +278     
+ Misses      25767    25164     -603     

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

@kariy
kariy marked this pull request as ready for review February 19, 2025 22:15
@glihm glihm changed the title fix(katana/contracts): add new piltover class with MSG magic patch fix(katana): bump blockifier to widen MsgToL1.to_address to Felt Feb 19, 2025
@glihm
glihm merged commit f244197 into dojoengine:main Feb 19, 2025
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