From ef8318be50c2851c3ef05fbb906097cdd3bea3da Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Tue, 6 Aug 2024 19:00:20 +0300 Subject: [PATCH 01/21] refactor: split syscalls into separate files --- .gitignore | 1 + .../blockifier/src/execution/syscalls/mod.rs | 3 +- .../syscalls/syscall_tests/call_contract.rs | 60 ++ .../syscalls/syscall_tests/consts.rs | 3 + .../syscalls/syscall_tests/deploy.rs | 172 +++ .../syscalls/syscall_tests/emit_event.rs | 122 +++ .../syscalls/syscall_tests/get_block_hash.rs | 105 ++ .../syscall_tests/get_execution_info.rs | 257 +++++ .../syscalls/syscall_tests/keccak.rs | 29 + .../syscalls/syscall_tests/library_call.rs | 204 ++++ .../execution/syscalls/syscall_tests/mod.rs | 15 + .../syscalls/syscall_tests/out_of_gas.rs | 29 + .../syscalls/syscall_tests/replace_class.rs | 72 ++ .../execution/syscalls/syscall_tests/secp.rs | 46 + .../syscall_tests/send_message_to_l1.rs | 51 + .../syscalls/syscall_tests/sha256.rs | 29 + .../syscall_tests/storage_read_write.rs | 50 + .../execution/syscalls/syscall_tests/utils.rs | 27 + .../src/execution/syscalls/syscalls_test.rs | 986 ------------------ 19 files changed, 1273 insertions(+), 988 deletions(-) create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/consts.rs create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/deploy.rs create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/get_execution_info.rs create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/keccak.rs create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/mod.rs create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/replace_class.rs create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/secp.rs create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/send_message_to_l1.rs create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/sha256.rs create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/utils.rs delete mode 100644 crates/blockifier/src/execution/syscalls/syscalls_test.rs diff --git a/.gitignore b/.gitignore index bc8e9a4262..32bbb4b2fd 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ tmp_venv/* /.vscode # Git hooks /.husky +/.idea # Python artifacts. scripts/__pycache__ diff --git a/crates/blockifier/src/execution/syscalls/mod.rs b/crates/blockifier/src/execution/syscalls/mod.rs index 9e31c9ab9b..7e253f247b 100644 --- a/crates/blockifier/src/execution/syscalls/mod.rs +++ b/crates/blockifier/src/execution/syscalls/mod.rs @@ -55,8 +55,7 @@ pub mod hint_processor; mod secp; #[cfg(test)] -#[path = "syscalls_test.rs"] -pub mod syscalls_test; +pub mod syscall_tests; pub type SyscallResult = Result; pub type WriteResponseResult = SyscallResult<()>; diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs new file mode 100644 index 0000000000..39d97e5e68 --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs @@ -0,0 +1,60 @@ +use pretty_assertions::assert_eq; +use starknet_api::felt; +use test_case::test_case; + +use super::consts::REQUIRED_GAS_CALL_CONTRACT_TEST; +use crate::abi::abi_utils::selector_from_name; +use crate::context::ChainInfo; +use crate::execution::call_info::{CallExecution, Retdata}; +use crate::execution::entry_point::CallEntryPoint; +use crate::execution::syscalls::syscall_tests::utils::assert_consistent_contract_version; +use crate::retdata; +use crate::test_utils::contracts::FeatureContract; +use crate::test_utils::initial_test_state::test_state; +use crate::test_utils::{create_calldata, trivial_external_entry_point_new, CairoVersion, BALANCE}; + +#[test_case( + FeatureContract::TestContract(CairoVersion::Cairo1), + FeatureContract::TestContract(CairoVersion::Cairo1), + REQUIRED_GAS_CALL_CONTRACT_TEST; + "Call Contract between two contracts using VM" +)] +fn test_call_contract( + outer_contract: FeatureContract, + inner_contract: FeatureContract, + expected_gas: u64, +) { + let chain_info = &ChainInfo::create_for_testing(); + let mut state = test_state(chain_info, BALANCE, &[(outer_contract, 1), (inner_contract, 1)]); + + assert_consistent_contract_version(outer_contract, &state); + assert_consistent_contract_version(inner_contract, &state); + + let outer_entry_point_selector = selector_from_name("test_call_contract"); + let calldata = create_calldata( + inner_contract.get_instance_address(0), + "test_storage_read_write", + &[ + felt!(405_u16), // Calldata: address. + felt!(48_u8), // Calldata: value. + ], + ); + let entry_point_call = CallEntryPoint { + entry_point_selector: outer_entry_point_selector, + calldata, + ..trivial_external_entry_point_new(outer_contract) + }; + + assert_eq!( + entry_point_call.execute_directly(&mut state).unwrap().execution, + CallExecution { + retdata: retdata![felt!(48_u8)], + gas_consumed: expected_gas, + ..CallExecution::default() + } + ); + + // ensure that the fallback system didn't replace the contract + assert_consistent_contract_version(outer_contract, &state); + assert_consistent_contract_version(inner_contract, &state); +} diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/consts.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/consts.rs new file mode 100644 index 0000000000..94c378a074 --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/consts.rs @@ -0,0 +1,3 @@ +pub const REQUIRED_GAS_CALL_CONTRACT_TEST: u64 = 105680; +pub const REQUIRED_GAS_STORAGE_READ_WRITE_TEST: u64 = 27150; +pub const REQUIRED_GAS_LIBRARY_CALL_TEST: u64 = REQUIRED_GAS_CALL_CONTRACT_TEST; diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/deploy.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/deploy.rs new file mode 100644 index 0000000000..8f4b9570dd --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/deploy.rs @@ -0,0 +1,172 @@ +use pretty_assertions::assert_eq; +use starknet_api::core::calculate_contract_address; +use starknet_api::transaction::{Calldata, ContractAddressSalt}; +use starknet_api::{calldata, felt}; +use test_case::test_case; + +use crate::abi::abi_utils::selector_from_name; +use crate::context::ChainInfo; +use crate::execution::call_info::{CallExecution, Retdata}; +use crate::execution::entry_point::CallEntryPoint; +use crate::execution::syscalls::syscall_tests::utils::assert_consistent_contract_version; +use crate::retdata; +use crate::state::state_api::StateReader; +use crate::test_utils::contracts::FeatureContract; +use crate::test_utils::initial_test_state::test_state; +use crate::test_utils::{calldata_for_deploy_test, trivial_external_entry_point_new, CairoVersion}; + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1);"VM")] +fn no_constructor(deployer_contract: FeatureContract) { + let empty_contract = FeatureContract::Empty(CairoVersion::Cairo1); + let class_hash = empty_contract.get_class_hash(); + + let mut state = test_state( + &ChainInfo::create_for_testing(), + 0, + &[(deployer_contract, 1), (empty_contract, 0)], + ); + + assert_consistent_contract_version(deployer_contract, &state); + assert_consistent_contract_version(empty_contract, &state); + + let calldata = calldata_for_deploy_test(class_hash, &[], true); + let entry_point_call = CallEntryPoint { + entry_point_selector: selector_from_name("test_deploy"), + calldata, + ..trivial_external_entry_point_new(deployer_contract) + }; + let deployed_contract_address = calculate_contract_address( + ContractAddressSalt::default(), + class_hash, + &calldata![], + deployer_contract.get_instance_address(0), + ) + .unwrap(); + + let deploy_call = &entry_point_call.execute_directly(&mut state).unwrap().inner_calls[0]; + + assert_eq!(deploy_call.call.storage_address, deployed_contract_address); + assert_eq!( + deploy_call.execution, + CallExecution { retdata: retdata![], gas_consumed: 0, ..CallExecution::default() } + ); + assert_eq!(state.get_class_hash_at(deployed_contract_address).unwrap(), class_hash); + + assert_consistent_contract_version(deployer_contract, &state); + assert_consistent_contract_version(empty_contract, &state); +} + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1);"VM")] +fn no_constructor_nonempty_calldata(deployer_contract: FeatureContract) { + let empty_contract = FeatureContract::Empty(CairoVersion::Cairo1); + let class_hash = empty_contract.get_class_hash(); + + let mut state = test_state( + &ChainInfo::create_for_testing(), + 0, + &[(deployer_contract, 1), (empty_contract, 0)], + ); + assert_consistent_contract_version(deployer_contract, &state); + assert_consistent_contract_version(empty_contract, &state); + + let calldata = calldata_for_deploy_test(class_hash, &[felt!(1_u8), felt!(1_u8)], true); + + let entry_point_call = CallEntryPoint { + entry_point_selector: selector_from_name("test_deploy"), + calldata, + ..trivial_external_entry_point_new(deployer_contract) + }; + + let error = entry_point_call.execute_directly(&mut state).unwrap_err().to_string(); + assert!(error.contains( + "Invalid input: constructor_calldata; Cannot pass calldata to a contract with no \ + constructor." + )); + + assert_consistent_contract_version(deployer_contract, &state); + assert_consistent_contract_version(empty_contract, &state); +} + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 10140;"VM")] +fn with_constructor(deployer_contract: FeatureContract, expected_gas: u64) { + let empty_contract = FeatureContract::Empty(CairoVersion::Cairo1); + let mut state = test_state( + &ChainInfo::create_for_testing(), + 0, + &[(deployer_contract, 1), (empty_contract, 0)], + ); + assert_consistent_contract_version(deployer_contract, &state); + assert_consistent_contract_version(empty_contract, &state); + + let class_hash = deployer_contract.get_class_hash(); + let constructor_calldata = vec![ + felt!(1_u8), // Calldata: address. + felt!(1_u8), // Calldata: value. + ]; + + let calldata = calldata_for_deploy_test(class_hash, &constructor_calldata, true); + + let entry_point_call = CallEntryPoint { + entry_point_selector: selector_from_name("test_deploy"), + calldata, + ..trivial_external_entry_point_new(deployer_contract) + }; + + // No errors expected. + let contract_address = calculate_contract_address( + ContractAddressSalt::default(), + class_hash, + &Calldata(constructor_calldata.clone().into()), + deployer_contract.get_instance_address(0), + ) + .unwrap(); + let deploy_call = &entry_point_call.execute_directly(&mut state).unwrap().inner_calls[0]; + + assert_eq!(deploy_call.call.storage_address, contract_address); + assert_eq!( + deploy_call.execution, + CallExecution { + retdata: retdata![constructor_calldata[0]], + gas_consumed: expected_gas, + ..CallExecution::default() + } + ); + assert_eq!(state.get_class_hash_at(contract_address).unwrap(), class_hash); + + assert_consistent_contract_version(deployer_contract, &state); + assert_consistent_contract_version(empty_contract, &state); +} + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1);"VM")] +fn to_unavailable_address(deployer_contract: FeatureContract) { + let empty_contract = FeatureContract::Empty(CairoVersion::Cairo1); + let mut state = test_state( + &ChainInfo::create_for_testing(), + 0, + &[(deployer_contract, 1), (empty_contract, 0)], + ); + assert_consistent_contract_version(deployer_contract, &state); + assert_consistent_contract_version(empty_contract, &state); + + let class_hash = deployer_contract.get_class_hash(); + let constructor_calldata = vec![ + felt!(1_u8), // Calldata: address. + felt!(1_u8), // Calldata: value. + ]; + + let calldata = calldata_for_deploy_test(class_hash, &constructor_calldata, true); + + let entry_point_call = CallEntryPoint { + entry_point_selector: selector_from_name("test_deploy"), + calldata, + ..trivial_external_entry_point_new(deployer_contract) + }; + + entry_point_call.clone().execute_directly(&mut state).unwrap(); + let error = entry_point_call.execute_directly(&mut state).unwrap_err().to_string(); + + assert!(error.contains("is unavailable for deployment.")); + + assert_consistent_contract_version(deployer_contract, &state); + assert_consistent_contract_version(empty_contract, &state); +} diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs new file mode 100644 index 0000000000..8c6a2679fc --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs @@ -0,0 +1,122 @@ +use itertools::concat; +use pretty_assertions::assert_eq; +use starknet_api::felt; +use starknet_api::transaction::{Calldata, EventContent, EventData, EventKey}; +use starknet_types_core::felt::Felt; +use test_case::test_case; + +use super::utils::assert_consistent_contract_version; +use crate::abi::abi_utils::selector_from_name; +use crate::context::ChainInfo; +use crate::execution::call_info::{CallExecution, CallInfo, OrderedEvent}; +use crate::execution::entry_point::CallEntryPoint; +use crate::execution::errors::EntryPointExecutionError; +use crate::execution::syscalls::hint_processor::EmitEventError; +use crate::test_utils::contracts::FeatureContract; +use crate::test_utils::initial_test_state::test_state; +use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE}; +use crate::versioned_constants::VersionedConstants; + +const KEYS: [Felt; 2] = [Felt::from_hex_unchecked("0x2019"), Felt::from_hex_unchecked("0x2020")]; +const DATA: [Felt; 3] = [ + Felt::from_hex_unchecked("0x2021"), + Felt::from_hex_unchecked("0x2022"), + Felt::from_hex_unchecked("0x2023"), +]; +const N_EMITTED_EVENTS: [Felt; 1] = [Felt::from_hex_unchecked("0x1")]; + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 49860; "VM")] +fn positive_flow(test_contract: FeatureContract, expected_gas: u64) { + // TODO(Ori, 1/2/2024): Write an indicative expect message explaining why the conversion + // works. + let call_info = emit_events(test_contract, &N_EMITTED_EVENTS, &KEYS, &DATA).unwrap(); + let event = EventContent { + keys: KEYS.into_iter().map(EventKey).collect(), + data: EventData(DATA.to_vec()), + }; + + assert_eq!( + call_info.execution, + CallExecution { + events: vec![OrderedEvent { order: 0, event }], + gas_consumed: expected_gas, + ..Default::default() + } + ); +} + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1); "VM")] +fn data_length_exceeds_limit(test_contract: FeatureContract) { + let versioned_constants = VersionedConstants::create_for_testing(); + + let max_event_data_length = versioned_constants.tx_event_limits.max_data_length; + let data_too_long = vec![felt!(2_u16); max_event_data_length + 1]; + let error = emit_events(test_contract, &N_EMITTED_EVENTS, &KEYS, &data_too_long).unwrap_err(); + let expected_error = EmitEventError::ExceedsMaxDataLength { + data_length: max_event_data_length + 1, + max_data_length: max_event_data_length, + }; + assert!(error.to_string().contains(&expected_error.to_string())); +} + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1); "VM")] +fn keys_length_exceeds_limit(test_contract: FeatureContract) { + let versioned_constants = VersionedConstants::create_for_testing(); + + let max_event_keys_length = versioned_constants.tx_event_limits.max_keys_length; + let keys_too_long = vec![felt!(1_u16); max_event_keys_length + 1]; + let error = emit_events(test_contract, &N_EMITTED_EVENTS, &keys_too_long, &DATA).unwrap_err(); + let expected_error = EmitEventError::ExceedsMaxKeysLength { + keys_length: max_event_keys_length + 1, + max_keys_length: max_event_keys_length, + }; + + assert!(error.to_string().contains(&expected_error.to_string())); +} + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1); "VM")] +fn event_number_exceeds_limit(test_contract: FeatureContract) { + let versioned_constants = VersionedConstants::create_for_testing(); + + let max_n_emitted_events = versioned_constants.tx_event_limits.max_n_emitted_events; + let n_emitted_events_too_big = vec![felt!( + u16::try_from(max_n_emitted_events + 1).expect("Failed to convert usize to u16.") + )]; + let error = emit_events(test_contract, &n_emitted_events_too_big, &KEYS, &DATA).unwrap_err(); + let expected_error = EmitEventError::ExceedsMaxNumberOfEmittedEvents { + n_emitted_events: max_n_emitted_events + 1, + max_n_emitted_events, + }; + assert!(error.to_string().contains(&expected_error.to_string())); +} + +fn emit_events( + test_contract: FeatureContract, + n_emitted_events: &[Felt], + keys: &[Felt], + data: &[Felt], +) -> Result { + let chain_info = &ChainInfo::create_for_testing(); + let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); + assert_consistent_contract_version(test_contract, &state); + let calldata = Calldata( + concat(vec![ + n_emitted_events.to_owned(), + vec![felt!(u16::try_from(keys.len()).expect("Failed to convert usize to u16."))], + keys.to_vec(), + vec![felt!(u16::try_from(data.len()).expect("Failed to convert usize to u16."))], + data.to_vec(), + ]) + .into(), + ); + + let entry_point_call = CallEntryPoint { + entry_point_selector: selector_from_name("test_emit_events"), + calldata, + ..trivial_external_entry_point_new(test_contract) + }; + + let result = entry_point_call.execute_directly(&mut state); + assert_consistent_contract_version(test_contract, &state); + result +} diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs new file mode 100644 index 0000000000..69cef2fdda --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs @@ -0,0 +1,105 @@ +use pretty_assertions::assert_eq; +use starknet_api::core::ContractAddress; +use starknet_api::state::StorageKey; +use starknet_api::transaction::Calldata; +use starknet_api::{calldata, felt}; +use starknet_types_core::felt::Felt; +use test_case::test_case; + +use super::utils::assert_consistent_contract_version; +use crate::abi::abi_utils::selector_from_name; +use crate::abi::constants; +use crate::context::ChainInfo; +use crate::execution::call_info::{CallExecution, Retdata}; +use crate::execution::entry_point::CallEntryPoint; +use crate::state::cached_state::CachedState; +use crate::state::state_api::State; +use crate::test_utils::contracts::FeatureContract; +use crate::test_utils::dict_state_reader::DictStateReader; +use crate::test_utils::initial_test_state::test_state; +use crate::test_utils::{ + trivial_external_entry_point_new, CairoVersion, BALANCE, CURRENT_BLOCK_NUMBER, +}; +use crate::{check_entry_point_execution_error_for_custom_hint, retdata}; + +fn initialize_state(test_contract: FeatureContract) -> (CachedState, Felt, Felt) { + let chain_info = &ChainInfo::create_for_testing(); + let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); + assert_consistent_contract_version(test_contract, &state); + + // Initialize block number -> block hash entry. + let upper_bound_block_number = CURRENT_BLOCK_NUMBER - constants::STORED_BLOCK_HASH_BUFFER; + let block_number = felt!(upper_bound_block_number); + let block_hash = felt!(66_u64); + let key = StorageKey::try_from(block_number).unwrap(); + let block_hash_contract_address = + ContractAddress::try_from(Felt::from(constants::BLOCK_HASH_CONTRACT_ADDRESS)).unwrap(); + state.set_storage_at(block_hash_contract_address, key, block_hash).unwrap(); + + (state, block_number, block_hash) +} + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 9680; "VM")] +fn positive_flow(test_contract: FeatureContract, expected_gas: u64) { + let (mut state, block_number, block_hash) = initialize_state(test_contract); + + let calldata = calldata![block_number]; + let entry_point_call = CallEntryPoint { + entry_point_selector: selector_from_name("test_get_block_hash"), + calldata, + ..trivial_external_entry_point_new(test_contract) + }; + + assert_eq!( + entry_point_call.clone().execute_directly(&mut state).unwrap().execution, + CallExecution { + gas_consumed: expected_gas, + ..CallExecution::from_retdata(retdata![block_hash]) + } + ); + + assert_consistent_contract_version(test_contract, &state); +} + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1); "VM")] +fn negative_flow_execution_mode_validate(test_contract: FeatureContract) { + let (mut state, block_number, _) = initialize_state(test_contract); + + let calldata = calldata![block_number]; + let entry_point_call = CallEntryPoint { + entry_point_selector: selector_from_name("test_get_block_hash"), + calldata, + ..trivial_external_entry_point_new(test_contract) + }; + + let error = entry_point_call.execute_directly_in_validate_mode(&mut state).unwrap_err(); + + check_entry_point_execution_error_for_custom_hint!( + &error, + "Unauthorized syscall get_block_hash in execution mode Validate.", + ); + + assert!(error + .to_string() + .contains("Unauthorized syscall get_block_hash in execution mode Validate")); + + assert_consistent_contract_version(test_contract, &state); +} + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1); "VM")] +fn negative_flow_block_number_out_of_range(test_contract: FeatureContract) { + let (mut state, _, _) = initialize_state(test_contract); + + let requested_block_number = CURRENT_BLOCK_NUMBER - constants::STORED_BLOCK_HASH_BUFFER + 1; + let block_number = felt!(requested_block_number); + let calldata = calldata![block_number]; + let entry_point_call = CallEntryPoint { + entry_point_selector: selector_from_name("test_get_block_hash"), + calldata, + ..trivial_external_entry_point_new(test_contract) + }; + + let error = entry_point_call.execute_directly(&mut state).unwrap_err().to_string(); + assert!(error.contains("Block number out of range")); + assert_consistent_contract_version(test_contract, &state); +} diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/get_execution_info.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/get_execution_info.rs new file mode 100644 index 0000000000..43570183df --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/get_execution_info.rs @@ -0,0 +1,257 @@ +use std::collections::BTreeMap; + +use cairo_vm::Felt252; +use num_traits::Pow; +use starknet_api::core::ChainId; +use starknet_api::data_availability::DataAvailabilityMode; +use starknet_api::felt; +use starknet_api::transaction::{ + AccountDeploymentData, Calldata, Fee, PaymasterData, Resource, ResourceBounds, + ResourceBoundsMapping, Tip, TransactionHash, TransactionVersion, +}; +use starknet_types_core::felt::Felt; +use test_case::test_case; + +use crate::abi::abi_utils::selector_from_name; +use crate::context::ChainInfo; +use crate::execution::common_hints::ExecutionMode; +use crate::execution::entry_point::CallEntryPoint; +use crate::execution::syscalls::hint_processor::{L1_GAS, L2_GAS}; +use crate::execution::syscalls::syscall_tests::utils::assert_consistent_contract_version; +use crate::nonce; +use crate::test_utils::contracts::FeatureContract; +use crate::test_utils::initial_test_state::test_state; +use crate::test_utils::{ + trivial_external_entry_point_with_address, CairoVersion, BALANCE, CHAIN_ID_NAME, + CURRENT_BLOCK_NUMBER, CURRENT_BLOCK_NUMBER_FOR_VALIDATE, CURRENT_BLOCK_TIMESTAMP, + CURRENT_BLOCK_TIMESTAMP_FOR_VALIDATE, TEST_SEQUENCER_ADDRESS, +}; +use crate::transaction::constants::QUERY_VERSION_BASE_BIT; +use crate::transaction::objects::{ + CommonAccountFields, CurrentTransactionInfo, DeprecatedTransactionInfo, TransactionInfo, +}; + +#[test_case( + FeatureContract::TestContract(CairoVersion::Cairo1), + ExecutionMode::Validate, + TransactionVersion::ONE, + false; + "Validate execution mode: block info fields should be zeroed. Transaction V1.")] +#[test_case( + FeatureContract::TestContract(CairoVersion::Cairo1), + ExecutionMode::Execute, + TransactionVersion::ONE, + false; + "Execute execution mode: block info should be as usual. Transaction V1.")] +#[test_case( + FeatureContract::TestContract(CairoVersion::Cairo1), + ExecutionMode::Validate, + TransactionVersion::THREE, + false; + "Validate execution mode: block info fields should be zeroed. Transaction V3.")] +#[test_case( + FeatureContract::TestContract(CairoVersion::Cairo1), + ExecutionMode::Execute, + TransactionVersion::THREE, + false; + "Execute execution mode: block info should be as usual. Transaction V3.")] +#[test_case( + FeatureContract::LegacyTestContract, + ExecutionMode::Execute, + TransactionVersion::ONE, + false; + "Legacy contract. Execute execution mode: block info should be as usual. Transaction V1.")] +#[test_case( + FeatureContract::LegacyTestContract, + ExecutionMode::Execute, + TransactionVersion::THREE, + false; + "Legacy contract. Execute execution mode: block info should be as usual. Transaction V3.")] +#[test_case( + FeatureContract::TestContract(CairoVersion::Cairo1), + ExecutionMode::Execute, + TransactionVersion::THREE, + true; + "Execute execution mode: block info should be as usual. Transaction V3. Query.")] +fn test_get_execution_info( + test_contract: FeatureContract, + execution_mode: ExecutionMode, + mut version: TransactionVersion, + only_query: bool, +) { + let state = &mut test_state(&ChainInfo::create_for_testing(), BALANCE, &[(test_contract, 1)]); + assert_consistent_contract_version(test_contract, state); + let expected_block_info = match execution_mode { + ExecutionMode::Validate => [ + // Rounded block number. + felt!(CURRENT_BLOCK_NUMBER_FOR_VALIDATE), + // Rounded timestamp. + felt!(CURRENT_BLOCK_TIMESTAMP_FOR_VALIDATE), + Felt::ZERO, + ], + ExecutionMode::Execute => [ + felt!(CURRENT_BLOCK_NUMBER), // Block number. + felt!(CURRENT_BLOCK_TIMESTAMP), // Block timestamp. + Felt::from_hex(TEST_SEQUENCER_ADDRESS).unwrap(), + ], + }; + + let test_contract_address = test_contract.get_instance_address(0); + + let expected_unsupported_fields = match test_contract { + FeatureContract::LegacyTestContract => { + // Read and parse file content. + let raw_contract: serde_json::Value = + serde_json::from_str(&test_contract.get_raw_class()).expect("Error parsing JSON"); + // Verify version. + if let Some(compiler_version) = raw_contract["compiler_version"].as_str() { + assert_eq!(compiler_version, "2.1.0"); + } else { + panic!("'compiler_version' not found or not a valid string in JSON."); + }; + vec![] + } + _ => { + vec![ + Felt::ZERO, // Tip. + Felt::ZERO, // Paymaster data. + Felt::ZERO, // Nonce DA. + Felt::ZERO, // Fee DA. + Felt::ZERO, // Account data. + ] + } + }; + + if only_query { + let simulate_version_base = Pow::pow(Felt252::from(2_u8), QUERY_VERSION_BASE_BIT); + let query_version = simulate_version_base + version.0; + version = TransactionVersion(query_version); + } + + let tx_hash = TransactionHash(felt!(1991_u16)); + let max_fee = Fee(42); + let nonce = nonce!(3_u16); + let sender_address = test_contract_address; + + let max_amount = Fee(13); + let max_price_per_unit = Fee(61); + + let expected_resource_bounds: Vec = match (test_contract, version) { + (FeatureContract::LegacyTestContract, _) => vec![], + (_, version) if version == TransactionVersion(Felt::from_hex("0x1").unwrap()) => vec![ + felt!(0_u16), // Length of resource bounds array. + ], + (_, _) => vec![ + Felt::from(2u32), // Length of ResourceBounds array. + felt!(L1_GAS), // Resource. + felt!(max_amount.0), // Max amount. + felt!(max_price_per_unit.0), // Max price per unit. + felt!(L2_GAS), // Resource. + Felt::ZERO, // Max amount. + Felt::ZERO, // Max price per unit. + ], + }; + + let expected_tx_info: Vec; + let tx_info: TransactionInfo; + if version == TransactionVersion(Felt::from_hex("0x1").unwrap()) { + expected_tx_info = vec![ + version.0, /* Transaction + * version. */ + *sender_address.0.key(), // Account address. + felt!(max_fee.0), // Max fee. + Felt::ZERO, // Signature. + tx_hash.0, // Transaction hash. + felt!(&*ChainId::Other(CHAIN_ID_NAME.to_string()).as_hex()), // Chain ID. + nonce.0, // Nonce. + ]; + + tx_info = TransactionInfo::Deprecated(DeprecatedTransactionInfo { + common_fields: CommonAccountFields { + transaction_hash: tx_hash, + version: TransactionVersion::ONE, + nonce, + sender_address, + only_query, + ..Default::default() + }, + max_fee, + }); + } else { + expected_tx_info = vec![ + version.0, /* Transaction + * version. */ + *sender_address.0.key(), // Account address. + Felt::ZERO, // Max fee. + Felt::ZERO, // Signature. + tx_hash.0, // Transaction hash. + felt!(&*ChainId::Other(CHAIN_ID_NAME.to_string()).as_hex()), // Chain ID. + nonce.0, // Nonce. + ]; + + tx_info = TransactionInfo::Current(CurrentTransactionInfo { + common_fields: CommonAccountFields { + transaction_hash: tx_hash, + version: TransactionVersion::THREE, + nonce, + sender_address, + only_query, + ..Default::default() + }, + resource_bounds: ResourceBoundsMapping(BTreeMap::from([ + ( + Resource::L1Gas, + // TODO(Ori, 1/2/2024): Write an indicative expect message explaining why + // the convertion works. + ResourceBounds { + max_amount: max_amount + .0 + .try_into() + .expect("Failed to convert u128 to u64."), + max_price_per_unit: max_price_per_unit.0, + }, + ), + (Resource::L2Gas, ResourceBounds { max_amount: 0, max_price_per_unit: 0 }), + ])), + tip: Tip::default(), + nonce_data_availability_mode: DataAvailabilityMode::L1, + fee_data_availability_mode: DataAvailabilityMode::L1, + paymaster_data: PaymasterData::default(), + account_deployment_data: AccountDeploymentData::default(), + }); + } + + let entry_point_selector = selector_from_name("test_get_execution_info"); + let expected_call_info = vec![ + felt!(0_u16), // Caller address. + *test_contract_address.0.key(), // Storage address. + entry_point_selector.0, // Entry point selector. + ]; + let entry_point_call = CallEntryPoint { + entry_point_selector, + code_address: None, + calldata: Calldata( + [ + expected_block_info.to_vec(), + expected_tx_info, + expected_resource_bounds.into_iter().chain(expected_unsupported_fields).collect(), + expected_call_info, + ] + .concat() + .into(), + ), + ..trivial_external_entry_point_with_address(test_contract_address) + }; + + let result = match execution_mode { + ExecutionMode::Validate => { + entry_point_call.execute_directly_given_tx_info_in_validate_mode(state, tx_info, false) + } + ExecutionMode::Execute => { + entry_point_call.execute_directly_given_tx_info(state, tx_info, false) + } + }; + + assert!(!result.unwrap().execution.failed); + assert_consistent_contract_version(test_contract, state); +} diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/keccak.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/keccak.rs new file mode 100644 index 0000000000..db7cfdc33b --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/keccak.rs @@ -0,0 +1,29 @@ +use starknet_api::transaction::Calldata; +use test_case::test_case; + +use crate::abi::abi_utils::selector_from_name; +use crate::context::ChainInfo; +use crate::execution::call_info::{CallExecution, Retdata}; +use crate::execution::entry_point::CallEntryPoint; +use crate::retdata; +use crate::test_utils::contracts::FeatureContract; +use crate::test_utils::initial_test_state::test_state; +use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE}; + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 256250; "VM")] +fn test_keccak(test_contract: FeatureContract, expected_gas: u64) { + let chain_info = &ChainInfo::create_for_testing(); + let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); + + let calldata = Calldata(vec![].into()); + let entry_point_call = CallEntryPoint { + entry_point_selector: selector_from_name("test_keccak"), + calldata, + ..trivial_external_entry_point_new(test_contract) + }; + + assert_eq!( + entry_point_call.execute_directly(&mut state).unwrap().execution, + CallExecution { gas_consumed: expected_gas, ..CallExecution::from_retdata(retdata![]) } + ); +} diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs new file mode 100644 index 0000000000..63574545f0 --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs @@ -0,0 +1,204 @@ +use std::collections::{HashMap, HashSet}; + +use cairo_vm::types::builtin_name::BuiltinName; +use cairo_vm::vm::runners::cairo_runner::ExecutionResources; +use pretty_assertions::assert_eq; +use starknet_api::core::PatriciaKey; +use starknet_api::state::StorageKey; +use starknet_api::transaction::Calldata; +use starknet_api::{calldata, felt, patricia_key}; +use test_case::test_case; + +use crate::abi::abi_utils::selector_from_name; +use crate::context::ChainInfo; +use crate::execution::call_info::{CallExecution, CallInfo, Retdata}; +use crate::execution::entry_point::{CallEntryPoint, CallType}; +use crate::execution::syscalls::syscall_tests::consts::{ + REQUIRED_GAS_LIBRARY_CALL_TEST, REQUIRED_GAS_STORAGE_READ_WRITE_TEST, +}; +use crate::execution::syscalls::SyscallSelector; +use crate::retdata; +use crate::test_utils::contracts::FeatureContract; +use crate::test_utils::initial_test_state::test_state; +use crate::test_utils::{ + get_syscall_resources, trivial_external_entry_point_new, CairoVersion, BALANCE, +}; + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), REQUIRED_GAS_LIBRARY_CALL_TEST; "VM")] +fn test_library_call(test_contract: FeatureContract, expected_gas: u64) { + let chain_info = &ChainInfo::create_for_testing(); + let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); + + let inner_entry_point_selector = selector_from_name("test_storage_read_write"); + let calldata = calldata![ + test_contract.get_class_hash().0, // Class hash. + inner_entry_point_selector.0, // Function selector. + felt!(2_u8), // Calldata length. + felt!(1234_u16), // Calldata: address. + felt!(91_u8) // Calldata: value. + ]; + + let entry_point_call = CallEntryPoint { + entry_point_selector: selector_from_name("test_library_call"), + calldata, + class_hash: Some(test_contract.get_class_hash()), + ..trivial_external_entry_point_new(test_contract) + }; + + assert_eq!( + entry_point_call.execute_directly(&mut state).unwrap().execution, + CallExecution { + retdata: retdata![felt!(91_u16)], + gas_consumed: expected_gas, + ..Default::default() + } + ); +} + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1); "VM")] +fn test_library_call_assert_fails(test_contract: FeatureContract) { + let chain_info = &ChainInfo::create_for_testing(); + let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); + let inner_entry_point_selector = selector_from_name("assert_eq"); + let calldata = calldata![ + test_contract.get_class_hash().0, // Class hash. + inner_entry_point_selector.0, // Function selector. + felt!(2_u8), // Calldata length. + felt!(0_u8), // Calldata: first assert value. + felt!(1_u8) // Calldata: second assert value. + ]; + let entry_point_call = CallEntryPoint { + entry_point_selector: selector_from_name("test_library_call"), + calldata, + class_hash: Some(test_contract.get_class_hash()), + ..trivial_external_entry_point_new(test_contract) + }; + + let err = entry_point_call.execute_directly(&mut state).unwrap_err(); + assert!(err.to_string().contains("x != y")); +} + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 276880; "VM")] +fn test_nested_library_call(test_contract: FeatureContract, expected_gas: u64) { + let chain_info = &ChainInfo::create_for_testing(); + let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); + + let (key, value) = (255_u64, 44_u64); + let outer_entry_point_selector = selector_from_name("test_library_call"); + let inner_entry_point_selector = selector_from_name("test_storage_read_write"); + let test_class_hash = test_contract.get_class_hash(); + let main_entry_point_calldata = calldata![ + test_class_hash.0, // Class hash. + outer_entry_point_selector.0, // Library call function selector. + inner_entry_point_selector.0, // Storage function selector. + felt!(key), // Calldata: address. + felt!(value) // Calldata: value. + ]; + + // Create expected call info tree. + let main_entry_point = CallEntryPoint { + entry_point_selector: selector_from_name("test_nested_library_call"), + calldata: main_entry_point_calldata, + class_hash: Some(test_class_hash), + initial_gas: 9999906600, + ..trivial_external_entry_point_new(test_contract) + }; + let nested_storage_entry_point = CallEntryPoint { + entry_point_selector: inner_entry_point_selector, + calldata: calldata![felt!(key + 1), felt!(value + 1)], + class_hash: Some(test_class_hash), + code_address: None, + call_type: CallType::Delegate, + initial_gas: 9999745020, + ..trivial_external_entry_point_new(test_contract) + }; + let library_entry_point = CallEntryPoint { + entry_point_selector: outer_entry_point_selector, + calldata: calldata![ + test_class_hash.0, // Class hash. + inner_entry_point_selector.0, // Storage function selector. + felt!(2_u8), // Calldata: address. + felt!(key + 1), // Calldata: address. + felt!(value + 1) // Calldata: value. + ], + class_hash: Some(test_class_hash), + code_address: None, + call_type: CallType::Delegate, + initial_gas: 9999823550, + ..trivial_external_entry_point_new(test_contract) + }; + let storage_entry_point = CallEntryPoint { + calldata: calldata![felt!(key), felt!(value)], + initial_gas: 9999656870, + ..nested_storage_entry_point + }; + + let storage_entry_point_resources = ExecutionResources { + n_steps: 243, + n_memory_holes: 0, + builtin_instance_counter: HashMap::from([(BuiltinName::range_check, 7)]), + }; + let nested_storage_call_info = CallInfo { + call: nested_storage_entry_point, + execution: CallExecution { + retdata: retdata![felt!(value + 1)], + gas_consumed: REQUIRED_GAS_STORAGE_READ_WRITE_TEST, + ..CallExecution::default() + }, + resources: storage_entry_point_resources.clone(), + storage_read_values: vec![felt!(value + 1)], + accessed_storage_keys: HashSet::from([StorageKey(patricia_key!(key + 1))]), + ..Default::default() + }; + + let library_call_resources = &get_syscall_resources(SyscallSelector::LibraryCall) + + &ExecutionResources { + n_steps: 388, + n_memory_holes: 0, + builtin_instance_counter: HashMap::from([(BuiltinName::range_check, 15)]), + }; + let library_call_info = CallInfo { + call: library_entry_point, + execution: CallExecution { + retdata: retdata![felt!(value + 1)], + gas_consumed: REQUIRED_GAS_LIBRARY_CALL_TEST, + ..CallExecution::default() + }, + resources: library_call_resources, + inner_calls: vec![nested_storage_call_info], + ..Default::default() + }; + + let storage_call_info = CallInfo { + call: storage_entry_point, + execution: CallExecution { + retdata: retdata![felt!(value)], + gas_consumed: REQUIRED_GAS_STORAGE_READ_WRITE_TEST, + ..CallExecution::default() + }, + resources: storage_entry_point_resources, + storage_read_values: vec![felt!(value)], + accessed_storage_keys: HashSet::from([StorageKey(patricia_key!(key))]), + ..Default::default() + }; + + let main_call_resources = &(&get_syscall_resources(SyscallSelector::LibraryCall) * 3) + + &ExecutionResources { + n_steps: 749, + n_memory_holes: 2, + builtin_instance_counter: HashMap::from([(BuiltinName::range_check, 27)]), + }; + let expected_call_info = CallInfo { + call: main_entry_point.clone(), + execution: CallExecution { + retdata: retdata![felt!(value)], + gas_consumed: expected_gas, + ..CallExecution::default() + }, + resources: main_call_resources, + inner_calls: vec![library_call_info, storage_call_info], + ..Default::default() + }; + + assert_eq!(main_entry_point.execute_directly(&mut state).unwrap(), expected_call_info); +} diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/mod.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/mod.rs new file mode 100644 index 0000000000..0e39a50057 --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/mod.rs @@ -0,0 +1,15 @@ +mod call_contract; +mod consts; +mod deploy; +mod emit_event; +mod get_block_hash; +mod get_execution_info; +mod keccak; +mod library_call; +mod out_of_gas; +mod replace_class; +mod secp; +mod send_message_to_l1; +mod sha256; +mod storage_read_write; +mod utils; diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs new file mode 100644 index 0000000000..1ac010fc06 --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs @@ -0,0 +1,29 @@ +use starknet_api::transaction::Calldata; +use starknet_api::{calldata, felt}; +use test_case::test_case; + +use crate::abi::abi_utils::selector_from_name; +use crate::context::ChainInfo; +use crate::execution::entry_point::CallEntryPoint; +use crate::execution::syscalls::syscall_tests::consts::REQUIRED_GAS_STORAGE_READ_WRITE_TEST; +use crate::test_utils::contracts::FeatureContract; +use crate::test_utils::initial_test_state::test_state; +use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE}; + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1); "VM")] +fn test_out_of_gas(test_contract: FeatureContract) { + let chain_info = &ChainInfo::create_for_testing(); + let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); + + let key = felt!(1234_u16); + let value = felt!(18_u8); + let calldata = calldata![key, value]; + let entry_point_call = CallEntryPoint { + calldata, + entry_point_selector: selector_from_name("test_storage_read_write"), + initial_gas: REQUIRED_GAS_STORAGE_READ_WRITE_TEST - 1, + ..trivial_external_entry_point_new(test_contract) + }; + let error = entry_point_call.execute_directly(&mut state).unwrap_err().to_string(); + assert!(error.contains("Out of gas")); +} diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/replace_class.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/replace_class.rs new file mode 100644 index 0000000000..31f689695f --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/replace_class.rs @@ -0,0 +1,72 @@ +use starknet_api::transaction::Calldata; +use starknet_api::{calldata, felt}; +use test_case::test_case; + +use crate::abi::abi_utils::selector_from_name; +use crate::context::ChainInfo; +use crate::execution::call_info::CallExecution; +use crate::execution::entry_point::CallEntryPoint; +use crate::state::state_api::StateReader; +use crate::test_utils::contracts::FeatureContract; +use crate::test_utils::initial_test_state::test_state; +use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE}; + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1); "VM")] +fn undeclared_class_hash(test_contract: FeatureContract) { + let mut state = test_state(&ChainInfo::create_for_testing(), BALANCE, &[(test_contract, 1)]); + + let entry_point_call = CallEntryPoint { + calldata: calldata![felt!(1234_u16)], + entry_point_selector: selector_from_name("test_replace_class"), + ..trivial_external_entry_point_new(test_contract) + }; + let error = entry_point_call.execute_directly(&mut state).unwrap_err().to_string(); + assert!(error.contains("is not declared")); +} + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1); "VM")] +fn cairo0_class_hash(test_contract: FeatureContract) { + let empty_contract_cairo0 = FeatureContract::Empty(CairoVersion::Cairo0); + let mut state = test_state( + &ChainInfo::create_for_testing(), + BALANCE, + &[(test_contract, 1), (empty_contract_cairo0, 0)], + ); + + // Replace with Cairo 0 class hash. + let v0_class_hash = empty_contract_cairo0.get_class_hash(); + + let entry_point_call = CallEntryPoint { + calldata: calldata![v0_class_hash.0], + entry_point_selector: selector_from_name("test_replace_class"), + ..trivial_external_entry_point_new(test_contract) + }; + let error = entry_point_call.execute_directly(&mut state).unwrap_err().to_string(); + assert!(error.contains("Cannot replace V1 class hash with V0 class hash")); +} + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 9750; "VM")] +fn positive_flow(test_contract: FeatureContract, gas_consumed: u64) { + let empty_contract = FeatureContract::Empty(CairoVersion::Cairo1); + let empty_contract_cairo0 = FeatureContract::Empty(CairoVersion::Cairo0); + let mut state = test_state( + &ChainInfo::create_for_testing(), + BALANCE, + &[(test_contract, 1), (empty_contract, 0), (empty_contract_cairo0, 0)], + ); + let contract_address = test_contract.get_instance_address(0); + + let old_class_hash = test_contract.get_class_hash(); + let new_class_hash = empty_contract.get_class_hash(); + assert_eq!(state.get_class_hash_at(contract_address).unwrap(), old_class_hash); + let entry_point_call = CallEntryPoint { + calldata: calldata![new_class_hash.0], + entry_point_selector: selector_from_name("test_replace_class"), + ..trivial_external_entry_point_new(test_contract) + }; + assert_eq!( + entry_point_call.execute_directly(&mut state).unwrap().execution, + CallExecution { gas_consumed, ..Default::default() } + ); + assert_eq!(state.get_class_hash_at(contract_address).unwrap(), new_class_hash); +} diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/secp.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/secp.rs new file mode 100644 index 0000000000..0066067c13 --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/secp.rs @@ -0,0 +1,46 @@ +use starknet_api::transaction::Calldata; +use test_case::test_case; + +use crate::abi::abi_utils::selector_from_name; +use crate::context::ChainInfo; +use crate::execution::call_info::CallExecution; +use crate::execution::entry_point::CallEntryPoint; +use crate::test_utils::contracts::FeatureContract; +use crate::test_utils::initial_test_state::test_state; +use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE}; + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 17033810; "VM")] +fn test_secp256k1(test_contract: FeatureContract, expected_gas: u64) { + let chain_info = &ChainInfo::create_for_testing(); + let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); + + let calldata = Calldata(vec![].into()); + let entry_point_call = CallEntryPoint { + entry_point_selector: selector_from_name("test_secp256k1"), + calldata, + ..trivial_external_entry_point_new(test_contract) + }; + + pretty_assertions::assert_eq!( + entry_point_call.execute_directly(&mut state).unwrap().execution, + CallExecution { gas_consumed: expected_gas, ..Default::default() } + ); +} + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 27582260; "VM")] +fn test_secp256r1(test_contract: FeatureContract, expected_gas: u64) { + let chain_info = &ChainInfo::create_for_testing(); + let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); + + let calldata = Calldata(vec![].into()); + let entry_point_call = CallEntryPoint { + entry_point_selector: selector_from_name("test_secp256r1"), + calldata, + ..trivial_external_entry_point_new(test_contract) + }; + + pretty_assertions::assert_eq!( + entry_point_call.execute_directly(&mut state).unwrap().execution, + CallExecution { gas_consumed: expected_gas, ..Default::default() } + ); +} diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/send_message_to_l1.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/send_message_to_l1.rs new file mode 100644 index 0000000000..64cde18bc7 --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/send_message_to_l1.rs @@ -0,0 +1,51 @@ +use itertools::concat; +use starknet_api::core::EthAddress; +use starknet_api::felt; +use starknet_api::transaction::{Calldata, L2ToL1Payload}; +use test_case::test_case; + +use crate::abi::abi_utils::selector_from_name; +use crate::context::ChainInfo; +use crate::execution::call_info::{CallExecution, MessageToL1, OrderedL2ToL1Message}; +use crate::execution::entry_point::CallEntryPoint; +use crate::test_utils::contracts::FeatureContract; +use crate::test_utils::initial_test_state::test_state; +use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE}; + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 22990; "VM")] +fn test_send_message_to_l1(test_contract: FeatureContract, expected_gas: u64) { + let chain_info = &ChainInfo::create_for_testing(); + let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); + + let to_address = felt!(1234_u16); + let payload = vec![felt!(2019_u16), felt!(2020_u16), felt!(2021_u16)]; + let calldata = Calldata( + concat(vec![ + vec![ + to_address, + // TODO(Ori, 1/2/2024): Write an indicative expect message explaining why the + // convertion works. + felt!(u64::try_from(payload.len()).expect("Failed to convert usize to u64.")), + ], + payload.clone(), + ]) + .into(), + ); + let entry_point_call = CallEntryPoint { + entry_point_selector: selector_from_name("test_send_message_to_l1"), + calldata, + ..trivial_external_entry_point_new(test_contract) + }; + + let to_address = EthAddress::try_from(to_address).unwrap(); + let message = MessageToL1 { to_address, payload: L2ToL1Payload(payload) }; + + pretty_assertions::assert_eq!( + entry_point_call.execute_directly(&mut state).unwrap().execution, + CallExecution { + l2_to_l1_messages: vec![OrderedL2ToL1Message { order: 0, message }], + gas_consumed: expected_gas, + ..Default::default() + } + ); +} diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/sha256.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/sha256.rs new file mode 100644 index 0000000000..2f239c49c0 --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/sha256.rs @@ -0,0 +1,29 @@ +use starknet_api::transaction::Calldata; +use test_case::test_case; + +use crate::abi::abi_utils::selector_from_name; +use crate::context::ChainInfo; +use crate::execution::call_info::{CallExecution, Retdata}; +use crate::execution::entry_point::CallEntryPoint; +use crate::retdata; +use crate::test_utils::contracts::FeatureContract; +use crate::test_utils::initial_test_state::test_state; +use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE}; + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 892990; "VM")] +fn test_sha256(test_contract: FeatureContract, gas_consumed: u64) { + let chain_info = &ChainInfo::create_for_testing(); + let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); + + let calldata = Calldata(vec![].into()); + let entry_point_call = CallEntryPoint { + entry_point_selector: selector_from_name("test_sha256"), + calldata, + ..trivial_external_entry_point_new(test_contract) + }; + + assert_eq!( + entry_point_call.execute_directly(&mut state).unwrap().execution, + CallExecution { gas_consumed, ..CallExecution::from_retdata(retdata![]) } + ); +} diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs new file mode 100644 index 0000000000..36fb0df04f --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs @@ -0,0 +1,50 @@ +use starknet_api::state::StorageKey; +use starknet_api::transaction::Calldata; +use starknet_api::{calldata, felt}; +use test_case::test_case; + +use crate::abi::abi_utils::selector_from_name; +use crate::context::ChainInfo; +use crate::execution::call_info::{CallExecution, Retdata}; +use crate::execution::entry_point::CallEntryPoint; +use crate::execution::syscalls::syscall_tests::consts::REQUIRED_GAS_STORAGE_READ_WRITE_TEST; +use crate::execution::syscalls::syscall_tests::utils::assert_consistent_contract_version; +use crate::retdata; +use crate::state::state_api::StateReader; +use crate::test_utils::contracts::FeatureContract; +use crate::test_utils::initial_test_state::test_state; +use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE}; + +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), REQUIRED_GAS_STORAGE_READ_WRITE_TEST; "VM")] +fn test_storage_read_write(test_contract: FeatureContract, expected_gas: u64) { + let chain_info = &ChainInfo::create_for_testing(); + let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); + + assert_consistent_contract_version(test_contract, &state); + + let key = felt!(1234_u16); + let value = felt!(18_u8); + let calldata = calldata![key, value]; + let entry_point_call = CallEntryPoint { + calldata, + entry_point_selector: selector_from_name("test_storage_read_write"), + ..trivial_external_entry_point_new(test_contract) + }; + let storage_address = entry_point_call.storage_address; + assert_eq!( + entry_point_call.execute_directly(&mut state).unwrap().execution, + CallExecution { + retdata: retdata![value], + gas_consumed: expected_gas, + ..CallExecution::default() + } + ); + + // Verify that the state has changed. + let value_from_state = + state.get_storage_at(storage_address, StorageKey::try_from(key).unwrap()).unwrap(); + assert_eq!(value_from_state, value); + + // ensure that the fallback system didn't replace the contract + assert_consistent_contract_version(test_contract, &state); +} diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/utils.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/utils.rs new file mode 100644 index 0000000000..ef61800b0c --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/utils.rs @@ -0,0 +1,27 @@ +use assert_matches::assert_matches; + +use crate::execution::contract_class::ContractClass; +use crate::state::state_api::State; +use crate::test_utils::contracts::FeatureContract; + +pub fn assert_consistent_contract_version(contract: FeatureContract, state: &dyn State) { + let hash = contract.get_class_hash(); + match contract { + FeatureContract::SecurityTests + | FeatureContract::ERC20(_) + | FeatureContract::LegacyTestContract + | FeatureContract::AccountWithLongValidate(_) + | FeatureContract::AccountWithoutValidations(_) + | FeatureContract::Empty(_) + | FeatureContract::FaultyAccount(_) + | FeatureContract::TestContract(_) => { + // Assert contract uses VM + assert_matches!( + state + .get_compiled_contract_class(hash) + .unwrap_or_else(|_| panic!("Expected contract class at {hash}")), + ContractClass::V1(_) | ContractClass::V0(_) + ) + } + } +} diff --git a/crates/blockifier/src/execution/syscalls/syscalls_test.rs b/crates/blockifier/src/execution/syscalls/syscalls_test.rs deleted file mode 100644 index a5cb569630..0000000000 --- a/crates/blockifier/src/execution/syscalls/syscalls_test.rs +++ /dev/null @@ -1,986 +0,0 @@ -use std::collections::{BTreeMap, HashMap, HashSet}; - -use assert_matches::assert_matches; -use cairo_lang_utils::byte_array::BYTE_ARRAY_MAGIC; -use cairo_vm::types::builtin_name::BuiltinName; -use cairo_vm::vm::runners::cairo_runner::ExecutionResources; -use num_traits::Pow; -use pretty_assertions::assert_eq; -use rstest::rstest; -use starknet_api::core::{ - calculate_contract_address, - ChainId, - ContractAddress, - EthAddress, - PatriciaKey, -}; -use starknet_api::data_availability::DataAvailabilityMode; -use starknet_api::state::StorageKey; -use starknet_api::transaction::{ - AccountDeploymentData, - Calldata, - ContractAddressSalt, - EventContent, - EventData, - EventKey, - Fee, - L2ToL1Payload, - PaymasterData, - Resource, - ResourceBounds, - ResourceBoundsMapping, - Tip, - TransactionHash, - TransactionVersion, -}; -use starknet_api::{calldata, felt}; -use starknet_types_core::felt::Felt; -use test_case::test_case; - -use crate::abi::abi_utils::selector_from_name; -use crate::abi::constants; -use crate::context::ChainInfo; -use crate::execution::call_info::{ - CallExecution, - CallInfo, - MessageToL1, - OrderedEvent, - OrderedL2ToL1Message, - Retdata, -}; -use crate::execution::common_hints::ExecutionMode; -use crate::execution::entry_point::{CallEntryPoint, CallType}; -use crate::execution::errors::EntryPointExecutionError; -use crate::execution::syscalls::hint_processor::{ - EmitEventError, - BLOCK_NUMBER_OUT_OF_RANGE_ERROR, - L1_GAS, - L2_GAS, - OUT_OF_GAS_ERROR, -}; -use crate::execution::syscalls::SyscallSelector; -use crate::state::state_api::{State, StateReader}; -use crate::test_utils::contracts::FeatureContract; -use crate::test_utils::initial_test_state::test_state; -use crate::test_utils::{ - calldata_for_deploy_test, - create_calldata, - get_syscall_resources, - trivial_external_entry_point_new, - trivial_external_entry_point_with_address, - CairoVersion, - BALANCE, - CHAIN_ID_NAME, - CURRENT_BLOCK_NUMBER, - CURRENT_BLOCK_NUMBER_FOR_VALIDATE, - CURRENT_BLOCK_TIMESTAMP, - CURRENT_BLOCK_TIMESTAMP_FOR_VALIDATE, - TEST_SEQUENCER_ADDRESS, -}; -use crate::transaction::constants::QUERY_VERSION_BASE_BIT; -use crate::transaction::objects::{ - CommonAccountFields, - CurrentTransactionInfo, - DeprecatedTransactionInfo, - TransactionInfo, -}; -use crate::versioned_constants::VersionedConstants; -use crate::{check_entry_point_execution_error_for_custom_hint, nonce, retdata, storage_key}; -pub const REQUIRED_GAS_STORAGE_READ_WRITE_TEST: u64 = 27150; -pub const REQUIRED_GAS_CALL_CONTRACT_TEST: u64 = 105680; -pub const REQUIRED_GAS_LIBRARY_CALL_TEST: u64 = REQUIRED_GAS_CALL_CONTRACT_TEST; - -#[test] -fn test_storage_read_write() { - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let chain_info = &ChainInfo::create_for_testing(); - let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - - let key = felt!(1234_u16); - let value = felt!(18_u8); - let calldata = calldata![key, value]; - let entry_point_call = CallEntryPoint { - calldata, - entry_point_selector: selector_from_name("test_storage_read_write"), - ..trivial_external_entry_point_new(test_contract) - }; - let storage_address = entry_point_call.storage_address; - assert_eq!( - entry_point_call.execute_directly(&mut state).unwrap().execution, - CallExecution { - retdata: retdata![value], - gas_consumed: REQUIRED_GAS_STORAGE_READ_WRITE_TEST, - ..CallExecution::default() - } - ); - // Verify that the state has changed. - let value_from_state = - state.get_storage_at(storage_address, StorageKey::try_from(key).unwrap()).unwrap(); - assert_eq!(value_from_state, value); -} - -#[test] -fn test_call_contract() { - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let chain_info = &ChainInfo::create_for_testing(); - let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - - let outer_entry_point_selector = selector_from_name("test_call_contract"); - let calldata = create_calldata( - FeatureContract::TestContract(CairoVersion::Cairo1).get_instance_address(0), - "test_storage_read_write", - &[ - felt!(405_u16), // Calldata: address. - felt!(48_u8), // Calldata: value. - ], - ); - let entry_point_call = CallEntryPoint { - entry_point_selector: outer_entry_point_selector, - calldata, - ..trivial_external_entry_point_new(test_contract) - }; - assert_eq!( - entry_point_call.execute_directly(&mut state).unwrap().execution, - CallExecution { - retdata: retdata![felt!(48_u8)], - gas_consumed: REQUIRED_GAS_CALL_CONTRACT_TEST, - ..CallExecution::default() - } - ); -} - -#[test] -fn test_emit_event() { - let versioned_constants = VersionedConstants::create_for_testing(); - // Positive flow. - let keys = vec![felt!(2019_u16), felt!(2020_u16)]; - let data = vec![felt!(2021_u16), felt!(2022_u16), felt!(2023_u16)]; - // TODO(Ori, 1/2/2024): Write an indicative expect message explaining why the conversion works. - let n_emitted_events = vec![felt!(1_u16)]; - let call_info = emit_events(&n_emitted_events, &keys, &data).unwrap(); - let event = EventContent { - keys: keys.clone().into_iter().map(EventKey).collect(), - data: EventData(data.clone()), - }; - assert_eq!( - call_info.execution, - CallExecution { - events: vec![OrderedEvent { order: 0, event }], - gas_consumed: 49860, - ..Default::default() - } - ); - - // Negative flow, the data length exceeds the limit. - let max_event_data_length = versioned_constants.tx_event_limits.max_data_length; - let data_too_long = vec![felt!(2_u16); max_event_data_length + 1]; - let error = emit_events(&n_emitted_events, &keys, &data_too_long).unwrap_err(); - let expected_error = EmitEventError::ExceedsMaxDataLength { - data_length: max_event_data_length + 1, - max_data_length: max_event_data_length, - }; - assert!(error.to_string().contains(format!("{}", expected_error).as_str())); - - // Negative flow, the keys length exceeds the limit. - let max_event_keys_length = versioned_constants.tx_event_limits.max_keys_length; - let keys_too_long = vec![felt!(1_u16); max_event_keys_length + 1]; - let error = emit_events(&n_emitted_events, &keys_too_long, &data).unwrap_err(); - let expected_error = EmitEventError::ExceedsMaxKeysLength { - keys_length: max_event_keys_length + 1, - max_keys_length: max_event_keys_length, - }; - assert!(error.to_string().contains(format!("{}", expected_error).as_str())); - - // Negative flow, the number of events exceeds the limit. - let max_n_emitted_events = versioned_constants.tx_event_limits.max_n_emitted_events; - let n_emitted_events_too_big = vec![felt!( - u16::try_from(max_n_emitted_events + 1).expect("Failed to convert usize to u16.") - )]; - let error = emit_events(&n_emitted_events_too_big, &keys, &data).unwrap_err(); - let expected_error = EmitEventError::ExceedsMaxNumberOfEmittedEvents { - n_emitted_events: max_n_emitted_events + 1, - max_n_emitted_events, - }; - assert!(error.to_string().contains(format!("{}", expected_error).as_str())); -} - -fn emit_events( - n_emitted_events: &[Felt], - keys: &[Felt], - data: &[Felt], -) -> Result { - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let chain_info = &ChainInfo::create_for_testing(); - let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - let calldata = Calldata( - [ - n_emitted_events.to_owned(), - vec![felt!(u16::try_from(keys.len()).expect("Failed to convert usize to u16."))], - keys.to_vec(), - vec![felt!(u16::try_from(data.len()).expect("Failed to convert usize to u16."))], - data.to_vec(), - ] - .concat() - .into(), - ); - - let entry_point_call = CallEntryPoint { - entry_point_selector: selector_from_name("test_emit_events"), - calldata, - ..trivial_external_entry_point_new(test_contract) - }; - - entry_point_call.execute_directly(&mut state) -} - -#[test] -fn test_get_block_hash() { - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let chain_info = &ChainInfo::create_for_testing(); - let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - - // Initialize block number -> block hash entry. - let upper_bound_block_number = CURRENT_BLOCK_NUMBER - constants::STORED_BLOCK_HASH_BUFFER; - let block_number = felt!(upper_bound_block_number); - let block_hash = felt!(66_u64); - let key = StorageKey::try_from(block_number).unwrap(); - let block_hash_contract_address = - ContractAddress::try_from(Felt::from(constants::BLOCK_HASH_CONTRACT_ADDRESS)).unwrap(); - state.set_storage_at(block_hash_contract_address, key, block_hash).unwrap(); - - // Positive flow. - let calldata = calldata![block_number]; - let entry_point_call = CallEntryPoint { - entry_point_selector: selector_from_name("test_get_block_hash"), - calldata, - ..trivial_external_entry_point_new(test_contract) - }; - - assert_eq!( - entry_point_call.clone().execute_directly(&mut state).unwrap().execution, - CallExecution { gas_consumed: 9680, ..CallExecution::from_retdata(retdata![block_hash]) } - ); - - // Negative flow. Execution mode is Validate. - let error = entry_point_call.execute_directly_in_validate_mode(&mut state).unwrap_err(); - check_entry_point_execution_error_for_custom_hint!( - &error, - "Unauthorized syscall get_block_hash in execution mode Validate.", - ); - - // Negative flow: Block number out of range. - let requested_block_number = CURRENT_BLOCK_NUMBER - constants::STORED_BLOCK_HASH_BUFFER + 1; - let block_number = felt!(requested_block_number); - let calldata = calldata![block_number]; - let entry_point_call = CallEntryPoint { - entry_point_selector: selector_from_name("test_get_block_hash"), - calldata, - ..trivial_external_entry_point_new(test_contract) - }; - let error = entry_point_call.execute_directly(&mut state).unwrap_err(); - assert_matches!(error, EntryPointExecutionError::ExecutionFailed{ error_data } - if error_data == vec![felt!(BLOCK_NUMBER_OUT_OF_RANGE_ERROR)]); -} - -#[test] -fn test_keccak() { - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let chain_info = &ChainInfo::create_for_testing(); - let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - - let calldata = Calldata(vec![].into()); - let entry_point_call = CallEntryPoint { - entry_point_selector: selector_from_name("test_keccak"), - calldata, - ..trivial_external_entry_point_new(test_contract) - }; - - assert_eq!( - entry_point_call.execute_directly(&mut state).unwrap().execution, - CallExecution { gas_consumed: 256250, ..CallExecution::from_retdata(retdata![]) } - ); -} - -#[test] -fn test_sha256() { - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let chain_info = &ChainInfo::create_for_testing(); - let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - - let calldata = Calldata(vec![].into()); - let entry_point_call = CallEntryPoint { - entry_point_selector: selector_from_name("test_sha256"), - calldata, - ..trivial_external_entry_point_new(test_contract) - }; - - assert_eq!( - entry_point_call.execute_directly(&mut state).unwrap().execution, - CallExecution { gas_consumed: 892990, ..CallExecution::from_retdata(retdata![]) } - ); -} - -fn verify_compiler_version(contract: FeatureContract, expected_version: &str) { - // Read and parse file content. - let raw_contract: serde_json::Value = - serde_json::from_str(&contract.get_raw_class()).expect("Error parsing JSON"); - - // Verify version. - if let Some(compiler_version) = raw_contract["compiler_version"].as_str() { - assert_eq!(compiler_version, expected_version); - } else { - panic!("'compiler_version' not found or not a valid string in JSON."); - } -} - -#[test_case( - ExecutionMode::Validate, - TransactionVersion::ONE, - false, - false; - "Validate execution mode: block info fields should be zeroed. Transaction V1.")] -#[test_case( - ExecutionMode::Execute, - TransactionVersion::ONE, - false, - false; - "Execute execution mode: block info should be as usual. Transaction V1.")] -#[test_case( - ExecutionMode::Validate, - TransactionVersion::THREE, - false, - false; - "Validate execution mode: block info fields should be zeroed. Transaction V3.")] -#[test_case( - ExecutionMode::Execute, - TransactionVersion::THREE, - false, - false; - "Execute execution mode: block info should be as usual. Transaction V3.")] -#[test_case( - ExecutionMode::Execute, - TransactionVersion::ONE, - true, - false; - "Legacy contract. Execute execution mode: block info should be as usual. Transaction V1.")] -#[test_case( - ExecutionMode::Execute, - TransactionVersion::THREE, - true, - false; - "Legacy contract. Execute execution mode: block info should be as usual. Transaction V3.")] -#[test_case( - ExecutionMode::Execute, - TransactionVersion::THREE, - false, - true; - "Execute execution mode: block info should be as usual. Transaction V3. Query.")] -fn test_get_execution_info( - execution_mode: ExecutionMode, - mut version: TransactionVersion, - is_legacy: bool, - only_query: bool, -) { - let legacy_contract = FeatureContract::LegacyTestContract; - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let state = &mut test_state( - &ChainInfo::create_for_testing(), - BALANCE, - &[(legacy_contract, 1), (test_contract, 1)], - ); - let expected_block_info = match execution_mode { - ExecutionMode::Validate => [ - // Rounded block number. - felt!(CURRENT_BLOCK_NUMBER_FOR_VALIDATE), - // Rounded timestamp. - felt!(CURRENT_BLOCK_TIMESTAMP_FOR_VALIDATE), - Felt::ZERO, - ], - ExecutionMode::Execute => [ - felt!(CURRENT_BLOCK_NUMBER), // Block number. - felt!(CURRENT_BLOCK_TIMESTAMP), // Block timestamp. - Felt::from_hex(TEST_SEQUENCER_ADDRESS).unwrap(), - ], - }; - - let (test_contract_address, expected_unsupported_fields) = if is_legacy { - verify_compiler_version(legacy_contract, "2.1.0"); - (legacy_contract.get_instance_address(0), vec![]) - } else { - ( - test_contract.get_instance_address(0), - vec![ - Felt::ZERO, // Tip. - Felt::ZERO, // Paymaster data. - Felt::ZERO, // Nonce DA. - Felt::ZERO, // Fee DA. - Felt::ZERO, // Account data. - ], - ) - }; - - if only_query { - let simulate_version_base = Pow::pow(Felt::from(2_u8), QUERY_VERSION_BASE_BIT); - let query_version = simulate_version_base + version.0; - version = TransactionVersion(query_version); - } - - let tx_hash = TransactionHash(felt!(1991_u16)); - let max_fee = Fee(42); - let nonce = nonce!(3_u16); - let sender_address = test_contract_address; - - let expected_tx_info: Vec; - let mut expected_resource_bounds: Vec = vec![]; - let tx_info: TransactionInfo; - if version == TransactionVersion::ONE { - expected_tx_info = vec![ - version.0, // Transaction version. - *sender_address.0.key(), // Account address. - felt!(max_fee.0), // Max fee. - Felt::ZERO, // Signature. - tx_hash.0, // Transaction hash. - felt!(&*ChainId::Other(CHAIN_ID_NAME.to_string()).as_hex()), // Chain ID. - nonce.0, // Nonce. - ]; - if !is_legacy { - expected_resource_bounds = vec![ - felt!(0_u16), // Length of resource bounds array. - ]; - } - tx_info = TransactionInfo::Deprecated(DeprecatedTransactionInfo { - common_fields: CommonAccountFields { - transaction_hash: tx_hash, - version: TransactionVersion::ONE, - nonce, - sender_address, - only_query, - ..Default::default() - }, - max_fee, - }); - } else { - let max_amount = Fee(13); - let max_price_per_unit = Fee(61); - expected_tx_info = vec![ - version.0, // Transaction version. - *sender_address.0.key(), // Account address. - Felt::ZERO, // Max fee. - Felt::ZERO, // Signature. - tx_hash.0, // Transaction hash. - felt!(&*ChainId::Other(CHAIN_ID_NAME.to_string()).as_hex()), // Chain ID. - nonce.0, // Nonce. - ]; - if !is_legacy { - expected_resource_bounds = vec![ - Felt::from(2u32), // Length of ResourceBounds array. - felt!(L1_GAS), // Resource. - felt!(max_amount.0), // Max amount. - felt!(max_price_per_unit.0), // Max price per unit. - felt!(L2_GAS), // Resource. - Felt::ZERO, // Max amount. - Felt::ZERO, // Max price per unit. - ]; - } - tx_info = TransactionInfo::Current(CurrentTransactionInfo { - common_fields: CommonAccountFields { - transaction_hash: tx_hash, - version: TransactionVersion::THREE, - nonce, - sender_address, - only_query, - ..Default::default() - }, - resource_bounds: ResourceBoundsMapping(BTreeMap::from([ - ( - Resource::L1Gas, - // TODO(Ori, 1/2/2024): Write an indicative expect message explaining why the - // convertion works. - ResourceBounds { - max_amount: max_amount - .0 - .try_into() - .expect("Failed to convert u128 to u64."), - max_price_per_unit: max_price_per_unit.0, - }, - ), - (Resource::L2Gas, ResourceBounds { max_amount: 0, max_price_per_unit: 0 }), - ])), - tip: Tip::default(), - nonce_data_availability_mode: DataAvailabilityMode::L1, - fee_data_availability_mode: DataAvailabilityMode::L1, - paymaster_data: PaymasterData::default(), - account_deployment_data: AccountDeploymentData::default(), - }); - } - - let entry_point_selector = selector_from_name("test_get_execution_info"); - let expected_call_info = vec![ - felt!(0_u16), // Caller address. - *test_contract_address.0.key(), // Storage address. - entry_point_selector.0, // Entry point selector. - ]; - let entry_point_call = CallEntryPoint { - entry_point_selector, - code_address: None, - calldata: Calldata( - [ - expected_block_info.to_vec(), - expected_tx_info, - expected_resource_bounds, - expected_unsupported_fields, - expected_call_info, - ] - .concat() - .into(), - ), - ..trivial_external_entry_point_with_address(test_contract_address) - }; - - let result = match execution_mode { - ExecutionMode::Validate => { - entry_point_call.execute_directly_given_tx_info_in_validate_mode(state, tx_info, false) - } - ExecutionMode::Execute => { - entry_point_call.execute_directly_given_tx_info(state, tx_info, false) - } - }; - - assert!(!result.unwrap().execution.failed); -} - -#[test] -fn test_library_call() { - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let chain_info = &ChainInfo::create_for_testing(); - let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - - let inner_entry_point_selector = selector_from_name("test_storage_read_write"); - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let calldata = calldata![ - test_contract.get_class_hash().0, // Class hash. - inner_entry_point_selector.0, // Function selector. - felt!(2_u8), // Calldata length. - felt!(1234_u16), // Calldata: address. - felt!(91_u8) // Calldata: value. - ]; - let entry_point_call = CallEntryPoint { - entry_point_selector: selector_from_name("test_library_call"), - calldata, - class_hash: Some(test_contract.get_class_hash()), - ..trivial_external_entry_point_new(test_contract) - }; - - assert_eq!( - entry_point_call.execute_directly(&mut state).unwrap().execution, - CallExecution { - retdata: retdata![felt!(91_u16)], - gas_consumed: REQUIRED_GAS_LIBRARY_CALL_TEST, - ..Default::default() - } - ); -} - -#[test] -fn test_library_call_assert_fails() { - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let chain_info = &ChainInfo::create_for_testing(); - let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - let inner_entry_point_selector = selector_from_name("assert_eq"); - let calldata = calldata![ - test_contract.get_class_hash().0, // Class hash. - inner_entry_point_selector.0, // Function selector. - felt!(2_u8), // Calldata length. - felt!(0_u8), // Calldata: first assert value. - felt!(1_u8) // Calldata: second assert value. - ]; - let entry_point_call = CallEntryPoint { - entry_point_selector: selector_from_name("test_library_call"), - calldata, - class_hash: Some(test_contract.get_class_hash()), - ..trivial_external_entry_point_new(test_contract) - }; - - assert!( - entry_point_call.execute_directly(&mut state).unwrap_err().to_string().contains("x != y") - ); -} - -#[test] -fn test_nested_library_call() { - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let chain_info = &ChainInfo::create_for_testing(); - let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - - let (key, value) = (255_u64, 44_u64); - let outer_entry_point_selector = selector_from_name("test_library_call"); - let inner_entry_point_selector = selector_from_name("test_storage_read_write"); - let test_class_hash = test_contract.get_class_hash(); - let main_entry_point_calldata = calldata![ - test_class_hash.0, // Class hash. - outer_entry_point_selector.0, // Library call function selector. - inner_entry_point_selector.0, // Storage function selector. - felt!(key), // Calldata: address. - felt!(value) // Calldata: value. - ]; - - // Create expected call info tree. - let main_entry_point = CallEntryPoint { - entry_point_selector: selector_from_name("test_nested_library_call"), - calldata: main_entry_point_calldata, - class_hash: Some(test_class_hash), - initial_gas: 9999906600, - ..trivial_external_entry_point_new(test_contract) - }; - let nested_storage_entry_point = CallEntryPoint { - entry_point_selector: inner_entry_point_selector, - calldata: calldata![felt!(key + 1), felt!(value + 1)], - class_hash: Some(test_class_hash), - code_address: None, - call_type: CallType::Delegate, - initial_gas: 9999745020, - ..trivial_external_entry_point_new(test_contract) - }; - let library_entry_point = CallEntryPoint { - entry_point_selector: outer_entry_point_selector, - calldata: calldata![ - test_class_hash.0, // Class hash. - inner_entry_point_selector.0, // Storage function selector. - felt!(2_u8), // Calldata: address. - felt!(key + 1), // Calldata: address. - felt!(value + 1) // Calldata: value. - ], - class_hash: Some(test_class_hash), - code_address: None, - call_type: CallType::Delegate, - initial_gas: 9999823550, - ..trivial_external_entry_point_new(test_contract) - }; - let storage_entry_point = CallEntryPoint { - calldata: calldata![felt!(key), felt!(value)], - initial_gas: 9999656870, - ..nested_storage_entry_point - }; - let storage_entry_point_resources = ExecutionResources { - n_steps: 243, - n_memory_holes: 0, - builtin_instance_counter: HashMap::from([(BuiltinName::range_check, 7)]), - }; - let nested_storage_call_info = CallInfo { - call: nested_storage_entry_point, - execution: CallExecution { - retdata: retdata![felt!(value + 1)], - gas_consumed: REQUIRED_GAS_STORAGE_READ_WRITE_TEST, - ..CallExecution::default() - }, - resources: storage_entry_point_resources.clone(), - storage_read_values: vec![felt!(value + 1)], - accessed_storage_keys: HashSet::from([storage_key!(key + 1)]), - ..Default::default() - }; - let library_call_resources = &get_syscall_resources(SyscallSelector::LibraryCall) - + &ExecutionResources { - n_steps: 388, - n_memory_holes: 0, - builtin_instance_counter: HashMap::from([(BuiltinName::range_check, 15)]), - }; - let library_call_info = CallInfo { - call: library_entry_point, - execution: CallExecution { - retdata: retdata![felt!(value + 1)], - gas_consumed: REQUIRED_GAS_LIBRARY_CALL_TEST, - ..CallExecution::default() - }, - resources: library_call_resources, - inner_calls: vec![nested_storage_call_info], - ..Default::default() - }; - let storage_call_info = CallInfo { - call: storage_entry_point, - execution: CallExecution { - retdata: retdata![felt!(value)], - gas_consumed: REQUIRED_GAS_STORAGE_READ_WRITE_TEST, - ..CallExecution::default() - }, - resources: storage_entry_point_resources, - storage_read_values: vec![felt!(value)], - accessed_storage_keys: HashSet::from([storage_key!(key)]), - ..Default::default() - }; - - let main_call_resources = &(&get_syscall_resources(SyscallSelector::LibraryCall) * 3) - + &ExecutionResources { - n_steps: 749, - n_memory_holes: 2, - builtin_instance_counter: HashMap::from([(BuiltinName::range_check, 27)]), - }; - let expected_call_info = CallInfo { - call: main_entry_point.clone(), - execution: CallExecution { - retdata: retdata![felt!(value)], - gas_consumed: 276880, - ..CallExecution::default() - }, - resources: main_call_resources, - inner_calls: vec![library_call_info, storage_call_info], - ..Default::default() - }; - - assert_eq!(main_entry_point.execute_directly(&mut state).unwrap(), expected_call_info); -} - -#[test] -fn test_replace_class() { - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let empty_contract = FeatureContract::Empty(CairoVersion::Cairo1); - let empty_contract_cairo0 = FeatureContract::Empty(CairoVersion::Cairo0); - let mut state = test_state( - &ChainInfo::create_for_testing(), - BALANCE, - &[(test_contract, 1), (empty_contract, 0), (empty_contract_cairo0, 0)], - ); - let contract_address = test_contract.get_instance_address(0); - - // Negative flow. - - // Replace with undeclared class hash. - let entry_point_call = CallEntryPoint { - calldata: calldata![felt!(1234_u16)], - entry_point_selector: selector_from_name("test_replace_class"), - ..trivial_external_entry_point_new(test_contract) - }; - let error = entry_point_call.execute_directly(&mut state).unwrap_err().to_string(); - assert!(error.contains("is not declared")); - - // Replace with Cairo 0 class hash. - let v0_class_hash = empty_contract_cairo0.get_class_hash(); - - let entry_point_call = CallEntryPoint { - calldata: calldata![v0_class_hash.0], - entry_point_selector: selector_from_name("test_replace_class"), - ..trivial_external_entry_point_new(test_contract) - }; - let error = entry_point_call.execute_directly(&mut state).unwrap_err().to_string(); - assert!(error.contains("Cannot replace V1 class hash with V0 class hash")); - - // Positive flow. - let old_class_hash = test_contract.get_class_hash(); - let new_class_hash = empty_contract.get_class_hash(); - assert_eq!(state.get_class_hash_at(contract_address).unwrap(), old_class_hash); - let entry_point_call = CallEntryPoint { - calldata: calldata![new_class_hash.0], - entry_point_selector: selector_from_name("test_replace_class"), - ..trivial_external_entry_point_new(test_contract) - }; - assert_eq!( - entry_point_call.execute_directly(&mut state).unwrap().execution, - CallExecution { gas_consumed: 9750, ..Default::default() } - ); - assert_eq!(state.get_class_hash_at(contract_address).unwrap(), new_class_hash); -} - -#[test] -fn test_secp256k1() { - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let chain_info = &ChainInfo::create_for_testing(); - let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - - let calldata = Calldata(vec![].into()); - let entry_point_call = CallEntryPoint { - entry_point_selector: selector_from_name("test_secp256k1"), - calldata, - ..trivial_external_entry_point_new(test_contract) - }; - - assert_eq!( - entry_point_call.execute_directly(&mut state).unwrap().execution, - CallExecution { gas_consumed: 17033810_u64, ..Default::default() } - ); -} - -#[test] -fn test_secp256r1() { - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let chain_info = &ChainInfo::create_for_testing(); - let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - - let calldata = Calldata(vec![].into()); - let entry_point_call = CallEntryPoint { - entry_point_selector: selector_from_name("test_secp256r1"), - calldata, - ..trivial_external_entry_point_new(test_contract) - }; - - assert_eq!( - entry_point_call.execute_directly(&mut state).unwrap().execution, - CallExecution { gas_consumed: 27582260_u64, ..Default::default() } - ); -} - -#[test] -fn test_send_message_to_l1() { - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let chain_info = &ChainInfo::create_for_testing(); - let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - - let to_address = felt!(1234_u16); - let payload = vec![felt!(2019_u16), felt!(2020_u16), felt!(2021_u16)]; - let calldata = Calldata( - [ - vec![ - to_address, - // TODO(Ori, 1/2/2024): Write an indicative expect message explaining why the - // convertion works. - felt!(u64::try_from(payload.len()).expect("Failed to convert usize to u64.")), - ], - payload.clone(), - ] - .concat() - .into(), - ); - let entry_point_call = CallEntryPoint { - entry_point_selector: selector_from_name("test_send_message_to_l1"), - calldata, - ..trivial_external_entry_point_new(test_contract) - }; - - let to_address = EthAddress::try_from(to_address).unwrap(); - let message = MessageToL1 { to_address, payload: L2ToL1Payload(payload) }; - - assert_eq!( - entry_point_call.execute_directly(&mut state).unwrap().execution, - CallExecution { - l2_to_l1_messages: vec![OrderedL2ToL1Message { order: 0, message }], - gas_consumed: 22990, - ..Default::default() - } - ); -} - -#[rstest] -#[case::no_constructor( - false, false, true, None - // No constructor, trivial calldata, address available; Positive flow. -)] -#[case::no_constructor_nonempty_calldata( - false, true, true, - Some( - "Invalid input: constructor_calldata; Cannot pass calldata to a contract with no constructor.".to_string() - ) - // No constructor, nontrivial calldata, address available; Negative flow. -)] -#[case::with_constructor( - true, true, true, None - // With constructor, nontrivial calldata, address available; Positive flow. -)] -#[case::deploy_to_unavailable_address( - true, true, false, - Some("is unavailable for deployment.".to_string()) - // With constructor, nontrivial calldata, address unavailable; Negative flow. -)] -fn test_deploy( - #[case] constructor_exists: bool, - #[case] supply_constructor_calldata: bool, - #[case] available_for_deployment: bool, - #[case] expected_error: Option, -) { - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let empty_contract = FeatureContract::Empty(CairoVersion::Cairo1); - let mut state = - test_state(&ChainInfo::create_for_testing(), 0, &[(empty_contract, 0), (test_contract, 1)]); - - let class_hash = if constructor_exists { - test_contract.get_class_hash() - } else { - empty_contract.get_class_hash() - }; - let constructor_calldata = if supply_constructor_calldata { - vec![ - felt!(1_u8), // Calldata: address. - felt!(1_u8), // Calldata: value. - ] - } else { - vec![] - }; - - let calldata = calldata_for_deploy_test(class_hash, &constructor_calldata, true); - - let entry_point_call = CallEntryPoint { - entry_point_selector: selector_from_name("test_deploy"), - calldata, - ..trivial_external_entry_point_new(test_contract) - }; - - if !available_for_deployment { - // Deploy an instance of the contract for the scenario: deploy_to_unavailable_address. - entry_point_call.clone().execute_directly(&mut state).unwrap(); - } - - if let Some(expected_error) = expected_error { - let error = entry_point_call.execute_directly(&mut state).unwrap_err().to_string(); - assert!(error.contains(expected_error.as_str())); - return; - } - - // No errors expected. - let contract_address = calculate_contract_address( - ContractAddressSalt::default(), - class_hash, - &Calldata(constructor_calldata.clone().into()), - test_contract.get_instance_address(0), - ) - .unwrap(); - let deploy_call = &entry_point_call.execute_directly(&mut state).unwrap().inner_calls[0]; - assert_eq!(deploy_call.call.storage_address, contract_address); - let mut retdata = retdata![]; - let gas_consumed = if constructor_calldata.is_empty() { - 0 - } else { - retdata.0.push(constructor_calldata[0]); - 10140 - }; - assert_eq!( - deploy_call.execution, - CallExecution { retdata, gas_consumed, ..CallExecution::default() } - ); - assert_eq!(state.get_class_hash_at(contract_address).unwrap(), class_hash); -} - -#[test] -fn test_out_of_gas() { - let test_contract = FeatureContract::TestContract(CairoVersion::Cairo1); - let chain_info = &ChainInfo::create_for_testing(); - let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - - let key = felt!(1234_u16); - let value = felt!(18_u8); - let calldata = calldata![key, value]; - let entry_point_call = CallEntryPoint { - calldata, - entry_point_selector: selector_from_name("test_storage_read_write"), - initial_gas: REQUIRED_GAS_STORAGE_READ_WRITE_TEST - 1, - ..trivial_external_entry_point_new(test_contract) - }; - let error = entry_point_call.execute_directly(&mut state).unwrap_err(); - assert_matches!(error, EntryPointExecutionError::ExecutionFailed{ error_data } - if error_data == vec![felt!(OUT_OF_GAS_ERROR)]); -} - -#[test] -fn test_syscall_failure_format() { - let error_data = vec![ - // Magic to indicate that this is a byte array. - BYTE_ARRAY_MAGIC, - // the number of full words in the byte array. - "0x00", - // The pending word of the byte array: "Execution failure" - "0x457865637574696f6e206661696c757265", - // The length of the pending word. - "0x11", - ] - .into_iter() - .map(|x| Felt::from_hex(x).unwrap()) - .collect(); - let error = EntryPointExecutionError::ExecutionFailed { error_data }; - assert_eq!(error.to_string(), "Execution failed. Failure reason: \"Execution failure\"."); -} From 956639e82389cffed372399047c7cbcae48ea30d Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Tue, 6 Aug 2024 19:20:21 +0300 Subject: [PATCH 02/21] fix: apply cargo-fmt --- .../syscalls/syscall_tests/get_block_hash.rs | 13 ++++++--- .../syscall_tests/get_execution_info.rs | 29 +++++++++++++++---- .../syscalls/syscall_tests/library_call.rs | 8 +++-- 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs index 69cef2fdda..f014d076e7 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs @@ -18,7 +18,10 @@ use crate::test_utils::contracts::FeatureContract; use crate::test_utils::dict_state_reader::DictStateReader; use crate::test_utils::initial_test_state::test_state; use crate::test_utils::{ - trivial_external_entry_point_new, CairoVersion, BALANCE, CURRENT_BLOCK_NUMBER, + trivial_external_entry_point_new, + CairoVersion, + BALANCE, + CURRENT_BLOCK_NUMBER, }; use crate::{check_entry_point_execution_error_for_custom_hint, retdata}; @@ -79,9 +82,11 @@ fn negative_flow_execution_mode_validate(test_contract: FeatureContract) { "Unauthorized syscall get_block_hash in execution mode Validate.", ); - assert!(error - .to_string() - .contains("Unauthorized syscall get_block_hash in execution mode Validate")); + assert!( + error + .to_string() + .contains("Unauthorized syscall get_block_hash in execution mode Validate") + ); assert_consistent_contract_version(test_contract, &state); } diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/get_execution_info.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/get_execution_info.rs index 43570183df..89501aa6af 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/get_execution_info.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/get_execution_info.rs @@ -6,8 +6,16 @@ use starknet_api::core::ChainId; use starknet_api::data_availability::DataAvailabilityMode; use starknet_api::felt; use starknet_api::transaction::{ - AccountDeploymentData, Calldata, Fee, PaymasterData, Resource, ResourceBounds, - ResourceBoundsMapping, Tip, TransactionHash, TransactionVersion, + AccountDeploymentData, + Calldata, + Fee, + PaymasterData, + Resource, + ResourceBounds, + ResourceBoundsMapping, + Tip, + TransactionHash, + TransactionVersion, }; use starknet_types_core::felt::Felt; use test_case::test_case; @@ -22,13 +30,22 @@ use crate::nonce; use crate::test_utils::contracts::FeatureContract; use crate::test_utils::initial_test_state::test_state; use crate::test_utils::{ - trivial_external_entry_point_with_address, CairoVersion, BALANCE, CHAIN_ID_NAME, - CURRENT_BLOCK_NUMBER, CURRENT_BLOCK_NUMBER_FOR_VALIDATE, CURRENT_BLOCK_TIMESTAMP, - CURRENT_BLOCK_TIMESTAMP_FOR_VALIDATE, TEST_SEQUENCER_ADDRESS, + trivial_external_entry_point_with_address, + CairoVersion, + BALANCE, + CHAIN_ID_NAME, + CURRENT_BLOCK_NUMBER, + CURRENT_BLOCK_NUMBER_FOR_VALIDATE, + CURRENT_BLOCK_TIMESTAMP, + CURRENT_BLOCK_TIMESTAMP_FOR_VALIDATE, + TEST_SEQUENCER_ADDRESS, }; use crate::transaction::constants::QUERY_VERSION_BASE_BIT; use crate::transaction::objects::{ - CommonAccountFields, CurrentTransactionInfo, DeprecatedTransactionInfo, TransactionInfo, + CommonAccountFields, + CurrentTransactionInfo, + DeprecatedTransactionInfo, + TransactionInfo, }; #[test_case( diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs index 63574545f0..1d13bde93e 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs @@ -14,14 +14,18 @@ use crate::context::ChainInfo; use crate::execution::call_info::{CallExecution, CallInfo, Retdata}; use crate::execution::entry_point::{CallEntryPoint, CallType}; use crate::execution::syscalls::syscall_tests::consts::{ - REQUIRED_GAS_LIBRARY_CALL_TEST, REQUIRED_GAS_STORAGE_READ_WRITE_TEST, + REQUIRED_GAS_LIBRARY_CALL_TEST, + REQUIRED_GAS_STORAGE_READ_WRITE_TEST, }; use crate::execution::syscalls::SyscallSelector; use crate::retdata; use crate::test_utils::contracts::FeatureContract; use crate::test_utils::initial_test_state::test_state; use crate::test_utils::{ - get_syscall_resources, trivial_external_entry_point_new, CairoVersion, BALANCE, + get_syscall_resources, + trivial_external_entry_point_new, + CairoVersion, + BALANCE, }; #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), REQUIRED_GAS_LIBRARY_CALL_TEST; "VM")] From 47f3557fb359fa7f62391c1569af3fc3ce2b5fd5 Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Wed, 7 Aug 2024 19:46:52 +0300 Subject: [PATCH 03/21] fix: address review comments --- .../syscalls/syscall_tests/call_contract.rs | 10 +------ .../syscall_tests/{consts.rs => constants.rs} | 0 .../syscalls/syscall_tests/deploy.rs | 24 ++--------------- .../syscalls/syscall_tests/emit_event.rs | 3 --- .../syscalls/syscall_tests/get_block_hash.rs | 13 --------- .../syscall_tests/get_execution_info.rs | 7 ++--- .../syscalls/syscall_tests/library_call.rs | 2 +- .../execution/syscalls/syscall_tests/mod.rs | 3 +-- .../syscalls/syscall_tests/out_of_gas.rs | 2 +- .../syscall_tests/storage_read_write.rs | 8 +----- .../execution/syscalls/syscall_tests/utils.rs | 27 ------------------- 11 files changed, 9 insertions(+), 90 deletions(-) rename crates/blockifier/src/execution/syscalls/syscall_tests/{consts.rs => constants.rs} (100%) delete mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/utils.rs diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs index 39d97e5e68..f73b04027b 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs @@ -2,12 +2,11 @@ use pretty_assertions::assert_eq; use starknet_api::felt; use test_case::test_case; -use super::consts::REQUIRED_GAS_CALL_CONTRACT_TEST; +use super::constants::REQUIRED_GAS_CALL_CONTRACT_TEST; use crate::abi::abi_utils::selector_from_name; use crate::context::ChainInfo; use crate::execution::call_info::{CallExecution, Retdata}; use crate::execution::entry_point::CallEntryPoint; -use crate::execution::syscalls::syscall_tests::utils::assert_consistent_contract_version; use crate::retdata; use crate::test_utils::contracts::FeatureContract; use crate::test_utils::initial_test_state::test_state; @@ -27,9 +26,6 @@ fn test_call_contract( let chain_info = &ChainInfo::create_for_testing(); let mut state = test_state(chain_info, BALANCE, &[(outer_contract, 1), (inner_contract, 1)]); - assert_consistent_contract_version(outer_contract, &state); - assert_consistent_contract_version(inner_contract, &state); - let outer_entry_point_selector = selector_from_name("test_call_contract"); let calldata = create_calldata( inner_contract.get_instance_address(0), @@ -53,8 +49,4 @@ fn test_call_contract( ..CallExecution::default() } ); - - // ensure that the fallback system didn't replace the contract - assert_consistent_contract_version(outer_contract, &state); - assert_consistent_contract_version(inner_contract, &state); } diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/consts.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/constants.rs similarity index 100% rename from crates/blockifier/src/execution/syscalls/syscall_tests/consts.rs rename to crates/blockifier/src/execution/syscalls/syscall_tests/constants.rs diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/deploy.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/deploy.rs index 8f4b9570dd..6381d4f945 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/deploy.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/deploy.rs @@ -8,7 +8,6 @@ use crate::abi::abi_utils::selector_from_name; use crate::context::ChainInfo; use crate::execution::call_info::{CallExecution, Retdata}; use crate::execution::entry_point::CallEntryPoint; -use crate::execution::syscalls::syscall_tests::utils::assert_consistent_contract_version; use crate::retdata; use crate::state::state_api::StateReader; use crate::test_utils::contracts::FeatureContract; @@ -17,6 +16,8 @@ use crate::test_utils::{calldata_for_deploy_test, trivial_external_entry_point_n #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1);"VM")] fn no_constructor(deployer_contract: FeatureContract) { + // TODO(Yoni): share the init code of the tests in this file. + let empty_contract = FeatureContract::Empty(CairoVersion::Cairo1); let class_hash = empty_contract.get_class_hash(); @@ -26,9 +27,6 @@ fn no_constructor(deployer_contract: FeatureContract) { &[(deployer_contract, 1), (empty_contract, 0)], ); - assert_consistent_contract_version(deployer_contract, &state); - assert_consistent_contract_version(empty_contract, &state); - let calldata = calldata_for_deploy_test(class_hash, &[], true); let entry_point_call = CallEntryPoint { entry_point_selector: selector_from_name("test_deploy"), @@ -51,9 +49,6 @@ fn no_constructor(deployer_contract: FeatureContract) { CallExecution { retdata: retdata![], gas_consumed: 0, ..CallExecution::default() } ); assert_eq!(state.get_class_hash_at(deployed_contract_address).unwrap(), class_hash); - - assert_consistent_contract_version(deployer_contract, &state); - assert_consistent_contract_version(empty_contract, &state); } #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1);"VM")] @@ -66,8 +61,6 @@ fn no_constructor_nonempty_calldata(deployer_contract: FeatureContract) { 0, &[(deployer_contract, 1), (empty_contract, 0)], ); - assert_consistent_contract_version(deployer_contract, &state); - assert_consistent_contract_version(empty_contract, &state); let calldata = calldata_for_deploy_test(class_hash, &[felt!(1_u8), felt!(1_u8)], true); @@ -82,9 +75,6 @@ fn no_constructor_nonempty_calldata(deployer_contract: FeatureContract) { "Invalid input: constructor_calldata; Cannot pass calldata to a contract with no \ constructor." )); - - assert_consistent_contract_version(deployer_contract, &state); - assert_consistent_contract_version(empty_contract, &state); } #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 10140;"VM")] @@ -95,8 +85,6 @@ fn with_constructor(deployer_contract: FeatureContract, expected_gas: u64) { 0, &[(deployer_contract, 1), (empty_contract, 0)], ); - assert_consistent_contract_version(deployer_contract, &state); - assert_consistent_contract_version(empty_contract, &state); let class_hash = deployer_contract.get_class_hash(); let constructor_calldata = vec![ @@ -132,9 +120,6 @@ fn with_constructor(deployer_contract: FeatureContract, expected_gas: u64) { } ); assert_eq!(state.get_class_hash_at(contract_address).unwrap(), class_hash); - - assert_consistent_contract_version(deployer_contract, &state); - assert_consistent_contract_version(empty_contract, &state); } #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1);"VM")] @@ -145,8 +130,6 @@ fn to_unavailable_address(deployer_contract: FeatureContract) { 0, &[(deployer_contract, 1), (empty_contract, 0)], ); - assert_consistent_contract_version(deployer_contract, &state); - assert_consistent_contract_version(empty_contract, &state); let class_hash = deployer_contract.get_class_hash(); let constructor_calldata = vec![ @@ -166,7 +149,4 @@ fn to_unavailable_address(deployer_contract: FeatureContract) { let error = entry_point_call.execute_directly(&mut state).unwrap_err().to_string(); assert!(error.contains("is unavailable for deployment.")); - - assert_consistent_contract_version(deployer_contract, &state); - assert_consistent_contract_version(empty_contract, &state); } diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs index 8c6a2679fc..46c594e59f 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs @@ -5,7 +5,6 @@ use starknet_api::transaction::{Calldata, EventContent, EventData, EventKey}; use starknet_types_core::felt::Felt; use test_case::test_case; -use super::utils::assert_consistent_contract_version; use crate::abi::abi_utils::selector_from_name; use crate::context::ChainInfo; use crate::execution::call_info::{CallExecution, CallInfo, OrderedEvent}; @@ -98,7 +97,6 @@ fn emit_events( ) -> Result { let chain_info = &ChainInfo::create_for_testing(); let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - assert_consistent_contract_version(test_contract, &state); let calldata = Calldata( concat(vec![ n_emitted_events.to_owned(), @@ -117,6 +115,5 @@ fn emit_events( }; let result = entry_point_call.execute_directly(&mut state); - assert_consistent_contract_version(test_contract, &state); result } diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs index f014d076e7..163526dba9 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs @@ -6,7 +6,6 @@ use starknet_api::{calldata, felt}; use starknet_types_core::felt::Felt; use test_case::test_case; -use super::utils::assert_consistent_contract_version; use crate::abi::abi_utils::selector_from_name; use crate::abi::constants; use crate::context::ChainInfo; @@ -28,7 +27,6 @@ use crate::{check_entry_point_execution_error_for_custom_hint, retdata}; fn initialize_state(test_contract: FeatureContract) -> (CachedState, Felt, Felt) { let chain_info = &ChainInfo::create_for_testing(); let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - assert_consistent_contract_version(test_contract, &state); // Initialize block number -> block hash entry. let upper_bound_block_number = CURRENT_BLOCK_NUMBER - constants::STORED_BLOCK_HASH_BUFFER; @@ -60,8 +58,6 @@ fn positive_flow(test_contract: FeatureContract, expected_gas: u64) { ..CallExecution::from_retdata(retdata![block_hash]) } ); - - assert_consistent_contract_version(test_contract, &state); } #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1); "VM")] @@ -81,14 +77,6 @@ fn negative_flow_execution_mode_validate(test_contract: FeatureContract) { &error, "Unauthorized syscall get_block_hash in execution mode Validate.", ); - - assert!( - error - .to_string() - .contains("Unauthorized syscall get_block_hash in execution mode Validate") - ); - - assert_consistent_contract_version(test_contract, &state); } #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1); "VM")] @@ -106,5 +94,4 @@ fn negative_flow_block_number_out_of_range(test_contract: FeatureContract) { let error = entry_point_call.execute_directly(&mut state).unwrap_err().to_string(); assert!(error.contains("Block number out of range")); - assert_consistent_contract_version(test_contract, &state); } diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/get_execution_info.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/get_execution_info.rs index 89501aa6af..02e4f37dc9 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/get_execution_info.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/get_execution_info.rs @@ -25,7 +25,6 @@ use crate::context::ChainInfo; use crate::execution::common_hints::ExecutionMode; use crate::execution::entry_point::CallEntryPoint; use crate::execution::syscalls::hint_processor::{L1_GAS, L2_GAS}; -use crate::execution::syscalls::syscall_tests::utils::assert_consistent_contract_version; use crate::nonce; use crate::test_utils::contracts::FeatureContract; use crate::test_utils::initial_test_state::test_state; @@ -97,7 +96,6 @@ fn test_get_execution_info( only_query: bool, ) { let state = &mut test_state(&ChainInfo::create_for_testing(), BALANCE, &[(test_contract, 1)]); - assert_consistent_contract_version(test_contract, state); let expected_block_info = match execution_mode { ExecutionMode::Validate => [ // Rounded block number. @@ -155,7 +153,7 @@ fn test_get_execution_info( let expected_resource_bounds: Vec = match (test_contract, version) { (FeatureContract::LegacyTestContract, _) => vec![], - (_, version) if version == TransactionVersion(Felt::from_hex("0x1").unwrap()) => vec![ + (_, version) if version == TransactionVersion::ONE => vec![ felt!(0_u16), // Length of resource bounds array. ], (_, _) => vec![ @@ -171,7 +169,7 @@ fn test_get_execution_info( let expected_tx_info: Vec; let tx_info: TransactionInfo; - if version == TransactionVersion(Felt::from_hex("0x1").unwrap()) { + if version == TransactionVersion::ONE { expected_tx_info = vec![ version.0, /* Transaction * version. */ @@ -270,5 +268,4 @@ fn test_get_execution_info( }; assert!(!result.unwrap().execution.failed); - assert_consistent_contract_version(test_contract, state); } diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs index 1d13bde93e..d8c71bd4ba 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs @@ -13,7 +13,7 @@ use crate::abi::abi_utils::selector_from_name; use crate::context::ChainInfo; use crate::execution::call_info::{CallExecution, CallInfo, Retdata}; use crate::execution::entry_point::{CallEntryPoint, CallType}; -use crate::execution::syscalls::syscall_tests::consts::{ +use crate::execution::syscalls::syscall_tests::constants::{ REQUIRED_GAS_LIBRARY_CALL_TEST, REQUIRED_GAS_STORAGE_READ_WRITE_TEST, }; diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/mod.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/mod.rs index 0e39a50057..3f048e319a 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/mod.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/mod.rs @@ -1,5 +1,5 @@ mod call_contract; -mod consts; +mod constants; mod deploy; mod emit_event; mod get_block_hash; @@ -12,4 +12,3 @@ mod secp; mod send_message_to_l1; mod sha256; mod storage_read_write; -mod utils; diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs index 1ac010fc06..9f7a9e7c1a 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs @@ -5,7 +5,7 @@ use test_case::test_case; use crate::abi::abi_utils::selector_from_name; use crate::context::ChainInfo; use crate::execution::entry_point::CallEntryPoint; -use crate::execution::syscalls::syscall_tests::consts::REQUIRED_GAS_STORAGE_READ_WRITE_TEST; +use crate::execution::syscalls::syscall_tests::constants::REQUIRED_GAS_STORAGE_READ_WRITE_TEST; use crate::test_utils::contracts::FeatureContract; use crate::test_utils::initial_test_state::test_state; use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE}; diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs index 36fb0df04f..bffb68bb18 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs @@ -7,8 +7,7 @@ use crate::abi::abi_utils::selector_from_name; use crate::context::ChainInfo; use crate::execution::call_info::{CallExecution, Retdata}; use crate::execution::entry_point::CallEntryPoint; -use crate::execution::syscalls::syscall_tests::consts::REQUIRED_GAS_STORAGE_READ_WRITE_TEST; -use crate::execution::syscalls::syscall_tests::utils::assert_consistent_contract_version; +use crate::execution::syscalls::syscall_tests::constants::REQUIRED_GAS_STORAGE_READ_WRITE_TEST; use crate::retdata; use crate::state::state_api::StateReader; use crate::test_utils::contracts::FeatureContract; @@ -20,8 +19,6 @@ fn test_storage_read_write(test_contract: FeatureContract, expected_gas: u64) { let chain_info = &ChainInfo::create_for_testing(); let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); - assert_consistent_contract_version(test_contract, &state); - let key = felt!(1234_u16); let value = felt!(18_u8); let calldata = calldata![key, value]; @@ -44,7 +41,4 @@ fn test_storage_read_write(test_contract: FeatureContract, expected_gas: u64) { let value_from_state = state.get_storage_at(storage_address, StorageKey::try_from(key).unwrap()).unwrap(); assert_eq!(value_from_state, value); - - // ensure that the fallback system didn't replace the contract - assert_consistent_contract_version(test_contract, &state); } diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/utils.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/utils.rs deleted file mode 100644 index ef61800b0c..0000000000 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/utils.rs +++ /dev/null @@ -1,27 +0,0 @@ -use assert_matches::assert_matches; - -use crate::execution::contract_class::ContractClass; -use crate::state::state_api::State; -use crate::test_utils::contracts::FeatureContract; - -pub fn assert_consistent_contract_version(contract: FeatureContract, state: &dyn State) { - let hash = contract.get_class_hash(); - match contract { - FeatureContract::SecurityTests - | FeatureContract::ERC20(_) - | FeatureContract::LegacyTestContract - | FeatureContract::AccountWithLongValidate(_) - | FeatureContract::AccountWithoutValidations(_) - | FeatureContract::Empty(_) - | FeatureContract::FaultyAccount(_) - | FeatureContract::TestContract(_) => { - // Assert contract uses VM - assert_matches!( - state - .get_compiled_contract_class(hash) - .unwrap_or_else(|_| panic!("Expected contract class at {hash}")), - ContractClass::V1(_) | ContractClass::V0(_) - ) - } - } -} From 47e696958403926ecc403d9c9113efb0b34ab683 Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Thu, 8 Aug 2024 12:01:06 +0300 Subject: [PATCH 04/21] fix: conflicts after merge --- .../blockifier/src/execution/syscalls/syscall_tests/keccak.rs | 2 +- crates/blockifier/src/execution/syscalls/syscall_tests/secp.rs | 2 +- .../blockifier/src/execution/syscalls/syscall_tests/sha256.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/keccak.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/keccak.rs index db7cfdc33b..585187db9c 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/keccak.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/keccak.rs @@ -10,7 +10,7 @@ use crate::test_utils::contracts::FeatureContract; use crate::test_utils::initial_test_state::test_state; use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE}; -#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 256250; "VM")] +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 255110; "VM")] fn test_keccak(test_contract: FeatureContract, expected_gas: u64) { let chain_info = &ChainInfo::create_for_testing(); let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/secp.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/secp.rs index 0066067c13..9bb21473cc 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/secp.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/secp.rs @@ -9,7 +9,7 @@ use crate::test_utils::contracts::FeatureContract; use crate::test_utils::initial_test_state::test_state; use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE}; -#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 17033810; "VM")] +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 17032670; "VM")] fn test_secp256k1(test_contract: FeatureContract, expected_gas: u64) { let chain_info = &ChainInfo::create_for_testing(); let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/sha256.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/sha256.rs index 2f239c49c0..4d60eff586 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/sha256.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/sha256.rs @@ -10,7 +10,7 @@ use crate::test_utils::contracts::FeatureContract; use crate::test_utils::initial_test_state::test_state; use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE}; -#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 892990; "VM")] +#[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 893590; "VM")] fn test_sha256(test_contract: FeatureContract, gas_consumed: u64) { let chain_info = &ChainInfo::create_for_testing(); let mut state = test_state(chain_info, BALANCE, &[(test_contract, 1)]); From 86df83bb266f793c8ba318a44c36b61d10d87c6d Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Thu, 8 Aug 2024 12:31:24 +0300 Subject: [PATCH 05/21] fix: clippy warnings --- .../src/execution/syscalls/syscall_tests/emit_event.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs index 46c594e59f..cd7a0a3c1e 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs @@ -114,6 +114,5 @@ fn emit_events( ..trivial_external_entry_point_new(test_contract) }; - let result = entry_point_call.execute_directly(&mut state); - result + entry_point_call.execute_directly(&mut state) } From e70684e0e8df9310e70078a9114e464e8405ba37 Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Thu, 8 Aug 2024 13:28:58 +0300 Subject: [PATCH 06/21] feat: add ability of native execution --- Cargo.lock | 1749 +++++++++++------ Cargo.toml | 73 +- crates/blockifier/Cargo.toml | 2 + crates/blockifier/src/execution.rs | 1 + crates/blockifier/src/execution/call_info.rs | 14 +- .../src/execution/contract_class.rs | 223 ++- crates/blockifier/src/execution/errors.rs | 14 +- .../src/execution/execution_utils.rs | 10 + crates/blockifier/src/execution/native.rs | 3 + .../execution/native/entry_point_execution.rs | 34 + .../src/execution/native/syscall_handler.rs | 318 +++ .../blockifier/src/execution/native/utils.rs | 207 ++ .../src/execution/native/utils_test.rs | 87 + .../blockifier/src/execution/syscalls/mod.rs | 2 +- crates/blockifier/src/test_utils/contracts.rs | 3 + .../blockifier/src/transaction/test_utils.rs | 2 +- .../src/transaction/transaction_utils.rs | 1 + 17 files changed, 2060 insertions(+), 683 deletions(-) create mode 100644 crates/blockifier/src/execution/native.rs create mode 100644 crates/blockifier/src/execution/native/entry_point_execution.rs create mode 100644 crates/blockifier/src/execution/native/syscall_handler.rs create mode 100644 crates/blockifier/src/execution/native/utils.rs create mode 100644 crates/blockifier/src/execution/native/utils_test.rs diff --git a/Cargo.lock b/Cargo.lock index b4a97d3c2a..ad8646cf36 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,9 +14,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -114,9 +114,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -129,33 +129,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.3" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -163,9 +163,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arc-swap" @@ -203,7 +203,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools 0.10.5", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "paste", "rustc_version", @@ -226,7 +226,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "proc-macro2", "quote", @@ -277,7 +277,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint 0.4.5", + "num-bigint 0.4.6", ] [[package]] @@ -303,9 +303,9 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" @@ -324,9 +324,9 @@ dependencies = [ [[package]] name = "asn1-rs" -version = "0.5.2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" dependencies = [ "asn1-rs-derive", "asn1-rs-impl", @@ -340,25 +340,25 @@ dependencies = [ [[package]] name = "asn1-rs-derive" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.72", "synstructure", ] [[package]] name = "asn1-rs-impl" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.72", ] [[package]] @@ -390,22 +390,21 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.2.1" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136d4d23bcc79e27423727b36823d86233aad06dfea531837b038394d11e9928" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener 5.3.0", - "event-listener-strategy 0.5.2", + "event-listener-strategy", "futures-core", "pin-project-lite", ] [[package]] name = "async-compression" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9eabd7a98fe442131a17c316bd9349c43695e49e730c3c8e12cfb5f4da2693" +checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" dependencies = [ "flate2", "futures-core", @@ -416,9 +415,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a" +checksum = "d7ebdfa2ebdab6b1760375fa7d6f382b9f486eac35fc994625a00e89280bdbb7" dependencies = [ "async-task", "concurrent-queue", @@ -445,10 +444,10 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel 2.2.1", + "async-channel 2.3.1", "async-executor", - "async-io 2.3.2", - "async-lock 3.3.0", + "async-io 2.3.3", + "async-lock 3.4.0", "blocking", "futures-lite 2.3.0", "once_cell", @@ -476,17 +475,17 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" +checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" dependencies = [ - "async-lock 3.3.0", + "async-lock 3.4.0", "cfg-if", "concurrent-queue", "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.7.0", + "polling 3.7.2", "rustix 0.38.34", "slab", "tracing", @@ -504,12 +503,12 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 4.0.3", - "event-listener-strategy 0.4.0", + "event-listener 5.3.1", + "event-listener-strategy", "pin-project-lite", ] @@ -549,17 +548,17 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] name = "async-signal" -version = "0.2.6" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda" +checksum = "dfb3634b73397aa844481f814fad23bbf07fdb0eabec10f2eb95e58944b1ec32" dependencies = [ - "async-io 2.3.2", - "async-lock 3.3.0", + "async-io 2.3.3", + "async-lock 3.4.0", "atomic-waker", "cfg-if", "futures-core", @@ -615,7 +614,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -626,13 +625,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -684,7 +683,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2" dependencies = [ - "http", + "http 0.2.12", "log", "url", ] @@ -708,7 +707,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -737,9 +736,9 @@ dependencies = [ "bitflags 1.3.2", "bytes", "futures-util", - "http", - "http-body", - "hyper", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", "itoa", "matchit", "memchr", @@ -767,8 +766,8 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http", - "http-body", + "http 0.2.12", + "http-body 0.4.6", "mime", "rustversion", "tower-layer", @@ -777,9 +776,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -847,7 +846,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "serde", @@ -877,7 +876,7 @@ version = "0.66.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cexpr", "clang-sys", "lazy_static", @@ -886,9 +885,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -897,18 +896,21 @@ version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cexpr", "clang-sys", "itertools 0.12.1", "lazy_static", "lazycell", + "log", + "prettyplease", "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", - "syn 2.0.61", + "syn 2.0.72", + "which", ] [[package]] @@ -934,9 +936,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitvec" @@ -990,17 +992,19 @@ dependencies = [ "cached", "cairo-lang-casm", "cairo-lang-runner", + "cairo-lang-sierra", "cairo-lang-starknet-classes", "cairo-lang-utils", + "cairo-native", "cairo-vm", "criterion 0.3.6", "derive_more", "glob", - "indexmap 2.2.6", + "indexmap 2.3.0", "itertools 0.10.5", "keccak", "log", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-rational 0.4.2", "num-traits 0.2.19", @@ -1027,12 +1031,11 @@ dependencies = [ [[package]] name = "blocking" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ - "async-channel 2.2.1", - "async-lock 3.3.0", + "async-channel 2.3.1", "async-task", "futures-io", "futures-lite 2.3.0", @@ -1051,9 +1054,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", "serde", @@ -1085,9 +1088,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" dependencies = [ "serde", ] @@ -1157,7 +1160,7 @@ checksum = "4a43421bf72645b3a562d264747166d6f093e960a69dfa38b67bb3209e370366" dependencies = [ "cairo-lang-utils", "indoc 2.0.5", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "parity-scale-codec", "schemars", @@ -1289,7 +1292,7 @@ dependencies = [ "id-arena", "itertools 0.12.1", "log", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "once_cell", "salsa", @@ -1309,7 +1312,7 @@ dependencies = [ "cairo-lang-utils", "colored", "itertools 0.12.1", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "salsa", "smol_str", @@ -1343,7 +1346,7 @@ checksum = "3d55dcf98a6e1a03e0b36129fad4253f9e6666a1746ab9c075d212ba68a4e9c1" dependencies = [ "cairo-lang-debug", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -1381,7 +1384,7 @@ dependencies = [ "cairo-vm", "itertools 0.12.1", "keccak", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "rand 0.8.5", @@ -1410,7 +1413,7 @@ dependencies = [ "id-arena", "indoc 2.0.5", "itertools 0.12.1", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "once_cell", "salsa", @@ -1432,7 +1435,7 @@ dependencies = [ "itertools 0.12.1", "lalrpop", "lalrpop-util", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "once_cell", @@ -1457,7 +1460,7 @@ dependencies = [ "cairo-lang-sierra-type-size", "cairo-lang-utils", "itertools 0.12.1", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "thiserror", ] @@ -1473,7 +1476,7 @@ dependencies = [ "cairo-lang-sierra-type-size", "cairo-lang-utils", "itertools 0.12.1", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "thiserror", ] @@ -1518,7 +1521,7 @@ dependencies = [ "cairo-lang-utils", "indoc 2.0.5", "itertools 0.12.1", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "starknet-types-core", "thiserror", @@ -1577,7 +1580,7 @@ dependencies = [ "cairo-lang-utils", "convert_case 0.6.0", "itertools 0.12.1", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "once_cell", @@ -1598,7 +1601,7 @@ dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", "cairo-lang-utils", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "salsa", "smol_str", @@ -1615,6 +1618,34 @@ dependencies = [ "xshell", ] +[[package]] +name = "cairo-lang-test-plugin" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20b526ea053b930222352027b3259be44fb3cd3b25106e2b1fbc815526423650" +dependencies = [ + "anyhow", + "cairo-lang-compiler", + "cairo-lang-debug", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-lowering", + "cairo-lang-semantic", + "cairo-lang-sierra", + "cairo-lang-sierra-generator", + "cairo-lang-starknet", + "cairo-lang-starknet-classes", + "cairo-lang-syntax", + "cairo-lang-utils", + "indoc 2.0.5", + "itertools 0.12.1", + "num-bigint 0.4.6", + "num-traits 0.2.19", + "serde", + "starknet-types-core", +] + [[package]] name = "cairo-lang-test-utils" version = "2.7.0" @@ -1635,15 +1666,78 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bd5c8c127b9362a12ffb9dede38e792c81b4ded5a98b448baec157b745f47d1" dependencies = [ "hashbrown 0.14.5", - "indexmap 2.2.6", + "indexmap 2.3.0", "itertools 0.12.1", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "parity-scale-codec", "schemars", "serde", ] +[[package]] +name = "cairo-native" +version = "0.2.0" +source = "git+https://github.com/lambdaclass/cairo_native?branch=cairo-lang2.7.0-rc.3#332cd5f80fa747d59e07fec0eff753cf7e2717fb" +dependencies = [ + "anyhow", + "bumpalo", + "cairo-lang-compiler", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-lowering", + "cairo-lang-runner", + "cairo-lang-semantic", + "cairo-lang-sierra", + "cairo-lang-sierra-ap-change", + "cairo-lang-sierra-gas", + "cairo-lang-sierra-generator", + "cairo-lang-starknet", + "cairo-lang-starknet-classes", + "cairo-lang-test-plugin", + "cairo-lang-utils", + "cairo-native-runtime", + "cc", + "clap 4.5.13", + "colored", + "educe", + "id-arena", + "itertools 0.13.0", + "k256", + "keccak", + "lazy_static", + "libc", + "libloading", + "llvm-sys", + "melior", + "mlir-sys", + "num-bigint 0.4.6", + "num-traits 0.2.19", + "p256", + "sec1", + "sha2", + "starknet-types-core", + "stats_alloc", + "tempfile", + "thiserror", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "cairo-native-runtime" +version = "0.2.0" +source = "git+https://github.com/lambdaclass/cairo_native?branch=cairo-lang2.7.0-rc.3#332cd5f80fa747d59e07fec0eff753cf7e2717fb" +dependencies = [ + "cairo-lang-sierra-gas", + "lazy_static", + "libc", + "starknet-crypto 0.6.2", + "starknet-curve 0.4.2", + "starknet-types-core", +] + [[package]] name = "cairo-vm" version = "1.0.0-rc6" @@ -1659,7 +1753,7 @@ dependencies = [ "keccak", "lazy_static", "nom", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-prime", "num-traits 0.2.19", @@ -1683,9 +1777,9 @@ checksum = "02d88a780e6aa14b75d7be99f374d8b5c315aaf9c12ada1e2b1cb281468584c9" [[package]] name = "camino" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" dependencies = [ "serde", ] @@ -1721,13 +1815,12 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.97" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" +checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549" dependencies = [ "jobserver", "libc", - "once_cell", ] [[package]] @@ -1787,7 +1880,7 @@ dependencies = [ "num-traits 0.2.19", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1830,9 +1923,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -1852,9 +1945,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "0fbb260a053428790f3de475e304ff84cdbc4face759ea7a3e64c1edd938a7fc" dependencies = [ "clap_builder", "clap_derive", @@ -1862,9 +1955,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" dependencies = [ "anstream", "anstyle", @@ -1874,21 +1967,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "cloudabi" @@ -1953,9 +2046,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colored" @@ -1992,13 +2085,13 @@ dependencies = [ name = "committer_cli" version = "0.1.0-rc.0" dependencies = [ - "clap 4.5.4", + "clap 4.5.13", "committer", "criterion 0.5.1", "derive_more", "ethnum", "futures", - "indexmap 2.2.6", + "indexmap 2.3.0", "log", "pretty_assertions", "rand 0.8.5", @@ -2016,6 +2109,22 @@ dependencies = [ "tokio", ] +[[package]] +name = "comrak" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a972c8ec1be8065f7b597b5f7f5b3be535db780280644aebdcd1966decf58dc" +dependencies = [ + "derive_builder", + "entities", + "memchr", + "once_cell", + "regex", + "slug", + "typed-arena", + "unicode_categories", +] + [[package]] name = "concurrent-queue" version = "2.5.0" @@ -2045,9 +2154,9 @@ checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca" [[package]] name = "const-hex" -version = "1.11.3" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" +checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" dependencies = [ "cfg-if", "cpufeatures", @@ -2167,9 +2276,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -2209,7 +2318,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.5.4", + "clap 4.5.13", "criterion-plot 0.5.0", "is-terminal", "itertools 0.10.5", @@ -2276,9 +2385,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -2351,16 +2460,15 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.2" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "platforms", "rustc_version", "subtle", "zeroize", @@ -2374,7 +2482,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -2389,12 +2497,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.8", - "darling_macro 0.20.8", + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -2413,16 +2521,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 2.0.61", + "strsim 0.11.1", + "syn 2.0.72", ] [[package]] @@ -2438,13 +2546,27 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.8", + "darling_core 0.20.10", "quote", - "syn 2.0.61", + "syn 2.0.72", +] + +[[package]] +name = "dashmap" +version = "6.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "804c8821570c3f8b70230c2ba75ffa5c0f9a4189b9a432b6656c536712acae28" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core 0.9.10", ] [[package]] @@ -2496,19 +2618,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", + "pem-rfc7468", "zeroize", ] [[package]] name = "der-parser" -version = "8.2.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" dependencies = [ "asn1-rs", "displaydoc", "nom", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "rusticata-macros", ] @@ -2533,19 +2656,56 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_builder" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" +dependencies = [ + "darling 0.20.10", + "proc-macro2", + "quote", + "syn 2.0.72", +] + +[[package]] +name = "derive_builder_macro" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" +dependencies = [ + "derive_builder_core", + "syn 2.0.72", +] + [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version", - "syn 1.0.109", + "syn 2.0.72", ] +[[package]] +name = "deunicode" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" + [[package]] name = "diff" version = "0.1.13" @@ -2626,13 +2786,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -2655,9 +2815,9 @@ checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" @@ -2704,11 +2864,23 @@ dependencies = [ "zeroize", ] +[[package]] +name = "educe" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4bd92664bf78c4d3dba9b7cdafce6fa15b13ed3ed16175218196942e99168a8" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 2.0.72", +] + [[package]] name = "either" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -2722,6 +2894,7 @@ dependencies = [ "ff", "generic-array", "group", + "pem-rfc7468", "pkcs8", "rand_core 0.6.4", "sec1", @@ -2771,6 +2944,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "entities" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca" + [[package]] name = "enum-as-inner" version = "0.6.0" @@ -2780,7 +2959,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -2811,23 +2990,43 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", +] + +[[package]] +name = "enum-ordinalize" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", ] [[package]] name = "env_filter" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ "log", ] [[package]] name = "env_logger" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" dependencies = [ "anstream", "anstyle", @@ -2987,7 +3186,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "syn 2.0.61", + "syn 2.0.72", "toml", "walkdir", ] @@ -3005,7 +3204,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -3030,8 +3229,8 @@ dependencies = [ "rlp", "serde", "serde_json", - "strum 0.26.2", - "syn 2.0.61", + "strum 0.26.3", + "syn 2.0.72", "tempfile", "thiserror", "tiny-keccak", @@ -3098,7 +3297,7 @@ dependencies = [ "futures-timer", "futures-util", "hashers", - "http", + "http 0.2.12", "instant", "jsonwebtoken", "once_cell", @@ -3194,43 +3393,22 @@ dependencies = [ [[package]] name = "event-listener" -version = "4.0.3" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", "pin-project-lite", ] -[[package]] -name = "event-listener" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.3", - "pin-project-lite", -] - [[package]] name = "event-listener-strategy" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.3.0", + "event-listener 5.3.1", "pin-project-lite", ] @@ -3281,9 +3459,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38793c55593b33412e3ae40c2c9781ffaa6f438f6f8c10f24e71846fbd7ae01e" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "filetime" @@ -3317,9 +3495,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" dependencies = [ "crc32fast", "miniz_oxide", @@ -3422,9 +3600,9 @@ dependencies = [ [[package]] name = "futures-bounded" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e2774cc104e198ef3d3e1ff4ab40f86fa3245d6cb6a3a46174f21463cee173" +checksum = "91f328e7fb845fc832912fb6a34f40cf6d1888c92f974d1893a54e97b5ff542e" dependencies = [ "futures-timer", "futures-util", @@ -3510,17 +3688,18 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] name = "futures-rustls" -version = "0.24.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd3cf68c183738046838e300353e4716c674dc5e56890de4826801a6622a28" +checksum = "a8f2f12607f92c69b12ed746fabf9ca4f5c482cba46679c1a75b874ed7c26adb" dependencies = [ "futures-io", - "rustls", + "rustls 0.23.12", + "rustls-pki-types", ] [[package]] @@ -3585,9 +3764,9 @@ dependencies = [ [[package]] name = "genco" -version = "0.17.8" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98d7af598790738fee616426e669360fa361273b1b9c9b7f30c92fa627605cad" +checksum = "afac3cbb14db69ac9fef9cdb60d8a87e39a7a527f85a81a923436efa40ad42c6" dependencies = [ "genco-macros", "relative-path", @@ -3596,13 +3775,13 @@ dependencies = [ [[package]] name = "genco-macros" -version = "0.17.8" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4cf186fea4af17825116f72932fe52cce9a13bae39ff63b4dc0cfdb3fb4bde1" +checksum = "553630feadf7b76442b0849fd25fdf89b860d933623aec9693fed19af0400c78" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -3641,9 +3820,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -3660,8 +3839,8 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -3674,7 +3853,7 @@ dependencies = [ "futures-core", "futures-sink", "gloo-utils", - "http", + "http 0.2.12", "js-sys", "pin-project", "serde", @@ -3733,7 +3912,7 @@ dependencies = [ "flume", "futures", "gumdrop", - "http", + "http 0.2.12", "itertools 0.11.0", "lazy_static", "log", @@ -3794,8 +3973,27 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 2.2.6", + "http 0.2.12", + "indexmap 2.3.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", + "indexmap 2.3.0", "slab", "tokio", "tokio-util", @@ -3899,6 +4097,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -3948,7 +4152,7 @@ dependencies = [ "ipconfig", "lru-cache", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "rand 0.8.5", "resolv-conf", "smallvec", @@ -4006,6 +4210,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -4013,15 +4228,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -4037,17 +4275,17 @@ checksum = "91f255a4535024abf7640cb288260811fc14794f62b063652ed349f9a6c2348e" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -4059,6 +4297,26 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -4066,10 +4324,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", - "hyper", + "http 0.2.12", + "hyper 0.14.30", "log", - "rustls", + "rustls 0.21.12", "rustls-native-certs", "tokio", "tokio-rustls", @@ -4082,12 +4340,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.30", "native-tls", "tokio", "tokio-native-tls", ] +[[package]] +name = "hyper-util" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.4.1", + "pin-project-lite", + "tokio", +] + [[package]] name = "iana-time-zone" version = "0.1.60" @@ -4180,7 +4453,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io 2.3.2", + "async-io 2.3.3", "core-foundation", "fnv", "futures", @@ -4210,8 +4483,8 @@ dependencies = [ "attohttpc", "bytes", "futures", - "http", - "hyper", + "http 0.2.12", + "hyper 0.14.30", "log", "rand 0.8.5", "tokio", @@ -4229,7 +4502,7 @@ dependencies = [ "globset", "log", "memchr", - "regex-automata 0.4.6", + "regex-automata 0.4.7", "same-file", "walkdir", "winapi-util", @@ -4298,9 +4571,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -4330,9 +4603,9 @@ dependencies = [ [[package]] name = "insta" -version = "1.38.0" +version = "1.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eab73f58e59ca6526037208f0e98851159ec1633cf17b6cd2e1f2c3fd5d53cc" +checksum = "810ae6042d48e2c9e9215043563a58a80b877bc863228a74cf10c49d4620a6f5" dependencies = [ "console", "lazy_static", @@ -4343,9 +4616,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -4398,9 +4671,9 @@ dependencies = [ [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "iso8601" @@ -4438,6 +4711,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -4446,9 +4728,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] @@ -4489,7 +4771,7 @@ dependencies = [ "futures-channel", "futures-util", "gloo-net", - "http", + "http 0.2.12", "jsonrpsee-core", "pin-project", "rustls-native-certs", @@ -4515,11 +4797,11 @@ dependencies = [ "beef", "futures-timer", "futures-util", - "hyper", + "hyper 0.14.30", "jsonrpsee-types", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "rand 0.8.5", - "rustc-hash", + "rustc-hash 1.1.0", "serde", "serde_json", "soketto", @@ -4536,7 +4818,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" dependencies = [ "async-trait", - "hyper", + "hyper 0.14.30", "hyper-rustls", "jsonrpsee-core", "jsonrpsee-types", @@ -4569,8 +4851,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82c39a00449c9ef3f50b84fc00fc4acba20ef8f559f07902244abf4c15c5ab9c" dependencies = [ "futures-util", - "http", - "hyper", + "http 0.2.12", + "hyper 0.14.30", "jsonrpsee-core", "jsonrpsee-types", "route-recognizer", @@ -4616,7 +4898,7 @@ version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" dependencies = [ - "http", + "http 0.2.12", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-types", @@ -4633,7 +4915,7 @@ dependencies = [ "anyhow", "base64 0.21.7", "bytecount", - "clap 4.5.4", + "clap 4.5.13", "fancy-regex", "fraction", "getrandom", @@ -4642,7 +4924,7 @@ dependencies = [ "memchr", "num-cmp", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "percent-encoding", "regex", "reqwest", @@ -4650,7 +4932,7 @@ dependencies = [ "serde_json", "time", "url", - "uuid 1.8.0", + "uuid 1.10.0", ] [[package]] @@ -4713,7 +4995,7 @@ dependencies = [ "petgraph", "pico-args", "regex", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", "string_cache", "term", "tiny-keccak", @@ -4727,7 +5009,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex-automata 0.4.6", + "regex-automata 0.4.7", ] [[package]] @@ -4754,11 +5036,11 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin 0.5.2", + "spin 0.9.8", ] [[package]] @@ -4769,18 +5051,18 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.154" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -4795,14 +5077,14 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f0bee397dc9a7003e7bd34fffc1dc2d4c4fdc96530a0c439a5f98c9402bc7bf" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "byteorder", "derive_more", "indexmap 1.9.3", "libc", "lifetimed-bytes", "mdbx-sys", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "thiserror", ] @@ -4866,21 +5148,20 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.41.2" +version = "0.41.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8130a8269e65a2554d55131c770bdf4bcd94d2b8d4efb24ca23699be65066c05" +checksum = "a5a8920cbd8540059a01950c1e5c96ea8d89eb50c51cd366fc18bdf540a6e48f" dependencies = [ "either", "fnv", "futures", "futures-timer", - "instant", "libp2p-identity", "multiaddr", "multihash", "multistream-select", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "pin-project", "quick-protobuf", "rand 0.8.5", @@ -4891,6 +5172,7 @@ dependencies = [ "tracing", "unsigned-varint 0.8.0", "void", + "web-time", ] [[package]] @@ -4904,7 +5186,7 @@ dependencies = [ "hickory-resolver", "libp2p-core", "libp2p-identity", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "smallvec", "tracing", ] @@ -4966,9 +5248,9 @@ dependencies = [ [[package]] name = "libp2p-identity" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0" +checksum = "55cca1eb2bc1fd29f099f3daaab7effd01e1a54b7c577d0ed082521034d912e8" dependencies = [ "bs58", "ed25519-dalek", @@ -5096,9 +5378,9 @@ dependencies = [ [[package]] name = "libp2p-quic" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0375cdfee57b47b313ef1f0fdb625b78aed770d33a40cf1c294a371ff5e6666" +checksum = "c67296ad4e092e23f92aea3d2bdb6f24eab79c0929ed816dfb460ea2f4567d2b" dependencies = [ "bytes", "futures", @@ -5107,11 +5389,11 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-tls", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "quinn", "rand 0.8.5", - "ring 0.16.20", - "rustls", + "ring 0.17.8", + "rustls 0.23.12", "socket2 0.5.7", "thiserror", "tokio", @@ -5152,7 +5434,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -5194,18 +5476,18 @@ dependencies = [ [[package]] name = "libp2p-tls" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ce7e3c2e7569d685d08ec795157981722ff96e9e9f9eae75df3c29d02b07a5" +checksum = "72b7b831e55ce2aa6c354e6861a85fdd4dd0a2b97d5e276fabac0e4810a71776" dependencies = [ "futures", "futures-rustls", "libp2p-core", "libp2p-identity", "rcgen", - "ring 0.16.20", - "rustls", - "rustls-webpki", + "ring 0.17.8", + "rustls 0.23.12", + "rustls-webpki 0.101.7", "thiserror", "x509-parser", "yasna", @@ -5229,9 +5511,9 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.45.1" +version = "0.45.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200cbe50349a44760927d50b431d77bed79b9c0a3959de1af8d24a63434b71e5" +checksum = "ddd5265f6b80f94d48a3963541aad183cc598a645755d2f1805a373e41e0716b" dependencies = [ "either", "futures", @@ -5239,7 +5521,7 @@ dependencies = [ "thiserror", "tracing", "yamux 0.12.1", - "yamux 0.13.2", + "yamux 0.13.3", ] [[package]] @@ -5259,7 +5541,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", ] @@ -5286,9 +5568,23 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "llvm-sys" +version = "181.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "1d255b36907416971229095a8465c0b69f5f1c6fb8421b6dcdbb64eb47e1be90" +dependencies = [ + "anyhow", + "cc", + "lazy_static", + "libc", + "regex-lite", + "semver", +] [[package]] name = "lock_api" @@ -5302,18 +5598,18 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" dependencies = [ "value-bag", ] [[package]] name = "lru" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" dependencies = [ "hashbrown 0.14.5", ] @@ -5378,26 +5674,55 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ - "cfg-if", - "digest 0.10.7", + "cfg-if", + "digest 0.10.7", +] + +[[package]] +name = "mdbx-sys" +version = "0.12.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a329f8d655fb646cc9511c00886eefcddb6ef131869ef2d4b02c24c66825ac" +dependencies = [ + "bindgen 0.66.1", + "cc", + "libc", +] + +[[package]] +name = "melior" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eef59ece7b54480260f4871495a389e9ebca60f2fa531f6cd1396e2281977d1b" +dependencies = [ + "dashmap", + "melior-macro", + "mlir-sys", + "once_cell", ] [[package]] -name = "mdbx-sys" -version = "0.12.7" +name = "melior-macro" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a329f8d655fb646cc9511c00886eefcddb6ef131869ef2d4b02c24c66825ac" +checksum = "8ff00b56cdb2b3b49b4bfc80f7e869d8f1e8c851595044a9462db66c599c6c3d" dependencies = [ - "bindgen 0.66.1", - "cc", - "libc", + "comrak", + "convert_case 0.6.0", + "once_cell", + "proc-macro2", + "quote", + "regex", + "syn 2.0.72", + "tblgen-alt", + "unindent 0.2.3", ] [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -5455,7 +5780,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d4fa7ce7c4862db464a37b0b31d89bca874562f034bd7993895572783d02950" dependencies = [ "base64 0.21.7", - "hyper", + "hyper 0.14.30", "indexmap 1.9.3", "ipnet", "metrics 0.21.1", @@ -5474,7 +5799,7 @@ checksum = "38b4faf00617defe497754acde3024865bc143d44a86799b24e191ecff91354f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -5531,22 +5856,32 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "mlir-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1b5806a63bc959cd5c4e5db8cadd20e40045d41969d325132748db8af11b7f" +dependencies = [ + "bindgen 0.69.4", ] [[package]] @@ -5573,7 +5908,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -5596,14 +5931,19 @@ dependencies = [ [[package]] name = "mockito" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f6e023aa5bdf392aa06c78e4a4e6d498baab5138d0c993503350ebbc37bf1e" +checksum = "09b34bd91b9e5c5b06338d392463e1318d683cf82ec3d3af4014609be6e2108d" dependencies = [ "assert-json-diff", + "bytes", "colored", - "futures-core", - "hyper", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-util", "log", "rand 0.8.5", "regex", @@ -5685,11 +6025,10 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -5709,9 +6048,9 @@ dependencies = [ "cached", "cairo-lang-starknet-classes", "cairo-vm", - "indexmap 2.2.6", + "indexmap 2.3.0", "log", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "papyrus_storage", "pretty_assertions", "pyo3", @@ -5827,7 +6166,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "cfg_aliases", "libc", @@ -5879,7 +6218,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-complex 0.4.6", "num-integer", "num-iter", @@ -5900,9 +6239,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits 0.2.19", @@ -5977,7 +6316,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64a5fe11d4135c3bcdf3a95b18b194afa9608a5f6ff034f5d857bc9a27fb0119" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", ] @@ -5991,7 +6330,7 @@ dependencies = [ "bitvec", "either", "lru", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-modular", "num-traits 0.2.19", @@ -6016,7 +6355,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "serde", @@ -6053,23 +6392,23 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -6083,18 +6422,18 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] [[package]] name = "oid-registry" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +checksum = "1c958dd45046245b9c3c2547369bb634eb461670b2e7e0de552905801a648d1d" dependencies = [ "asn1-rs", ] @@ -6107,9 +6446,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "opaque-debug" @@ -6144,11 +6483,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -6165,7 +6504,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -6176,9 +6515,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -6209,6 +6548,18 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + [[package]] name = "page_size" version = "0.6.0" @@ -6260,7 +6611,7 @@ dependencies = [ "assert_matches", "cairo-lang-starknet-classes", "hex", - "indexmap 2.2.6", + "indexmap 2.3.0", "itertools 0.10.5", "lazy_static", "papyrus_test_utils", @@ -6279,7 +6630,7 @@ name = "papyrus_config" version = "0.4.0-rc.0" dependencies = [ "assert_matches", - "clap 4.5.4", + "clap 4.5.13", "itertools 0.10.5", "lazy_static", "papyrus_test_utils", @@ -6327,7 +6678,7 @@ dependencies = [ "cairo-lang-starknet-classes", "cairo-lang-utils", "cairo-vm", - "indexmap 2.2.6", + "indexmap 2.3.0", "itertools 0.10.5", "lazy_static", "once_cell", @@ -6368,8 +6719,8 @@ name = "papyrus_monitoring_gateway" version = "0.4.0-rc.0" dependencies = [ "axum", - "http-body", - "hyper", + "http-body 0.4.6", + "hyper 0.14.30", "metrics 0.21.1", "metrics-exporter-prometheus", "metrics-process", @@ -6424,7 +6775,7 @@ version = "0.4.0-rc.0" dependencies = [ "anyhow", "assert-json-diff", - "clap 4.5.4", + "clap 4.5.13", "colored", "const_format", "futures", @@ -6470,7 +6821,7 @@ dependencies = [ "chrono", "enum-iterator", "futures", - "indexmap 2.2.6", + "indexmap 2.3.0", "lazy_static", "metrics 0.21.1", "papyrus_common", @@ -6502,14 +6853,14 @@ dependencies = [ "papyrus_test_utils", "prometheus-parse", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] name = "papyrus_protobuf" version = "0.4.0-rc.0" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.3.0", "lazy_static", "papyrus_common", "papyrus_test_utils", @@ -6540,8 +6891,8 @@ dependencies = [ "flate2", "futures-util", "hex", - "hyper", - "indexmap 2.2.6", + "hyper 0.14.30", + "indexmap 2.3.0", "insta", "itertools 0.10.5", "jsonrpsee", @@ -6586,9 +6937,9 @@ dependencies = [ "cairo-lang-starknet-classes", "cairo-lang-utils", "camelpaste", - "clap 4.5.4", + "clap 4.5.13", "human_bytes", - "indexmap 2.2.6", + "indexmap 2.3.0", "insta", "integer-encoding", "lazy_static", @@ -6596,7 +6947,7 @@ dependencies = [ "memmap2", "metrics 0.21.1", "metrics-exporter-prometheus", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "page_size", "papyrus_common", @@ -6638,7 +6989,7 @@ dependencies = [ "chrono", "futures", "futures-util", - "indexmap 2.2.6", + "indexmap 2.3.0", "itertools 0.10.5", "lru", "metrics 0.21.1", @@ -6669,8 +7020,8 @@ dependencies = [ "cairo-lang-casm", "cairo-lang-starknet-classes", "cairo-lang-utils", - "indexmap 2.2.6", - "num-bigint 0.4.5", + "indexmap 2.3.0", + "num-bigint 0.4.6", "pretty_assertions", "primitive-types", "prometheus-parse", @@ -6728,9 +7079,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core 0.9.10", @@ -6758,9 +7109,9 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall 0.5.3", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -6839,6 +7190,15 @@ dependencies = [ "serde", ] +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.3.1" @@ -6852,7 +7212,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.2.6", + "indexmap 2.3.0", ] [[package]] @@ -6895,7 +7255,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -6939,7 +7299,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -6956,9 +7316,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" dependencies = [ "atomic-waker", "fastrand 2.1.0", @@ -6981,17 +7341,11 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -[[package]] -name = "platforms" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" - [[package]] name = "plotters" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" dependencies = [ "num-traits 0.2.19", "plotters-backend", @@ -7002,15 +7356,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" +checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" [[package]] name = "plotters-svg" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" dependencies = [ "plotters-backend", ] @@ -7033,13 +7387,13 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.0" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" +checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi 0.3.9", + "hermit-abi 0.4.0", "pin-project-lite", "rustix 0.38.34", "tracing", @@ -7071,9 +7425,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "powerfmt" @@ -7083,9 +7437,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "precomputed-hash" @@ -7095,9 +7452,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "predicates" -version = "3.1.0" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" +checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" dependencies = [ "anstyle", "predicates-core", @@ -7105,15 +7462,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" dependencies = [ "predicates-core", "termtree", @@ -7136,7 +7493,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.61", + "syn 2.0.72", +] + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", ] [[package]] @@ -7198,9 +7564,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -7211,7 +7577,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "hex", "lazy_static", "procfs-core", @@ -7224,19 +7590,19 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "hex", ] [[package]] name = "prometheus-client" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ca959da22a332509f2a73ae9e5f23f9dcfc31fd3a54d71f159495bd5909baa" +checksum = "504ee9ff529add891127c4827eb481bd69dc0ebc72e9a682e187db4caa60c3ca" dependencies = [ "dtoa", "itoa", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "prometheus-client-derive-encode", ] @@ -7248,7 +7614,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -7265,17 +7631,17 @@ dependencies = [ [[package]] name = "proptest" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "lazy_static", "num-traits 0.2.19", "rand 0.8.5", "rand_chacha 0.3.1", "rand_xorshift 0.3.0", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", "unarray", ] @@ -7291,9 +7657,9 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80b776a1b2dc779f5ee0641f8ade0125bc1298dd41a9a0c16d8bd57b42d222b1" +checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" dependencies = [ "bytes", "heck 0.5.0", @@ -7306,7 +7672,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.61", + "syn 2.0.72", "tempfile", ] @@ -7320,14 +7686,14 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] name = "prost-types" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3235c33eb02c1f1e212abdbe34c78b264b038fb58ca612664343271e36e55ffe" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ "prost", ] @@ -7359,12 +7725,12 @@ dependencies = [ "indoc 1.0.9", "libc", "memoffset", - "num-bigint 0.4.5", - "parking_lot 0.12.2", + "num-bigint 0.4.6", + "parking_lot 0.12.3", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", - "unindent", + "unindent 0.1.11", ] [[package]] @@ -7480,17 +7846,18 @@ dependencies = [ [[package]] name = "quinn" -version = "0.10.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75" +checksum = "b22d8e7369034b9a7132bc2008cac12f2013c8132b45e0554e6e20e2617f2156" dependencies = [ "bytes", "futures-io", "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash", - "rustls", + "rustc-hash 2.0.0", + "rustls 0.23.12", + "socket2 0.5.7", "thiserror", "tokio", "tracing", @@ -7498,15 +7865,15 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.10.6" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" +checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd" dependencies = [ "bytes", "rand 0.8.5", - "ring 0.16.20", - "rustc-hash", - "rustls", + "ring 0.17.8", + "rustc-hash 2.0.0", + "rustls 0.23.12", "slab", "thiserror", "tinyvec", @@ -7515,15 +7882,15 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.4.1" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7" +checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" dependencies = [ - "bytes", "libc", + "once_cell", "socket2 0.5.7", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -7772,11 +8139,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] @@ -7792,14 +8159,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -7813,15 +8180,21 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] +[[package]] +name = "regex-lite" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" + [[package]] name = "regex-syntax" version = "0.6.29" @@ -7830,9 +8203,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "relative-path" @@ -7860,10 +8233,10 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", "hyper-rustls", "hyper-tls", "ipnet", @@ -7874,7 +8247,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", + "rustls 0.21.12", "rustls-pemfile", "serde", "serde_json", @@ -8054,6 +8427,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -8098,10 +8477,10 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys 0.4.14", "windows-sys 0.52.0", ] @@ -8113,10 +8492,24 @@ checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring 0.17.8", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.23.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +dependencies = [ + "once_cell", + "ring 0.17.8", + "rustls-pki-types", + "rustls-webpki 0.102.6", + "subtle", + "zeroize", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -8138,6 +8531,12 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pki-types" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -8148,11 +8547,22 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "rustls-webpki" +version = "0.102.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +dependencies = [ + "ring 0.17.8", + "rustls-pki-types", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "092474d1a01ea8278f69e6a358998405fae5b8b963ddaeb2b0b04a128bf1dfb0" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "rw-stream-sink" @@ -8183,7 +8593,7 @@ dependencies = [ "log", "oorandom", "parking_lot 0.11.2", - "rustc-hash", + "rustc-hash 1.1.0", "salsa-macros", "smallvec", ] @@ -8253,9 +8663,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.19" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6e7ed6919cb46507fb01ff1654309219f62b4d603822501b0b80d42f6f21ef" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" dependencies = [ "dyn-clone", "indexmap 1.9.3", @@ -8266,14 +8676,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.19" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185f2b7aa7e02d418e453790dde16890256bbd2bcd04b7dc5348811052b53f49" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -8320,11 +8730,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -8333,9 +8743,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -8364,9 +8774,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.201" +version = "1.0.205" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" +checksum = "e33aedb1a7135da52b7c21791455563facbbcc43d0f0f66165b42c21b3dfb150" dependencies = [ "serde_derive", ] @@ -8383,33 +8793,34 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.201" +version = "1.0.205" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" +checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] name = "serde_derive_internals" -version = "0.29.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330f01ce65a3a5fe59a60c82f3c9a024b573b8a6e875bd233fe5f934e71d54e3" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -8443,14 +8854,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -8488,10 +8899,10 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.8", + "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -8575,9 +8986,9 @@ dependencies = [ [[package]] name = "similar" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640" +checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" [[package]] name = "simple_asn1" @@ -8585,7 +8996,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "thiserror", "time", @@ -8635,6 +9046,16 @@ dependencies = [ "autocfg 1.3.0", ] +[[package]] +name = "slug" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bd94acec9c8da640005f8e135a39fc0372e74535e6b368b7a04b875f784c8c4" +dependencies = [ + "deunicode", + "wasm-bindgen", +] + [[package]] name = "smallvec" version = "1.13.2" @@ -8660,9 +9081,9 @@ dependencies = [ [[package]] name = "smol_str" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6845563ada680337a52d43bb0b29f396f2d911616f6573012645b9e3d048a49" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" dependencies = [ "serde", ] @@ -8713,7 +9134,7 @@ dependencies = [ "base64 0.13.1", "bytes", "futures", - "http", + "http 0.2.12", "httparse", "log", "rand 0.8.5", @@ -8797,7 +9218,7 @@ dependencies = [ "crypto-bigint", "hex", "hmac", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "rfc6979", @@ -8817,7 +9238,7 @@ dependencies = [ "crypto-bigint", "hex", "hmac", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "rfc6979", @@ -8836,7 +9257,7 @@ checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" dependencies = [ "starknet-curve 0.4.2", "starknet-ff", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -8880,7 +9301,7 @@ dependencies = [ "lambdaworks-crypto", "lambdaworks-math", "lazy_static", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "serde", @@ -8895,7 +9316,7 @@ dependencies = [ "cairo-lang-starknet-classes", "derive_more", "hex", - "indexmap 2.2.6", + "indexmap 2.3.0", "itertools 0.12.1", "once_cell", "primitive-types", @@ -8940,8 +9361,8 @@ dependencies = [ "async-trait", "cairo-lang-starknet-classes", "enum-iterator", - "http", - "indexmap 2.2.6", + "http 0.2.12", + "indexmap 2.3.0", "mockall", "mockito 0.31.1", "os_info", @@ -9000,11 +9421,11 @@ dependencies = [ "cairo-lang-starknet-classes", "cairo-vm", "enum-assoc", - "hyper", + "hyper 0.14.30", "mempool_test_utils", "mockall", - "mockito 1.4.0", - "num-bigint 0.4.5", + "mockito 1.5.0", + "num-bigint 0.4.6", "num-traits 0.2.19", "papyrus_config", "papyrus_rpc", @@ -9049,7 +9470,7 @@ dependencies = [ "assert_matches", "async-trait", "bincode 1.3.3", - "hyper", + "hyper 0.14.30", "pretty_assertions", "rstest", "serde", @@ -9066,7 +9487,7 @@ dependencies = [ "axum", "blockifier", "cairo-lang-starknet-classes", - "indexmap 2.2.6", + "indexmap 2.3.0", "itertools 0.10.5", "mempool_test_utils", "papyrus_common", @@ -9096,7 +9517,7 @@ dependencies = [ "anyhow", "assert-json-diff", "assert_matches", - "clap 4.5.4", + "clap 4.5.13", "colored", "const_format", "futures", @@ -9169,6 +9590,12 @@ dependencies = [ "rand 0.6.5", ] +[[package]] +name = "stats_alloc" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c0e04424e733e69714ca1bbb9204c1a57f09f5493439520f9f68c132ad25eec" + [[package]] name = "string_cache" version = "0.8.7" @@ -9177,7 +9604,7 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "phf_shared 0.10.0", "precomputed-hash", ] @@ -9208,11 +9635,11 @@ checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" [[package]] name = "strum" -version = "0.26.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ - "strum_macros 0.26.2", + "strum_macros 0.26.4", ] [[package]] @@ -9238,27 +9665,27 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] name = "strum_macros" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "svm-rs" @@ -9293,9 +9720,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.61" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", @@ -9310,14 +9737,13 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "synstructure" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "unicode-xid", + "syn 2.0.72", ] [[package]] @@ -9349,9 +9775,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" dependencies = [ "filetime", "libc", @@ -9360,20 +9786,33 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.14" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + +[[package]] +name = "tblgen-alt" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +checksum = "7ae726d43658a13a9cd479de814be1311fea69236cd821e931a4fb9ca4d70e50" +dependencies = [ + "bindgen 0.69.4", + "cc", + "paste", + "thiserror", +] [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand 2.1.0", + "once_cell", "rustix 0.38.34", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -9420,7 +9859,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -9431,7 +9870,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", "test-case-core", ] @@ -9454,7 +9893,7 @@ checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -9467,7 +9906,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.61", + "syn 2.0.72", "which", ] @@ -9482,22 +9921,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.60" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.60" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -9604,9 +10043,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -9619,32 +10058,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", "socket2 0.5.7", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -9674,7 +10112,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.12", "tokio", ] @@ -9710,7 +10148,7 @@ checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", - "rustls", + "rustls 0.21.12", "tokio", "tokio-rustls", "tungstenite", @@ -9733,21 +10171,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.12" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.12", + "toml_edit 0.22.20", ] [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -9758,7 +10196,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.3.0", "toml_datetime", "winnow 0.5.40", ] @@ -9769,22 +10207,22 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.3.0", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.12" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.3.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.8", + "winnow 0.6.18", ] [[package]] @@ -9840,7 +10278,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -9874,6 +10312,16 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + [[package]] name = "tracing-subscriber" version = "0.3.18" @@ -9884,12 +10332,15 @@ dependencies = [ "nu-ansi-term", "once_cell", "regex", + "serde", + "serde_json", "sharded-slab", "smallvec", "thread_local", "tracing", "tracing-core", "tracing-log", + "tracing-serde", ] [[package]] @@ -9907,17 +10358,23 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 0.2.12", "httparse", "log", "rand 0.8.5", - "rustls", + "rustls 0.21.12", "sha1", "thiserror", "url", "utf-8", ] +[[package]] +name = "typed-arena" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + [[package]] name = "typenum" version = "1.17.0" @@ -9944,9 +10401,9 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unescaper" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0adf6ad32eb5b3cadff915f7b770faaac8f7ff0476633aa29eb0d9584d889d34" +checksum = "c878a167baa8afd137494101a688ef8c67125089ff2249284bd2b5f9bfedb815" dependencies = [ "thiserror", ] @@ -9980,9 +10437,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" @@ -9990,12 +10447,24 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "unicode_categories" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" + [[package]] name = "unindent" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" +[[package]] +name = "unindent" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" + [[package]] name = "universal-hash" version = "0.5.1" @@ -10036,9 +10505,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna 0.5.0", @@ -10053,9 +10522,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" @@ -10069,9 +10538,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" [[package]] name = "validator" @@ -10132,9 +10601,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "void" @@ -10144,9 +10613,9 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "waker-fn" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] name = "walkdir" @@ -10194,7 +10663,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", "wasm-bindgen-shared", ] @@ -10228,7 +10697,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -10249,6 +10718,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "webpki-roots" version = "0.25.4" @@ -10291,11 +10770,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -10321,7 +10800,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ "windows-core 0.54.0", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -10339,7 +10818,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -10349,16 +10828,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" dependencies = [ "windows-result", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "windows-result" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -10376,7 +10855,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -10396,18 +10884,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -10418,9 +10906,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -10430,9 +10918,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -10442,15 +10930,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -10460,9 +10948,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -10472,9 +10960,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -10484,9 +10972,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -10496,9 +10984,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -10511,9 +10999,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.8" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -10570,9 +11058,9 @@ dependencies = [ [[package]] name = "x509-parser" -version = "0.15.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da" +checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" dependencies = [ "asn1-rs", "data-encoding", @@ -10592,15 +11080,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys 0.4.14", "rustix 0.38.34", ] [[package]] name = "xml-rs" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" +checksum = "539a77ee7c0de333dcc6da69b177380a0b81e0dacfa4f7344c465a36871ee601" [[package]] name = "xmltree" @@ -10635,7 +11123,7 @@ dependencies = [ "futures", "log", "nohash-hasher", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "pin-project", "rand 0.8.5", "static_assertions", @@ -10643,18 +11131,18 @@ dependencies = [ [[package]] name = "yamux" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f97202f6b125031b95d83e01dc57292b529384f80bfae4677e4bbc10178cf72" +checksum = "a31b5e376a8b012bee9c423acdbb835fc34d45001cfa3106236a624e4b738028" dependencies = [ "futures", - "instant", "log", "nohash-hasher", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "pin-project", "rand 0.8.5", "static_assertions", + "web-time", ] [[package]] @@ -10674,29 +11162,30 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -10709,7 +11198,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.72", ] [[package]] @@ -10747,7 +11236,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ - "zstd-safe 7.2.0", + "zstd-safe 7.2.1", ] [[package]] @@ -10762,18 +11251,18 @@ dependencies = [ [[package]] name = "zstd-safe" -version = "7.2.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 70087e44b6..5e351f57d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,42 +4,42 @@ resolver = "2" members = [ - "crates/batcher", - "crates/batcher_types", - "crates/blockifier", - "crates/committer", - "crates/committer_cli", - "crates/consensus_manager", - "crates/consensus_manager_types", - "crates/gateway", - "crates/mempool", - "crates/mempool_infra", - "crates/mempool_node", - "crates/mempool_test_utils", - "crates/mempool_types", - "crates/native_blockifier", - "crates/papyrus_base_layer", - "crates/papyrus_common", - "crates/papyrus_config", - "crates/papyrus_execution", - "crates/papyrus_load_test", - "crates/papyrus_monitoring_gateway", - "crates/papyrus_network", - "crates/papyrus_node", - "crates/papyrus_p2p_sync", - "crates/papyrus_proc_macros", - "crates/papyrus_protobuf", - "crates/papyrus_rpc", - "crates/papyrus_storage", - "crates/papyrus_sync", - "crates/papyrus_test_utils", - "crates/sequencing/papyrus_block_builder", - "crates/sequencing/papyrus_consensus", - "crates/starknet_api", - "crates/starknet_client", - "crates/starknet_sierra_compile", - "crates/task_executor", - "crates/tests-integration", + "crates/batcher", + "crates/batcher_types", + "crates/blockifier", + "crates/committer", + "crates/committer_cli", + "crates/consensus_manager", + "crates/consensus_manager_types", + "crates/gateway", + "crates/mempool", + "crates/mempool_infra", + "crates/mempool_node", + "crates/mempool_test_utils", + "crates/mempool_types", + "crates/native_blockifier", + "crates/papyrus_base_layer", + "crates/papyrus_common", + "crates/papyrus_config", + "crates/papyrus_execution", + "crates/papyrus_load_test", + "crates/papyrus_monitoring_gateway", + "crates/papyrus_network", + "crates/papyrus_node", + "crates/papyrus_p2p_sync", + "crates/papyrus_proc_macros", + "crates/papyrus_protobuf", + "crates/papyrus_rpc", + "crates/papyrus_storage", + "crates/papyrus_sync", + "crates/papyrus_test_utils", + "crates/sequencing/papyrus_block_builder", + "crates/sequencing/papyrus_consensus", + "crates/starknet_api", + "crates/starknet_client", + "crates/starknet_sierra_compile", + "crates/task_executor", + "crates/tests-integration", ] [workspace.package] @@ -72,6 +72,7 @@ byteorder = "1.4.3" bytes = "1" cached = "0.44.0" cairo-felt = "0.9.1" +cairo-native = { git = "https://github.com/lambdaclass/cairo_native", branch = "cairo-lang2.7.0-rc.3" } cairo-lang-casm = "2.7.0" cairo-lang-runner = "2.7.0" cairo-lang-sierra = "=2.7.0" diff --git a/crates/blockifier/Cargo.toml b/crates/blockifier/Cargo.toml index 36e30a4f2d..8270878e54 100644 --- a/crates/blockifier/Cargo.toml +++ b/crates/blockifier/Cargo.toml @@ -23,9 +23,11 @@ ark-ff.workspace = true ark-secp256k1.workspace = true ark-secp256r1.workspace = true cached.workspace = true +cairo-native.workspace = true cairo-lang-casm = { workspace = true, features = ["parity-scale-codec"] } cairo-lang-runner.workspace = true cairo-lang-starknet-classes.workspace = true +cairo-lang-sierra.workspace = true cairo-lang-utils.workspace = true cairo-vm.workspace = true derive_more.workspace = true diff --git a/crates/blockifier/src/execution.rs b/crates/blockifier/src/execution.rs index 6636d98eff..381a718ed1 100644 --- a/crates/blockifier/src/execution.rs +++ b/crates/blockifier/src/execution.rs @@ -9,5 +9,6 @@ pub mod entry_point_execution; pub mod errors; pub mod execution_utils; pub mod hint_code; +pub mod native; pub mod stack_trace; pub mod syscalls; diff --git a/crates/blockifier/src/execution/call_info.rs b/crates/blockifier/src/execution/call_info.rs index 1efef68115..345f851a1e 100644 --- a/crates/blockifier/src/execution/call_info.rs +++ b/crates/blockifier/src/execution/call_info.rs @@ -24,8 +24,7 @@ macro_rules! retdata { }; } -#[cfg_attr(test, derive(Clone))] -#[derive(Debug, Default, Eq, PartialEq, Serialize)] +#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)] pub struct OrderedEvent { pub order: usize, pub event: EventContent, @@ -54,15 +53,13 @@ impl MessageL1CostInfo { } } -#[cfg_attr(test, derive(Clone))] -#[derive(Debug, Default, Eq, PartialEq, Serialize)] +#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)] pub struct MessageToL1 { pub to_address: EthAddress, pub payload: L2ToL1Payload, } -#[cfg_attr(test, derive(Clone))] -#[derive(Debug, Default, Eq, PartialEq, Serialize)] +#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)] pub struct OrderedL2ToL1Message { pub order: usize, pub message: MessageToL1, @@ -73,8 +70,7 @@ pub fn get_payload_lengths(l2_to_l1_messages: &[OrderedL2ToL1Message]) -> Vec, @@ -162,7 +158,7 @@ impl TestExecutionSummary { } /// Represents the full effects of executing an entry point, including the inner calls it invoked. -#[derive(Debug, Default, Eq, PartialEq, Serialize)] +#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)] pub struct CallInfo { pub call: CallEntryPoint, pub execution: CallExecution, diff --git a/crates/blockifier/src/execution/contract_class.rs b/crates/blockifier/src/execution/contract_class.rs index 4e182ed837..f795d7d2bf 100644 --- a/crates/blockifier/src/execution/contract_class.rs +++ b/crates/blockifier/src/execution/contract_class.rs @@ -1,11 +1,23 @@ use std::collections::{HashMap, HashSet}; -use std::ops::Deref; +use std::ops::{Deref, Index}; use std::sync::Arc; use cairo_lang_casm; use cairo_lang_casm::hints::Hint; -use cairo_lang_starknet_classes::casm_contract_class::{CasmContractClass, CasmContractEntryPoint}; +use cairo_lang_sierra::ids::FunctionId; +use cairo_lang_starknet_classes::casm_contract_class::{ + CasmContractClass, + CasmContractEntryPoint, + StarknetSierraCompilationError, +}; +use cairo_lang_starknet_classes::contract_class::{ + ContractClass as SierraContractClass, + ContractEntryPoint, + ContractEntryPoints as SierraContractEntryPoints, +}; use cairo_lang_starknet_classes::NestedIntList; +use cairo_lang_utils::bigint::BigUintAsHex; +use cairo_native::executor::AotNativeExecutor; use cairo_vm::serde::deserialize_program::{ ApTracking, FlowTrackingData, @@ -30,7 +42,10 @@ use starknet_api::deprecated_contract_class::{ }; use starknet_types_core::felt::Felt; +use super::entry_point::EntryPointExecutionResult; +use super::errors::EntryPointExecutionError; use super::execution_utils::poseidon_hash_many_cost; +use super::native::utils::contract_entrypoint_to_entrypoint_selector; use crate::abi::abi_utils::selector_from_name; use crate::abi::constants::{self, CONSTRUCTOR_ENTRY_POINT_NAME}; use crate::execution::entry_point::CallEntryPoint; @@ -50,10 +65,11 @@ pub mod test; pub type ContractClassResult = Result; -#[derive(Clone, Debug, Eq, PartialEq, derive_more::From)] +#[derive(Clone, Debug, PartialEq, derive_more::From)] pub enum ContractClass { V0(ContractClassV0), V1(ContractClassV1), + V1Native(NativeContractClassV1), } impl ContractClass { @@ -61,6 +77,7 @@ impl ContractClass { match self { ContractClass::V0(class) => class.constructor_selector(), ContractClass::V1(class) => class.constructor_selector(), + ContractClass::V1Native(class) => class.constructor_selector(), } } @@ -68,6 +85,7 @@ impl ContractClass { match self { ContractClass::V0(class) => class.estimate_casm_hash_computation_resources(), ContractClass::V1(class) => class.estimate_casm_hash_computation_resources(), + ContractClass::V1Native(_) => todo!("sierra estimate casm hash computation resources"), } } @@ -80,6 +98,7 @@ impl ContractClass { panic!("get_visited_segments is not supported for v0 contracts.") } ContractClass::V1(class) => class.get_visited_segments(visited_pcs), + ContractClass::V1Native(_) => todo!("sierra visited segments"), } } @@ -87,6 +106,7 @@ impl ContractClass { match self { ContractClass::V0(class) => class.bytecode_length(), ContractClass::V1(class) => class.bytecode_length(), + ContractClass::V1Native(_) => todo!("sierra estimate casm hash computation resources"), } } } @@ -439,9 +459,8 @@ pub fn deserialize_program<'de, D: Deserializer<'de>>( } // V1 utilities. - // TODO(spapini): Share with cairo-lang-runner. -fn hint_to_hint_params(hint: &cairo_lang_casm::hints::Hint) -> Result { +fn hint_to_hint_params(hint: &Hint) -> Result { Ok(HintParams { code: serde_json::to_string(hint)?, accessible_scopes: vec![], @@ -507,6 +526,7 @@ impl ClassInfo { let (contract_class_version, condition) = match contract_class { ContractClass::V0(_) => (0, sierra_program_length == 0), ContractClass::V1(_) => (1, sierra_program_length > 0), + ContractClass::V1Native(_) => (1, sierra_program_length > 0), }; if condition { @@ -519,3 +539,196 @@ impl ClassInfo { } } } + +// Cairo-native utilities. + +#[derive(Clone, Debug, PartialEq)] +pub struct NativeContractClassV1(pub Arc); +impl Deref for NativeContractClassV1 { + type Target = NativeContractClassV1Inner; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +#[derive(Debug, thiserror::Error)] +pub enum NativeEntryPointError { + #[error("FunctionId {0} not found")] + FunctionIdNotFound(usize), +} + +impl NativeContractClassV1 { + fn constructor_selector(&self) -> Option { + self.entry_points_by_type.constructor.first().map(|ep| ep.selector) + } + + /// Initialize a compiled contract class for native. + /// + /// executor must be derived from sierra_program which in turn must be derived from + /// sierra_contract_class. + pub fn new( + executor: AotNativeExecutor, + sierra_contract_class: SierraContractClass, + ) -> Result { + let contract = NativeContractClassV1Inner::new(executor, sierra_contract_class)?; + + Ok(Self(Arc::new(contract))) + } + + pub fn to_casm_contract_class( + self, + ) -> Result { + let sierra_contract_class = SierraContractClass { + // Cloning because these are behind an Arc. + sierra_program: self.sierra_program_raw.clone(), + entry_points_by_type: self.fallback_entry_points_by_type.clone(), + abi: None, + sierra_program_debug_info: None, + contract_class_version: String::default(), + }; + + CasmContractClass::from_contract_class(sierra_contract_class, false, usize::MAX) + } + + /// Returns an entry point into the natively compiled contract. + pub fn get_entrypoint( + &self, + entry_point_type: EntryPointType, + entrypoint_selector: EntryPointSelector, + ) -> EntryPointExecutionResult<&FunctionId> { + let entrypoints = &self.entry_points_by_type[entry_point_type]; + + entrypoints + .iter() + .find(|entrypoint| entrypoint.selector == entrypoint_selector) + .map(|op| &op.function_id) + .ok_or(EntryPointExecutionError::NativeExecutionError { + info: format!("Entrypoint selector {} not found", entrypoint_selector.0), + }) + } +} + +#[derive(Debug)] +pub struct NativeContractClassV1Inner { + pub executor: AotNativeExecutor, + entry_points_by_type: NativeContractEntryPoints, + // Storing the raw sierra program and entry points to be able to fallback to the vm + sierra_program_raw: Vec, + fallback_entry_points_by_type: SierraContractEntryPoints, +} + +impl NativeContractClassV1Inner { + fn new( + executor: AotNativeExecutor, + sierra_contract_class: SierraContractClass, + ) -> Result { + // This exception should never occur as it was also used to create the AotNativeExecutor. + let sierra_program = + sierra_contract_class.extract_sierra_program().expect("can't extract sierra program"); + // Note [Cairo Native ABI] + // The supplied (compiled) sierra program might have been populated with debug info and this + // affects the ABI, because the debug info is appended to the function name and the + // function name is what is used by Cairo Native to lookup the function. + // Therefore it's not enough to know the function index and we need enrich the contract + // entry point with FunctionIds from SierraProgram. + let lookup_fid: HashMap = + HashMap::from_iter(sierra_program.funcs.iter().map(|fid| { + // This exception should never occur as the id is also in [SierraContractClass] + let id: usize = fid.id.id.try_into().expect("function id exceeds usize"); + (id, &fid.id) + })); + + Ok(NativeContractClassV1Inner { + executor, + entry_points_by_type: NativeContractEntryPoints::try_from( + &lookup_fid, + &sierra_contract_class.entry_points_by_type, + )?, + sierra_program_raw: sierra_contract_class.sierra_program, + fallback_entry_points_by_type: sierra_contract_class.entry_points_by_type, + }) + } +} + +// The location where the compiled contract is loaded into memory will not +// be the same therefore we exclude it from the comparison. +impl PartialEq for NativeContractClassV1Inner { + fn eq(&self, other: &Self) -> bool { + self.entry_points_by_type == other.entry_points_by_type + && self.sierra_program_raw == other.sierra_program_raw + } +} + +#[derive(Debug, PartialEq)] +/// Modelled after [SierraContractEntryPoints] +/// and enriched with information for the Cairo Native ABI. +/// See Note [Cairo Native ABI] +struct NativeContractEntryPoints { + constructor: Vec, + external: Vec, + l1_handler: Vec, +} + +impl NativeContractEntryPoints { + /// Convert [SierraContractEntryPoints] to [NativeContractEntryPoints] via a + /// [FunctionId] lookup table. + /// + /// On failure returns the first FunctionId that it couldn't find. + fn try_from( + lookup: &HashMap, + sep: &SierraContractEntryPoints, + ) -> Result { + let constructor = sep + .constructor + .iter() + .map(|c| NativeEntryPoint::try_from(lookup, c)) + .collect::>()?; + let external = sep + .external + .iter() + .map(|c| NativeEntryPoint::try_from(lookup, c)) + .collect::>()?; + let l1_handler = sep + .l1_handler + .iter() + .map(|c| NativeEntryPoint::try_from(lookup, c)) + .collect::>()?; + + Ok(NativeContractEntryPoints { constructor, external, l1_handler }) + } +} + +impl Index for NativeContractEntryPoints { + type Output = Vec; + + fn index(&self, index: EntryPointType) -> &Self::Output { + match index { + EntryPointType::Constructor => &self.constructor, + EntryPointType::External => &self.external, + EntryPointType::L1Handler => &self.l1_handler, + } + } +} + +#[derive(Debug, PartialEq)] +/// Provides a relation between a function in a contract and a compiled contract. +struct NativeEntryPoint { + /// The selector is the key to find the function in the contract. + selector: EntryPointSelector, + /// And the function_id is the key to find the function in the compiled contract. + function_id: FunctionId, +} + +impl NativeEntryPoint { + fn try_from( + lookup: &HashMap, + cep: &ContractEntryPoint, + ) -> Result { + let &function_id = lookup + .get(&cep.function_idx) + .ok_or(NativeEntryPointError::FunctionIdNotFound(cep.function_idx))?; + let selector = contract_entrypoint_to_entrypoint_selector(cep); + Ok(NativeEntryPoint { selector, function_id: function_id.clone() }) + } +} diff --git a/crates/blockifier/src/execution/errors.rs b/crates/blockifier/src/execution/errors.rs index 04bb87a484..6067a6926c 100644 --- a/crates/blockifier/src/execution/errors.rs +++ b/crates/blockifier/src/execution/errors.rs @@ -1,5 +1,6 @@ use std::collections::HashSet; +use cairo_native::error::Error as NativeRunnerError; use cairo_vm::types::builtin_name::BuiltinName; use cairo_vm::types::errors::math_errors::MathError; use cairo_vm::vm::errors::cairo_run_errors::CairoRunError; @@ -58,7 +59,7 @@ impl From for PreExecutionError { #[derive(Debug, Error)] pub enum PostExecutionError { #[error(transparent)] - MathError(#[from] cairo_vm::types::errors::math_errors::MathError), + MathError(#[from] MathError), #[error(transparent)] MemoryError(#[from] MemoryError), #[error(transparent)] @@ -83,10 +84,21 @@ pub enum EntryPointExecutionError { CairoRunError(#[from] CairoRunError), #[error("Execution failed. Failure reason: {}.", format_panic_data(.error_data))] ExecutionFailed { error_data: Vec }, + #[error("Failed to convert Sierra to Casm: {0}")] + FailedToConvertSierraToCasm(String), #[error("Internal error: {0}")] InternalError(String), #[error("Invalid input: {input_descriptor}; {info}")] InvalidExecutionInput { input_descriptor: String, info: String }, + #[error("Native execution error: {info}")] + NativeExecutionError { info: String }, + #[error("Native Fallback Error: {info}")] + NativeFallbackError { info: Box }, + #[error("Native unexpected error: {source}")] + NativeUnexpectedError { + #[source] + source: NativeRunnerError, + }, #[error(transparent)] PostExecutionError(#[from] PostExecutionError), #[error(transparent)] diff --git a/crates/blockifier/src/execution/execution_utils.rs b/crates/blockifier/src/execution/execution_utils.rs index 7824e13873..9fc1e110d8 100644 --- a/crates/blockifier/src/execution/execution_utils.rs +++ b/crates/blockifier/src/execution/execution_utils.rs @@ -34,6 +34,7 @@ use crate::execution::entry_point::{ EntryPointExecutionResult, }; use crate::execution::errors::PostExecutionError; +use crate::execution::native::entry_point_execution as native_entry_point_execution; use crate::execution::{deprecated_entry_point_execution, entry_point_execution}; use crate::state::errors::StateError; use crate::state::state_api::State; @@ -68,6 +69,15 @@ pub fn execute_entry_point_call( resources, context, ), + ContractClass::V1Native(contract_class) => { + native_entry_point_execution::execute_entry_point_call( + call, + contract_class, + state, + resources, + context, + ) + } } } diff --git a/crates/blockifier/src/execution/native.rs b/crates/blockifier/src/execution/native.rs new file mode 100644 index 0000000000..5843e98914 --- /dev/null +++ b/crates/blockifier/src/execution/native.rs @@ -0,0 +1,3 @@ +pub mod entry_point_execution; +pub mod syscall_handler; +pub mod utils; diff --git a/crates/blockifier/src/execution/native/entry_point_execution.rs b/crates/blockifier/src/execution/native/entry_point_execution.rs new file mode 100644 index 0000000000..e4644910a9 --- /dev/null +++ b/crates/blockifier/src/execution/native/entry_point_execution.rs @@ -0,0 +1,34 @@ +use cairo_vm::vm::runners::cairo_runner::ExecutionResources; + +use super::syscall_handler::NativeSyscallHandler; +use super::utils::run_native_executor; +use crate::execution::call_info::CallInfo; +use crate::execution::contract_class::NativeContractClassV1; +use crate::execution::entry_point::{ + CallEntryPoint, + EntryPointExecutionContext, + EntryPointExecutionResult, +}; +use crate::state::state_api::State; + +pub fn execute_entry_point_call( + call: CallEntryPoint, + contract_class: NativeContractClassV1, + state: &mut dyn State, + resources: &mut ExecutionResources, + context: &mut EntryPointExecutionContext, +) -> EntryPointExecutionResult { + let function_id = + contract_class.get_entrypoint(call.entry_point_type, call.entry_point_selector)?; + + let syscall_handler: NativeSyscallHandler<'_> = NativeSyscallHandler::new( + state, + call.caller_address, + call.storage_address, + call.entry_point_selector, + resources, + context, + ); + + run_native_executor(&contract_class.executor, function_id, call, syscall_handler) +} diff --git a/crates/blockifier/src/execution/native/syscall_handler.rs b/crates/blockifier/src/execution/native/syscall_handler.rs new file mode 100644 index 0000000000..46aa9b6fc1 --- /dev/null +++ b/crates/blockifier/src/execution/native/syscall_handler.rs @@ -0,0 +1,318 @@ +use std::collections::HashSet; +use std::hash::RandomState; + +use cairo_native::starknet::{ + ExecutionInfo, + ExecutionInfoV2, + Secp256k1Point, + Secp256r1Point, + StarknetSyscallHandler, + SyscallResult, + U256, +}; +use cairo_vm::vm::runners::cairo_runner::ExecutionResources; +use starknet_api::core::{ContractAddress, EntryPointSelector}; +use starknet_api::state::StorageKey; +use starknet_types_core::felt::Felt; + +use super::utils::encode_str_as_felts; +use crate::execution::call_info::{CallInfo, OrderedEvent, OrderedL2ToL1Message}; +use crate::execution::entry_point::{CallEntryPoint, EntryPointExecutionContext}; +use crate::execution::syscalls::hint_processor::OUT_OF_GAS_ERROR; +use crate::state::state_api::State; +use crate::transaction::transaction_utils::update_remaining_gas; + +pub struct NativeSyscallHandler<'state> { + // Input for execution. + pub state: &'state mut dyn State, + pub execution_resources: &'state mut ExecutionResources, + pub execution_context: &'state mut EntryPointExecutionContext, + + // Call information. + pub caller_address: ContractAddress, + pub contract_address: ContractAddress, + pub entry_point_selector: Felt, + + // Execution results. + pub events: Vec, + pub l2_to_l1_messages: Vec, + pub inner_calls: Vec, + + // Additional execution result info. + pub storage_read_values: Vec, + pub accessed_storage_keys: HashSet, +} + +impl<'state> NativeSyscallHandler<'state> { + pub fn new( + state: &'state mut dyn State, + caller_address: ContractAddress, + contract_address: ContractAddress, + entry_point_selector: EntryPointSelector, + execution_resources: &'state mut ExecutionResources, + execution_context: &'state mut EntryPointExecutionContext, + ) -> NativeSyscallHandler<'state> { + NativeSyscallHandler { + state, + caller_address, + contract_address, + entry_point_selector: entry_point_selector.0, + execution_resources, + execution_context, + events: Vec::new(), + l2_to_l1_messages: Vec::new(), + inner_calls: Vec::new(), + storage_read_values: Vec::new(), + accessed_storage_keys: HashSet::new(), + } + } + + pub fn execute_inner_call( + &mut self, + entry_point: CallEntryPoint, + remaining_gas: &mut u128, + ) -> SyscallResult { + let call_info = entry_point + .execute(self.state, self.execution_resources, self.execution_context) + .map_err(|e| encode_str_as_felts(&e.to_string()))?; + let retdata = call_info.execution.retdata.0.clone(); + + if call_info.execution.failed { + // In VM it's wrapped into `SyscallExecutionError::SyscallError`. + return Err(retdata); + } + + self.update_remaining_gas(remaining_gas, &call_info); + + self.inner_calls.push(call_info.clone()); + + Ok(call_info) + } + + pub fn update_remaining_gas(&mut self, remaining_gas: &mut u128, call_info: &CallInfo) { + // Create a new variable with converted type. + let mut remaining_gas_u64 = u64::try_from(*remaining_gas).unwrap(); + + // Pass the reference to the function. + update_remaining_gas(&mut remaining_gas_u64, call_info); + + // Change the remaining gas value. + *remaining_gas = u128::from(remaining_gas_u64); + } + + // We need to have this function since in VM we have `execute_syscall` method, which is handling + // all gas-related logics in the native, syscalls are called directly, so we need to + // implement this logic here. + pub fn substract_syscall_gas_cost( + &mut self, + remaining_gas: &mut u128, + syscall_gas_cost: u64, + ) -> SyscallResult<()> { + // Refund `SYSCALL_BASE_GAS_COST` as it was pre-charged. + let required_gas = + u128::from(syscall_gas_cost - self.execution_context.gas_costs().syscall_base_gas_cost); + + if *remaining_gas < required_gas { + // Out of gas failure. + return Err(vec![Felt::from_hex(OUT_OF_GAS_ERROR).unwrap()]); + } + + *remaining_gas -= required_gas; + + Ok(()) + } +} + +impl<'state> StarknetSyscallHandler for &mut NativeSyscallHandler<'state> { + fn get_block_hash( + &mut self, + _block_number: u64, + _remaining_gas: &mut u128, + ) -> SyscallResult { + todo!("Implement get_block_hash syscall."); + } + + fn get_execution_info(&mut self, _remaining_gas: &mut u128) -> SyscallResult { + todo!("Implement get_execution_info syscall."); + } + + fn get_execution_info_v2( + &mut self, + _remaining_gas: &mut u128, + ) -> SyscallResult { + todo!("Implement get_execution_info_v2 syscall."); + } + + fn deploy( + &mut self, + _class_hash: Felt, + _contract_address_salt: Felt, + _calldata: &[Felt], + _deploy_from_zero: bool, + _remaining_gas: &mut u128, + ) -> SyscallResult<(Felt, Vec)> { + todo!("Implement deploy syscall."); + } + + fn replace_class(&mut self, _class_hash: Felt, _remaining_gas: &mut u128) -> SyscallResult<()> { + todo!("Implement replace_class syscall."); + } + + fn library_call( + &mut self, + _class_hash: Felt, + _function_selector: Felt, + _calldata: &[Felt], + _remaining_gas: &mut u128, + ) -> SyscallResult> { + todo!("Implement library_call syscall."); + } + + fn call_contract( + &mut self, + _address: Felt, + _entry_point_selector: Felt, + _calldata: &[Felt], + _remaining_gas: &mut u128, + ) -> SyscallResult> { + todo!("Implement call_contract syscall."); + } + + fn storage_read( + &mut self, + _address_domain: u32, + _address: Felt, + _remaining_gas: &mut u128, + ) -> SyscallResult { + todo!("Implement storage_read syscall."); + } + + fn storage_write( + &mut self, + _address_domain: u32, + _address: Felt, + _value: Felt, + _remaining_gas: &mut u128, + ) -> SyscallResult<()> { + todo!("Implement storage_write syscall."); + } + + fn emit_event( + &mut self, + _keys: &[Felt], + _data: &[Felt], + _remaining_gas: &mut u128, + ) -> SyscallResult<()> { + todo!("Implement emit_event syscall."); + } + + fn send_message_to_l1( + &mut self, + _to_address: Felt, + _payload: &[Felt], + _remaining_gas: &mut u128, + ) -> SyscallResult<()> { + todo!("Implement send_message_to_l1 syscall."); + } + + fn keccak(&mut self, _input: &[u64], _remaining_gas: &mut u128) -> SyscallResult { + todo!("Implement keccak syscall."); + } + + fn secp256k1_new( + &mut self, + _x: U256, + _y: U256, + _remaining_gas: &mut u128, + ) -> SyscallResult> { + todo!("Implement secp256k1_new syscall."); + } + + fn secp256k1_add( + &mut self, + _p0: Secp256k1Point, + _p1: Secp256k1Point, + _remaining_gas: &mut u128, + ) -> SyscallResult { + todo!("Implement secp256k1_add syscall."); + } + + fn secp256k1_mul( + &mut self, + _p: Secp256k1Point, + _m: U256, + _remaining_gas: &mut u128, + ) -> SyscallResult { + todo!("Implement secp256k1_mul syscall."); + } + + fn secp256k1_get_point_from_x( + &mut self, + _x: U256, + _y_parity: bool, + _remaining_gas: &mut u128, + ) -> SyscallResult> { + todo!("Implement secp256k1_get_point_from_x syscall."); + } + + fn secp256k1_get_xy( + &mut self, + _p: Secp256k1Point, + _remaining_gas: &mut u128, + ) -> SyscallResult<(U256, U256)> { + todo!("Implement secp256k1_get_xy syscall."); + } + + fn secp256r1_new( + &mut self, + _x: U256, + _y: U256, + _remaining_gas: &mut u128, + ) -> SyscallResult> { + todo!("Implement secp256r1_new syscall."); + } + + fn secp256r1_add( + &mut self, + _p0: Secp256r1Point, + _p1: Secp256r1Point, + _remaining_gas: &mut u128, + ) -> SyscallResult { + todo!("Implement secp256r1_add syscall."); + } + + fn secp256r1_mul( + &mut self, + _p: Secp256r1Point, + _m: U256, + _remaining_gas: &mut u128, + ) -> SyscallResult { + todo!("Implement secp256r1_mul syscall."); + } + + fn secp256r1_get_point_from_x( + &mut self, + _x: U256, + _y_parity: bool, + _remaining_gas: &mut u128, + ) -> SyscallResult> { + todo!("Implement secp256r1_get_point_from_x syscall."); + } + + fn secp256r1_get_xy( + &mut self, + _p: Secp256r1Point, + _remaining_gas: &mut u128, + ) -> SyscallResult<(U256, U256)> { + todo!("Implement secp256r1_get_xy syscall."); + } + + fn sha256_process_block( + &mut self, + _prev_state: &[u32; 8], + _current_block: &[u32; 16], + _remaining_gas: &mut u128, + ) -> SyscallResult<[u32; 8]> { + todo!("Implement sha256_process_block syscall."); + } +} diff --git a/crates/blockifier/src/execution/native/utils.rs b/crates/blockifier/src/execution/native/utils.rs new file mode 100644 index 0000000000..a23b15e01b --- /dev/null +++ b/crates/blockifier/src/execution/native/utils.rs @@ -0,0 +1,207 @@ +use std::collections::{HashMap, HashSet}; +use std::hash::RandomState; + +use ark_ff::BigInt; +use cairo_lang_sierra::ids::FunctionId; +use cairo_lang_starknet_classes::contract_class::ContractEntryPoint; +use cairo_native::execution_result::ContractExecutionResult; +use cairo_native::executor::AotNativeExecutor; +use cairo_native::starknet::{ResourceBounds, SyscallResult, TxV2Info, U256}; +use cairo_vm::vm::runners::cairo_runner::ExecutionResources; +use itertools::Itertools; +use num_bigint::BigUint; +use num_traits::ToBytes; +use starknet_api::core::{ContractAddress, EntryPointSelector}; +use starknet_api::state::StorageKey; +use starknet_api::transaction::Resource; +use starknet_types_core::felt::Felt; + +use crate::execution::call_info::{ + CallExecution, + CallInfo, + OrderedEvent, + OrderedL2ToL1Message, + Retdata, +}; +use crate::execution::entry_point::{CallEntryPoint, EntryPointExecutionResult}; +use crate::execution::errors::EntryPointExecutionError; +use crate::execution::native::syscall_handler::NativeSyscallHandler; +use crate::execution::syscalls::hint_processor::{L1_GAS, L2_GAS}; +use crate::transaction::objects::CurrentTransactionInfo; + +#[cfg(test)] +#[path = "utils_test.rs"] +pub mod test; + +// An arbitrary number, chosen to avoid accidentally aligning with actually calculated gas +// To be deleted once cairo native gas handling can be used. +pub const NATIVE_GAS_PLACEHOLDER: u64 = 12; + +pub fn contract_address_to_native_felt(contract_address: ContractAddress) -> Felt { + *contract_address.0.key() +} + +pub fn contract_entrypoint_to_entrypoint_selector( + entrypoint: &ContractEntryPoint, +) -> EntryPointSelector { + let selector_felt = Felt::from_bytes_be_slice(&entrypoint.selector.to_be_bytes()); + EntryPointSelector(selector_felt) +} + +pub fn run_native_executor( + native_executor: &AotNativeExecutor, + function_id: &FunctionId, + call: CallEntryPoint, + mut syscall_handler: NativeSyscallHandler<'_>, +) -> EntryPointExecutionResult { + let execution_result = native_executor.invoke_contract_dynamic( + function_id, + &call.calldata.0, + Some(call.initial_gas.into()), + &mut syscall_handler, + ); + + let run_result = match execution_result { + Ok(res) if res.failure_flag => Err(EntryPointExecutionError::NativeExecutionError { + info: if !res.return_values.is_empty() { + decode_felts_as_str(&res.return_values) + } else { + String::from("Unknown error") + }, + }), + Err(runner_err) => { + Err(EntryPointExecutionError::NativeUnexpectedError { source: runner_err }) + } + Ok(res) => Ok(res), + }?; + + create_callinfo( + call.clone(), + run_result, + syscall_handler.events, + syscall_handler.l2_to_l1_messages, + syscall_handler.inner_calls, + syscall_handler.storage_read_values, + syscall_handler.accessed_storage_keys, + ) +} + +pub fn create_callinfo( + call: CallEntryPoint, + run_result: ContractExecutionResult, + events: Vec, + l2_to_l1_messages: Vec, + inner_calls: Vec, + storage_read_values: Vec, + accessed_storage_keys: HashSet, +) -> Result { + Ok(CallInfo { + call, + execution: CallExecution { + retdata: Retdata(run_result.return_values), + events, + l2_to_l1_messages, + failed: run_result.failure_flag, + gas_consumed: NATIVE_GAS_PLACEHOLDER, + }, + resources: ExecutionResources { + n_steps: 0, + n_memory_holes: 0, + builtin_instance_counter: HashMap::default(), + }, + inner_calls, + storage_read_values, + accessed_storage_keys, + }) +} + +pub fn u256_to_biguint(u256: U256) -> BigUint { + let lo = BigUint::from(u256.lo); + let hi = BigUint::from(u256.hi); + + (hi << 128) + lo +} + +pub fn big4int_to_u256(b_int: BigInt<4>) -> U256 { + let [a, b, c, d] = b_int.0; + + let lo = u128::from(a) | (u128::from(b) << 64); + let hi = u128::from(c) | (u128::from(d) << 64); + + U256 { lo, hi } +} + +pub fn encode_str_as_felts(msg: &str) -> Vec { + const CHUNK_SIZE: usize = 32; + + let data = msg.as_bytes().chunks(CHUNK_SIZE - 1); + let mut encoding = vec![Felt::default(); data.len()]; + for (i, data_chunk) in data.enumerate() { + let mut chunk = [0_u8; CHUNK_SIZE]; + chunk[1..data_chunk.len() + 1].copy_from_slice(data_chunk); + encoding[i] = Felt::from_bytes_be(&chunk); + } + encoding +} + +pub fn decode_felts_as_str(encoding: &[Felt]) -> String { + let bytes_err: Vec<_> = + encoding.iter().flat_map(|felt| felt.to_bytes_be()[1..32].to_vec()).collect(); + + match String::from_utf8(bytes_err) { + Ok(s) => s.trim_matches('\0').to_owned(), + Err(_) => { + let err_msgs = encoding + .iter() + .map(|felt| match String::from_utf8(felt.to_bytes_be()[1..32].to_vec()) { + Ok(s) => format!("{} ({})", s.trim_matches('\0'), felt), + Err(_) => felt.to_string(), + }) + .join(", "); + format!("[{}]", err_msgs) + } + } +} + +pub fn default_tx_v2_info() -> TxV2Info { + TxV2Info { + version: Default::default(), + account_contract_address: Default::default(), + max_fee: 0, + signature: vec![], + transaction_hash: Default::default(), + chain_id: Default::default(), + nonce: Default::default(), + resource_bounds: vec![], + tip: 0, + paymaster_data: vec![], + nonce_data_availability_mode: 0, + fee_data_availability_mode: 0, + account_deployment_data: vec![], + } +} + +pub fn calculate_resource_bounds( + tx_info: &CurrentTransactionInfo, +) -> SyscallResult> { + let l1_gas = Felt::from_hex(L1_GAS).map_err(|e| encode_str_as_felts(&e.to_string()))?; + let l2_gas = Felt::from_hex(L2_GAS).map_err(|e| encode_str_as_felts(&e.to_string()))?; + + Ok(tx_info + .resource_bounds + .0 + .iter() + .map(|(resource, resource_bound)| { + let resource = match resource { + Resource::L1Gas => l1_gas, + Resource::L2Gas => l2_gas, + }; + + ResourceBounds { + resource, + max_amount: resource_bound.max_amount, + max_price_per_unit: resource_bound.max_price_per_unit, + } + }) + .collect()) +} diff --git a/crates/blockifier/src/execution/native/utils_test.rs b/crates/blockifier/src/execution/native/utils_test.rs new file mode 100644 index 0000000000..1cd541d774 --- /dev/null +++ b/crates/blockifier/src/execution/native/utils_test.rs @@ -0,0 +1,87 @@ +use ark_ff::BigInt; +use cairo_lang_starknet_classes::contract_class::ContractEntryPoint; +use cairo_native::starknet::U256; +use num_bigint::BigUint; +use num_traits::Num; +use pretty_assertions::assert_eq; +use starknet_api::core::{ContractAddress, EntryPointSelector, PatriciaKey}; +use starknet_api::{contract_address, felt, patricia_key}; +use starknet_types_core::felt::Felt; + +use super::{ + big4int_to_u256, contract_address_to_native_felt, contract_entrypoint_to_entrypoint_selector, + decode_felts_as_str, encode_str_as_felts, u256_to_biguint, +}; + +#[test] +fn test_u256_to_biguint() { + let u256 = U256 { lo: 0x1234_5678, hi: 0x9abc_def0 }; + + let expected_biguint = + BigUint::from_str_radix("9abcdef000000000000000000000000012345678", 16).unwrap(); + + let actual_biguint = u256_to_biguint(u256); + + assert_eq!(actual_biguint, expected_biguint); +} + +#[test] +fn big4int_to_u256_test() { + let big_int: BigInt<4> = + BigInt!("34627219085299802438030559924718133626325687994345768323532899246965609283226"); + + let expected_u256 = U256 { + lo: 162661716537849136813498421163242372762, + hi: 101760251048639038778899488808831626319, + }; + + let actual_u256 = big4int_to_u256(big_int); + + assert_eq!(actual_u256, expected_u256); +} + +#[test] +fn test_encode_decode_str() { + const STR: &str = "Hello StarkNet!"; + + let encoded_felt_array = encode_str_as_felts(STR); + + let decoded_felt_array = decode_felts_as_str(encoded_felt_array.as_slice()); + + assert_eq!(&decoded_felt_array, STR); +} + +#[test] +fn test_decode_non_utf8_str() { + let v1 = Felt::from_dec_str("1234").unwrap(); + let v2_msg = "i am utf8"; + let v2 = Felt::from_bytes_be_slice(v2_msg.as_bytes()); + let v3 = Felt::from_dec_str("13299428").unwrap(); + let felts = [v1, v2, v3]; + + let res = decode_felts_as_str(&felts); + dbg!(res.as_bytes()); + assert_eq!(res, format!("[{}, {} ({}), {}]", v1, v2_msg, v2, v3)) +} + +#[test] +fn test_contract_address_to_felt() { + const NUM: u128 = 1234; + + let contract_address = contract_address!({ NUM }); + let expected_felt = Felt::from(NUM); + let actual_felt = contract_address_to_native_felt(contract_address); + + assert_eq!(actual_felt, expected_felt); +} + +#[test] +fn test_contract_entrypoint_to_entrypoint_selector() { + const NUM: u128 = 123; + + let entrypoint = ContractEntryPoint { selector: BigUint::from(NUM), function_idx: 0 }; + let expected_entrypoint_selector = EntryPointSelector(Felt::from(NUM)); + let actual_entrypoint_selector = contract_entrypoint_to_entrypoint_selector(&entrypoint); + + assert_eq!(actual_entrypoint_selector, expected_entrypoint_selector); +} diff --git a/crates/blockifier/src/execution/syscalls/mod.rs b/crates/blockifier/src/execution/syscalls/mod.rs index 7e253f247b..75e0efb389 100644 --- a/crates/blockifier/src/execution/syscalls/mod.rs +++ b/crates/blockifier/src/execution/syscalls/mod.rs @@ -544,7 +544,7 @@ pub fn replace_class( ContractClass::V0(_) => { Err(SyscallExecutionError::ForbiddenClassReplacement { class_hash }) } - ContractClass::V1(_) => { + ContractClass::V1(_) | ContractClass::V1Native(_) => { syscall_handler .state .set_class_hash_at(syscall_handler.storage_address(), class_hash)?; diff --git a/crates/blockifier/src/test_utils/contracts.rs b/crates/blockifier/src/test_utils/contracts.rs index 1f19b43c77..3fa63a274d 100644 --- a/crates/blockifier/src/test_utils/contracts.rs +++ b/crates/blockifier/src/test_utils/contracts.rs @@ -247,6 +247,9 @@ impl FeatureContract { .unwrap() .offset } + ContractClass::V1Native(_) => { + panic!("Not implemented for cairo native contracts") + } } } diff --git a/crates/blockifier/src/transaction/test_utils.rs b/crates/blockifier/src/transaction/test_utils.rs index d6b1724e3a..e353ac018a 100644 --- a/crates/blockifier/src/transaction/test_utils.rs +++ b/crates/blockifier/src/transaction/test_utils.rs @@ -302,7 +302,7 @@ pub fn l1_resource_bounds(max_amount: u64, max_price: u128) -> ResourceBoundsMap pub fn calculate_class_info_for_testing(contract_class: ContractClass) -> ClassInfo { let sierra_program_length = match contract_class { ContractClass::V0(_) => 0, - ContractClass::V1(_) => 100, + ContractClass::V1(_) | ContractClass::V1Native(_) => 100, }; ClassInfo::new(&contract_class, sierra_program_length, 100).unwrap() } diff --git a/crates/blockifier/src/transaction/transaction_utils.rs b/crates/blockifier/src/transaction/transaction_utils.rs index 1f4edc40c4..308d08de4d 100644 --- a/crates/blockifier/src/transaction/transaction_utils.rs +++ b/crates/blockifier/src/transaction/transaction_utils.rs @@ -36,5 +36,6 @@ pub fn verify_contract_class_version( cairo_version: 1, }) } + ContractClass::V1Native(_) => todo!("Sierra verify contract class version."), } } From 379a9d949148a5aea6e554d2ef08004916de0937 Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Thu, 8 Aug 2024 13:33:49 +0300 Subject: [PATCH 07/21] fix: make comments capitalized --- crates/blockifier/src/execution/contract_class.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/blockifier/src/execution/contract_class.rs b/crates/blockifier/src/execution/contract_class.rs index f795d7d2bf..5fece3df23 100644 --- a/crates/blockifier/src/execution/contract_class.rs +++ b/crates/blockifier/src/execution/contract_class.rs @@ -85,7 +85,7 @@ impl ContractClass { match self { ContractClass::V0(class) => class.estimate_casm_hash_computation_resources(), ContractClass::V1(class) => class.estimate_casm_hash_computation_resources(), - ContractClass::V1Native(_) => todo!("sierra estimate casm hash computation resources"), + ContractClass::V1Native(_) => todo!("Sierra estimate casm hash computation resources."), } } @@ -98,7 +98,7 @@ impl ContractClass { panic!("get_visited_segments is not supported for v0 contracts.") } ContractClass::V1(class) => class.get_visited_segments(visited_pcs), - ContractClass::V1Native(_) => todo!("sierra visited segments"), + ContractClass::V1Native(_) => todo!("Sierra visited segments."), } } @@ -106,7 +106,7 @@ impl ContractClass { match self { ContractClass::V0(class) => class.bytecode_length(), ContractClass::V1(class) => class.bytecode_length(), - ContractClass::V1Native(_) => todo!("sierra estimate casm hash computation resources"), + ContractClass::V1Native(_) => todo!("Sierra estimate casm hash computation resources."), } } } From 1a5d04edf107502ec5a532e4e4d6e1b491970c7a Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Thu, 8 Aug 2024 13:35:16 +0300 Subject: [PATCH 08/21] fix: apply fmt --- crates/blockifier/src/execution/native/utils_test.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/blockifier/src/execution/native/utils_test.rs b/crates/blockifier/src/execution/native/utils_test.rs index 1cd541d774..163c2da401 100644 --- a/crates/blockifier/src/execution/native/utils_test.rs +++ b/crates/blockifier/src/execution/native/utils_test.rs @@ -9,8 +9,12 @@ use starknet_api::{contract_address, felt, patricia_key}; use starknet_types_core::felt::Felt; use super::{ - big4int_to_u256, contract_address_to_native_felt, contract_entrypoint_to_entrypoint_selector, - decode_felts_as_str, encode_str_as_felts, u256_to_biguint, + big4int_to_u256, + contract_address_to_native_felt, + contract_entrypoint_to_entrypoint_selector, + decode_felts_as_str, + encode_str_as_felts, + u256_to_biguint, }; #[test] From 584dc88bab21d6626d555c074d61782bf8777e58 Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Thu, 8 Aug 2024 14:25:32 +0300 Subject: [PATCH 09/21] fix: small fixes in comments and matching --- Cargo.toml | 1 + crates/blockifier/src/execution/contract_class.rs | 9 ++++----- .../blockifier/src/execution/native/syscall_handler.rs | 6 +++--- crates/blockifier/src/transaction/transaction_utils.rs | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5e351f57d8..1e7f92bd76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,6 +72,7 @@ byteorder = "1.4.3" bytes = "1" cached = "0.44.0" cairo-felt = "0.9.1" +# This is a temporary dependency, will be removed once the new version of cairo-native is released to main. cairo-native = { git = "https://github.com/lambdaclass/cairo_native", branch = "cairo-lang2.7.0-rc.3" } cairo-lang-casm = "2.7.0" cairo-lang-runner = "2.7.0" diff --git a/crates/blockifier/src/execution/contract_class.rs b/crates/blockifier/src/execution/contract_class.rs index 5fece3df23..5f1ee0e1a7 100644 --- a/crates/blockifier/src/execution/contract_class.rs +++ b/crates/blockifier/src/execution/contract_class.rs @@ -85,7 +85,7 @@ impl ContractClass { match self { ContractClass::V0(class) => class.estimate_casm_hash_computation_resources(), ContractClass::V1(class) => class.estimate_casm_hash_computation_resources(), - ContractClass::V1Native(_) => todo!("Sierra estimate casm hash computation resources."), + ContractClass::V1Native(_) => todo!("Native estimate casm hash computation resources."), } } @@ -98,7 +98,7 @@ impl ContractClass { panic!("get_visited_segments is not supported for v0 contracts.") } ContractClass::V1(class) => class.get_visited_segments(visited_pcs), - ContractClass::V1Native(_) => todo!("Sierra visited segments."), + ContractClass::V1Native(_) => todo!("Native visited segments."), } } @@ -106,7 +106,7 @@ impl ContractClass { match self { ContractClass::V0(class) => class.bytecode_length(), ContractClass::V1(class) => class.bytecode_length(), - ContractClass::V1Native(_) => todo!("Sierra estimate casm hash computation resources."), + ContractClass::V1Native(_) => todo!("Native estimate casm hash computation resources."), } } } @@ -525,8 +525,7 @@ impl ClassInfo { ) -> ContractClassResult { let (contract_class_version, condition) = match contract_class { ContractClass::V0(_) => (0, sierra_program_length == 0), - ContractClass::V1(_) => (1, sierra_program_length > 0), - ContractClass::V1Native(_) => (1, sierra_program_length > 0), + ContractClass::V1(_) | ContractClass::V1Native(_) => (1, sierra_program_length > 0), }; if condition { diff --git a/crates/blockifier/src/execution/native/syscall_handler.rs b/crates/blockifier/src/execution/native/syscall_handler.rs index 46aa9b6fc1..fa94c09676 100644 --- a/crates/blockifier/src/execution/native/syscall_handler.rs +++ b/crates/blockifier/src/execution/native/syscall_handler.rs @@ -100,9 +100,9 @@ impl<'state> NativeSyscallHandler<'state> { *remaining_gas = u128::from(remaining_gas_u64); } - // We need to have this function since in VM we have `execute_syscall` method, which is handling - // all gas-related logics in the native, syscalls are called directly, so we need to - // implement this logic here. + // Handles gas related logic when executing a syscall. Required because Native calls the + // syscalls directly unlike the VM where the `execute_syscall` method perform this operation + // first. pub fn substract_syscall_gas_cost( &mut self, remaining_gas: &mut u128, diff --git a/crates/blockifier/src/transaction/transaction_utils.rs b/crates/blockifier/src/transaction/transaction_utils.rs index 308d08de4d..4831f0f5cd 100644 --- a/crates/blockifier/src/transaction/transaction_utils.rs +++ b/crates/blockifier/src/transaction/transaction_utils.rs @@ -36,6 +36,6 @@ pub fn verify_contract_class_version( cairo_version: 1, }) } - ContractClass::V1Native(_) => todo!("Sierra verify contract class version."), + ContractClass::V1Native(_) => todo!("Native verify contract class version."), } } From 71c8757fa227b64c01086c85fac66453c1b5941d Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Thu, 8 Aug 2024 14:29:29 +0300 Subject: [PATCH 10/21] fix: bring back old `.toml` formatting --- Cargo.toml | 72 +++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1e7f92bd76..154ce3e98f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,42 +4,42 @@ resolver = "2" members = [ - "crates/batcher", - "crates/batcher_types", - "crates/blockifier", - "crates/committer", - "crates/committer_cli", - "crates/consensus_manager", - "crates/consensus_manager_types", - "crates/gateway", - "crates/mempool", - "crates/mempool_infra", - "crates/mempool_node", - "crates/mempool_test_utils", - "crates/mempool_types", - "crates/native_blockifier", - "crates/papyrus_base_layer", - "crates/papyrus_common", - "crates/papyrus_config", - "crates/papyrus_execution", - "crates/papyrus_load_test", - "crates/papyrus_monitoring_gateway", - "crates/papyrus_network", - "crates/papyrus_node", - "crates/papyrus_p2p_sync", - "crates/papyrus_proc_macros", - "crates/papyrus_protobuf", - "crates/papyrus_rpc", - "crates/papyrus_storage", - "crates/papyrus_sync", - "crates/papyrus_test_utils", - "crates/sequencing/papyrus_block_builder", - "crates/sequencing/papyrus_consensus", - "crates/starknet_api", - "crates/starknet_client", - "crates/starknet_sierra_compile", - "crates/task_executor", - "crates/tests-integration", + "crates/batcher", + "crates/batcher_types", + "crates/blockifier", + "crates/committer", + "crates/committer_cli", + "crates/consensus_manager", + "crates/consensus_manager_types", + "crates/gateway", + "crates/mempool", + "crates/mempool_infra", + "crates/mempool_node", + "crates/mempool_test_utils", + "crates/mempool_types", + "crates/native_blockifier", + "crates/papyrus_base_layer", + "crates/papyrus_common", + "crates/papyrus_config", + "crates/papyrus_execution", + "crates/papyrus_load_test", + "crates/papyrus_monitoring_gateway", + "crates/papyrus_network", + "crates/papyrus_node", + "crates/papyrus_p2p_sync", + "crates/papyrus_proc_macros", + "crates/papyrus_protobuf", + "crates/papyrus_rpc", + "crates/papyrus_storage", + "crates/papyrus_sync", + "crates/papyrus_test_utils", + "crates/sequencing/papyrus_block_builder", + "crates/sequencing/papyrus_consensus", + "crates/starknet_api", + "crates/starknet_client", + "crates/starknet_sierra_compile", + "crates/task_executor", + "crates/tests-integration", ] [workspace.package] From 5a1bcc2ccb6966142170d93f7df7fdf033859955 Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Thu, 8 Aug 2024 17:06:10 +0300 Subject: [PATCH 11/21] fix: remove unused yet utility functions --- .../blockifier/src/execution/native/utils.rs | 71 +------------------ .../src/execution/native/utils_test.rs | 53 +------------- 2 files changed, 3 insertions(+), 121 deletions(-) diff --git a/crates/blockifier/src/execution/native/utils.rs b/crates/blockifier/src/execution/native/utils.rs index a23b15e01b..2f8f744c19 100644 --- a/crates/blockifier/src/execution/native/utils.rs +++ b/crates/blockifier/src/execution/native/utils.rs @@ -1,19 +1,15 @@ use std::collections::{HashMap, HashSet}; use std::hash::RandomState; -use ark_ff::BigInt; use cairo_lang_sierra::ids::FunctionId; use cairo_lang_starknet_classes::contract_class::ContractEntryPoint; use cairo_native::execution_result::ContractExecutionResult; use cairo_native::executor::AotNativeExecutor; -use cairo_native::starknet::{ResourceBounds, SyscallResult, TxV2Info, U256}; use cairo_vm::vm::runners::cairo_runner::ExecutionResources; use itertools::Itertools; -use num_bigint::BigUint; use num_traits::ToBytes; -use starknet_api::core::{ContractAddress, EntryPointSelector}; +use starknet_api::core::EntryPointSelector; use starknet_api::state::StorageKey; -use starknet_api::transaction::Resource; use starknet_types_core::felt::Felt; use crate::execution::call_info::{ @@ -26,8 +22,6 @@ use crate::execution::call_info::{ use crate::execution::entry_point::{CallEntryPoint, EntryPointExecutionResult}; use crate::execution::errors::EntryPointExecutionError; use crate::execution::native::syscall_handler::NativeSyscallHandler; -use crate::execution::syscalls::hint_processor::{L1_GAS, L2_GAS}; -use crate::transaction::objects::CurrentTransactionInfo; #[cfg(test)] #[path = "utils_test.rs"] @@ -37,10 +31,6 @@ pub mod test; // To be deleted once cairo native gas handling can be used. pub const NATIVE_GAS_PLACEHOLDER: u64 = 12; -pub fn contract_address_to_native_felt(contract_address: ContractAddress) -> Felt { - *contract_address.0.key() -} - pub fn contract_entrypoint_to_entrypoint_selector( entrypoint: &ContractEntryPoint, ) -> EntryPointSelector { @@ -115,22 +105,6 @@ pub fn create_callinfo( }) } -pub fn u256_to_biguint(u256: U256) -> BigUint { - let lo = BigUint::from(u256.lo); - let hi = BigUint::from(u256.hi); - - (hi << 128) + lo -} - -pub fn big4int_to_u256(b_int: BigInt<4>) -> U256 { - let [a, b, c, d] = b_int.0; - - let lo = u128::from(a) | (u128::from(b) << 64); - let hi = u128::from(c) | (u128::from(d) << 64); - - U256 { lo, hi } -} - pub fn encode_str_as_felts(msg: &str) -> Vec { const CHUNK_SIZE: usize = 32; @@ -162,46 +136,3 @@ pub fn decode_felts_as_str(encoding: &[Felt]) -> String { } } } - -pub fn default_tx_v2_info() -> TxV2Info { - TxV2Info { - version: Default::default(), - account_contract_address: Default::default(), - max_fee: 0, - signature: vec![], - transaction_hash: Default::default(), - chain_id: Default::default(), - nonce: Default::default(), - resource_bounds: vec![], - tip: 0, - paymaster_data: vec![], - nonce_data_availability_mode: 0, - fee_data_availability_mode: 0, - account_deployment_data: vec![], - } -} - -pub fn calculate_resource_bounds( - tx_info: &CurrentTransactionInfo, -) -> SyscallResult> { - let l1_gas = Felt::from_hex(L1_GAS).map_err(|e| encode_str_as_felts(&e.to_string()))?; - let l2_gas = Felt::from_hex(L2_GAS).map_err(|e| encode_str_as_felts(&e.to_string()))?; - - Ok(tx_info - .resource_bounds - .0 - .iter() - .map(|(resource, resource_bound)| { - let resource = match resource { - Resource::L1Gas => l1_gas, - Resource::L2Gas => l2_gas, - }; - - ResourceBounds { - resource, - max_amount: resource_bound.max_amount, - max_price_per_unit: resource_bound.max_price_per_unit, - } - }) - .collect()) -} diff --git a/crates/blockifier/src/execution/native/utils_test.rs b/crates/blockifier/src/execution/native/utils_test.rs index 163c2da401..1f295fe74f 100644 --- a/crates/blockifier/src/execution/native/utils_test.rs +++ b/crates/blockifier/src/execution/native/utils_test.rs @@ -1,48 +1,10 @@ -use ark_ff::BigInt; use cairo_lang_starknet_classes::contract_class::ContractEntryPoint; -use cairo_native::starknet::U256; use num_bigint::BigUint; -use num_traits::Num; use pretty_assertions::assert_eq; -use starknet_api::core::{ContractAddress, EntryPointSelector, PatriciaKey}; -use starknet_api::{contract_address, felt, patricia_key}; +use starknet_api::core::EntryPointSelector; use starknet_types_core::felt::Felt; -use super::{ - big4int_to_u256, - contract_address_to_native_felt, - contract_entrypoint_to_entrypoint_selector, - decode_felts_as_str, - encode_str_as_felts, - u256_to_biguint, -}; - -#[test] -fn test_u256_to_biguint() { - let u256 = U256 { lo: 0x1234_5678, hi: 0x9abc_def0 }; - - let expected_biguint = - BigUint::from_str_radix("9abcdef000000000000000000000000012345678", 16).unwrap(); - - let actual_biguint = u256_to_biguint(u256); - - assert_eq!(actual_biguint, expected_biguint); -} - -#[test] -fn big4int_to_u256_test() { - let big_int: BigInt<4> = - BigInt!("34627219085299802438030559924718133626325687994345768323532899246965609283226"); - - let expected_u256 = U256 { - lo: 162661716537849136813498421163242372762, - hi: 101760251048639038778899488808831626319, - }; - - let actual_u256 = big4int_to_u256(big_int); - - assert_eq!(actual_u256, expected_u256); -} +use super::{contract_entrypoint_to_entrypoint_selector, decode_felts_as_str, encode_str_as_felts}; #[test] fn test_encode_decode_str() { @@ -68,17 +30,6 @@ fn test_decode_non_utf8_str() { assert_eq!(res, format!("[{}, {} ({}), {}]", v1, v2_msg, v2, v3)) } -#[test] -fn test_contract_address_to_felt() { - const NUM: u128 = 1234; - - let contract_address = contract_address!({ NUM }); - let expected_felt = Felt::from(NUM); - let actual_felt = contract_address_to_native_felt(contract_address); - - assert_eq!(actual_felt, expected_felt); -} - #[test] fn test_contract_entrypoint_to_entrypoint_selector() { const NUM: u128 = 123; From 32c4400f94aebd40e87ede986017604dff81d308 Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Mon, 12 Aug 2024 12:56:21 +0300 Subject: [PATCH 12/21] feat: add syscall failure format --- .../syscalls/syscall_tests/failure_format.rs | 23 +++++++++++++++++++ .../execution/syscalls/syscall_tests/mod.rs | 1 + 2 files changed, 24 insertions(+) create mode 100644 crates/blockifier/src/execution/syscalls/syscall_tests/failure_format.rs diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/failure_format.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/failure_format.rs new file mode 100644 index 0000000000..27891c2f2d --- /dev/null +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/failure_format.rs @@ -0,0 +1,23 @@ +use cairo_lang_utils::byte_array::BYTE_ARRAY_MAGIC; +use starknet_types_core::felt::Felt; + +use crate::execution::errors::EntryPointExecutionError; + +#[test] +fn test_syscall_failure_format() { + let error_data = vec![ + // Magic to indicate that this is a byte array. + BYTE_ARRAY_MAGIC, + // The number of full words in the byte array. + "0x00", + // The pending word of the byte array: "Execution failure" + "0x457865637574696f6e206661696c757265", + // The length of the pending word. + "0x11", + ] + .into_iter() + .map(|x| Felt::from_hex(x).unwrap()) + .collect(); + let error = EntryPointExecutionError::ExecutionFailed { error_data }; + assert_eq!(error.to_string(), "Execution failed. Failure reason: \"Execution failure\"."); +} diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/mod.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/mod.rs index 3f048e319a..fbebf14ba8 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/mod.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/mod.rs @@ -2,6 +2,7 @@ mod call_contract; mod constants; mod deploy; mod emit_event; +mod failure_format; mod get_block_hash; mod get_execution_info; mod keccak; From a2ba95b4238761ab489c7ab13fd7e277a13c62a3 Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Fri, 16 Aug 2024 11:51:15 +0300 Subject: [PATCH 13/21] chore: update Cargo.lock --- Cargo.lock | 624 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 376 insertions(+), 248 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9e2854c196..1d99ca0925 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -346,7 +346,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", "synstructure", ] @@ -358,7 +358,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -446,7 +446,7 @@ checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ "async-channel 2.3.1", "async-executor", - "async-io 2.3.3", + "async-io 2.3.4", "async-lock 3.4.0", "blocking", "futures-lite 2.3.0", @@ -475,9 +475,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.3" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" +checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ "async-lock 3.4.0", "cfg-if", @@ -485,11 +485,11 @@ dependencies = [ "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.7.2", + "polling 3.7.3", "rustix 0.38.34", "slab", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -548,16 +548,16 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] name = "async-signal" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb3634b73397aa844481f814fad23bbf07fdb0eabec10f2eb95e58944b1ec32" +checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" dependencies = [ - "async-io 2.3.3", + "async-io 2.3.4", "async-lock 3.4.0", "atomic-waker", "cfg-if", @@ -566,7 +566,7 @@ dependencies = [ "rustix 0.38.34", "signal-hook-registry", "slab", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -614,7 +614,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -631,7 +631,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -707,7 +707,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -887,7 +887,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -909,7 +909,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.72", + "syn 2.0.74", "which", ] @@ -1000,7 +1000,7 @@ dependencies = [ "criterion 0.3.6", "derive_more", "glob", - "indexmap 2.3.0", + "indexmap 2.4.0", "itertools 0.10.5", "keccak", "log", @@ -1156,9 +1156,9 @@ checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" [[package]] name = "cairo-lang-casm" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a43421bf72645b3a562d264747166d6f093e960a69dfa38b67bb3209e370366" +checksum = "e4425280959f189d8a5ebf1f5363c10663bc9f843a4819253e6be87d183b583e" dependencies = [ "cairo-lang-utils", "indoc 2.0.5", @@ -1195,18 +1195,18 @@ dependencies = [ [[package]] name = "cairo-lang-debug" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d28f38e1c62fed15a4de9f3c95741d6b24ef2a9e67a2b88a047eb6ea7de992e" +checksum = "6ac7332f2b041ca28b24b0311a0b4a35f426bb52836a2d268a8374ea262e9e6b" dependencies = [ "cairo-lang-utils", ] [[package]] name = "cairo-lang-defs" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712206b7be3fb1a33e50e1c30aa8502b4a461155fd93ad26213d0d8b242cb08d" +checksum = "079a34b560a82b463cd12ae62022d70981e8ab56b6505f9499348ebeaf460de8" dependencies = [ "cairo-lang-debug", "cairo-lang-diagnostics", @@ -1221,9 +1221,9 @@ dependencies = [ [[package]] name = "cairo-lang-diagnostics" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3c8dc2bff2411fbf602d80a83b719e6e3955c1c5d767ec18b295fc92e8616a" +checksum = "c29625349297ad791942377763f5b04c779ea694f436488dc6ad194720b89487" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -1233,9 +1233,9 @@ dependencies = [ [[package]] name = "cairo-lang-eq-solver" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaa8ac24c97770739f5a78d630b8515273c8b9f4aff34e1f88b988fac50340de" +checksum = "9cb26cd75126db6eaf94d5dffe0ce750d030ac879a88de5a621551969e9b59e3" dependencies = [ "cairo-lang-utils", "good_lp", @@ -1243,23 +1243,24 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4596331565fe61d10a0a6a03ace2b9d0ba93f03ee12a8450fe9252a6fee770f3" +checksum = "651012f2956bea884c7a3ab9df21dc76112d7edd3f403b37ca5be62fc3f41b09" dependencies = [ "cairo-lang-debug", "cairo-lang-utils", "path-clean", "salsa", + "semver", "serde", "smol_str", ] [[package]] name = "cairo-lang-formatter" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b8eb08e511d6e6df51370cdc7d85f0de9a38c8b14a15762665c60c2df6d32d" +checksum = "0d09ffb9498368cf4e95d0b28662596331aef1677e4f759ab5e609d27dfcb587" dependencies = [ "anyhow", "cairo-lang-diagnostics", @@ -1278,9 +1279,9 @@ dependencies = [ [[package]] name = "cairo-lang-lowering" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d535dc591513875b39b799270df21db10540033fd7710917760c22fc063a4ae" +checksum = "da4ffe6c197c35dec665029fcf695422f02c55b5118b4da1142e182b9fe77f87" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -1303,9 +1304,9 @@ dependencies = [ [[package]] name = "cairo-lang-parser" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73019d5873715964f428ff10467efb607d6dc007ae164a21547bf20d9b5dcc72" +checksum = "f262ad5f1110ff70c93deb81cce024cf160f4a4518762e7deb2047fe73846789" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", @@ -1323,9 +1324,9 @@ dependencies = [ [[package]] name = "cairo-lang-plugins" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96e52fca18bc696011a47a4ded0dc00e2e0ac7c81a8052eddd4ad546c46b818e" +checksum = "18024b44b5edbc1f378ba85c1a4ff04e880ea465a33251053aec507f08250668" dependencies = [ "cairo-lang-defs", "cairo-lang-diagnostics", @@ -1342,20 +1343,20 @@ dependencies = [ [[package]] name = "cairo-lang-proc-macros" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d55dcf98a6e1a03e0b36129fad4253f9e6666a1746ab9c075d212ba68a4e9c1" +checksum = "124402d8fad2a033bb36910dd7d0651f3100845c63dce679c58797a8cb0448c2" dependencies = [ "cairo-lang-debug", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] name = "cairo-lang-project" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ddb432e5199a65e37bab97ef6322afabd60e0e638ada31178d9c23d237219d" +checksum = "1f37dba9653eabf4dcb43a5e1436cd6bc093b5ad6f28ff42eaaef12549014213" dependencies = [ "cairo-lang-filesystem", "cairo-lang-utils", @@ -1398,9 +1399,9 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "393325820207491a7475269e98163e0db7e85e4b215f4d801ca537ce1cd6daa7" +checksum = "a1612476b548e9ab8ae89ee38a73d9875339f62f2f59d9ce8a719bc1761c54c3" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -1596,9 +1597,9 @@ dependencies = [ [[package]] name = "cairo-lang-syntax" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0ca518ed7c3674d9b62470f7482f4b07553eb3a02d83e0ae61bd6b5ecb4ec8" +checksum = "b2a376f88d815b63505be54a6afa93d75b67cfd65835922ec648cfcbb0a5e4b4" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -1612,9 +1613,9 @@ dependencies = [ [[package]] name = "cairo-lang-syntax-codegen" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f12bdff5c265edb5a76084bfde2bc8270a7fdaf16ac58aa0d54ea6a20c29023" +checksum = "01f276bc28f6302fc63032046a12b60d18498906e65f646acb963244eed97f7c" dependencies = [ "genco", "xshell", @@ -1650,9 +1651,9 @@ dependencies = [ [[package]] name = "cairo-lang-test-utils" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a2365bd502a657437f9d0d665e32e017054d0effdbecb1dda776bfcc11235d" +checksum = "21e90b6236439e19077ec913351a17a33c7be199dcafdacd8389c4c5199400d6" dependencies = [ "cairo-lang-formatter", "cairo-lang-utils", @@ -1663,12 +1664,12 @@ dependencies = [ [[package]] name = "cairo-lang-utils" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd5c8c127b9362a12ffb9dede38e792c81b4ded5a98b448baec157b745f47d1" +checksum = "55a394e545f1500bea093d01be40895d3234faaa24d9585d08a509c514cabd88" dependencies = [ "hashbrown 0.14.5", - "indexmap 2.3.0", + "indexmap 2.4.0", "itertools 0.12.1", "num-bigint 0.4.6", "num-traits 0.2.19", @@ -1680,7 +1681,7 @@ dependencies = [ [[package]] name = "cairo-native" version = "0.2.0" -source = "git+https://github.com/lambdaclass/cairo_native?branch=cairo-lang2.7.0-rc.3#332cd5f80fa747d59e07fec0eff753cf7e2717fb" +source = "git+https://github.com/lambdaclass/cairo_native?branch=cairo-lang2.7.0-rc.3#8404a2b48faa48a97a3af5da5d8ee7c466b0b503" dependencies = [ "anyhow", "bumpalo", @@ -1701,7 +1702,7 @@ dependencies = [ "cairo-lang-utils", "cairo-native-runtime", "cc", - "clap 4.5.13", + "clap 4.5.16", "colored", "educe", "id-arena", @@ -1730,7 +1731,7 @@ dependencies = [ [[package]] name = "cairo-native-runtime" version = "0.2.0" -source = "git+https://github.com/lambdaclass/cairo_native?branch=cairo-lang2.7.0-rc.3#332cd5f80fa747d59e07fec0eff753cf7e2717fb" +source = "git+https://github.com/lambdaclass/cairo_native?branch=cairo-lang2.7.0-rc.3#8404a2b48faa48a97a3af5da5d8ee7c466b0b503" dependencies = [ "cairo-lang-sierra-gas", "lazy_static", @@ -1779,9 +1780,9 @@ checksum = "02d88a780e6aa14b75d7be99f374d8b5c315aaf9c12ada1e2b1cb281468584c9" [[package]] name = "camino" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "3054fea8a20d8ff3968d5b22cc27501d2b08dc4decdb31b184323f00c5ef23bb" dependencies = [ "serde", ] @@ -1817,12 +1818,13 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.8" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549" +checksum = "68064e60dbf1f17005c2fde4d07c16d8baa506fd7ffed8ccab702d93617975c7" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -1842,9 +1844,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chacha20" @@ -1947,9 +1949,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.13" +version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbb260a053428790f3de475e304ff84cdbc4face759ea7a3e64c1edd938a7fc" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", "clap_derive", @@ -1957,9 +1959,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.13" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", @@ -1976,7 +1978,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -2087,13 +2089,13 @@ dependencies = [ name = "committer_cli" version = "0.1.0-rc.0" dependencies = [ - "clap 4.5.13", + "clap 4.5.16", "committer", "criterion 0.5.1", "derive_more", "ethnum", "futures", - "indexmap 2.3.0", + "indexmap 2.4.0", "pretty_assertions", "rand 0.8.5", "rand_distr", @@ -2255,9 +2257,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core2" @@ -2270,9 +2272,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -2321,7 +2323,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.5.13", + "clap 4.5.16", "criterion-plot 0.5.0", "is-terminal", "itertools 0.10.5", @@ -2453,12 +2455,12 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.4.4" +version = "3.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345" +checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" dependencies = [ - "nix 0.28.0", - "windows-sys 0.52.0", + "nix 0.29.0", + "windows-sys 0.59.0", ] [[package]] @@ -2485,7 +2487,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -2533,7 +2535,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -2555,7 +2557,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -2677,7 +2679,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -2687,7 +2689,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" dependencies = [ "derive_builder_core", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -2700,7 +2702,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -2795,7 +2797,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -2876,7 +2878,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -2962,7 +2964,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -2993,7 +2995,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -3013,7 +3015,7 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -3189,7 +3191,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "syn 2.0.72", + "syn 2.0.74", "toml", "walkdir", ] @@ -3207,7 +3209,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -3233,7 +3235,7 @@ dependencies = [ "serde", "serde_json", "strum 0.26.3", - "syn 2.0.72", + "syn 2.0.74", "tempfile", "thiserror", "tiny-keccak", @@ -3468,14 +3470,14 @@ checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] @@ -3691,7 +3693,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -3784,7 +3786,7 @@ checksum = "553630feadf7b76442b0849fd25fdf89b860d933623aec9693fed19af0400c78" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -3977,7 +3979,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.3.0", + "indexmap 2.4.0", "slab", "tokio", "tokio-util", @@ -3996,7 +3998,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.3.0", + "indexmap 2.4.0", "slab", "tokio", "tokio-util", @@ -4456,7 +4458,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io 2.3.3", + "async-io 2.3.4", "core-foundation", "fnv", "futures", @@ -4574,9 +4576,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -4663,11 +4665,11 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] @@ -4740,9 +4742,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -4918,7 +4920,7 @@ dependencies = [ "anyhow", "base64 0.21.7", "bytecount", - "clap 4.5.13", + "clap 4.5.16", "fancy-regex", "fraction", "getrandom", @@ -5054,9 +5056,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.156" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "a5f43f184355eefb8d17fc948dbecf6c13be3c141f20d834ae842193a448c72a" [[package]] name = "libloading" @@ -5105,17 +5107,17 @@ dependencies = [ "instant", "libp2p-allow-block-list", "libp2p-connection-limits", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-dns", - "libp2p-gossipsub", - "libp2p-identify", + "libp2p-gossipsub 0.46.1", + "libp2p-identify 0.44.2", "libp2p-identity", - "libp2p-kad", + "libp2p-kad 0.45.3", "libp2p-mdns", "libp2p-metrics", "libp2p-noise", "libp2p-quic", - "libp2p-swarm", + "libp2p-swarm 0.44.2", "libp2p-tcp", "libp2p-upnp", "libp2p-yamux", @@ -5131,9 +5133,9 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "107b238b794cb83ab53b74ad5dcf7cca3200899b72fe662840cfb52f5b0a32e6" dependencies = [ - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", - "libp2p-swarm", + "libp2p-swarm 0.44.2", "void", ] @@ -5143,9 +5145,9 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7cd50a78ccfada14de94cbacd3ce4b0138157f376870f13d3a8422cd075b4fd" dependencies = [ - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", - "libp2p-swarm", + "libp2p-swarm 0.44.2", "void", ] @@ -5178,6 +5180,34 @@ dependencies = [ "web-time", ] +[[package]] +name = "libp2p-core" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a61f26c83ed111104cd820fe9bc3aaabbac5f1652a1d213ed6e900b7918a1298" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "libp2p-identity", + "multiaddr", + "multihash", + "multistream-select", + "once_cell", + "parking_lot 0.12.3", + "pin-project", + "quick-protobuf", + "rand 0.8.5", + "rw-stream-sink", + "smallvec", + "thiserror", + "tracing", + "unsigned-varint 0.8.0", + "void", + "web-time", +] + [[package]] name = "libp2p-dns" version = "0.41.1" @@ -5187,7 +5217,7 @@ dependencies = [ "async-trait", "futures", "hickory-resolver", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", "parking_lot 0.12.3", "smallvec", @@ -5211,9 +5241,9 @@ dependencies = [ "getrandom", "hex_fmt", "instant", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", - "libp2p-swarm", + "libp2p-swarm 0.44.2", "prometheus-client", "quick-protobuf", "quick-protobuf-codec 0.3.1", @@ -5226,6 +5256,37 @@ dependencies = [ "void", ] +[[package]] +name = "libp2p-gossipsub" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4e830fdf24ac8c444c12415903174d506e1e077fbe3875c404a78c5935a8543" +dependencies = [ + "asynchronous-codec 0.7.0", + "base64 0.22.1", + "byteorder", + "bytes", + "either", + "fnv", + "futures", + "futures-ticker", + "getrandom", + "hex_fmt", + "libp2p-core 0.42.0", + "libp2p-identity", + "libp2p-swarm 0.45.1", + "prometheus-client", + "quick-protobuf", + "quick-protobuf-codec 0.3.1", + "rand 0.8.5", + "regex", + "sha2", + "smallvec", + "tracing", + "void", + "web-time", +] + [[package]] name = "libp2p-identify" version = "0.44.2" @@ -5237,9 +5298,32 @@ dependencies = [ "futures", "futures-bounded", "futures-timer", - "libp2p-core", + "libp2p-core 0.41.3", + "libp2p-identity", + "libp2p-swarm 0.44.2", + "lru", + "quick-protobuf", + "quick-protobuf-codec 0.3.1", + "smallvec", + "thiserror", + "tracing", + "void", +] + +[[package]] +name = "libp2p-identify" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1711b004a273be4f30202778856368683bd9a83c4c7dcc8f848847606831a4e3" +dependencies = [ + "asynchronous-codec 0.7.0", + "either", + "futures", + "futures-bounded", + "futures-timer", + "libp2p-core 0.42.0", "libp2p-identity", - "libp2p-swarm", + "libp2p-swarm 0.45.1", "lru", "quick-protobuf", "quick-protobuf-codec 0.3.1", @@ -5283,9 +5367,9 @@ dependencies = [ "futures-bounded", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", - "libp2p-swarm", + "libp2p-swarm 0.44.2", "quick-protobuf", "quick-protobuf-codec 0.3.1", "rand 0.8.5", @@ -5298,6 +5382,35 @@ dependencies = [ "void", ] +[[package]] +name = "libp2p-kad" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3fd4d149f0539e608d178b7cd1cfb0c1c6a8dc367eda2bc1cc81a28a1552161" +dependencies = [ + "arrayvec", + "asynchronous-codec 0.7.0", + "bytes", + "either", + "fnv", + "futures", + "futures-bounded", + "futures-timer", + "libp2p-core 0.42.0", + "libp2p-identity", + "libp2p-swarm 0.45.1", + "quick-protobuf", + "quick-protobuf-codec 0.3.1", + "rand 0.8.5", + "sha2", + "smallvec", + "thiserror", + "tracing", + "uint", + "void", + "web-time", +] + [[package]] name = "libp2p-mdns" version = "0.45.1" @@ -5308,9 +5421,9 @@ dependencies = [ "futures", "hickory-proto", "if-watch", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", - "libp2p-swarm", + "libp2p-swarm 0.44.2", "rand 0.8.5", "smallvec", "socket2 0.5.7", @@ -5321,20 +5434,20 @@ dependencies = [ [[package]] name = "libp2p-metrics" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdac91ae4f291046a3b2660c039a2830c931f84df2ee227989af92f7692d3357" +checksum = "a70afa7692c81ee03e89c40d1e8638d634f18baef6aeeea30fd245edfae4d3fd" dependencies = [ "futures", - "instant", - "libp2p-core", - "libp2p-gossipsub", - "libp2p-identify", + "libp2p-core 0.42.0", + "libp2p-gossipsub 0.47.0", + "libp2p-identify 0.45.0", "libp2p-identity", - "libp2p-kad", - "libp2p-swarm", + "libp2p-kad 0.46.0", + "libp2p-swarm 0.45.1", "pin-project", "prometheus-client", + "web-time", ] [[package]] @@ -5347,7 +5460,7 @@ dependencies = [ "bytes", "curve25519-dalek", "futures", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", "multiaddr", "multihash", @@ -5372,7 +5485,7 @@ dependencies = [ "asynchronous-codec 0.6.2", "bytes", "futures", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", "quick-protobuf", "quick-protobuf-codec 0.2.0", @@ -5389,7 +5502,7 @@ dependencies = [ "futures", "futures-timer", "if-watch", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", "libp2p-tls", "parking_lot 0.12.3", @@ -5415,7 +5528,7 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", "libp2p-swarm-derive", "lru", @@ -5428,6 +5541,28 @@ dependencies = [ "void", ] +[[package]] +name = "libp2p-swarm" +version = "0.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7dd6741793d2c1fb2088f67f82cf07261f25272ebe3c0b0c311e0c6b50e851a" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "libp2p-core 0.42.0", + "libp2p-identity", + "lru", + "multistream-select", + "once_cell", + "rand 0.8.5", + "smallvec", + "tracing", + "void", + "web-time", +] + [[package]] name = "libp2p-swarm-derive" version = "0.34.2" @@ -5437,7 +5572,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -5449,10 +5584,10 @@ dependencies = [ "async-trait", "futures", "futures-timer", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", "libp2p-plaintext", - "libp2p-swarm", + "libp2p-swarm 0.44.2", "libp2p-tcp", "libp2p-yamux", "rand 0.8.5", @@ -5470,7 +5605,7 @@ dependencies = [ "futures-timer", "if-watch", "libc", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", "socket2 0.5.7", "tokio", @@ -5485,7 +5620,7 @@ checksum = "72b7b831e55ce2aa6c354e6861a85fdd4dd0a2b97d5e276fabac0e4810a71776" dependencies = [ "futures", "futures-rustls", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", "rcgen", "ring 0.17.8", @@ -5505,8 +5640,8 @@ dependencies = [ "futures", "futures-timer", "igd-next", - "libp2p-core", - "libp2p-swarm", + "libp2p-core 0.41.3", + "libp2p-swarm 0.44.2", "tokio", "tracing", "void", @@ -5520,7 +5655,7 @@ checksum = "ddd5265f6b80f94d48a3963541aad183cc598a645755d2f1805a373e41e0716b" dependencies = [ "either", "futures", - "libp2p-core", + "libp2p-core 0.41.3", "thiserror", "tracing", "yamux 0.12.1", @@ -5546,6 +5681,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", + "redox_syscall 0.5.3", ] [[package]] @@ -5716,7 +5852,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.72", + "syn 2.0.74", "tblgen-alt", "unindent 0.2.3", ] @@ -5802,7 +5938,7 @@ checksum = "38b4faf00617defe497754acde3024865bc143d44a86799b24e191ecff91354f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -5868,9 +6004,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi 0.3.9", "libc", @@ -5911,7 +6047,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -6051,7 +6187,7 @@ dependencies = [ "cached", "cairo-lang-starknet-classes", "cairo-vm", - "indexmap 2.3.0", + "indexmap 2.4.0", "log", "num-bigint 0.4.6", "papyrus_storage", @@ -6165,9 +6301,9 @@ dependencies = [ [[package]] name = "nix" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -6411,7 +6547,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -6507,7 +6643,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -6614,7 +6750,7 @@ dependencies = [ "assert_matches", "cairo-lang-starknet-classes", "hex", - "indexmap 2.3.0", + "indexmap 2.4.0", "itertools 0.10.5", "lazy_static", "papyrus_test_utils", @@ -6633,7 +6769,7 @@ name = "papyrus_config" version = "0.4.0-rc.0" dependencies = [ "assert_matches", - "clap 4.5.13", + "clap 4.5.16", "itertools 0.10.5", "lazy_static", "papyrus_test_utils", @@ -6681,7 +6817,7 @@ dependencies = [ "cairo-lang-starknet-classes", "cairo-lang-utils", "cairo-vm", - "indexmap 2.3.0", + "indexmap 2.4.0", "itertools 0.10.5", "lazy_static", "once_cell", @@ -6779,7 +6915,7 @@ version = "0.4.0-rc.0" dependencies = [ "anyhow", "assert-json-diff", - "clap 4.5.13", + "clap 4.5.16", "colored", "const_format", "futures", @@ -6825,7 +6961,7 @@ dependencies = [ "chrono", "enum-iterator", "futures", - "indexmap 2.3.0", + "indexmap 2.4.0", "lazy_static", "metrics 0.21.1", "papyrus_common", @@ -6857,14 +6993,14 @@ dependencies = [ "papyrus_test_utils", "prometheus-parse", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] name = "papyrus_protobuf" version = "0.4.0-rc.0" dependencies = [ - "indexmap 2.3.0", + "indexmap 2.4.0", "lazy_static", "papyrus_common", "papyrus_test_utils", @@ -6896,7 +7032,7 @@ dependencies = [ "futures-util", "hex", "hyper 0.14.30", - "indexmap 2.3.0", + "indexmap 2.4.0", "insta", "itertools 0.10.5", "jsonrpsee", @@ -6941,9 +7077,9 @@ dependencies = [ "cairo-lang-starknet-classes", "cairo-lang-utils", "camelpaste", - "clap 4.5.13", + "clap 4.5.16", "human_bytes", - "indexmap 2.3.0", + "indexmap 2.4.0", "insta", "integer-encoding", "lazy_static", @@ -6993,7 +7129,7 @@ dependencies = [ "chrono", "futures", "futures-util", - "indexmap 2.3.0", + "indexmap 2.4.0", "itertools 0.10.5", "lru", "metrics 0.21.1", @@ -7024,7 +7160,7 @@ dependencies = [ "cairo-lang-casm", "cairo-lang-starknet-classes", "cairo-lang-utils", - "indexmap 2.3.0", + "indexmap 2.4.0", "num-bigint 0.4.6", "pretty_assertions", "primitive-types", @@ -7216,7 +7352,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.3.0", + "indexmap 2.4.0", ] [[package]] @@ -7259,7 +7395,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -7303,7 +7439,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -7320,9 +7456,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", "fastrand 2.1.0", @@ -7391,9 +7527,9 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.2" +version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ "cfg-if", "concurrent-queue", @@ -7401,7 +7537,7 @@ dependencies = [ "pin-project-lite", "rustix 0.38.34", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -7497,7 +7633,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -7618,7 +7754,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -7676,7 +7812,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.72", + "syn 2.0.74", "tempfile", ] @@ -7690,7 +7826,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -8132,15 +8268,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.5.3" @@ -8687,7 +8814,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -8778,9 +8905,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.205" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33aedb1a7135da52b7c21791455563facbbcc43d0f0f66165b42c21b3dfb150" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] @@ -8797,13 +8924,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.205" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -8814,14 +8941,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] name = "serde_json" -version = "1.0.122" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" +checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" dependencies = [ "itoa", "memchr", @@ -8858,7 +8985,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -8906,7 +9033,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -9052,9 +9179,9 @@ dependencies = [ [[package]] name = "slug" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bd94acec9c8da640005f8e135a39fc0372e74535e6b368b7a04b875f784c8c4" +checksum = "882a80f72ee45de3cc9a5afeb2da0331d58df69e4e7d8eeb5d3c7784ae67e724" dependencies = [ "deunicode", "wasm-bindgen", @@ -9261,7 +9388,7 @@ checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" dependencies = [ "starknet-curve 0.4.2", "starknet-ff", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -9320,7 +9447,7 @@ dependencies = [ "cairo-lang-starknet-classes", "derive_more", "hex", - "indexmap 2.3.0", + "indexmap 2.4.0", "itertools 0.12.1", "once_cell", "primitive-types", @@ -9366,7 +9493,7 @@ dependencies = [ "cairo-lang-starknet-classes", "enum-iterator", "http 0.2.12", - "indexmap 2.3.0", + "indexmap 2.4.0", "mockall", "mockito 0.31.1", "os_info", @@ -9509,7 +9636,7 @@ dependencies = [ "axum", "blockifier", "cairo-lang-starknet-classes", - "indexmap 2.3.0", + "indexmap 2.4.0", "itertools 0.10.5", "mempool_test_utils", "papyrus_common", @@ -9539,7 +9666,7 @@ dependencies = [ "anyhow", "assert-json-diff", "assert_matches", - "clap 4.5.13", + "clap 4.5.16", "colored", "const_format", "futures", @@ -9691,7 +9818,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -9704,7 +9831,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -9746,9 +9873,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.72" +version = "2.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" dependencies = [ "proc-macro2", "quote", @@ -9769,7 +9896,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -9885,7 +10012,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -9896,7 +10023,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", "test-case-core", ] @@ -9919,7 +10046,7 @@ checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -9932,7 +10059,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.72", + "syn 2.0.74", "which", ] @@ -9962,7 +10089,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -10108,7 +10235,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -10222,7 +10349,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.3.0", + "indexmap 2.4.0", "toml_datetime", "winnow 0.5.40", ] @@ -10233,7 +10360,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.3.0", + "indexmap 2.4.0", "toml_datetime", "winnow 0.5.40", ] @@ -10244,7 +10371,7 @@ version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.3.0", + "indexmap 2.4.0", "serde", "serde_spanned", "toml_datetime", @@ -10274,15 +10401,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -10304,7 +10431,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -10670,34 +10797,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -10707,9 +10835,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -10717,28 +10845,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -11204,7 +11332,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] @@ -11224,7 +11352,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.74", ] [[package]] From 938c552292c0a27f0bb06e7b6807c5925f24e9d5 Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Mon, 19 Aug 2024 15:08:12 +0300 Subject: [PATCH 14/21] feat: update Cargo.lock --- Cargo.lock | 2093 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 1355 insertions(+), 738 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7644fe9b94..07631463aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,9 +14,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -114,9 +114,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -129,33 +129,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.3" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -163,9 +163,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arc-swap" @@ -203,7 +203,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools 0.10.5", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "paste", "rustc_version", @@ -226,7 +226,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "proc-macro2", "quote", @@ -277,7 +277,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint 0.4.5", + "num-bigint 0.4.6", ] [[package]] @@ -303,9 +303,9 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" @@ -324,9 +324,9 @@ dependencies = [ [[package]] name = "asn1-rs" -version = "0.5.2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" dependencies = [ "asn1-rs-derive", "asn1-rs-impl", @@ -340,25 +340,25 @@ dependencies = [ [[package]] name = "asn1-rs-derive" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.74", "synstructure", ] [[package]] name = "asn1-rs-impl" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.74", ] [[package]] @@ -390,22 +390,21 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.2.1" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136d4d23bcc79e27423727b36823d86233aad06dfea531837b038394d11e9928" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener 5.3.0", - "event-listener-strategy 0.5.2", + "event-listener-strategy", "futures-core", "pin-project-lite", ] [[package]] name = "async-compression" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9eabd7a98fe442131a17c316bd9349c43695e49e730c3c8e12cfb5f4da2693" +checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" dependencies = [ "flate2", "futures-core", @@ -416,9 +415,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a" +checksum = "d7ebdfa2ebdab6b1760375fa7d6f382b9f486eac35fc994625a00e89280bdbb7" dependencies = [ "async-task", "concurrent-queue", @@ -445,10 +444,10 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel 2.2.1", + "async-channel 2.3.1", "async-executor", - "async-io 2.3.2", - "async-lock 3.3.0", + "async-io 2.3.4", + "async-lock 3.4.0", "blocking", "futures-lite 2.3.0", "once_cell", @@ -476,21 +475,21 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.2" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" +checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ - "async-lock 3.3.0", + "async-lock 3.4.0", "cfg-if", "concurrent-queue", "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.7.0", + "polling 3.7.3", "rustix 0.38.34", "slab", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -504,12 +503,12 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 4.0.3", - "event-listener-strategy 0.4.0", + "event-listener 5.3.1", + "event-listener-strategy", "pin-project-lite", ] @@ -549,17 +548,17 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] name = "async-signal" -version = "0.2.6" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda" +checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" dependencies = [ - "async-io 2.3.2", - "async-lock 3.3.0", + "async-io 2.3.4", + "async-lock 3.4.0", "atomic-waker", "cfg-if", "futures-core", @@ -567,7 +566,7 @@ dependencies = [ "rustix 0.38.34", "signal-hook-registry", "slab", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -615,7 +614,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -626,13 +625,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -684,7 +683,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2" dependencies = [ - "http", + "http 0.2.12", "log", "url", ] @@ -697,7 +696,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -726,9 +725,9 @@ dependencies = [ "bitflags 1.3.2", "bytes", "futures-util", - "http", - "http-body", - "hyper", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", "itoa", "matchit", "memchr", @@ -756,8 +755,8 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http", - "http-body", + "http 0.2.12", + "http-body 0.4.6", "mime", "rustversion", "tower-layer", @@ -766,9 +765,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -836,7 +835,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "serde", @@ -866,7 +865,7 @@ version = "0.66.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cexpr", "clang-sys", "lazy_static", @@ -875,9 +874,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -886,18 +885,21 @@ version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cexpr", "clang-sys", "itertools 0.12.1", "lazy_static", "lazycell", + "log", + "prettyplease", "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", - "syn 2.0.61", + "syn 2.0.74", + "which", ] [[package]] @@ -923,9 +925,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitvec" @@ -979,17 +981,19 @@ dependencies = [ "cached", "cairo-lang-casm", "cairo-lang-runner", + "cairo-lang-sierra", "cairo-lang-starknet-classes", "cairo-lang-utils", + "cairo-native", "cairo-vm", "criterion", "derive_more", "glob", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools 0.10.5", "keccak", "log", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-rational 0.4.2", "num-traits 0.2.19", @@ -1018,12 +1022,11 @@ dependencies = [ [[package]] name = "blocking" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ - "async-channel 2.2.1", - "async-lock 3.3.0", + "async-channel 2.3.1", "async-task", "futures-io", "futures-lite 2.3.0", @@ -1042,9 +1045,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", "serde", @@ -1076,9 +1079,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" dependencies = [ "serde", ] @@ -1142,13 +1145,13 @@ checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" [[package]] name = "cairo-lang-casm" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a43421bf72645b3a562d264747166d6f093e960a69dfa38b67bb3209e370366" +checksum = "e4425280959f189d8a5ebf1f5363c10663bc9f843a4819253e6be87d183b583e" dependencies = [ "cairo-lang-utils", "indoc 2.0.5", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "parity-scale-codec", "schemars", @@ -1181,18 +1184,18 @@ dependencies = [ [[package]] name = "cairo-lang-debug" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d28f38e1c62fed15a4de9f3c95741d6b24ef2a9e67a2b88a047eb6ea7de992e" +checksum = "6ac7332f2b041ca28b24b0311a0b4a35f426bb52836a2d268a8374ea262e9e6b" dependencies = [ "cairo-lang-utils", ] [[package]] name = "cairo-lang-defs" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712206b7be3fb1a33e50e1c30aa8502b4a461155fd93ad26213d0d8b242cb08d" +checksum = "079a34b560a82b463cd12ae62022d70981e8ab56b6505f9499348ebeaf460de8" dependencies = [ "cairo-lang-debug", "cairo-lang-diagnostics", @@ -1207,9 +1210,9 @@ dependencies = [ [[package]] name = "cairo-lang-diagnostics" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3c8dc2bff2411fbf602d80a83b719e6e3955c1c5d767ec18b295fc92e8616a" +checksum = "c29625349297ad791942377763f5b04c779ea694f436488dc6ad194720b89487" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -1219,9 +1222,9 @@ dependencies = [ [[package]] name = "cairo-lang-eq-solver" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaa8ac24c97770739f5a78d630b8515273c8b9f4aff34e1f88b988fac50340de" +checksum = "9cb26cd75126db6eaf94d5dffe0ce750d030ac879a88de5a621551969e9b59e3" dependencies = [ "cairo-lang-utils", "good_lp", @@ -1229,23 +1232,24 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4596331565fe61d10a0a6a03ace2b9d0ba93f03ee12a8450fe9252a6fee770f3" +checksum = "651012f2956bea884c7a3ab9df21dc76112d7edd3f403b37ca5be62fc3f41b09" dependencies = [ "cairo-lang-debug", "cairo-lang-utils", "path-clean", "salsa", + "semver", "serde", "smol_str", ] [[package]] name = "cairo-lang-formatter" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b8eb08e511d6e6df51370cdc7d85f0de9a38c8b14a15762665c60c2df6d32d" +checksum = "0d09ffb9498368cf4e95d0b28662596331aef1677e4f759ab5e609d27dfcb587" dependencies = [ "anyhow", "cairo-lang-diagnostics", @@ -1264,9 +1268,9 @@ dependencies = [ [[package]] name = "cairo-lang-lowering" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d535dc591513875b39b799270df21db10540033fd7710917760c22fc063a4ae" +checksum = "da4ffe6c197c35dec665029fcf695422f02c55b5118b4da1142e182b9fe77f87" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -1280,7 +1284,7 @@ dependencies = [ "id-arena", "itertools 0.12.1", "log", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "once_cell", "salsa", @@ -1289,9 +1293,9 @@ dependencies = [ [[package]] name = "cairo-lang-parser" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73019d5873715964f428ff10467efb607d6dc007ae164a21547bf20d9b5dcc72" +checksum = "f262ad5f1110ff70c93deb81cce024cf160f4a4518762e7deb2047fe73846789" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", @@ -1300,7 +1304,7 @@ dependencies = [ "cairo-lang-utils", "colored", "itertools 0.12.1", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "salsa", "smol_str", @@ -1309,9 +1313,9 @@ dependencies = [ [[package]] name = "cairo-lang-plugins" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96e52fca18bc696011a47a4ded0dc00e2e0ac7c81a8052eddd4ad546c46b818e" +checksum = "18024b44b5edbc1f378ba85c1a4ff04e880ea465a33251053aec507f08250668" dependencies = [ "cairo-lang-defs", "cairo-lang-diagnostics", @@ -1328,20 +1332,20 @@ dependencies = [ [[package]] name = "cairo-lang-proc-macros" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d55dcf98a6e1a03e0b36129fad4253f9e6666a1746ab9c075d212ba68a4e9c1" +checksum = "124402d8fad2a033bb36910dd7d0651f3100845c63dce679c58797a8cb0448c2" dependencies = [ "cairo-lang-debug", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] name = "cairo-lang-project" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ddb432e5199a65e37bab97ef6322afabd60e0e638ada31178d9c23d237219d" +checksum = "1f37dba9653eabf4dcb43a5e1436cd6bc093b5ad6f28ff42eaaef12549014213" dependencies = [ "cairo-lang-filesystem", "cairo-lang-utils", @@ -1372,7 +1376,7 @@ dependencies = [ "cairo-vm", "itertools 0.12.1", "keccak", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "rand 0.8.5", @@ -1384,9 +1388,9 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "393325820207491a7475269e98163e0db7e85e4b215f4d801ca537ce1cd6daa7" +checksum = "a1612476b548e9ab8ae89ee38a73d9875339f62f2f59d9ce8a719bc1761c54c3" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -1401,7 +1405,7 @@ dependencies = [ "id-arena", "indoc 2.0.5", "itertools 0.12.1", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "once_cell", "salsa", @@ -1423,7 +1427,7 @@ dependencies = [ "itertools 0.12.1", "lalrpop", "lalrpop-util", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "once_cell", @@ -1448,7 +1452,7 @@ dependencies = [ "cairo-lang-sierra-type-size", "cairo-lang-utils", "itertools 0.12.1", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "thiserror", ] @@ -1464,7 +1468,7 @@ dependencies = [ "cairo-lang-sierra-type-size", "cairo-lang-utils", "itertools 0.12.1", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "thiserror", ] @@ -1509,7 +1513,7 @@ dependencies = [ "cairo-lang-utils", "indoc 2.0.5", "itertools 0.12.1", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "starknet-types-core", "thiserror", @@ -1568,7 +1572,7 @@ dependencies = [ "cairo-lang-utils", "convert_case 0.6.0", "itertools 0.12.1", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "once_cell", @@ -1582,14 +1586,14 @@ dependencies = [ [[package]] name = "cairo-lang-syntax" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0ca518ed7c3674d9b62470f7482f4b07553eb3a02d83e0ae61bd6b5ecb4ec8" +checksum = "b2a376f88d815b63505be54a6afa93d75b67cfd65835922ec648cfcbb0a5e4b4" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", "cairo-lang-utils", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "salsa", "smol_str", @@ -1598,19 +1602,47 @@ dependencies = [ [[package]] name = "cairo-lang-syntax-codegen" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f12bdff5c265edb5a76084bfde2bc8270a7fdaf16ac58aa0d54ea6a20c29023" +checksum = "01f276bc28f6302fc63032046a12b60d18498906e65f646acb963244eed97f7c" dependencies = [ "genco", "xshell", ] [[package]] -name = "cairo-lang-test-utils" +name = "cairo-lang-test-plugin" version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a2365bd502a657437f9d0d665e32e017054d0effdbecb1dda776bfcc11235d" +checksum = "20b526ea053b930222352027b3259be44fb3cd3b25106e2b1fbc815526423650" +dependencies = [ + "anyhow", + "cairo-lang-compiler", + "cairo-lang-debug", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-lowering", + "cairo-lang-semantic", + "cairo-lang-sierra", + "cairo-lang-sierra-generator", + "cairo-lang-starknet", + "cairo-lang-starknet-classes", + "cairo-lang-syntax", + "cairo-lang-utils", + "indoc 2.0.5", + "itertools 0.12.1", + "num-bigint 0.4.6", + "num-traits 0.2.19", + "serde", + "starknet-types-core", +] + +[[package]] +name = "cairo-lang-test-utils" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21e90b6236439e19077ec913351a17a33c7be199dcafdacd8389c4c5199400d6" dependencies = [ "cairo-lang-formatter", "cairo-lang-utils", @@ -1621,20 +1653,83 @@ dependencies = [ [[package]] name = "cairo-lang-utils" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd5c8c127b9362a12ffb9dede38e792c81b4ded5a98b448baec157b745f47d1" +checksum = "55a394e545f1500bea093d01be40895d3234faaa24d9585d08a509c514cabd88" dependencies = [ "hashbrown 0.14.5", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools 0.12.1", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "parity-scale-codec", "schemars", "serde", ] +[[package]] +name = "cairo-native" +version = "0.2.0" +source = "git+https://github.com/lambdaclass/cairo_native?branch=cairo-lang2.7.0-rc.3#8404a2b48faa48a97a3af5da5d8ee7c466b0b503" +dependencies = [ + "anyhow", + "bumpalo", + "cairo-lang-compiler", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-lowering", + "cairo-lang-runner", + "cairo-lang-semantic", + "cairo-lang-sierra", + "cairo-lang-sierra-ap-change", + "cairo-lang-sierra-gas", + "cairo-lang-sierra-generator", + "cairo-lang-starknet", + "cairo-lang-starknet-classes", + "cairo-lang-test-plugin", + "cairo-lang-utils", + "cairo-native-runtime", + "cc", + "clap", + "colored", + "educe", + "id-arena", + "itertools 0.13.0", + "k256", + "keccak", + "lazy_static", + "libc", + "libloading", + "llvm-sys", + "melior", + "mlir-sys", + "num-bigint 0.4.6", + "num-traits 0.2.19", + "p256", + "sec1", + "sha2", + "starknet-types-core", + "stats_alloc", + "tempfile", + "thiserror", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "cairo-native-runtime" +version = "0.2.0" +source = "git+https://github.com/lambdaclass/cairo_native?branch=cairo-lang2.7.0-rc.3#8404a2b48faa48a97a3af5da5d8ee7c466b0b503" +dependencies = [ + "cairo-lang-sierra-gas", + "lazy_static", + "libc", + "starknet-crypto 0.6.2", + "starknet-curve 0.4.2", + "starknet-types-core", +] + [[package]] name = "cairo-vm" version = "1.0.0-rc6" @@ -1650,7 +1745,7 @@ dependencies = [ "keccak", "lazy_static", "nom", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-prime", "num-traits 0.2.19", @@ -1674,9 +1769,9 @@ checksum = "02d88a780e6aa14b75d7be99f374d8b5c315aaf9c12ada1e2b1cb281468584c9" [[package]] name = "camino" -version = "1.1.6" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "3054fea8a20d8ff3968d5b22cc27501d2b08dc4decdb31b184323f00c5ef23bb" dependencies = [ "serde", ] @@ -1712,13 +1807,13 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.97" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" +checksum = "68064e60dbf1f17005c2fde4d07c16d8baa506fd7ffed8ccab702d93617975c7" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -1738,9 +1833,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chacha20" @@ -1778,7 +1873,7 @@ dependencies = [ "num-traits 0.2.19", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1821,9 +1916,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -1832,9 +1927,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", "clap_derive", @@ -1842,9 +1937,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", @@ -1854,21 +1949,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "cloudabi" @@ -1933,9 +2028,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colored" @@ -1956,7 +2051,7 @@ dependencies = [ "derive_more", "ethnum", "futures", - "indexmap 2.2.6", + "indexmap 2.4.0", "pretty_assertions", "rand 0.8.5", "rand_distr", @@ -1976,6 +2071,22 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "comrak" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a972c8ec1be8065f7b597b5f7f5b3be535db780280644aebdcd1966decf58dc" +dependencies = [ + "derive_builder", + "entities", + "memchr", + "once_cell", + "regex", + "slug", + "typed-arena", + "unicode_categories", +] + [[package]] name = "concurrent-queue" version = "2.5.0" @@ -2005,9 +2116,9 @@ checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca" [[package]] name = "const-hex" -version = "1.11.3" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" +checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" dependencies = [ "cfg-if", "cpufeatures", @@ -2103,9 +2214,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core2" @@ -2118,18 +2229,18 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -2200,9 +2311,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -2244,26 +2355,25 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.4.4" +version = "3.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345" +checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" dependencies = [ - "nix 0.28.0", - "windows-sys 0.52.0", + "nix 0.29.0", + "windows-sys 0.59.0", ] [[package]] name = "curve25519-dalek" -version = "4.1.2" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "platforms", "rustc_version", "subtle", "zeroize", @@ -2277,7 +2387,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -2292,12 +2402,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.8", - "darling_macro 0.20.8", + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -2316,16 +2426,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 2.0.61", + "strsim 0.11.1", + "syn 2.0.74", ] [[package]] @@ -2341,13 +2451,27 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.8", + "darling_core 0.20.10", "quote", - "syn 2.0.61", + "syn 2.0.74", +] + +[[package]] +name = "dashmap" +version = "6.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "804c8821570c3f8b70230c2ba75ffa5c0f9a4189b9a432b6656c536712acae28" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core 0.9.10", ] [[package]] @@ -2399,19 +2523,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", + "pem-rfc7468", "zeroize", ] [[package]] name = "der-parser" -version = "8.2.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" dependencies = [ "asn1-rs", "displaydoc", "nom", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "rusticata-macros", ] @@ -2436,19 +2561,56 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_builder" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" +dependencies = [ + "darling 0.20.10", + "proc-macro2", + "quote", + "syn 2.0.74", +] + +[[package]] +name = "derive_builder_macro" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" +dependencies = [ + "derive_builder_core", + "syn 2.0.74", +] + [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version", - "syn 1.0.109", + "syn 2.0.74", ] +[[package]] +name = "deunicode" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" + [[package]] name = "diff" version = "0.1.13" @@ -2529,13 +2691,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -2558,9 +2720,9 @@ checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" @@ -2607,11 +2769,23 @@ dependencies = [ "zeroize", ] +[[package]] +name = "educe" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4bd92664bf78c4d3dba9b7cdafce6fa15b13ed3ed16175218196942e99168a8" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 2.0.74", +] + [[package]] name = "either" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -2625,6 +2799,7 @@ dependencies = [ "ff", "generic-array", "group", + "pem-rfc7468", "pkcs8", "rand_core 0.6.4", "sec1", @@ -2674,6 +2849,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "entities" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca" + [[package]] name = "enum-as-inner" version = "0.6.0" @@ -2683,7 +2864,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -2714,23 +2895,43 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", +] + +[[package]] +name = "enum-ordinalize" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.74", ] [[package]] name = "env_filter" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ "log", ] [[package]] name = "env_logger" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" dependencies = [ "anstream", "anstyle", @@ -2890,7 +3091,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "syn 2.0.61", + "syn 2.0.74", "toml", "walkdir", ] @@ -2908,7 +3109,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -2933,8 +3134,8 @@ dependencies = [ "rlp", "serde", "serde_json", - "strum 0.26.2", - "syn 2.0.61", + "strum 0.26.3", + "syn 2.0.74", "tempfile", "thiserror", "tiny-keccak", @@ -3001,7 +3202,7 @@ dependencies = [ "futures-timer", "futures-util", "hashers", - "http", + "http 0.2.12", "instant", "jsonwebtoken", "once_cell", @@ -3097,43 +3298,22 @@ dependencies = [ [[package]] name = "event-listener" -version = "4.0.3" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", "pin-project-lite", ] -[[package]] -name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.3", - "pin-project-lite", -] - [[package]] name = "event-listener-strategy" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.3.0", + "event-listener 5.3.1", "pin-project-lite", ] @@ -3184,20 +3364,20 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38793c55593b33412e3ae40c2c9781ffaa6f438f6f8c10f24e71846fbd7ae01e" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] @@ -3220,9 +3400,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" dependencies = [ "crc32fast", "miniz_oxide", @@ -3325,9 +3505,9 @@ dependencies = [ [[package]] name = "futures-bounded" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e2774cc104e198ef3d3e1ff4ab40f86fa3245d6cb6a3a46174f21463cee173" +checksum = "91f328e7fb845fc832912fb6a34f40cf6d1888c92f974d1893a54e97b5ff542e" dependencies = [ "futures-timer", "futures-util", @@ -3413,17 +3593,18 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] name = "futures-rustls" -version = "0.24.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd3cf68c183738046838e300353e4716c674dc5e56890de4826801a6622a28" +checksum = "a8f2f12607f92c69b12ed746fabf9ca4f5c482cba46679c1a75b874ed7c26adb" dependencies = [ "futures-io", - "rustls", + "rustls 0.23.12", + "rustls-pki-types", ] [[package]] @@ -3488,9 +3669,9 @@ dependencies = [ [[package]] name = "genco" -version = "0.17.8" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98d7af598790738fee616426e669360fa361273b1b9c9b7f30c92fa627605cad" +checksum = "afac3cbb14db69ac9fef9cdb60d8a87e39a7a527f85a81a923436efa40ad42c6" dependencies = [ "genco-macros", "relative-path", @@ -3499,13 +3680,13 @@ dependencies = [ [[package]] name = "genco-macros" -version = "0.17.8" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4cf186fea4af17825116f72932fe52cce9a13bae39ff63b4dc0cfdb3fb4bde1" +checksum = "553630feadf7b76442b0849fd25fdf89b860d933623aec9693fed19af0400c78" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -3544,9 +3725,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -3563,8 +3744,8 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -3577,7 +3758,7 @@ dependencies = [ "futures-core", "futures-sink", "gloo-utils", - "http", + "http 0.2.12", "js-sys", "pin-project", "serde", @@ -3636,7 +3817,7 @@ dependencies = [ "flume", "futures", "gumdrop", - "http", + "http 0.2.12", "itertools 0.11.0", "lazy_static", "log", @@ -3697,8 +3878,27 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 2.2.6", + "http 0.2.12", + "indexmap 2.4.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", + "indexmap 2.4.0", "slab", "tokio", "tokio-util", @@ -3787,6 +3987,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -3836,7 +4042,7 @@ dependencies = [ "ipconfig", "lru-cache", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "rand 0.8.5", "resolv-conf", "smallvec", @@ -3894,6 +4100,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -3901,15 +4118,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -3925,17 +4165,17 @@ checksum = "91f255a4535024abf7640cb288260811fc14794f62b063652ed349f9a6c2348e" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -3947,6 +4187,26 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -3954,10 +4214,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", - "hyper", + "http 0.2.12", + "hyper 0.14.30", "log", - "rustls", + "rustls 0.21.12", "rustls-native-certs", "tokio", "tokio-rustls", @@ -3970,12 +4230,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.30", "native-tls", "tokio", "tokio-native-tls", ] +[[package]] +name = "hyper-util" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.4.1", + "pin-project-lite", + "tokio", +] + [[package]] name = "iana-time-zone" version = "0.1.60" @@ -4068,7 +4343,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io 2.3.2", + "async-io 2.3.4", "core-foundation", "fnv", "futures", @@ -4098,8 +4373,8 @@ dependencies = [ "attohttpc", "bytes", "futures", - "http", - "hyper", + "http 0.2.12", + "hyper 0.14.30", "log", "rand 0.8.5", "tokio", @@ -4117,7 +4392,7 @@ dependencies = [ "globset", "log", "memchr", - "regex-automata 0.4.6", + "regex-automata 0.4.7", "same-file", "walkdir", "winapi-util", @@ -4186,9 +4461,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -4218,9 +4493,9 @@ dependencies = [ [[package]] name = "insta" -version = "1.38.0" +version = "1.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eab73f58e59ca6526037208f0e98851159ec1633cf17b6cd2e1f2c3fd5d53cc" +checksum = "810ae6042d48e2c9e9215043563a58a80b877bc863228a74cf10c49d4620a6f5" dependencies = [ "console", "lazy_static", @@ -4231,9 +4506,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -4250,7 +4525,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", "windows-sys 0.48.0", ] @@ -4275,20 +4550,20 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "iso8601" @@ -4326,6 +4601,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -4334,18 +4618,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -4377,7 +4661,7 @@ dependencies = [ "futures-channel", "futures-util", "gloo-net", - "http", + "http 0.2.12", "jsonrpsee-core", "pin-project", "rustls-native-certs", @@ -4403,11 +4687,11 @@ dependencies = [ "beef", "futures-timer", "futures-util", - "hyper", + "hyper 0.14.30", "jsonrpsee-types", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "rand 0.8.5", - "rustc-hash", + "rustc-hash 1.1.0", "serde", "serde_json", "soketto", @@ -4424,7 +4708,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" dependencies = [ "async-trait", - "hyper", + "hyper 0.14.30", "hyper-rustls", "jsonrpsee-core", "jsonrpsee-types", @@ -4457,8 +4741,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82c39a00449c9ef3f50b84fc00fc4acba20ef8f559f07902244abf4c15c5ab9c" dependencies = [ "futures-util", - "http", - "hyper", + "http 0.2.12", + "hyper 0.14.30", "jsonrpsee-core", "jsonrpsee-types", "route-recognizer", @@ -4504,7 +4788,7 @@ version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" dependencies = [ - "http", + "http 0.2.12", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-types", @@ -4530,7 +4814,7 @@ dependencies = [ "memchr", "num-cmp", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "percent-encoding", "regex", "reqwest", @@ -4538,7 +4822,7 @@ dependencies = [ "serde_json", "time", "url", - "uuid 1.8.0", + "uuid 1.10.0", ] [[package]] @@ -4601,7 +4885,7 @@ dependencies = [ "petgraph", "pico-args", "regex", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", "string_cache", "term", "tiny-keccak", @@ -4615,7 +4899,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex-automata 0.4.6", + "regex-automata 0.4.7", ] [[package]] @@ -4642,11 +4926,11 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin 0.5.2", + "spin 0.9.8", ] [[package]] @@ -4657,18 +4941,18 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.154" +version = "0.2.156" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "a5f43f184355eefb8d17fc948dbecf6c13be3c141f20d834ae842193a448c72a" [[package]] name = "libloading" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -4683,14 +4967,14 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f0bee397dc9a7003e7bd34fffc1dc2d4c4fdc96530a0c439a5f98c9402bc7bf" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "byteorder", "derive_more", "indexmap 1.9.3", "libc", "lifetimed-bytes", "mdbx-sys", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "thiserror", ] @@ -4708,17 +4992,17 @@ dependencies = [ "instant", "libp2p-allow-block-list", "libp2p-connection-limits", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-dns", - "libp2p-gossipsub", - "libp2p-identify", + "libp2p-gossipsub 0.46.1", + "libp2p-identify 0.44.2", "libp2p-identity", - "libp2p-kad", + "libp2p-kad 0.45.3", "libp2p-mdns", "libp2p-metrics", "libp2p-noise", "libp2p-quic", - "libp2p-swarm", + "libp2p-swarm 0.44.2", "libp2p-tcp", "libp2p-upnp", "libp2p-yamux", @@ -4734,9 +5018,9 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "107b238b794cb83ab53b74ad5dcf7cca3200899b72fe662840cfb52f5b0a32e6" dependencies = [ - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", - "libp2p-swarm", + "libp2p-swarm 0.44.2", "void", ] @@ -4746,29 +5030,28 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7cd50a78ccfada14de94cbacd3ce4b0138157f376870f13d3a8422cd075b4fd" dependencies = [ - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", - "libp2p-swarm", + "libp2p-swarm 0.44.2", "void", ] [[package]] name = "libp2p-core" -version = "0.41.2" +version = "0.41.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8130a8269e65a2554d55131c770bdf4bcd94d2b8d4efb24ca23699be65066c05" +checksum = "a5a8920cbd8540059a01950c1e5c96ea8d89eb50c51cd366fc18bdf540a6e48f" dependencies = [ "either", "fnv", "futures", "futures-timer", - "instant", "libp2p-identity", "multiaddr", "multihash", "multistream-select", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "pin-project", "quick-protobuf", "rand 0.8.5", @@ -4779,6 +5062,35 @@ dependencies = [ "tracing", "unsigned-varint 0.8.0", "void", + "web-time", +] + +[[package]] +name = "libp2p-core" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a61f26c83ed111104cd820fe9bc3aaabbac5f1652a1d213ed6e900b7918a1298" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "libp2p-identity", + "multiaddr", + "multihash", + "multistream-select", + "once_cell", + "parking_lot 0.12.3", + "pin-project", + "quick-protobuf", + "rand 0.8.5", + "rw-stream-sink", + "smallvec", + "thiserror", + "tracing", + "unsigned-varint 0.8.0", + "void", + "web-time", ] [[package]] @@ -4790,9 +5102,9 @@ dependencies = [ "async-trait", "futures", "hickory-resolver", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "smallvec", "tracing", ] @@ -4814,9 +5126,9 @@ dependencies = [ "getrandom", "hex_fmt", "instant", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", - "libp2p-swarm", + "libp2p-swarm 0.44.2", "prometheus-client", "quick-protobuf", "quick-protobuf-codec 0.3.1", @@ -4829,6 +5141,37 @@ dependencies = [ "void", ] +[[package]] +name = "libp2p-gossipsub" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4e830fdf24ac8c444c12415903174d506e1e077fbe3875c404a78c5935a8543" +dependencies = [ + "asynchronous-codec 0.7.0", + "base64 0.22.1", + "byteorder", + "bytes", + "either", + "fnv", + "futures", + "futures-ticker", + "getrandom", + "hex_fmt", + "libp2p-core 0.42.0", + "libp2p-identity", + "libp2p-swarm 0.45.1", + "prometheus-client", + "quick-protobuf", + "quick-protobuf-codec 0.3.1", + "rand 0.8.5", + "regex", + "sha2", + "smallvec", + "tracing", + "void", + "web-time", +] + [[package]] name = "libp2p-identify" version = "0.44.2" @@ -4840,9 +5183,32 @@ dependencies = [ "futures", "futures-bounded", "futures-timer", - "libp2p-core", + "libp2p-core 0.41.3", + "libp2p-identity", + "libp2p-swarm 0.44.2", + "lru", + "quick-protobuf", + "quick-protobuf-codec 0.3.1", + "smallvec", + "thiserror", + "tracing", + "void", +] + +[[package]] +name = "libp2p-identify" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1711b004a273be4f30202778856368683bd9a83c4c7dcc8f848847606831a4e3" +dependencies = [ + "asynchronous-codec 0.7.0", + "either", + "futures", + "futures-bounded", + "futures-timer", + "libp2p-core 0.42.0", "libp2p-identity", - "libp2p-swarm", + "libp2p-swarm 0.45.1", "lru", "quick-protobuf", "quick-protobuf-codec 0.3.1", @@ -4854,9 +5220,9 @@ dependencies = [ [[package]] name = "libp2p-identity" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0" +checksum = "55cca1eb2bc1fd29f099f3daaab7effd01e1a54b7c577d0ed082521034d912e8" dependencies = [ "bs58", "ed25519-dalek", @@ -4886,9 +5252,9 @@ dependencies = [ "futures-bounded", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", - "libp2p-swarm", + "libp2p-swarm 0.44.2", "quick-protobuf", "quick-protobuf-codec 0.3.1", "rand 0.8.5", @@ -4901,6 +5267,35 @@ dependencies = [ "void", ] +[[package]] +name = "libp2p-kad" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3fd4d149f0539e608d178b7cd1cfb0c1c6a8dc367eda2bc1cc81a28a1552161" +dependencies = [ + "arrayvec", + "asynchronous-codec 0.7.0", + "bytes", + "either", + "fnv", + "futures", + "futures-bounded", + "futures-timer", + "libp2p-core 0.42.0", + "libp2p-identity", + "libp2p-swarm 0.45.1", + "quick-protobuf", + "quick-protobuf-codec 0.3.1", + "rand 0.8.5", + "sha2", + "smallvec", + "thiserror", + "tracing", + "uint", + "void", + "web-time", +] + [[package]] name = "libp2p-mdns" version = "0.45.1" @@ -4911,9 +5306,9 @@ dependencies = [ "futures", "hickory-proto", "if-watch", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", - "libp2p-swarm", + "libp2p-swarm 0.44.2", "rand 0.8.5", "smallvec", "socket2 0.5.7", @@ -4924,20 +5319,20 @@ dependencies = [ [[package]] name = "libp2p-metrics" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdac91ae4f291046a3b2660c039a2830c931f84df2ee227989af92f7692d3357" +checksum = "a70afa7692c81ee03e89c40d1e8638d634f18baef6aeeea30fd245edfae4d3fd" dependencies = [ "futures", - "instant", - "libp2p-core", - "libp2p-gossipsub", - "libp2p-identify", + "libp2p-core 0.42.0", + "libp2p-gossipsub 0.47.0", + "libp2p-identify 0.45.0", "libp2p-identity", - "libp2p-kad", - "libp2p-swarm", + "libp2p-kad 0.46.0", + "libp2p-swarm 0.45.1", "pin-project", "prometheus-client", + "web-time", ] [[package]] @@ -4950,7 +5345,7 @@ dependencies = [ "bytes", "curve25519-dalek", "futures", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", "multiaddr", "multihash", @@ -4975,7 +5370,7 @@ dependencies = [ "asynchronous-codec 0.6.2", "bytes", "futures", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", "quick-protobuf", "quick-protobuf-codec 0.2.0", @@ -4984,22 +5379,22 @@ dependencies = [ [[package]] name = "libp2p-quic" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0375cdfee57b47b313ef1f0fdb625b78aed770d33a40cf1c294a371ff5e6666" +checksum = "c67296ad4e092e23f92aea3d2bdb6f24eab79c0929ed816dfb460ea2f4567d2b" dependencies = [ "bytes", "futures", "futures-timer", "if-watch", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", "libp2p-tls", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "quinn", "rand 0.8.5", - "ring 0.16.20", - "rustls", + "ring 0.17.8", + "rustls 0.23.12", "socket2 0.5.7", "thiserror", "tokio", @@ -5018,7 +5413,7 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", "libp2p-swarm-derive", "lru", @@ -5031,6 +5426,28 @@ dependencies = [ "void", ] +[[package]] +name = "libp2p-swarm" +version = "0.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7dd6741793d2c1fb2088f67f82cf07261f25272ebe3c0b0c311e0c6b50e851a" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "libp2p-core 0.42.0", + "libp2p-identity", + "lru", + "multistream-select", + "once_cell", + "rand 0.8.5", + "smallvec", + "tracing", + "void", + "web-time", +] + [[package]] name = "libp2p-swarm-derive" version = "0.34.2" @@ -5040,7 +5457,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -5052,10 +5469,10 @@ dependencies = [ "async-trait", "futures", "futures-timer", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", "libp2p-plaintext", - "libp2p-swarm", + "libp2p-swarm 0.44.2", "libp2p-tcp", "libp2p-yamux", "rand 0.8.5", @@ -5073,7 +5490,7 @@ dependencies = [ "futures-timer", "if-watch", "libc", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", "socket2 0.5.7", "tokio", @@ -5082,18 +5499,18 @@ dependencies = [ [[package]] name = "libp2p-tls" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ce7e3c2e7569d685d08ec795157981722ff96e9e9f9eae75df3c29d02b07a5" +checksum = "72b7b831e55ce2aa6c354e6861a85fdd4dd0a2b97d5e276fabac0e4810a71776" dependencies = [ "futures", "futures-rustls", - "libp2p-core", + "libp2p-core 0.41.3", "libp2p-identity", "rcgen", - "ring 0.16.20", - "rustls", - "rustls-webpki", + "ring 0.17.8", + "rustls 0.23.12", + "rustls-webpki 0.101.7", "thiserror", "x509-parser", "yasna", @@ -5108,8 +5525,8 @@ dependencies = [ "futures", "futures-timer", "igd-next", - "libp2p-core", - "libp2p-swarm", + "libp2p-core 0.41.3", + "libp2p-swarm 0.44.2", "tokio", "tracing", "void", @@ -5117,17 +5534,17 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.45.1" +version = "0.45.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200cbe50349a44760927d50b431d77bed79b9c0a3959de1af8d24a63434b71e5" +checksum = "ddd5265f6b80f94d48a3963541aad183cc598a645755d2f1805a373e41e0716b" dependencies = [ "either", "futures", - "libp2p-core", + "libp2p-core 0.41.3", "thiserror", "tracing", "yamux 0.12.1", - "yamux 0.13.2", + "yamux 0.13.3", ] [[package]] @@ -5147,8 +5564,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", + "redox_syscall 0.5.3", ] [[package]] @@ -5174,9 +5592,23 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "llvm-sys" +version = "181.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d255b36907416971229095a8465c0b69f5f1c6fb8421b6dcdbb64eb47e1be90" +dependencies = [ + "anyhow", + "cc", + "lazy_static", + "libc", + "regex-lite", + "semver", +] [[package]] name = "lock_api" @@ -5190,18 +5622,18 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" dependencies = [ "value-bag", ] [[package]] name = "lru" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" dependencies = [ "hashbrown 0.14.5", ] @@ -5281,11 +5713,40 @@ dependencies = [ "libc", ] +[[package]] +name = "melior" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eef59ece7b54480260f4871495a389e9ebca60f2fa531f6cd1396e2281977d1b" +dependencies = [ + "dashmap", + "melior-macro", + "mlir-sys", + "once_cell", +] + +[[package]] +name = "melior-macro" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ff00b56cdb2b3b49b4bfc80f7e869d8f1e8c851595044a9462db66c599c6c3d" +dependencies = [ + "comrak", + "convert_case 0.6.0", + "once_cell", + "proc-macro2", + "quote", + "regex", + "syn 2.0.74", + "tblgen-alt", + "unindent 0.2.3", +] + [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -5343,7 +5804,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d4fa7ce7c4862db464a37b0b31d89bca874562f034bd7993895572783d02950" dependencies = [ "base64 0.21.7", - "hyper", + "hyper 0.14.30", "indexmap 1.9.3", "ipnet", "metrics 0.21.1", @@ -5362,7 +5823,7 @@ checksum = "38b4faf00617defe497754acde3024865bc143d44a86799b24e191ecff91354f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -5419,22 +5880,32 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "mlir-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1b5806a63bc959cd5c4e5db8cadd20e40045d41969d325132748db8af11b7f" +dependencies = [ + "bindgen 0.69.4", ] [[package]] @@ -5461,7 +5932,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -5484,14 +5955,19 @@ dependencies = [ [[package]] name = "mockito" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f6e023aa5bdf392aa06c78e4a4e6d498baab5138d0c993503350ebbc37bf1e" +checksum = "09b34bd91b9e5c5b06338d392463e1318d683cf82ec3d3af4014609be6e2108d" dependencies = [ "assert-json-diff", + "bytes", "colored", - "futures-core", - "hyper", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-util", "log", "rand 0.8.5", "regex", @@ -5573,11 +6049,10 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -5597,9 +6072,9 @@ dependencies = [ "cached", "cairo-lang-starknet-classes", "cairo-vm", - "indexmap 2.2.6", + "indexmap 2.4.0", "log", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "papyrus_storage", "pretty_assertions", "pyo3", @@ -5711,11 +6186,11 @@ dependencies = [ [[package]] name = "nix" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "cfg_aliases", "libc", @@ -5767,7 +6242,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-complex 0.4.6", "num-integer", "num-iter", @@ -5788,9 +6263,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits 0.2.19", @@ -5865,7 +6340,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64a5fe11d4135c3bcdf3a95b18b194afa9608a5f6ff034f5d857bc9a27fb0119" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", ] @@ -5879,7 +6354,7 @@ dependencies = [ "bitvec", "either", "lru", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-modular", "num-traits 0.2.19", @@ -5904,7 +6379,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "serde", @@ -5935,29 +6410,29 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -5971,18 +6446,18 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] [[package]] name = "oid-registry" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +checksum = "1c958dd45046245b9c3c2547369bb634eb461670b2e7e0de552905801a648d1d" dependencies = [ "asn1-rs", ] @@ -5995,9 +6470,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "opaque-debug" @@ -6032,11 +6507,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -6053,7 +6528,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -6064,9 +6539,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -6097,6 +6572,18 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + [[package]] name = "page_size" version = "0.6.0" @@ -6148,7 +6635,7 @@ dependencies = [ "assert_matches", "cairo-lang-starknet-classes", "hex", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools 0.10.5", "lazy_static", "papyrus_test_utils", @@ -6215,7 +6702,7 @@ dependencies = [ "cairo-lang-starknet-classes", "cairo-lang-utils", "cairo-vm", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools 0.10.5", "lazy_static", "once_cell", @@ -6256,8 +6743,8 @@ name = "papyrus_monitoring_gateway" version = "0.4.0-rc.0" dependencies = [ "axum", - "http-body", - "hyper", + "http-body 0.4.6", + "hyper 0.14.30", "metrics 0.21.1", "metrics-exporter-prometheus", "metrics-process", @@ -6358,7 +6845,7 @@ dependencies = [ "chrono", "enum-iterator", "futures", - "indexmap 2.2.6", + "indexmap 2.4.0", "lazy_static", "metrics 0.21.1", "papyrus_common", @@ -6390,14 +6877,14 @@ dependencies = [ "papyrus_test_utils", "prometheus-parse", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] name = "papyrus_protobuf" version = "0.4.0-rc.0" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "lazy_static", "papyrus_common", "papyrus_test_utils", @@ -6428,8 +6915,8 @@ dependencies = [ "flate2", "futures-util", "hex", - "hyper", - "indexmap 2.2.6", + "hyper 0.14.30", + "indexmap 2.4.0", "insta", "itertools 0.10.5", "jsonrpsee", @@ -6476,7 +6963,7 @@ dependencies = [ "camelpaste", "clap", "human_bytes", - "indexmap 2.2.6", + "indexmap 2.4.0", "insta", "integer-encoding", "lazy_static", @@ -6484,7 +6971,7 @@ dependencies = [ "memmap2", "metrics 0.21.1", "metrics-exporter-prometheus", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "page_size", "papyrus_common", @@ -6526,7 +7013,7 @@ dependencies = [ "chrono", "futures", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools 0.10.5", "lru", "metrics 0.21.1", @@ -6557,8 +7044,8 @@ dependencies = [ "cairo-lang-casm", "cairo-lang-starknet-classes", "cairo-lang-utils", - "indexmap 2.2.6", - "num-bigint 0.4.5", + "indexmap 2.4.0", + "num-bigint 0.4.6", "pretty_assertions", "primitive-types", "prometheus-parse", @@ -6616,9 +7103,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core 0.9.10", @@ -6646,9 +7133,9 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall 0.5.3", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -6727,6 +7214,15 @@ dependencies = [ "serde", ] +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.3.1" @@ -6740,7 +7236,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.2.6", + "indexmap 2.4.0", ] [[package]] @@ -6783,7 +7279,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -6827,7 +7323,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -6844,9 +7340,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", "fastrand 2.1.0", @@ -6869,17 +7365,11 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -[[package]] -name = "platforms" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" - [[package]] name = "plotters" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" dependencies = [ "num-traits 0.2.19", "plotters-backend", @@ -6890,15 +7380,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" +checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" [[package]] name = "plotters-svg" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" dependencies = [ "plotters-backend", ] @@ -6921,17 +7411,17 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.0" +version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi", + "hermit-abi 0.4.0", "pin-project-lite", "rustix 0.38.34", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6959,9 +7449,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "powerfmt" @@ -6971,9 +7461,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "precomputed-hash" @@ -6983,9 +7476,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "predicates" -version = "3.1.0" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" +checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" dependencies = [ "anstyle", "predicates-core", @@ -6993,15 +7486,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" dependencies = [ "predicates-core", "termtree", @@ -7024,7 +7517,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.61", + "syn 2.0.74", +] + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", ] [[package]] @@ -7086,9 +7588,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -7099,7 +7601,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "hex", "lazy_static", "procfs-core", @@ -7112,19 +7614,19 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "hex", ] [[package]] name = "prometheus-client" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ca959da22a332509f2a73ae9e5f23f9dcfc31fd3a54d71f159495bd5909baa" +checksum = "504ee9ff529add891127c4827eb481bd69dc0ebc72e9a682e187db4caa60c3ca" dependencies = [ "dtoa", "itoa", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "prometheus-client-derive-encode", ] @@ -7136,7 +7638,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -7153,17 +7655,17 @@ dependencies = [ [[package]] name = "proptest" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "lazy_static", "num-traits 0.2.19", "rand 0.8.5", "rand_chacha 0.3.1", "rand_xorshift 0.3.0", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", "unarray", ] @@ -7179,9 +7681,9 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80b776a1b2dc779f5ee0641f8ade0125bc1298dd41a9a0c16d8bd57b42d222b1" +checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" dependencies = [ "bytes", "heck 0.5.0", @@ -7194,7 +7696,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.61", + "syn 2.0.74", "tempfile", ] @@ -7208,14 +7710,14 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] name = "prost-types" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3235c33eb02c1f1e212abdbe34c78b264b038fb58ca612664343271e36e55ffe" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ "prost", ] @@ -7247,12 +7749,12 @@ dependencies = [ "indoc 1.0.9", "libc", "memoffset", - "num-bigint 0.4.5", - "parking_lot 0.12.2", + "num-bigint 0.4.6", + "parking_lot 0.12.3", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", - "unindent", + "unindent 0.1.11", ] [[package]] @@ -7368,17 +7870,18 @@ dependencies = [ [[package]] name = "quinn" -version = "0.10.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75" +checksum = "b22d8e7369034b9a7132bc2008cac12f2013c8132b45e0554e6e20e2617f2156" dependencies = [ "bytes", "futures-io", "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash", - "rustls", + "rustc-hash 2.0.0", + "rustls 0.23.12", + "socket2 0.5.7", "thiserror", "tokio", "tracing", @@ -7386,15 +7889,15 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.10.6" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" +checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd" dependencies = [ "bytes", "rand 0.8.5", - "ring 0.16.20", - "rustc-hash", - "rustls", + "ring 0.17.8", + "rustc-hash 2.0.0", + "rustls 0.23.12", "slab", "thiserror", "tinyvec", @@ -7403,15 +7906,15 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.4.1" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7" +checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" dependencies = [ - "bytes", "libc", + "once_cell", "socket2 0.5.7", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -7651,20 +8154,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] @@ -7680,14 +8174,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -7701,15 +8195,21 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] +[[package]] +name = "regex-lite" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" + [[package]] name = "regex-syntax" version = "0.6.29" @@ -7718,9 +8218,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "relative-path" @@ -7748,10 +8248,10 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", "hyper-rustls", "hyper-tls", "ipnet", @@ -7762,7 +8262,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", + "rustls 0.21.12", "rustls-pemfile", "serde", "serde_json", @@ -7942,6 +8442,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -7986,10 +8492,10 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys 0.4.14", "windows-sys 0.52.0", ] @@ -8001,10 +8507,24 @@ checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring 0.17.8", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.23.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +dependencies = [ + "once_cell", + "ring 0.17.8", + "rustls-pki-types", + "rustls-webpki 0.102.6", + "subtle", + "zeroize", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -8026,6 +8546,12 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pki-types" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -8036,11 +8562,22 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "rustls-webpki" +version = "0.102.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +dependencies = [ + "ring 0.17.8", + "rustls-pki-types", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "092474d1a01ea8278f69e6a358998405fae5b8b963ddaeb2b0b04a128bf1dfb0" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "rw-stream-sink" @@ -8071,7 +8608,7 @@ dependencies = [ "log", "oorandom", "parking_lot 0.11.2", - "rustc-hash", + "rustc-hash 1.1.0", "salsa-macros", "smallvec", ] @@ -8141,9 +8678,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.19" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6e7ed6919cb46507fb01ff1654309219f62b4d603822501b0b80d42f6f21ef" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" dependencies = [ "dyn-clone", "indexmap 1.9.3", @@ -8154,14 +8691,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.19" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185f2b7aa7e02d418e453790dde16890256bbd2bcd04b7dc5348811052b53f49" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -8208,11 +8745,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -8221,9 +8758,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -8252,42 +8789,43 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.201" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.201" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] name = "serde_derive_internals" -version = "0.29.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330f01ce65a3a5fe59a60c82f3c9a024b573b8a6e875bd233fe5f934e71d54e3" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -8321,14 +8859,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -8366,10 +8904,10 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.8", + "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -8453,9 +8991,9 @@ dependencies = [ [[package]] name = "similar" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640" +checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" [[package]] name = "simple_asn1" @@ -8463,7 +9001,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-traits 0.2.19", "thiserror", "time", @@ -8513,6 +9051,16 @@ dependencies = [ "autocfg 1.3.0", ] +[[package]] +name = "slug" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "882a80f72ee45de3cc9a5afeb2da0331d58df69e4e7d8eeb5d3c7784ae67e724" +dependencies = [ + "deunicode", + "wasm-bindgen", +] + [[package]] name = "smallvec" version = "1.13.2" @@ -8538,9 +9086,9 @@ dependencies = [ [[package]] name = "smol_str" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6845563ada680337a52d43bb0b29f396f2d911616f6573012645b9e3d048a49" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" dependencies = [ "serde", ] @@ -8591,7 +9139,7 @@ dependencies = [ "base64 0.13.1", "bytes", "futures", - "http", + "http 0.2.12", "httparse", "log", "rand 0.8.5", @@ -8675,7 +9223,7 @@ dependencies = [ "crypto-bigint", "hex", "hmac", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "rfc6979", @@ -8695,7 +9243,7 @@ dependencies = [ "crypto-bigint", "hex", "hmac", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "rfc6979", @@ -8714,7 +9262,7 @@ checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" dependencies = [ "starknet-curve 0.4.2", "starknet-ff", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -8758,7 +9306,7 @@ dependencies = [ "lambdaworks-crypto", "lambdaworks-math", "lazy_static", - "num-bigint 0.4.5", + "num-bigint 0.4.6", "num-integer", "num-traits 0.2.19", "serde", @@ -8773,7 +9321,7 @@ dependencies = [ "cairo-lang-starknet-classes", "derive_more", "hex", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools 0.12.1", "once_cell", "primitive-types", @@ -8822,8 +9370,8 @@ dependencies = [ "async-trait", "cairo-lang-starknet-classes", "enum-iterator", - "http", - "indexmap 2.2.6", + "http 0.2.12", + "indexmap 2.4.0", "mockall", "mockito 0.31.1", "os_info", @@ -8900,11 +9448,11 @@ dependencies = [ "cairo-lang-sierra-to-casm", "cairo-lang-starknet-classes", "enum-assoc", - "hyper", + "hyper 0.14.30", "mempool_test_utils", "mockall", - "mockito 1.4.0", - "num-bigint 0.4.5", + "mockito 1.5.0", + "num-bigint 0.4.6", "papyrus_config", "papyrus_rpc", "pretty_assertions", @@ -8949,7 +9497,7 @@ dependencies = [ "assert_matches", "async-trait", "bincode 1.3.3", - "hyper", + "hyper 0.14.30", "papyrus_config", "pretty_assertions", "rstest", @@ -8968,7 +9516,7 @@ dependencies = [ "axum", "blockifier", "cairo-lang-starknet-classes", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools 0.10.5", "mempool_test_utils", "papyrus_common", @@ -9099,6 +9647,12 @@ dependencies = [ "rand 0.6.5", ] +[[package]] +name = "stats_alloc" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c0e04424e733e69714ca1bbb9204c1a57f09f5493439520f9f68c132ad25eec" + [[package]] name = "string_cache" version = "0.8.7" @@ -9107,7 +9661,7 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "phf_shared 0.10.0", "precomputed-hash", ] @@ -9138,11 +9692,11 @@ checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" [[package]] name = "strum" -version = "0.26.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ - "strum_macros 0.26.2", + "strum_macros 0.26.4", ] [[package]] @@ -9168,27 +9722,27 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] name = "strum_macros" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "svm-rs" @@ -9223,9 +9777,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.61" +version = "2.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" +checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" dependencies = [ "proc-macro2", "quote", @@ -9240,14 +9794,13 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "synstructure" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "unicode-xid", + "syn 2.0.74", ] [[package]] @@ -9279,9 +9832,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" dependencies = [ "filetime", "libc", @@ -9290,20 +9843,33 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.14" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + +[[package]] +name = "tblgen-alt" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +checksum = "7ae726d43658a13a9cd479de814be1311fea69236cd821e931a4fb9ca4d70e50" +dependencies = [ + "bindgen 0.69.4", + "cc", + "paste", + "thiserror", +] [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand 2.1.0", + "once_cell", "rustix 0.38.34", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -9350,7 +9916,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -9361,7 +9927,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", "test-case-core", ] @@ -9384,7 +9950,7 @@ checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -9397,28 +9963,28 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.61", + "syn 2.0.74", "which", ] [[package]] name = "thiserror" -version = "1.0.60" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.60" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -9525,9 +10091,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -9540,32 +10106,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", "socket2 0.5.7", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -9595,7 +10160,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.12", "tokio", ] @@ -9631,7 +10196,7 @@ checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", - "rustls", + "rustls 0.21.12", "tokio", "tokio-rustls", "tungstenite", @@ -9654,21 +10219,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.12" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.12", + "toml_edit 0.22.20", ] [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -9679,7 +10244,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "toml_datetime", "winnow 0.5.40", ] @@ -9690,22 +10255,22 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.12" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.8", + "winnow 0.6.18", ] [[package]] @@ -9731,15 +10296,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -9761,7 +10326,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -9795,6 +10360,16 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + [[package]] name = "tracing-subscriber" version = "0.3.18" @@ -9805,12 +10380,15 @@ dependencies = [ "nu-ansi-term", "once_cell", "regex", + "serde", + "serde_json", "sharded-slab", "smallvec", "thread_local", "tracing", "tracing-core", "tracing-log", + "tracing-serde", ] [[package]] @@ -9831,7 +10409,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" dependencies = [ "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -9849,17 +10427,23 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 0.2.12", "httparse", "log", "rand 0.8.5", - "rustls", + "rustls 0.21.12", "sha1", "thiserror", "url", "utf-8", ] +[[package]] +name = "typed-arena" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + [[package]] name = "typenum" version = "1.17.0" @@ -9886,9 +10470,9 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unescaper" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0adf6ad32eb5b3cadff915f7b770faaac8f7ff0476633aa29eb0d9584d889d34" +checksum = "c878a167baa8afd137494101a688ef8c67125089ff2249284bd2b5f9bfedb815" dependencies = [ "thiserror", ] @@ -9926,12 +10510,24 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "unicode_categories" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" + [[package]] name = "unindent" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" +[[package]] +name = "unindent" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" + [[package]] name = "universal-hash" version = "0.5.1" @@ -9972,9 +10568,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna 0.5.0", @@ -9989,9 +10585,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" @@ -10005,9 +10601,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" [[package]] name = "validator" @@ -10068,9 +10664,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "void" @@ -10080,9 +10676,9 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "waker-fn" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] name = "walkdir" @@ -10111,34 +10707,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -10148,9 +10745,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -10158,28 +10755,38 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", @@ -10227,11 +10834,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -10257,7 +10864,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ "windows-core 0.54.0", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -10275,7 +10882,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -10285,16 +10892,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" dependencies = [ "windows-result", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "windows-result" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -10312,7 +10919,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -10332,18 +10948,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -10354,9 +10970,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -10366,9 +10982,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -10378,15 +10994,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -10396,9 +11012,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -10408,9 +11024,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -10420,9 +11036,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -10432,9 +11048,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -10447,9 +11063,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.8" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -10506,9 +11122,9 @@ dependencies = [ [[package]] name = "x509-parser" -version = "0.15.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da" +checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" dependencies = [ "asn1-rs", "data-encoding", @@ -10528,15 +11144,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys 0.4.14", "rustix 0.38.34", ] [[package]] name = "xml-rs" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" +checksum = "539a77ee7c0de333dcc6da69b177380a0b81e0dacfa4f7344c465a36871ee601" [[package]] name = "xmltree" @@ -10571,7 +11187,7 @@ dependencies = [ "futures", "log", "nohash-hasher", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "pin-project", "rand 0.8.5", "static_assertions", @@ -10579,18 +11195,18 @@ dependencies = [ [[package]] name = "yamux" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f97202f6b125031b95d83e01dc57292b529384f80bfae4677e4bbc10178cf72" +checksum = "a31b5e376a8b012bee9c423acdbb835fc34d45001cfa3106236a624e4b738028" dependencies = [ "futures", - "instant", "log", "nohash-hasher", - "parking_lot 0.12.2", + "parking_lot 0.12.3", "pin-project", "rand 0.8.5", "static_assertions", + "web-time", ] [[package]] @@ -10610,29 +11226,30 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -10645,7 +11262,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.61", + "syn 2.0.74", ] [[package]] @@ -10683,7 +11300,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ - "zstd-safe 7.2.0", + "zstd-safe 7.2.1", ] [[package]] @@ -10698,18 +11315,18 @@ dependencies = [ [[package]] name = "zstd-safe" -version = "7.2.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", From f2365483b12ec40b87f050ded943b8708bb41069 Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Tue, 20 Aug 2024 19:40:10 +0300 Subject: [PATCH 15/21] fix: address review --- .../src/execution/contract_class.rs | 23 +++++++------------ .../execution/native/entry_point_execution.rs | 3 +-- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/crates/blockifier/src/execution/contract_class.rs b/crates/blockifier/src/execution/contract_class.rs index 084dfd7ea1..801d4cae42 100644 --- a/crates/blockifier/src/execution/contract_class.rs +++ b/crates/blockifier/src/execution/contract_class.rs @@ -42,15 +42,12 @@ use starknet_api::deprecated_contract_class::{ }; use starknet_types_core::felt::Felt; -use super::entry_point::EntryPointExecutionResult; -use super::errors::EntryPointExecutionError; -use super::execution_utils::poseidon_hash_many_cost; -use super::native::utils::contract_entrypoint_to_entrypoint_selector; use crate::abi::abi_utils::selector_from_name; use crate::abi::constants::{self, CONSTRUCTOR_ENTRY_POINT_NAME}; -use crate::execution::entry_point::CallEntryPoint; -use crate::execution::errors::{ContractClassError, PreExecutionError}; -use crate::execution::execution_utils::sn_api_to_cairo_vm_program; +use crate::execution::entry_point::{CallEntryPoint, EntryPointExecutionResult}; +use crate::execution::errors::{ContractClassError, EntryPointExecutionError, PreExecutionError}; +use crate::execution::execution_utils::{poseidon_hash_many_cost, sn_api_to_cairo_vm_program}; +use crate::execution::native::utils::contract_entrypoint_to_entrypoint_selector; use crate::fee::eth_gas_constants; use crate::transaction::errors::TransactionExecutionError; @@ -629,19 +626,15 @@ impl NativeContractClassV1 { } /// Returns an entry point into the natively compiled contract. - pub fn get_entrypoint( - &self, - entry_point_type: EntryPointType, - entrypoint_selector: EntryPointSelector, - ) -> EntryPointExecutionResult<&FunctionId> { - let entrypoints = &self.entry_points_by_type[entry_point_type]; + pub fn get_entrypoint(&self, call: &CallEntryPoint) -> EntryPointExecutionResult<&FunctionId> { + let entrypoints = &self.entry_points_by_type[call.entry_point_type]; entrypoints .iter() - .find(|entrypoint| entrypoint.selector == entrypoint_selector) + .find(|entrypoint| entrypoint.selector == call.entry_point_selector) .map(|op| &op.function_id) .ok_or(EntryPointExecutionError::NativeExecutionError { - info: format!("Entrypoint selector {} not found", entrypoint_selector.0), + info: format!("Entrypoint selector {} not found", call.entry_point_selector.0), }) } } diff --git a/crates/blockifier/src/execution/native/entry_point_execution.rs b/crates/blockifier/src/execution/native/entry_point_execution.rs index e4644910a9..86d655056e 100644 --- a/crates/blockifier/src/execution/native/entry_point_execution.rs +++ b/crates/blockifier/src/execution/native/entry_point_execution.rs @@ -18,8 +18,7 @@ pub fn execute_entry_point_call( resources: &mut ExecutionResources, context: &mut EntryPointExecutionContext, ) -> EntryPointExecutionResult { - let function_id = - contract_class.get_entrypoint(call.entry_point_type, call.entry_point_selector)?; + let function_id = contract_class.get_entrypoint(&call)?; let syscall_handler: NativeSyscallHandler<'_> = NativeSyscallHandler::new( state, From 00d5ca7055252016c51011b6fbf4e384e510ab11 Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Tue, 20 Aug 2024 19:57:39 +0300 Subject: [PATCH 16/21] refactor: address `get_entry_point` review requests --- .../src/execution/contract_class.rs | 31 +++++++++++++------ .../execution/native/entry_point_execution.rs | 2 +- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/crates/blockifier/src/execution/contract_class.rs b/crates/blockifier/src/execution/contract_class.rs index 801d4cae42..47c2ae789a 100644 --- a/crates/blockifier/src/execution/contract_class.rs +++ b/crates/blockifier/src/execution/contract_class.rs @@ -44,8 +44,8 @@ use starknet_types_core::felt::Felt; use crate::abi::abi_utils::selector_from_name; use crate::abi::constants::{self, CONSTRUCTOR_ENTRY_POINT_NAME}; -use crate::execution::entry_point::{CallEntryPoint, EntryPointExecutionResult}; -use crate::execution::errors::{ContractClassError, EntryPointExecutionError, PreExecutionError}; +use crate::execution::entry_point::CallEntryPoint; +use crate::execution::errors::{ContractClassError, PreExecutionError}; use crate::execution::execution_utils::{poseidon_hash_many_cost, sn_api_to_cairo_vm_program}; use crate::execution::native::utils::contract_entrypoint_to_entrypoint_selector; use crate::fee::eth_gas_constants; @@ -626,16 +626,27 @@ impl NativeContractClassV1 { } /// Returns an entry point into the natively compiled contract. - pub fn get_entrypoint(&self, call: &CallEntryPoint) -> EntryPointExecutionResult<&FunctionId> { - let entrypoints = &self.entry_points_by_type[call.entry_point_type]; + pub fn get_entry_point(&self, call: &CallEntryPoint) -> Result<&FunctionId, PreExecutionError> { + if call.entry_point_type == EntryPointType::Constructor + && call.entry_point_selector != selector_from_name(CONSTRUCTOR_ENTRY_POINT_NAME) + { + return Err(PreExecutionError::InvalidConstructorEntryPointName); + } - entrypoints + let entry_points_of_same_type = &self.0.entry_points_by_type[call.entry_point_type]; + let filtered_entry_points: Vec<_> = entry_points_of_same_type .iter() - .find(|entrypoint| entrypoint.selector == call.entry_point_selector) - .map(|op| &op.function_id) - .ok_or(EntryPointExecutionError::NativeExecutionError { - info: format!("Entrypoint selector {} not found", call.entry_point_selector.0), - }) + .filter(|ep| ep.selector == call.entry_point_selector) + .collect(); + + match &filtered_entry_points[..] { + [] => Err(PreExecutionError::EntryPointNotFound(call.entry_point_selector)), + [entry_point] => Ok(&entry_point.function_id), + _ => Err(PreExecutionError::DuplicatedEntryPointSelector { + selector: call.entry_point_selector, + typ: call.entry_point_type, + }), + } } } diff --git a/crates/blockifier/src/execution/native/entry_point_execution.rs b/crates/blockifier/src/execution/native/entry_point_execution.rs index 86d655056e..267fbc836c 100644 --- a/crates/blockifier/src/execution/native/entry_point_execution.rs +++ b/crates/blockifier/src/execution/native/entry_point_execution.rs @@ -18,7 +18,7 @@ pub fn execute_entry_point_call( resources: &mut ExecutionResources, context: &mut EntryPointExecutionContext, ) -> EntryPointExecutionResult { - let function_id = contract_class.get_entrypoint(&call)?; + let function_id = contract_class.get_entry_point(&call)?; let syscall_handler: NativeSyscallHandler<'_> = NativeSyscallHandler::new( state, From bb23d4a4b8952baf220afb4fa98d4e09069d7948 Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Tue, 20 Aug 2024 20:11:01 +0300 Subject: [PATCH 17/21] refactor: move out methods that won't be reviewed in this PR --- .../src/execution/execution_utils.rs | 13 +- crates/blockifier/src/execution/native.rs | 2 - .../execution/native/entry_point_execution.rs | 33 -- .../src/execution/native/syscall_handler.rs | 318 ------------------ .../blockifier/src/execution/native/utils.rs | 127 ------- .../src/execution/native/utils_test.rs | 42 --- 6 files changed, 3 insertions(+), 532 deletions(-) delete mode 100644 crates/blockifier/src/execution/native/entry_point_execution.rs delete mode 100644 crates/blockifier/src/execution/native/syscall_handler.rs delete mode 100644 crates/blockifier/src/execution/native/utils_test.rs diff --git a/crates/blockifier/src/execution/execution_utils.rs b/crates/blockifier/src/execution/execution_utils.rs index 9fc1e110d8..4620c76ffc 100644 --- a/crates/blockifier/src/execution/execution_utils.rs +++ b/crates/blockifier/src/execution/execution_utils.rs @@ -34,7 +34,6 @@ use crate::execution::entry_point::{ EntryPointExecutionResult, }; use crate::execution::errors::PostExecutionError; -use crate::execution::native::entry_point_execution as native_entry_point_execution; use crate::execution::{deprecated_entry_point_execution, entry_point_execution}; use crate::state::errors::StateError; use crate::state::state_api::State; @@ -69,14 +68,8 @@ pub fn execute_entry_point_call( resources, context, ), - ContractClass::V1Native(contract_class) => { - native_entry_point_execution::execute_entry_point_call( - call, - contract_class, - state, - resources, - context, - ) + ContractClass::V1Native(_contract_class) => { + unimplemented!("Native contract entry point execution is not yet implemented.") } } } @@ -274,7 +267,7 @@ pub fn max_fee_for_execution_info(tx_info: &TransactionInfo) -> Felt { TransactionInfo::Current(_) => 0, TransactionInfo::Deprecated(tx_info) => tx_info.max_fee.0, } - .into() + .into() } pub fn format_panic_data(felts: &[Felt]) -> String { diff --git a/crates/blockifier/src/execution/native.rs b/crates/blockifier/src/execution/native.rs index 5843e98914..b5614dd823 100644 --- a/crates/blockifier/src/execution/native.rs +++ b/crates/blockifier/src/execution/native.rs @@ -1,3 +1 @@ -pub mod entry_point_execution; -pub mod syscall_handler; pub mod utils; diff --git a/crates/blockifier/src/execution/native/entry_point_execution.rs b/crates/blockifier/src/execution/native/entry_point_execution.rs deleted file mode 100644 index 267fbc836c..0000000000 --- a/crates/blockifier/src/execution/native/entry_point_execution.rs +++ /dev/null @@ -1,33 +0,0 @@ -use cairo_vm::vm::runners::cairo_runner::ExecutionResources; - -use super::syscall_handler::NativeSyscallHandler; -use super::utils::run_native_executor; -use crate::execution::call_info::CallInfo; -use crate::execution::contract_class::NativeContractClassV1; -use crate::execution::entry_point::{ - CallEntryPoint, - EntryPointExecutionContext, - EntryPointExecutionResult, -}; -use crate::state::state_api::State; - -pub fn execute_entry_point_call( - call: CallEntryPoint, - contract_class: NativeContractClassV1, - state: &mut dyn State, - resources: &mut ExecutionResources, - context: &mut EntryPointExecutionContext, -) -> EntryPointExecutionResult { - let function_id = contract_class.get_entry_point(&call)?; - - let syscall_handler: NativeSyscallHandler<'_> = NativeSyscallHandler::new( - state, - call.caller_address, - call.storage_address, - call.entry_point_selector, - resources, - context, - ); - - run_native_executor(&contract_class.executor, function_id, call, syscall_handler) -} diff --git a/crates/blockifier/src/execution/native/syscall_handler.rs b/crates/blockifier/src/execution/native/syscall_handler.rs deleted file mode 100644 index fa94c09676..0000000000 --- a/crates/blockifier/src/execution/native/syscall_handler.rs +++ /dev/null @@ -1,318 +0,0 @@ -use std::collections::HashSet; -use std::hash::RandomState; - -use cairo_native::starknet::{ - ExecutionInfo, - ExecutionInfoV2, - Secp256k1Point, - Secp256r1Point, - StarknetSyscallHandler, - SyscallResult, - U256, -}; -use cairo_vm::vm::runners::cairo_runner::ExecutionResources; -use starknet_api::core::{ContractAddress, EntryPointSelector}; -use starknet_api::state::StorageKey; -use starknet_types_core::felt::Felt; - -use super::utils::encode_str_as_felts; -use crate::execution::call_info::{CallInfo, OrderedEvent, OrderedL2ToL1Message}; -use crate::execution::entry_point::{CallEntryPoint, EntryPointExecutionContext}; -use crate::execution::syscalls::hint_processor::OUT_OF_GAS_ERROR; -use crate::state::state_api::State; -use crate::transaction::transaction_utils::update_remaining_gas; - -pub struct NativeSyscallHandler<'state> { - // Input for execution. - pub state: &'state mut dyn State, - pub execution_resources: &'state mut ExecutionResources, - pub execution_context: &'state mut EntryPointExecutionContext, - - // Call information. - pub caller_address: ContractAddress, - pub contract_address: ContractAddress, - pub entry_point_selector: Felt, - - // Execution results. - pub events: Vec, - pub l2_to_l1_messages: Vec, - pub inner_calls: Vec, - - // Additional execution result info. - pub storage_read_values: Vec, - pub accessed_storage_keys: HashSet, -} - -impl<'state> NativeSyscallHandler<'state> { - pub fn new( - state: &'state mut dyn State, - caller_address: ContractAddress, - contract_address: ContractAddress, - entry_point_selector: EntryPointSelector, - execution_resources: &'state mut ExecutionResources, - execution_context: &'state mut EntryPointExecutionContext, - ) -> NativeSyscallHandler<'state> { - NativeSyscallHandler { - state, - caller_address, - contract_address, - entry_point_selector: entry_point_selector.0, - execution_resources, - execution_context, - events: Vec::new(), - l2_to_l1_messages: Vec::new(), - inner_calls: Vec::new(), - storage_read_values: Vec::new(), - accessed_storage_keys: HashSet::new(), - } - } - - pub fn execute_inner_call( - &mut self, - entry_point: CallEntryPoint, - remaining_gas: &mut u128, - ) -> SyscallResult { - let call_info = entry_point - .execute(self.state, self.execution_resources, self.execution_context) - .map_err(|e| encode_str_as_felts(&e.to_string()))?; - let retdata = call_info.execution.retdata.0.clone(); - - if call_info.execution.failed { - // In VM it's wrapped into `SyscallExecutionError::SyscallError`. - return Err(retdata); - } - - self.update_remaining_gas(remaining_gas, &call_info); - - self.inner_calls.push(call_info.clone()); - - Ok(call_info) - } - - pub fn update_remaining_gas(&mut self, remaining_gas: &mut u128, call_info: &CallInfo) { - // Create a new variable with converted type. - let mut remaining_gas_u64 = u64::try_from(*remaining_gas).unwrap(); - - // Pass the reference to the function. - update_remaining_gas(&mut remaining_gas_u64, call_info); - - // Change the remaining gas value. - *remaining_gas = u128::from(remaining_gas_u64); - } - - // Handles gas related logic when executing a syscall. Required because Native calls the - // syscalls directly unlike the VM where the `execute_syscall` method perform this operation - // first. - pub fn substract_syscall_gas_cost( - &mut self, - remaining_gas: &mut u128, - syscall_gas_cost: u64, - ) -> SyscallResult<()> { - // Refund `SYSCALL_BASE_GAS_COST` as it was pre-charged. - let required_gas = - u128::from(syscall_gas_cost - self.execution_context.gas_costs().syscall_base_gas_cost); - - if *remaining_gas < required_gas { - // Out of gas failure. - return Err(vec![Felt::from_hex(OUT_OF_GAS_ERROR).unwrap()]); - } - - *remaining_gas -= required_gas; - - Ok(()) - } -} - -impl<'state> StarknetSyscallHandler for &mut NativeSyscallHandler<'state> { - fn get_block_hash( - &mut self, - _block_number: u64, - _remaining_gas: &mut u128, - ) -> SyscallResult { - todo!("Implement get_block_hash syscall."); - } - - fn get_execution_info(&mut self, _remaining_gas: &mut u128) -> SyscallResult { - todo!("Implement get_execution_info syscall."); - } - - fn get_execution_info_v2( - &mut self, - _remaining_gas: &mut u128, - ) -> SyscallResult { - todo!("Implement get_execution_info_v2 syscall."); - } - - fn deploy( - &mut self, - _class_hash: Felt, - _contract_address_salt: Felt, - _calldata: &[Felt], - _deploy_from_zero: bool, - _remaining_gas: &mut u128, - ) -> SyscallResult<(Felt, Vec)> { - todo!("Implement deploy syscall."); - } - - fn replace_class(&mut self, _class_hash: Felt, _remaining_gas: &mut u128) -> SyscallResult<()> { - todo!("Implement replace_class syscall."); - } - - fn library_call( - &mut self, - _class_hash: Felt, - _function_selector: Felt, - _calldata: &[Felt], - _remaining_gas: &mut u128, - ) -> SyscallResult> { - todo!("Implement library_call syscall."); - } - - fn call_contract( - &mut self, - _address: Felt, - _entry_point_selector: Felt, - _calldata: &[Felt], - _remaining_gas: &mut u128, - ) -> SyscallResult> { - todo!("Implement call_contract syscall."); - } - - fn storage_read( - &mut self, - _address_domain: u32, - _address: Felt, - _remaining_gas: &mut u128, - ) -> SyscallResult { - todo!("Implement storage_read syscall."); - } - - fn storage_write( - &mut self, - _address_domain: u32, - _address: Felt, - _value: Felt, - _remaining_gas: &mut u128, - ) -> SyscallResult<()> { - todo!("Implement storage_write syscall."); - } - - fn emit_event( - &mut self, - _keys: &[Felt], - _data: &[Felt], - _remaining_gas: &mut u128, - ) -> SyscallResult<()> { - todo!("Implement emit_event syscall."); - } - - fn send_message_to_l1( - &mut self, - _to_address: Felt, - _payload: &[Felt], - _remaining_gas: &mut u128, - ) -> SyscallResult<()> { - todo!("Implement send_message_to_l1 syscall."); - } - - fn keccak(&mut self, _input: &[u64], _remaining_gas: &mut u128) -> SyscallResult { - todo!("Implement keccak syscall."); - } - - fn secp256k1_new( - &mut self, - _x: U256, - _y: U256, - _remaining_gas: &mut u128, - ) -> SyscallResult> { - todo!("Implement secp256k1_new syscall."); - } - - fn secp256k1_add( - &mut self, - _p0: Secp256k1Point, - _p1: Secp256k1Point, - _remaining_gas: &mut u128, - ) -> SyscallResult { - todo!("Implement secp256k1_add syscall."); - } - - fn secp256k1_mul( - &mut self, - _p: Secp256k1Point, - _m: U256, - _remaining_gas: &mut u128, - ) -> SyscallResult { - todo!("Implement secp256k1_mul syscall."); - } - - fn secp256k1_get_point_from_x( - &mut self, - _x: U256, - _y_parity: bool, - _remaining_gas: &mut u128, - ) -> SyscallResult> { - todo!("Implement secp256k1_get_point_from_x syscall."); - } - - fn secp256k1_get_xy( - &mut self, - _p: Secp256k1Point, - _remaining_gas: &mut u128, - ) -> SyscallResult<(U256, U256)> { - todo!("Implement secp256k1_get_xy syscall."); - } - - fn secp256r1_new( - &mut self, - _x: U256, - _y: U256, - _remaining_gas: &mut u128, - ) -> SyscallResult> { - todo!("Implement secp256r1_new syscall."); - } - - fn secp256r1_add( - &mut self, - _p0: Secp256r1Point, - _p1: Secp256r1Point, - _remaining_gas: &mut u128, - ) -> SyscallResult { - todo!("Implement secp256r1_add syscall."); - } - - fn secp256r1_mul( - &mut self, - _p: Secp256r1Point, - _m: U256, - _remaining_gas: &mut u128, - ) -> SyscallResult { - todo!("Implement secp256r1_mul syscall."); - } - - fn secp256r1_get_point_from_x( - &mut self, - _x: U256, - _y_parity: bool, - _remaining_gas: &mut u128, - ) -> SyscallResult> { - todo!("Implement secp256r1_get_point_from_x syscall."); - } - - fn secp256r1_get_xy( - &mut self, - _p: Secp256r1Point, - _remaining_gas: &mut u128, - ) -> SyscallResult<(U256, U256)> { - todo!("Implement secp256r1_get_xy syscall."); - } - - fn sha256_process_block( - &mut self, - _prev_state: &[u32; 8], - _current_block: &[u32; 16], - _remaining_gas: &mut u128, - ) -> SyscallResult<[u32; 8]> { - todo!("Implement sha256_process_block syscall."); - } -} diff --git a/crates/blockifier/src/execution/native/utils.rs b/crates/blockifier/src/execution/native/utils.rs index 2f8f744c19..263da4b90f 100644 --- a/crates/blockifier/src/execution/native/utils.rs +++ b/crates/blockifier/src/execution/native/utils.rs @@ -1,138 +1,11 @@ -use std::collections::{HashMap, HashSet}; -use std::hash::RandomState; - -use cairo_lang_sierra::ids::FunctionId; use cairo_lang_starknet_classes::contract_class::ContractEntryPoint; -use cairo_native::execution_result::ContractExecutionResult; -use cairo_native::executor::AotNativeExecutor; -use cairo_vm::vm::runners::cairo_runner::ExecutionResources; -use itertools::Itertools; use num_traits::ToBytes; use starknet_api::core::EntryPointSelector; -use starknet_api::state::StorageKey; use starknet_types_core::felt::Felt; -use crate::execution::call_info::{ - CallExecution, - CallInfo, - OrderedEvent, - OrderedL2ToL1Message, - Retdata, -}; -use crate::execution::entry_point::{CallEntryPoint, EntryPointExecutionResult}; -use crate::execution::errors::EntryPointExecutionError; -use crate::execution::native::syscall_handler::NativeSyscallHandler; - -#[cfg(test)] -#[path = "utils_test.rs"] -pub mod test; - -// An arbitrary number, chosen to avoid accidentally aligning with actually calculated gas -// To be deleted once cairo native gas handling can be used. -pub const NATIVE_GAS_PLACEHOLDER: u64 = 12; - pub fn contract_entrypoint_to_entrypoint_selector( entrypoint: &ContractEntryPoint, ) -> EntryPointSelector { let selector_felt = Felt::from_bytes_be_slice(&entrypoint.selector.to_be_bytes()); EntryPointSelector(selector_felt) } - -pub fn run_native_executor( - native_executor: &AotNativeExecutor, - function_id: &FunctionId, - call: CallEntryPoint, - mut syscall_handler: NativeSyscallHandler<'_>, -) -> EntryPointExecutionResult { - let execution_result = native_executor.invoke_contract_dynamic( - function_id, - &call.calldata.0, - Some(call.initial_gas.into()), - &mut syscall_handler, - ); - - let run_result = match execution_result { - Ok(res) if res.failure_flag => Err(EntryPointExecutionError::NativeExecutionError { - info: if !res.return_values.is_empty() { - decode_felts_as_str(&res.return_values) - } else { - String::from("Unknown error") - }, - }), - Err(runner_err) => { - Err(EntryPointExecutionError::NativeUnexpectedError { source: runner_err }) - } - Ok(res) => Ok(res), - }?; - - create_callinfo( - call.clone(), - run_result, - syscall_handler.events, - syscall_handler.l2_to_l1_messages, - syscall_handler.inner_calls, - syscall_handler.storage_read_values, - syscall_handler.accessed_storage_keys, - ) -} - -pub fn create_callinfo( - call: CallEntryPoint, - run_result: ContractExecutionResult, - events: Vec, - l2_to_l1_messages: Vec, - inner_calls: Vec, - storage_read_values: Vec, - accessed_storage_keys: HashSet, -) -> Result { - Ok(CallInfo { - call, - execution: CallExecution { - retdata: Retdata(run_result.return_values), - events, - l2_to_l1_messages, - failed: run_result.failure_flag, - gas_consumed: NATIVE_GAS_PLACEHOLDER, - }, - resources: ExecutionResources { - n_steps: 0, - n_memory_holes: 0, - builtin_instance_counter: HashMap::default(), - }, - inner_calls, - storage_read_values, - accessed_storage_keys, - }) -} - -pub fn encode_str_as_felts(msg: &str) -> Vec { - const CHUNK_SIZE: usize = 32; - - let data = msg.as_bytes().chunks(CHUNK_SIZE - 1); - let mut encoding = vec![Felt::default(); data.len()]; - for (i, data_chunk) in data.enumerate() { - let mut chunk = [0_u8; CHUNK_SIZE]; - chunk[1..data_chunk.len() + 1].copy_from_slice(data_chunk); - encoding[i] = Felt::from_bytes_be(&chunk); - } - encoding -} - -pub fn decode_felts_as_str(encoding: &[Felt]) -> String { - let bytes_err: Vec<_> = - encoding.iter().flat_map(|felt| felt.to_bytes_be()[1..32].to_vec()).collect(); - - match String::from_utf8(bytes_err) { - Ok(s) => s.trim_matches('\0').to_owned(), - Err(_) => { - let err_msgs = encoding - .iter() - .map(|felt| match String::from_utf8(felt.to_bytes_be()[1..32].to_vec()) { - Ok(s) => format!("{} ({})", s.trim_matches('\0'), felt), - Err(_) => felt.to_string(), - }) - .join(", "); - format!("[{}]", err_msgs) - } - } -} diff --git a/crates/blockifier/src/execution/native/utils_test.rs b/crates/blockifier/src/execution/native/utils_test.rs deleted file mode 100644 index 1f295fe74f..0000000000 --- a/crates/blockifier/src/execution/native/utils_test.rs +++ /dev/null @@ -1,42 +0,0 @@ -use cairo_lang_starknet_classes::contract_class::ContractEntryPoint; -use num_bigint::BigUint; -use pretty_assertions::assert_eq; -use starknet_api::core::EntryPointSelector; -use starknet_types_core::felt::Felt; - -use super::{contract_entrypoint_to_entrypoint_selector, decode_felts_as_str, encode_str_as_felts}; - -#[test] -fn test_encode_decode_str() { - const STR: &str = "Hello StarkNet!"; - - let encoded_felt_array = encode_str_as_felts(STR); - - let decoded_felt_array = decode_felts_as_str(encoded_felt_array.as_slice()); - - assert_eq!(&decoded_felt_array, STR); -} - -#[test] -fn test_decode_non_utf8_str() { - let v1 = Felt::from_dec_str("1234").unwrap(); - let v2_msg = "i am utf8"; - let v2 = Felt::from_bytes_be_slice(v2_msg.as_bytes()); - let v3 = Felt::from_dec_str("13299428").unwrap(); - let felts = [v1, v2, v3]; - - let res = decode_felts_as_str(&felts); - dbg!(res.as_bytes()); - assert_eq!(res, format!("[{}, {} ({}), {}]", v1, v2_msg, v2, v3)) -} - -#[test] -fn test_contract_entrypoint_to_entrypoint_selector() { - const NUM: u128 = 123; - - let entrypoint = ContractEntryPoint { selector: BigUint::from(NUM), function_idx: 0 }; - let expected_entrypoint_selector = EntryPointSelector(Felt::from(NUM)); - let actual_entrypoint_selector = contract_entrypoint_to_entrypoint_selector(&entrypoint); - - assert_eq!(actual_entrypoint_selector, expected_entrypoint_selector); -} From 3403746943bcbf5f15b7d1fea738e273a7eaf1b2 Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Tue, 20 Aug 2024 20:20:46 +0300 Subject: [PATCH 18/21] fix: rust fmt --- crates/blockifier/src/execution/execution_utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/blockifier/src/execution/execution_utils.rs b/crates/blockifier/src/execution/execution_utils.rs index 4620c76ffc..261229fd51 100644 --- a/crates/blockifier/src/execution/execution_utils.rs +++ b/crates/blockifier/src/execution/execution_utils.rs @@ -267,7 +267,7 @@ pub fn max_fee_for_execution_info(tx_info: &TransactionInfo) -> Felt { TransactionInfo::Current(_) => 0, TransactionInfo::Deprecated(tx_info) => tx_info.max_fee.0, } - .into() + .into() } pub fn format_panic_data(felts: &[Felt]) -> String { From 79a28725760ccbe3e89d31a7832629ff4c733214 Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Tue, 20 Aug 2024 21:06:13 +0300 Subject: [PATCH 19/21] fix: apply some of the CI fixes --- .github/actions/setup-native-deps/action.yml | 41 +++++++++++++++++++ .github/workflows/blockifier_ci.yml | 3 ++ .../workflows/blockifier_compiled_cairo.yml | 4 ++ .github/workflows/blockifier_coverage.yml | 3 ++ .github/workflows/blockifier_post-merge.yml | 4 ++ .github/workflows/main.yml | 12 ++++++ Cargo.toml | 2 +- crates/blockifier/Cargo.toml | 4 +- 8 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 .github/actions/setup-native-deps/action.yml diff --git a/.github/actions/setup-native-deps/action.yml b/.github/actions/setup-native-deps/action.yml new file mode 100644 index 0000000000..7930558f4c --- /dev/null +++ b/.github/actions/setup-native-deps/action.yml @@ -0,0 +1,41 @@ +name: "Setup Cairo Native Dependencies" +description: "Sets up LLVM and GMP libraries" + +outputs: + cairo-native-runtime-library: + description: "The path to the cairo native runtime library" + value: ${{ steps.set-env-vars.outputs.cairo-native-runtime-library }} +runs: + using: "composite" + steps: + - name: Add llvm deb repository + uses: myci-actions/add-deb-repo@11 + with: + repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main + repo-name: llvm-repo + keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key + - name: Install LLVM and gmplib + shell: bash + run: | + sudo apt-get update + sudo apt-get install llvm-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools + sudo apt-get install -y libgmp3-dev + + - name: Fetch Cairo Native Repository + uses: actions/checkout@v3 + with: + repository: "lambdaclass/cairo_native" + ref: "cairo-lang2.7.0-rc.3" + path: "cairo_native" + - name: Install Cairo Native Runtime Dependencies + id: set-env-vars + shell: bash + run: | + cd ./cairo_native && + echo "cairo-native-runtime-library=$(pwd)/target/release/libcairo_native_runtime.a" >> $GITHUB_OUTPUT && + echo "CAIRO_NATIVE_RUNTIME_LIBRARY=$(pwd)/target/release/libcairo_native_runtime.a" >> $GITHUB_ENV && + echo "MLIR_SYS_180_PREFIX=/usr/lib/llvm-18/" >> $GITHUB_ENV && + echo "LLVM_SYS_181_PREFIX=/usr/lib/llvm-18/" >> $GITHUB_ENV && + echo "TABLEGEN_180_PREFIX=/usr/lib/llvm-18/" >> $GITHUB_ENV && + cd ./runtime && + cargo build --release \ No newline at end of file diff --git a/.github/workflows/blockifier_ci.yml b/.github/workflows/blockifier_ci.yml index c0e06095ce..5d8884acfb 100644 --- a/.github/workflows/blockifier_ci.yml +++ b/.github/workflows/blockifier_ci.yml @@ -38,6 +38,9 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/install_rust + - name: Set up Native Dependencies + uses: ./.github/actions/setup-native-deps + id: native-deps - uses: Swatinem/rust-cache@v2 with: prefix-key: "v0-rust-ubuntu-20.04" diff --git a/.github/workflows/blockifier_compiled_cairo.yml b/.github/workflows/blockifier_compiled_cairo.yml index 1bcda6cc25..38a0ea7d04 100644 --- a/.github/workflows/blockifier_compiled_cairo.yml +++ b/.github/workflows/blockifier_compiled_cairo.yml @@ -65,6 +65,10 @@ jobs: with: toolchain: nightly-2023-07-05 + - name: set up native dependencies + uses: ./.github/actions/setup-native-deps + id: native-deps + - name: Verify cairo contract recompilation (both cairo versions). run: cd sequencer && diff --git a/.github/workflows/blockifier_coverage.yml b/.github/workflows/blockifier_coverage.yml index b22c50aefc..f9492fa5e8 100644 --- a/.github/workflows/blockifier_coverage.yml +++ b/.github/workflows/blockifier_coverage.yml @@ -15,6 +15,9 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/install_rust + - name: Set up Native Dependencies + uses: ./.github/actions/setup-native-deps + id: native-deps - uses: Swatinem/rust-cache@v2 with: prefix-key: "v0-rust-ubuntu-20.04" diff --git a/.github/workflows/blockifier_post-merge.yml b/.github/workflows/blockifier_post-merge.yml index 194fb23475..9d5c285677 100644 --- a/.github/workflows/blockifier_post-merge.yml +++ b/.github/workflows/blockifier_post-merge.yml @@ -20,6 +20,10 @@ jobs: - uses: Swatinem/rust-cache@v2 with: prefix-key: "v0-rust-ubuntu-20.04" + + - name: Set up Native Dependencies + uses: ./.github/actions/setup-native-deps + id: native-deps # Setup pypy and link to the location expected by .cargo/config.toml. - uses: actions/setup-python@v5 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 32be92fa5a..04eaa341f8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,6 +61,9 @@ jobs: - uses: ./.github/actions/install_rust with: components: clippy + - name: Set up Native Dependencies + uses: ./.github/actions/setup-native-deps + id: native-deps - uses: Swatinem/rust-cache@v2 with: prefix-key: "v0-rust-ubuntu-20.04" @@ -84,6 +87,9 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/install_rust + - name: Set up Native Dependencies + uses: ./.github/actions/setup-native-deps + id: native-deps - uses: Swatinem/rust-cache@v2 - uses: Noelware/setup-protoc@1.1.0 with: @@ -98,6 +104,9 @@ jobs: # Fetch the entire history. fetch-depth: 0 - uses: ./.github/actions/install_rust + - name: Set up Native Dependencies + uses: ./.github/actions/setup-native-deps + id: native-deps - uses: Noelware/setup-protoc@1.1.0 - uses: Swatinem/rust-cache@v2 with: @@ -160,6 +169,9 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/install_rust + - name: Set up Native Dependencies + uses: ./.github/actions/setup-native-deps + id: native-deps - uses: Swatinem/rust-cache@v2 - uses: Noelware/setup-protoc@1.1.0 with: diff --git a/Cargo.toml b/Cargo.toml index b82a50b2e9..7e60e4264e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,13 +74,13 @@ bytes = "1" cached = "0.44.0" cairo-felt = "0.9.1" # This is a temporary dependency, will be removed once the new version of cairo-native is released to main. -cairo-native = { git = "https://github.com/lambdaclass/cairo_native", branch = "cairo-lang2.7.0-rc.3" } cairo-lang-casm = "2.7.0" cairo-lang-runner = "2.7.0" cairo-lang-sierra = "=2.7.0" cairo-lang-sierra-to-casm = "2.7.0" cairo-lang-starknet-classes = "2.7.0" cairo-lang-utils = "2.7.0" +cairo-native = { git = "https://github.com/lambdaclass/cairo_native", branch = "cairo-lang2.7.0-rc.3" } cairo-vm = "=1.0.0-rc6" camelpaste = "0.1.0" chrono = "0.4.26" diff --git a/crates/blockifier/Cargo.toml b/crates/blockifier/Cargo.toml index b857e85247..9e51f0d2a4 100644 --- a/crates/blockifier/Cargo.toml +++ b/crates/blockifier/Cargo.toml @@ -23,12 +23,12 @@ ark-ff.workspace = true ark-secp256k1.workspace = true ark-secp256r1.workspace = true cached.workspace = true -cairo-native.workspace = true cairo-lang-casm = { workspace = true, features = ["parity-scale-codec"] } cairo-lang-runner.workspace = true -cairo-lang-starknet-classes.workspace = true cairo-lang-sierra.workspace = true +cairo-lang-starknet-classes.workspace = true cairo-lang-utils.workspace = true +cairo-native.workspace = true cairo-vm.workspace = true derive_more.workspace = true indexmap.workspace = true From 20db62206b46917a50002692162e7df07da4f19e Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Wed, 21 Aug 2024 13:08:47 +0300 Subject: [PATCH 20/21] fix: comment in Cargo.toml --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7e60e4264e..154f9e42f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,13 +73,13 @@ byteorder = "1.4.3" bytes = "1" cached = "0.44.0" cairo-felt = "0.9.1" -# This is a temporary dependency, will be removed once the new version of cairo-native is released to main. cairo-lang-casm = "2.7.0" cairo-lang-runner = "2.7.0" cairo-lang-sierra = "=2.7.0" cairo-lang-sierra-to-casm = "2.7.0" cairo-lang-starknet-classes = "2.7.0" cairo-lang-utils = "2.7.0" +# This is a temporary dependency, will be removed once the new version of cairo-native is released to main. cairo-native = { git = "https://github.com/lambdaclass/cairo_native", branch = "cairo-lang2.7.0-rc.3" } cairo-vm = "=1.0.0-rc6" camelpaste = "0.1.0" From b73639a3b1ce05d13a14bce44c3afd2b3ce13792 Mon Sep 17 00:00:00 2001 From: Bohdan Ohorodnii Date: Tue, 27 Aug 2024 12:23:44 +0300 Subject: [PATCH 21/21] fix: address some of the review comments --- .../src/execution/contract_class.rs | 32 ++++++++----------- crates/blockifier/src/execution/errors.rs | 6 ++++ .../blockifier/src/execution/native/utils.rs | 4 +-- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/crates/blockifier/src/execution/contract_class.rs b/crates/blockifier/src/execution/contract_class.rs index 9b705a402e..072807d532 100644 --- a/crates/blockifier/src/execution/contract_class.rs +++ b/crates/blockifier/src/execution/contract_class.rs @@ -45,7 +45,7 @@ use starknet_types_core::felt::Felt; use crate::abi::abi_utils::selector_from_name; use crate::abi::constants::{self, CONSTRUCTOR_ENTRY_POINT_NAME}; use crate::execution::entry_point::CallEntryPoint; -use crate::execution::errors::{ContractClassError, PreExecutionError}; +use crate::execution::errors::{ContractClassError, NativeEntryPointError, PreExecutionError}; use crate::execution::execution_utils::{poseidon_hash_many_cost, sn_api_to_cairo_vm_program}; use crate::execution::native::utils::contract_entrypoint_to_entrypoint_selector; use crate::fee::eth_gas_constants; @@ -592,12 +592,6 @@ impl Deref for NativeContractClassV1 { } } -#[derive(Debug, thiserror::Error)] -pub enum NativeEntryPointError { - #[error("FunctionId {0} not found")] - FunctionIdNotFound(usize), -} - impl NativeContractClassV1 { fn constructor_selector(&self) -> Option { self.entry_points_by_type.constructor.first().map(|ep| ep.selector) @@ -621,7 +615,7 @@ impl NativeContractClassV1 { ) -> Result { let sierra_contract_class = SierraContractClass { // Cloning because these are behind an Arc. - sierra_program: self.sierra_program_raw.clone(), + sierra_program: self.sierra_program.clone(), entry_points_by_type: self.fallback_entry_points_by_type.clone(), abi: None, sierra_program_debug_info: None, @@ -661,7 +655,7 @@ pub struct NativeContractClassV1Inner { pub executor: AotNativeExecutor, entry_points_by_type: NativeContractEntryPoints, // Storing the raw sierra program and entry points to be able to fallback to the vm - sierra_program_raw: Vec, + sierra_program: Vec, fallback_entry_points_by_type: SierraContractEntryPoints, } @@ -692,7 +686,7 @@ impl NativeContractClassV1Inner { &lookup_fid, &sierra_contract_class.entry_points_by_type, )?, - sierra_program_raw: sierra_contract_class.sierra_program, + sierra_program: sierra_contract_class.sierra_program, fallback_entry_points_by_type: sierra_contract_class.entry_points_by_type, }) } @@ -703,7 +697,7 @@ impl NativeContractClassV1Inner { impl PartialEq for NativeContractClassV1Inner { fn eq(&self, other: &Self) -> bool { self.entry_points_by_type == other.entry_points_by_type - && self.sierra_program_raw == other.sierra_program_raw + && self.sierra_program == other.sierra_program } } @@ -724,19 +718,19 @@ impl NativeContractEntryPoints { /// On failure returns the first FunctionId that it couldn't find. fn try_from( lookup: &HashMap, - sep: &SierraContractEntryPoints, + sierra_ep: &SierraContractEntryPoints, ) -> Result { - let constructor = sep + let constructor = sierra_ep .constructor .iter() .map(|c| NativeEntryPoint::try_from(lookup, c)) .collect::>()?; - let external = sep + let external = sierra_ep .external .iter() .map(|c| NativeEntryPoint::try_from(lookup, c)) .collect::>()?; - let l1_handler = sep + let l1_handler = sierra_ep .l1_handler .iter() .map(|c| NativeEntryPoint::try_from(lookup, c)) @@ -770,12 +764,12 @@ struct NativeEntryPoint { impl NativeEntryPoint { fn try_from( lookup: &HashMap, - cep: &ContractEntryPoint, + contract_ep: &ContractEntryPoint, ) -> Result { let &function_id = lookup - .get(&cep.function_idx) - .ok_or(NativeEntryPointError::FunctionIdNotFound(cep.function_idx))?; - let selector = contract_entrypoint_to_entrypoint_selector(cep); + .get(&contract_ep.function_idx) + .ok_or(NativeEntryPointError::FunctionIdNotFound(contract_ep.function_idx))?; + let selector = contract_entrypoint_to_entrypoint_selector(contract_ep); Ok(NativeEntryPoint { selector, function_id: function_id.clone() }) } } diff --git a/crates/blockifier/src/execution/errors.rs b/crates/blockifier/src/execution/errors.rs index 6067a6926c..dd5955a172 100644 --- a/crates/blockifier/src/execution/errors.rs +++ b/crates/blockifier/src/execution/errors.rs @@ -111,6 +111,12 @@ pub enum EntryPointExecutionError { TraceError(#[from] TraceError), } +#[derive(Debug, Error)] +pub enum NativeEntryPointError { + #[error("FunctionId {0} not found")] + FunctionIdNotFound(usize), +} + #[derive(Debug, Error)] pub enum ConstructorEntryPointExecutionError { #[error( diff --git a/crates/blockifier/src/execution/native/utils.rs b/crates/blockifier/src/execution/native/utils.rs index 263da4b90f..addcbcc3ad 100644 --- a/crates/blockifier/src/execution/native/utils.rs +++ b/crates/blockifier/src/execution/native/utils.rs @@ -1,11 +1,9 @@ use cairo_lang_starknet_classes::contract_class::ContractEntryPoint; -use num_traits::ToBytes; use starknet_api::core::EntryPointSelector; use starknet_types_core::felt::Felt; pub fn contract_entrypoint_to_entrypoint_selector( entrypoint: &ContractEntryPoint, ) -> EntryPointSelector { - let selector_felt = Felt::from_bytes_be_slice(&entrypoint.selector.to_be_bytes()); - EntryPointSelector(selector_felt) + EntryPointSelector(Felt::from(&entrypoint.selector)) }