From fac118770ec9f00b7505bf27d313b7b3463bdf72 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Fri, 6 Dec 2024 13:55:33 -0300 Subject: [PATCH 01/14] update-seq --- Cargo.lock | 37 ++++++---------------- Cargo.toml | 8 ++--- rpc-state-reader/src/execution.rs | 52 +++++++++++++++++++++---------- 3 files changed, 50 insertions(+), 47 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3ba4c3a..5f2f0f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -655,7 +655,6 @@ dependencies = [ [[package]] name = "blockifier" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "anyhow", "ark-ec", @@ -699,7 +698,6 @@ dependencies = [ [[package]] name = "blockifier_reexecution" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "assert_matches", "blockifier", @@ -1574,9 +1572,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.22" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69371e34337c4c984bbe322360c2547210bf632eb2814bbe78a6e87a2935bd2b" +checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84" dependencies = [ "clap_builder", "clap_derive", @@ -1584,9 +1582,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.22" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e24c1b4099818523236a8ca881d2b45db98dadfb4625cf6608c12069fcbbde1" +checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838" dependencies = [ "anstream", "anstyle", @@ -1608,9 +1606,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "coins-bip32" @@ -3770,9 +3768,9 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "infra_utils" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "tokio", + "tracing", ] [[package]] @@ -4539,7 +4537,6 @@ dependencies = [ [[package]] name = "mempool_test_utils" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "assert_matches", "blockifier", @@ -5003,7 +5000,6 @@ dependencies = [ [[package]] name = "papyrus_common" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "base64 0.13.1", "cairo-lang-starknet-classes", @@ -5022,7 +5018,6 @@ dependencies = [ [[package]] name = "papyrus_config" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "clap", "infra_utils", @@ -5037,7 +5032,6 @@ dependencies = [ [[package]] name = "papyrus_execution" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "anyhow", "blockifier", @@ -5060,7 +5054,6 @@ dependencies = [ [[package]] name = "papyrus_network_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "libp2p", "serde", @@ -5069,7 +5062,6 @@ dependencies = [ [[package]] name = "papyrus_proc_macros" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "quote", "syn 2.0.90", @@ -5079,7 +5071,6 @@ dependencies = [ [[package]] name = "papyrus_rpc" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "anyhow", "async-trait", @@ -5113,7 +5104,6 @@ dependencies = [ [[package]] name = "papyrus_storage" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "byteorder", "cairo-lang-casm", @@ -6950,7 +6940,6 @@ dependencies = [ [[package]] name = "starknet_api" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "bitvec", "cairo-lang-runner", @@ -6960,9 +6949,9 @@ dependencies = [ "indexmap 2.7.0", "itertools 0.12.1", "num-bigint", - "papyrus_proc_macros", "pretty_assertions", "primitive-types", + "semver", "serde", "serde_json", "sha3", @@ -6976,7 +6965,6 @@ dependencies = [ [[package]] name = "starknet_client" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "async-trait", "cairo-lang-starknet-classes", @@ -7003,7 +6991,6 @@ dependencies = [ [[package]] name = "starknet_gateway" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "async-trait", "axum", @@ -7031,7 +7018,6 @@ dependencies = [ [[package]] name = "starknet_gateway_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "async-trait", "axum", @@ -7050,7 +7036,6 @@ dependencies = [ [[package]] name = "starknet_mempool_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "async-trait", "papyrus_network_types", @@ -7064,7 +7049,6 @@ dependencies = [ [[package]] name = "starknet_sequencer_infra" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "async-trait", "bincode 1.3.3", @@ -7082,7 +7066,6 @@ dependencies = [ [[package]] name = "starknet_sierra_compile" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=bfc5b6b5475d359b8fc910516e026d972be5d02f#bfc5b6b5475d359b8fc910516e026d972be5d02f" dependencies = [ "cairo-lang-sierra", "cairo-lang-starknet-classes", @@ -7523,9 +7506,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", diff --git a/Cargo.toml b/Cargo.toml index a6f7403..6f9c129 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ serde_with = "3.11.0" serde = "1.0.197" cairo-native = "0.2.4" # Sequencer Dependencies -starknet_api = { git = "https://github.com/lambdaclass/sequencer.git", rev = "bfc5b6b5475d359b8fc910516e026d972be5d02f" } # replay -blockifier = { git = "https://github.com/lambdaclass/sequencer.git", rev = "bfc5b6b5475d359b8fc910516e026d972be5d02f", features = ["cairo_native"] } # replay -starknet_gateway = { git = "https://github.com/lambdaclass/sequencer.git", rev = "bfc5b6b5475d359b8fc910516e026d972be5d02f" } # replay -blockifier_reexecution = { git = "https://github.com/lambdaclass/sequencer.git", rev = "bfc5b6b5475d359b8fc910516e026d972be5d02f" } # replay +starknet_api = { path = "../sequencer/crates/starknet_api" } # replay +blockifier = { path = "../sequencer/crates/blockifier", features = ["cairo_native"] } # replay +starknet_gateway = { path = "../sequencer/crates/starknet_gateway" } # replay +blockifier_reexecution = { path = "../sequencer/crates/blockifier_reexecution" } # replay diff --git a/rpc-state-reader/src/execution.rs b/rpc-state-reader/src/execution.rs index 85f504f..e1f9b5a 100644 --- a/rpc-state-reader/src/execution.rs +++ b/rpc-state-reader/src/execution.rs @@ -7,6 +7,7 @@ use blockifier::{ context::{BlockContext, ChainInfo, FeeTokenAddresses}, state::{cached_state::CachedState, state_api::StateReader}, test_utils::MAX_FEE, + transaction::account_transaction::ExecutionFlags, transaction::{ objects::{TransactionExecutionInfo, TransactionExecutionResult}, transaction_execution::Transaction as BlockiTransaction, @@ -20,7 +21,7 @@ use blockifier_reexecution::state_reader::compile::{ use starknet::core::types::ContractClass as SNContractClass; use starknet_api::{ block::{BlockInfo, BlockNumber}, - contract_class::ClassInfo, + contract_class::{ClassInfo, SierraVersion}, core::ContractAddress, felt, hash::StarkHash, @@ -80,10 +81,16 @@ pub fn execute_tx( BouncerConfig::max(), ); + let exec_flags = ExecutionFlags { + charge_fee: true, + only_query: false, + validate: true, + }; + // Map starknet_api transaction to blockifier's let blockifier_tx = match tx { SNTransaction::Invoke(_) | SNTransaction::DeployAccount(_) => { - BlockiTransaction::from_api(tx, tx_hash, None, None, None, false).unwrap() + BlockiTransaction::from_api(tx, tx_hash, None, None, None, exec_flags).unwrap() } SNTransaction::Declare(ref declare_tx) => { let block_number = block_context.block_info().block_number; @@ -95,17 +102,17 @@ pub fn execute_tx( .unwrap(); let class_info = calculate_class_info_for_testing(contract_class); - BlockiTransaction::from_api(tx, tx_hash, Some(class_info), None, None, false).unwrap() + BlockiTransaction::from_api(tx, tx_hash, Some(class_info), None, None, exec_flags).unwrap() } SNTransaction::L1Handler(_) => { - BlockiTransaction::from_api(tx, tx_hash, None, Some(MAX_FEE), None, false).unwrap() + BlockiTransaction::from_api(tx, tx_hash, None, Some(MAX_FEE), None, exec_flags).unwrap() } _ => todo!(), }; ( blockifier_tx - .execute(&mut state, &block_context, false, true) + .execute(&mut state, &block_context) .unwrap(), trace, receipt, @@ -117,13 +124,13 @@ fn calculate_class_info_for_testing(contract_class: SNContractClass) -> ClassInf SNContractClass::Sierra(s) => { let abi = s.abi.len(); let program_length = s.sierra_program.len(); - - ClassInfo::new(&sierra_to_contact_class_v1(s).unwrap(), program_length, abi).unwrap() + let sierra_version = SierraVersion::extract_from_program(&s.sierra_program).unwrap(); + ClassInfo::new(&sierra_to_contact_class_v1(s).unwrap(), program_length, abi, sierra_version).unwrap() } SNContractClass::Legacy(l) => { let abi = l.abi.clone().unwrap().len(); - ClassInfo::new(&legacy_to_contract_class_v0(l).unwrap(), 0, abi).unwrap() + ClassInfo::new(&legacy_to_contract_class_v0(l).unwrap(), 0, abi, SierraVersion::DEPRECATED).unwrap() } } } @@ -172,10 +179,16 @@ pub fn execute_tx_configurable_with_state( BouncerConfig::max(), ); + let exec_flags = ExecutionFlags { + charge_fee, + only_query: false, + validate: true, + }; + // Get transaction before giving ownership of the reader let blockifier_tx = match tx { SNTransaction::Invoke(_) | SNTransaction::DeployAccount(_) => { - BlockiTransaction::from_api(tx, tx_hash, None, None, None, false).unwrap() + BlockiTransaction::from_api(tx, tx_hash, None, None, None, exec_flags).unwrap() } SNTransaction::Declare(ref declare_tx) => { let block_number = block_context.block_info().block_number; @@ -187,15 +200,16 @@ pub fn execute_tx_configurable_with_state( .unwrap(); let class_info = calculate_class_info_for_testing(contract_class); - BlockiTransaction::from_api(tx, tx_hash, Some(class_info), None, None, false).unwrap() + BlockiTransaction::from_api(tx, tx_hash, Some(class_info), None, None, exec_flags) + .unwrap() } SNTransaction::L1Handler(_) => { - BlockiTransaction::from_api(tx, tx_hash, None, Some(MAX_FEE), None, false).unwrap() + BlockiTransaction::from_api(tx, tx_hash, None, Some(MAX_FEE), None, exec_flags).unwrap() } _ => unimplemented!(), }; - blockifier_tx.execute(state, &block_context, charge_fee, true) + blockifier_tx.execute(state, &block_context) } pub fn execute_tx_configurable( @@ -232,9 +246,15 @@ pub fn execute_tx_with_blockifier( transaction: SNTransaction, transaction_hash: TransactionHash, ) -> TransactionExecutionResult { + let exec_flags = ExecutionFlags { + charge_fee: true, + only_query: false, + validate: true, + }; + let account_transaction: BlockiTransaction = match transaction { SNTransaction::Invoke(_) | SNTransaction::DeployAccount(_) => { - BlockiTransaction::from_api(transaction, transaction_hash, None, None, None, false)? + BlockiTransaction::from_api(transaction, transaction_hash, None, None, None, exec_flags)? } // SNTransaction::Declare(ref declare_tx) => { // let block_number = context.block_info().block_number; @@ -251,7 +271,7 @@ pub fn execute_tx_with_blockifier( // Some(class_info), // None, // None, - // false, + // exec_flags, // )? // } SNTransaction::L1Handler(_) => { @@ -262,13 +282,13 @@ pub fn execute_tx_with_blockifier( None, Some(MAX_FEE), None, - false, + exec_flags, )? } _ => unimplemented!(), }; - account_transaction.execute(state, &context, true, true) + account_transaction.execute(state, &context) } fn parse_to_rpc_chain(network: &str) -> RpcChain { From 5c3f5e7b9d024607fa06c1359df9deaa7b79e53f Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Fri, 6 Dec 2024 14:08:51 -0300 Subject: [PATCH 02/14] update-seq --- rpc-state-reader/src/execution.rs | 34 +++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/rpc-state-reader/src/execution.rs b/rpc-state-reader/src/execution.rs index e1f9b5a..417f66d 100644 --- a/rpc-state-reader/src/execution.rs +++ b/rpc-state-reader/src/execution.rs @@ -102,7 +102,8 @@ pub fn execute_tx( .unwrap(); let class_info = calculate_class_info_for_testing(contract_class); - BlockiTransaction::from_api(tx, tx_hash, Some(class_info), None, None, exec_flags).unwrap() + BlockiTransaction::from_api(tx, tx_hash, Some(class_info), None, None, exec_flags) + .unwrap() } SNTransaction::L1Handler(_) => { BlockiTransaction::from_api(tx, tx_hash, None, Some(MAX_FEE), None, exec_flags).unwrap() @@ -111,9 +112,7 @@ pub fn execute_tx( }; ( - blockifier_tx - .execute(&mut state, &block_context) - .unwrap(), + blockifier_tx.execute(&mut state, &block_context).unwrap(), trace, receipt, ) @@ -125,12 +124,24 @@ fn calculate_class_info_for_testing(contract_class: SNContractClass) -> ClassInf let abi = s.abi.len(); let program_length = s.sierra_program.len(); let sierra_version = SierraVersion::extract_from_program(&s.sierra_program).unwrap(); - ClassInfo::new(&sierra_to_contact_class_v1(s).unwrap(), program_length, abi, sierra_version).unwrap() + ClassInfo::new( + &sierra_to_contact_class_v1(s).unwrap(), + program_length, + abi, + sierra_version, + ) + .unwrap() } SNContractClass::Legacy(l) => { let abi = l.abi.clone().unwrap().len(); - ClassInfo::new(&legacy_to_contract_class_v0(l).unwrap(), 0, abi, SierraVersion::DEPRECATED).unwrap() + ClassInfo::new( + &legacy_to_contract_class_v0(l).unwrap(), + 0, + abi, + SierraVersion::DEPRECATED, + ) + .unwrap() } } } @@ -253,9 +264,14 @@ pub fn execute_tx_with_blockifier( }; let account_transaction: BlockiTransaction = match transaction { - SNTransaction::Invoke(_) | SNTransaction::DeployAccount(_) => { - BlockiTransaction::from_api(transaction, transaction_hash, None, None, None, exec_flags)? - } + SNTransaction::Invoke(_) | SNTransaction::DeployAccount(_) => BlockiTransaction::from_api( + transaction, + transaction_hash, + None, + None, + None, + exec_flags, + )?, // SNTransaction::Declare(ref declare_tx) => { // let block_number = context.block_info().block_number; // let network = parse_to_rpc_chain(&context.chain_info().chain_id.to_string()); From cf34b2b6906d4b9dc14f2383f15de6b5b9bc87d8 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Fri, 6 Dec 2024 17:25:03 -0300 Subject: [PATCH 03/14] update-seq-2 --- Cargo.lock | 18 ++++++++++++++++++ Cargo.toml | 8 ++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5f2f0f6..99fb69b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -655,6 +655,7 @@ dependencies = [ [[package]] name = "blockifier" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "anyhow", "ark-ec", @@ -698,6 +699,7 @@ dependencies = [ [[package]] name = "blockifier_reexecution" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "assert_matches", "blockifier", @@ -3768,6 +3770,7 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "infra_utils" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "tokio", "tracing", @@ -4537,6 +4540,7 @@ dependencies = [ [[package]] name = "mempool_test_utils" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "assert_matches", "blockifier", @@ -5000,6 +5004,7 @@ dependencies = [ [[package]] name = "papyrus_common" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "base64 0.13.1", "cairo-lang-starknet-classes", @@ -5018,6 +5023,7 @@ dependencies = [ [[package]] name = "papyrus_config" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "clap", "infra_utils", @@ -5032,6 +5038,7 @@ dependencies = [ [[package]] name = "papyrus_execution" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "anyhow", "blockifier", @@ -5054,6 +5061,7 @@ dependencies = [ [[package]] name = "papyrus_network_types" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "libp2p", "serde", @@ -5062,6 +5070,7 @@ dependencies = [ [[package]] name = "papyrus_proc_macros" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "quote", "syn 2.0.90", @@ -5071,6 +5080,7 @@ dependencies = [ [[package]] name = "papyrus_rpc" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "anyhow", "async-trait", @@ -5104,6 +5114,7 @@ dependencies = [ [[package]] name = "papyrus_storage" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "byteorder", "cairo-lang-casm", @@ -6940,6 +6951,7 @@ dependencies = [ [[package]] name = "starknet_api" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "bitvec", "cairo-lang-runner", @@ -6965,6 +6977,7 @@ dependencies = [ [[package]] name = "starknet_client" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "async-trait", "cairo-lang-starknet-classes", @@ -6991,6 +7004,7 @@ dependencies = [ [[package]] name = "starknet_gateway" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "async-trait", "axum", @@ -7018,6 +7032,7 @@ dependencies = [ [[package]] name = "starknet_gateway_types" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "async-trait", "axum", @@ -7036,6 +7051,7 @@ dependencies = [ [[package]] name = "starknet_mempool_types" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "async-trait", "papyrus_network_types", @@ -7049,6 +7065,7 @@ dependencies = [ [[package]] name = "starknet_sequencer_infra" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "async-trait", "bincode 1.3.3", @@ -7066,6 +7083,7 @@ dependencies = [ [[package]] name = "starknet_sierra_compile" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" dependencies = [ "cairo-lang-sierra", "cairo-lang-starknet-classes", diff --git a/Cargo.toml b/Cargo.toml index 6f9c129..2e897de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ serde_with = "3.11.0" serde = "1.0.197" cairo-native = "0.2.4" # Sequencer Dependencies -starknet_api = { path = "../sequencer/crates/starknet_api" } # replay -blockifier = { path = "../sequencer/crates/blockifier", features = ["cairo_native"] } # replay -starknet_gateway = { path = "../sequencer/crates/starknet_gateway" } # replay -blockifier_reexecution = { path = "../sequencer/crates/blockifier_reexecution" } # replay +starknet_api = { git = "https://github.com/lambdaclass/sequencer.git", rev = "8458c20ae510b601c9b82daaa3d597feee582828" } # replay +blockifier = { git = "https://github.com/lambdaclass/sequencer.git", rev = "8458c20ae510b601c9b82daaa3d597feee582828", features = ["cairo_native"] } # replay +starknet_gateway = { git = "https://github.com/lambdaclass/sequencer.git", rev = "8458c20ae510b601c9b82daaa3d597feee582828" } # replay +blockifier_reexecution = { git = "https://github.com/lambdaclass/sequencer.git", rev = "8458c20ae510b601c9b82daaa3d597feee582828" } # replay From 7d1be5cc491aa691666716c2969988cf106dd73c Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Fri, 6 Dec 2024 18:01:17 -0300 Subject: [PATCH 04/14] update-seq-2 --- Cargo.lock | 36 ++++++++++++++++++------------------ Cargo.toml | 8 ++++---- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 99fb69b..8e6035e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -655,7 +655,7 @@ dependencies = [ [[package]] name = "blockifier" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "anyhow", "ark-ec", @@ -699,7 +699,7 @@ dependencies = [ [[package]] name = "blockifier_reexecution" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "assert_matches", "blockifier", @@ -3770,7 +3770,7 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "infra_utils" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "tokio", "tracing", @@ -4540,7 +4540,7 @@ dependencies = [ [[package]] name = "mempool_test_utils" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "assert_matches", "blockifier", @@ -5004,7 +5004,7 @@ dependencies = [ [[package]] name = "papyrus_common" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "base64 0.13.1", "cairo-lang-starknet-classes", @@ -5023,7 +5023,7 @@ dependencies = [ [[package]] name = "papyrus_config" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "clap", "infra_utils", @@ -5038,7 +5038,7 @@ dependencies = [ [[package]] name = "papyrus_execution" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "anyhow", "blockifier", @@ -5061,7 +5061,7 @@ dependencies = [ [[package]] name = "papyrus_network_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "libp2p", "serde", @@ -5070,7 +5070,7 @@ dependencies = [ [[package]] name = "papyrus_proc_macros" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "quote", "syn 2.0.90", @@ -5080,7 +5080,7 @@ dependencies = [ [[package]] name = "papyrus_rpc" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "anyhow", "async-trait", @@ -5114,7 +5114,7 @@ dependencies = [ [[package]] name = "papyrus_storage" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "byteorder", "cairo-lang-casm", @@ -6951,7 +6951,7 @@ dependencies = [ [[package]] name = "starknet_api" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "bitvec", "cairo-lang-runner", @@ -6977,7 +6977,7 @@ dependencies = [ [[package]] name = "starknet_client" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "async-trait", "cairo-lang-starknet-classes", @@ -7004,7 +7004,7 @@ dependencies = [ [[package]] name = "starknet_gateway" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "async-trait", "axum", @@ -7032,7 +7032,7 @@ dependencies = [ [[package]] name = "starknet_gateway_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "async-trait", "axum", @@ -7051,7 +7051,7 @@ dependencies = [ [[package]] name = "starknet_mempool_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "async-trait", "papyrus_network_types", @@ -7065,7 +7065,7 @@ dependencies = [ [[package]] name = "starknet_sequencer_infra" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "async-trait", "bincode 1.3.3", @@ -7083,7 +7083,7 @@ dependencies = [ [[package]] name = "starknet_sierra_compile" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=8458c20ae510b601c9b82daaa3d597feee582828#8458c20ae510b601c9b82daaa3d597feee582828" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "cairo-lang-sierra", "cairo-lang-starknet-classes", diff --git a/Cargo.toml b/Cargo.toml index 2e897de..1fd4d7d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ serde_with = "3.11.0" serde = "1.0.197" cairo-native = "0.2.4" # Sequencer Dependencies -starknet_api = { git = "https://github.com/lambdaclass/sequencer.git", rev = "8458c20ae510b601c9b82daaa3d597feee582828" } # replay -blockifier = { git = "https://github.com/lambdaclass/sequencer.git", rev = "8458c20ae510b601c9b82daaa3d597feee582828", features = ["cairo_native"] } # replay -starknet_gateway = { git = "https://github.com/lambdaclass/sequencer.git", rev = "8458c20ae510b601c9b82daaa3d597feee582828" } # replay -blockifier_reexecution = { git = "https://github.com/lambdaclass/sequencer.git", rev = "8458c20ae510b601c9b82daaa3d597feee582828" } # replay +starknet_api = { git = "https://github.com/lambdaclass/sequencer.git", rev = "64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" } # replay +blockifier = { git = "https://github.com/lambdaclass/sequencer.git", rev = "64cebe240c8e050cdec6efbe28eb8bf50f00f5e0", features = ["cairo_native"] } # replay +starknet_gateway = { git = "https://github.com/lambdaclass/sequencer.git", rev = "64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" } # replay +blockifier_reexecution = { git = "https://github.com/lambdaclass/sequencer.git", rev = "64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" } # replay From c2187cb01ad34f6a0a88e5f2b78d8165dae3f1e4 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Mon, 9 Dec 2024 18:22:14 -0300 Subject: [PATCH 05/14] fix test (incomplete) --- Cargo.lock | 93 +- Cargo.toml | 8 +- rpc-state-reader/src/execution.rs | 3252 ++++++++++++++++++++++++++++- 3 files changed, 3268 insertions(+), 85 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8e6035e..cce20c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -655,7 +655,6 @@ dependencies = [ [[package]] name = "blockifier" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "anyhow", "ark-ec", @@ -699,7 +698,6 @@ dependencies = [ [[package]] name = "blockifier_reexecution" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "assert_matches", "blockifier", @@ -724,9 +722,9 @@ dependencies = [ [[package]] name = "bon" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9276fe602371cd8a7f70fe68c4db55b2d3e92c570627d6ed0427646edfa5cf47" +checksum = "f265cdb2e8501f1c952749e78babe8f1937be92c98120e5f78fc72d634682bad" dependencies = [ "bon-macros", "rustversion", @@ -734,9 +732,9 @@ dependencies = [ [[package]] name = "bon-macros" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94828b84b32b4f3ac3865f692fcdbc46c7d0dd87b29658a391d58a244e1ce45a" +checksum = "38aa5c627cd7706490e5b003d685f8b9d69bc343b1a00b9fdd01e75fdf6827cf" dependencies = [ "darling 0.20.10", "ident_case", @@ -1514,9 +1512,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" +checksum = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d" dependencies = [ "jobserver", "libc", @@ -1540,9 +1538,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1724,18 +1722,18 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const_format" -version = "0.2.33" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c655d81ff1114fb0dcdea9225ea9f0cc712a6f8d189378e82bdf62a473a64b" +checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" dependencies = [ "const_format_proc_macros", ] [[package]] name = "const_format_proc_macros" -version = "0.2.33" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff1a44b93f47b1bac19a27932f5c591e43d1ba357ee4f61526c8a25603f0eb1" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" dependencies = [ "proc-macro2", "quote", @@ -2688,9 +2686,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "ff" @@ -3770,7 +3768,6 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "infra_utils" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "tokio", "tracing", @@ -3865,9 +3862,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ "once_cell", "wasm-bindgen", @@ -4156,9 +4153,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.167" +version = "0.2.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" +checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" [[package]] name = "libloading" @@ -4540,7 +4537,6 @@ dependencies = [ [[package]] name = "mempool_test_utils" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "assert_matches", "blockifier", @@ -4666,9 +4662,9 @@ dependencies = [ [[package]] name = "multihash" -version = "0.19.2" +version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc41f430805af9d1cf4adae4ed2149c759b877b01d909a1f40256188d09345d2" +checksum = "6b430e7953c29dd6a09afc29ff0bb69c6e306329ee6794700aee27b76a1aea8d" dependencies = [ "core2", "serde", @@ -5004,7 +5000,6 @@ dependencies = [ [[package]] name = "papyrus_common" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "base64 0.13.1", "cairo-lang-starknet-classes", @@ -5023,7 +5018,6 @@ dependencies = [ [[package]] name = "papyrus_config" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "clap", "infra_utils", @@ -5038,7 +5032,6 @@ dependencies = [ [[package]] name = "papyrus_execution" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "anyhow", "blockifier", @@ -5061,7 +5054,6 @@ dependencies = [ [[package]] name = "papyrus_network_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "libp2p", "serde", @@ -5070,7 +5062,6 @@ dependencies = [ [[package]] name = "papyrus_proc_macros" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "quote", "syn 2.0.90", @@ -5080,7 +5071,6 @@ dependencies = [ [[package]] name = "papyrus_rpc" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "anyhow", "async-trait", @@ -5114,7 +5104,6 @@ dependencies = [ [[package]] name = "papyrus_storage" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "byteorder", "cairo-lang-casm", @@ -6078,15 +6067,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.41" +version = "0.38.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" dependencies = [ "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6951,7 +6940,6 @@ dependencies = [ [[package]] name = "starknet_api" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "bitvec", "cairo-lang-runner", @@ -6977,7 +6965,6 @@ dependencies = [ [[package]] name = "starknet_client" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "async-trait", "cairo-lang-starknet-classes", @@ -7004,7 +6991,6 @@ dependencies = [ [[package]] name = "starknet_gateway" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "async-trait", "axum", @@ -7032,7 +7018,6 @@ dependencies = [ [[package]] name = "starknet_gateway_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "async-trait", "axum", @@ -7051,7 +7036,6 @@ dependencies = [ [[package]] name = "starknet_mempool_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "async-trait", "papyrus_network_types", @@ -7065,7 +7049,6 @@ dependencies = [ [[package]] name = "starknet_sequencer_infra" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "async-trait", "bincode 1.3.3", @@ -7083,7 +7066,6 @@ dependencies = [ [[package]] name = "starknet_sierra_compile" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=64cebe240c8e050cdec6efbe28eb8bf50f00f5e0#64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" dependencies = [ "cairo-lang-sierra", "cairo-lang-starknet-classes", @@ -8040,9 +8022,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if", "once_cell", @@ -8051,13 +8033,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn 2.0.90", @@ -8066,9 +8047,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.47" +version = "0.4.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" dependencies = [ "cfg-if", "js-sys", @@ -8079,9 +8060,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -8089,9 +8070,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", @@ -8102,9 +8083,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "wasm-streams" @@ -8121,9 +8102,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/Cargo.toml b/Cargo.toml index 1fd4d7d..6f9c129 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ serde_with = "3.11.0" serde = "1.0.197" cairo-native = "0.2.4" # Sequencer Dependencies -starknet_api = { git = "https://github.com/lambdaclass/sequencer.git", rev = "64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" } # replay -blockifier = { git = "https://github.com/lambdaclass/sequencer.git", rev = "64cebe240c8e050cdec6efbe28eb8bf50f00f5e0", features = ["cairo_native"] } # replay -starknet_gateway = { git = "https://github.com/lambdaclass/sequencer.git", rev = "64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" } # replay -blockifier_reexecution = { git = "https://github.com/lambdaclass/sequencer.git", rev = "64cebe240c8e050cdec6efbe28eb8bf50f00f5e0" } # replay +starknet_api = { path = "../sequencer/crates/starknet_api" } # replay +blockifier = { path = "../sequencer/crates/blockifier", features = ["cairo_native"] } # replay +starknet_gateway = { path = "../sequencer/crates/starknet_gateway" } # replay +blockifier_reexecution = { path = "../sequencer/crates/blockifier_reexecution" } # replay diff --git a/rpc-state-reader/src/execution.rs b/rpc-state-reader/src/execution.rs index 417f66d..02697b3 100644 --- a/rpc-state-reader/src/execution.rs +++ b/rpc-state-reader/src/execution.rs @@ -352,17 +352,16 @@ pub fn fetch_block_context(reader: &RpcStateReader) -> BlockContext { #[cfg(test)] mod tests { - use std::thread; + use std::{collections::HashSet, thread}; use blockifier::{ - execution::call_info::CallInfo, + execution::call_info::{CallInfo, EventSummary, ExecutionSummary}, fee::resources::{StarknetResources, StateResources}, state::cached_state::StateChangesCount, }; use pretty_assertions_sorted::assert_eq_sorted; use starknet_api::{ - block::BlockNumber, - execution_resources::{GasAmount, GasVector}, + block::BlockNumber, core::PatriciaKey, execution_resources::{GasAmount, GasVector} }; use test_case::test_case; @@ -588,7 +587,110 @@ mod tests { n_modified_contracts: 1, }, false, - 1 + 1, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 3035, + n_memory_holes: 74, + builtin_instance_counter: HashMap::from_iter([ + ("pedersen", 4), + ("range_check", 75), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253, + ), + ClassHash( + 0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x558d16edafba7ea87e7b3e97642103a3b83511a8439f83d345c8cc1fb8c1cea, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x301976036fab639ccfd796c13864cd6988e6d0449b0ca749fd505b83d57fcc4, + ), + ), + StorageKey( + PatriciaKey( + 0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x301976036fab639ccfd796c13864cd6988e6d0449b0ca749fd505b83d57fcc4, + ), + ), + StorageKey( + PatriciaKey( + 0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x558d16edafba7ea87e7b3e97642103a3b83511a8439f83d345c8cc1fb8c1ceb, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x4531ecd0aefdd998d337d3dfc40af9bb3512edac441f2a31e0d499233086fec, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x4531ecd0aefdd998d337d3dfc40af9bb3512edac441f2a31e0d499233086feb, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 1, + total_event_keys: 1, + total_event_data_size: 4, + }, + } )] #[test_case( "0x0355059efee7a38ba1fd5aef13d261914608dce7bdfacad92a71e396f0ad7a77", @@ -606,7 +708,101 @@ mod tests { n_modified_contracts: 2, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 3457, + n_memory_holes: 26, + builtin_instance_counter: HashMap::from_iter([ + ("pedersen", 4), + ("range_check", 74), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x309c042d3729173c7f2f91a34f04d8c509c1b292d334679ef1aabf8da0899cc, + ), + ClassHash( + 0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b, + ), + ClassHash( + 0x3530cc4759d78042f1b543bf797f5f3d647cde0388c33734cf91b7f7b9314a9, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x269ea391a9c99cb6cee43ff589169f547cbc48d7554fdfbbfa7f97f516da700, + ), + ), + StorageKey( + PatriciaKey( + 0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x4009513ce606f0ec0973e1bd057b7a36ac14f1a203569e30713140e5c928dad, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x4009513ce606f0ec0973e1bd057b7a36ac14f1a203569e30713140e5c928dac, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x5460e3ada357c552adbe9fdd830aabe59b7a3b43284240fb606458be8c6e0a, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x5460e3ada357c552adbe9fdd830aabe59b7a3b43284240fb606458be8c6e09, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 2, + total_event_data_size: 7, + }, + } )] #[test_case( "0x05324bac55fb9fb53e738195c2dcc1e7fed1334b6db824665e3e984293bec95e", @@ -624,7 +820,101 @@ mod tests { n_modified_contracts: 2, }, false, - 1 + 1, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 3457, + n_memory_holes: 26, + builtin_instance_counter: HashMap::from_iter([ + ("pedersen", 4), + ("range_check", 74), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918, + ), + ClassHash( + 0x33434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2, + ), + ClassHash( + 0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x15ce587ff19a4baa941545deb4359e7d29b8ea3b224829a514425adbc5371d3, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x15ce587ff19a4baa941545deb4359e7d29b8ea3b224829a514425adbc5371d2, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x3aeff2c4fa75aace8f3974aa291ed288c2946cb2c89d3d45f43ec2e3d341266, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x3aeff2c4fa75aace8f3974aa291ed288c2946cb2c89d3d45f43ec2e3d341267, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x69a7818562b608ce8c5d0039e7f6d1c6ee55f36978f633b151858d85c022d2f, + ), + ), + StorageKey( + PatriciaKey( + 0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 2, + total_event_data_size: 7, + }, + } )] #[test_case( "0x670321c71835004fcab639e871ef402bb807351d126ccc4d93075ff2c31519d", @@ -642,7 +932,86 @@ mod tests { n_modified_contracts: 2, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 3938, + n_memory_holes: 63, + builtin_instance_counter: HashMap::from_iter([ + ("pedersen", 4), + ("range_check", 76), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003, + ), + ClassHash( + 0x5ffbcfeb50d200a0677c48a129a11245a3fc519d1d98d76882d1c9a1b19c6ed, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x6e73f308bbb7e97d64ea61262979f73ade2cad94f7d2a8b9c4a9d6debbf27ef, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x547f8114927592559689f3723f98f995af7f74cbda36db122195f71cf3c2693, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x547f8114927592559689f3723f98f995af7f74cbda36db122195f71cf3c2692, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x6e73f308bbb7e97d64ea61262979f73ade2cad94f7d2a8b9c4a9d6debbf27ee, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 3, + total_event_data_size: 7, + }, + } )] #[test_case( "0x06962f11a96849ebf05cd222313858a93a8c5f300493ed6c5859dd44f5f2b4e3", @@ -660,7 +1029,86 @@ mod tests { n_modified_contracts: 2, }, false, - 1 + 1, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 3411, + n_memory_holes: 30, + builtin_instance_counter: HashMap::from_iter([ + ("pedersen", 4), + ("range_check", 76), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003, + ), + ClassHash( + 0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0xb1c927d569cd996d8f1c1b677ccee5bc7fe8e0f97f706d1cce28f5fd17b44d, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0xb1c927d569cd996d8f1c1b677ccee5bc7fe8e0f97f706d1cce28f5fd17b44e, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x26e662f47f90b15254e3da267636a7893da2164e73385b47acdf2605d70350b, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x26e662f47f90b15254e3da267636a7893da2164e73385b47acdf2605d70350c, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 3, + total_event_data_size: 7, + }, + } )] #[test_case( "0x078b81326882ecd2dc6c5f844527c3f33e0cdb52701ded7b1aa4d220c5264f72", @@ -678,7 +1126,453 @@ mod tests { n_modified_contracts: 3, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 45076, + n_memory_holes: 1809, + builtin_instance_counter: HashMap::from_iter([ + ("pedersen", 39), + ("range_check", 1435), + ("segment_arena", 2), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x4f9849485e35f4a1c57d69b297feda94e743151f788202a6d731173babf4aec, + ), + ClassHash( + 0x7f3777c99f3700505ea966676aac4a0d692c2a9f5e667f4c606b51ca1dd3420, + ), + ClassHash( + 0x7b33a07ec099c227130ddffc9d74ad813fbcb8e0ff1c0f3ce097958e3dfc70b, + ), + ClassHash( + 0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253, + ), + ClassHash( + 0x5ffbcfeb50d200a0677c48a129a11245a3fc519d1d98d76882d1c9a1b19c6ed, + ), + ClassHash( + 0x4ac055f14361bb6f7bf4b9af6e96ca68825e6037e9bdf87ea0b2c641dea73ae, + ), + ClassHash( + 0x182dfcf12cf38789f5937a1b920f0513195131a408716224ac8273f371d9d0a, + ), + ClassHash( + 0x5ee939756c1a60b029c594da00e637bf5923bf04a86ff163e877e899c0840eb, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04863, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95e, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04864, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5a2c887b4759dcad85a9164f219f88ac0098570bf6dbb934fb24f95fc45220c, + ), + ), + StorageKey( + PatriciaKey( + 0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04864, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x2a8ae95dddffb0c09b9e1d7dacea66d3d564bd00c190cd4c9660a7e8a555fb0, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, + ), + ), + StorageKey( + PatriciaKey( + 0x261d7b045ffcfe9aad8e2d16a5e9195fdd1ff58e84f6019048cf342c79501b2, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f, + ), + ), + StorageKey( + PatriciaKey( + 0xc157281c325105632605b5874203b6a26582ef61f9507a569aa5d2a7637cd7, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x493875a3926558b908441a8fd6642a9f5b85f7fc5e39289c3a83b72b2eca837, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04863, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f, + ), + ), + StorageKey( + PatriciaKey( + 0x2232b2e1d8025562b381e10d97d2aa29b0ba14ab2fb65abaf36ea6179ff1067, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, + ), + ), + StorageKey( + PatriciaKey( + 0x1f5dba4f0e386fe3e03022985e50076614214c29faad4f1a66fd553c39c47ed, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x493875a3926558b908441a8fd6642a9f5b85f7fc5e39289c3a83b72b2eca838, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f, + ), + ), + StorageKey( + PatriciaKey( + 0x2c98037748f28d346ea45305cb75d2b43b6a280f2bbf0a033fcdb7c23dacb94, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x1aa58c2130812a393a81be1c126ab39cc69de7d4cc9091535a3738bff6bca5a, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95e, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95d, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbd, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbe, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, + ), + ), + StorageKey( + PatriciaKey( + 0x587f8a359f3afbadaac7e3a22b5d00fa5f08794c82353701e04afb0485d8c1, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f, + ), + ), + StorageKey( + PatriciaKey( + 0x2dd61772d8928d37542f9463273c969d38b38efa4c26744578f0890f1534d3d, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, + ), + ), + StorageKey( + PatriciaKey( + 0x1bee0233b83cc233e905a16e35ad64d3720b430ffc95ac935ee81f1c2bb70a8, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, + ), + ), + StorageKey( + PatriciaKey( + 0x3e9df762c67f04c3d19de6f877d7906e3a52e992c3f97013dc2450ab7851c9, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, + ), + ), + StorageKey( + PatriciaKey( + 0x511270adbc9dd47783d90b9494051b71a2ca036eae8193fa3ea697266d1202, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, + ), + ), + StorageKey( + PatriciaKey( + 0x1f5dba4f0e386fe3e03022985e50076614214c29faad4f1a66fd553c39c47ee, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95d, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5a2c887b4759dcad85a9164f219f88ac0098570bf6dbb934fb24f95fc45220c, + ), + ), + StorageKey( + PatriciaKey( + 0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, + ), + ), + StorageKey( + PatriciaKey( + 0x3e9df762c67f04c3d19de6f877d7906e3a52e992c3f97013dc2450ab7851ca, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f, + ), + ), + StorageKey( + PatriciaKey( + 0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbe, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbd, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x2a8ae95dddffb0c09b9e1d7dacea66d3d564bd00c190cd4c9660a7e8a555fb1, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x1aa58c2130812a393a81be1c126ab39cc69de7d4cc9091535a3738bff6bca5b, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 12, + total_event_keys: 12, + total_event_data_size: 58, + }, + } )] #[test_case( "0x0780e3a498b4fd91ab458673891d3e8ee1453f9161f4bfcb93dd1e2c91c52e10", @@ -696,7 +1590,162 @@ mod tests { n_modified_contracts: 3, }, false, - 2 + 2, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 7394, + n_memory_holes: 222, + builtin_instance_counter: HashMap::from_iter([ + ("range_check", 272), + ("pedersen", 26), + ("poseidon", 1) + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x5ffbcfeb50d200a0677c48a129a11245a3fc519d1d98d76882d1c9a1b19c6ed, + ), + ClassHash( + 0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253, + ), + ClassHash( + 0x6312b8cc5222001e694fedc019c1160ff478ad6ae0fb066dc354b75bf9b5454, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x784cdb1e85de7d857e859b4ad93b0cf2e354f9612e74fc19a1c4d0f4cfc5c3c, + ), + ), + StorageKey( + PatriciaKey( + 0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007, + ), + ), + StorageKey( + PatriciaKey( + 0x3e4e1993901faad3dd005be17839130abdccb4c36ab73f74dd3f05333e2b8ef, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x784cdb1e85de7d857e859b4ad93b0cf2e354f9612e74fc19a1c4d0f4cfc5c3c, + ), + ), + StorageKey( + PatriciaKey( + 0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007, + ), + ), + StorageKey( + PatriciaKey( + 0x3e4e1993901faad3dd005be17839130abdccb4c36ab73f74dd3f05333e2b8f0, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180, + ), + ), + StorageKey( + PatriciaKey( + 0x75f128ea43bc75b11cb0532e6873df6e9398b11d788ffbdd600a4546e83c10d, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180, + ), + ), + StorageKey( + PatriciaKey( + 0x6bd3a5ce5dcb97eaa770a5a3c9e4f5c752d99c61823a1d3d086688ee21a1247, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180, + ), + ), + StorageKey( + PatriciaKey( + 0xb59f37c0f9d09ea41ec01867728e0af61d0339b945f7d193fd07f4f96cfee8, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007, + ), + ), + StorageKey( + PatriciaKey( + 0x6e568983c06797c6e39843d87ff5e9ae88dc8bec182bbbe3936a32647fc9a1a, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007, + ), + ), + StorageKey( + PatriciaKey( + 0x6e568983c06797c6e39843d87ff5e9ae88dc8bec182bbbe3936a32647fc9a19, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180, + ), + ), + StorageKey( + PatriciaKey( + 0x1a22f545ba9d916b44403905200f55b36377a2e761b2184577679b0d7f7bc94, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 2, + total_event_data_size: 6, + }, + } )] #[test_case( "0x4f552c9430bd21ad300db56c8f4cae45d554a18fac20bf1703f180fac587d7e", @@ -714,7 +1763,149 @@ mod tests { n_modified_contracts: 0, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 8422, + n_memory_holes: 40, + builtin_instance_counter: HashMap::from_iter([ + ("range_check", 161), + ("pedersen", 4), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x2760f25d5a4fb2bdde5f561fd0b44a3dee78c28903577d37d669939d97036a0, + ), + ClassHash( + 0x4f5bce5f70bb1fcf6573f68205d3e74538c46c14dc47d37bdbde4c1abaf4e1e, + ), + ClassHash( + 0xd0e183745e9dae3e4e78a8ffedcce0903fc4900beace4e0abf192d4c202da3, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, + ), + ), + StorageKey( + PatriciaKey( + 0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, + ), + ), + StorageKey( + PatriciaKey( + 0xc88ee7a00e0b95f1138ef53d396c4327eeed7f9677bbd02ce82a663537b1cf, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x45ef7281f1485fd8d0298fc971ec7f2f8cf67d18b32a5e2cc876c957753332b, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x1390569bb0a3a722eb4228e8700301347da081211d5c2ded2db22ef389551ab, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x45ef7281f1485fd8d0298fc971ec7f2f8cf67d18b32a5e2cc876c957753332c, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, + ), + ), + StorageKey( + PatriciaKey( + 0x1dc79e2fd056704ede52dca5746b720269aaa5da53301dff546657c16ca07af, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 2, + total_event_data_size: 7, + }, + } )] #[test_case( "0x176a92e8df0128d47f24eebc17174363457a956fa233cc6a7f8561bfbd5023a", @@ -732,7 +1923,36 @@ mod tests { n_modified_contracts: 1, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 2263, + n_memory_holes: 7, + builtin_instance_counter: HashMap::from_iter([ + ("range_check", 38), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003, + ), + ClassHash( + 0x2d49ae8a5475e2185e6044592f034e85011d53e29b527b4ea35aed4063d9e44, + ), + ]), + visited_storage_entries: HashSet::new(), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 3, + total_event_data_size: 5, + }, + } )] #[test_case( "0x026c17728b9cd08a061b1f17f08034eb70df58c1a96421e73ee6738ad258a94c", @@ -750,7 +1970,52 @@ mod tests { n_modified_contracts: 1, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 2430, + n_memory_holes: 3, + builtin_instance_counter: HashMap::from_iter([ + ("range_check", 39), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x33434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2, + ), + ClassHash( + 0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918, + ), + ClassHash( + 0x2d49ae8a5475e2185e6044592f034e85011d53e29b527b4ea35aed4063d9e44, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x68826cd135a7ae273d26bf0b93de662db2e7dd0a6f765327b77c98a5d3b600d, + ), + ), + StorageKey( + PatriciaKey( + 0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 2, + total_event_data_size: 5, + }, + } )] #[test_case( "0x73ef9cde09f005ff6f411de510ecad4cdcf6c4d0dfc59137cff34a4fc74dfd", @@ -768,7 +2033,122 @@ mod tests { n_modified_contracts: 0, }, false, - 1 + 1, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 3086, + n_memory_holes: 55, + builtin_instance_counter: HashMap::from_iter([ + ("range_check", 72), + ("pedersen", 3), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x7f3777c99f3700505ea966676aac4a0d692c2a9f5e667f4c606b51ca1dd3420, + ), + ClassHash( + 0x358663e6ed9d37efd33d4661e20b2bad143e0f92076b0c91fe65f31ccf55046, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, + ), + ), + StorageKey( + PatriciaKey( + 0x290e00617050a68193b715654df85cc41c3b79f263373d66459c8a3d5780b46, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x77e2b393d935021c9cd33f5a6869ff1742f4e87bc38cc5ed18f10c9eb7fe8d9, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x1390569bb0a3a722eb4228e8700301347da081211d5c2ded2db22ef389551ab, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, + ), + ), + StorageKey( + PatriciaKey( + 0xc88ee7a00e0b95f1138ef53d396c4327eeed7f9677bbd02ce82a663537b1cf, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x77e2b393d935021c9cd33f5a6869ff1742f4e87bc38cc5ed18f10c9eb7fe8d8, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 4, + total_event_data_size: 6, + }, + } )] #[test_case( "0x0743092843086fa6d7f4a296a226ee23766b8acf16728aef7195ce5414dc4d84", @@ -786,7 +2166,152 @@ mod tests { n_modified_contracts: 2, }, false, - 1 + 1, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 39395, + n_memory_holes: 118, + builtin_instance_counter: HashMap::from_iter([ + ("range_check", 1234), + ("pedersen", 9), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x4572af1cd59b8b91055ebb78df8f1d11c59f5270018b291366ba4585d4cdff0, + ), + ClassHash( + 0x33434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2, + ), + ClassHash( + 0x7f7125c5958bf48de9d6a3ad045f845095d9572dc1a4b77da365f358c478cce, + ), + ClassHash( + 0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, + ), + ), + StorageKey( + PatriciaKey( + 0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x8819d617fb205534ef545e2fcd15db7b2f43e98e65e242dad41ca4fe7d5256, + ), + ), + StorageKey( + PatriciaKey( + 0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, + ), + ), + StorageKey( + PatriciaKey( + 0x28bbddb888b5f48fac1bfff91a9c86f45de0488d1418b204a4a77fddbf13d72, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, + ), + ), + StorageKey( + PatriciaKey( + 0x31b2db582739d919e49855d464d4ef21e6bfd0aa6db07d6f4cf006bf32ec7e8, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, + ), + ), + StorageKey( + PatriciaKey( + 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, + ), + ), + StorageKey( + PatriciaKey( + 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, + ), + ), + StorageKey( + PatriciaKey( + 0x20ddb4628d547df787159e32a15efecfbfb960110c425c74e6b35421adca448, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, + ), + ), + StorageKey( + PatriciaKey( + 0x28bbddb888b5f48fac1bfff91a9c86f45de0488d1418b204a4a77fddbf13d73, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, + ), + ), + StorageKey( + PatriciaKey( + 0x64adb0d4dfddace954f8460d8327cb16ec952a7221eaab02a02294c5aad7a63, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 3, + total_event_keys: 3, + total_event_data_size: 10, + }, + } )] #[test_case( "0x066e1f01420d8e433f6ef64309adb1a830e5af0ea67e3d935de273ca57b3ae5e", @@ -804,7 +2329,189 @@ mod tests { n_modified_contracts: 2, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 30042, + n_memory_holes: 3584, + builtin_instance_counter: HashMap::from_iter([ + ("range_check", 1369), + ("poseidon", 36), + ("pedersen", 3), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x589a40e9cd8784359c066db1adaf6cf0d92322ce579fc0c19739649beae132, + ), + ClassHash( + 0x3c8904d062171ab62c1f2e52e2b33299c305626a8f8a253a1544a6ad774121b, + ), + ClassHash( + 0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003, + ), + ClassHash( + 0x5dde112c893e2f5ed85b92a08d93cfa5579ce95d27afb34e47b7e7aad59c1c0, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x12ed0a68687678217e8e212e851aaaf26f24b745382184bac5b8f83e2089d09, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x1161aad19d349dc80ba5fb3bf52b82512f548b6631d4fc936347426e587f612, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x67ac2c2c96afe3312ea11413b2fdbf75b345d6f37dc435bc3e3fc2178780165, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x6c876061653ded49c5f4b2be528a17c0b99c707c36010da0dfdf7e86c88ed14, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x64cc83b312a847fec159095793816da6b9251610ebd55497d7e8fdbe0db5b8c, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x67ac2c2c96afe3312ea11413b2fdbf75b345d6f37dc435bc3e3fc2178780166, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x3eaa3e4be55bc8ada64d23f168b178d714a85ad9971bf1d5ff6bd6b703775dc, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x67ac2c2c96afe3312ea11413b2fdbf75b345d6f37dc435bc3e3fc2178780164, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x5602256700ad140f3346bd762776cec457aaa1a4c6597607818faa0f1086386, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x64cc83b312a847fec159095793816da6b9251610ebd55497d7e8fdbe0db5b8d, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x4a7ca3168783dab075bc552295fca05ea8d02a2bdeb461946b10187ef4b122d, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x4a7ca3168783dab075bc552295fca05ea8d02a2bdeb461946b10187ef4b122c, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 5, + total_event_keys: 10, + total_event_data_size: 63, + }, + } )] // Check this tx, l1_data_gas should be 384 // https://starkscan.co/tx/0x04756d898323a8f884f5a6aabd6834677f4bbaeecc2522f18b3ae45b3f99cd1e @@ -824,7 +2531,98 @@ mod tests { n_modified_contracts: 1, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 8108, + n_memory_holes: 893, + builtin_instance_counter: HashMap::from_iter([ + ("pedersen", 3), + ("range_check", 165), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x6551d5af6e4eb4fac2f9fea06948a49a6d12d924e43a63e6034a6a75e749577, + ), + ClassHash( + 0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, + ), + ), + StorageKey( + PatriciaKey( + 0x235a4d83b9b27bde6943b4e26301642f73f6fb6e5cda141734b02962b9d7f9d, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, + ), + ), + StorageKey( + PatriciaKey( + 0x291625bbd3d00024377934a31b5cdf6dfcc1e76776985889e17efb47b3ce2f0, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, + ), + ), + StorageKey( + PatriciaKey( + 0x1e44381b0f95a657a83284ece260c1948e6c965da4d357f7fbd6b557342cdc0, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, + ), + ), + StorageKey( + PatriciaKey( + 0x7d42c1838d13fa94d3f00304fe618766ad0ada8e0138966e8161b47a92c7e69, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, + ), + ), + StorageKey( + PatriciaKey( + 0x144978e3c7c8da8f54b97b4fa49320e49d8c70be0c35f42ba1e78465949d19c, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 1, + total_event_keys: 2, + total_event_data_size: 4, + }, + } )] #[test_case( "0x00f390691fd9e865f5aef9c7cc99889fb6c2038bc9b7e270e8a4fe224ccd404d", @@ -842,7 +2640,138 @@ mod tests { n_modified_contracts: 2, }, false, - 1 + 1, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 8068, + n_memory_holes: 605, + builtin_instance_counter: HashMap::from_iter([ + ("poseidon", 10), + ("range_check", 250), + ("pedersen", 1), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x36078334509b514626504edc9fb252328d1a240e4e948bef8d0c08dff45927f, + ), + ClassHash( + 0x5dde112c893e2f5ed85b92a08d93cfa5579ce95d27afb34e47b7e7aad59c1c0, + ), + ClassHash( + 0x7992c30dd1dc4ce93b44e37e3c48b37635ca31f16c8518e88e15ff5686face, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x79cd4284246c43115a8376850d14c1f78570cde561a096ad209a50f653d722f, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x5046041b2f3c48f2f3b7ed44f3d4233fd85427a20ac2dd9e7b23da551e06d2b, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x6164114d6518ebb3e8846b99c34c706b00f7bb475b3c5b8f67f85d336527162, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x79cd4284246c43115a8376850d14c1f78570cde561a096ad209a50f653d7231, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x1e637c300d7c105df1f620c34f08a99b0757f177f2d9d52a7a6d6a337f5cad6, + ), + ), + StorageKey( + PatriciaKey( + 0x587f8a359f3afbadaac7e3a22b5d00fa5f08794c82353701e04afb0485d8c1, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x12ed0a68687678217e8e212e851aaaf26f24b745382184bac5b8f83e2089d09, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x79cd4284246c43115a8376850d14c1f78570cde561a096ad209a50f653d7230, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, + ), + ), + StorageKey( + PatriciaKey( + 0x3117bb5a3b11d2eb8edb4980b76562d25525d1fcfa8f4873c0a2737a8e05ab6, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 3, + total_event_keys: 5, + total_event_data_size: 15, + }, + } )] #[test_case( "0x26be3e906db66973de1ca5eec1ddb4f30e3087dbdce9560778937071c3d3a83", @@ -860,7 +2789,149 @@ mod tests { n_modified_contracts: 0, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 8414, + n_memory_holes: 44, + builtin_instance_counter: HashMap::from_iter([ + ("pedersen", 4), + ("range_check", 161), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0xd0e183745e9dae3e4e78a8ffedcce0903fc4900beace4e0abf192d4c202da3, + ), + ClassHash( + 0x2760f25d5a4fb2bdde5f561fd0b44a3dee78c28903577d37d669939d97036a0, + ), + ClassHash( + 0x4f5bce5f70bb1fcf6573f68205d3e74538c46c14dc47d37bdbde4c1abaf4e1e, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, + ), + ), + StorageKey( + PatriciaKey( + 0xc88ee7a00e0b95f1138ef53d396c4327eeed7f9677bbd02ce82a663537b1cf, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x1390569bb0a3a722eb4228e8700301347da081211d5c2ded2db22ef389551ab, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, + ), + ), + StorageKey( + PatriciaKey( + 0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x1b9e3d38adfc69623b8d12acf32adfde1319fb40263927c8fc287371bc2d571, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, + ), + ), + StorageKey( + PatriciaKey( + 0x1b9e3d38adfc69623b8d12acf32adfde1319fb40263927c8fc287371bc2d570, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, + ), + ), + StorageKey( + PatriciaKey( + 0x1dc79e2fd056704ede52dca5746b720269aaa5da53301dff546657c16ca07af, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 2, + total_event_data_size: 7, + }, + } )] #[test_case( "0x0310c46edc795c82c71f600159fa9e6c6540cb294df9d156f685bfe62b31a5f4", @@ -878,7 +2949,408 @@ mod tests { n_modified_contracts: 3, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 63180, + n_memory_holes: 8239, + builtin_instance_counter: HashMap::from_iter([ + ("bitwise", 84), + ("pedersen", 79), + ("range_check", 4897), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x5fdb47de4edfd5983f6a82a1beeb1aab2b69d3674b90730aa1693d94d73f0d3, + ), + ClassHash( + 0x27067191f94e301b528b1624e7998d51606412522aab9621fb2c1899b983eeb, + ), + ClassHash( + 0x29927c8af6bccf3f6fda035981e765a7bdbf18a2dc0d630494f8758aa908e2b, + ), + ClassHash( + 0x3e8d67c8817de7a2185d418e88d321c89772a9722b752c6fe097192114621be, + ), + ClassHash( + 0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x40dff85b22ceb4de5477d6577f334c914f8efefed9f5c892934c0f6e966ed7, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x174ca4d40ded1b191eeaafb8c222368024fdf0ac894af16ecb51b7ec8477901, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x3a8d0fa789f88e7211b601b97145655c736104895afee9fba450449b3abed8e, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x3251cfd36c995a7f163e76498e247f8b2d61aeda83a746bd61d4e7da5fe5699, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x100000001, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x43e4f09c32d13d43a880e85f69f7de93ceda62d6cf2581a582c6db635548fdc, + ), + ), + StorageKey( + PatriciaKey( + 0x60648f61481391ac1803a92eaa5009bc1438ef6e8d10598d265bf5829d312f5, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x43e1ef374bc5f9e49c6c9764a9aac6e36bc8e3df0ca3bffb3cde5a0990ca369, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x586729208869bc7ed12aa50c7a1834a1eef579d05efcc17ee1217a1722f9ba3, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x4dbfe544ed63377b3d819a142e245f56921729b4c3e205f87e66b64af007236, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x3110bae189a1cca17a6da4ee778f0076e1ea99cefa11a9b532fe7c064deb948, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x45fb8ffc8b8d0d2521fdc1b3558fea0c43ed03911387994698ae9e504026d44, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x3a8d0fa789f88e7211b601b97145655c736104895afee9fba450449b3abed8f, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x40dff85b22ceb4de5477d6577f334c914f8efefed9f5c892934c0f6e966ed6, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x1, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x0, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x586729208869bc7ed12aa50c7a1834a1eef579d05efcc17ee1217a1722f9ba4, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x4428af60ea017cd8ac5a041f3777f8b2d7450f8474e471bcbae608cca7975ae, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x356fd6aa989033f329e6a5aceb143ba7d0667fd7f74fbbf9457080dd9352c0b, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x43e4f09c32d13d43a880e85f69f7de93ceda62d6cf2581a582c6db635548fdc, + ), + ), + StorageKey( + PatriciaKey( + 0x281a85306374a5ab27f0bbc385296a54bcd314a1948b6cf61c4ea1bc44bb9f8, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x73ffd08441115d89e71906f927d21e18c97a612c56116b40280b8ee6ae5e1f6, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x100000000, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x4dbfe544ed63377b3d819a142e245f56921729b4c3e205f87e66b64af007235, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x6aff514d3c14935bb84bfc2f5e443daa68c6b9af02150bce2904dc5cee89fb4, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x43e4f09c32d13d43a880e85f69f7de93ceda62d6cf2581a582c6db635548fdc, + ), + ), + StorageKey( + PatriciaKey( + 0x60648f61481391ac1803a92eaa5009bc1438ef6e8d10598d265bf5829d312f4, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + ), + ), + StorageKey( + PatriciaKey( + 0x43e1ef374bc5f9e49c6c9764a9aac6e36bc8e3df0ca3bffb3cde5a0990ca36a, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x68153282240797844a90a332ec1b2eabf7d15c42ba228e0c249720e6914176f, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x4505a9f06f2bd639b6601f37a4dc0908bb70e8e0e0c34b1220827d64f4fc066, + ), + ), + StorageKey( + PatriciaKey( + 0x281a85306374a5ab27f0bbc385296a54bcd314a1948b6cf61c4ea1bc44bb9f8, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x6267108c93bc853ce42efb890b0793116c50e5a98b13e024640da0d272115a8, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0x45fb8ffc8b8d0d2521fdc1b3558fea0c43ed03911387994698ae9e504026d43, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, + ), + ), + StorageKey( + PatriciaKey( + 0xd5ee72ce4ea000d334dd7d37bd432beb488d5ceae18a4a955e14901a851ec7, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 9, + total_event_keys: 10, + total_event_data_size: 83, + }, + } )] #[test_case( "0x06a09ffbf996178ac6e90101047e42fe29cb7108573b2ecf4b0ebd2cba544cb4", @@ -896,7 +3368,134 @@ mod tests { n_modified_contracts: 2, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 3730, + n_memory_holes: 100, + builtin_instance_counter: HashMap::from_iter([ + ("range_check", 78), + ("pedersen", 3), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x6551d5af6e4eb4fac2f9fea06948a49a6d12d924e43a63e6034a6a75e749577, + ), + ClassHash( + 0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, + ), + ), + StorageKey( + PatriciaKey( + 0x401109fe98501f72c01ea79ad5b48c227ec2706d706723cfec3fa5d4ba54c90, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, + ), + ), + StorageKey( + PatriciaKey( + 0x291625bbd3d00024377934a31b5cdf6dfcc1e76776985889e17efb47b3ce2f0, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, + ), + ), + StorageKey( + PatriciaKey( + 0x144978e3c7c8da8f54b97b4fa49320e49d8c70be0c35f42ba1e78465949d19c, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0xce305af75e878121f5691150fdd386dff5af073f7e56f4882f62e02bb05a45, + ), + ), + StorageKey( + PatriciaKey( + 0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0xce305af75e878121f5691150fdd386dff5af073f7e56f4882f62e02bb05a45, + ), + ), + StorageKey( + PatriciaKey( + 0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, + ), + ), + StorageKey( + PatriciaKey( + 0x1e44381b0f95a657a83284ece260c1948e6c965da4d357f7fbd6b557342cdc0, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, + ), + ), + StorageKey( + PatriciaKey( + 0x3db6ec55ed007baefa72e1ff639054f691cb3009b778edb59a37aa04690682c, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, + ), + ), + StorageKey( + PatriciaKey( + 0x235a4d83b9b27bde6943b4e26301642f73f6fb6e5cda141734b02962b9d7f9d, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 1, + total_event_keys: 1, + total_event_data_size: 2, + }, + } )] #[test_case( "0x026e04e96ba1b75bfd066c8e138e17717ecb654909e6ac24007b644ac23e4b47", @@ -914,7 +3513,584 @@ mod tests { n_modified_contracts: 4, }, false, - 1 + 1, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 60919, + n_memory_holes: 975, + builtin_instance_counter: HashMap::from_iter([ + ("range_check", 1715), + ("pedersen", 43), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x5ad7636491f8a6b210c137e6191bc12daf31171b6c6e670fe1387697810403a, + ), + ClassHash( + 0xdb2ed00ec7872d4d093f3acb479d7ef2b56bcc7fc793707c1fb04ec66c6b10, + ), + ClassHash( + 0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003, + ), + ClassHash( + 0x26fe8ea36ec7703569cfe4693b05102940bf122647c4dbf0abc0bb919ce27bd, + ), + ClassHash( + 0x4c2a0ab0698957bd725745ff6dfdda0e874ade8681770fe8990016a6fa9cf04, + ), + ClassHash( + 0x2b39bc3f4c1fd5bef8b7d21504c44e0da59cf27b350551b13d913da52e40d3b, + ), + ClassHash( + 0x2580632f25bbee45da5a1a1ef49d03a984f78dde4019069aa9f25aac06f941a, + ), + ClassHash( + 0x7b5cd6a6949cc1730f89d795f2442f6ab431ea6c9a5be00685d50f97433c5eb, + ), + ClassHash( + 0x52c7ba99c77fc38dd3346beea6c0753c3471f2e3135af5bb837d6c9523fff62, + ), + ClassHash( + 0x7197021c108b0cc57ae354f5ad02222c4b3d7344664e6dd602a0e2298595434, + ), + ClassHash( + 0x64e7d628b1b2aa04a35fe6610b005689e8b591058f7f92bf4eb234e67cf403b, + ), + ClassHash( + 0x2760f25d5a4fb2bdde5f561fd0b44a3dee78c28903577d37d669939d97036a0, + ), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + PatriciaKey( + 0xdad44c139a476c7a17fc8141e6db680e9abc9f56fe249a105094c44382c2fd, + ), + ), + StorageKey( + PatriciaKey( + 0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, + ), + ), + StorageKey( + PatriciaKey( + 0x3b3a699bb6ef37ff4b9c4e14319c7d8e9c9bdd10ff402d1ebde18c62ae58382, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, + ), + ), + StorageKey( + PatriciaKey( + 0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa4f, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, + ), + ), + StorageKey( + PatriciaKey( + 0x1c76cd4f3f79786d9e5d1298f47170de4bf0222337c680c5377ec772d3ce96b, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, + ), + ), + StorageKey( + PatriciaKey( + 0x3351bce4793f90e4aa00447357c2d34ac08611756193d8249009e0396dd7b41, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, + ), + ), + StorageKey( + PatriciaKey( + 0x34fea4b03b28c51f5bea6524bf41d06209d8306dc2376d4d730b14fea79ec8c, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x1c76cd4f3f79786d9e5d1298f47170de4bf0222337c680c5377ec772d3ce96b, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ad, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ac, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, + ), + ), + StorageKey( + PatriciaKey( + 0x3b3a699bb6ef37ff4b9c4e14319c7d8e9c9bdd10ff402d1ebde18c62ae58381, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa50, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, + ), + ), + StorageKey( + PatriciaKey( + 0x7dd6927869f0f6501f10407d6de416a90d2272af189f8b24d12acc09c2df5e6, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0xdad44c139a476c7a17fc8141e6db680e9abc9f56fe249a105094c44382c2fd, + ), + ), + StorageKey( + PatriciaKey( + 0x5c722fd91dec49f67eb170afb8e7e54ebe6f35b6b7f4fec3fdd0bad96606126, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa4f, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, + ), + ), + StorageKey( + PatriciaKey( + 0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d9, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a, + ), + ), + StorageKey( + PatriciaKey( + 0x119407278bb67ccb5306f7b08343c96f7b6933a06f3173067d21e98725a2b59, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, + ), + ), + StorageKey( + PatriciaKey( + 0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d8, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x41fd22b238fa21cfcf5dd45a8548974d8263b3a531a60388411c5e230f97023, + ), + ), + StorageKey( + PatriciaKey( + 0x139825585c3389ee852d93d2706b57d5bf8d4ba85922ef0689a691627211b05, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, + ), + ), + StorageKey( + PatriciaKey( + 0x2ec31623436b0fbcbbd71b2b3eed2887c8156077098a52a9256a9e0edb833f, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, + ), + ), + StorageKey( + PatriciaKey( + 0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ac, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, + ), + ), + StorageKey( + PatriciaKey( + 0x1e6f3e4333da349f86a03f030be7f2c76d8266a97c625746ebb9d3220a39d87, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, + ), + ), + StorageKey( + PatriciaKey( + 0x57c60b189063035eed65879a14ad5f6e718027a212dafbe52f9bcd79e9f4fb, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, + ), + ), + StorageKey( + PatriciaKey( + 0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa50, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a, + ), + ), + StorageKey( + PatriciaKey( + 0x2ded64caa8ae4aba3291cc1f172d4b8fda206d4d1b5660c7565e7461c727929, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x12f8e318fe04a1fe8bffe005ea4bbd19cb77a656b4f42682aab8a0ed20702f0, + ), + ), + StorageKey( + PatriciaKey( + 0x5d6c55cbfbeaef29110e02a1f4a1228488feec6f59b3f2f77d24245272e799a, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x18d7b079b471cfde70d671fc55b3c06d4363cdc22201c09924822902a33e01a, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d9, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x41fd22b238fa21cfcf5dd45a8548974d8263b3a531a60388411c5e230f97023, + ), + ), + StorageKey( + PatriciaKey( + 0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x18d7b079b471cfde70d671fc55b3c06d4363cdc22201c09924822902a33e019, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, + ), + ), + StorageKey( + PatriciaKey( + 0x57c60b189063035eed65879a14ad5f6e718027a212dafbe52f9bcd79e9f4fa, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, + ), + ), + StorageKey( + PatriciaKey( + 0x3ad6945aa849b77ba309199d76ea4555be65368391ba450fab8ea6248431ea0, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a, + ), + ), + StorageKey( + PatriciaKey( + 0x1f7cb1620ff9ec226d1c4c618ea516ebdd5a65005c2f457158cdd0d4d77ab4b, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, + ), + ), + StorageKey( + PatriciaKey( + 0x2ec31623436b0fbcbbd71b2b3eed2887c8156077098a52a9256a9e0edb8340, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + ), + ), + StorageKey( + PatriciaKey( + 0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d8, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, + ), + ), + StorageKey( + PatriciaKey( + 0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, + ), + ), + StorageKey( + PatriciaKey( + 0x37d931bc5c74214b7c669bc431e9dc2c39cba57516e0ab3c5a7ceb2d1c9e5c1, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, + ), + ), + StorageKey( + PatriciaKey( + 0x3ad6945aa849b77ba309199d76ea4555be65368391ba450fab8ea6248431e9f, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, + ), + ), + StorageKey( + PatriciaKey( + 0x35bfc9b032421f93a52912870bbb09af6c896d21d00165845f0c04715df1468, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, + ), + ), + StorageKey( + PatriciaKey( + 0x7dd6927869f0f6501f10407d6de416a90d2272af189f8b24d12acc09c2df5e5, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, + ), + ), + StorageKey( + PatriciaKey( + 0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ad, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a, + ), + ), + StorageKey( + PatriciaKey( + 0x26be8966924075afd93cd2a84013cca637468173cc02904002dc3d0caf30b61, + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, + ), + ), + StorageKey( + patricia_key!( + "0x1e6f3e4333da349f86a03f030be7f2c76d8266a97c625746ebb9d3220a39d88" + ), + ), + ), + ( + ContractAddress( + PatriciaKey( + 0x12f8e318fe04a1fe8bffe005ea4bbd19cb77a656b4f42682aab8a0ed20702f0, + ), + ), + StorageKey( + PatriciaKey( + 0x5d6c55cbfbeaef29110e02a1f4a1228488feec6f59b3f2f77d24245272e7999, + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 11, + total_event_keys: 12, + total_event_data_size: 54, + }, + } )] #[test_case( "0x01351387ef63fd6fe5ec10fa57df9e006b2450b8c68d7eec8cfc7d220abc7eda", @@ -932,7 +4108,31 @@ mod tests { n_modified_contracts: 1, }, true, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 28, + n_memory_holes: 0, + builtin_instance_counter: HashMap::new(), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + ClassHash( + 0x33478650b3b71be225cbad55fda8a590022eea17be3212d0ccbf3d364b1e448, + ), + ]), + visited_storage_entries: HashSet::new(), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 0, + total_event_keys: 0, + total_event_data_size: 0, + }, + } )] #[allow(clippy::too_many_arguments)] fn test_transaction_info( @@ -947,7 +4147,9 @@ mod tests { starknet_chg: StateChangesCount, is_reverted: bool, n_allocated_keys: usize, + execution_summary: ExecutionSummary ) { + HashSet::from(value); let previous_block = BlockNumber(block_number - 1); let (tx_info, _, _) = execute_tx(hash, chain, previous_block); let starknet_resources = tx_info.clone().receipt.resources.starknet_resources; @@ -964,7 +4166,7 @@ mod tests { code_size, state_resources, l1_handler_payload_size, - tx_info.summarize(&versioned_constants), + execution_summary ); assert_eq!(is_reverted, tx_info.revert_error.is_some()); assert_eq!(da_gas, tx_info.receipt.da_gas); From 71939bdaa35125a3c840c389a63fb57db7f814f8 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 10 Dec 2024 10:25:50 -0300 Subject: [PATCH 06/14] fix test --- rpc-state-reader/src/execution.rs | 2032 ++++++++--------------------- 1 file changed, 576 insertions(+), 1456 deletions(-) diff --git a/rpc-state-reader/src/execution.rs b/rpc-state-reader/src/execution.rs index 02697b3..0b6e874 100644 --- a/rpc-state-reader/src/execution.rs +++ b/rpc-state-reader/src/execution.rs @@ -20,6 +20,7 @@ use blockifier_reexecution::state_reader::compile::{ }; use starknet::core::types::ContractClass as SNContractClass; use starknet_api::{ + class_hash, block::{BlockInfo, BlockNumber}, contract_class::{ClassInfo, SierraVersion}, core::ContractAddress, @@ -352,16 +353,17 @@ pub fn fetch_block_context(reader: &RpcStateReader) -> BlockContext { #[cfg(test)] mod tests { - use std::{collections::HashSet, thread}; + use std::{collections::{HashMap, HashSet}, thread}; use blockifier::{ - execution::call_info::{CallInfo, EventSummary, ExecutionSummary}, + execution::call_info::{CallInfo, ChargedResources, EventSummary, ExecutionSummary}, fee::resources::{StarknetResources, StateResources}, state::cached_state::StateChangesCount, }; + use cairo_vm::{types::builtin_name::BuiltinName, vm::runners::cairo_runner::ExecutionResources}; use pretty_assertions_sorted::assert_eq_sorted; use starknet_api::{ - block::BlockNumber, core::PatriciaKey, execution_resources::{GasAmount, GasVector} + block::BlockNumber, class_hash, core::ClassHash, execution_resources::{GasAmount, GasVector}, state::StorageKey }; use test_case::test_case; @@ -594,8 +596,8 @@ mod tests { n_steps: 3035, n_memory_holes: 74, builtin_instance_counter: HashMap::from_iter([ - ("pedersen", 4), - ("range_check", 75), + (BuiltinName::pedersen, 4), + (BuiltinName::range_check, 75), ]), }, gas_for_fee: GasAmount( @@ -603,83 +605,77 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253, - ), - ClassHash( - 0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b, - ), + class_hash!("0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253"), + class_hash!("0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, - ), + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), ), StorageKey( - PatriciaKey( - 0x558d16edafba7ea87e7b3e97642103a3b83511a8439f83d345c8cc1fb8c1cea, + patricia_key!( + "0x558d16edafba7ea87e7b3e97642103a3b83511a8439f83d345c8cc1fb8c1cea" ), ), ), ( ContractAddress( - PatriciaKey( - 0x301976036fab639ccfd796c13864cd6988e6d0449b0ca749fd505b83d57fcc4, + patricia_key!( + "0x301976036fab639ccfd796c13864cd6988e6d0449b0ca749fd505b83d57fcc4" ), ), StorageKey( - PatriciaKey( - 0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463, + patricia_key!( + "0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463" ), ), ), ( ContractAddress( - PatriciaKey( - 0x301976036fab639ccfd796c13864cd6988e6d0449b0ca749fd505b83d57fcc4, + patricia_key!( + "0x301976036fab639ccfd796c13864cd6988e6d0449b0ca749fd505b83d57fcc4" ), ), StorageKey( - PatriciaKey( - 0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76, + patricia_key!( + "0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76" ), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" ), ), StorageKey( - PatriciaKey( - 0x558d16edafba7ea87e7b3e97642103a3b83511a8439f83d345c8cc1fb8c1ceb, + patricia_key!( + "0x558d16edafba7ea87e7b3e97642103a3b83511a8439f83d345c8cc1fb8c1ceb" ), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" ), ), StorageKey( - PatriciaKey( - 0x4531ecd0aefdd998d337d3dfc40af9bb3512edac441f2a31e0d499233086fec, + patricia_key!( + "0x4531ecd0aefdd998d337d3dfc40af9bb3512edac441f2a31e0d499233086fec" ), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" ), ), StorageKey( - PatriciaKey( - 0x4531ecd0aefdd998d337d3dfc40af9bb3512edac441f2a31e0d499233086feb, + patricia_key!( + "0x4531ecd0aefdd998d337d3dfc40af9bb3512edac441f2a31e0d499233086feb" ), ), ), @@ -715,8 +711,8 @@ mod tests { n_steps: 3457, n_memory_holes: 26, builtin_instance_counter: HashMap::from_iter([ - ("pedersen", 4), - ("range_check", 74), + (BuiltinName::pedersen, 4), + (BuiltinName::range_check, 74), ]), }, gas_for_fee: GasAmount( @@ -724,74 +720,68 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x309c042d3729173c7f2f91a34f04d8c509c1b292d334679ef1aabf8da0899cc, - ), - ClassHash( - 0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b, - ), - ClassHash( - 0x3530cc4759d78042f1b543bf797f5f3d647cde0388c33734cf91b7f7b9314a9, - ), + class_hash!("0x309c042d3729173c7f2f91a34f04d8c509c1b292d334679ef1aabf8da0899cc"), + class_hash!("0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b"), + class_hash!("0x3530cc4759d78042f1b543bf797f5f3d647cde0388c33734cf91b7f7b9314a9"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x269ea391a9c99cb6cee43ff589169f547cbc48d7554fdfbbfa7f97f516da700, + patricia_key!( + "0x269ea391a9c99cb6cee43ff589169f547cbc48d7554fdfbbfa7f97f516da700" ), ), StorageKey( - PatriciaKey( - 0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc, + patricia_key!( + "0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc" ), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" ), ), StorageKey( - PatriciaKey( - 0x4009513ce606f0ec0973e1bd057b7a36ac14f1a203569e30713140e5c928dad, + patricia_key!( + "0x4009513ce606f0ec0973e1bd057b7a36ac14f1a203569e30713140e5c928dad" ), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" ), ), StorageKey( - PatriciaKey( - 0x4009513ce606f0ec0973e1bd057b7a36ac14f1a203569e30713140e5c928dac, + patricia_key!( + "0x4009513ce606f0ec0973e1bd057b7a36ac14f1a203569e30713140e5c928dac" ), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" ), ), StorageKey( - PatriciaKey( - 0x5460e3ada357c552adbe9fdd830aabe59b7a3b43284240fb606458be8c6e0a, + patricia_key!( + "0x5460e3ada357c552adbe9fdd830aabe59b7a3b43284240fb606458be8c6e0a" ), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" ), ), StorageKey( - PatriciaKey( - 0x5460e3ada357c552adbe9fdd830aabe59b7a3b43284240fb606458be8c6e09, + patricia_key!( + "0x5460e3ada357c552adbe9fdd830aabe59b7a3b43284240fb606458be8c6e09" ), ), ), @@ -827,8 +817,8 @@ mod tests { n_steps: 3457, n_memory_holes: 26, builtin_instance_counter: HashMap::from_iter([ - ("pedersen", 4), - ("range_check", 74), + (BuiltinName::pedersen, 4), + (BuiltinName::range_check, 74), ]), }, gas_for_fee: GasAmount( @@ -836,74 +826,68 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918, - ), - ClassHash( - 0x33434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2, - ), - ClassHash( - 0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b, - ), + class_hash!("0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918"), + class_hash!("0x33434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2"), + class_hash!("0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" ), ), StorageKey( - PatriciaKey( - 0x15ce587ff19a4baa941545deb4359e7d29b8ea3b224829a514425adbc5371d3, + patricia_key!( + "0x15ce587ff19a4baa941545deb4359e7d29b8ea3b224829a514425adbc5371d3" ), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" ), ), StorageKey( - PatriciaKey( - 0x15ce587ff19a4baa941545deb4359e7d29b8ea3b224829a514425adbc5371d2, + patricia_key!( + "0x15ce587ff19a4baa941545deb4359e7d29b8ea3b224829a514425adbc5371d2" ), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" ), ), StorageKey( - PatriciaKey( - 0x3aeff2c4fa75aace8f3974aa291ed288c2946cb2c89d3d45f43ec2e3d341266, + patricia_key!( + "0x3aeff2c4fa75aace8f3974aa291ed288c2946cb2c89d3d45f43ec2e3d341266" ), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" ), ), StorageKey( - PatriciaKey( - 0x3aeff2c4fa75aace8f3974aa291ed288c2946cb2c89d3d45f43ec2e3d341267, + patricia_key!( + "0x3aeff2c4fa75aace8f3974aa291ed288c2946cb2c89d3d45f43ec2e3d341267" ), ), ), ( ContractAddress( - PatriciaKey( - 0x69a7818562b608ce8c5d0039e7f6d1c6ee55f36978f633b151858d85c022d2f, + patricia_key!( + "0x69a7818562b608ce8c5d0039e7f6d1c6ee55f36978f633b151858d85c022d2f" ), ), StorageKey( - PatriciaKey( - 0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc, + patricia_key!( + "0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc" ), ), ), @@ -939,8 +923,8 @@ mod tests { n_steps: 3938, n_memory_holes: 63, builtin_instance_counter: HashMap::from_iter([ - ("pedersen", 4), - ("range_check", 76), + (BuiltinName::pedersen, 4), + (BuiltinName::range_check, 76), ]), }, gas_for_fee: GasAmount( @@ -948,59 +932,55 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003, - ), - ClassHash( - 0x5ffbcfeb50d200a0677c48a129a11245a3fc519d1d98d76882d1c9a1b19c6ed, - ), + class_hash!("0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003"), + class_hash!("0x5ffbcfeb50d200a0677c48a129a11245a3fc519d1d98d76882d1c9a1b19c6ed"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + patricia_key!( + "0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8" ), ), StorageKey( - PatriciaKey( - 0x6e73f308bbb7e97d64ea61262979f73ade2cad94f7d2a8b9c4a9d6debbf27ef, + patricia_key!( + "0x6e73f308bbb7e97d64ea61262979f73ade2cad94f7d2a8b9c4a9d6debbf27ef" ), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + patricia_key!( + "0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8" ), ), StorageKey( - PatriciaKey( - 0x547f8114927592559689f3723f98f995af7f74cbda36db122195f71cf3c2693, + patricia_key!( + "0x547f8114927592559689f3723f98f995af7f74cbda36db122195f71cf3c2693" ), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + patricia_key!( + "0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8" ), ), StorageKey( - PatriciaKey( - 0x547f8114927592559689f3723f98f995af7f74cbda36db122195f71cf3c2692, + patricia_key!( + "0x547f8114927592559689f3723f98f995af7f74cbda36db122195f71cf3c2692" ), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, + patricia_key!( + "0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8" ), ), StorageKey( - PatriciaKey( - 0x6e73f308bbb7e97d64ea61262979f73ade2cad94f7d2a8b9c4a9d6debbf27ee, + patricia_key!( + "0x6e73f308bbb7e97d64ea61262979f73ade2cad94f7d2a8b9c4a9d6debbf27ee" ), ), ), @@ -1036,8 +1016,8 @@ mod tests { n_steps: 3411, n_memory_holes: 30, builtin_instance_counter: HashMap::from_iter([ - ("pedersen", 4), - ("range_check", 76), + (BuiltinName::pedersen, 4), + (BuiltinName::range_check, 76), ]), }, gas_for_fee: GasAmount( @@ -1045,60 +1025,50 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003, - ), - ClassHash( - 0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b, - ), + class_hash!("0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003"), + class_hash!("0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" ), ), StorageKey( - PatriciaKey( - 0xb1c927d569cd996d8f1c1b677ccee5bc7fe8e0f97f706d1cce28f5fd17b44d, + patricia_key!( + "0xb1c927d569cd996d8f1c1b677ccee5bc7fe8e0f97f706d1cce28f5fd17b44d" ), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" ), ), StorageKey( - PatriciaKey( - 0xb1c927d569cd996d8f1c1b677ccee5bc7fe8e0f97f706d1cce28f5fd17b44e, + patricia_key!( + "0xb1c927d569cd996d8f1c1b677ccee5bc7fe8e0f97f706d1cce28f5fd17b44e" ), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" ), ), StorageKey( - PatriciaKey( - 0x26e662f47f90b15254e3da267636a7893da2164e73385b47acdf2605d70350b, - ), + patricia_key!("0x26e662f47f90b15254e3da267636a7893da2164e73385b47acdf2605d70350b"), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, - ), + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), ), StorageKey( - PatriciaKey( - 0x26e662f47f90b15254e3da267636a7893da2164e73385b47acdf2605d70350c, - ), + patricia_key!("0x26e662f47f90b15254e3da267636a7893da2164e73385b47acdf2605d70350c"), ), ), ]), @@ -1133,9 +1103,9 @@ mod tests { n_steps: 45076, n_memory_holes: 1809, builtin_instance_counter: HashMap::from_iter([ - ("pedersen", 39), - ("range_check", 1435), - ("segment_arena", 2), + (BuiltinName::pedersen, 39), + (BuiltinName::range_check, 1435), + (BuiltinName::segment_arena, 2), ]), }, gas_for_fee: GasAmount( @@ -1143,426 +1113,278 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x4f9849485e35f4a1c57d69b297feda94e743151f788202a6d731173babf4aec, - ), - ClassHash( - 0x7f3777c99f3700505ea966676aac4a0d692c2a9f5e667f4c606b51ca1dd3420, - ), - ClassHash( - 0x7b33a07ec099c227130ddffc9d74ad813fbcb8e0ff1c0f3ce097958e3dfc70b, - ), - ClassHash( - 0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253, - ), - ClassHash( - 0x5ffbcfeb50d200a0677c48a129a11245a3fc519d1d98d76882d1c9a1b19c6ed, - ), - ClassHash( - 0x4ac055f14361bb6f7bf4b9af6e96ca68825e6037e9bdf87ea0b2c641dea73ae, - ), - ClassHash( - 0x182dfcf12cf38789f5937a1b920f0513195131a408716224ac8273f371d9d0a, - ), - ClassHash( - 0x5ee939756c1a60b029c594da00e637bf5923bf04a86ff163e877e899c0840eb, - ), + class_hash!("0x4f9849485e35f4a1c57d69b297feda94e743151f788202a6d731173babf4aec"), + class_hash!("0x7f3777c99f3700505ea966676aac4a0d692c2a9f5e667f4c606b51ca1dd3420"), + class_hash!("0x7b33a07ec099c227130ddffc9d74ad813fbcb8e0ff1c0f3ce097958e3dfc70b"), + class_hash!("0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253"), + class_hash!("0x5ffbcfeb50d200a0677c48a129a11245a3fc519d1d98d76882d1c9a1b19c6ed"), + class_hash!("0x4ac055f14361bb6f7bf4b9af6e96ca68825e6037e9bdf87ea0b2c641dea73ae"), + class_hash!("0x182dfcf12cf38789f5937a1b920f0513195131a408716224ac8273f371d9d0a"), + class_hash!("0x5ee939756c1a60b029c594da00e637bf5923bf04a86ff163e877e899c0840eb"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04863, - ), + patricia_key!("0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04863"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95e, - ), + patricia_key!("0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95e"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04864, - ), + patricia_key!("0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04864"), ), ), ( ContractAddress( - PatriciaKey( - 0x5a2c887b4759dcad85a9164f219f88ac0098570bf6dbb934fb24f95fc45220c, - ), + patricia_key!("0x5a2c887b4759dcad85a9164f219f88ac0098570bf6dbb934fb24f95fc45220c"), ), StorageKey( - PatriciaKey( - 0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463, - ), + patricia_key!("0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04864, - ), + patricia_key!("0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04864"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x2a8ae95dddffb0c09b9e1d7dacea66d3d564bd00c190cd4c9660a7e8a555fb0, - ), + patricia_key!("0x2a8ae95dddffb0c09b9e1d7dacea66d3d564bd00c190cd4c9660a7e8a555fb0"), ), ), ( ContractAddress( - PatriciaKey( - 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, - ), + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), ), StorageKey( - PatriciaKey( - 0x261d7b045ffcfe9aad8e2d16a5e9195fdd1ff58e84f6019048cf342c79501b2, - ), + patricia_key!("0x261d7b045ffcfe9aad8e2d16a5e9195fdd1ff58e84f6019048cf342c79501b2"), ), ), ( ContractAddress( - PatriciaKey( - 0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f, - ), + patricia_key!("0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f"), ), StorageKey( - PatriciaKey( - 0xc157281c325105632605b5874203b6a26582ef61f9507a569aa5d2a7637cd7, - ), + patricia_key!("0xc157281c325105632605b5874203b6a26582ef61f9507a569aa5d2a7637cd7"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x493875a3926558b908441a8fd6642a9f5b85f7fc5e39289c3a83b72b2eca837, - ), + patricia_key!("0x493875a3926558b908441a8fd6642a9f5b85f7fc5e39289c3a83b72b2eca837"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04863, - ), + patricia_key!("0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04863"), ), ), ( ContractAddress( - PatriciaKey( - 0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f, - ), + patricia_key!("0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f"), ), StorageKey( - PatriciaKey( - 0x2232b2e1d8025562b381e10d97d2aa29b0ba14ab2fb65abaf36ea6179ff1067, - ), + patricia_key!("0x2232b2e1d8025562b381e10d97d2aa29b0ba14ab2fb65abaf36ea6179ff1067"), ), ), ( ContractAddress( - PatriciaKey( - 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, - ), + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), ), StorageKey( - PatriciaKey( - 0x1f5dba4f0e386fe3e03022985e50076614214c29faad4f1a66fd553c39c47ed, - ), + patricia_key!("0x1f5dba4f0e386fe3e03022985e50076614214c29faad4f1a66fd553c39c47ed"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x493875a3926558b908441a8fd6642a9f5b85f7fc5e39289c3a83b72b2eca838, - ), + patricia_key!("0x493875a3926558b908441a8fd6642a9f5b85f7fc5e39289c3a83b72b2eca838"), ), ), ( ContractAddress( - PatriciaKey( - 0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f, - ), + patricia_key!("0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f"), ), StorageKey( - PatriciaKey( - 0x2c98037748f28d346ea45305cb75d2b43b6a280f2bbf0a033fcdb7c23dacb94, - ), + patricia_key!("0x2c98037748f28d346ea45305cb75d2b43b6a280f2bbf0a033fcdb7c23dacb94"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x1aa58c2130812a393a81be1c126ab39cc69de7d4cc9091535a3738bff6bca5a, - ), + patricia_key!("0x1aa58c2130812a393a81be1c126ab39cc69de7d4cc9091535a3738bff6bca5a"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95e, - ), + patricia_key!("0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95e"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95d, - ), + patricia_key!("0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95d"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbd, - ), + patricia_key!("0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbd"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbe, - ), + patricia_key!("0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbe"), ), ), ( ContractAddress( - PatriciaKey( - 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, - ), + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), ), StorageKey( - PatriciaKey( - 0x587f8a359f3afbadaac7e3a22b5d00fa5f08794c82353701e04afb0485d8c1, - ), + patricia_key!("0x587f8a359f3afbadaac7e3a22b5d00fa5f08794c82353701e04afb0485d8c1"), ), ), ( ContractAddress( - PatriciaKey( - 0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f, - ), + patricia_key!("0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f"), ), StorageKey( - PatriciaKey( - 0x2dd61772d8928d37542f9463273c969d38b38efa4c26744578f0890f1534d3d, - ), + patricia_key!("0x2dd61772d8928d37542f9463273c969d38b38efa4c26744578f0890f1534d3d"), ), ), ( ContractAddress( - PatriciaKey( - 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, - ), + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), ), StorageKey( - PatriciaKey( - 0x1bee0233b83cc233e905a16e35ad64d3720b430ffc95ac935ee81f1c2bb70a8, - ), + patricia_key!("0x1bee0233b83cc233e905a16e35ad64d3720b430ffc95ac935ee81f1c2bb70a8"), ), ), ( ContractAddress( - PatriciaKey( - 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, - ), + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), ), StorageKey( - PatriciaKey( - 0x3e9df762c67f04c3d19de6f877d7906e3a52e992c3f97013dc2450ab7851c9, - ), + patricia_key!("0x3e9df762c67f04c3d19de6f877d7906e3a52e992c3f97013dc2450ab7851c9"), ), ), ( ContractAddress( - PatriciaKey( - 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, - ), + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), ), StorageKey( - PatriciaKey( - 0x511270adbc9dd47783d90b9494051b71a2ca036eae8193fa3ea697266d1202, - ), + patricia_key!("0x511270adbc9dd47783d90b9494051b71a2ca036eae8193fa3ea697266d1202"), ), ), ( ContractAddress( - PatriciaKey( - 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, - ), + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), ), StorageKey( - PatriciaKey( - 0x1f5dba4f0e386fe3e03022985e50076614214c29faad4f1a66fd553c39c47ee, - ), + patricia_key!("0x1f5dba4f0e386fe3e03022985e50076614214c29faad4f1a66fd553c39c47ee"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95d, - ), + patricia_key!("0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95d"), ), ), ( ContractAddress( - PatriciaKey( - 0x5a2c887b4759dcad85a9164f219f88ac0098570bf6dbb934fb24f95fc45220c, - ), + patricia_key!("0x5a2c887b4759dcad85a9164f219f88ac0098570bf6dbb934fb24f95fc45220c"), ), StorageKey( - PatriciaKey( - 0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76, - ), + patricia_key!("0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76"), ), ), ( ContractAddress( - PatriciaKey( - 0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516, - ), + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), ), StorageKey( - PatriciaKey( - 0x3e9df762c67f04c3d19de6f877d7906e3a52e992c3f97013dc2450ab7851ca, - ), + patricia_key!("0x3e9df762c67f04c3d19de6f877d7906e3a52e992c3f97013dc2450ab7851ca"), ), ), ( ContractAddress( - PatriciaKey( - 0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f, - ), + patricia_key!("0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f"), ), StorageKey( - PatriciaKey( - 0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0, - ), + patricia_key!("0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbe, - ), + patricia_key!("0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbe"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbd, - ), + patricia_key!("0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbd"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x2a8ae95dddffb0c09b9e1d7dacea66d3d564bd00c190cd4c9660a7e8a555fb1, - ), + patricia_key!("0x2a8ae95dddffb0c09b9e1d7dacea66d3d564bd00c190cd4c9660a7e8a555fb1"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x1aa58c2130812a393a81be1c126ab39cc69de7d4cc9091535a3738bff6bca5b, - ), + patricia_key!("0x1aa58c2130812a393a81be1c126ab39cc69de7d4cc9091535a3738bff6bca5b"), ), ), ]), @@ -1597,9 +1419,9 @@ mod tests { n_steps: 7394, n_memory_holes: 222, builtin_instance_counter: HashMap::from_iter([ - ("range_check", 272), - ("pedersen", 26), - ("poseidon", 1) + (BuiltinName::range_check, 272), + (BuiltinName::pedersen, 26), + (BuiltinName::poseidon, 1) ]), }, gas_for_fee: GasAmount( @@ -1607,135 +1429,89 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x5ffbcfeb50d200a0677c48a129a11245a3fc519d1d98d76882d1c9a1b19c6ed, - ), - ClassHash( - 0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253, - ), - ClassHash( - 0x6312b8cc5222001e694fedc019c1160ff478ad6ae0fb066dc354b75bf9b5454, - ), + class_hash!("0x5ffbcfeb50d200a0677c48a129a11245a3fc519d1d98d76882d1c9a1b19c6ed"), + class_hash!("0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253"), + class_hash!("0x6312b8cc5222001e694fedc019c1160ff478ad6ae0fb066dc354b75bf9b5454"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x784cdb1e85de7d857e859b4ad93b0cf2e354f9612e74fc19a1c4d0f4cfc5c3c, - ), + patricia_key!("0x784cdb1e85de7d857e859b4ad93b0cf2e354f9612e74fc19a1c4d0f4cfc5c3c"), ), StorageKey( - PatriciaKey( - 0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463, - ), + patricia_key!("0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463"), ), ), ( ContractAddress( - PatriciaKey( - 0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007, - ), + patricia_key!("0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007"), ), StorageKey( - PatriciaKey( - 0x3e4e1993901faad3dd005be17839130abdccb4c36ab73f74dd3f05333e2b8ef, - ), + patricia_key!("0x3e4e1993901faad3dd005be17839130abdccb4c36ab73f74dd3f05333e2b8ef"), ), ), ( ContractAddress( - PatriciaKey( - 0x784cdb1e85de7d857e859b4ad93b0cf2e354f9612e74fc19a1c4d0f4cfc5c3c, - ), + patricia_key!("0x784cdb1e85de7d857e859b4ad93b0cf2e354f9612e74fc19a1c4d0f4cfc5c3c"), ), StorageKey( - PatriciaKey( - 0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76, - ), + patricia_key!("0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76"), ), ), ( ContractAddress( - PatriciaKey( - 0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007, - ), + patricia_key!("0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007"), ), StorageKey( - PatriciaKey( - 0x3e4e1993901faad3dd005be17839130abdccb4c36ab73f74dd3f05333e2b8f0, - ), + patricia_key!("0x3e4e1993901faad3dd005be17839130abdccb4c36ab73f74dd3f05333e2b8f0"), ), ), ( ContractAddress( - PatriciaKey( - 0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180, - ), + patricia_key!("0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180"), ), StorageKey( - PatriciaKey( - 0x75f128ea43bc75b11cb0532e6873df6e9398b11d788ffbdd600a4546e83c10d, - ), + patricia_key!("0x75f128ea43bc75b11cb0532e6873df6e9398b11d788ffbdd600a4546e83c10d"), ), ), ( ContractAddress( - PatriciaKey( - 0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180, - ), + patricia_key!("0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180"), ), StorageKey( - PatriciaKey( - 0x6bd3a5ce5dcb97eaa770a5a3c9e4f5c752d99c61823a1d3d086688ee21a1247, - ), + patricia_key!("0x6bd3a5ce5dcb97eaa770a5a3c9e4f5c752d99c61823a1d3d086688ee21a1247"), ), ), ( ContractAddress( - PatriciaKey( - 0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180, - ), + patricia_key!("0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180"), ), StorageKey( - PatriciaKey( - 0xb59f37c0f9d09ea41ec01867728e0af61d0339b945f7d193fd07f4f96cfee8, - ), + patricia_key!("0xb59f37c0f9d09ea41ec01867728e0af61d0339b945f7d193fd07f4f96cfee8"), ), ), ( ContractAddress( - PatriciaKey( - 0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007, - ), + patricia_key!("0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007"), ), StorageKey( - PatriciaKey( - 0x6e568983c06797c6e39843d87ff5e9ae88dc8bec182bbbe3936a32647fc9a1a, - ), + patricia_key!("0x6e568983c06797c6e39843d87ff5e9ae88dc8bec182bbbe3936a32647fc9a1a"), ), ), ( ContractAddress( - PatriciaKey( - 0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007, - ), + patricia_key!("0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007"), ), StorageKey( - PatriciaKey( - 0x6e568983c06797c6e39843d87ff5e9ae88dc8bec182bbbe3936a32647fc9a19, - ), + patricia_key!("0x6e568983c06797c6e39843d87ff5e9ae88dc8bec182bbbe3936a32647fc9a19"), ), ), ( ContractAddress( - PatriciaKey( - 0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180, - ), + patricia_key!("0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180"), ), StorageKey( - PatriciaKey( - 0x1a22f545ba9d916b44403905200f55b36377a2e761b2184577679b0d7f7bc94, - ), + patricia_key!("0x1a22f545ba9d916b44403905200f55b36377a2e761b2184577679b0d7f7bc94"), ), ), ]), @@ -1770,8 +1546,8 @@ mod tests { n_steps: 8422, n_memory_holes: 40, builtin_instance_counter: HashMap::from_iter([ - ("range_check", 161), - ("pedersen", 4), + (BuiltinName::range_check, 161), + (BuiltinName::pedersen, 4), ]), }, gas_for_fee: GasAmount( @@ -1779,123 +1555,81 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x2760f25d5a4fb2bdde5f561fd0b44a3dee78c28903577d37d669939d97036a0, - ), - ClassHash( - 0x4f5bce5f70bb1fcf6573f68205d3e74538c46c14dc47d37bdbde4c1abaf4e1e, - ), - ClassHash( - 0xd0e183745e9dae3e4e78a8ffedcce0903fc4900beace4e0abf192d4c202da3, - ), + class_hash!("0x2760f25d5a4fb2bdde5f561fd0b44a3dee78c28903577d37d669939d97036a0"), + class_hash!("0x4f5bce5f70bb1fcf6573f68205d3e74538c46c14dc47d37bdbde4c1abaf4e1e"), + class_hash!("0xd0e183745e9dae3e4e78a8ffedcce0903fc4900beace4e0abf192d4c202da3"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, - ), + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), ), StorageKey( - PatriciaKey( - 0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970, - ), + patricia_key!("0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970"), ), ), ( ContractAddress( - PatriciaKey( - 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, - ), + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), ), StorageKey( - PatriciaKey( - 0xc88ee7a00e0b95f1138ef53d396c4327eeed7f9677bbd02ce82a663537b1cf, - ), + patricia_key!("0xc88ee7a00e0b95f1138ef53d396c4327eeed7f9677bbd02ce82a663537b1cf"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x45ef7281f1485fd8d0298fc971ec7f2f8cf67d18b32a5e2cc876c957753332b, - ), + patricia_key!("0x45ef7281f1485fd8d0298fc971ec7f2f8cf67d18b32a5e2cc876c957753332b"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970, - ), + patricia_key!("0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a, - ), + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b, - ), + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x1390569bb0a3a722eb4228e8700301347da081211d5c2ded2db22ef389551ab, - ), + patricia_key!("0x1390569bb0a3a722eb4228e8700301347da081211d5c2ded2db22ef389551ab"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x45ef7281f1485fd8d0298fc971ec7f2f8cf67d18b32a5e2cc876c957753332c, - ), + patricia_key!("0x45ef7281f1485fd8d0298fc971ec7f2f8cf67d18b32a5e2cc876c957753332c"), ), ), ( ContractAddress( - PatriciaKey( - 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, - ), + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), ), StorageKey( - PatriciaKey( - 0x1dc79e2fd056704ede52dca5746b720269aaa5da53301dff546657c16ca07af, - ), + patricia_key!("0x1dc79e2fd056704ede52dca5746b720269aaa5da53301dff546657c16ca07af"), ), ), ]), @@ -1930,7 +1664,7 @@ mod tests { n_steps: 2263, n_memory_holes: 7, builtin_instance_counter: HashMap::from_iter([ - ("range_check", 38), + (BuiltinName::range_check, 38), ]), }, gas_for_fee: GasAmount( @@ -1938,12 +1672,8 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003, - ), - ClassHash( - 0x2d49ae8a5475e2185e6044592f034e85011d53e29b527b4ea35aed4063d9e44, - ), + class_hash!("0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003"), + class_hash!("0x2d49ae8a5475e2185e6044592f034e85011d53e29b527b4ea35aed4063d9e44"), ]), visited_storage_entries: HashSet::new(), l2_to_l1_payload_lengths: vec![], @@ -1977,7 +1707,7 @@ mod tests { n_steps: 2430, n_memory_holes: 3, builtin_instance_counter: HashMap::from_iter([ - ("range_check", 39), + (BuiltinName::range_check, 39), ]), }, gas_for_fee: GasAmount( @@ -1985,27 +1715,17 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x33434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2, - ), - ClassHash( - 0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918, - ), - ClassHash( - 0x2d49ae8a5475e2185e6044592f034e85011d53e29b527b4ea35aed4063d9e44, - ), + class_hash!("0x33434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2"), + class_hash!("0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918"), + class_hash!("0x2d49ae8a5475e2185e6044592f034e85011d53e29b527b4ea35aed4063d9e44"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x68826cd135a7ae273d26bf0b93de662db2e7dd0a6f765327b77c98a5d3b600d, - ), + patricia_key!("0x68826cd135a7ae273d26bf0b93de662db2e7dd0a6f765327b77c98a5d3b600d"), ), StorageKey( - PatriciaKey( - 0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc, - ), + patricia_key!("0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc"), ), ), ]), @@ -2040,8 +1760,8 @@ mod tests { n_steps: 3086, n_memory_holes: 55, builtin_instance_counter: HashMap::from_iter([ - ("range_check", 72), - ("pedersen", 3), + (BuiltinName::range_check, 72), + (BuiltinName::pedersen, 3), ]), }, gas_for_fee: GasAmount( @@ -2049,96 +1769,64 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x7f3777c99f3700505ea966676aac4a0d692c2a9f5e667f4c606b51ca1dd3420, - ), - ClassHash( - 0x358663e6ed9d37efd33d4661e20b2bad143e0f92076b0c91fe65f31ccf55046, - ), + class_hash!("0x7f3777c99f3700505ea966676aac4a0d692c2a9f5e667f4c606b51ca1dd3420"), + class_hash!("0x358663e6ed9d37efd33d4661e20b2bad143e0f92076b0c91fe65f31ccf55046"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, - ), + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), ), StorageKey( - PatriciaKey( - 0x290e00617050a68193b715654df85cc41c3b79f263373d66459c8a3d5780b46, - ), + patricia_key!("0x290e00617050a68193b715654df85cc41c3b79f263373d66459c8a3d5780b46"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x77e2b393d935021c9cd33f5a6869ff1742f4e87bc38cc5ed18f10c9eb7fe8d9, - ), + patricia_key!("0x77e2b393d935021c9cd33f5a6869ff1742f4e87bc38cc5ed18f10c9eb7fe8d9"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b, - ), + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x1390569bb0a3a722eb4228e8700301347da081211d5c2ded2db22ef389551ab, - ), + patricia_key!("0x1390569bb0a3a722eb4228e8700301347da081211d5c2ded2db22ef389551ab"), ), ), ( ContractAddress( - PatriciaKey( - 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, - ), + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), ), StorageKey( - PatriciaKey( - 0xc88ee7a00e0b95f1138ef53d396c4327eeed7f9677bbd02ce82a663537b1cf, - ), + patricia_key!("0xc88ee7a00e0b95f1138ef53d396c4327eeed7f9677bbd02ce82a663537b1cf"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a, - ), + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x77e2b393d935021c9cd33f5a6869ff1742f4e87bc38cc5ed18f10c9eb7fe8d8, - ), + patricia_key!("0x77e2b393d935021c9cd33f5a6869ff1742f4e87bc38cc5ed18f10c9eb7fe8d8"), ), ), ]), @@ -2173,8 +1861,8 @@ mod tests { n_steps: 39395, n_memory_holes: 118, builtin_instance_counter: HashMap::from_iter([ - ("range_check", 1234), - ("pedersen", 9), + (BuiltinName::range_check, 1234), + (BuiltinName::pedersen, 9), ]), }, gas_for_fee: GasAmount( @@ -2182,126 +1870,82 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x4572af1cd59b8b91055ebb78df8f1d11c59f5270018b291366ba4585d4cdff0, - ), - ClassHash( - 0x33434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2, - ), - ClassHash( - 0x7f7125c5958bf48de9d6a3ad045f845095d9572dc1a4b77da365f358c478cce, - ), - ClassHash( - 0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918, - ), + class_hash!("0x4572af1cd59b8b91055ebb78df8f1d11c59f5270018b291366ba4585d4cdff0"), + class_hash!("0x33434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2"), + class_hash!("0x7f7125c5958bf48de9d6a3ad045f845095d9572dc1a4b77da365f358c478cce"), + class_hash!("0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, - ), + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), ), StorageKey( - PatriciaKey( - 0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0, - ), + patricia_key!("0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0"), ), ), ( ContractAddress( - PatriciaKey( - 0x8819d617fb205534ef545e2fcd15db7b2f43e98e65e242dad41ca4fe7d5256, - ), + patricia_key!("0x8819d617fb205534ef545e2fcd15db7b2f43e98e65e242dad41ca4fe7d5256"), ), StorageKey( - PatriciaKey( - 0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc, - ), + patricia_key!("0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc"), ), ), ( ContractAddress( - PatriciaKey( - 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, - ), + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), ), StorageKey( - PatriciaKey( - 0x28bbddb888b5f48fac1bfff91a9c86f45de0488d1418b204a4a77fddbf13d72, - ), + patricia_key!("0x28bbddb888b5f48fac1bfff91a9c86f45de0488d1418b204a4a77fddbf13d72"), ), ), ( ContractAddress( - PatriciaKey( - 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, - ), + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), ), StorageKey( - PatriciaKey( - 0x31b2db582739d919e49855d464d4ef21e6bfd0aa6db07d6f4cf006bf32ec7e8, - ), + patricia_key!("0x31b2db582739d919e49855d464d4ef21e6bfd0aa6db07d6f4cf006bf32ec7e8"), ), ), ( ContractAddress( - PatriciaKey( - 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, - ), + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), ), StorageKey( - PatriciaKey( - 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a, - ), + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a"), ), ), ( ContractAddress( - PatriciaKey( - 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, - ), + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), ), StorageKey( - PatriciaKey( - 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b, - ), + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b"), ), ), ( ContractAddress( - PatriciaKey( - 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, - ), + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), ), StorageKey( - PatriciaKey( - 0x20ddb4628d547df787159e32a15efecfbfb960110c425c74e6b35421adca448, - ), + patricia_key!("0x20ddb4628d547df787159e32a15efecfbfb960110c425c74e6b35421adca448"), ), ), ( ContractAddress( - PatriciaKey( - 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, - ), + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), ), StorageKey( - PatriciaKey( - 0x28bbddb888b5f48fac1bfff91a9c86f45de0488d1418b204a4a77fddbf13d73, - ), + patricia_key!("0x28bbddb888b5f48fac1bfff91a9c86f45de0488d1418b204a4a77fddbf13d73"), ), ), ( ContractAddress( - PatriciaKey( - 0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0, - ), + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), ), StorageKey( - PatriciaKey( - 0x64adb0d4dfddace954f8460d8327cb16ec952a7221eaab02a02294c5aad7a63, - ), + patricia_key!("0x64adb0d4dfddace954f8460d8327cb16ec952a7221eaab02a02294c5aad7a63"), ), ), ]), @@ -2336,9 +1980,9 @@ mod tests { n_steps: 30042, n_memory_holes: 3584, builtin_instance_counter: HashMap::from_iter([ - ("range_check", 1369), - ("poseidon", 36), - ("pedersen", 3), + (BuiltinName::range_check, 1369), + (BuiltinName::poseidon, 36), + (BuiltinName::pedersen, 3), ]), }, gas_for_fee: GasAmount( @@ -2346,162 +1990,106 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x589a40e9cd8784359c066db1adaf6cf0d92322ce579fc0c19739649beae132, - ), - ClassHash( - 0x3c8904d062171ab62c1f2e52e2b33299c305626a8f8a253a1544a6ad774121b, - ), - ClassHash( - 0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003, - ), - ClassHash( - 0x5dde112c893e2f5ed85b92a08d93cfa5579ce95d27afb34e47b7e7aad59c1c0, - ), + class_hash!("0x589a40e9cd8784359c066db1adaf6cf0d92322ce579fc0c19739649beae132"), + class_hash!("0x3c8904d062171ab62c1f2e52e2b33299c305626a8f8a253a1544a6ad774121b"), + class_hash!("0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003"), + class_hash!("0x5dde112c893e2f5ed85b92a08d93cfa5579ce95d27afb34e47b7e7aad59c1c0"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x12ed0a68687678217e8e212e851aaaf26f24b745382184bac5b8f83e2089d09, - ), + patricia_key!("0x12ed0a68687678217e8e212e851aaaf26f24b745382184bac5b8f83e2089d09"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x1161aad19d349dc80ba5fb3bf52b82512f548b6631d4fc936347426e587f612, - ), + patricia_key!("0x1161aad19d349dc80ba5fb3bf52b82512f548b6631d4fc936347426e587f612"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x67ac2c2c96afe3312ea11413b2fdbf75b345d6f37dc435bc3e3fc2178780165, - ), + patricia_key!("0x67ac2c2c96afe3312ea11413b2fdbf75b345d6f37dc435bc3e3fc2178780165"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x6c876061653ded49c5f4b2be528a17c0b99c707c36010da0dfdf7e86c88ed14, - ), + patricia_key!("0x6c876061653ded49c5f4b2be528a17c0b99c707c36010da0dfdf7e86c88ed14"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x64cc83b312a847fec159095793816da6b9251610ebd55497d7e8fdbe0db5b8c, - ), + patricia_key!("0x64cc83b312a847fec159095793816da6b9251610ebd55497d7e8fdbe0db5b8c"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x67ac2c2c96afe3312ea11413b2fdbf75b345d6f37dc435bc3e3fc2178780166, - ), + patricia_key!("0x67ac2c2c96afe3312ea11413b2fdbf75b345d6f37dc435bc3e3fc2178780166"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x3eaa3e4be55bc8ada64d23f168b178d714a85ad9971bf1d5ff6bd6b703775dc, - ), + patricia_key!("0x3eaa3e4be55bc8ada64d23f168b178d714a85ad9971bf1d5ff6bd6b703775dc"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x67ac2c2c96afe3312ea11413b2fdbf75b345d6f37dc435bc3e3fc2178780164, - ), + patricia_key!("0x67ac2c2c96afe3312ea11413b2fdbf75b345d6f37dc435bc3e3fc2178780164"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x5602256700ad140f3346bd762776cec457aaa1a4c6597607818faa0f1086386, - ), + patricia_key!("0x5602256700ad140f3346bd762776cec457aaa1a4c6597607818faa0f1086386"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x64cc83b312a847fec159095793816da6b9251610ebd55497d7e8fdbe0db5b8d, - ), + patricia_key!("0x64cc83b312a847fec159095793816da6b9251610ebd55497d7e8fdbe0db5b8d"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x4a7ca3168783dab075bc552295fca05ea8d02a2bdeb461946b10187ef4b122d, - ), + patricia_key!("0x4a7ca3168783dab075bc552295fca05ea8d02a2bdeb461946b10187ef4b122d"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x4a7ca3168783dab075bc552295fca05ea8d02a2bdeb461946b10187ef4b122c, - ), + patricia_key!("0x4a7ca3168783dab075bc552295fca05ea8d02a2bdeb461946b10187ef4b122c"), ), ), ]), @@ -2538,8 +2126,8 @@ mod tests { n_steps: 8108, n_memory_holes: 893, builtin_instance_counter: HashMap::from_iter([ - ("pedersen", 3), - ("range_check", 165), + (BuiltinName::pedersen, 3), + (BuiltinName::range_check, 165), ]), }, gas_for_fee: GasAmount( @@ -2547,72 +2135,48 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x6551d5af6e4eb4fac2f9fea06948a49a6d12d924e43a63e6034a6a75e749577, - ), - ClassHash( - 0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003, - ), + class_hash!("0x6551d5af6e4eb4fac2f9fea06948a49a6d12d924e43a63e6034a6a75e749577"), + class_hash!("0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, - ), + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), ), StorageKey( - PatriciaKey( - 0x235a4d83b9b27bde6943b4e26301642f73f6fb6e5cda141734b02962b9d7f9d, - ), + patricia_key!("0x235a4d83b9b27bde6943b4e26301642f73f6fb6e5cda141734b02962b9d7f9d"), ), ), ( ContractAddress( - PatriciaKey( - 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, - ), + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), ), StorageKey( - PatriciaKey( - 0x291625bbd3d00024377934a31b5cdf6dfcc1e76776985889e17efb47b3ce2f0, - ), + patricia_key!("0x291625bbd3d00024377934a31b5cdf6dfcc1e76776985889e17efb47b3ce2f0"), ), ), ( ContractAddress( - PatriciaKey( - 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, - ), + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), ), StorageKey( - PatriciaKey( - 0x1e44381b0f95a657a83284ece260c1948e6c965da4d357f7fbd6b557342cdc0, - ), + patricia_key!("0x1e44381b0f95a657a83284ece260c1948e6c965da4d357f7fbd6b557342cdc0"), ), ), ( ContractAddress( - PatriciaKey( - 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, - ), + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), ), StorageKey( - PatriciaKey( - 0x7d42c1838d13fa94d3f00304fe618766ad0ada8e0138966e8161b47a92c7e69, - ), + patricia_key!("0x7d42c1838d13fa94d3f00304fe618766ad0ada8e0138966e8161b47a92c7e69"), ), ), ( ContractAddress( - PatriciaKey( - 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, - ), + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), ), StorageKey( - PatriciaKey( - 0x144978e3c7c8da8f54b97b4fa49320e49d8c70be0c35f42ba1e78465949d19c, - ), + patricia_key!("0x144978e3c7c8da8f54b97b4fa49320e49d8c70be0c35f42ba1e78465949d19c"), ), ), ]), @@ -2647,9 +2211,9 @@ mod tests { n_steps: 8068, n_memory_holes: 605, builtin_instance_counter: HashMap::from_iter([ - ("poseidon", 10), - ("range_check", 250), - ("pedersen", 1), + (BuiltinName::poseidon, 10), + (BuiltinName::range_check, 250), + (BuiltinName::pedersen, 1), ]), }, gas_for_fee: GasAmount( @@ -2657,111 +2221,73 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x36078334509b514626504edc9fb252328d1a240e4e948bef8d0c08dff45927f, - ), - ClassHash( - 0x5dde112c893e2f5ed85b92a08d93cfa5579ce95d27afb34e47b7e7aad59c1c0, - ), - ClassHash( - 0x7992c30dd1dc4ce93b44e37e3c48b37635ca31f16c8518e88e15ff5686face, - ), + class_hash!("0x36078334509b514626504edc9fb252328d1a240e4e948bef8d0c08dff45927f"), + class_hash!("0x5dde112c893e2f5ed85b92a08d93cfa5579ce95d27afb34e47b7e7aad59c1c0"), + class_hash!("0x7992c30dd1dc4ce93b44e37e3c48b37635ca31f16c8518e88e15ff5686face"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x79cd4284246c43115a8376850d14c1f78570cde561a096ad209a50f653d722f, - ), + patricia_key!("0x79cd4284246c43115a8376850d14c1f78570cde561a096ad209a50f653d722f"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x5046041b2f3c48f2f3b7ed44f3d4233fd85427a20ac2dd9e7b23da551e06d2b, - ), + patricia_key!("0x5046041b2f3c48f2f3b7ed44f3d4233fd85427a20ac2dd9e7b23da551e06d2b"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x6164114d6518ebb3e8846b99c34c706b00f7bb475b3c5b8f67f85d336527162, - ), + patricia_key!("0x6164114d6518ebb3e8846b99c34c706b00f7bb475b3c5b8f67f85d336527162"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x79cd4284246c43115a8376850d14c1f78570cde561a096ad209a50f653d7231, - ), + patricia_key!("0x79cd4284246c43115a8376850d14c1f78570cde561a096ad209a50f653d7231"), ), ), ( ContractAddress( - PatriciaKey( - 0x1e637c300d7c105df1f620c34f08a99b0757f177f2d9d52a7a6d6a337f5cad6, - ), + patricia_key!("0x1e637c300d7c105df1f620c34f08a99b0757f177f2d9d52a7a6d6a337f5cad6"), ), StorageKey( - PatriciaKey( - 0x587f8a359f3afbadaac7e3a22b5d00fa5f08794c82353701e04afb0485d8c1, - ), + patricia_key!("0x587f8a359f3afbadaac7e3a22b5d00fa5f08794c82353701e04afb0485d8c1"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x12ed0a68687678217e8e212e851aaaf26f24b745382184bac5b8f83e2089d09, - ), + patricia_key!("0x12ed0a68687678217e8e212e851aaaf26f24b745382184bac5b8f83e2089d09"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x79cd4284246c43115a8376850d14c1f78570cde561a096ad209a50f653d7230, - ), + patricia_key!("0x79cd4284246c43115a8376850d14c1f78570cde561a096ad209a50f653d7230"), ), ), ( ContractAddress( - PatriciaKey( - 0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4, - ), + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), ), StorageKey( - PatriciaKey( - 0x3117bb5a3b11d2eb8edb4980b76562d25525d1fcfa8f4873c0a2737a8e05ab6, - ), + patricia_key!("0x3117bb5a3b11d2eb8edb4980b76562d25525d1fcfa8f4873c0a2737a8e05ab6"), ), ), ]), @@ -2796,8 +2322,8 @@ mod tests { n_steps: 8414, n_memory_holes: 44, builtin_instance_counter: HashMap::from_iter([ - ("pedersen", 4), - ("range_check", 161), + (BuiltinName::pedersen, 4), + (BuiltinName::range_check, 161), ]), }, gas_for_fee: GasAmount( @@ -2805,123 +2331,81 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0xd0e183745e9dae3e4e78a8ffedcce0903fc4900beace4e0abf192d4c202da3, - ), - ClassHash( - 0x2760f25d5a4fb2bdde5f561fd0b44a3dee78c28903577d37d669939d97036a0, - ), - ClassHash( - 0x4f5bce5f70bb1fcf6573f68205d3e74538c46c14dc47d37bdbde4c1abaf4e1e, - ), + class_hash!("0xd0e183745e9dae3e4e78a8ffedcce0903fc4900beace4e0abf192d4c202da3"), + class_hash!("0x2760f25d5a4fb2bdde5f561fd0b44a3dee78c28903577d37d669939d97036a0"), + class_hash!("0x4f5bce5f70bb1fcf6573f68205d3e74538c46c14dc47d37bdbde4c1abaf4e1e"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970, - ), + patricia_key!("0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970"), ), ), ( ContractAddress( - PatriciaKey( - 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, - ), + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), ), StorageKey( - PatriciaKey( - 0xc88ee7a00e0b95f1138ef53d396c4327eeed7f9677bbd02ce82a663537b1cf, - ), + patricia_key!("0xc88ee7a00e0b95f1138ef53d396c4327eeed7f9677bbd02ce82a663537b1cf"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b, - ), + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x1390569bb0a3a722eb4228e8700301347da081211d5c2ded2db22ef389551ab, - ), + patricia_key!("0x1390569bb0a3a722eb4228e8700301347da081211d5c2ded2db22ef389551ab"), ), ), ( ContractAddress( - PatriciaKey( - 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, - ), + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), ), StorageKey( - PatriciaKey( - 0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970, - ), + patricia_key!("0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x1b9e3d38adfc69623b8d12acf32adfde1319fb40263927c8fc287371bc2d571, - ), + patricia_key!("0x1b9e3d38adfc69623b8d12acf32adfde1319fb40263927c8fc287371bc2d571"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a, - ), + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a"), ), ), ( ContractAddress( - PatriciaKey( - 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7, - ), + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), ), StorageKey( - PatriciaKey( - 0x1b9e3d38adfc69623b8d12acf32adfde1319fb40263927c8fc287371bc2d570, - ), + patricia_key!("0x1b9e3d38adfc69623b8d12acf32adfde1319fb40263927c8fc287371bc2d570"), ), ), ( ContractAddress( - PatriciaKey( - 0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82, - ), + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), ), StorageKey( - PatriciaKey( - 0x1dc79e2fd056704ede52dca5746b720269aaa5da53301dff546657c16ca07af, - ), + patricia_key!("0x1dc79e2fd056704ede52dca5746b720269aaa5da53301dff546657c16ca07af"), ), ), ]), @@ -2956,9 +2440,9 @@ mod tests { n_steps: 63180, n_memory_holes: 8239, builtin_instance_counter: HashMap::from_iter([ - ("bitwise", 84), - ("pedersen", 79), - ("range_check", 4897), + (BuiltinName::bitwise, 84), + (BuiltinName::pedersen, 79), + (BuiltinName::range_check, 4897), ]), }, gas_for_fee: GasAmount( @@ -2966,381 +2450,251 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x5fdb47de4edfd5983f6a82a1beeb1aab2b69d3674b90730aa1693d94d73f0d3, - ), - ClassHash( - 0x27067191f94e301b528b1624e7998d51606412522aab9621fb2c1899b983eeb, - ), - ClassHash( - 0x29927c8af6bccf3f6fda035981e765a7bdbf18a2dc0d630494f8758aa908e2b, - ), - ClassHash( - 0x3e8d67c8817de7a2185d418e88d321c89772a9722b752c6fe097192114621be, - ), - ClassHash( - 0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b, - ), + class_hash!("0x5fdb47de4edfd5983f6a82a1beeb1aab2b69d3674b90730aa1693d94d73f0d3"), + class_hash!("0x27067191f94e301b528b1624e7998d51606412522aab9621fb2c1899b983eeb"), + class_hash!("0x29927c8af6bccf3f6fda035981e765a7bdbf18a2dc0d630494f8758aa908e2b"), + class_hash!("0x3e8d67c8817de7a2185d418e88d321c89772a9722b752c6fe097192114621be"), + class_hash!("0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x40dff85b22ceb4de5477d6577f334c914f8efefed9f5c892934c0f6e966ed7, - ), + patricia_key!("0x40dff85b22ceb4de5477d6577f334c914f8efefed9f5c892934c0f6e966ed7"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x174ca4d40ded1b191eeaafb8c222368024fdf0ac894af16ecb51b7ec8477901, - ), + patricia_key!("0x174ca4d40ded1b191eeaafb8c222368024fdf0ac894af16ecb51b7ec8477901"), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, - ), + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), ), StorageKey( - PatriciaKey( - 0x3a8d0fa789f88e7211b601b97145655c736104895afee9fba450449b3abed8e, - ), + patricia_key!("0x3a8d0fa789f88e7211b601b97145655c736104895afee9fba450449b3abed8e"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x3251cfd36c995a7f163e76498e247f8b2d61aeda83a746bd61d4e7da5fe5699, - ), + patricia_key!("0x3251cfd36c995a7f163e76498e247f8b2d61aeda83a746bd61d4e7da5fe5699"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x100000001, - ), + patricia_key!("0x100000001"), ), ), ( ContractAddress( - PatriciaKey( - 0x43e4f09c32d13d43a880e85f69f7de93ceda62d6cf2581a582c6db635548fdc, - ), + patricia_key!("0x43e4f09c32d13d43a880e85f69f7de93ceda62d6cf2581a582c6db635548fdc"), ), StorageKey( - PatriciaKey( - 0x60648f61481391ac1803a92eaa5009bc1438ef6e8d10598d265bf5829d312f5, - ), + patricia_key!("0x60648f61481391ac1803a92eaa5009bc1438ef6e8d10598d265bf5829d312f5"), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, - ), + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), ), StorageKey( - PatriciaKey( - 0x43e1ef374bc5f9e49c6c9764a9aac6e36bc8e3df0ca3bffb3cde5a0990ca369, - ), + patricia_key!("0x43e1ef374bc5f9e49c6c9764a9aac6e36bc8e3df0ca3bffb3cde5a0990ca369"), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, - ), + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), ), StorageKey( - PatriciaKey( - 0x586729208869bc7ed12aa50c7a1834a1eef579d05efcc17ee1217a1722f9ba3, - ), + patricia_key!("0x586729208869bc7ed12aa50c7a1834a1eef579d05efcc17ee1217a1722f9ba3"), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, - ), + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), ), StorageKey( - PatriciaKey( - 0x4dbfe544ed63377b3d819a142e245f56921729b4c3e205f87e66b64af007236, - ), + patricia_key!("0x4dbfe544ed63377b3d819a142e245f56921729b4c3e205f87e66b64af007236"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x3110bae189a1cca17a6da4ee778f0076e1ea99cefa11a9b532fe7c064deb948, - ), + patricia_key!("0x3110bae189a1cca17a6da4ee778f0076e1ea99cefa11a9b532fe7c064deb948"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x45fb8ffc8b8d0d2521fdc1b3558fea0c43ed03911387994698ae9e504026d44, - ), + patricia_key!("0x45fb8ffc8b8d0d2521fdc1b3558fea0c43ed03911387994698ae9e504026d44"), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, - ), + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), ), StorageKey( - PatriciaKey( - 0x3a8d0fa789f88e7211b601b97145655c736104895afee9fba450449b3abed8f, - ), + patricia_key!("0x3a8d0fa789f88e7211b601b97145655c736104895afee9fba450449b3abed8f"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x40dff85b22ceb4de5477d6577f334c914f8efefed9f5c892934c0f6e966ed6, - ), + patricia_key!("0x40dff85b22ceb4de5477d6577f334c914f8efefed9f5c892934c0f6e966ed6"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x1, - ), + patricia_key!("0x1"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x0, - ), + patricia_key!("0x0"), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, - ), + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), ), StorageKey( - PatriciaKey( - 0x586729208869bc7ed12aa50c7a1834a1eef579d05efcc17ee1217a1722f9ba4, - ), + patricia_key!("0x586729208869bc7ed12aa50c7a1834a1eef579d05efcc17ee1217a1722f9ba4"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x4428af60ea017cd8ac5a041f3777f8b2d7450f8474e471bcbae608cca7975ae, - ), + patricia_key!("0x4428af60ea017cd8ac5a041f3777f8b2d7450f8474e471bcbae608cca7975ae"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x356fd6aa989033f329e6a5aceb143ba7d0667fd7f74fbbf9457080dd9352c0b, - ), + patricia_key!("0x356fd6aa989033f329e6a5aceb143ba7d0667fd7f74fbbf9457080dd9352c0b"), ), ), ( ContractAddress( - PatriciaKey( - 0x43e4f09c32d13d43a880e85f69f7de93ceda62d6cf2581a582c6db635548fdc, - ), + patricia_key!("0x43e4f09c32d13d43a880e85f69f7de93ceda62d6cf2581a582c6db635548fdc"), ), StorageKey( - PatriciaKey( - 0x281a85306374a5ab27f0bbc385296a54bcd314a1948b6cf61c4ea1bc44bb9f8, - ), + patricia_key!("0x281a85306374a5ab27f0bbc385296a54bcd314a1948b6cf61c4ea1bc44bb9f8"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x73ffd08441115d89e71906f927d21e18c97a612c56116b40280b8ee6ae5e1f6, - ), + patricia_key!("0x73ffd08441115d89e71906f927d21e18c97a612c56116b40280b8ee6ae5e1f6"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x100000000, - ), + patricia_key!("0x100000000"), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, - ), + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), ), StorageKey( - PatriciaKey( - 0x4dbfe544ed63377b3d819a142e245f56921729b4c3e205f87e66b64af007235, - ), + patricia_key!("0x4dbfe544ed63377b3d819a142e245f56921729b4c3e205f87e66b64af007235"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x6aff514d3c14935bb84bfc2f5e443daa68c6b9af02150bce2904dc5cee89fb4, - ), + patricia_key!("0x6aff514d3c14935bb84bfc2f5e443daa68c6b9af02150bce2904dc5cee89fb4"), ), ), ( ContractAddress( - PatriciaKey( - 0x43e4f09c32d13d43a880e85f69f7de93ceda62d6cf2581a582c6db635548fdc, - ), + patricia_key!("0x43e4f09c32d13d43a880e85f69f7de93ceda62d6cf2581a582c6db635548fdc"), ), StorageKey( - PatriciaKey( - 0x60648f61481391ac1803a92eaa5009bc1438ef6e8d10598d265bf5829d312f4, - ), + patricia_key!("0x60648f61481391ac1803a92eaa5009bc1438ef6e8d10598d265bf5829d312f4"), ), ), ( ContractAddress( - PatriciaKey( - 0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d, - ), + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), ), StorageKey( - PatriciaKey( - 0x43e1ef374bc5f9e49c6c9764a9aac6e36bc8e3df0ca3bffb3cde5a0990ca36a, - ), + patricia_key!("0x43e1ef374bc5f9e49c6c9764a9aac6e36bc8e3df0ca3bffb3cde5a0990ca36a"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x68153282240797844a90a332ec1b2eabf7d15c42ba228e0c249720e6914176f, - ), + patricia_key!("0x68153282240797844a90a332ec1b2eabf7d15c42ba228e0c249720e6914176f"), ), ), ( ContractAddress( - PatriciaKey( - 0x4505a9f06f2bd639b6601f37a4dc0908bb70e8e0e0c34b1220827d64f4fc066, - ), + patricia_key!("0x4505a9f06f2bd639b6601f37a4dc0908bb70e8e0e0c34b1220827d64f4fc066"), ), StorageKey( - PatriciaKey( - 0x281a85306374a5ab27f0bbc385296a54bcd314a1948b6cf61c4ea1bc44bb9f8, - ), + patricia_key!("0x281a85306374a5ab27f0bbc385296a54bcd314a1948b6cf61c4ea1bc44bb9f8"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x6267108c93bc853ce42efb890b0793116c50e5a98b13e024640da0d272115a8, - ), + patricia_key!("0x6267108c93bc853ce42efb890b0793116c50e5a98b13e024640da0d272115a8"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0x45fb8ffc8b8d0d2521fdc1b3558fea0c43ed03911387994698ae9e504026d43, - ), + patricia_key!("0x45fb8ffc8b8d0d2521fdc1b3558fea0c43ed03911387994698ae9e504026d43"), ), ), ( ContractAddress( - PatriciaKey( - 0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, - ), + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), ), StorageKey( - PatriciaKey( - 0xd5ee72ce4ea000d334dd7d37bd432beb488d5ceae18a4a955e14901a851ec7, - ), + patricia_key!("0xd5ee72ce4ea000d334dd7d37bd432beb488d5ceae18a4a955e14901a851ec7"), ), ), ]), @@ -3375,8 +2729,8 @@ mod tests { n_steps: 3730, n_memory_holes: 100, builtin_instance_counter: HashMap::from_iter([ - ("range_check", 78), - ("pedersen", 3), + (BuiltinName::range_check, 78), + (BuiltinName::pedersen, 3), ]), }, gas_for_fee: GasAmount( @@ -3384,108 +2738,72 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x6551d5af6e4eb4fac2f9fea06948a49a6d12d924e43a63e6034a6a75e749577, - ), - ClassHash( - 0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253, - ), + class_hash!("0x6551d5af6e4eb4fac2f9fea06948a49a6d12d924e43a63e6034a6a75e749577"), + class_hash!("0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, - ), + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), ), StorageKey( - PatriciaKey( - 0x401109fe98501f72c01ea79ad5b48c227ec2706d706723cfec3fa5d4ba54c90, - ), + patricia_key!("0x401109fe98501f72c01ea79ad5b48c227ec2706d706723cfec3fa5d4ba54c90"), ), ), ( ContractAddress( - PatriciaKey( - 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, - ), + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), ), StorageKey( - PatriciaKey( - 0x291625bbd3d00024377934a31b5cdf6dfcc1e76776985889e17efb47b3ce2f0, - ), + patricia_key!("0x291625bbd3d00024377934a31b5cdf6dfcc1e76776985889e17efb47b3ce2f0"), ), ), ( ContractAddress( - PatriciaKey( - 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, - ), + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), ), StorageKey( - PatriciaKey( - 0x144978e3c7c8da8f54b97b4fa49320e49d8c70be0c35f42ba1e78465949d19c, - ), + patricia_key!("0x144978e3c7c8da8f54b97b4fa49320e49d8c70be0c35f42ba1e78465949d19c"), ), ), ( ContractAddress( - PatriciaKey( - 0xce305af75e878121f5691150fdd386dff5af073f7e56f4882f62e02bb05a45, - ), + patricia_key!("0xce305af75e878121f5691150fdd386dff5af073f7e56f4882f62e02bb05a45"), ), StorageKey( - PatriciaKey( - 0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76, - ), + patricia_key!("0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76"), ), ), ( ContractAddress( - PatriciaKey( - 0xce305af75e878121f5691150fdd386dff5af073f7e56f4882f62e02bb05a45, - ), + patricia_key!("0xce305af75e878121f5691150fdd386dff5af073f7e56f4882f62e02bb05a45"), ), StorageKey( - PatriciaKey( - 0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463, - ), + patricia_key!("0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463"), ), ), ( ContractAddress( - PatriciaKey( - 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, - ), + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), ), StorageKey( - PatriciaKey( - 0x1e44381b0f95a657a83284ece260c1948e6c965da4d357f7fbd6b557342cdc0, - ), + patricia_key!("0x1e44381b0f95a657a83284ece260c1948e6c965da4d357f7fbd6b557342cdc0"), ), ), ( ContractAddress( - PatriciaKey( - 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, - ), + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), ), StorageKey( - PatriciaKey( - 0x3db6ec55ed007baefa72e1ff639054f691cb3009b778edb59a37aa04690682c, - ), + patricia_key!("0x3db6ec55ed007baefa72e1ff639054f691cb3009b778edb59a37aa04690682c"), ), ), ( ContractAddress( - PatriciaKey( - 0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11, - ), + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), ), StorageKey( - PatriciaKey( - 0x235a4d83b9b27bde6943b4e26301642f73f6fb6e5cda141734b02962b9d7f9d, - ), + patricia_key!("0x235a4d83b9b27bde6943b4e26301642f73f6fb6e5cda141734b02962b9d7f9d"), ), ), ]), @@ -3520,8 +2838,8 @@ mod tests { n_steps: 60919, n_memory_holes: 975, builtin_instance_counter: HashMap::from_iter([ - ("range_check", 1715), - ("pedersen", 43), + (BuiltinName::range_check, 1715), + (BuiltinName::pedersen, 43), ]), }, gas_for_fee: GasAmount( @@ -3529,541 +2847,351 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x5ad7636491f8a6b210c137e6191bc12daf31171b6c6e670fe1387697810403a, - ), - ClassHash( - 0xdb2ed00ec7872d4d093f3acb479d7ef2b56bcc7fc793707c1fb04ec66c6b10, - ), - ClassHash( - 0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003, - ), - ClassHash( - 0x26fe8ea36ec7703569cfe4693b05102940bf122647c4dbf0abc0bb919ce27bd, - ), - ClassHash( - 0x4c2a0ab0698957bd725745ff6dfdda0e874ade8681770fe8990016a6fa9cf04, - ), - ClassHash( - 0x2b39bc3f4c1fd5bef8b7d21504c44e0da59cf27b350551b13d913da52e40d3b, - ), - ClassHash( - 0x2580632f25bbee45da5a1a1ef49d03a984f78dde4019069aa9f25aac06f941a, - ), - ClassHash( - 0x7b5cd6a6949cc1730f89d795f2442f6ab431ea6c9a5be00685d50f97433c5eb, - ), - ClassHash( - 0x52c7ba99c77fc38dd3346beea6c0753c3471f2e3135af5bb837d6c9523fff62, - ), - ClassHash( - 0x7197021c108b0cc57ae354f5ad02222c4b3d7344664e6dd602a0e2298595434, - ), - ClassHash( - 0x64e7d628b1b2aa04a35fe6610b005689e8b591058f7f92bf4eb234e67cf403b, - ), - ClassHash( - 0x2760f25d5a4fb2bdde5f561fd0b44a3dee78c28903577d37d669939d97036a0, - ), + class_hash!("0x5ad7636491f8a6b210c137e6191bc12daf31171b6c6e670fe1387697810403a"), + class_hash!("0xdb2ed00ec7872d4d093f3acb479d7ef2b56bcc7fc793707c1fb04ec66c6b10"), + class_hash!("0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003"), + class_hash!("0x26fe8ea36ec7703569cfe4693b05102940bf122647c4dbf0abc0bb919ce27bd"), + class_hash!("0x4c2a0ab0698957bd725745ff6dfdda0e874ade8681770fe8990016a6fa9cf04"), + class_hash!("0x2b39bc3f4c1fd5bef8b7d21504c44e0da59cf27b350551b13d913da52e40d3b"), + class_hash!("0x2580632f25bbee45da5a1a1ef49d03a984f78dde4019069aa9f25aac06f941a"), + class_hash!("0x7b5cd6a6949cc1730f89d795f2442f6ab431ea6c9a5be00685d50f97433c5eb"), + class_hash!("0x52c7ba99c77fc38dd3346beea6c0753c3471f2e3135af5bb837d6c9523fff62"), + class_hash!("0x7197021c108b0cc57ae354f5ad02222c4b3d7344664e6dd602a0e2298595434"), + class_hash!("0x64e7d628b1b2aa04a35fe6610b005689e8b591058f7f92bf4eb234e67cf403b"), + class_hash!("0x2760f25d5a4fb2bdde5f561fd0b44a3dee78c28903577d37d669939d97036a0"), ]), visited_storage_entries: HashSet::from_iter([ ( ContractAddress( - PatriciaKey( - 0xdad44c139a476c7a17fc8141e6db680e9abc9f56fe249a105094c44382c2fd, - ), + patricia_key!("0xdad44c139a476c7a17fc8141e6db680e9abc9f56fe249a105094c44382c2fd"), ), StorageKey( - PatriciaKey( - 0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0, - ), + patricia_key!("0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0"), ), ), ( ContractAddress( - PatriciaKey( - 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, - ), + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), ), StorageKey( - PatriciaKey( - 0x3b3a699bb6ef37ff4b9c4e14319c7d8e9c9bdd10ff402d1ebde18c62ae58382, - ), + patricia_key!("0x3b3a699bb6ef37ff4b9c4e14319c7d8e9c9bdd10ff402d1ebde18c62ae58382"), ), ), ( ContractAddress( - PatriciaKey( - 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, - ), + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), ), StorageKey( - PatriciaKey( - 0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa4f, - ), + patricia_key!("0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa4f"), ), ), ( ContractAddress( - PatriciaKey( - 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, - ), + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), ), StorageKey( - PatriciaKey( - 0x1c76cd4f3f79786d9e5d1298f47170de4bf0222337c680c5377ec772d3ce96b, - ), + patricia_key!("0x1c76cd4f3f79786d9e5d1298f47170de4bf0222337c680c5377ec772d3ce96b"), ), ), ( ContractAddress( - PatriciaKey( - 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, - ), + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), ), StorageKey( - PatriciaKey( - 0x3351bce4793f90e4aa00447357c2d34ac08611756193d8249009e0396dd7b41, - ), + patricia_key!("0x3351bce4793f90e4aa00447357c2d34ac08611756193d8249009e0396dd7b41"), ), ), ( ContractAddress( - PatriciaKey( - 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, - ), + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), ), StorageKey( - PatriciaKey( - 0x34fea4b03b28c51f5bea6524bf41d06209d8306dc2376d4d730b14fea79ec8c, - ), + patricia_key!("0x34fea4b03b28c51f5bea6524bf41d06209d8306dc2376d4d730b14fea79ec8c"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x1c76cd4f3f79786d9e5d1298f47170de4bf0222337c680c5377ec772d3ce96b, - ), + patricia_key!("0x1c76cd4f3f79786d9e5d1298f47170de4bf0222337c680c5377ec772d3ce96b"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ad, - ), + patricia_key!("0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ad"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ac, - ), + patricia_key!("0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ac"), ), ), ( ContractAddress( - PatriciaKey( - 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, - ), + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), ), StorageKey( - PatriciaKey( - 0x3b3a699bb6ef37ff4b9c4e14319c7d8e9c9bdd10ff402d1ebde18c62ae58381, - ), + patricia_key!("0x3b3a699bb6ef37ff4b9c4e14319c7d8e9c9bdd10ff402d1ebde18c62ae58381"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa50, - ), + patricia_key!("0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa50"), ), ), ( ContractAddress( - PatriciaKey( - 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, - ), + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), ), StorageKey( - PatriciaKey( - 0x7dd6927869f0f6501f10407d6de416a90d2272af189f8b24d12acc09c2df5e6, - ), + patricia_key!("0x7dd6927869f0f6501f10407d6de416a90d2272af189f8b24d12acc09c2df5e6"), ), ), ( ContractAddress( - PatriciaKey( - 0xdad44c139a476c7a17fc8141e6db680e9abc9f56fe249a105094c44382c2fd, - ), + patricia_key!("0xdad44c139a476c7a17fc8141e6db680e9abc9f56fe249a105094c44382c2fd"), ), StorageKey( - PatriciaKey( - 0x5c722fd91dec49f67eb170afb8e7e54ebe6f35b6b7f4fec3fdd0bad96606126, - ), + patricia_key!("0x5c722fd91dec49f67eb170afb8e7e54ebe6f35b6b7f4fec3fdd0bad96606126"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa4f, - ), + patricia_key!("0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa4f"), ), ), ( ContractAddress( - PatriciaKey( - 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, - ), + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), ), StorageKey( - PatriciaKey( - 0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d9, - ), + patricia_key!("0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d9"), ), ), ( ContractAddress( - PatriciaKey( - 0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a, - ), + patricia_key!("0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a"), ), StorageKey( - PatriciaKey( - 0x119407278bb67ccb5306f7b08343c96f7b6933a06f3173067d21e98725a2b59, - ), + patricia_key!("0x119407278bb67ccb5306f7b08343c96f7b6933a06f3173067d21e98725a2b59"), ), ), ( ContractAddress( - PatriciaKey( - 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, - ), + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), ), StorageKey( - PatriciaKey( - 0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d8, - ), + patricia_key!("0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d8"), ), ), ( ContractAddress( - PatriciaKey( - 0x41fd22b238fa21cfcf5dd45a8548974d8263b3a531a60388411c5e230f97023, - ), + patricia_key!("0x41fd22b238fa21cfcf5dd45a8548974d8263b3a531a60388411c5e230f97023"), ), StorageKey( - PatriciaKey( - 0x139825585c3389ee852d93d2706b57d5bf8d4ba85922ef0689a691627211b05, - ), + patricia_key!("0x139825585c3389ee852d93d2706b57d5bf8d4ba85922ef0689a691627211b05"), ), ), ( ContractAddress( - PatriciaKey( - 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, - ), + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), ), StorageKey( - PatriciaKey( - 0x2ec31623436b0fbcbbd71b2b3eed2887c8156077098a52a9256a9e0edb833f, - ), + patricia_key!("0x2ec31623436b0fbcbbd71b2b3eed2887c8156077098a52a9256a9e0edb833f"), ), ), ( ContractAddress( - PatriciaKey( - 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, - ), + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), ), StorageKey( - PatriciaKey( - 0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ac, - ), + patricia_key!("0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ac"), ), ), ( ContractAddress( - PatriciaKey( - 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, - ), + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), ), StorageKey( - PatriciaKey( - 0x1e6f3e4333da349f86a03f030be7f2c76d8266a97c625746ebb9d3220a39d87, - ), + patricia_key!("0x1e6f3e4333da349f86a03f030be7f2c76d8266a97c625746ebb9d3220a39d87"), ), ), ( ContractAddress( - PatriciaKey( - 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, - ), + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), ), StorageKey( - PatriciaKey( - 0x57c60b189063035eed65879a14ad5f6e718027a212dafbe52f9bcd79e9f4fb, - ), + patricia_key!("0x57c60b189063035eed65879a14ad5f6e718027a212dafbe52f9bcd79e9f4fb"), ), ), ( ContractAddress( - PatriciaKey( - 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, - ), + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), ), StorageKey( - PatriciaKey( - 0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa50, - ), + patricia_key!("0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa50"), ), ), ( ContractAddress( - PatriciaKey( - 0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a, - ), + patricia_key!("0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a"), ), StorageKey( - PatriciaKey( - 0x2ded64caa8ae4aba3291cc1f172d4b8fda206d4d1b5660c7565e7461c727929, - ), + patricia_key!("0x2ded64caa8ae4aba3291cc1f172d4b8fda206d4d1b5660c7565e7461c727929"), ), ), ( ContractAddress( - PatriciaKey( - 0x12f8e318fe04a1fe8bffe005ea4bbd19cb77a656b4f42682aab8a0ed20702f0, - ), + patricia_key!("0x12f8e318fe04a1fe8bffe005ea4bbd19cb77a656b4f42682aab8a0ed20702f0"), ), StorageKey( - PatriciaKey( - 0x5d6c55cbfbeaef29110e02a1f4a1228488feec6f59b3f2f77d24245272e799a, - ), + patricia_key!("0x5d6c55cbfbeaef29110e02a1f4a1228488feec6f59b3f2f77d24245272e799a"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x18d7b079b471cfde70d671fc55b3c06d4363cdc22201c09924822902a33e01a, - ), + patricia_key!("0x18d7b079b471cfde70d671fc55b3c06d4363cdc22201c09924822902a33e01a"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d9, - ), + patricia_key!("0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d9"), ), ), ( ContractAddress( - PatriciaKey( - 0x41fd22b238fa21cfcf5dd45a8548974d8263b3a531a60388411c5e230f97023, - ), + patricia_key!("0x41fd22b238fa21cfcf5dd45a8548974d8263b3a531a60388411c5e230f97023"), ), StorageKey( - PatriciaKey( - 0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0, - ), + patricia_key!("0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x18d7b079b471cfde70d671fc55b3c06d4363cdc22201c09924822902a33e019, - ), + patricia_key!("0x18d7b079b471cfde70d671fc55b3c06d4363cdc22201c09924822902a33e019"), ), ), ( ContractAddress( - PatriciaKey( - 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, - ), + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), ), StorageKey( - PatriciaKey( - 0x57c60b189063035eed65879a14ad5f6e718027a212dafbe52f9bcd79e9f4fa, - ), + patricia_key!("0x57c60b189063035eed65879a14ad5f6e718027a212dafbe52f9bcd79e9f4fa"), ), ), ( ContractAddress( - PatriciaKey( - 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, - ), + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), ), StorageKey( - PatriciaKey( - 0x3ad6945aa849b77ba309199d76ea4555be65368391ba450fab8ea6248431ea0, - ), + patricia_key!("0x3ad6945aa849b77ba309199d76ea4555be65368391ba450fab8ea6248431ea0"), ), ), ( ContractAddress( - PatriciaKey( - 0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a, - ), + patricia_key!("0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a"), ), StorageKey( - PatriciaKey( - 0x1f7cb1620ff9ec226d1c4c618ea516ebdd5a65005c2f457158cdd0d4d77ab4b, - ), + patricia_key!("0x1f7cb1620ff9ec226d1c4c618ea516ebdd5a65005c2f457158cdd0d4d77ab4b"), ), ), ( ContractAddress( - PatriciaKey( - 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, - ), + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), ), StorageKey( - PatriciaKey( - 0x2ec31623436b0fbcbbd71b2b3eed2887c8156077098a52a9256a9e0edb8340, - ), + patricia_key!("0x2ec31623436b0fbcbbd71b2b3eed2887c8156077098a52a9256a9e0edb8340"), ), ), ( ContractAddress( - PatriciaKey( - 0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8, - ), + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), ), StorageKey( - PatriciaKey( - 0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d8, - ), + patricia_key!("0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d8"), ), ), ( ContractAddress( - PatriciaKey( - 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, - ), + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), ), StorageKey( - PatriciaKey( - 0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0, - ), + patricia_key!("0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0"), ), ), ( ContractAddress( - PatriciaKey( - 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, - ), + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), ), StorageKey( - PatriciaKey( - 0x37d931bc5c74214b7c669bc431e9dc2c39cba57516e0ab3c5a7ceb2d1c9e5c1, - ), + patricia_key!("0x37d931bc5c74214b7c669bc431e9dc2c39cba57516e0ab3c5a7ceb2d1c9e5c1"), ), ), ( ContractAddress( - PatriciaKey( - 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, - ), + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), ), StorageKey( - PatriciaKey( - 0x3ad6945aa849b77ba309199d76ea4555be65368391ba450fab8ea6248431e9f, - ), + patricia_key!("0x3ad6945aa849b77ba309199d76ea4555be65368391ba450fab8ea6248431e9f"), ), ), ( ContractAddress( - PatriciaKey( - 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, - ), + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), ), StorageKey( - PatriciaKey( - 0x35bfc9b032421f93a52912870bbb09af6c896d21d00165845f0c04715df1468, - ), + patricia_key!("0x35bfc9b032421f93a52912870bbb09af6c896d21d00165845f0c04715df1468"), ), ), ( ContractAddress( - PatriciaKey( - 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, - ), + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), ), StorageKey( - PatriciaKey( - 0x7dd6927869f0f6501f10407d6de416a90d2272af189f8b24d12acc09c2df5e5, - ), + patricia_key!("0x7dd6927869f0f6501f10407d6de416a90d2272af189f8b24d12acc09c2df5e5"), ), ), ( ContractAddress( - PatriciaKey( - 0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8, - ), + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), ), StorageKey( - PatriciaKey( - 0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ad, - ), + patricia_key!("0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ad"), ), ), ( ContractAddress( - PatriciaKey( - 0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a, - ), + patricia_key!("0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a"), ), StorageKey( - PatriciaKey( - 0x26be8966924075afd93cd2a84013cca637468173cc02904002dc3d0caf30b61, - ), + patricia_key!("0x26be8966924075afd93cd2a84013cca637468173cc02904002dc3d0caf30b61"), ), ), ( ContractAddress( - PatriciaKey( - 0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b, - ), + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), ), StorageKey( patricia_key!( @@ -4073,14 +3201,10 @@ mod tests { ), ( ContractAddress( - PatriciaKey( - 0x12f8e318fe04a1fe8bffe005ea4bbd19cb77a656b4f42682aab8a0ed20702f0, - ), + patricia_key!("0x12f8e318fe04a1fe8bffe005ea4bbd19cb77a656b4f42682aab8a0ed20702f0"), ), StorageKey( - PatriciaKey( - 0x5d6c55cbfbeaef29110e02a1f4a1228488feec6f59b3f2f77d24245272e7999, - ), + patricia_key!("0x5d6c55cbfbeaef29110e02a1f4a1228488feec6f59b3f2f77d24245272e7999"), ), ), ]), @@ -4121,9 +3245,7 @@ mod tests { ), }, executed_class_hashes: HashSet::from_iter([ - ClassHash( - 0x33478650b3b71be225cbad55fda8a590022eea17be3212d0ccbf3d364b1e448, - ), + class_hash!("0x33478650b3b71be225cbad55fda8a590022eea17be3212d0ccbf3d364b1e448"), ]), visited_storage_entries: HashSet::new(), l2_to_l1_payload_lengths: vec![], @@ -4147,9 +3269,8 @@ mod tests { starknet_chg: StateChangesCount, is_reverted: bool, n_allocated_keys: usize, - execution_summary: ExecutionSummary + execution_summary: ExecutionSummary, ) { - HashSet::from(value); let previous_block = BlockNumber(block_number - 1); let (tx_info, _, _) = execute_tx(hash, chain, previous_block); let starknet_resources = tx_info.clone().receipt.resources.starknet_resources; @@ -4166,7 +3287,7 @@ mod tests { code_size, state_resources, l1_handler_payload_size, - execution_summary + execution_summary, ); assert_eq!(is_reverted, tx_info.revert_error.is_some()); assert_eq!(da_gas, tx_info.receipt.da_gas); @@ -4192,7 +3313,6 @@ mod tests { /// time, helping to uncover any possible concurrency bug that we may have fn test_concurrency(tx_hash: &str, block_number: u64, chain: RpcChain) { let reader = RpcStateReader::new(RpcChain::MainNet, BlockNumber(block_number - 1)); - let context = fetch_block_context(&reader); let tx_hash = TransactionHash(felt!(tx_hash)); let tx = reader.get_transaction(&tx_hash).unwrap(); From 5912e0ebdfb183272ab6261b0f25ea53f9898abf Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 10 Dec 2024 10:27:12 -0300 Subject: [PATCH 07/14] fix test --- rpc-state-reader/src/execution.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/rpc-state-reader/src/execution.rs b/rpc-state-reader/src/execution.rs index 0b6e874..3c821a1 100644 --- a/rpc-state-reader/src/execution.rs +++ b/rpc-state-reader/src/execution.rs @@ -20,8 +20,8 @@ use blockifier_reexecution::state_reader::compile::{ }; use starknet::core::types::ContractClass as SNContractClass; use starknet_api::{ - class_hash, block::{BlockInfo, BlockNumber}, + class_hash, contract_class::{ClassInfo, SierraVersion}, core::ContractAddress, felt, @@ -353,17 +353,26 @@ pub fn fetch_block_context(reader: &RpcStateReader) -> BlockContext { #[cfg(test)] mod tests { - use std::{collections::{HashMap, HashSet}, thread}; + use std::{ + collections::{HashMap, HashSet}, + thread, + }; use blockifier::{ execution::call_info::{CallInfo, ChargedResources, EventSummary, ExecutionSummary}, fee::resources::{StarknetResources, StateResources}, state::cached_state::StateChangesCount, }; - use cairo_vm::{types::builtin_name::BuiltinName, vm::runners::cairo_runner::ExecutionResources}; + use cairo_vm::{ + types::builtin_name::BuiltinName, vm::runners::cairo_runner::ExecutionResources, + }; use pretty_assertions_sorted::assert_eq_sorted; use starknet_api::{ - block::BlockNumber, class_hash, core::ClassHash, execution_resources::{GasAmount, GasVector}, state::StorageKey + block::BlockNumber, + class_hash, + core::ClassHash, + execution_resources::{GasAmount, GasVector}, + state::StorageKey, }; use test_case::test_case; From 750f4c0f3d1218dbb609d7807efddfa2da38b3ba Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 10 Dec 2024 16:41:50 -0300 Subject: [PATCH 08/14] format --- Cargo.lock | 44 ++++++++++++++++++++++--------- rpc-state-reader/src/execution.rs | 8 +++--- 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cce20c1..e2099f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -514,15 +514,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - [[package]] name = "bincode" version = "2.0.0-rc.3" @@ -669,6 +660,7 @@ dependencies = [ "cairo-vm", "derive_more 0.99.18", "indexmap 2.7.0", + "infra_utils", "itertools 0.12.1", "keccak", "log", @@ -685,6 +677,7 @@ dependencies = [ "serde", "serde_json", "sha2", + "stacker", "starknet-types-core", "starknet_api", "starknet_sierra_compile", @@ -1444,7 +1437,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58363ad8065ed891e3b14a8191b707677c7c7cb5b9d10030822506786d8d8108" dependencies = [ "anyhow", - "bincode 2.0.0-rc.3", + "bincode", "bitvec", "generic-array", "hashbrown 0.14.5", @@ -5134,9 +5127,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", "bitvec", @@ -5568,6 +5561,15 @@ dependencies = [ "unarray", ] +[[package]] +name = "psm" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810" +dependencies = [ + "cc", +] + [[package]] name = "quick-protobuf" version = "0.8.1" @@ -6712,6 +6714,19 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "stacker" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "windows-sys 0.59.0", +] + [[package]] name = "starknet" version = "0.6.0" @@ -6947,6 +6962,7 @@ dependencies = [ "derive_more 0.99.18", "hex", "indexmap 2.7.0", + "infra_utils", "itertools 0.12.1", "num-bigint", "pretty_assertions", @@ -7051,11 +7067,12 @@ name = "starknet_sequencer_infra" version = "0.0.0" dependencies = [ "async-trait", - "bincode 1.3.3", "hyper 0.14.31", "papyrus_config", "rstest", "serde", + "serde_json", + "starknet_api", "thiserror", "tokio", "tracing", @@ -7071,6 +7088,7 @@ dependencies = [ "cairo-lang-starknet-classes", "cairo-lang-utils", "cairo-native", + "infra_utils", "papyrus_config", "serde", "serde_json", diff --git a/rpc-state-reader/src/execution.rs b/rpc-state-reader/src/execution.rs index 3c821a1..71bcfae 100644 --- a/rpc-state-reader/src/execution.rs +++ b/rpc-state-reader/src/execution.rs @@ -826,7 +826,7 @@ mod tests { n_steps: 3457, n_memory_holes: 26, builtin_instance_counter: HashMap::from_iter([ - (BuiltinName::pedersen, 4), + (BuiltinName::pedersen, 4), (BuiltinName::range_check, 74), ]), }, @@ -932,7 +932,7 @@ mod tests { n_steps: 3938, n_memory_holes: 63, builtin_instance_counter: HashMap::from_iter([ - (BuiltinName::pedersen, 4), + (BuiltinName::pedersen, 4), (BuiltinName::range_check, 76), ]), }, @@ -1113,7 +1113,7 @@ mod tests { n_memory_holes: 1809, builtin_instance_counter: HashMap::from_iter([ (BuiltinName::pedersen, 39), - (BuiltinName::range_check, 1435), + (BuiltinName::range_check, 1435), (BuiltinName::segment_arena, 2), ]), }, @@ -1429,7 +1429,7 @@ mod tests { n_memory_holes: 222, builtin_instance_counter: HashMap::from_iter([ (BuiltinName::range_check, 272), - (BuiltinName::pedersen, 26), + (BuiltinName::pedersen, 26), (BuiltinName::poseidon, 1) ]), }, From f0a9b3daaea951717f9a0581ec0c728fe646a0a2 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 10 Dec 2024 17:57:16 -0300 Subject: [PATCH 09/14] format --- Cargo.toml | 8 ++++---- replay/src/main.rs | 3 --- rpc-state-reader/src/execution.rs | 1 - 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6f9c129..4fb35c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ serde_with = "3.11.0" serde = "1.0.197" cairo-native = "0.2.4" # Sequencer Dependencies -starknet_api = { path = "../sequencer/crates/starknet_api" } # replay -blockifier = { path = "../sequencer/crates/blockifier", features = ["cairo_native"] } # replay -starknet_gateway = { path = "../sequencer/crates/starknet_gateway" } # replay -blockifier_reexecution = { path = "../sequencer/crates/blockifier_reexecution" } # replay +starknet_api = { git = "https://github.com/lambdaclass/sequencer.git", rev = "7329a11e9151276ed3189399ae568a163add747f" } # replay +blockifier = { git = "https://github.com/lambdaclass/sequencer.git", rev = "7329a11e9151276ed3189399ae568a163add747f", features = ["cairo_native"] } # replay +starknet_gateway = { git = "https://github.com/lambdaclass/sequencer.git", rev = "7329a11e9151276ed3189399ae568a163add747f" } # replay +blockifier_reexecution = { git = "https://github.com/lambdaclass/sequencer.git", rev = "7329a11e9151276ed3189399ae568a163add747f" } # replay diff --git a/replay/src/main.rs b/replay/src/main.rs index 8f0934e..49373e9 100644 --- a/replay/src/main.rs +++ b/replay/src/main.rs @@ -1,6 +1,3 @@ -use std::thread; -use std::time::Duration; - use blockifier::state::cached_state::CachedState; use blockifier::state::errors::StateError; use blockifier::transaction::objects::{RevertError, TransactionExecutionInfo}; diff --git a/rpc-state-reader/src/execution.rs b/rpc-state-reader/src/execution.rs index 71bcfae..ff10348 100644 --- a/rpc-state-reader/src/execution.rs +++ b/rpc-state-reader/src/execution.rs @@ -21,7 +21,6 @@ use blockifier_reexecution::state_reader::compile::{ use starknet::core::types::ContractClass as SNContractClass; use starknet_api::{ block::{BlockInfo, BlockNumber}, - class_hash, contract_class::{ClassInfo, SierraVersion}, core::ContractAddress, felt, From 1cde5f3333527d0f5147da71b1c4bb4dfa01d1cf Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 10 Dec 2024 18:11:40 -0300 Subject: [PATCH 10/14] clippy --- Cargo.lock | 18 ++++++++++++++++++ replay/src/main.rs | 3 +++ 2 files changed, 21 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index e2099f1..ab02ae8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -646,6 +646,7 @@ dependencies = [ [[package]] name = "blockifier" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "anyhow", "ark-ec", @@ -691,6 +692,7 @@ dependencies = [ [[package]] name = "blockifier_reexecution" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "assert_matches", "blockifier", @@ -3761,6 +3763,7 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "infra_utils" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "tokio", "tracing", @@ -4530,6 +4533,7 @@ dependencies = [ [[package]] name = "mempool_test_utils" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "assert_matches", "blockifier", @@ -4993,6 +4997,7 @@ dependencies = [ [[package]] name = "papyrus_common" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "base64 0.13.1", "cairo-lang-starknet-classes", @@ -5011,6 +5016,7 @@ dependencies = [ [[package]] name = "papyrus_config" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "clap", "infra_utils", @@ -5025,6 +5031,7 @@ dependencies = [ [[package]] name = "papyrus_execution" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "anyhow", "blockifier", @@ -5047,6 +5054,7 @@ dependencies = [ [[package]] name = "papyrus_network_types" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "libp2p", "serde", @@ -5055,6 +5063,7 @@ dependencies = [ [[package]] name = "papyrus_proc_macros" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "quote", "syn 2.0.90", @@ -5064,6 +5073,7 @@ dependencies = [ [[package]] name = "papyrus_rpc" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "anyhow", "async-trait", @@ -5097,6 +5107,7 @@ dependencies = [ [[package]] name = "papyrus_storage" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "byteorder", "cairo-lang-casm", @@ -6955,6 +6966,7 @@ dependencies = [ [[package]] name = "starknet_api" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "bitvec", "cairo-lang-runner", @@ -6981,6 +6993,7 @@ dependencies = [ [[package]] name = "starknet_client" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "async-trait", "cairo-lang-starknet-classes", @@ -7007,6 +7020,7 @@ dependencies = [ [[package]] name = "starknet_gateway" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "async-trait", "axum", @@ -7034,6 +7048,7 @@ dependencies = [ [[package]] name = "starknet_gateway_types" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "async-trait", "axum", @@ -7052,6 +7067,7 @@ dependencies = [ [[package]] name = "starknet_mempool_types" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "async-trait", "papyrus_network_types", @@ -7065,6 +7081,7 @@ dependencies = [ [[package]] name = "starknet_sequencer_infra" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "async-trait", "hyper 0.14.31", @@ -7083,6 +7100,7 @@ dependencies = [ [[package]] name = "starknet_sierra_compile" version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" dependencies = [ "cairo-lang-sierra", "cairo-lang-starknet-classes", diff --git a/replay/src/main.rs b/replay/src/main.rs index 49373e9..8f0934e 100644 --- a/replay/src/main.rs +++ b/replay/src/main.rs @@ -1,3 +1,6 @@ +use std::thread; +use std::time::Duration; + use blockifier::state::cached_state::CachedState; use blockifier::state::errors::StateError; use blockifier::transaction::objects::{RevertError, TransactionExecutionInfo}; From 4869d6afd28656cac14ffd67a82b2ad03fbb8e9d Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Wed, 11 Dec 2024 09:08:32 -0300 Subject: [PATCH 11/14] clippy --- rpc-state-reader/src/execution.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/rpc-state-reader/src/execution.rs b/rpc-state-reader/src/execution.rs index ff10348..2f47a41 100644 --- a/rpc-state-reader/src/execution.rs +++ b/rpc-state-reader/src/execution.rs @@ -369,7 +369,6 @@ mod tests { use starknet_api::{ block::BlockNumber, class_hash, - core::ClassHash, execution_resources::{GasAmount, GasVector}, state::StorageKey, }; @@ -3282,12 +3281,6 @@ mod tests { let previous_block = BlockNumber(block_number - 1); let (tx_info, _, _) = execute_tx(hash, chain, previous_block); let starknet_resources = tx_info.clone().receipt.resources.starknet_resources; - let versioned_constants = - VersionedConstants::get_versioned_constants(VersionedConstantsOverrides { - validate_max_n_steps: u32::MAX, - invoke_tx_max_n_steps: u32::MAX, - max_recursion_depth: usize::MAX, - }); let state_resources = StateResources::new_for_testing(starknet_chg, n_allocated_keys); let starknet_rsc = StarknetResources::new( calldata_length, From 5b1dfb4cbcbceb3d3ee723740ac70d5419a505ba Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Wed, 11 Dec 2024 10:49:29 -0300 Subject: [PATCH 12/14] change to the right sequencer commit --- Cargo.lock | 48 ++++++++++++++++++++++++------------------------ Cargo.toml | 8 ++++---- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ab02ae8..2000f2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -646,7 +646,7 @@ dependencies = [ [[package]] name = "blockifier" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "anyhow", "ark-ec", @@ -692,7 +692,7 @@ dependencies = [ [[package]] name = "blockifier_reexecution" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "assert_matches", "blockifier", @@ -1299,9 +1299,9 @@ dependencies = [ [[package]] name = "cairo-lang-syntax-codegen" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80bede54808f2e5d26a8702711009eefe4a12e5a8f3a427ba9b081073c8e9d36" +checksum = "fd7990586c9bb37eaa875ffeb218bdecf96f87881d03263ebf84fcd46514ca9f" dependencies = [ "genco", "xshell", @@ -3763,7 +3763,7 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "infra_utils" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "tokio", "tracing", @@ -4533,7 +4533,7 @@ dependencies = [ [[package]] name = "mempool_test_utils" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "assert_matches", "blockifier", @@ -4997,7 +4997,7 @@ dependencies = [ [[package]] name = "papyrus_common" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "base64 0.13.1", "cairo-lang-starknet-classes", @@ -5016,7 +5016,7 @@ dependencies = [ [[package]] name = "papyrus_config" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "clap", "infra_utils", @@ -5031,7 +5031,7 @@ dependencies = [ [[package]] name = "papyrus_execution" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "anyhow", "blockifier", @@ -5054,7 +5054,7 @@ dependencies = [ [[package]] name = "papyrus_network_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "libp2p", "serde", @@ -5063,7 +5063,7 @@ dependencies = [ [[package]] name = "papyrus_proc_macros" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "quote", "syn 2.0.90", @@ -5073,7 +5073,7 @@ dependencies = [ [[package]] name = "papyrus_rpc" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "anyhow", "async-trait", @@ -5107,7 +5107,7 @@ dependencies = [ [[package]] name = "papyrus_storage" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "byteorder", "cairo-lang-casm", @@ -6362,18 +6362,18 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", @@ -6966,7 +6966,7 @@ dependencies = [ [[package]] name = "starknet_api" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "bitvec", "cairo-lang-runner", @@ -6993,7 +6993,7 @@ dependencies = [ [[package]] name = "starknet_client" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "async-trait", "cairo-lang-starknet-classes", @@ -7020,7 +7020,7 @@ dependencies = [ [[package]] name = "starknet_gateway" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "async-trait", "axum", @@ -7048,7 +7048,7 @@ dependencies = [ [[package]] name = "starknet_gateway_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "async-trait", "axum", @@ -7067,7 +7067,7 @@ dependencies = [ [[package]] name = "starknet_mempool_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "async-trait", "papyrus_network_types", @@ -7081,7 +7081,7 @@ dependencies = [ [[package]] name = "starknet_sequencer_infra" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "async-trait", "hyper 0.14.31", @@ -7100,7 +7100,7 @@ dependencies = [ [[package]] name = "starknet_sierra_compile" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=7329a11e9151276ed3189399ae568a163add747f#7329a11e9151276ed3189399ae568a163add747f" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" dependencies = [ "cairo-lang-sierra", "cairo-lang-starknet-classes", diff --git a/Cargo.toml b/Cargo.toml index 4fb35c3..0b98d35 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ serde_with = "3.11.0" serde = "1.0.197" cairo-native = "0.2.4" # Sequencer Dependencies -starknet_api = { git = "https://github.com/lambdaclass/sequencer.git", rev = "7329a11e9151276ed3189399ae568a163add747f" } # replay -blockifier = { git = "https://github.com/lambdaclass/sequencer.git", rev = "7329a11e9151276ed3189399ae568a163add747f", features = ["cairo_native"] } # replay -starknet_gateway = { git = "https://github.com/lambdaclass/sequencer.git", rev = "7329a11e9151276ed3189399ae568a163add747f" } # replay -blockifier_reexecution = { git = "https://github.com/lambdaclass/sequencer.git", rev = "7329a11e9151276ed3189399ae568a163add747f" } # replay +starknet_api = { git = "https://github.com/lambdaclass/sequencer.git", rev = "d89c06bfe0c25f121f95bffc01ddf69264ddbff3" } # replay +blockifier = { git = "https://github.com/lambdaclass/sequencer.git", rev = "d89c06bfe0c25f121f95bffc01ddf69264ddbff3", features = ["cairo_native"] } # replay +starknet_gateway = { git = "https://github.com/lambdaclass/sequencer.git", rev = "d89c06bfe0c25f121f95bffc01ddf69264ddbff3" } # replay +blockifier_reexecution = { git = "https://github.com/lambdaclass/sequencer.git", rev = "d89c06bfe0c25f121f95bffc01ddf69264ddbff3" } # replay From 6c01c6dc19473861f1ce617f27e54822150ad3e1 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Fri, 13 Dec 2024 09:45:03 -0300 Subject: [PATCH 13/14] update sequencer commit --- Cargo.lock | 36 ++++++++++++++++++------------------ Cargo.toml | 8 ++++---- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2000f2e..0fad799 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -646,7 +646,7 @@ dependencies = [ [[package]] name = "blockifier" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "anyhow", "ark-ec", @@ -692,7 +692,7 @@ dependencies = [ [[package]] name = "blockifier_reexecution" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "assert_matches", "blockifier", @@ -3763,7 +3763,7 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "infra_utils" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "tokio", "tracing", @@ -4533,7 +4533,7 @@ dependencies = [ [[package]] name = "mempool_test_utils" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "assert_matches", "blockifier", @@ -4997,7 +4997,7 @@ dependencies = [ [[package]] name = "papyrus_common" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "base64 0.13.1", "cairo-lang-starknet-classes", @@ -5016,7 +5016,7 @@ dependencies = [ [[package]] name = "papyrus_config" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "clap", "infra_utils", @@ -5031,7 +5031,7 @@ dependencies = [ [[package]] name = "papyrus_execution" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "anyhow", "blockifier", @@ -5054,7 +5054,7 @@ dependencies = [ [[package]] name = "papyrus_network_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "libp2p", "serde", @@ -5063,7 +5063,7 @@ dependencies = [ [[package]] name = "papyrus_proc_macros" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "quote", "syn 2.0.90", @@ -5073,7 +5073,7 @@ dependencies = [ [[package]] name = "papyrus_rpc" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "anyhow", "async-trait", @@ -5107,7 +5107,7 @@ dependencies = [ [[package]] name = "papyrus_storage" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "byteorder", "cairo-lang-casm", @@ -6966,7 +6966,7 @@ dependencies = [ [[package]] name = "starknet_api" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "bitvec", "cairo-lang-runner", @@ -6993,7 +6993,7 @@ dependencies = [ [[package]] name = "starknet_client" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "async-trait", "cairo-lang-starknet-classes", @@ -7020,7 +7020,7 @@ dependencies = [ [[package]] name = "starknet_gateway" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "async-trait", "axum", @@ -7048,7 +7048,7 @@ dependencies = [ [[package]] name = "starknet_gateway_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "async-trait", "axum", @@ -7067,7 +7067,7 @@ dependencies = [ [[package]] name = "starknet_mempool_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "async-trait", "papyrus_network_types", @@ -7081,7 +7081,7 @@ dependencies = [ [[package]] name = "starknet_sequencer_infra" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "async-trait", "hyper 0.14.31", @@ -7100,7 +7100,7 @@ dependencies = [ [[package]] name = "starknet_sierra_compile" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=d89c06bfe0c25f121f95bffc01ddf69264ddbff3#d89c06bfe0c25f121f95bffc01ddf69264ddbff3" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "cairo-lang-sierra", "cairo-lang-starknet-classes", diff --git a/Cargo.toml b/Cargo.toml index 0b98d35..3f3c6bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ serde_with = "3.11.0" serde = "1.0.197" cairo-native = "0.2.4" # Sequencer Dependencies -starknet_api = { git = "https://github.com/lambdaclass/sequencer.git", rev = "d89c06bfe0c25f121f95bffc01ddf69264ddbff3" } # replay -blockifier = { git = "https://github.com/lambdaclass/sequencer.git", rev = "d89c06bfe0c25f121f95bffc01ddf69264ddbff3", features = ["cairo_native"] } # replay -starknet_gateway = { git = "https://github.com/lambdaclass/sequencer.git", rev = "d89c06bfe0c25f121f95bffc01ddf69264ddbff3" } # replay -blockifier_reexecution = { git = "https://github.com/lambdaclass/sequencer.git", rev = "d89c06bfe0c25f121f95bffc01ddf69264ddbff3" } # replay +starknet_api = { git = "https://github.com/lambdaclass/sequencer.git", rev = "eb3d5537d2148262ce4dc8edbd7794ec030e017b" } # replay +blockifier = { git = "https://github.com/lambdaclass/sequencer.git", rev = "eb3d5537d2148262ce4dc8edbd7794ec030e017b", features = ["cairo_native"] } # replay +starknet_gateway = { git = "https://github.com/lambdaclass/sequencer.git", rev = "eb3d5537d2148262ce4dc8edbd7794ec030e017b" } # replay +blockifier_reexecution = { git = "https://github.com/lambdaclass/sequencer.git", rev = "eb3d5537d2148262ce4dc8edbd7794ec030e017b" } # replay From ad1be2fa9c1b115fe4571cffab1df5bd44d15d38 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Fri, 13 Dec 2024 10:44:36 -0300 Subject: [PATCH 14/14] reviews --- rpc-state-reader/src/execution.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpc-state-reader/src/execution.rs b/rpc-state-reader/src/execution.rs index 2f47a41..345527a 100644 --- a/rpc-state-reader/src/execution.rs +++ b/rpc-state-reader/src/execution.rs @@ -82,7 +82,7 @@ pub fn execute_tx( ); let exec_flags = ExecutionFlags { - charge_fee: true, + charge_fee: false, only_query: false, validate: true, }; @@ -258,7 +258,7 @@ pub fn execute_tx_with_blockifier( transaction_hash: TransactionHash, ) -> TransactionExecutionResult { let exec_flags = ExecutionFlags { - charge_fee: true, + charge_fee: false, only_query: false, validate: true, };