Skip to content

Comments

chore: update cairo_lib#110

Merged
Ugo-X merged 1 commit intomainfrom
l2-mmr
Aug 17, 2025
Merged

chore: update cairo_lib#110
Ugo-X merged 1 commit intomainfrom
l2-mmr

Conversation

@JoE11-y
Copy link
Contributor

@JoE11-y JoE11-y commented Aug 17, 2025

Summary by CodeRabbit

  • New Features

    • No user-facing changes in this release.
  • Chores

    • Updated an underlying library dependency and pinned it to a specific revision to improve build reproducibility and stability. No functional impact expected.
  • Style

    • Minor configuration formatting cleanup with no effect on behavior.
  • Notes

    • Deployments and existing functionality remain unchanged; this update focuses on internal reliability and consistency.

@coderabbitai
Copy link

coderabbitai bot commented Aug 17, 2025

Walkthrough

Updated Scarb configuration: switched cairo_lib dependency to a new Git repository with a specific commit pin, and adjusted formatting for the casm flag in the StarkNet target block.

Changes

Cohort / File(s) Summary of Changes
Scarb config
contracts/L2/Scarb.toml
Updated cairo_lib dependency source to Explore-Beyond-Innovations repo and pinned to commit afc30b9; reformatted casm = true in [[target.starknet-contract]] (no semantic change).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Poem

A nibble of deps, a hop through commits,
I pin my carrots to afc30b9 bits.
Casm spaced neatly, tidy and true—
Configs aligned like morning dew.
Thump-thump! New trails, same moonlit view. 🥕✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 442e140 and b72c143.

📒 Files selected for processing (1)
  • contracts/L2/Scarb.toml (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
contracts/L2/Scarb.toml (1)
contracts/L2/scripts/deploy_l2.ts (1)
  • declareContract (264-318)
🔇 Additional comments (2)
contracts/L2/Scarb.toml (2)

24-24: casm = true is consistent with deploy tooling; LGTM.

Your deploy script (contracts/L2/scripts/deploy_l2.ts) expects CASM artifacts. Keeping CASM generation enabled aligns with that flow.

If you want to double-check artifact naming aligns with the package name, ensure the package is "l2" (it is) so outputs follow target/dev/l2_.{contract_class,compiled_contract_class}.json.


15-15: Please verify Scarb.lock and upstream commit existence

  • Scarb.lock:
    Run

    scarb build   # or scarb fetch

    then confirm that the cairo_lib block in Scarb.lock uses
    • git URL: https://github.com/Explore-Beyond-Innovations/cairo-lib.git
    • rev: afc30b93404f6f5c595f97d1f4f795983872600a

  • Upstream commit:
    Ensure the pinned commit actually exists in the remote repo. For example:

    git clone --no-checkout --depth 1 \
      https://github.com/Explore-Beyond-Innovations/cairo-lib.git tmp &&
    cd tmp &&
    git cat-file -t afc30b93404f6f5c595f97d1f4f795983872600a

    You should see commit printed.

  • API compatibility:
    We have explicit usages of cairo_lib in:
    • contracts/L2/tests/test_MerkleManager.cairo
    – use cairo_lib::hashing::poseidon::PoseidonHasher
    • contracts/L2/src/mocks/MockMerkleManager.cairo
    – use cairo_lib::data_structures::mmr::mmr::MMR/MMRTrait
    • contracts/L2/src/core/ZeroXBridgeL2.cairo
    – use cairo_lib::data_structures::mmr::mmr::MMR/MMRTrait

    Run the full test suite to catch any breaking changes in those imports.

Optionally, if the upstream repo provides signed tags, you may pin to a tag for easier upgrades—while retaining the exact commit pin in Scarb.lock for determinism.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch l2-mmr

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
🪧 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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@Ugo-X Ugo-X merged commit a1058f2 into main Aug 17, 2025
2 of 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