Skip to content

Conversation

@kariy
Copy link
Member

@kariy kariy commented Dec 29, 2025

Related #393, #388, #198, #209, #211, #256, #268.

When running cargo vendor, we're stuck with this error:

λ cargo vendor
error: failed to sync

Caused by:
  found duplicate version of package `starknet-crypto v0.7.4` vendored from two sources:

  	source 1: registry `crates-io`
  	source 2: https://github.com/kariy/starknet-rs?rev=2ef3088#2ef30887

The dependencies bump is required because we are removing the starknet crate patch:

[patch.crates-io]
starknet = { git = "https://github.com/kariy/starknet-rs", rev = "2ef3088" }

The initial reason for the patch is for this PR xJonathanLEI/starknet-rs#773 but it's no longer needed since #256.

The dependency updates were originally meant to only make the project compile after removing the patch. Given the tight integration with blockifier and the breaking database format change introduced in v0.16.0-rc.0, this PR is now primarily about updating blockifier, with patch removal as a side effect.

Database Backward Compatibility

TransactionExecutionInfo

blockifier v0.16.0-rc.0 has a breaking change in the TransactionExecutionInfo struct. In order to maintain backward-compatibility, if database can't deserialize the TransactionExecutionInfo it'd simply return nothing instead of failing.

This is still temporary for now and may change once we find a better solution that doesn't require dropping old data.

Felt Serialization

The starknet-types-core crate has a breaking change in Felt serialization (see starknet-io/types-rs#155). To maintain backward compatibility with existing databases, a Felt32 wrapper type is used to ensure Felt values are always serialized as 32-byte big-endian arrays when stored in the database.


The reason to vendor the Cargo dependencies is to make the Katana binary build hermetic in order to achieve reproducible build process.

@kariy
Copy link
Member Author

kariy commented Dec 30, 2025

at commit 7863d73, compiling the project will fail with:

error[E0433]: failed to resolve: could not find `__private` in `serde`
   --> /Users/kariy/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alloy-consensus-1.0.24/src/transaction/envelope.rs:162:24
    |
162 | #[derive(Clone, Debug, TransactionEnvelope)]
    |                        ^^^^^^^^^^^^^^^^^^^ could not find `__private` in `serde`
    |
    = note: this error originates in the derive macro `TransactionEnvelope` (in Nightly builds, run with -Z macro-backtrace for more info)

serde broke the private api in serde-rs/serde#2980. solved in c0d1040

@kariy kariy marked this pull request as ready for review December 30, 2025 14:13
@kariy kariy changed the title chore: dependencies bump chore: bump blockifier to v0.16.0-rc.0 Dec 30, 2025
@kariy kariy force-pushed the main branch 2 times, most recently from e3bd68b to e897bbb Compare December 30, 2025 17:28
@kariy kariy force-pushed the update-deps branch 2 times, most recently from 68cbbac to c0d49bb Compare December 30, 2025 17:50
@kariy
Copy link
Member Author

kariy commented Dec 31, 2025

starknet-io/types-rs#155 breaks the serialization format for Felt where the serialized array length is no longer assumed to always be 32. 61ad600 fixes this to maintain backward compatibility

@codecov
Copy link

codecov bot commented Dec 31, 2025

Codecov Report

❌ Patch coverage is 74.26471% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.74%. Comparing base (9bde0ae) to head (b677f2c).
⚠️ Report is 228 commits behind head on main.

Files with missing lines Patch % Lines
.../storage/provider/provider/src/providers/db/mod.rs 30.76% 9 Missing ⚠️
crates/core/src/backend/mod.rs 79.41% 7 Missing ⚠️
...es/executor/src/implementation/blockifier/error.rs 66.66% 3 Missing ⚠️
crates/explorer/src/lib.rs 0.00% 3 Missing ⚠️
bin/katana/src/cli/init/prompt.rs 0.00% 2 Missing ⚠️
bin/katana/src/cli/rpc/starknet.rs 33.33% 2 Missing ⚠️
crates/cli/src/utils.rs 0.00% 2 Missing ⚠️
...es/executor/src/implementation/blockifier/utils.rs 83.33% 2 Missing ⚠️
crates/pool/pool/src/validation/stateful.rs 50.00% 2 Missing ⚠️
bin/katana/src/cli/db/prune.rs 75.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #392      +/-   ##
==========================================
- Coverage   73.32%   72.74%   -0.59%     
==========================================
  Files         209      248      +39     
  Lines       23132    29645    +6513     
==========================================
+ Hits        16961    21564    +4603     
- Misses       6171     8081    +1910     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kariy kariy merged commit 6295a24 into main Jan 1, 2026
8 of 11 checks passed
@kariy kariy deleted the update-deps branch January 1, 2026 11:56
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