-
Notifications
You must be signed in to change notification settings - Fork 189
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
feat(katana): remove support for initializing custom settlement chain #2927
Conversation
WalkthroughOhayo, sensei! This pull request introduces enhancements to the Katana CLI initialization process, focusing on settlement chain selection. The changes modify the Changes
Sequence DiagramsequenceDiagram
participant User
participant CLI
participant SettlementChain
User->>CLI: Trigger Init Command
CLI->>User: Prompt Settlement Chain Selection
User->>CLI: Choose Settlement Chain
alt Sepolia Selected
CLI->>SettlementChain: Use Predefined Sepolia URL
else Custom Selected
User->>CLI: Enter Custom RPC URL
CLI->>SettlementChain: Use Custom URL
end
Possibly related PRs
Suggested reviewers
Sensei, the changes look quite interesting! The new settlement chain selection mechanism adds flexibility to the initialization process. Ohayo and happy coding! 🚀 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this 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)
bin/katana/src/cli/init/mod.rs (1)
22-22
: Consider making the Sepolia provider URL configurable.Ohayo sensei! While hardcoding the Sepolia provider URL simplifies the implementation, it might be better to make it configurable through environment variables or configuration files for flexibility in different environments.
-const CARTRIDGE_SN_SEPOLIA_PROVIDER: &str = "https://api.cartridge.gg/x/starknet/sepolia"; +const CARTRIDGE_SN_SEPOLIA_PROVIDER: &str = option_env!("SEPOLIA_PROVIDER_URL") + .unwrap_or("https://api.cartridge.gg/x/starknet/sepolia");
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
📒 Files selected for processing (2)
bin/katana/Cargo.toml
(2 hunks)bin/katana/src/cli/init/mod.rs
(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: fmt
- GitHub Check: build-and-push
🔇 Additional comments (4)
bin/katana/src/cli/init/mod.rs (3)
122-137
: Well-structured implementation with clear documentation!The enum definition and network options are well-organized, with excellent documentation explaining the limitation to Sepolia. The feature flag approach maintains flexibility for future custom settlement chain support if needed.
222-222
: LGTM! Clean integration with the new settlement chain selection.The update to use settlement_url maintains consistency with the new approach.
139-150
: Consider additional URL validation for custom settlement chains.When the custom settlement chain feature is enabled, we should validate that the provided URL is actually a Starknet RPC endpoint. This could prevent configuration issues early in the initialization process.
bin/katana/Cargo.toml (1)
31-31
: Clean dependency and feature flag additions!The workspace-level strum_macros dependency and the init-custom-settlement-chain feature flag are well-integrated. The empty feature array is appropriate for this use case.
Also applies to: 45-45
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2927 +/- ##
==========================================
- Coverage 55.81% 55.80% -0.01%
==========================================
Files 444 444
Lines 57308 57317 +9
==========================================
+ Hits 31986 31987 +1
- Misses 25322 25330 +8 ☔ View full report in Codecov by Sentry. |
We can't support custom chain for now as we're relying heavily on the Atlantic service for setting the proofs and currently it is limited to only Starknet Sepolia.
Summary by CodeRabbit
New Features
Improvements