From 4285e6d468c3eaf8e047c9d815bb018e9a001e5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Fri, 28 Jun 2024 13:09:08 -0300 Subject: [PATCH 01/14] Add tracing dep in workspace --- Cargo.toml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8298dc5..853adad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,5 @@ [workspace] -members = [ - "rpc-state-reader", - "replay", -] +members = ["rpc-state-reader", "replay"] # Explicitly set the resolver to the default for edition >= 2021 @@ -13,3 +10,4 @@ resolver = "2" thiserror = "1.0.32" starknet_api = "=0.12.0-dev.1" blockifier = { git = "https://github.com/NethermindEth/blockifier", rev = "3b16c2a3601b9a594c94c325d3c64552b2061a95" } +tracing = "0.1" From a3ce4705cd2b483bd7868585d8b5ed875a9112a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Fri, 28 Jun 2024 13:15:07 -0300 Subject: [PATCH 02/14] Update tracing dep in binary --- replay/Cargo.toml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/replay/Cargo.toml b/replay/Cargo.toml index 526ccf2..65252c1 100644 --- a/replay/Cargo.toml +++ b/replay/Cargo.toml @@ -8,15 +8,14 @@ benchmark = [] [dependencies] # starknet specific crates -blockifier = {workspace = true} +blockifier = { workspace = true } rpc-state-reader = { path = "../rpc-state-reader" } starknet_api = { workspace = true } # CLI specific crates clap = { version = "4.4.6", features = ["derive"] } indicatif = "0.17.7" # logs -tracing = "0.1" -tracing-subscriber = "0.3.17" +tracing = { workspace = true } +tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } # error handling anyhow = "1.0" - From d5f731d636a7c2a4960efd7d713cf117f93ea861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Fri, 28 Jun 2024 14:34:09 -0300 Subject: [PATCH 03/14] Initialize global subscriber --- replay/src/main.rs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/replay/src/main.rs b/replay/src/main.rs index 2e45909..8295b7a 100644 --- a/replay/src/main.rs +++ b/replay/src/main.rs @@ -33,8 +33,12 @@ use starknet_in_rust::{ }; #[cfg(feature = "benchmark")] use std::ops::Div; +use std::str::FromStr; #[cfg(feature = "benchmark")] use std::{collections::HashMap, sync::Arc, time::Instant}; +use tracing::info; +use tracing_subscriber::filter::Directive; +use tracing_subscriber::{util::SubscriberInitExt, EnvFilter}; #[derive(Debug, Parser)] #[command(about = "Replay is a tool for executing Starknet transactions.", long_about = None)] @@ -79,8 +83,9 @@ Caches all rpc data before the benchmark runs to provide accurate results" } fn main() { - let cli = ReplayCLI::parse(); + set_global_subscriber(); + let cli = ReplayCLI::parse(); match cli.subcommand { ReplayExecute::Tx { tx_hash, @@ -96,7 +101,7 @@ fn main() { chain, silent, } => { - println!("Executing block number: {}", block_number); + info!("executing block {number}", number = block_number); let mut state = build_cached_state(&chain, block_number); @@ -330,3 +335,16 @@ fn get_transaction_hashes(network: &str, block_number: u64) -> Result Date: Fri, 28 Jun 2024 14:40:34 -0300 Subject: [PATCH 04/14] Remove silent flag --- replay/src/main.rs | 46 ++++++++++++++++------------------------------ 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/replay/src/main.rs b/replay/src/main.rs index 8295b7a..8062512 100644 --- a/replay/src/main.rs +++ b/replay/src/main.rs @@ -54,20 +54,14 @@ enum ReplayExecute { tx_hash: String, chain: String, block_number: u64, - silent: Option, }, #[clap(about = "Execute all the transactions in a given block.")] - Block { - chain: String, - block_number: u64, - silent: Option, - }, + Block { chain: String, block_number: u64 }, #[clap(about = "Execute all the transactions in a given range of blocks.")] BlockRange { block_start: u64, block_end: u64, chain: String, - silent: Option, }, #[cfg(feature = "benchmark")] #[clap( @@ -91,15 +85,13 @@ fn main() { tx_hash, chain, block_number, - silent, } => { let mut state = build_cached_state(&chain, block_number); - show_execution_data(&mut state, tx_hash, &chain, block_number, silent); + show_execution_data(&mut state, tx_hash, &chain, block_number); } ReplayExecute::Block { block_number, chain, - silent, } => { info!("executing block {number}", number = block_number); @@ -107,16 +99,14 @@ fn main() { let transaction_hashes = get_transaction_hashes(&chain, block_number) .expect("Unable to fetch the transaction hashes."); - for tx_hash in transaction_hashes { - show_execution_data(&mut state, tx_hash, &chain, block_number, silent); + show_execution_data(&mut state, tx_hash, &chain, block_number); } } ReplayExecute::BlockRange { block_start, block_end, chain, - silent, } => { println!("Executing block range: {} - {}", block_start, block_end); @@ -127,7 +117,7 @@ fn main() { .expect("Unable to fetch the transaction hashes."); for tx_hash in transaction_hashes { - show_execution_data(&mut state, tx_hash, &chain, block_number, silent); + show_execution_data(&mut state, tx_hash, &chain, block_number); } } } @@ -285,13 +275,11 @@ fn show_execution_data( tx_hash: String, chain: &str, block_number: u64, - silent: Option, ) { - if silent.is_none() || !silent.unwrap() { - println!("Executing transaction with hash: {}", tx_hash); - println!("Block number: {}", block_number); - println!("Chain: {}", chain); - } + println!("Executing transaction with hash: {}", tx_hash); + println!("Block number: {}", block_number); + println!("Chain: {}", chain); + let previous_block_number = BlockNumber(block_number - 1); let (tx_info, _trace, receipt) = @@ -316,17 +304,15 @@ fn show_execution_data( .. } = receipt; - if silent.is_none() || !silent.unwrap() { - println!("[RPC] Execution status: {:?}", execution_status); - if let Some(revert_error) = revert_error { - println!("[SIR] Revert error: {}", revert_error); - } - println!( - "[RPC] Actual fee: {} {}", - actual_fee.amount, actual_fee.unit - ); - println!("[SIR] Actual fee: {:?} wei", sir_actual_fee); + println!("[RPC] Execution status: {:?}", execution_status); + if let Some(revert_error) = revert_error { + println!("[SIR] Revert error: {}", revert_error); } + println!( + "[RPC] Actual fee: {} {}", + actual_fee.amount, actual_fee.unit + ); + println!("[SIR] Actual fee: {:?} wei", sir_actual_fee); } fn get_transaction_hashes(network: &str, block_number: u64) -> Result, RpcStateError> { From 120b7d45bd622ca5ef2c2e88c9a33c7794d9cfb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Fri, 28 Jun 2024 15:24:19 -0300 Subject: [PATCH 05/14] Use tracing instead of println --- replay/src/main.rs | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/replay/src/main.rs b/replay/src/main.rs index b8fb0ee..9ec4b9a 100644 --- a/replay/src/main.rs +++ b/replay/src/main.rs @@ -36,7 +36,7 @@ use std::ops::Div; use std::str::FromStr; #[cfg(feature = "benchmark")] use std::{collections::HashMap, sync::Arc, time::Instant}; -use tracing::info; +use tracing::{error, info, info_span}; use tracing_subscriber::filter::Directive; use tracing_subscriber::{util::SubscriberInitExt, EnvFilter}; @@ -93,9 +93,9 @@ fn main() { block_number, chain, } => { - info!("executing block {number}", number = block_number); + info!("executing block {}", block_number); - let mut state = build_cached_state(&chain, block_number); + let mut state = build_cached_state(&chain, block_number - 1); let transaction_hashes = get_transaction_hashes(&chain, block_number) .expect("Unable to fetch the transaction hashes."); @@ -108,7 +108,7 @@ fn main() { block_end, chain, } => { - println!("Executing block range: {} - {}", block_start, block_end); + info!("executing block range: {} - {}", block_start, block_end); for block_number in block_start..=block_end { let mut state = build_cached_state(&chain, block_number); @@ -259,8 +259,8 @@ fn parse_network(network: &str) -> RpcChain { } } -fn build_cached_state(network: &str, current_block_number: u64) -> CachedState { - let previous_block_number = BlockNumber(current_block_number - 1); +fn build_cached_state(network: &str, block_number: u64) -> CachedState { + let previous_block_number = BlockNumber(block_number); let rpc_chain = parse_network(&network); let rpc_reader = RpcStateReader( RpcState::new_rpc(rpc_chain, previous_block_number.into()) @@ -276,9 +276,13 @@ fn show_execution_data( chain: &str, block_number: u64, ) { - println!("Executing transaction with hash: {}", tx_hash); - println!("Block number: {}", block_number); - println!("Chain: {}", chain); + let _transaction_execution_span = info_span!( + "transaction execution", + hash = tx_hash, + block_number = block_number, + chain = chain + ) + .entered(); let previous_block_number = BlockNumber(block_number - 1); @@ -286,7 +290,7 @@ fn show_execution_data( match execute_tx_configurable(state, &tx_hash, previous_block_number, false, true) { Ok(x) => x, Err(error_reason) => { - println!("Error: {}", error_reason); + error!("transaction execution failed: {}", error_reason); return; } }; @@ -304,15 +308,15 @@ fn show_execution_data( .. } = receipt; - println!("[RPC] Execution status: {:?}", execution_status); + info!("[RPC] Execution status: {:?}", execution_status); if let Some(revert_error) = revert_error { - println!("[Blockifier] Revert error: {}", revert_error); + error!("[Blockifier] Revert error: {}", revert_error); } - println!( + info!( "[RPC] Actual fee: {} {}", actual_fee.amount, actual_fee.unit ); - println!("[Blockifier] Actual fee: {:?} wei", blockifier_actual_fee); + info!("[Blockifier] Actual fee: {:?} wei", blockifier_actual_fee); } fn get_transaction_hashes(network: &str, block_number: u64) -> Result, RpcStateError> { From 7efbc2e280ccc0b8a1d09fb002b9c58702956185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Fri, 28 Jun 2024 17:59:51 -0300 Subject: [PATCH 06/14] Add logging --- replay/src/main.rs | 66 ++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/replay/src/main.rs b/replay/src/main.rs index 9ec4b9a..edbee69 100644 --- a/replay/src/main.rs +++ b/replay/src/main.rs @@ -1,10 +1,10 @@ use blockifier::{ - state::cached_state::CachedState, transaction::objects::TransactionExecutionInfo, + execution, state::cached_state::CachedState, transaction::objects::TransactionExecutionInfo, }; use clap::{Parser, Subcommand}; use rpc_state_reader::{ blockifier_state_reader::RpcStateReader, - rpc_state::{BlockValue, RpcChain, RpcState, RpcTransactionReceipt}, + rpc_state::{self, BlockValue, RpcChain, RpcState, RpcTransactionReceipt}, rpc_state_errors::RpcStateError, }; @@ -36,7 +36,7 @@ use std::ops::Div; use std::str::FromStr; #[cfg(feature = "benchmark")] use std::{collections::HashMap, sync::Arc, time::Instant}; -use tracing::{error, info, info_span}; +use tracing::{error, field, info, info_span}; use tracing_subscriber::filter::Directive; use tracing_subscriber::{util::SubscriberInitExt, EnvFilter}; @@ -93,7 +93,7 @@ fn main() { block_number, chain, } => { - info!("executing block {}", block_number); + let _block_span = info_span!("block", number = block_number).entered(); let mut state = build_cached_state(&chain, block_number - 1); @@ -111,6 +111,8 @@ fn main() { info!("executing block range: {} - {}", block_start, block_end); for block_number in block_start..=block_end { + let _block_span = info_span!("block", number = block_number).entered(); + let mut state = build_cached_state(&chain, block_number); let transaction_hashes = get_transaction_hashes(&chain, block_number) @@ -276,47 +278,44 @@ fn show_execution_data( chain: &str, block_number: u64, ) { - let _transaction_execution_span = info_span!( - "transaction execution", - hash = tx_hash, - block_number = block_number, - chain = chain - ) - .entered(); + let transaction_execution_span = + info_span!("transaction", hash = tx_hash, chain, status = field::Empty).entered(); + + info!("starting execution"); let previous_block_number = BlockNumber(block_number - 1); - let (tx_info, _trace, receipt) = + let (execution_info, _trace, rpc_receipt) = match execute_tx_configurable(state, &tx_hash, previous_block_number, false, true) { Ok(x) => x, Err(error_reason) => { - error!("transaction execution failed: {}", error_reason); + error!("execution failed unexpectedly: {}", error_reason); return; } }; - let TransactionExecutionInfo { - revert_error, - actual_fee, - .. - } = tx_info; - let blockifier_actual_fee = actual_fee; + let execution_status = match &execution_info.revert_error { + Some(_) => "REVERTED", + None => "SUCCEEDED", + }; + let rpc_status = rpc_receipt.execution_status; + let status_matches = execution_status == rpc_status; + transaction_execution_span.record("status", execution_status); - let RpcTransactionReceipt { - actual_fee, - execution_status, - .. - } = receipt; + info!(execution_status, rpc_status, "execution finished"); - info!("[RPC] Execution status: {:?}", execution_status); - if let Some(revert_error) = revert_error { - error!("[Blockifier] Revert error: {}", revert_error); + // let execution_gas = execution_info.actual_fee; + // let rpc_gas = rpc_receipt.actual_fee; + // info!(?execution_gas, ?rpc_gas, "execution actual fee"); + + if !status_matches { + let execution_error_message = execution_info.revert_error.unwrap_or_default(); + // todo: if logging is filtered by error level, then the transaction span is not shown. + // it should also log the transaction span + error!(execution_error_message, "rpc and execution status diverged") + } else if let Some(revert_reason) = execution_info.revert_error { + info!(revert_reason, "blockifier transaction reverted"); } - info!( - "[RPC] Actual fee: {} {}", - actual_fee.amount, actual_fee.unit - ); - info!("[Blockifier] Actual fee: {:?} wei", blockifier_actual_fee); } fn get_transaction_hashes(network: &str, block_number: u64) -> Result, RpcStateError> { @@ -335,6 +334,9 @@ fn set_global_subscriber() { .with_default_directive(default_directive) .from_env_lossy() }) + // .pretty() + .with_file(false) + .with_line_number(false) .finish() .init(); } From ed2a3727a1437728381f5c0ba7405e5a70b22d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Fri, 28 Jun 2024 18:02:58 -0300 Subject: [PATCH 07/14] Use pretty format --- replay/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/replay/src/main.rs b/replay/src/main.rs index edbee69..e6bd081 100644 --- a/replay/src/main.rs +++ b/replay/src/main.rs @@ -334,7 +334,7 @@ fn set_global_subscriber() { .with_default_directive(default_directive) .from_env_lossy() }) - // .pretty() + .pretty() .with_file(false) .with_line_number(false) .finish() From 35b441fe11b33c0bb4dc68511f11054cd55bb373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Mon, 1 Jul 2024 11:40:56 -0300 Subject: [PATCH 08/14] Show context in event arguments --- replay/src/main.rs | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/replay/src/main.rs b/replay/src/main.rs index e6bd081..2bf83c4 100644 --- a/replay/src/main.rs +++ b/replay/src/main.rs @@ -36,7 +36,7 @@ use std::ops::Div; use std::str::FromStr; #[cfg(feature = "benchmark")] use std::{collections::HashMap, sync::Arc, time::Instant}; -use tracing::{error, field, info, info_span}; +use tracing::{debug, error, field, info, info_span, span}; use tracing_subscriber::filter::Directive; use tracing_subscriber::{util::SubscriberInitExt, EnvFilter}; @@ -278,8 +278,7 @@ fn show_execution_data( chain: &str, block_number: u64, ) { - let transaction_execution_span = - info_span!("transaction", hash = tx_hash, chain, status = field::Empty).entered(); + let _transaction_execution_span = info_span!("transaction", hash = tx_hash, chain).entered(); info!("starting execution"); @@ -300,22 +299,28 @@ fn show_execution_data( }; let rpc_status = rpc_receipt.execution_status; let status_matches = execution_status == rpc_status; - transaction_execution_span.record("status", execution_status); - - info!(execution_status, rpc_status, "execution finished"); - - // let execution_gas = execution_info.actual_fee; - // let rpc_gas = rpc_receipt.actual_fee; - // info!(?execution_gas, ?rpc_gas, "execution actual fee"); if !status_matches { - let execution_error_message = execution_info.revert_error.unwrap_or_default(); - // todo: if logging is filtered by error level, then the transaction span is not shown. - // it should also log the transaction span - error!(execution_error_message, "rpc and execution status diverged") - } else if let Some(revert_reason) = execution_info.revert_error { - info!(revert_reason, "blockifier transaction reverted"); + error!( + transaction_hash = tx_hash, + chain = chain, + execution_status, + execution_error_message = execution_info.revert_error, + "rpc and execution status diverged" + ) + } else { + info!( + transaction_hash = tx_hash, + chain = chain, + execution_status, + execution_error_message = execution_info.revert_error, + "execution finished successfully" + ); } + + let execution_gas = execution_info.actual_fee; + let rpc_gas = rpc_receipt.actual_fee; + debug!(?execution_gas, ?rpc_gas, "execution actual fee"); } fn get_transaction_hashes(network: &str, block_number: u64) -> Result, RpcStateError> { From d8a5cfc6d2a9482ea21f95c3b6b02ebdd9571fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Mon, 1 Jul 2024 18:35:23 -0300 Subject: [PATCH 09/14] Add rpc_execution_status to events --- replay/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/replay/src/main.rs b/replay/src/main.rs index 2bf83c4..91b37e4 100644 --- a/replay/src/main.rs +++ b/replay/src/main.rs @@ -297,14 +297,15 @@ fn show_execution_data( Some(_) => "REVERTED", None => "SUCCEEDED", }; - let rpc_status = rpc_receipt.execution_status; - let status_matches = execution_status == rpc_status; + let rpc_execution_status = rpc_receipt.execution_status; + let status_matches = execution_status == rpc_execution_status; if !status_matches { error!( transaction_hash = tx_hash, chain = chain, execution_status, + rpc_execution_status, execution_error_message = execution_info.revert_error, "rpc and execution status diverged" ) @@ -313,6 +314,7 @@ fn show_execution_data( transaction_hash = tx_hash, chain = chain, execution_status, + rpc_execution_status, execution_error_message = execution_info.revert_error, "execution finished successfully" ); From d426a59a8cead20454371378b9dad9757a690bf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Mon, 1 Jul 2024 19:09:13 -0300 Subject: [PATCH 10/14] Add logging to the readme --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 601aa2f..28a0a25 100644 --- a/README.md +++ b/README.md @@ -34,3 +34,12 @@ You can use the replay crate to execute transactions or blocks via the CLI. For * cargo run block mainnet 648655 * cargo run block-range 90000 90002 mainnet ``` + +### Logging + +This projects uses tracing with env-filter, so logging can be modified by the RUST_LOG environment variable. By default, only info events from the replay crate are shown. + +As an example, to show only error messages from the replay crate, run: +```bash +RUST_LOG=replay=error cargo run block mainnet 648461 +``` From 871b9fe006962d24f28adb92551dbc06660b23c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 2 Jul 2024 10:23:47 -0300 Subject: [PATCH 11/14] Fix bug --- replay/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/replay/src/main.rs b/replay/src/main.rs index 91b37e4..8e4f374 100644 --- a/replay/src/main.rs +++ b/replay/src/main.rs @@ -86,7 +86,7 @@ fn main() { chain, block_number, } => { - let mut state = build_cached_state(&chain, block_number); + let mut state = build_cached_state(&chain, block_number - 1); show_execution_data(&mut state, tx_hash, &chain, block_number); } ReplayExecute::Block { From a2cab97551270b1720d6080df0e60339ead545c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 2 Jul 2024 12:31:37 -0300 Subject: [PATCH 12/14] Fix bug --- replay/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/replay/src/main.rs b/replay/src/main.rs index 8e4f374..7434c4f 100644 --- a/replay/src/main.rs +++ b/replay/src/main.rs @@ -113,7 +113,7 @@ fn main() { for block_number in block_start..=block_end { let _block_span = info_span!("block", number = block_number).entered(); - let mut state = build_cached_state(&chain, block_number); + let mut state = build_cached_state(&chain, block_number - 1); let transaction_hashes = get_transaction_hashes(&chain, block_number) .expect("Unable to fetch the transaction hashes."); From e172d514088308d19e5e5a2ae911c5136b707394 Mon Sep 17 00:00:00 2001 From: Julian Gonzalez Calderon Date: Fri, 5 Jul 2024 06:28:07 -0900 Subject: [PATCH 13/14] Add actions (#17) * Add ci.yml * Fix clippy * Format and ignore failing tests * Fix udep * Remove dup test * Fix some comments * Add tests * Unignore test that runs on linux --- .github/workflows/ci.yml | 167 ++++++++++++ Cargo.lock | 92 +------ replay/Cargo.toml | 1 - replay/src/main.rs | 14 +- rpc-state-reader/Cargo.toml | 11 +- .../src/blockifier_state_reader.rs | 253 ++++++++++-------- rpc-state-reader/src/rpc_state.rs | 2 +- 7 files changed, 330 insertions(+), 210 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..16f4dc2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,167 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + merge_group: + types: [checks_requested] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + check: + name: clippy + runs-on: ubuntu-latest + env: + MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ + LLVM_SYS_180_PREFIX: /usr/lib/llvm-18/ + TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@1.79.0 + with: + components: clippy, rustfmt + - uses: Swatinem/rust-cache@v2 + - name: Add LLVM Debian repository + uses: myci-actions/add-deb-repo@10 + with: + repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main + repo-name: llvm-repo + keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key + - name: Install LLVM + run: sudo apt-get install llvm-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools + - name: Clippy + run: cargo clippy --all-targets -- -D warnings + + format: + name: rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@1.79.0 + with: + components: rustfmt + - run: cargo fmt --all -- --check + - name: Find Comment + continue-on-error: true + if: success() || failure() + uses: peter-evans/find-comment@v3 + id: fc + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: 'github-actions[bot]' + body-includes: thiscommentistofindthisformatcomment + - name: Create or update comment + continue-on-error: true + if: failure() + uses: peter-evans/create-or-update-comment@v4 + with: + comment-id: ${{ steps.fc.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + ❌ Code is not formatted! Please run `cargo format` and push the changes. + + + edit-mode: replace + - name: Create or update comment + continue-on-error: true + if: ${{ success() && steps.fc.outputs.comment-id != null }} + uses: peter-evans/create-or-update-comment@v4 + with: + comment-id: ${{ steps.fc.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + ✅ Code is now correctly formatted. + + + edit-mode: replace + + # Check for unnecessary dependencies. + udeps: + runs-on: ubuntu-latest + env: + MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ + LLVM_SYS_180_PREFIX: /usr/lib/llvm-18/ + TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ + RUSTUP_TOOLCHAIN: nightly-2024-02-01 # udeps needs nightly + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly-2024-02-01 + components: rustfmt + + - name: Add llvm deb repository + uses: myci-actions/add-deb-repo@10 + with: + repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main + repo-name: llvm-repo + keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key + - name: Install LLVM + run: sudo apt-get install llvm-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools + - name: Download and run cargo-udeps + run: | + wget -O - -c https://github.com/est31/cargo-udeps/releases/download/v0.1.45/cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu.tar.gz | tar -xz + cargo-udeps-*/cargo-udeps udeps --all-targets + + test: + name: test (linux, amd64) + runs-on: ubuntu-latest + env: + MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ + LLVM_SYS_180_PREFIX: /usr/lib/llvm-18/ + TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ + RPC_ENDPOINT_TESTNET: ${{ secrets.RPC_ENDPOINT_TESTNET }} + RPC_ENDPOINT_MAINNET: ${{ secrets.RPC_ENDPOINT_MAINNET }} + RUST_LOG: debug,replay=trace,rpc-state-reader=trace + steps: + - uses: actions/checkout@v4 + - name: Free HDD space + run: | + echo "Listing 20 largest packages" + dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 20 + df -h + sudo apt-get update + sudo apt-get remove -y '^llvm-.*' + sudo apt-get remove -y 'php.*' + sudo apt-get remove -y '^dotnet-.*' + sudo apt-get remove -y '^temurin-.*' + sudo apt-get remove -y azure-cli google-cloud-cli microsoft-edge-stable google-chrome-stable firefox powershell mono-devel + sudo apt-get autoremove -y + sudo apt-get clean + df -h + echo "Removing large directories" + # deleting 15GB + sudo rm -rf /usr/share/dotnet/ + sudo rm -rf /usr/local/lib/android + df -h + - name: Setup rust env + uses: dtolnay/rust-toolchain@1.79.0 + - name: Retreive cached dependecies + uses: Swatinem/rust-cache@v2 + - name: Add LLVM Debian repository + uses: myci-actions/add-deb-repo@11 + with: + repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main + repo-name: llvm-repo + keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key + - run: sudo apt-get update && sudo apt-get upgrade -y + - name: Install LLVM + run: sudo apt-get install llvm-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools + - name: Checkout cairo_native + uses: actions/checkout@v4 + with: + repository: lambdaclass/cairo_native + ref: 66e9b5e053faf3b2a9129de5b15205d1cfe686eb + path: cairo_native + - name: Build Cairo Native Runtime Library + shell: bash + run: | + cd cairo_native + make runtime + echo "CAIRO_NATIVE_RUNTIME_LIBRARY=$(pwd)/libcairo_native_runtime.a" > $GITHUB_ENV + - name: Test + run: cargo test diff --git a/Cargo.lock b/Cargo.lock index 7d14692..0ce6b7a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1257,19 +1257,6 @@ dependencies = [ "unicode_categories", ] -[[package]] -name = "console" -version = "0.15.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.52.0", -] - [[package]] name = "const-fnv1a-hash" version = "1.1.0" @@ -1684,12 +1671,6 @@ dependencies = [ "log", ] -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - [[package]] name = "encoding_rs" version = "0.8.34" @@ -2277,19 +2258,6 @@ dependencies = [ "serde", ] -[[package]] -name = "indicatif" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" -dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "unicode-width", -] - [[package]] name = "indoc" version = "2.0.5" @@ -2801,12 +2769,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - [[package]] name = "object" version = "0.36.0" @@ -3054,12 +3016,6 @@ dependencies = [ "spki", ] -[[package]] -name = "portable-atomic" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" - [[package]] name = "powerfmt" version = "0.2.0" @@ -3291,7 +3247,6 @@ dependencies = [ "anyhow", "blockifier", "clap", - "indicatif", "rpc-state-reader", "starknet_api", "tracing", @@ -3388,7 +3343,6 @@ dependencies = [ "pretty_assertions_sorted", "serde", "serde_json", - "serde_with 3.8.1", "starknet", "starknet_api", "test-case", @@ -3726,25 +3680,7 @@ dependencies = [ "indexmap 1.9.3", "serde", "serde_json", - "serde_with_macros 2.3.3", - "time", -] - -[[package]] -name = "serde_with" -version = "3.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" -dependencies = [ - "base64 0.22.1", - "chrono", - "hex", - "indexmap 1.9.3", - "indexmap 2.2.6", - "serde", - "serde_derive", - "serde_json", - "serde_with_macros 3.8.1", + "serde_with_macros", "time", ] @@ -3760,18 +3696,6 @@ dependencies = [ "syn 2.0.68", ] -[[package]] -name = "serde_with_macros" -version = "3.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" -dependencies = [ - "darling 0.20.9", - "proc-macro2", - "quote", - "syn 2.0.68", -] - [[package]] name = "sha2" version = "0.10.8" @@ -3933,7 +3857,7 @@ checksum = "d858efc93d85de95065a5732cb3e94d0c746674964c0859aab442ffbb9de76b4" dependencies = [ "serde", "serde_json", - "serde_with 2.3.3", + "serde_with", "starknet-accounts", "starknet-core 0.7.2", "starknet-providers", @@ -3952,7 +3876,7 @@ dependencies = [ "serde", "serde_json", "serde_json_pythonic", - "serde_with 2.3.3", + "serde_with", "sha3", "starknet-crypto 0.6.2", "starknet-ff", @@ -3970,7 +3894,7 @@ dependencies = [ "serde", "serde_json", "serde_json_pythonic", - "serde_with 2.3.3", + "serde_with", "sha3", "starknet-crypto 0.6.2", "starknet-ff", @@ -4084,7 +4008,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "serde_with 2.3.3", + "serde_with", "starknet-core 0.7.2", "thiserror", "url", @@ -4689,12 +4613,6 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" -[[package]] -name = "unicode-width" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" - [[package]] name = "unicode-xid" version = "0.2.4" diff --git a/replay/Cargo.toml b/replay/Cargo.toml index 65252c1..6043ff0 100644 --- a/replay/Cargo.toml +++ b/replay/Cargo.toml @@ -13,7 +13,6 @@ rpc-state-reader = { path = "../rpc-state-reader" } starknet_api = { workspace = true } # CLI specific crates clap = { version = "4.4.6", features = ["derive"] } -indicatif = "0.17.7" # logs tracing = { workspace = true } tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } diff --git a/replay/src/main.rs b/replay/src/main.rs index 7434c4f..bc3a87e 100644 --- a/replay/src/main.rs +++ b/replay/src/main.rs @@ -1,19 +1,15 @@ -use blockifier::{ - execution, state::cached_state::CachedState, transaction::objects::TransactionExecutionInfo, -}; +use blockifier::state::cached_state::CachedState; use clap::{Parser, Subcommand}; use rpc_state_reader::{ blockifier_state_reader::RpcStateReader, - rpc_state::{self, BlockValue, RpcChain, RpcState, RpcTransactionReceipt}, + rpc_state::{BlockValue, RpcChain, RpcState}, rpc_state_errors::RpcStateError, }; use rpc_state_reader::blockifier_state_reader::execute_tx_configurable; #[cfg(feature = "benchmark")] use rpc_state_reader::{ - execute_tx_configurable_with_state, - rpc_state::{RpcBlockInfo, RpcState}, - RpcStateReader, + execute_tx_configurable_with_state, rpc_state::RpcBlockInfo, RpcStateReader, }; use starknet_api::block::BlockNumber; #[cfg(feature = "benchmark")] @@ -36,7 +32,7 @@ use std::ops::Div; use std::str::FromStr; #[cfg(feature = "benchmark")] use std::{collections::HashMap, sync::Arc, time::Instant}; -use tracing::{debug, error, field, info, info_span, span}; +use tracing::{debug, error, info, info_span}; use tracing_subscriber::filter::Directive; use tracing_subscriber::{util::SubscriberInitExt, EnvFilter}; @@ -263,7 +259,7 @@ fn parse_network(network: &str) -> RpcChain { fn build_cached_state(network: &str, block_number: u64) -> CachedState { let previous_block_number = BlockNumber(block_number); - let rpc_chain = parse_network(&network); + let rpc_chain = parse_network(network); let rpc_reader = RpcStateReader( RpcState::new_rpc(rpc_chain, previous_block_number.into()) .expect("failed to create state reader"), diff --git a/rpc-state-reader/Cargo.toml b/rpc-state-reader/Cargo.toml index 373f831..fae7868 100644 --- a/rpc-state-reader/Cargo.toml +++ b/rpc-state-reader/Cargo.toml @@ -7,20 +7,19 @@ edition = "2021" ureq = { version = "2.7.1", features = ["json"] } serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0", features = [ - "arbitrary_precision", - "raw_value", + "arbitrary_precision", + "raw_value", ] } -starknet_api = {workspace = true} +starknet_api = { workspace = true } cairo-lang-starknet = "=2.6.3" cairo-lang-starknet-classes = "=2.6.3" cairo-lang-utils = "=2.6.3" -starknet = "0.7.0" +starknet = "0.7.0" thiserror = { workspace = true } flate2 = "1.0.25" -serde_with = "3.0.0" dotenv = "0.15.0" cairo-vm = "0.9.2" -blockifier = {workspace = true} +blockifier = { workspace = true } [dev-dependencies] pretty_assertions_sorted = "1.2.3" diff --git a/rpc-state-reader/src/blockifier_state_reader.rs b/rpc-state-reader/src/blockifier_state_reader.rs index eb481d9..0099fdc 100644 --- a/rpc-state-reader/src/blockifier_state_reader.rs +++ b/rpc-state-reader/src/blockifier_state_reader.rs @@ -1,14 +1,10 @@ use blockifier::{ blockifier::block::BlockInfo, context::{BlockContext, ChainInfo, FeeTokenAddresses}, - execution::contract_class::{ - ClassInfo, ContractClass, ContractClassV0, ContractClassV0Inner, SierraContractClassV1, - SierraContractClassV1Inner, - }, + execution::contract_class::{ClassInfo, ContractClass, ContractClassV0, ContractClassV0Inner}, state::{ cached_state::CachedState, errors::StateError, - global_cache::GlobalContractCache, state_api::{StateReader, StateResult}, }, transaction::{ @@ -21,22 +17,17 @@ use blockifier::{ }, versioned_constants::VersionedConstants, }; -use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; use cairo_vm::types::program::Program; use starknet::core::types::ContractClass as SNContractClass; use starknet_api::{ block::BlockNumber, - contract_address, - core::{ - calculate_contract_address, ClassHash, CompiledClassHash, ContractAddress, Nonce, - PatriciaKey, - }, - hash::{StarkFelt, StarkHash}, - patricia_key, stark_felt, + core::{calculate_contract_address, ClassHash, CompiledClassHash, ContractAddress, Nonce}, + hash::StarkFelt, + stark_felt, state::StorageKey, transaction::{Transaction as SNTransaction, TransactionHash}, }; -use std::{collections::HashMap, sync::Arc}; +use std::sync::Arc; use crate::{ rpc_state::{RpcBlockInfo, RpcChain, RpcState, RpcTransactionReceipt, TransactionTrace}, @@ -152,25 +143,24 @@ pub fn execute_tx( // Create state from RPC reader let mut state = CachedState::new(rpc_reader); - let fee_token_address = - contract_address!("049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"); - - const N_STEPS_FEE_WEIGHT: f64 = 0.01; - let vm_resource_fee_cost = Arc::new(HashMap::from([ - ("n_steps".to_string(), N_STEPS_FEE_WEIGHT), - ("output_builtin".to_string(), 0.0), - ("pedersen_builtin".to_string(), N_STEPS_FEE_WEIGHT * 32.0), - ("range_check_builtin".to_string(), N_STEPS_FEE_WEIGHT * 16.0), - ("ecdsa_builtin".to_string(), N_STEPS_FEE_WEIGHT * 2048.0), - ("bitwise_builtin".to_string(), N_STEPS_FEE_WEIGHT * 64.0), - ("ec_op_builtin".to_string(), N_STEPS_FEE_WEIGHT * 1024.0), - ("poseidon_builtin".to_string(), N_STEPS_FEE_WEIGHT * 32.0), - ( - "segment_arena_builtin".to_string(), - N_STEPS_FEE_WEIGHT * 10.0, - ), - ("keccak_builtin".to_string(), N_STEPS_FEE_WEIGHT * 2048.0), // 2**11 - ])); + // let fee_token_address = + // contract_address!("049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"); + // const N_STEPS_FEE_WEIGHT: f64 = 0.01; + // let vm_resource_fee_cost = Arc::new(HashMap::from([ + // ("n_steps".to_string(), N_STEPS_FEE_WEIGHT), + // ("output_builtin".to_string(), 0.0), + // ("pedersen_builtin".to_string(), N_STEPS_FEE_WEIGHT * 32.0), + // ("range_check_builtin".to_string(), N_STEPS_FEE_WEIGHT * 16.0), + // ("ecdsa_builtin".to_string(), N_STEPS_FEE_WEIGHT * 2048.0), + // ("bitwise_builtin".to_string(), N_STEPS_FEE_WEIGHT * 64.0), + // ("ec_op_builtin".to_string(), N_STEPS_FEE_WEIGHT * 1024.0), + // ("poseidon_builtin".to_string(), N_STEPS_FEE_WEIGHT * 32.0), + // ( + // "segment_arena_builtin".to_string(), + // N_STEPS_FEE_WEIGHT * 10.0, + // ), + // ("keccak_builtin".to_string(), N_STEPS_FEE_WEIGHT * 2048.0), // 2**11 + // ])); let block_info = BlockInfo { block_number, @@ -240,7 +230,7 @@ pub fn execute_tx( } SNTransaction::Declare(tx) => { // Fetch the contract_class from the next block (as we don't have it in the previous one) - let mut next_block_state_reader = RpcStateReader( + let next_block_state_reader = RpcStateReader( RpcState::new_rpc(network, (block_number.next()).unwrap().into()).unwrap(), ); let contract_class = next_block_state_reader @@ -293,16 +283,16 @@ pub fn execute_tx_configurable_with_state( tx_hash: &TransactionHash, tx: SNTransaction, block_info: BlockInfo, - skip_validate: bool, - skip_nonce_check: bool, + _skip_validate: bool, + _skip_nonce_check: bool, state: &mut CachedState, ) -> TransactionExecutionResult { - let fee_token_address = FeeTokenAddresses { - strk_fee_token_address: ContractAddress::default(), - eth_fee_token_address: ContractAddress(starknet_api::patricia_key!( - "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7" - )), - }; + // let _fee_token_address = FeeTokenAddresses { + // strk_fee_token_address: ContractAddress::default(), + // eth_fee_token_address: ContractAddress(starknet_api::patricia_key!( + // "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7" + // )), + // }; // Get values for block context before giving ownership of the reader let chain_id = state.state.0.get_chain_name(); @@ -438,16 +428,17 @@ mod tests { } #[test_case( - "0x00b6d59c19d5178886b4c939656167db0660fe325345138025a3cc4175b21897", - 200303, // real block 200304 - RpcChain::MainNet => ignore["Doesn't revert in newest blockifier version"] + "0x00b6d59c19d5178886b4c939656167db0660fe325345138025a3cc4175b21897", + 200303, // real block 200304 + RpcChain::MainNet + => ignore["Doesn't revert in newest blockifier version"] )] #[test_case( - "0x02b28b4846a756e0cec6385d6d13f811e745a88c7e75a3ebc5fead5b4af152a3", - 200302, // real block 200304 - RpcChain::MainNet - => ignore["broken on both due to a cairo-vm error"] -)] + "0x02b28b4846a756e0cec6385d6d13f811e745a88c7e75a3ebc5fead5b4af152a3", + 200302, // real block 200303 + RpcChain::MainNet + => ignore["broken on both due to a cairo-vm error"] + )] fn blockifier_test_case_reverted_tx(hash: &str, block_number: u64, chain: RpcChain) { let (tx_info, trace, _) = execute_tx(hash, chain, BlockNumber(block_number)); @@ -460,35 +451,31 @@ mod tests { } #[test_case( - "0x05d200ef175ba15d676a68b36f7a7b72c17c17604eda4c1efc2ed5e4973e2c91", - 169928, - RpcChain::MainNet => ignore["Current blockifier version is not currently in production, no recent tx available for testing"] - )] - #[test_case( - // Declare tx - "0x60506c49e65d84e2cdd0e9142dc43832a0a59cb6a9cbcce1ab4f57c20ba4afb", - 347899, // real block 347900 - RpcChain::MainNet -)] + // Declare tx + "0x60506c49e65d84e2cdd0e9142dc43832a0a59cb6a9cbcce1ab4f57c20ba4afb", + 347899, // real block 347900 + RpcChain::MainNet + => ignore + )] #[test_case( - // Declare tx - "0x1088aa18785779e1e8eef406dc495654ad42a9729b57969ad0dbf2189c40bee", - 271887, // real block 271888 - RpcChain::MainNet -)] + // Declare tx + "0x1088aa18785779e1e8eef406dc495654ad42a9729b57969ad0dbf2189c40bee", + 271887, // real block 271888 + RpcChain::MainNet + )] #[test_case( "0x014640564509873cf9d24a311e1207040c8b60efd38d96caef79855f0b0075d5", - 90006, + 90006, // real block 90007 RpcChain::MainNet )] #[test_case( "0x025844447697eb7d5df4d8268b23aef6c11de4087936048278c2559fc35549eb", - 197000, + 197000, // real block 197001 RpcChain::MainNet )] #[test_case( "0x00164bfc80755f62de97ae7c98c9d67c1767259427bcf4ccfcc9683d44d54676", - 197000, + 197000, // real block 197001 RpcChain::MainNet )] #[test_case( @@ -500,11 +487,13 @@ mod tests { "0x0528ec457cf8757f3eefdf3f0728ed09feeecc50fd97b1e4c5da94e27e9aa1d6", 169928, // real block 169929 RpcChain::MainNet + => ignore )] #[test_case( "0x0737677385a30ec4cbf9f6d23e74479926975b74db3d55dc5e46f4f8efee41cf", 169928, // real block 169929 RpcChain::MainNet + => ignore )] #[test_case( "0x026c17728b9cd08a061b1f17f08034eb70df58c1a96421e73ee6738ad258a94c", @@ -514,64 +503,116 @@ mod tests { #[test_case( // review later "0x0743092843086fa6d7f4a296a226ee23766b8acf16728aef7195ce5414dc4d84", - 186548, // real block 186549 + 186548, // real block 186549 RpcChain::MainNet )] #[test_case( // fails in blockifier "0x00724fc4a84f489ed032ebccebfc9541eb8dc64b0e76b933ed6fc30cd6000bd1", - 186551, // real block 186552 + 186551, // real block 186552 RpcChain::MainNet + => ignore )] #[test_case( - "0x176a92e8df0128d47f24eebc17174363457a956fa233cc6a7f8561bfbd5023a", - 317092, // real block 317093 - RpcChain::MainNet -)] + "0x176a92e8df0128d47f24eebc17174363457a956fa233cc6a7f8561bfbd5023a", + 317092, // real block 317093 + RpcChain::MainNet + )] #[test_case( - "0x04db9b88e07340d18d53b8b876f28f449f77526224afb372daaf1023c8b08036", - 398051, // real block 398052 - RpcChain::MainNet -)] + "0x04db9b88e07340d18d53b8b876f28f449f77526224afb372daaf1023c8b08036", + 398051, // real block 398052 + RpcChain::MainNet + )] #[test_case( - "0x5a5de1f42f6005f3511ea6099daed9bcbcf9de334ee714e8563977e25f71601", - 281513, // real block 281514 - RpcChain::MainNet -)] + "0x5a5de1f42f6005f3511ea6099daed9bcbcf9de334ee714e8563977e25f71601", + 281513, // real block 281514 + RpcChain::MainNet + )] #[test_case( - "0x26be3e906db66973de1ca5eec1ddb4f30e3087dbdce9560778937071c3d3a83", - 351268, // real block 351269 - RpcChain::MainNet -)] + "0x26be3e906db66973de1ca5eec1ddb4f30e3087dbdce9560778937071c3d3a83", + 351268, // real block 351269 + RpcChain::MainNet + )] #[test_case( - "0x4f552c9430bd21ad300db56c8f4cae45d554a18fac20bf1703f180fac587d7e", - 351225, // real block 351226 - RpcChain::MainNet -)] + "0x4f552c9430bd21ad300db56c8f4cae45d554a18fac20bf1703f180fac587d7e", + 351225, // real block 351226 + RpcChain::MainNet + )] // DeployAccount for different account providers: // OpenZeppelin (v0.7.0) #[test_case( - "0x04df8a364233d995c33c7f4666a776bf458631bec2633e932b433a783db410f8", - 422881, // real block 422882 - RpcChain::MainNet -)] + "0x04df8a364233d995c33c7f4666a776bf458631bec2633e932b433a783db410f8", + 422881, // real block 422882 + RpcChain::MainNet + )] // Argent X (v5.7.0) #[test_case( - "0x74820d4a1ac6e832a51a8938959e6f15a247f7d34daea2860d4880c27bc2dfd", - 475945, // real block 475946 - RpcChain::MainNet - )] + "0x74820d4a1ac6e832a51a8938959e6f15a247f7d34daea2860d4880c27bc2dfd", + 475945, // real block 475946 + RpcChain::MainNet + => ignore + )] + #[test_case( + "0x41497e62fb6798ff66e4ad736121c0164cdb74005aa5dab025be3d90ad4ba06", + 638866, // real block 638867 + RpcChain::MainNet + )] + #[test_case( + "0x7805c2bf5abaf4fe0eb1db7b7be0486a14757b4bf96634c828d11c07e4a763c", + 641975, // real block 641976 + RpcChain::MainNet + => ignore + )] + #[test_case( + "0x73ef9cde09f005ff6f411de510ecad4cdcf6c4d0dfc59137cff34a4fc74dfd", + 654000, // real block 654001 + RpcChain::MainNet + )] + #[test_case( + "0x75d7ef42a815e4d9442efcb509baa2035c78ea6a6272ae29e87885788d4c85e", + 654000, // real block 654001 + RpcChain::MainNet + )] + #[test_case( + "0x1ecb4b825f629eeb9816ddfd6905a85f6d2c89995907eacaf6dc64e27a2c917", + 654000, // real block 654001 + RpcChain::MainNet + )] + #[test_case( + "0x70d83cb9e25f1e9f7be2608f72c7000796e4a222c1ed79a0ea81abe5172557b", + 654000, // real block 654001 + RpcChain::MainNet + )] + #[test_case( + "0x670321c71835004fcab639e871ef402bb807351d126ccc4d93075ff2c31519d", + 654000, // real block 653001 + RpcChain::MainNet + )] #[test_case( - "0x41497e62fb6798ff66e4ad736121c0164cdb74005aa5dab025be3d90ad4ba06", - 638866, // real block 475946 - RpcChain::MainNet -)] + "0x5896b4db732cfc57ce5d56ece4dfa4a514bd435a0ee80dc79b37e60cdae5dd6", + 653000, // real block 653001 + RpcChain::MainNet + => ignore["takes to long"] + )] #[test_case( - "0x7805c2bf5abaf4fe0eb1db7b7be0486a14757b4bf96634c828d11c07e4a763c", - 641975, // real block 475946 - RpcChain::MainNet -)] + "0x5a030fd81f14a1cf29a2e5259d3f2c9960018ade2d135269760e6fb4802ac02", + 653000, // real block 653001 + RpcChain::MainNet + => ignore["halts execution"] + )] + #[test_case( + "0x2d2bed435d0b43a820443aad2bc9e3d4fa110c428e65e422101dfa100ba5664", + 653000, // real block 653001 + RpcChain::MainNet + => ignore + )] + #[test_case( + "0x3330b29e8b99dedef79f5c7cdc2b510c590155add29dcc5e2f92d176d8e19d", + 653000, // real block 653001 + RpcChain::MainNet + => ignore + )] fn blockifier_tx(hash: &str, block_number: u64, chain: RpcChain) { // Execute using blockifier let (tx_info, trace, _receipt) = execute_tx(hash, chain, BlockNumber(block_number)); diff --git a/rpc-state-reader/src/rpc_state.rs b/rpc-state-reader/src/rpc_state.rs index c3dfd63..814ca1c 100644 --- a/rpc-state-reader/src/rpc_state.rs +++ b/rpc-state-reader/src/rpc_state.rs @@ -10,7 +10,7 @@ use cairo_vm::vm::runners::{ use core::fmt; use dotenv::dotenv; use serde::{Deserialize, Deserializer}; -use serde_json::{json, Value}; +use serde_json::json; use starknet::core::types::ContractClass as SNContractClass; use starknet_api::{ block::{BlockNumber, BlockTimestamp}, From d42eed66725c654f42c4a2fc6ef7c6c858f52e7b Mon Sep 17 00:00:00 2001 From: Pedro Fontana Date: Sun, 7 Jul 2024 16:39:38 +0200 Subject: [PATCH 14/14] Update blockifier and cairo-lang version (#20) --- Cargo.lock | 139 ++++++++++++++++++++---------------- Cargo.toml | 2 +- rpc-state-reader/Cargo.toml | 10 +-- 3 files changed, 84 insertions(+), 67 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0ce6b7a..9cc5307 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -442,7 +442,7 @@ dependencies = [ [[package]] name = "blockifier" version = "0.7.0-dev.1" -source = "git+https://github.com/lambdaclass/blockifier?rev=e8c166195e601ef6c4951f135fdf660a9b795819#e8c166195e601ef6c4951f135fdf660a9b795819" +source = "git+https://github.com/lambdaclass/blockifier?rev=d458a8d64b6d31da49c447576894ce013af862c2#d458a8d64b6d31da49c447576894ce013af862c2" dependencies = [ "anyhow", "ark-ec", @@ -474,7 +474,7 @@ dependencies = [ "serde_json", "sha3", "starknet-crypto 0.6.2", - "starknet-types-core 0.1.4", + "starknet-types-core 0.1.2", "starknet_api", "strum", "strum_macros", @@ -556,9 +556,9 @@ dependencies = [ [[package]] name = "cairo-lang-casm" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10d9c31baeb6b52586b5adc88f01e90f86389d63d94363c562de5c79352e545b" +checksum = "6296d5748288d9fb97175d31aff9f68ea3f602456923895e512b078e9a2210a0" dependencies = [ "cairo-lang-utils", "indoc", @@ -570,9 +570,9 @@ dependencies = [ [[package]] name = "cairo-lang-compiler" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7148cb2d72a3db24a6d2ef2b2602102cc5099cb9f6b913e5047fb009cb3a22a1" +checksum = "a7be5083c3328dad2248a94f0a24b3520c588e7d3bd5891770e4c91d3facade3" dependencies = [ "anyhow", "cairo-lang-defs", @@ -593,18 +593,18 @@ dependencies = [ [[package]] name = "cairo-lang-debug" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a761eb8e31ea65a2dd45f729c74f1770315f97124dad93d1f6853a10d460c6b" +checksum = "2a3cbf67fd766cb7ed48b72e6abf7041857518c9b9fd42475a60c138671c6603" dependencies = [ "cairo-lang-utils", ] [[package]] name = "cairo-lang-defs" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d60bc5d72fe7a95ba34e041dcbdf1cf3bfccb87008a515514b74913fa8ff05" +checksum = "7b284e41dfc158dfbdc02612dbfdb27a55547d23063bdc53105eeec41d8df006" dependencies = [ "cairo-lang-debug", "cairo-lang-diagnostics", @@ -619,9 +619,9 @@ dependencies = [ [[package]] name = "cairo-lang-diagnostics" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356089e1b0a0ba9e115566191745613b3806a20259ad76764df82ab534d5412a" +checksum = "c6314b24901af8be75cd0e1363e3ff1a8020066372501f4cfc9161726b06ec2a" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -631,9 +631,9 @@ dependencies = [ [[package]] name = "cairo-lang-eq-solver" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc43246cc2e5afd5a028bcdd63876ac3f8b1f4fb3ff785daaa0f0fbb51c9d906" +checksum = "4f95f5c8f7ea75580d164b5304251022e3d47f43fc1c778a01381b55ca9f268c" dependencies = [ "cairo-lang-utils", "good_lp", @@ -641,9 +641,9 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bcb9a4a40e53fa099774bd08bbcc3430f51213cc7fb1b50c2e9d01155731798" +checksum = "d3e58b80f0b413ef1320358fde1a0877fc3fbf740f5cead0de3e947a1bc3bfd4" dependencies = [ "cairo-lang-debug", "cairo-lang-utils", @@ -655,9 +655,9 @@ dependencies = [ [[package]] name = "cairo-lang-lowering" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba60e1e2477aa0f610ccf29189097d580464607c94b51741e1c18e64d6cee5f" +checksum = "abe6d604a06ea96c05b3666f2e8fac63cb8709e13667de272912f81db004a16b" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -680,9 +680,9 @@ dependencies = [ [[package]] name = "cairo-lang-parser" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f16ba1535e0cc5e79c2eff6592859bbdac03dc53d4dcdd26dbdbc04a77c3f5c" +checksum = "eaf1c279de47a77422f81b8a98023cd523cf0ae79f7153d60c4cf8b62b8ece2f" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", @@ -700,9 +700,9 @@ dependencies = [ [[package]] name = "cairo-lang-plugins" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81c8cf6e0ee3d6b19429cc1663738b22f1ecea7d51bf7452e8e1086f08798baf" +checksum = "a1177a07498bdf45cba62f0c727388ff7433072847dbf701c58fa3c3e358154e" dependencies = [ "cairo-lang-defs", "cairo-lang-diagnostics", @@ -719,9 +719,9 @@ dependencies = [ [[package]] name = "cairo-lang-proc-macros" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67f9da66325ce7ed6c002360f26106fe79deb9f8a2fca30abdbb8d388da7bb46" +checksum = "0c90d812ec983c5a8e3173aca3fc55036b9739201c89f30271ee14a4c1189379" dependencies = [ "cairo-lang-debug", "quote", @@ -730,9 +730,9 @@ dependencies = [ [[package]] name = "cairo-lang-project" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e198af1ab3d05c7fb8b6a9a7a2e9bce245a6c855df5f770b751d29874a23b152" +checksum = "3985495d7e9dc481e97135d7139cfa098024351fb51d5feef8366b5fbc104807" dependencies = [ "cairo-lang-filesystem", "cairo-lang-utils", @@ -744,9 +744,9 @@ dependencies = [ [[package]] name = "cairo-lang-runner" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf211f5431e2a6f4802b1b6483bf8e998e506a3be5369ed54a8807aae6e4dbf" +checksum = "fcc7c5969d107d24dbd7612ab7afec65d25475fe51d4bb708e3c773f2346c92b" dependencies = [ "ark-ff", "ark-secp256k1", @@ -775,9 +775,9 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7df81521c2125e3e95b683cc99374db1aebd7ddb317c5ca3dd92a235a9eb13" +checksum = "d5cfadbb9ca3479a6b5c02c0a125a5747835ba57a2de9c4e9764f42d85abe059" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -800,9 +800,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07da3ca1434c62a7cc7cd77d2941ef47a1c23b37325781b59407b78d8c61d863" +checksum = "74a57492267a5a8891866b6e48cdefa508b5f05931a5f8eaf004b9de15b1ffd6" dependencies = [ "anyhow", "cairo-felt", @@ -826,9 +826,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-ap-change" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122c9055eb609a511178e3dce577de061819fd4c4c6b7452804557f76ca43bbf" +checksum = "6fdbb4bd95477123653b9200bd4e9dceae95a914f6fe85b2bed83b223e36fb5a" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -841,9 +841,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-gas" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf049d9aea65c6e38da219a3700c72f78795d11449d9adcec28047ef8d63bd23" +checksum = "882cb178f1b79aabf70acce1d87b08d569d8a4b0ce8b1d8f538a02cdb36789db" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -856,9 +856,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-generator" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e1d75e0830279ca1bd0189e3326720d6e081225f7d81ed060bbd22c6b37e980" +checksum = "4d80c9d29e6d3f4ab60e698ebe2de84dcf90570c3dd1cfa7b01bd5c42470331c" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -879,9 +879,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-to-casm" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a3c3be88c8562fbf93b0803c186e7282f6daad93576c07f61b04a591fde468f" +checksum = "3ac02c90be2630ae861db6af226090da92741020519768332dd2c07e24d94c75" dependencies = [ "assert_matches", "cairo-felt", @@ -900,9 +900,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-type-size" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a38da6f98c6b16945c89d2ae351c82d636ed38d3e6eb02f7c8679e3e03a63988" +checksum = "d102b10989f9637b1c916dd950cbd1bd8bb1b6a7aaa1a3035390be0683b92d85" dependencies = [ "cairo-lang-sierra", "cairo-lang-utils", @@ -910,9 +910,9 @@ dependencies = [ [[package]] name = "cairo-lang-starknet" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9ffa8b3b8c47138c36b1907cebb5047dfc4de29ec10ece5bd6d6853243ec50" +checksum = "a27921a2bf82d191d28afd570b913341080c8fc25c83bf870dbf1252570b1b41" dependencies = [ "anyhow", "cairo-felt", @@ -941,9 +941,9 @@ dependencies = [ [[package]] name = "cairo-lang-starknet-classes" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c64ae2bb00173e3a88760128bf72de356fa80eb19fa47602479063648b4003" +checksum = "8623b076ef3569e4262da5da270a84658b1ff242fe0c9624fbe432e7a937d101" dependencies = [ "cairo-felt", "cairo-lang-casm", @@ -966,9 +966,9 @@ dependencies = [ [[package]] name = "cairo-lang-syntax" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8262c426a57e1e5ec297db24278464841500613445e2cb1c43d5f71ad91ee8d6" +checksum = "4c62f5bd74e249636e7c48d8b95e6cc0ee991206d4a6cbe5c2624184a828e70b" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -992,9 +992,9 @@ dependencies = [ [[package]] name = "cairo-lang-test-plugin" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c2d77976328ac79509b9c33e4380d15aeff7c8ee07fbaea6b41dd469084738" +checksum = "592e7e5f875d69428aae446e299d3c4618c7fb326adafc5d3a83bd8a5a916111" dependencies = [ "anyhow", "cairo-felt", @@ -1020,9 +1020,9 @@ dependencies = [ [[package]] name = "cairo-lang-utils" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf733a7cdc4166d0baf0ed8a98d9ada827daee6653b37d9326e334e53481c6d3" +checksum = "e6f98e8769412907ceb106c21c70907cc0c87ca0a2a44c82b6229a695a6f9b48" dependencies = [ "hashbrown 0.14.5", "indexmap 2.2.6", @@ -1037,7 +1037,7 @@ dependencies = [ [[package]] name = "cairo-native" version = "0.2.0" -source = "git+https://github.com/lambdaclass/cairo_native?rev=c64f5ee86391574d2ee63f9df65a0c2789942778#c64f5ee86391574d2ee63f9df65a0c2789942778" +source = "git+https://github.com/lambdaclass/cairo_native?rev=905d6959662edfec4829568f995206fcb8bf64d0#905d6959662edfec4829568f995206fcb8bf64d0" dependencies = [ "anyhow", "bumpalo", @@ -1076,7 +1076,7 @@ dependencies = [ "num-traits 0.2.19", "p256", "sec1", - "starknet-types-core 0.1.4", + "starknet-types-core 0.1.2", "stats_alloc", "tempfile", "thiserror", @@ -1087,7 +1087,7 @@ dependencies = [ [[package]] name = "cairo-native-runtime" version = "0.2.0" -source = "git+https://github.com/lambdaclass/cairo_native?rev=c64f5ee86391574d2ee63f9df65a0c2789942778#c64f5ee86391574d2ee63f9df65a0c2789942778" +source = "git+https://github.com/lambdaclass/cairo_native?rev=905d6959662edfec4829568f995206fcb8bf64d0#905d6959662edfec4829568f995206fcb8bf64d0" dependencies = [ "cairo-lang-runner", "cairo-lang-sierra-gas", @@ -1095,7 +1095,7 @@ dependencies = [ "libc", "starknet-crypto 0.6.2", "starknet-curve 0.4.2", - "starknet-types-core 0.1.4", + "starknet-types-core 0.1.2", ] [[package]] @@ -2411,6 +2411,18 @@ dependencies = [ "sha3", ] +[[package]] +name = "lambdaworks-crypto" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fb5d4f22241504f7c7b8d2c3a7d7835d7c07117f10bff2a7d96a9ef6ef217c3" +dependencies = [ + "lambdaworks-math 0.7.0", + "serde", + "sha2", + "sha3", +] + [[package]] name = "lambdaworks-math" version = "0.6.0" @@ -2426,6 +2438,10 @@ name = "lambdaworks-math" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "358e172628e713b80a530a59654154bfc45783a6ed70ea284839800cebdf8f97" +dependencies = [ + "serde", + "serde_json", +] [[package]] name = "lazy_static" @@ -2486,9 +2502,9 @@ checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "llvm-sys" -version = "180.0.0" +version = "181.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "778fa5fa02e32728e718f11eec147e6f134137399ab02fd2c13d32476337affa" +checksum = "890e59e3db86b787af9d9b53c6accc0193e9b698293dda178c0821dbc3fb6217" dependencies = [ "anyhow", "cc", @@ -4037,7 +4053,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1e16522c1c9aa7fc149a46816cd18aa12a5fc2b2b75a018089022db473a9237" dependencies = [ "bitvec", - "lambdaworks-crypto", + "lambdaworks-crypto 0.6.0", "lambdaworks-math 0.6.0", "lazy_static", "num-bigint", @@ -4048,10 +4064,11 @@ dependencies = [ [[package]] name = "starknet-types-core" -version = "0.1.4" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65799574816ba83cb04b21a3cb16f791b9882687cd9093415fd1b3821dbac29d" +checksum = "4098ac4ad57621cc7ec133b80fe72814d2cc4bee63ca8e7be4450ba6f42a07e8" dependencies = [ + "lambdaworks-crypto 0.7.0", "lambdaworks-math 0.7.0", "num-bigint", "num-integer", diff --git a/Cargo.toml b/Cargo.toml index 092c701..073b3a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,5 +9,5 @@ resolver = "2" [workspace.dependencies] thiserror = "1.0.32" starknet_api = "=0.12.0-dev.1" -blockifier = { git = "https://github.com/lambdaclass/blockifier", rev = "e8c166195e601ef6c4951f135fdf660a9b795819" } +blockifier = { git = "https://github.com/lambdaclass/blockifier", rev = "d458a8d64b6d31da49c447576894ce013af862c2" } tracing = "0.1" diff --git a/rpc-state-reader/Cargo.toml b/rpc-state-reader/Cargo.toml index fae7868..7981de1 100644 --- a/rpc-state-reader/Cargo.toml +++ b/rpc-state-reader/Cargo.toml @@ -10,11 +10,11 @@ serde_json = { version = "1.0", features = [ "arbitrary_precision", "raw_value", ] } -starknet_api = { workspace = true } -cairo-lang-starknet = "=2.6.3" -cairo-lang-starknet-classes = "=2.6.3" -cairo-lang-utils = "=2.6.3" -starknet = "0.7.0" +starknet_api = {workspace = true} +cairo-lang-starknet = "=2.6.4" +cairo-lang-starknet-classes = "=2.6.4" +cairo-lang-utils = "=2.6.4" +starknet = "0.7.0" thiserror = { workspace = true } flate2 = "1.0.25" dotenv = "0.15.0"