Skip to content

Commit b700a4c

Browse files
authored
Fix starknet_types_core dependency compilation errors (#3705)
<!-- Reference any GitHub issues resolved by this PR --> Closes #3683 ## Introduced changes <!-- A brief description of the changes --> - Fix build with updated packages ## Checklist <!-- Make sure all of these are complete --> - [x] Linked relevant issue - [ ] Updated relevant documentation - [ ] Added relevant tests - [x] Performed self-review of the code - [ ] Added changes to `CHANGELOG.md`
1 parent f337d9d commit b700a4c

File tree

8 files changed

+335
-324
lines changed

8 files changed

+335
-324
lines changed

Cargo.lock

Lines changed: 316 additions & 311 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ license = "MIT"
2929
license-file = "LICENSE"
3030

3131
[workspace.dependencies]
32-
blockifier = { version = "0.15.0-rc.2", features = ["testing", "tracing"]}
32+
blockifier = { version = "0.15.0-rc.3", features = ["testing", "tracing"]}
3333
bigdecimal = "0.4.8"
34-
starknet_api = "0.15.0-rc.2"
34+
starknet_api = "0.15.0-rc.3"
3535
cairo-lang-casm = { version = "2.12.0", features = ["serde"] }
3636
cairo-lang-sierra = "2.12.0"
3737
cairo-lang-utils = "2.12.0"
@@ -44,11 +44,11 @@ cairo-lang-test-plugin = "2.12.0"
4444
cairo-lang-starknet-classes = "2.12.0"
4545
cairo-lang-parser = "2.12.0"
4646
cairo-lang-sierra-to-casm = "2.12.0"
47-
cairo-vm = "2.2.0"
48-
cairo-annotations = "0.5.1"
47+
cairo-vm = "=2.3.1"
48+
cairo-annotations = "0.5.2"
4949
dirs = "6.0.0"
5050
dialoguer = "0.11.0"
51-
starknet-types-core = { version = "0.1.7", features = ["hash", "prime-bigint"] }
51+
starknet-types-core = { version = "0.1.8", features = ["hash", "prime-bigint"] }
5252
anyhow = "1.0.97"
5353
assert_fs = "1.1.2"
5454
camino = { version = "1.1.9", features = ["serde1"] }
@@ -64,7 +64,7 @@ rayon = "1.10"
6464
regex = "1.11.1"
6565
serde = { version = "1.0.219", features = ["derive"] }
6666
serde_json = "1.0.140"
67-
starknet = "0.17.0-rc.3"
67+
starknet = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "ea064f0b51655e4c7b3d382315f0d83cfa17393b"}
6868
starknet-crypto = "0.7.4"
6969
tempfile = "3.20.0"
7070
thiserror = "2.0.12"

crates/cheatnet/src/runtime_extensions/call_to_blockifier_runtime_extension/execution/cairo1_execution.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ pub(crate) fn execute_entry_point_call_cairo1(
100100
let syscall_usage = cheatable_runtime
101101
.extended_runtime
102102
.hint_handler
103+
.base
103104
.syscalls_usage
104105
.clone();
105106

crates/cheatnet/src/runtime_extensions/call_to_blockifier_runtime_extension/execution/cheated_syscalls.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub fn deploy_syscall(
8080
) -> SyscallResult<DeployResponse> {
8181
// Increment the Deploy syscall's linear cost counter by the number of elements in the
8282
// constructor calldata
83-
syscall_handler.increment_linear_factor_by(
83+
syscall_handler.base.increment_syscall_linear_factor_by(
8484
&SyscallSelector::Deploy,
8585
request.constructor_calldata.0.len(),
8686
);
@@ -282,7 +282,9 @@ fn meta_tx_v0(
282282
signature: TransactionSignature,
283283
remaining_gas: &mut u64,
284284
) -> SyscallResult<ReadOnlySegment> {
285-
syscall_handler.increment_linear_factor_by(&SyscallSelector::MetaTxV0, calldata.0.len());
285+
syscall_handler
286+
.base
287+
.increment_syscall_linear_factor_by(&SyscallSelector::MetaTxV0, calldata.0.len());
286288

287289
if syscall_handler.base.context.execution_mode == ExecutionMode::Validate {
288290
//region: Modified blockifier code

crates/cheatnet/src/runtime_extensions/forge_runtime_extension/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ impl<'a> ExtensionLogic for ForgeExtension<'a> {
199199

200200
syscall_handler.increment_syscall_count_by(&SyscallSelector::Deploy, 1);
201201
syscall_handler
202-
.increment_linear_factor_by(&SyscallSelector::Deploy, calldata.len());
202+
.base
203+
.increment_syscall_linear_factor_by(&SyscallSelector::Deploy, calldata.len());
203204

204205
handle_declare_deploy_result(deploy(
205206
syscall_handler,
@@ -217,7 +218,8 @@ impl<'a> ExtensionLogic for ForgeExtension<'a> {
217218

218219
syscall_handler.increment_syscall_count_by(&SyscallSelector::Deploy, 1);
219220
syscall_handler
220-
.increment_linear_factor_by(&SyscallSelector::Deploy, calldata.len());
221+
.base
222+
.increment_syscall_linear_factor_by(&SyscallSelector::Deploy, calldata.len());
221223

222224
handle_declare_deploy_result(deploy_at(
223225
syscall_handler,
@@ -650,6 +652,7 @@ pub fn update_top_call_resources(
650652
.extended_runtime
651653
.extended_runtime
652654
.hint_handler
655+
.base
653656
.syscalls_usage
654657
.clone();
655658

crates/data-transformer/src/transformer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use cairo_lang_parser::utils::SimpleParserDatabase;
88
use cairo_lang_syntax::node::ast::Expr;
99
use conversions::serde::serialize::SerializeToFeltVec;
1010
use itertools::Itertools;
11-
use starknet::core::types::Felt;
1211
use starknet::core::types::contract::{AbiEntry, AbiFunction};
12+
use starknet_types_core::felt::Felt;
1313

1414
/// Interpret `calldata` as a comma-separated series of expressions in Cairo syntax and serialize it
1515
pub fn transform(calldata: &str, abi: &[AbiEntry], function_selector: &Felt) -> Result<Vec<Felt>> {

crates/forge/src/scarb/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ mod tests {
207207
"hash": "invalid_hash"
208208
}
209209
}),
210-
"invalid dec string";
210+
"Failed to create Felt from string";
211211
"Invalid hash"
212212
)]
213213
fn test_fork_target_invalid_cases(input: &serde_json::Value, expected_error: &str) {

crates/sncast/tests/e2e/account/import.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ pub async fn test_invalid_private_key_in_file() {
600600
output,
601601
indoc! {r"
602602
Command: account import
603-
Error: Failed to obtain private key from the file my_private_key: failed to create Felt from string: invalid dec string
603+
Error: Failed to obtain private key from the file my_private_key: Failed to create Felt from string
604604
"},
605605
);
606606
}

0 commit comments

Comments
 (0)