-
Notifications
You must be signed in to change notification settings - Fork 203
feat: bump cairo 2.10 and remove katana and torii dependencies #3169
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
Conversation
WalkthroughOhayo sensei! This change represents a sweeping removal of the entire Katana and Torii codebase from the workspace. All binaries, crates, contracts, tests, documentation, and related configuration files under the Katana and Torii namespaces have been deleted. This includes core blockchain logic, executor, controller, CLI, node, contracts (including messaging and legacy contracts), explorer UI, feeder gateway, and all associated test utilities and fixtures. The workspace configuration is updated to remove all Katana and Torii members and dependencies. Additionally, Cairo-related dependencies are updated to version 2.10.1, and the workspace version is incremented. Only non-Katana/Dojo components remain, with some minor dependency and test utility adjustments. Changes
Sequence Diagram(s)No sequence diagrams generated, sensei, since the changes are a comprehensive removal and do not introduce or alter control flow or features. Possibly related PRs
If you need a deep dive into any of the removed components or want to reminisce about Katana's glorious past, just let me know, sensei! 🪧 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: 4
🔭 Outside diff range comments (2)
bin/sozo/src/commands/options/transaction.rs (1)
8-18
:⚠️ Potential issueStale
conflicts_with_all
references break CLI compilation.
max_fee_raw
andfee_estimate_multiplier
are no longer declared anywhere in this struct (or in the surrounding module after the Katana purge).
clap
validates argument IDs at compile‑time; dangling IDs will trigger an “unknown argument” panic during the proc‑macro expansion.Simply drop the obsolete conflicts list (or point it at the correct replacement flags, if any):
-#[arg(conflicts_with_all = ["max_fee_raw", "fee_estimate_multiplier"])] +// No other mutually‑exclusive fee flags remain after STRK unification.Without this fix
cargo build
will fail before tests even run.bin/sozo/src/commands/options/account/controller.rs (1)
92-118
:⚠️ Potential issuePossible panic when no policies found
is_equal_to_existing
indexeshashes[0]
andnew_policies[0]
without guarding against the empty‑policy case. If a workspace has zero exportable entrypoints, this willpanic!
.@@ fn is_equal_to_existing(new_policies: &[PolicyMethod], session_info: &FullSessionInfo) -> bool { - let new_policies_root = MerkleTree::compute_root(hashes[0], new_policies[0].proof.clone()); - new_policies_root == session_info.session.inner.allowed_policies_root + if hashes.is_empty() { + // No policies ⇒ nothing to compare, force session renewal. + return false; + } + + let new_policies_root = MerkleTree::compute_root(hashes[0], new_policies[0].proof.clone()); + new_policies_root == session_info.session.inner.allowed_policies_root }
🧹 Nitpick comments (8)
bin/sozo/src/commands/options/account/provider.rs (1)
15-23
: Provide ergonomic constructors withFrom
impls.Down‑stream call‑sites will often start with a concrete provider and immediately wrap it:
let prov = EitherProvider::Left(my_rpc); // noisyImplementing
From<P>
andFrom<Q>
forEitherProvider<P,Q>
(and maybeTryFrom
forResult
‑returning builders) lets users write the far clearer:let prov: EitherProvider<_, _> = my_rpc.into();Quality‑of‑life wins cost little and make the new abstraction friction‑free.
bin/sozo/src/commands/options/transaction.rs (1)
57-58
: Nit: retain token‑agnostic wording for reusability.
FeeConfig { gas, gas_price }
is generic, yet the surrounding help strings (“Transaction options – STRK”) hard‑code the STRK ticker. Consider phrasing them generically (“Transaction fee options”) so the binary doesn’t require another sweep if we ever rename or multi‑token again.crates/dojo/utils/src/tx/error.rs (1)
18-20
: Consider adding richDisplay
forTransactionExecutionErrorData
.Storing the structured data is great! For human‑readable error bubbles, forward its
to_string()
(or craft a custom pretty‑printer) in the#[error("…")]
attribute, e.g.:-#[error("Transaction execution error")] -TransactionExecution(TransactionExecutionErrorData), +#[error("Transaction execution error: {0:?}")] +TransactionExecution(TransactionExecutionErrorData),Otherwise users only see the generic header without the juicy inner details.
crates/dojo/utils/src/tx/mod.rs (2)
95-99
: Out‑of‑date doc‑comment still mentions removed knobsThe comment talks about
fee_estimate_multiplier
andmax_fee_raw
, which are no longer part of the API. Let’s avoid future confusion by updating it.- /// Sets `fee_estimate_multiplier` and `max_fee_raw` from `TxnConfig` if its present before - /// calling `send` method on the respective type. - /// NOTE: If both are specified `max_fee_raw` will take precedence and `fee_estimate_multiplier` - /// will be ignored by `starknet-rs` + /// Applies `TxnConfig::fee_config` by setting `l1_gas` and/or `l1_gas_price` + /// before delegating to `send`. + /// Only the provided fields are forwarded; missing values keep the account default.
102-123
: Duplicate fee‑application logic – consider a helper to DRY
ExecutionV3
,DeclarationV3
, andAccountDeploymentV3
all repeat the same two setters. A tiny internal helper (or a blanketwhere Self: Sized + HasGasSetters
) would reduce copy‑paste and the chance of future drift.Also applies to: 132-145, 155-168
Cargo.toml (1)
104-125
: Exact=
version pins for everycairo-lang-*
crateExact pins guarantee consistency but will block urgent patch releases (e.g., a 2.10.2 hot‑fix). If you want reproducibility and easy upgrades, use a workspace‑wide patch section or a caret
^2.10
range plus lockfile commits.bin/sozo/src/commands/options/account/mod.rs (2)
95-106
: Nit: typo in doc‑comment (“Catridge”)Line 95 says “Catridge Controller”; the correct brand name is “Cartridge”. Renaming keeps docs professional.
- /// Create a new Catridge Controller account based on session key. + /// Create a new Cartridge Controller account based on session key.
235-241
: Test couples to opaque encoding detailsThe assertions derive the encoding type by peeking into
encode_calls
output.
This is brittle: upstream changes to Starknet’s calldata layout (or a refactor ofencode_calls
) would break the test without any actual regression in Sozo.Consider asserting the
ExecutionEncoding
directly (once the API exposes it) or using a dedicated helper instead of magic offsets.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (6)
Cargo.lock
is excluded by!**/*.lock
crates/dojo/core-cairo-test/Scarb.lock
is excluded by!**/*.lock
crates/dojo/core/Scarb.lock
is excluded by!**/*.lock
crates/dojo/lang/Scarb.lock
is excluded by!**/*.lock
crates/katana/contracts/Scarb.lock
is excluded by!**/*.lock
crates/katana/contracts/messaging/cairo/Scarb.lock
is excluded by!**/*.lock
📒 Files selected for processing (131)
Cargo.toml
(7 hunks)bin/dojo-language-server/Cargo.toml
(1 hunks)bin/dojo-language-server/src/main.rs
(2 hunks)bin/katana/Cargo.toml
(1 hunks)bin/sozo/Cargo.toml
(1 hunks)bin/sozo/src/commands/call.rs
(2 hunks)bin/sozo/src/commands/options/account/controller.rs
(8 hunks)bin/sozo/src/commands/options/account/mod.rs
(7 hunks)bin/sozo/src/commands/options/account/provider.rs
(1 hunks)bin/sozo/src/commands/options/account/type.rs
(6 hunks)bin/sozo/src/commands/options/transaction.rs
(4 hunks)bin/sozo/src/utils.rs
(1 hunks)crates/dojo/core-cairo-test/Scarb.toml
(2 hunks)crates/dojo/core/Scarb.toml
(1 hunks)crates/dojo/lang/Scarb.toml
(1 hunks)crates/dojo/test-utils/Cargo.toml
(0 hunks)crates/dojo/test-utils/src/compiler.rs
(2 hunks)crates/dojo/test-utils/src/lib.rs
(0 hunks)crates/dojo/test-utils/src/rpc.rs
(0 hunks)crates/dojo/test-utils/src/sequencer.rs
(0 hunks)crates/dojo/utils/Cargo.toml
(1 hunks)crates/dojo/utils/src/tx/declarer.rs
(2 hunks)crates/dojo/utils/src/tx/deployer.rs
(2 hunks)crates/dojo/utils/src/tx/error.rs
(3 hunks)crates/dojo/utils/src/tx/invoker.rs
(2 hunks)crates/dojo/utils/src/tx/mod.rs
(6 hunks)crates/dojo/utils/src/tx/waiter.rs
(3 hunks)crates/dojo/world/abigen/src/main.rs
(2 hunks)crates/dojo/world/src/contracts/abigen/world.rs
(43 hunks)crates/katana/cairo/Cargo.toml
(0 hunks)crates/katana/cairo/src/lib.rs
(0 hunks)crates/katana/chain-spec/Cargo.toml
(0 hunks)crates/katana/chain-spec/src/dev.rs
(0 hunks)crates/katana/chain-spec/src/lib.rs
(0 hunks)crates/katana/chain-spec/src/rollup/file.rs
(0 hunks)crates/katana/chain-spec/src/rollup/mod.rs
(0 hunks)crates/katana/chain-spec/src/rollup/utils.rs
(0 hunks)crates/katana/cli/Cargo.toml
(0 hunks)crates/katana/cli/src/args.rs
(0 hunks)crates/katana/cli/src/file.rs
(0 hunks)crates/katana/cli/src/lib.rs
(0 hunks)crates/katana/cli/src/options.rs
(0 hunks)crates/katana/cli/src/utils.rs
(0 hunks)crates/katana/cli/test-data/genesis.json
(0 hunks)crates/katana/contracts/.gitignore
(0 hunks)crates/katana/contracts/.tool-versions
(0 hunks)crates/katana/contracts/Makefile
(0 hunks)crates/katana/contracts/README.md
(0 hunks)crates/katana/contracts/Scarb.toml
(0 hunks)crates/katana/contracts/account/Scarb.toml
(0 hunks)crates/katana/contracts/account/src/lib.cairo
(0 hunks)crates/katana/contracts/build/account_with_dummy_validate.sierra.json
(0 hunks)crates/katana/contracts/build/universal_deployer.json
(0 hunks)crates/katana/contracts/legacy/README.md
(0 hunks)crates/katana/contracts/legacy/account_with_dummy_validate.cairo
(0 hunks)crates/katana/contracts/legacy/erc20.cairo
(0 hunks)crates/katana/contracts/legacy/test_contract.cairo
(0 hunks)crates/katana/contracts/legacy/universal_deployer.cairo
(0 hunks)crates/katana/contracts/messaging/README.md
(0 hunks)crates/katana/contracts/messaging/anvil.messaging.json
(0 hunks)crates/katana/contracts/messaging/cairo/.gitignore
(0 hunks)crates/katana/contracts/messaging/cairo/Makefile
(0 hunks)crates/katana/contracts/messaging/cairo/Scarb.toml
(0 hunks)crates/katana/contracts/messaging/cairo/account_l2.json
(0 hunks)crates/katana/contracts/messaging/cairo/account_l3.json
(0 hunks)crates/katana/contracts/messaging/cairo/src/appchain_messaging.cairo
(0 hunks)crates/katana/contracts/messaging/cairo/src/contract_1.cairo
(0 hunks)crates/katana/contracts/messaging/cairo/src/contract_msg_l1.cairo
(0 hunks)crates/katana/contracts/messaging/cairo/src/contract_msg_starknet.cairo
(0 hunks)crates/katana/contracts/messaging/cairo/src/lib.cairo
(0 hunks)crates/katana/contracts/messaging/l3.messaging.json
(0 hunks)crates/katana/contracts/messaging/run_e2e.sh
(0 hunks)crates/katana/contracts/messaging/solidity/.anvil.env
(0 hunks)crates/katana/contracts/messaging/solidity/.gitignore
(0 hunks)crates/katana/contracts/messaging/solidity/IStarknetMessagingLocal_ABI.json
(0 hunks)crates/katana/contracts/messaging/solidity/Makefile
(0 hunks)crates/katana/contracts/messaging/solidity/README.md
(0 hunks)crates/katana/contracts/messaging/solidity/foundry.toml
(0 hunks)crates/katana/contracts/messaging/solidity/lib/forge-std
(0 hunks)crates/katana/contracts/messaging/solidity/lib/starknet/IStarknetMessaging.sol
(0 hunks)crates/katana/contracts/messaging/solidity/lib/starknet/IStarknetMessagingEvents.sol
(0 hunks)crates/katana/contracts/messaging/solidity/lib/starknet/NamedStorage.sol
(0 hunks)crates/katana/contracts/messaging/solidity/lib/starknet/StarknetMessaging.sol
(0 hunks)crates/katana/contracts/messaging/solidity/script/LocalTesting.s.sol
(0 hunks)crates/katana/contracts/messaging/solidity/src/Contract1.sol
(0 hunks)crates/katana/contracts/messaging/solidity/src/StarknetMessagingLocal.sol
(0 hunks)crates/katana/contracts/misc/Scarb.toml
(0 hunks)crates/katana/contracts/misc/src/lib.cairo
(0 hunks)crates/katana/contracts/piltover
(0 hunks)crates/katana/contracts/snfoundry.toml
(0 hunks)crates/katana/controller/Cargo.toml
(0 hunks)crates/katana/controller/src/lib.rs
(0 hunks)crates/katana/controller/src/webauthn.rs
(0 hunks)crates/katana/core/Cargo.toml
(0 hunks)crates/katana/core/benches/commit.rs
(0 hunks)crates/katana/core/src/backend/contract.rs
(0 hunks)crates/katana/core/src/backend/gas_oracle.rs
(0 hunks)crates/katana/core/src/backend/mod.rs
(0 hunks)crates/katana/core/src/backend/storage.rs
(0 hunks)crates/katana/core/src/constants.rs
(0 hunks)crates/katana/core/src/env.rs
(0 hunks)crates/katana/core/src/lib.rs
(0 hunks)crates/katana/core/src/service/block_producer.rs
(0 hunks)crates/katana/core/src/service/block_producer_tests.rs
(0 hunks)crates/katana/core/src/service/metrics.rs
(0 hunks)crates/katana/core/src/service/mod.rs
(0 hunks)crates/katana/core/src/utils/mod.rs
(0 hunks)crates/katana/core/tests/backend.rs
(0 hunks)crates/katana/docs/database.md
(0 hunks)crates/katana/docs/pipeline.md
(0 hunks)crates/katana/executor/.env.cairo-native
(0 hunks)crates/katana/executor/Cargo.toml
(0 hunks)crates/katana/executor/README.md
(0 hunks)crates/katana/executor/benches/concurrent.rs
(0 hunks)crates/katana/executor/benches/execution.rs
(0 hunks)crates/katana/executor/benches/utils.rs
(0 hunks)crates/katana/executor/src/abstraction/executor.rs
(0 hunks)crates/katana/executor/src/abstraction/mod.rs
(0 hunks)crates/katana/executor/src/error.rs
(0 hunks)crates/katana/executor/src/implementation/blockifier/call.rs
(0 hunks)crates/katana/executor/src/implementation/blockifier/error.rs
(0 hunks)crates/katana/executor/src/implementation/blockifier/mod.rs
(0 hunks)crates/katana/executor/src/implementation/blockifier/state.rs
(0 hunks)crates/katana/executor/src/implementation/blockifier/utils.rs
(0 hunks)crates/katana/executor/src/implementation/mod.rs
(0 hunks)crates/katana/executor/src/implementation/noop.rs
(0 hunks)crates/katana/executor/src/lib.rs
(0 hunks)crates/katana/executor/src/utils.rs
(0 hunks)crates/katana/executor/tests/executor.rs
(0 hunks)crates/katana/executor/tests/fixtures/call_test.json
(0 hunks)crates/katana/executor/tests/fixtures/contract.json
(0 hunks)
💤 Files with no reviewable changes (106)
- crates/katana/contracts/README.md
- crates/katana/contracts/messaging/cairo/.gitignore
- crates/katana/contracts/messaging/solidity/lib/forge-std
- crates/dojo/test-utils/src/lib.rs
- crates/katana/contracts/piltover
- crates/katana/contracts/messaging/l3.messaging.json
- crates/katana/contracts/account/Scarb.toml
- crates/katana/contracts/messaging/cairo/Scarb.toml
- crates/katana/contracts/snfoundry.toml
- crates/katana/contracts/messaging/cairo/src/lib.cairo
- crates/katana/contracts/legacy/README.md
- crates/katana/executor/.env.cairo-native
- crates/katana/contracts/misc/src/lib.cairo
- crates/katana/contracts/messaging/solidity/.gitignore
- crates/katana/executor/src/implementation/mod.rs
- crates/katana/cli/test-data/genesis.json
- crates/katana/contracts/messaging/solidity/README.md
- crates/katana/core/src/utils/mod.rs
- crates/katana/contracts/.tool-versions
- crates/katana/contracts/Scarb.toml
- crates/katana/executor/tests/fixtures/contract.json
- crates/katana/contracts/messaging/anvil.messaging.json
- crates/katana/contracts/messaging/cairo/account_l3.json
- crates/katana/executor/README.md
- crates/katana/contracts/Makefile
- crates/katana/controller/Cargo.toml
- crates/katana/contracts/messaging/solidity/foundry.toml
- crates/katana/core/src/env.rs
- crates/katana/cli/src/lib.rs
- crates/katana/executor/src/lib.rs
- crates/katana/docs/database.md
- crates/katana/contracts/misc/Scarb.toml
- crates/katana/core/src/service/block_producer_tests.rs
- crates/katana/docs/pipeline.md
- crates/katana/contracts/messaging/solidity/IStarknetMessagingLocal_ABI.json
- crates/katana/contracts/messaging/solidity/.anvil.env
- crates/katana/executor/Cargo.toml
- crates/katana/core/src/service/metrics.rs
- crates/katana/core/src/backend/contract.rs
- crates/katana/contracts/messaging/solidity/Makefile
- crates/katana/executor/tests/fixtures/call_test.json
- crates/katana/executor/benches/execution.rs
- crates/katana/contracts/legacy/account_with_dummy_validate.cairo
- crates/dojo/test-utils/Cargo.toml
- crates/katana/contracts/messaging/solidity/script/LocalTesting.s.sol
- crates/katana/contracts/messaging/run_e2e.sh
- crates/katana/contracts/account/src/lib.cairo
- crates/katana/contracts/legacy/universal_deployer.cairo
- crates/katana/chain-spec/Cargo.toml
- crates/katana/cli/Cargo.toml
- crates/katana/controller/src/webauthn.rs
- crates/dojo/test-utils/src/rpc.rs
- crates/katana/chain-spec/src/rollup/mod.rs
- crates/katana/executor/benches/utils.rs
- crates/katana/cairo/Cargo.toml
- crates/katana/core/Cargo.toml
- crates/katana/chain-spec/src/lib.rs
- crates/katana/contracts/messaging/solidity/src/StarknetMessagingLocal.sol
- crates/katana/executor/src/utils.rs
- crates/katana/core/src/service/mod.rs
- crates/katana/executor/src/implementation/blockifier/error.rs
- crates/katana/contracts/messaging/solidity/src/Contract1.sol
- crates/katana/executor/benches/concurrent.rs
- crates/katana/executor/src/implementation/blockifier/call.rs
- crates/katana/contracts/messaging/cairo/src/contract_msg_starknet.cairo
- crates/katana/contracts/build/universal_deployer.json
- crates/katana/executor/src/error.rs
- crates/katana/cli/src/file.rs
- crates/katana/cli/src/args.rs
- crates/katana/contracts/messaging/cairo/account_l2.json
- crates/dojo/test-utils/src/sequencer.rs
- crates/katana/cli/src/options.rs
- crates/katana/chain-spec/src/rollup/utils.rs
- crates/katana/contracts/messaging/cairo/src/appchain_messaging.cairo
- crates/katana/executor/src/implementation/blockifier/state.rs
- crates/katana/core/src/backend/storage.rs
- crates/katana/contracts/messaging/README.md
- crates/katana/contracts/.gitignore
- crates/katana/controller/src/lib.rs
- crates/katana/core/tests/backend.rs
- crates/katana/contracts/messaging/solidity/lib/starknet/IStarknetMessaging.sol
- crates/katana/executor/src/abstraction/mod.rs
- crates/katana/core/src/backend/gas_oracle.rs
- crates/katana/cli/src/utils.rs
- crates/katana/cairo/src/lib.rs
- crates/katana/chain-spec/src/dev.rs
- crates/katana/contracts/build/account_with_dummy_validate.sierra.json
- crates/katana/executor/tests/executor.rs
- crates/katana/contracts/messaging/solidity/lib/starknet/IStarknetMessagingEvents.sol
- crates/katana/core/src/lib.rs
- crates/katana/contracts/messaging/solidity/lib/starknet/StarknetMessaging.sol
- crates/katana/core/src/backend/mod.rs
- crates/katana/core/src/constants.rs
- crates/katana/executor/src/abstraction/executor.rs
- crates/katana/executor/src/implementation/blockifier/utils.rs
- crates/katana/contracts/messaging/cairo/src/contract_1.cairo
- crates/katana/core/benches/commit.rs
- crates/katana/core/src/service/block_producer.rs
- crates/katana/contracts/legacy/test_contract.cairo
- crates/katana/contracts/messaging/cairo/src/contract_msg_l1.cairo
- crates/katana/executor/src/implementation/noop.rs
- crates/katana/contracts/messaging/solidity/lib/starknet/NamedStorage.sol
- crates/katana/chain-spec/src/rollup/file.rs
- crates/katana/executor/src/implementation/blockifier/mod.rs
- crates/katana/contracts/legacy/erc20.cairo
- crates/katana/contracts/messaging/cairo/Makefile
🧰 Additional context used
🧠 Learnings (2)
crates/dojo/utils/src/tx/mod.rs (1)
Learnt from: glihm
PR: dojoengine/dojo#2650
File: crates/dojo/utils/src/tx/mod.rs:201-272
Timestamp: 2024-11-07T14:43:23.530Z
Learning: In `crates/dojo/utils/src/tx/mod.rs`, fee token configurations are verified when the `fee_config` is built, making additional validations in the `send_with_cfg` methods redundant.
bin/sozo/src/commands/options/transaction.rs (1)
Learnt from: glihm
PR: dojoengine/dojo#2650
File: crates/dojo/utils/src/tx/mod.rs:201-272
Timestamp: 2024-11-07T14:43:23.530Z
Learning: In `crates/dojo/utils/src/tx/mod.rs`, fee token configurations are verified when the `fee_config` is built, making additional validations in the `send_with_cfg` methods redundant.
🔇 Additional comments (47)
crates/dojo/core-cairo-test/Scarb.toml (3)
2-2
: Ohayo sensei! Cairo version upgrade looks good!You've successfully bumped the Cairo version to 2.10.1 which aligns perfectly with the PR objective.
12-12
: Starknet dependency properly aligned with Cairo version!You've kept the Starknet dependency in sync with the Cairo version, maintaining compatibility between the components.
16-16
: Dev dependency version properly updated, sensei!The cairo_test dev dependency has been correctly updated to match the Cairo version.
crates/dojo/core/Scarb.toml (3)
2-2
: Ohayo sensei! Cairo version upgrade looking good here too!The cairo-version has been correctly updated to 2.10.1 in the core package.
9-9
: Starknet dependency properly aligned!Keeping the starknet dependency at the same version as Cairo ensures compatibility.
14-14
: Dev dependency properly updated!The cairo_test dev dependency has been correctly updated to match the main Cairo version.
crates/dojo/test-utils/src/compiler.rs (2)
11-11
: Ohayo sensei! Updated import to include CompilationUnitsOpts!You've correctly updated the import to include the new CompilationUnitsOpts struct that's needed for the API changes in the newer Scarb version.
322-325
: API adaptation looks good, but check the version checking behavior!You've correctly adapted to the Scarb API changes by using CompilationUnitsOpts instead of passing boolean flags directly. However, I noticed that previously it appears
ignore_cairo_version
was set totrue
, but now it'sfalse
. This means you're now enforcing Cairo version checks rather than ignoring mismatches.This change in behavior makes sense given the PR's goal of upgrading to a specific Cairo version, but just wanted to make sure this is intentional!
crates/dojo/lang/Scarb.toml (1)
3-3
: Ohayo sensei! Plugin version properly updated!You've correctly updated the dojo_plugin version to match the Cairo version (2.10.1), ensuring compatibility across the ecosystem.
bin/katana/Cargo.toml (1)
28-28
: Ohayo sensei! Updated piltover revision looks good.The revision change from
4cdda5a
to45263e8
aligns perfectly with the PR objective of removing Katana dependencies. As mentioned in the comment above, this is just a binding change, so it shouldn't affect functionality.bin/dojo-language-server/Cargo.toml (1)
9-9
: Ohayo! Commenting out cairo-language-server dependency looks correct.This change works harmoniously with the commented-out code in the main.rs file and matches the PR objective of upgrading Cairo to 2.10 while removing unnecessary dependencies.
crates/dojo/world/abigen/src/main.rs (2)
18-18
: Ohayo sensei! Good addition of ExecutionVersion import.Adding the ExecutionVersion import is clean and follows good Rust practices by explicitly importing the symbols used in the code.
69-69
: Migration to ExecutionVersion::V3 looks solid!Setting the execution version to V3 explicitly is an excellent practice that ensures consistency across the codebase as part of the Cairo 2.10 upgrade. This change matches updates in other files where execution methods were upgraded from V1 to V3.
bin/dojo-language-server/src/main.rs (2)
1-3
: Ohayo! Language server imports removed as expected.Commenting out these imports aligns with the commented-out dependencies in the Cargo.toml file, which is consistent with the PR goal of removing Katana dependencies.
13-15
:❓ Verification inconclusive
Is the language server functionality completely disabled now?
With these lines commented out, the language server no longer starts and the program just parses arguments without doing anything useful. Is this intentional behavior or should there be an alternative implementation?
🏁 Script executed:
#!/bin/bash # Check if there's an alternative way to start the language server in the codebase echo "Searching for alternative language server implementations..." rg -A 3 "language_server" --type rustLength of output: 556
🏁 Script executed:
#!/bin/bash # Show the full contents of main.rs to verify if there's any alternative startup logic cat bin/dojo-language-server/src/main.rsLength of output: 485
ohayo sensei! Confirm language server startup
It looks like all of the language‑server initialization in
bin/dojo-language-server/src/main.rs
has been commented out, leavingmain()
to only parse args and exit:
- Lines 8–14 in
main.rs
(theTricks::default()
setup andstart_with_tricks
call) are disabled.Is it intentional that the LSP is fully disabled? If not, please restore or replace this startup logic so the language server actually runs.
bin/sozo/src/utils.rs (3)
35-35
: Ohayo! Local constant definition simplifies dependenciesThis change replaces the imported
RPC_SPEC_VERSION
from katana-rpc-api with a local constant definition, helping to remove the Katana dependency while maintaining the same functionality.
157-163
: LGTM sensei! Version compatibility check is properly maintainedThe compatibility check continues to work correctly with the locally defined
RPC_SPEC_VERSION
constant. This ensures that clients connecting to Starknet nodes with different spec versions will receive appropriate error messages.
308-313
: Test cases confirm backward compatibility, excellent work!The test cases properly verify the backward compatibility between version 0.7.1 and 0.6.0, ensuring that the local constant definition doesn't break existing functionality.
crates/dojo/utils/Cargo.toml (4)
10-10
: Ohayo, new dependency added correctly!Adding the
colored_json
dependency directly to the workspace ensures that the functionality previously provided through Katana is still available.
14-14
: Direct dependency on serde_json looks good, sensei!Adding
serde_json
as a direct dependency ensures JSON serialization/deserialization capabilities are maintained without relying on Katana.
17-17
: Consistent formatting for tokio features - nice!The spacing in the features list improves readability while ensuring the same functionality is maintained.
23-23
: Good approach using katana-runner as a dev dependencyMoving from direct Katana dependencies to just using
katana-runner
as a dev dependency aligns perfectly with the PR objectives of simplifying Katana integration.bin/sozo/Cargo.toml (4)
39-39
: Ohayo! Consistent formatting for tabled featuresThe spacing in the features list improves readability while maintaining the same functionality.
47-47
: Clean formatting for reqwest dependency, sensei!Adding spaces within the brackets for feature specifications improves readability.
50-51
: Appropriate dev dependencies setupThe formatting improvement for
dojo-test-utils
and the addition ofkatana-runner
as a dev dependency correctly supports the goal of removing direct Katana dependencies.
56-59
: Consistent feature definitions - nice work!The formatting improvements for feature definitions enhance readability while maintaining the same functionality.
crates/dojo/utils/src/tx/declarer.rs (3)
19-19
: Ohayo! Simplified imports look goodThe imports have been streamlined, which helps maintain cleaner code while removing unnecessary Katana-related dependencies.
104-108
: Excellent simplification of class declaration logic, sensei!The code has been simplified to unconditionally use
declare_v3
instead of conditionally choosing between different declaration methods based on fee configuration. This reduces complexity and makes the code more maintainable.
117-126
: Transaction waiting logic maintained correctlyThe logic for handling transaction waiting and receipt generation has been preserved while simplifying the declaration process, ensuring that the functionality remains intact.
crates/dojo/utils/src/tx/deployer.rs (2)
12-12
: Ohayo! Import list simplified for clarity.The imports have been streamlined by removing the
FeeConfig
which is no longer needed after consolidating the fee configuration logic.
81-82
: Excellent simplification, sensei!The code has been streamlined by removing conditional branching based on fee configuration variants (
Strk
vsEth
), now unconditionally usingexecute_v3
for deployment. This aligns with the broader refactoring to consolidate fee configuration throughout the codebase.crates/dojo/utils/src/tx/invoker.rs (2)
57-57
: Ohayo! Transaction invocation simplified nicely.This line has been refactored to unconditionally use
execute_v3
instead of branching on fee configuration variants, making the code cleaner and more maintainable.
81-82
: Nice multicall simplification, sensei!Similar to the single call invocation, the multicall execution has been streamlined to unconditionally use
execute_v3
, removing conditional logic that's no longer needed after the fee configuration refactoring.bin/sozo/src/commands/call.rs (2)
144-147
: Ohayo! Enhanced error formatting.The error message now uses the new
format_execution_error
function to provide clearer and more detailed error information, especially for nested contract errors.
160-170
: Excellent error handling improvement, sensei!This new helper function recursively formats nested contract execution errors, providing a clear hierarchical display of error traces that includes contract addresses and selectors. This will significantly improve the debugging experience when errors occur in contract calls that involve multiple contracts.
crates/dojo/utils/src/tx/waiter.rs (4)
308-308
: Ohayo! Test dependencies updated.Switched from custom test utilities to the
katana_runner::RunnerCtx
for managing test contexts, aligning with the broader removal of Katana workspace components.
312-314
: Type imports simplified, sensei!Streamlined imports by removing unused types related to the old sequencer infrastructure, keeping only what's necessary for the current implementation.
322-323
: Clean constant simplification.The
EXECUTION_RESOURCES
constant has been simplified to a flat struct with zeroed gas fields, which is cleaner and more maintainable.
362-366
: Ohayo! Test framework modernized, sensei!Updated the test to use the new
katana_runner::test
annotation and accept aRunnerCtx
parameter instead of creating a sequencer internally. This aligns with the broader architectural shift to use external test infrastructure instead of internal implementations.bin/sozo/src/commands/options/transaction.rs (1)
77-104
: LGTM – solid unit coverage.The test verifies
FeeConfig
propagation end‑to‑end and will catch future regressions; nice one!crates/dojo/utils/src/tx/error.rs (1)
49-56
: Pattern match may miss new Starknet error variants.With the 0.14 bump,
ValidationFailure
was renamed toTransactionValidationError
(see upstream changelog). Matching the old variant will cause this arm to be unreachable, falling through to the genericProvider
variant and losing granularity.Double‑check the updated enum and adjust accordingly; a compile error might already flag this, but catching it here avoids red builds.
crates/dojo/utils/src/tx/mod.rs (1)
24-30
: Ohayo sensei — UnifiedFeeConfig
looks solidThe move to a single struct with
Option
als forgas
&gas_price
greatly simplifies downstream handling and keeps the API future‑proof. Nice cleanup!bin/sozo/src/commands/options/account/controller.rs (1)
31-38
: Ohayo sensei — new provider signature LGTMAccepting
CartridgeJsonRpcProvider
by value and moving it into theSessionAccount
feels ergonomic and keeps borrow management simple.Cargo.toml (2)
49-53
: Pinning to a branch & commit – please double‑check reproducibilitySwitching
cainome*
to a branch (relax-version
) can make builds nondeterministic if that branch moves. Consider locking to a specificrev
like you did forkatana-runner
, or add a CI check that fails when the branch tip changes.
93-94
: Katana exorcised, but runner commit is dated
katana-runner
is hard‑pinned to9c48b91
. Ensure this commit includes the Cairo 2.10 compatibility fixes; otherwise the workspace may compile but misbehave at runtime.bin/sozo/src/commands/options/account/mod.rs (1)
108-117
: Arc‑wrapped provider may not satisfyProvider
provider.chain_id().await?
relies on animpl Provider
forArc<P>
.
If the crate that definesProvider
doesn’t include a blanket implementation forArc<P>
, this will not compile. Please double‑check or add:impl<P: Provider + ?Sized> Provider for std::sync::Arc<P> { … }if it’s missing.
crates/dojo/world/src/contracts/abigen/world.rs (1)
3561-3561
: Ohayo! Updated contract execution to use V3 API.This change upgrades all contract execution methods from using
ExecutionV1
toExecutionV3
, which aligns with the Cairo 2.10 update mentioned in the PR objectives. The transition to V3 execution removes dependencies on Katana and standardizes the execution approach across the codebase.The change is consistently applied across all write operations while preserving read-only operations, showing a clean migration path.
Also applies to: 3572-3572, 3600-3600, 3611-3611, 3639-3639, 3650-3650, 3678-3678, 3689-3689, 3714-3714, 3724-3724, 3749-3749, 3759-3759, 3784-3784, 3794-3794, 3822-3822, 3833-3833, 3858-3858, 3868-3868, 3899-3899, 3911-3911, 3936-3936, 3946-3946, 3968-3968, 3977-3977, 4002-4002, 4012-4012, 4037-4037, 4047-4047, 4078-4078, 4090-4090, 4121-4121, 4133-4133, 4149-4149, 4158-4158, 4180-4180, 4189-4189, 4214-4214, 4224-4224, 4249-4249, 4259-4259, 4284-4284, 4294-4294, 4309-4309, 4317-4317
|
||
async fn add_invoke_transaction<I>( | ||
&self, | ||
invoke_transaction: I, | ||
) -> Result<InvokeTransactionResult, ProviderError> | ||
where | ||
I: AsRef<BroadcastedInvokeTransaction> + Send + Sync, | ||
{ | ||
match self { | ||
Self::Left(p) => p.add_invoke_transaction(invoke_transaction).await, | ||
Self::Right(q) => q.add_invoke_transaction(invoke_transaction).await, | ||
} | ||
} | ||
|
||
async fn add_declare_transaction<D>( | ||
&self, | ||
declare_transaction: D, | ||
) -> Result<DeclareTransactionResult, ProviderError> | ||
where | ||
D: AsRef<BroadcastedDeclareTransaction> + Send + Sync, | ||
{ | ||
match self { | ||
Self::Left(p) => p.add_declare_transaction(declare_transaction).await, | ||
Self::Right(q) => q.add_declare_transaction(declare_transaction).await, | ||
} | ||
} | ||
|
||
async fn add_deploy_account_transaction<D>( | ||
&self, | ||
deploy_account_transaction: D, | ||
) -> Result<DeployAccountTransactionResult, ProviderError> | ||
where | ||
D: AsRef<BroadcastedDeployAccountTransaction> + Send + Sync, | ||
{ | ||
match self { | ||
Self::Left(p) => p.add_deploy_account_transaction(deploy_account_transaction).await, | ||
Self::Right(q) => q.add_deploy_account_transaction(deploy_account_transaction).await, | ||
} | ||
} | ||
|
||
async fn trace_transaction<H>( | ||
&self, | ||
transaction_hash: H, | ||
) -> Result<TransactionTrace, ProviderError> | ||
where | ||
H: AsRef<Felt> + Send + Sync, | ||
{ | ||
match self { | ||
Self::Left(p) => p.trace_transaction(transaction_hash).await, | ||
Self::Right(q) => q.trace_transaction(transaction_hash).await, | ||
} | ||
} | ||
|
||
async fn simulate_transactions<B, T, S>( | ||
&self, | ||
block_id: B, | ||
transactions: T, | ||
simulation_flags: S, | ||
) -> Result<Vec<SimulatedTransaction>, ProviderError> | ||
where | ||
B: AsRef<BlockId> + Send + Sync, | ||
T: AsRef<[BroadcastedTransaction]> + Send + Sync, | ||
S: AsRef<[SimulationFlag]> + Send + Sync, | ||
{ | ||
match self { | ||
Self::Left(p) => { | ||
p.simulate_transactions(block_id, transactions, simulation_flags).await | ||
} | ||
Self::Right(q) => { | ||
q.simulate_transactions(block_id, transactions, simulation_flags).await | ||
} | ||
} | ||
} | ||
|
||
async fn trace_block_transactions<B>( | ||
&self, | ||
block_id: B, | ||
) -> Result<Vec<TransactionTraceWithHash>, ProviderError> | ||
where | ||
B: AsRef<BlockId> + Send + Sync, | ||
{ | ||
match self { | ||
Self::Left(p) => p.trace_block_transactions(block_id).await, | ||
Self::Right(q) => q.trace_block_transactions(block_id).await, | ||
} | ||
} | ||
|
||
async fn batch_requests<R>( | ||
&self, | ||
requests: R, | ||
) -> Result<Vec<ProviderResponseData>, ProviderError> | ||
where | ||
R: AsRef<[ProviderRequestData]> + Send + Sync, | ||
{ | ||
match self { | ||
Self::Left(p) => p.batch_requests(requests).await, | ||
Self::Right(q) => q.batch_requests(requests).await, | ||
} | ||
} | ||
} |
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.
🛠️ Refactor suggestion
Macro‑ify the 400‑line match boiler‑plate.
The current impl faithfully forwards every Provider
method, but at the price of ~420 lines of repetition that will inevitably drift when the upstream trait adds or renames a method.
A tiny helper macro keeps the file bite‑sized and maintenance‑proof:
macro_rules! delegate {
($($fname:ident($($arg:ident : $atype:ty),*) -> $ret:ty),* $(,)?) => {
$(async fn $fname<$($arg),*>(&self, $($arg: $arg),*) -> $ret
where $( $arg: Send + Sync ,)* {
match self {
Self::Left(p) => p.$fname($($arg),*).await,
Self::Right(q) => q.$fname($($arg),*).await,
}
})*
};
}
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl<P,Q> Provider for EitherProvider<P,Q>
where
P: Provider + Send + Sync,
Q: Provider + Send + Sync,
{
delegate!(
spec_version() -> Result<String, ProviderError>,
get_block_with_tx_hashes<B>(block_id: B) -> Result<MaybePendingBlockWithTxHashes, ProviderError>,
/* …repeat for all methods… */
);
}
End result: <100 lines, 0 duplication, updates cost one extra macro line.
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: 3
🧹 Nitpick comments (1)
Dockerfile (1)
17-23
: Ohayo sensei! Optimize package installation in the base stageTo further slim the final image and ensure non-interactive installs, consider:
- Using
--no-install-recommends
to avoid extra packages- Setting
DEBIAN_FRONTEND=noninteractive
- Using
install -D -m 755
to copytini
with correct permissionsExample refactor:
FROM ubuntu:24.04 AS base - RUN apt-get update && \ - apt-get install -y curl ca-certificates tini && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* && \ - cp /usr/bin/tini /tini +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && \ + apt-get install -y --no-install-recommends curl ca-certificates tini && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* && \ + install -D -m 755 /usr/bin/tini /tini
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)
⛔ Files ignored due to path filters (6)
Cargo.lock
is excluded by!**/*.lock
crates/dojo/core-cairo-test/Scarb.lock
is excluded by!**/*.lock
crates/dojo/core/Scarb.lock
is excluded by!**/*.lock
crates/dojo/lang/Scarb.lock
is excluded by!**/*.lock
crates/katana/contracts/Scarb.lock
is excluded by!**/*.lock
crates/katana/contracts/messaging/cairo/Scarb.lock
is excluded by!**/*.lock
📒 Files selected for processing (144)
.devcontainer/devcontainer.json
(1 hunks).github/workflows/bench.yml
(2 hunks).github/workflows/ci.yml
(6 hunks).github/workflows/release-dispatch.yml
(1 hunks).github/workflows/release.yml
(2 hunks)Cargo.toml
(3 hunks)DEVELOPMENT.md
(1 hunks)Dockerfile
(2 hunks)bin/dojo-language-server/Cargo.toml
(1 hunks)bin/dojo-language-server/src/main.rs
(2 hunks)bin/katana/src/cli/init/mod.rs
(4 hunks)bin/katana/src/cli/init/settlement.rs
(1 hunks)bin/sozo/Cargo.toml
(1 hunks)bin/sozo/src/commands/options/account/mod.rs
(3 hunks)bin/sozo/src/commands/options/account/provider.rs
(1 hunks)bin/sozo/src/main.rs
(1 hunks)bin/sozo/src/utils.rs
(1 hunks)crates/dojo/core-cairo-test/Scarb.toml
(2 hunks)crates/dojo/core/Scarb.toml
(1 hunks)crates/dojo/lang/Scarb.toml
(1 hunks)crates/dojo/test-utils/Cargo.toml
(0 hunks)crates/dojo/test-utils/src/compiler.rs
(2 hunks)crates/dojo/test-utils/src/lib.rs
(0 hunks)crates/dojo/test-utils/src/rpc.rs
(0 hunks)crates/dojo/test-utils/src/sequencer.rs
(0 hunks)crates/dojo/utils/Cargo.toml
(1 hunks)crates/dojo/utils/src/tx/waiter.rs
(2 hunks)crates/katana/cairo/Cargo.toml
(0 hunks)crates/katana/cairo/src/lib.rs
(0 hunks)crates/katana/chain-spec/Cargo.toml
(0 hunks)crates/katana/chain-spec/src/dev.rs
(0 hunks)crates/katana/chain-spec/src/lib.rs
(0 hunks)crates/katana/chain-spec/src/rollup/file.rs
(0 hunks)crates/katana/chain-spec/src/rollup/mod.rs
(0 hunks)crates/katana/chain-spec/src/rollup/utils.rs
(0 hunks)crates/katana/cli/Cargo.toml
(0 hunks)crates/katana/cli/src/args.rs
(0 hunks)crates/katana/cli/src/file.rs
(0 hunks)crates/katana/cli/src/lib.rs
(0 hunks)crates/katana/cli/src/options.rs
(0 hunks)crates/katana/cli/src/utils.rs
(0 hunks)crates/katana/cli/test-data/genesis.json
(0 hunks)crates/katana/contracts/.gitignore
(0 hunks)crates/katana/contracts/.tool-versions
(0 hunks)crates/katana/contracts/Makefile
(0 hunks)crates/katana/contracts/README.md
(0 hunks)crates/katana/contracts/Scarb.toml
(0 hunks)crates/katana/contracts/account/Scarb.toml
(0 hunks)crates/katana/contracts/account/src/lib.cairo
(0 hunks)crates/katana/contracts/build/account_with_dummy_validate.sierra.json
(0 hunks)crates/katana/contracts/build/universal_deployer.json
(0 hunks)crates/katana/contracts/legacy/README.md
(0 hunks)crates/katana/contracts/legacy/account_with_dummy_validate.cairo
(0 hunks)crates/katana/contracts/legacy/erc20.cairo
(0 hunks)crates/katana/contracts/legacy/test_contract.cairo
(0 hunks)crates/katana/contracts/legacy/universal_deployer.cairo
(0 hunks)crates/katana/contracts/messaging/README.md
(0 hunks)crates/katana/contracts/messaging/anvil.messaging.json
(0 hunks)crates/katana/contracts/messaging/cairo/.gitignore
(0 hunks)crates/katana/contracts/messaging/cairo/Makefile
(0 hunks)crates/katana/contracts/messaging/cairo/Scarb.toml
(0 hunks)crates/katana/contracts/messaging/cairo/account_l2.json
(0 hunks)crates/katana/contracts/messaging/cairo/account_l3.json
(0 hunks)crates/katana/contracts/messaging/cairo/src/appchain_messaging.cairo
(0 hunks)crates/katana/contracts/messaging/cairo/src/contract_1.cairo
(0 hunks)crates/katana/contracts/messaging/cairo/src/contract_msg_l1.cairo
(0 hunks)crates/katana/contracts/messaging/cairo/src/contract_msg_starknet.cairo
(0 hunks)crates/katana/contracts/messaging/cairo/src/lib.cairo
(0 hunks)crates/katana/contracts/messaging/l3.messaging.json
(0 hunks)crates/katana/contracts/messaging/run_e2e.sh
(0 hunks)crates/katana/contracts/messaging/solidity/.anvil.env
(0 hunks)crates/katana/contracts/messaging/solidity/.gitignore
(0 hunks)crates/katana/contracts/messaging/solidity/IStarknetMessagingLocal_ABI.json
(0 hunks)crates/katana/contracts/messaging/solidity/Makefile
(0 hunks)crates/katana/contracts/messaging/solidity/README.md
(0 hunks)crates/katana/contracts/messaging/solidity/foundry.toml
(0 hunks)crates/katana/contracts/messaging/solidity/lib/forge-std
(0 hunks)crates/katana/contracts/messaging/solidity/lib/starknet/IStarknetMessaging.sol
(0 hunks)crates/katana/contracts/messaging/solidity/lib/starknet/IStarknetMessagingEvents.sol
(0 hunks)crates/katana/contracts/messaging/solidity/lib/starknet/NamedStorage.sol
(0 hunks)crates/katana/contracts/messaging/solidity/lib/starknet/StarknetMessaging.sol
(0 hunks)crates/katana/contracts/messaging/solidity/script/LocalTesting.s.sol
(0 hunks)crates/katana/contracts/messaging/solidity/src/Contract1.sol
(0 hunks)crates/katana/contracts/messaging/solidity/src/StarknetMessagingLocal.sol
(0 hunks)crates/katana/contracts/misc/Scarb.toml
(0 hunks)crates/katana/contracts/misc/src/lib.cairo
(0 hunks)crates/katana/contracts/piltover
(0 hunks)crates/katana/contracts/snfoundry.toml
(0 hunks)crates/katana/controller/Cargo.toml
(0 hunks)crates/katana/controller/src/lib.rs
(0 hunks)crates/katana/controller/src/webauthn.rs
(0 hunks)crates/katana/core/Cargo.toml
(0 hunks)crates/katana/core/benches/commit.rs
(0 hunks)crates/katana/core/src/backend/contract.rs
(0 hunks)crates/katana/core/src/backend/gas_oracle.rs
(0 hunks)crates/katana/core/src/backend/mod.rs
(0 hunks)crates/katana/core/src/backend/storage.rs
(0 hunks)crates/katana/core/src/constants.rs
(0 hunks)crates/katana/core/src/env.rs
(0 hunks)crates/katana/core/src/lib.rs
(0 hunks)crates/katana/core/src/service/block_producer.rs
(0 hunks)crates/katana/core/src/service/block_producer_tests.rs
(0 hunks)crates/katana/core/src/service/metrics.rs
(0 hunks)crates/katana/core/src/service/mod.rs
(0 hunks)crates/katana/core/src/utils/mod.rs
(0 hunks)crates/katana/core/tests/backend.rs
(0 hunks)crates/katana/docs/database.md
(0 hunks)crates/katana/docs/pipeline.md
(0 hunks)crates/katana/executor/.env.cairo-native
(0 hunks)crates/katana/executor/Cargo.toml
(0 hunks)crates/katana/executor/README.md
(0 hunks)crates/katana/executor/benches/concurrent.rs
(0 hunks)crates/katana/executor/benches/execution.rs
(0 hunks)crates/katana/executor/benches/utils.rs
(0 hunks)crates/katana/executor/src/abstraction/executor.rs
(0 hunks)crates/katana/executor/src/abstraction/mod.rs
(0 hunks)crates/katana/executor/src/error.rs
(0 hunks)crates/katana/executor/src/implementation/blockifier/call.rs
(0 hunks)crates/katana/executor/src/implementation/blockifier/error.rs
(0 hunks)crates/katana/executor/src/implementation/blockifier/mod.rs
(0 hunks)crates/katana/executor/src/implementation/blockifier/state.rs
(0 hunks)crates/katana/executor/src/implementation/blockifier/utils.rs
(0 hunks)crates/katana/executor/src/implementation/mod.rs
(0 hunks)crates/katana/executor/src/implementation/noop.rs
(0 hunks)crates/katana/executor/src/lib.rs
(0 hunks)crates/katana/executor/src/utils.rs
(0 hunks)crates/katana/executor/tests/executor.rs
(0 hunks)crates/katana/executor/tests/fixtures/call_test.json
(0 hunks)crates/katana/executor/tests/fixtures/contract.json
(0 hunks)crates/katana/executor/tests/fixtures/mod.rs
(0 hunks)crates/katana/executor/tests/fixtures/transaction.rs
(0 hunks)crates/katana/executor/tests/simulate.rs
(0 hunks)crates/katana/explorer/Cargo.toml
(0 hunks)crates/katana/explorer/README.md
(0 hunks)crates/katana/explorer/build.rs
(0 hunks)crates/katana/explorer/src/lib.rs
(0 hunks)crates/katana/explorer/ui
(0 hunks)crates/katana/feeder-gateway/Cargo.toml
(0 hunks)crates/katana/feeder-gateway/src/client.rs
(0 hunks)crates/katana/feeder-gateway/src/lib.rs
(0 hunks)crates/katana/feeder-gateway/src/types/mod.rs
(0 hunks)crates/katana/feeder-gateway/src/types/receipt.rs
(0 hunks)crates/katana/feeder-gateway/src/types/serde_utils.rs
(0 hunks)crates/katana/feeder-gateway/src/types/transaction.rs
(0 hunks)
💤 Files with no reviewable changes (121)
- crates/katana/contracts/legacy/README.md
- crates/katana/contracts/.gitignore
- crates/katana/contracts/README.md
- crates/katana/contracts/.tool-versions
- crates/katana/contracts/piltover
- crates/katana/contracts/snfoundry.toml
- crates/katana/contracts/messaging/cairo/.gitignore
- crates/katana/contracts/messaging/solidity/foundry.toml
- crates/katana/contracts/misc/src/lib.cairo
- crates/katana/contracts/messaging/cairo/src/lib.cairo
- crates/katana/contracts/messaging/cairo/account_l2.json
- crates/katana/executor/tests/fixtures/contract.json
- crates/katana/contracts/messaging/solidity/lib/forge-std
- crates/katana/contracts/messaging/solidity/.anvil.env
- crates/katana/contracts/account/Scarb.toml
- crates/dojo/test-utils/src/lib.rs
- crates/katana/contracts/misc/Scarb.toml
- crates/katana/contracts/messaging/l3.messaging.json
- crates/katana/contracts/messaging/cairo/account_l3.json
- crates/dojo/test-utils/Cargo.toml
- crates/katana/contracts/messaging/cairo/Scarb.toml
- crates/katana/contracts/messaging/solidity/.gitignore
- crates/katana/executor/src/implementation/mod.rs
- crates/katana/contracts/messaging/solidity/README.md
- crates/katana/executor/.env.cairo-native
- crates/katana/explorer/ui
- crates/katana/docs/database.md
- crates/katana/contracts/messaging/run_e2e.sh
- crates/katana/core/src/backend/contract.rs
- crates/katana/contracts/messaging/solidity/script/LocalTesting.s.sol
- crates/katana/cli/src/lib.rs
- crates/katana/cli/test-data/genesis.json
- crates/katana/executor/tests/fixtures/call_test.json
- crates/katana/executor/README.md
- crates/katana/contracts/Makefile
- crates/katana/feeder-gateway/src/lib.rs
- crates/katana/core/src/service/block_producer_tests.rs
- crates/katana/executor/src/lib.rs
- crates/katana/core/src/env.rs
- crates/katana/executor/Cargo.toml
- crates/katana/executor/benches/execution.rs
- crates/katana/explorer/Cargo.toml
- crates/katana/feeder-gateway/Cargo.toml
- crates/katana/core/src/utils/mod.rs
- crates/katana/core/src/lib.rs
- crates/katana/chain-spec/Cargo.toml
- crates/katana/core/Cargo.toml
- crates/katana/contracts/account/src/lib.cairo
- crates/katana/contracts/Scarb.toml
- crates/katana/controller/src/webauthn.rs
- crates/katana/cairo/Cargo.toml
- crates/katana/explorer/README.md
- crates/katana/executor/src/abstraction/executor.rs
- crates/katana/contracts/messaging/anvil.messaging.json
- crates/katana/executor/src/utils.rs
- crates/katana/cairo/src/lib.rs
- crates/katana/core/src/service/metrics.rs
- crates/katana/executor/src/error.rs
- crates/katana/contracts/messaging/cairo/src/contract_msg_starknet.cairo
- crates/katana/executor/benches/utils.rs
- crates/katana/core/src/constants.rs
- crates/dojo/test-utils/src/rpc.rs
- crates/katana/docs/pipeline.md
- crates/katana/chain-spec/src/rollup/mod.rs
- crates/katana/contracts/messaging/solidity/lib/starknet/IStarknetMessagingEvents.sol
- crates/katana/contracts/messaging/solidity/src/StarknetMessagingLocal.sol
- crates/katana/contracts/messaging/cairo/Makefile
- crates/katana/contracts/messaging/solidity/Makefile
- crates/katana/contracts/messaging/cairo/src/contract_msg_l1.cairo
- crates/katana/executor/tests/simulate.rs
- crates/katana/contracts/build/universal_deployer.json
- crates/katana/feeder-gateway/src/types/receipt.rs
- crates/katana/cli/Cargo.toml
- crates/katana/chain-spec/src/lib.rs
- crates/katana/feeder-gateway/src/types/serde_utils.rs
- crates/katana/contracts/legacy/universal_deployer.cairo
- crates/katana/executor/tests/fixtures/transaction.rs
- crates/katana/executor/src/implementation/blockifier/error.rs
- crates/katana/core/src/backend/storage.rs
- crates/katana/core/src/service/mod.rs
- crates/katana/cli/src/file.rs
- crates/katana/executor/src/abstraction/mod.rs
- crates/katana/executor/src/implementation/blockifier/call.rs
- crates/katana/contracts/messaging/solidity/IStarknetMessagingLocal_ABI.json
- crates/katana/feeder-gateway/src/client.rs
- crates/katana/contracts/messaging/solidity/src/Contract1.sol
- crates/katana/chain-spec/src/dev.rs
- crates/katana/explorer/build.rs
- crates/katana/chain-spec/src/rollup/utils.rs
- crates/katana/executor/tests/executor.rs
- crates/katana/controller/src/lib.rs
- crates/katana/explorer/src/lib.rs
- crates/katana/contracts/messaging/cairo/src/appchain_messaging.cairo
- crates/katana/contracts/messaging/README.md
- crates/dojo/test-utils/src/sequencer.rs
- crates/katana/cli/src/args.rs
- crates/katana/core/src/backend/gas_oracle.rs
- crates/katana/contracts/messaging/solidity/lib/starknet/NamedStorage.sol
- crates/katana/contracts/messaging/solidity/lib/starknet/IStarknetMessaging.sol
- crates/katana/executor/benches/concurrent.rs
- crates/katana/contracts/legacy/account_with_dummy_validate.cairo
- crates/katana/controller/Cargo.toml
- crates/katana/core/tests/backend.rs
- crates/katana/cli/src/options.rs
- crates/katana/contracts/build/account_with_dummy_validate.sierra.json
- crates/katana/executor/tests/fixtures/mod.rs
- crates/katana/core/benches/commit.rs
- crates/katana/contracts/legacy/test_contract.cairo
- crates/katana/feeder-gateway/src/types/mod.rs
- crates/katana/chain-spec/src/rollup/file.rs
- crates/katana/cli/src/utils.rs
- crates/katana/contracts/messaging/cairo/src/contract_1.cairo
- crates/katana/executor/src/implementation/blockifier/state.rs
- crates/katana/executor/src/implementation/noop.rs
- crates/katana/core/src/backend/mod.rs
- crates/katana/contracts/messaging/solidity/lib/starknet/StarknetMessaging.sol
- crates/katana/executor/src/implementation/blockifier/utils.rs
- crates/katana/executor/src/implementation/blockifier/mod.rs
- crates/katana/contracts/legacy/erc20.cairo
- crates/katana/feeder-gateway/src/types/transaction.rs
- crates/katana/core/src/service/block_producer.rs
✅ Files skipped from review due to trivial changes (6)
- .github/workflows/release-dispatch.yml
- .devcontainer/devcontainer.json
- .github/workflows/bench.yml
- .github/workflows/ci.yml
- bin/sozo/src/commands/options/account/mod.rs
- crates/dojo/test-utils/src/compiler.rs
🚧 Files skipped from review as they are similar to previous changes (12)
- crates/dojo/lang/Scarb.toml
- crates/dojo/core-cairo-test/Scarb.toml
- bin/sozo/src/main.rs
- bin/dojo-language-server/Cargo.toml
- crates/dojo/utils/Cargo.toml
- bin/dojo-language-server/src/main.rs
- crates/dojo/utils/src/tx/waiter.rs
- bin/sozo/src/utils.rs
- crates/dojo/core/Scarb.toml
- bin/sozo/Cargo.toml
- Cargo.toml
- bin/sozo/src/commands/options/account/provider.rs
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/release.yml
174-174: label "ubuntu-latest-32-cores" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
196-196: label "ubuntu-latest-32-cores" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
🔇 Additional comments (9)
DEVELOPMENT.md (1)
31-31
: Ohayo sensei! Updated script name for test database preparation.The command has been changed from
rebuild_test_artifacts.sh
toextract_test_db.sh
to align with the removal of Katana dependencies as outlined in the PR objectives.bin/katana/src/cli/init/settlement.rs (1)
52-54
: Ohayo sensei! Well-implemented setter method for the fact registry.The new
set_fact_registry
method provides a clean way to update the facts registry contract address. This implementation aligns well with the changes in the initialization logic.bin/katana/src/cli/init/mod.rs (7)
39-43
: Ohayo sensei! Clear documentation for the settlement chain option.The updated documentation clearly explains that a custom facts registry is required when using a custom settlement chain, which helps users understand the requirements and constraints.
75-80
: Ohayo sensei! Well-structured new CLI option for facts registry.The new
settlement_facts_registry_contract
option is properly documented and configured with the correct argument requirements, ensuring it works seamlessly with existing settlement options.
165-178
: Ohayo sensei! Good handling of the facts registry for known chains.The implementation correctly updates the facts registry for Mainnet and Sepolia chains when provided, making it optional for these known chains.
181-188
: Ohayo sensei! Proper validation for custom settlement chains.The implementation correctly validates that a facts registry contract is provided when using a custom settlement chain, returning a clear error message when missing.
427-454
: Ohayo sensei! Comprehensive test for facts registry CLI option.This test verifies that the new CLI option for custom facts registry is correctly parsed when provided with all required settlement arguments.
456-498
: Ohayo sensei! Good test for required settlement arguments.This test ensures that even when providing a custom facts registry, all the required settlement arguments must still be present, maintaining the existing validation logic.
500-530
: Ohayo sensei! Essential test for custom settlement chains.This test is crucial as it verifies that the facts registry is required when using a custom settlement chain, ensuring the error handling works as expected.
.github/workflows/release.yml
Outdated
@@ -171,7 +171,7 @@ jobs: | |||
retention-days: 1 | |||
|
|||
create-draft-release: | |||
runs-on: ubuntu-22.04-4-cores | |||
runs-on: ubuntu-latest-32-cores |
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.
🛠️ Refactor suggestion
Ohayo sensei! Invalid runner label: ubuntu-latest-32-cores
is not supported.
GitHub-hosted runners support labels like ubuntu-latest
, ubuntu-latest-4-cores
, ubuntu-latest-8-cores
, and ubuntu-latest-16-cores
. Using an unknown label will cause the workflow to fail. Please update to a valid runner label:
- runs-on: ubuntu-latest-32-cores
+ runs-on: ubuntu-latest
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
runs-on: ubuntu-latest-32-cores | |
runs-on: ubuntu-latest |
🧰 Tools
🪛 actionlint (1.7.4)
174-174: label "ubuntu-latest-32-cores" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
.github/workflows/release.yml
Outdated
@@ -193,7 +193,7 @@ jobs: | |||
- run: gh release create ${{ steps.version_info.outputs.version }} ./artifacts/*.{gz,zip} --generate-notes --draft | |||
|
|||
docker-build-and-push: | |||
runs-on: ubuntu-22.04-4-cores | |||
runs-on: ubuntu-latest-32-cores |
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.
🛠️ Refactor suggestion
Ohayo sensei! Invalid runner label: ubuntu-latest-32-cores
is not supported.
Same issue in the docker-build-and-push
job—please switch to a valid label to ensure the job can run:
- runs-on: ubuntu-latest-32-cores
+ runs-on: ubuntu-latest
🧰 Tools
🪛 actionlint (1.7.4)
196-196: label "ubuntu-latest-32-cores" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
Dockerfile
Outdated
FROM ubuntu:24.04 AS builder | ||
|
||
RUN apt-get update && apt install -y git libtool automake autoconf make tini ca-certificates curl | ||
RUN apt-get update && apt install -y git libtool automake autoconf make | ||
|
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.
Ohayo sensei! Verify CA certificates availability in builder stage
By removing ca-certificates
from the builder image, the git clone https://...
step may fail due to missing SSL root certs. If the base ubuntu:24.04
image doesn’t include a CA bundle by default, you’ll encounter certificate verification errors.
Proposed fix: Re-add ca-certificates
(and consider --no-install-recommends
) to the builder’s install line:
FROM ubuntu:24.04 AS builder
-RUN apt-get update && apt install -y git libtool automake autoconf make
+RUN apt-get update && apt-get install -y --no-install-recommends git libtool automake autoconf make ca-certificates
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
FROM ubuntu:24.04 AS builder | |
RUN apt-get update && apt install -y git libtool automake autoconf make tini ca-certificates curl | |
RUN apt-get update && apt install -y git libtool automake autoconf make | |
FROM ubuntu:24.04 AS builder | |
RUN apt-get update && apt-get install -y --no-install-recommends git libtool automake autoconf make ca-certificates |
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)
.github/workflows/test.yml (1)
53-59
: ohayo, sensei!
Pinning Katana binary download needs robustness
These lines fetch and unpack a prebuilt Katana v1.5.0-alpha.2 binary. To make this more maintainable and secure, consider:
- Using
curl -fsSL
(with--fail
) to ensure the job fails on HTTP errors.- Extracting the version into an env var (e.g.
KATANA_VERSION
) for easier future bumps.- Verifying the tarball’s checksum or GPG signature before installation.
Would you like help drafting a hardened download snippet?
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (1)
.github/workflows/test.yml
(2 hunks)
🔇 Additional comments (2)
.github/workflows/test.yml (2)
1-1
: ohayo, sensei!
Workflow renamed for clarity
The workflow name was updated fromci
totest
. Please verify that any external references—such as branch protection rules, status badges in the README, or dashboard integrations—are updated accordingly to prevent broken checks.
64-65
: ohayo, sensei!
Test commands simplified—coverage metrics removed
The workflow now callsscripts/extract_test_db.sh
and runscargo nextest run
without coverage reporting. Could you confirm whether coverage has been moved to its own workflow or if dropping it here is intentional?
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)
.github/workflows/test.yml (1)
54-59
: Parameterize Katana download for future upgrades
Hard‑coding the Katana version (v1.5.0-alpha.2
) and direct URL may become a maintenance burden. Consider introducing a workflow input or environment variable (e.g.,KATANA_VERSION
) so you can bump the version in one place.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (1)
.github/workflows/test.yml
(8 hunks)
🔇 Additional comments (5)
.github/workflows/test.yml (5)
1-1
: Ohayo sensei! Rename CI workflow to ‘test’
This update renames the job from “ci” to “test,” which better reflects its purpose.
16-16
: Ohayo sensei! Gate the build on lint and format checks
Addingclippy
alongsidefmt
andcairofmt
ensures code style and linting pass before building thesozo
binary.
41-41
: Ohayo sensei! Simplify test job dependencies
Switching thetest
job to only depend onbuild
(instead of the removed Docker check) aligns with the new integration approach.
98-98
: Ohayo sensei! Bump Scarab to 2.10.1 across jobs
All formatting and test jobs now use Scarab v2.10.1, matching the Cairo 2.10 upgrade.Also applies to: 111-111, 128-128
144-144
: Ohayo sensei! Adjust Clippy dependencies
Clippy now only requiresfmt
andcairofmt
to finish first, which is sufficient for linting in isolation.
* remove katana and only keep katana-runner dependency * chore: bump scarb * chore: bump scarb + remove unuse deps * chore: use katana runner from git repo * update katana runner dep * remove test sequencer * remove rpc test utils * fix controller account * handle not controller feature * update * rebuild test db * refactor(torii): remove torii in favor of dedicated repo * fix(ci): download Katana for integration test * fix(ci): rename ci to test * fix(ci): fix yml file dependencies * fix(ci): run clippy before build * fix: remove types-test from built projects * fix(ci): bump scarb version * fix(docs): ensure docs can run without torii/katana * fix(ci): update dojo container * fix(ci): use ubuntu24 devcontainer --------- Co-authored-by: Ammar Arif <evergreenkary@gmail.com>
This PR aims at bumping cairo to
2.10
and removing any dependency on Katana crates. This will ensure easier cairo bumps when no Sierra changes are expected.2.10
Summary by CodeRabbit