From bdcf1c885831b771a52a904e4bea3b821a264729 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Tue, 26 Nov 2024 09:30:18 -0300 Subject: [PATCH 01/41] =?UTF-8?q?Remove=20account=20from=20cach=C3=A9=20if?= =?UTF-8?q?=20coinbase=20fee=20is=20zero?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/vm/levm/src/vm.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index dd0fcf7dc..23ef8790e 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -179,8 +179,10 @@ impl VM { }; // Note: This is commented because it's used for debugging purposes in development. - // dbg!(¤t_call_frame.gas_used); - // dbg!(&opcode); + //dbg!(¤t_call_frame.gas_used); + //println!("Memory: {:?}", ¤t_call_frame.memory); + //dbg!(¤t_call_frame.stack); + //dbg!(&opcode); let op_result: Result = match opcode { Opcode::STOP => Ok(OpcodeSuccess::Result(ResultReason::Stop)), Opcode::ADD => self.op_add(current_call_frame), @@ -586,9 +588,12 @@ impl VM { .balance .checked_add(coinbase_fee) .ok_or(VMError::BalanceOverflow)?; - self.cache.add_account(&coinbase_address, &coinbase_account); + if coinbase_fee.is_zero() { + self.cache.accounts.remove(&coinbase_address); + } + report.new_state.clone_from(&self.cache.accounts); Ok(report) From 98d04296d869ad989ac1bcbda4a15b8576977f86 Mon Sep 17 00:00:00 2001 From: ilitteri Date: Tue, 26 Nov 2024 10:04:33 -0300 Subject: [PATCH 02/41] Add initial account states to compare the changes if any --- cmd/ef_tests/levm/report.rs | 69 ++++++++++++++++++++++++- cmd/ef_tests/levm/runner/revm_runner.rs | 46 +++++++++++++++-- 2 files changed, 109 insertions(+), 6 deletions(-) diff --git a/cmd/ef_tests/levm/report.rs b/cmd/ef_tests/levm/report.rs index 9a90a1521..052f3da43 100644 --- a/cmd/ef_tests/levm/report.rs +++ b/cmd/ef_tests/levm/report.rs @@ -1,7 +1,10 @@ use crate::runner::{EFTestRunnerError, InternalError}; use colored::Colorize; use ethrex_core::{Address, H256}; -use ethrex_levm::errors::{TransactionReport, TxResult, VMError}; +use ethrex_levm::{ + errors::{TransactionReport, TxResult, VMError}, + Account, StorageSlot, +}; use ethrex_storage::{error::StoreError, AccountUpdate}; use ethrex_vm::SpecId; use revm::primitives::{EVMError, ExecutionResult as RevmExecutionResult}; @@ -340,6 +343,7 @@ impl EFTestReport { #[derive(Debug, Default, Clone, Serialize, Deserialize)] pub struct AccountUpdatesReport { + pub initial_accounts: HashMap, pub levm_account_updates: Vec, pub revm_account_updates: Vec, pub levm_updated_accounts_only: HashSet
, @@ -353,6 +357,69 @@ impl fmt::Display for AccountUpdatesReport { for levm_updated_account_only in self.levm_updated_accounts_only.iter() { writeln!(f, " {levm_updated_account_only:#x}:")?; writeln!(f, "{}", " Was updated in LEVM but not in REVM".red())?; + let initial_account = self + .initial_accounts + .get(levm_updated_account_only) + .unwrap(); + let updated_account_update = self + .levm_account_updates + .iter() + .find(|account_update| &account_update.address == levm_updated_account_only) + .unwrap(); + let updated_account_storage = updated_account_update + .added_storage + .iter() + .map(|(key, value)| { + let storage_slot = StorageSlot { + original_value: *value, + current_value: *value, + }; + (*key, storage_slot) + }) + .collect(); + let updated_account_info = updated_account_update.info.clone().unwrap(); + let updated_account = Account::new( + updated_account_info.balance, + updated_account_update.code.clone().unwrap_or_default(), + updated_account_info.nonce, + updated_account_storage, + ); + if initial_account.info.balance != updated_account.info.balance { + writeln!( + f, + "{}", + format!( + " Balance updated: {initial_balance} -> {updated_balance}", + initial_balance = initial_account.info.balance, + updated_balance = updated_account.info.balance + ) + .red() + )?; + } else if initial_account.info.nonce != updated_account.info.nonce { + writeln!( + f, + "{}", + format!( + " Nonce updated: {initial_nonce} -> {updated_nonce}", + initial_nonce = initial_account.info.nonce, + updated_nonce = updated_account.info.nonce + ) + .red() + )?; + } else if initial_account.info.bytecode != updated_account.info.bytecode { + writeln!( + f, + "{}", + format!( + " Code updated: {initial_code}, {updated_code}", + initial_code = hex::encode(&initial_account.info.bytecode), + updated_code = hex::encode(&updated_account.info.bytecode) + ) + .red() + )?; + } else { + writeln!(f, "{}", " No changes".green())?; + } } for revm_updated_account_only in self.revm_updated_accounts_only.iter() { writeln!(f, " {revm_updated_account_only:#x}:")?; diff --git a/cmd/ef_tests/levm/runner/revm_runner.rs b/cmd/ef_tests/levm/runner/revm_runner.rs index 9c7052558..d720c22a5 100644 --- a/cmd/ef_tests/levm/runner/revm_runner.rs +++ b/cmd/ef_tests/levm/runner/revm_runner.rs @@ -4,8 +4,11 @@ use crate::{ types::EFTest, utils::load_initial_state, }; -use ethrex_core::{types::TxKind, Address}; -use ethrex_levm::errors::{TransactionReport, TxResult}; +use ethrex_core::{types::TxKind, Address, H256}; +use ethrex_levm::{ + errors::{TransactionReport, TxResult}, + Account, StorageSlot, +}; use ethrex_storage::{error::StoreError, AccountUpdate}; use ethrex_vm::{db::StoreWrapper, EvmState, RevmAddress, RevmU256, SpecId}; use revm::{ @@ -17,7 +20,7 @@ use revm::{ }, Evm as Revm, }; -use std::collections::HashSet; +use std::collections::{HashMap, HashSet}; pub fn re_run_failed_ef_test( test: &EFTest, @@ -245,8 +248,11 @@ pub fn ensure_post_state( None => { let levm_account_updates = levm_runner::get_state_transitions(levm_execution_report); let revm_account_updates = ethrex_vm::get_state_transitions(revm_state); - let account_updates_report = - compare_levm_revm_account_updates(&levm_account_updates, &revm_account_updates); + let account_updates_report = compare_levm_revm_account_updates( + test, + &levm_account_updates, + &revm_account_updates, + ); re_run_report.register_account_updates_report(*vector, account_updates_report); } } @@ -255,9 +261,38 @@ pub fn ensure_post_state( } pub fn compare_levm_revm_account_updates( + test: &EFTest, levm_account_updates: &[AccountUpdate], revm_account_updates: &[AccountUpdate], ) -> AccountUpdatesReport { + let mut initial_accounts: HashMap = test + .pre + .0 + .iter() + .map(|(account_address, pre_state_value)| { + let account_storage = pre_state_value + .storage + .iter() + .map(|(key, value)| { + let mut temp = [0u8; 32]; + key.to_big_endian(&mut temp); + let storage_slot = StorageSlot { + original_value: *value, + current_value: *value, + }; + (H256::from_slice(&temp), storage_slot) + }) + .collect(); + let account = Account::new( + pre_state_value.balance, + pre_state_value.code.clone(), + pre_state_value.nonce.as_u64(), + account_storage, + ); + (*account_address, account) + }) + .collect(); + initial_accounts.insert(test.env.current_coinbase, Account::default()); let levm_updated_accounts = levm_account_updates .iter() .map(|account_update| account_update.address) @@ -268,6 +303,7 @@ pub fn compare_levm_revm_account_updates( .collect::>(); AccountUpdatesReport { + initial_accounts, levm_account_updates: levm_account_updates.to_vec(), revm_account_updates: revm_account_updates.to_vec(), levm_updated_accounts_only: levm_updated_accounts From 829d808bef81fff00b021921d8d7b86cc8f98697 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Wed, 27 Nov 2024 12:14:46 -0300 Subject: [PATCH 03/41] Use transactions gas_limit --- cmd/ef_tests/levm/runner/levm_runner.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/ef_tests/levm/runner/levm_runner.rs b/cmd/ef_tests/levm/runner/levm_runner.rs index 4cf9ee66b..3202c0992 100644 --- a/cmd/ef_tests/levm/runner/levm_runner.rs +++ b/cmd/ef_tests/levm/runner/levm_runner.rs @@ -78,7 +78,11 @@ pub fn prepare_vm_for_tx(vector: &TestVector, test: &EFTest) -> Result Date: Wed, 27 Nov 2024 12:20:52 -0300 Subject: [PATCH 04/41] Don't cap the gas_limit with MAX_BLOCK_GAS_LIMIT --- crates/vm/levm/src/vm.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 23ef8790e..4552b6dc0 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -98,7 +98,7 @@ impl VM { value, calldata.clone(), false, - env.gas_limit.min(MAX_BLOCK_GAS_LIMIT), + env.gas_limit, TX_BASE_COST, 0, ); @@ -136,7 +136,7 @@ impl VM { value, Bytes::new(), false, - env.gas_limit.min(MAX_BLOCK_GAS_LIMIT), + env.gas_limit, TX_BASE_COST, 0, ); From 47f5f659dc981bfd49c20820cc93218d11759d7f Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Wed, 27 Nov 2024 12:21:38 -0300 Subject: [PATCH 05/41] Set sender account as current to in generic_call --- crates/vm/levm/src/vm.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 4552b6dc0..7611ad486 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -622,7 +622,7 @@ impl VM { ret_offset: usize, ret_size: usize, ) -> Result { - let mut sender_account = self.get_account(¤t_call_frame.msg_sender); + let mut sender_account = self.get_account(¤t_call_frame.to); if sender_account.info.balance < value { current_call_frame.stack.push(U256::from(REVERT_FOR_CALL))?; @@ -701,7 +701,7 @@ impl VM { // Update sender account and recipient in cache self.cache - .add_account(¤t_call_frame.msg_sender, &sender_account); + .add_account(¤t_call_frame.to, &sender_account); self.cache.add_account(&to, &recipient_account); // self.call_frames.push(new_call_frame.clone()); From 0efa70141e998cec4cadd0a7fa7f0b29bd39c4de Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Wed, 27 Nov 2024 16:05:18 -0300 Subject: [PATCH 06/41] Do not expand memory if size to expand is zero --- crates/vm/levm/src/gas_cost.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/crates/vm/levm/src/gas_cost.rs b/crates/vm/levm/src/gas_cost.rs index 75cdc321e..db7dc9504 100644 --- a/crates/vm/levm/src/gas_cost.rs +++ b/crates/vm/levm/src/gas_cost.rs @@ -191,11 +191,15 @@ fn copy_behavior( .saturating_sub(1)) / WORD_SIZE; - let memory_expansion_cost = current_call_frame.memory.expansion_cost( - offset - .checked_add(size) - .ok_or(OutOfGasError::GasCostOverflow)?, - )?; + let memory_expansion_cost = if size != 0 { + current_call_frame.memory.expansion_cost( + offset + .checked_add(size) + .ok_or(OutOfGasError::GasCostOverflow)? + )? + } else { + U256::zero() + }; let minimum_word_size_cost = dynamic_base .checked_mul(minimum_word_size.into()) From 4585c1a385908a7e10a0ecf392bb1ef62472c34f Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Thu, 28 Nov 2024 09:47:45 -0300 Subject: [PATCH 07/41] Add comments + fmt --- crates/vm/levm/src/gas_cost.rs | 2 +- crates/vm/levm/src/opcode_handlers/system.rs | 3 ++- crates/vm/levm/src/vm.rs | 17 ++++++++++++----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/crates/vm/levm/src/gas_cost.rs b/crates/vm/levm/src/gas_cost.rs index db7dc9504..9970d2584 100644 --- a/crates/vm/levm/src/gas_cost.rs +++ b/crates/vm/levm/src/gas_cost.rs @@ -195,7 +195,7 @@ fn copy_behavior( current_call_frame.memory.expansion_cost( offset .checked_add(size) - .ok_or(OutOfGasError::GasCostOverflow)? + .ok_or(OutOfGasError::GasCostOverflow)?, )? } else { U256::zero() diff --git a/crates/vm/levm/src/opcode_handlers/system.rs b/crates/vm/levm/src/opcode_handlers/system.rs index c621a51ec..86eb5daee 100644 --- a/crates/vm/levm/src/opcode_handlers/system.rs +++ b/crates/vm/levm/src/opcode_handlers/system.rs @@ -454,7 +454,8 @@ impl VM { current_account.info.balance = U256::zero(); // Update cache after modifying current account - self.cache.add_account(¤t_call_frame.to, ¤t_account); + self.cache + .add_account(¤t_call_frame.to, ¤t_account); let is_cached = self.cache.is_account_cached(&target_address); diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 7611ad486..5738540e1 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -179,10 +179,16 @@ impl VM { }; // Note: This is commented because it's used for debugging purposes in development. - //dbg!(¤t_call_frame.gas_used); - //println!("Memory: {:?}", ¤t_call_frame.memory); - //dbg!(¤t_call_frame.stack); - //dbg!(&opcode); + /* dbg!(¤t_call_frame.gas_used); + let hex_memory: String = current_call_frame.memory.data + .clone() + .iter() + .map(|b| format!("{:02x}", b)) + .collect::>() + .join(""); + println!("Memory: {:?}", hex_memory); + dbg!(¤t_call_frame.stack); + dbg!(&opcode); */ let op_result: Result = match opcode { Opcode::STOP => Ok(OpcodeSuccess::Result(ResultReason::Stop)), Opcode::ADD => self.op_add(current_call_frame), @@ -593,7 +599,7 @@ impl VM { if coinbase_fee.is_zero() { self.cache.accounts.remove(&coinbase_address); } - + report.new_state.clone_from(&self.cache.accounts); Ok(report) @@ -726,6 +732,7 @@ impl VM { .push(U256::from(SUCCESS_FOR_CALL))?; } TxResult::Revert(_) => { + // self.env.refunded_gas = self.env.refunded_gas.checked_sub(tx_report.gas_refunded.into()).ok_or(VMError::Internal(InternalError::ArithmeticOperationUnderflow))?; // Push 0 to stack current_call_frame.stack.push(U256::from(REVERT_FOR_CALL))?; } From 8a4cca1dd40b3413cb4af99861ac4312bcb1c5c7 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Thu, 28 Nov 2024 09:50:23 -0300 Subject: [PATCH 08/41] Fix: use msg_sender instead of call_frame's to --- crates/vm/levm/src/vm.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 5738540e1..49f7f42dc 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -628,7 +628,7 @@ impl VM { ret_offset: usize, ret_size: usize, ) -> Result { - let mut sender_account = self.get_account(¤t_call_frame.to); + let mut sender_account = self.get_account(&msg_sender); if sender_account.info.balance < value { current_call_frame.stack.push(U256::from(REVERT_FOR_CALL))?; @@ -707,7 +707,7 @@ impl VM { // Update sender account and recipient in cache self.cache - .add_account(¤t_call_frame.to, &sender_account); + .add_account(&msg_sender, &sender_account); self.cache.add_account(&to, &recipient_account); // self.call_frames.push(new_call_frame.clone()); From cee0dcfc107bb9892aaf3f6870b12748acaff626 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Thu, 28 Nov 2024 09:52:51 -0300 Subject: [PATCH 09/41] general fmt --- cmd/ef_tests/levm/runner/levm_runner.rs | 6 +----- crates/vm/levm/src/vm.rs | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/cmd/ef_tests/levm/runner/levm_runner.rs b/cmd/ef_tests/levm/runner/levm_runner.rs index 3202c0992..39185ac8c 100644 --- a/cmd/ef_tests/levm/runner/levm_runner.rs +++ b/cmd/ef_tests/levm/runner/levm_runner.rs @@ -78,11 +78,7 @@ pub fn prepare_vm_for_tx(vector: &TestVector, test: &EFTest) -> Result Date: Thu, 28 Nov 2024 11:12:34 -0300 Subject: [PATCH 10/41] Fix: Use U256 in checked_shift right and left --- .../vm/levm/src/opcode_handlers/arithmetic.rs | 2 +- .../src/opcode_handlers/bitwise_comparison.rs | 46 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/crates/vm/levm/src/opcode_handlers/arithmetic.rs b/crates/vm/levm/src/opcode_handlers/arithmetic.rs index 0b05f8ba2..c980cb1ab 100644 --- a/crates/vm/levm/src/opcode_handlers/arithmetic.rs +++ b/crates/vm/levm/src/opcode_handlers/arithmetic.rs @@ -276,7 +276,7 @@ impl VM { ))?; let is_negative = value_to_extend.bit(sign_bit_index); - let sign_bit_mask = checked_shift_left(U256::one(), sign_bit_index)? + let sign_bit_mask = checked_shift_left(U256::one(), U256::from(sign_bit_index))? .checked_sub(U256::one()) .ok_or(VMError::Internal( InternalError::ArithmeticOperationUnderflow, diff --git a/crates/vm/levm/src/opcode_handlers/bitwise_comparison.rs b/crates/vm/levm/src/opcode_handlers/bitwise_comparison.rs index c80812430..8f05f3714 100644 --- a/crates/vm/levm/src/opcode_handlers/bitwise_comparison.rs +++ b/crates/vm/levm/src/opcode_handlers/bitwise_comparison.rs @@ -195,12 +195,10 @@ impl VM { let shift = current_call_frame.stack.pop()?; let value = current_call_frame.stack.pop()?; - let shift_usize: usize = shift.try_into().map_err(|_| VMError::VeryLargeNumber)?; // we know its not bigger than 256 - if shift < U256::from(256) { current_call_frame .stack - .push(checked_shift_left(value, shift_usize)?)?; + .push(checked_shift_left(value, shift)?)?; } else { current_call_frame.stack.push(U256::zero())?; } @@ -214,12 +212,10 @@ impl VM { let shift = current_call_frame.stack.pop()?; let value = current_call_frame.stack.pop()?; - let shift_usize: usize = shift.try_into().map_err(|_| VMError::VeryLargeNumber)?; // we know its not bigger than 256 - if shift < U256::from(256) { current_call_frame .stack - .push(checked_shift_right(value, shift_usize)?)?; + .push(checked_shift_right(value, shift)?)?; } else { current_call_frame.stack.push(U256::zero())?; } @@ -246,32 +242,32 @@ impl VM { } pub fn arithmetic_shift_right(value: U256, shift: U256) -> Result { - let shift_usize: usize = shift.try_into().map_err(|_| VMError::VeryLargeNumber)?; // we know its not bigger than 256 - if value.bit(255) { // if negative fill with 1s - let shifted = checked_shift_right(value, shift_usize)?; + let shifted = checked_shift_right(value, shift)?; let mask = checked_shift_left( U256::MAX, - 256_usize.checked_sub(shift_usize).ok_or(VMError::Internal( - InternalError::ArithmeticOperationUnderflow, - ))?, // Note that this is already checked in op_sar + (U256::from(256)) + .checked_sub(shift) + .ok_or(VMError::Internal( + InternalError::ArithmeticOperationUnderflow, + ))?, // Note that this is already checked in op_sar )?; Ok(shifted | mask) } else { - Ok(checked_shift_right(value, shift_usize)?) + Ok(checked_shift_right(value, shift)?) } } /// Instead of using unsafe <<, uses checked_mul n times, replicating n shifts. /// Note: These (checked_shift_left and checked_shift_right) are done because /// are not available in U256 -pub fn checked_shift_left(value: U256, shift: usize) -> Result { +pub fn checked_shift_left(value: U256, shift: U256) -> Result { let mut result = value; let mut shifts_left = shift; - while shifts_left > 0 { + while shifts_left > U256::zero() { result = match result.checked_mul(U256::from(2)) { Some(num) => num, None => { @@ -290,26 +286,30 @@ pub fn checked_shift_left(value: U256, shift: usize) -> Result { ))? } }; - shifts_left = shifts_left.checked_sub(1).ok_or(VMError::Internal( - InternalError::ArithmeticOperationUnderflow, - ))?; // Should not reach negative values + shifts_left = shifts_left + .checked_sub(U256::one()) + .ok_or(VMError::Internal( + InternalError::ArithmeticOperationUnderflow, + ))?; // Should not reach negative values } Ok(result) } // Instead of using unsafe >>, uses checked_div n times, replicating n shifts -fn checked_shift_right(value: U256, shift: usize) -> Result { +fn checked_shift_right(value: U256, shift: U256) -> Result { let mut result = value; let mut shifts_left = shift; - while shifts_left > 0 { + while shifts_left > U256::zero() { result = result.checked_div(U256::from(2)).ok_or(VMError::Internal( InternalError::ArithmeticOperationDividedByZero, ))?; // '2' will never be zero - shifts_left = shifts_left.checked_sub(1).ok_or(VMError::Internal( - InternalError::ArithmeticOperationUnderflow, - ))?; // Should not reach negative values + shifts_left = shifts_left + .checked_sub(U256::one()) + .ok_or(VMError::Internal( + InternalError::ArithmeticOperationUnderflow, + ))?; // Should not reach negative values } Ok(result) From e94d0b5688fd1cf1060ced8c0e24c5e0daa77af2 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Thu, 28 Nov 2024 12:20:37 -0300 Subject: [PATCH 11/41] Remove debug prints --- crates/vm/levm/src/vm.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index fa0ee9ad2..a903c1650 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -178,17 +178,6 @@ impl VM { } }; - // Note: This is commented because it's used for debugging purposes in development. - /* dbg!(¤t_call_frame.gas_used); - let hex_memory: String = current_call_frame.memory.data - .clone() - .iter() - .map(|b| format!("{:02x}", b)) - .collect::>() - .join(""); - println!("Memory: {:?}", hex_memory); - dbg!(¤t_call_frame.stack); - dbg!(&opcode); */ let op_result: Result = match opcode { Opcode::STOP => Ok(OpcodeSuccess::Result(ResultReason::Stop)), Opcode::ADD => self.op_add(current_call_frame), From 5e2c8be17a47673ed738571ca32547e73020b9b7 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Thu, 28 Nov 2024 12:42:33 -0300 Subject: [PATCH 12/41] Add todo comment for revert refunded gas --- crates/vm/levm/src/vm.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index a903c1650..60b84ad13 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -720,7 +720,9 @@ impl VM { .push(U256::from(SUCCESS_FOR_CALL))?; } TxResult::Revert(_) => { + // TODO: Revert gas refunds in case the called callframe reverts // self.env.refunded_gas = self.env.refunded_gas.checked_sub(tx_report.gas_refunded.into()).ok_or(VMError::Internal(InternalError::ArithmeticOperationUnderflow))?; + // Push 0 to stack current_call_frame.stack.push(U256::from(REVERT_FOR_CALL))?; } From 06d25f210a3480648e87b8f061f0dd89e84bbac6 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Thu, 28 Nov 2024 12:53:02 -0300 Subject: [PATCH 13/41] Return EFTestRunnerError instead of using unwrap --- cmd/ef_tests/levm/runner/levm_runner.rs | 43 +++++++++++++++++++++---- crates/vm/levm/src/vm.rs | 2 +- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/cmd/ef_tests/levm/runner/levm_runner.rs b/cmd/ef_tests/levm/runner/levm_runner.rs index 39185ac8c..abf08252f 100644 --- a/cmd/ef_tests/levm/runner/levm_runner.rs +++ b/cmd/ef_tests/levm/runner/levm_runner.rs @@ -73,12 +73,30 @@ pub fn prepare_vm_for_tx(vector: &TestVector, test: &EFTest) -> Result Result { // TODO: Revert gas refunds in case the called callframe reverts // self.env.refunded_gas = self.env.refunded_gas.checked_sub(tx_report.gas_refunded.into()).ok_or(VMError::Internal(InternalError::ArithmeticOperationUnderflow))?; - + // Push 0 to stack current_call_frame.stack.push(U256::from(REVERT_FOR_CALL))?; } From 30e6f17063d07f30bc1bc816715983637c8006f3 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Thu, 28 Nov 2024 12:54:51 -0300 Subject: [PATCH 14/41] Remove TODO comment --- crates/vm/levm/src/vm.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index c94a28601..4dad7736c 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -720,9 +720,6 @@ impl VM { .push(U256::from(SUCCESS_FOR_CALL))?; } TxResult::Revert(_) => { - // TODO: Revert gas refunds in case the called callframe reverts - // self.env.refunded_gas = self.env.refunded_gas.checked_sub(tx_report.gas_refunded.into()).ok_or(VMError::Internal(InternalError::ArithmeticOperationUnderflow))?; - // Push 0 to stack current_call_frame.stack.push(U256::from(REVERT_FOR_CALL))?; } From 1060987cc402cd14cb4a30a90a1c972a9220e22e Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Thu, 28 Nov 2024 15:11:00 -0300 Subject: [PATCH 15/41] Move verify of expansion size to expansion_cost --- crates/vm/levm/src/memory.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/vm/levm/src/memory.rs b/crates/vm/levm/src/memory.rs index 2eab4ada7..28fc50b11 100644 --- a/crates/vm/levm/src/memory.rs +++ b/crates/vm/levm/src/memory.rs @@ -159,7 +159,14 @@ impl Memory { Ok(()) } - pub fn expansion_cost(&self, memory_byte_size: usize) -> Result { + pub fn expansion_cost(&self, offset: usize, size: usize) -> Result { + if size == 0 { + return Ok(U256::zero()); + } + + let memory_byte_size = offset + .checked_add(size) + .ok_or(OutOfGasError::GasCostOverflow)?; if memory_byte_size <= self.data.len() { return Ok(U256::zero()); } From b91170108db601b87c2646cf56183fe52742227c Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Thu, 28 Nov 2024 15:13:21 -0300 Subject: [PATCH 16/41] Change expansion_cost occurences --- crates/vm/levm/src/gas_cost.rs | 131 ++++++++++--------- crates/vm/levm/src/opcode_handlers/system.rs | 16 +-- 2 files changed, 69 insertions(+), 78 deletions(-) diff --git a/crates/vm/levm/src/gas_cost.rs b/crates/vm/levm/src/gas_cost.rs index 9970d2584..a86a88298 100644 --- a/crates/vm/levm/src/gas_cost.rs +++ b/crates/vm/levm/src/gas_cost.rs @@ -191,15 +191,7 @@ fn copy_behavior( .saturating_sub(1)) / WORD_SIZE; - let memory_expansion_cost = if size != 0 { - current_call_frame.memory.expansion_cost( - offset - .checked_add(size) - .ok_or(OutOfGasError::GasCostOverflow)?, - )? - } else { - U256::zero() - }; + let memory_expansion_cost = current_call_frame.memory.expansion_cost(offset, size)?; let minimum_word_size_cost = dynamic_base .checked_mul(minimum_word_size.into()) @@ -231,11 +223,7 @@ pub fn log( offset: usize, number_of_topics: u8, ) -> Result { - let memory_expansion_cost = current_call_frame.memory.expansion_cost( - offset - .checked_add(size) - .ok_or(OutOfGasError::GasCostOverflow)?, - )?; + let memory_expansion_cost = current_call_frame.memory.expansion_cost(offset, size)?; let topics_cost = LOGN_DYNAMIC_BASE .checked_mul(number_of_topics.into()) @@ -270,11 +258,9 @@ fn mem_expansion_behavior( offset_add: usize, static_cost: U256, ) -> Result { - let memory_expansion_cost = current_call_frame.memory.expansion_cost( - offset - .checked_add(offset_add) - .ok_or(OutOfGasError::GasCostOverflow)?, - )?; + let memory_expansion_cost = current_call_frame + .memory + .expansion_cost(offset, offset_add)?; static_cost .checked_add(memory_expansion_cost) .ok_or(OutOfGasError::GasCostOverflow) @@ -333,16 +319,21 @@ pub fn mcopy( .saturating_sub(1)) / WORD_SIZE; - let memory_byte_size = src_offset + let src_sum = src_offset .checked_add(size) - .and_then(|src_sum| { - dest_offset - .checked_add(size) - .map(|dest_sum| src_sum.max(dest_sum)) - }) .ok_or(OutOfGasError::GasCostOverflow)?; + let dest_sum = dest_offset + .checked_add(size) + .ok_or(OutOfGasError::GasCostOverflow)?; + + let memory_expansion_cost = if src_sum > dest_sum { + current_call_frame.memory.expansion_cost(src_offset, size)? + } else { + current_call_frame + .memory + .expansion_cost(dest_offset, size)? + }; - let memory_expansion_cost = current_call_frame.memory.expansion_cost(memory_byte_size)?; let copied_words_cost = MCOPY_DYNAMIC_BASE .checked_mul(words_copied.into()) .ok_or(OutOfGasError::GasCostOverflow)?; @@ -364,15 +355,22 @@ pub fn call( is_cached: bool, account_is_empty: bool, ) -> Result { - let memory_byte_size = args_size - .checked_add(args_offset) - .ok_or(OutOfGasError::GasCostOverflow)? - .max( - ret_size - .checked_add(ret_offset) - .ok_or(OutOfGasError::GasCostOverflow)?, - ); - let memory_expansion_cost = current_call_frame.memory.expansion_cost(memory_byte_size)?; + let arg_sum = args_offset + .checked_add(args_size) + .ok_or(OutOfGasError::GasCostOverflow)?; + let ret_sum = ret_offset + .checked_add(ret_size) + .ok_or(OutOfGasError::GasCostOverflow)?; + + let memory_expansion_cost = if arg_sum > ret_sum { + current_call_frame + .memory + .expansion_cost(args_offset, args_size)? + } else { + current_call_frame + .memory + .expansion_cost(ret_offset, ret_size)? + }; let positive_value_cost = if !value.is_zero() { NON_ZERO_VALUE_COST @@ -476,15 +474,22 @@ fn compute_gas_call( ret_offset: usize, is_cached: bool, ) -> Result { - let memory_byte_size = args_offset + let arg_sum = args_offset .checked_add(args_size) - .and_then(|src_sum| { - ret_offset - .checked_add(ret_size) - .map(|dest_sum| src_sum.max(dest_sum)) - }) .ok_or(OutOfGasError::GasCostOverflow)?; - let memory_expansion_cost = current_call_frame.memory.expansion_cost(memory_byte_size)?; + let ret_sum = ret_offset + .checked_add(ret_size) + .ok_or(OutOfGasError::GasCostOverflow)?; + + let memory_expansion_cost = if arg_sum > ret_sum { + current_call_frame + .memory + .expansion_cost(args_offset, args_size)? + } else { + current_call_frame + .memory + .expansion_cost(ret_offset, ret_size)? + }; let access_cost = if is_cached { WARM_ADDRESS_ACCESS_COST @@ -499,8 +504,8 @@ fn compute_gas_call( pub fn create( current_call_frame: &mut CallFrame, - code_offset_in_memory: U256, - code_size_in_memory: U256, + code_offset_in_memory: usize, + code_size_in_memory: usize, ) -> Result { compute_gas_create( current_call_frame, @@ -512,8 +517,8 @@ pub fn create( pub fn create_2( current_call_frame: &mut CallFrame, - code_offset_in_memory: U256, - code_size_in_memory: U256, + code_offset_in_memory: usize, + code_size_in_memory: usize, ) -> Result { compute_gas_create( current_call_frame, @@ -525,48 +530,44 @@ pub fn create_2( fn compute_gas_create( current_call_frame: &mut CallFrame, - code_offset_in_memory: U256, - code_size_in_memory: U256, + code_offset_in_memory: usize, + code_size_in_memory: usize, is_create_2: bool, ) -> Result { let minimum_word_size = (code_size_in_memory - .checked_add(U256::from(31)) + .checked_add(31) .ok_or(OutOfGasError::GasCostOverflow)?) - .checked_div(U256::from(32)) + .checked_div(32) .ok_or(OutOfGasError::ArithmeticOperationDividedByZero)?; // '32' will never be zero let init_code_cost = minimum_word_size - .checked_mul(INIT_CODE_WORD_COST) + .checked_mul(INIT_CODE_WORD_COST.as_usize()) // will not panic since it's 2 .ok_or(OutOfGasError::GasCostOverflow)?; let code_deposit_cost = code_size_in_memory - .checked_mul(CODE_DEPOSIT_COST) + .checked_mul(CODE_DEPOSIT_COST.as_usize()) // will not panic since it's 200 .ok_or(OutOfGasError::GasCostOverflow)?; - let memory_expansion_cost = current_call_frame.memory.expansion_cost( - code_size_in_memory - .checked_add(code_offset_in_memory) - .ok_or(OutOfGasError::GasCostOverflow)? - .try_into() - .map_err(|_err| OutOfGasError::GasCostOverflow)?, - )?; + let memory_expansion_cost = current_call_frame + .memory + .expansion_cost(code_offset_in_memory, code_size_in_memory)?; let hash_cost = if is_create_2 { minimum_word_size - .checked_mul(KECCAK25_DYNAMIC_BASE) + .checked_mul(KECCAK25_DYNAMIC_BASE.as_usize()) // will not panic since it's 6 .ok_or(OutOfGasError::GasCostOverflow)? } else { - U256::zero() + 0 }; - init_code_cost - .checked_add(memory_expansion_cost) + memory_expansion_cost + .checked_add(init_code_cost.into()) .ok_or(OutOfGasError::CreationCostIsTooHigh)? - .checked_add(code_deposit_cost) + .checked_add(code_deposit_cost.into()) .ok_or(OutOfGasError::CreationCostIsTooHigh)? .checked_add(CREATE_BASE_COST) .ok_or(OutOfGasError::CreationCostIsTooHigh)? - .checked_add(hash_cost) + .checked_add(hash_cost.into()) .ok_or(OutOfGasError::CreationCostIsTooHigh) } diff --git a/crates/vm/levm/src/opcode_handlers/system.rs b/crates/vm/levm/src/opcode_handlers/system.rs index 86eb5daee..bde304af2 100644 --- a/crates/vm/levm/src/opcode_handlers/system.rs +++ b/crates/vm/levm/src/opcode_handlers/system.rs @@ -1,6 +1,6 @@ use crate::{ call_frame::CallFrame, - errors::{InternalError, OpcodeSuccess, ResultReason, VMError}, + errors::{OpcodeSuccess, ResultReason, VMError}, gas_cost, vm::{word_to_address, VM}, }; @@ -172,12 +172,7 @@ impl VM { .try_into() .map_err(|_| VMError::VeryLargeNumber)?; - let gas_cost = - current_call_frame - .memory - .expansion_cost(offset.checked_add(size).ok_or(VMError::Internal( - InternalError::ArithmeticOperationOverflow, - ))?)?; + let gas_cost = current_call_frame.memory.expansion_cost(offset, size)?; self.increase_consumed_gas(current_call_frame, gas_cost)?; @@ -404,12 +399,7 @@ impl VM { .try_into() .map_err(|_err| VMError::VeryLargeNumber)?; - let gas_cost = - current_call_frame - .memory - .expansion_cost(offset.checked_add(size).ok_or(VMError::Internal( - InternalError::ArithmeticOperationOverflow, - ))?)?; + let gas_cost = current_call_frame.memory.expansion_cost(offset, size)?; self.increase_consumed_gas(current_call_frame, gas_cost)?; From 76fab1015f3f517c1a5c6718809310e733eb5f2e Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Thu, 28 Nov 2024 15:13:46 -0300 Subject: [PATCH 17/41] Change code offset and size in creates to usize --- crates/vm/levm/src/opcode_handlers/system.rs | 24 ++++++++++++++++---- crates/vm/levm/src/vm.rs | 12 ++-------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/crates/vm/levm/src/opcode_handlers/system.rs b/crates/vm/levm/src/opcode_handlers/system.rs index bde304af2..8ae595f41 100644 --- a/crates/vm/levm/src/opcode_handlers/system.rs +++ b/crates/vm/levm/src/opcode_handlers/system.rs @@ -325,8 +325,16 @@ impl VM { current_call_frame: &mut CallFrame, ) -> Result { let value_in_wei_to_send = current_call_frame.stack.pop()?; - let code_offset_in_memory = current_call_frame.stack.pop()?; - let code_size_in_memory = current_call_frame.stack.pop()?; + let code_offset_in_memory = current_call_frame + .stack + .pop()? + .try_into() + .map_err(|_err| VMError::VeryLargeNumber)?; + let code_size_in_memory = current_call_frame + .stack + .pop()? + .try_into() + .map_err(|_err| VMError::VeryLargeNumber)?; // Gas Cost let gas_cost = gas_cost::create( @@ -354,8 +362,16 @@ impl VM { current_call_frame: &mut CallFrame, ) -> Result { let value_in_wei_to_send = current_call_frame.stack.pop()?; - let code_offset_in_memory = current_call_frame.stack.pop()?; - let code_size_in_memory = current_call_frame.stack.pop()?; + let code_offset_in_memory: usize = current_call_frame + .stack + .pop()? + .try_into() + .map_err(|_err| VMError::VeryLargeNumber)?; + let code_size_in_memory: usize = current_call_frame + .stack + .pop()? + .try_into() + .map_err(|_err| VMError::VeryLargeNumber)?; let salt = current_call_frame.stack.pop()?; // Gas Cost diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 4dad7736c..887171c16 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -785,15 +785,11 @@ impl VM { pub fn create( &mut self, value_in_wei_to_send: U256, - code_offset_in_memory: U256, - code_size_in_memory: U256, + code_offset_in_memory: usize, + code_size_in_memory: usize, salt: Option, current_call_frame: &mut CallFrame, ) -> Result { - let code_size_in_memory = code_size_in_memory - .try_into() - .map_err(|_err| VMError::VeryLargeNumber)?; - if code_size_in_memory > MAX_CODE_SIZE * 2 { current_call_frame .stack @@ -831,10 +827,6 @@ impl VM { }; sender_account.info.nonce = new_nonce; - let code_offset_in_memory = code_offset_in_memory - .try_into() - .map_err(|_err| VMError::VeryLargeNumber)?; - let code = Bytes::from( current_call_frame .memory From fd5934007205749b40016f0014162fa7ce99f503 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Thu, 28 Nov 2024 16:19:57 -0300 Subject: [PATCH 18/41] Cover border case in signexend implementation --- .../vm/levm/src/opcode_handlers/arithmetic.rs | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/crates/vm/levm/src/opcode_handlers/arithmetic.rs b/crates/vm/levm/src/opcode_handlers/arithmetic.rs index c980cb1ab..b04f8adc7 100644 --- a/crates/vm/levm/src/opcode_handlers/arithmetic.rs +++ b/crates/vm/levm/src/opcode_handlers/arithmetic.rs @@ -250,19 +250,14 @@ impl VM { ) -> Result { self.increase_consumed_gas(current_call_frame, gas_cost::SIGNEXTEND)?; - let byte_size: usize = current_call_frame - .stack - .pop()? - .try_into() - .map_err(|_| VMError::VeryLargeNumber)?; - + let byte_size = current_call_frame.stack.pop()?; let value_to_extend = current_call_frame.stack.pop()?; - let bits_per_byte: usize = 8; - let sign_bit_position_on_byte = 7; + let bits_per_byte = U256::from(8); + let sign_bit_position_on_byte = U256::from(7); - let max_byte_size: usize = 31; - let byte_size: usize = byte_size.min(max_byte_size); + let max_byte_size = U256::from(31); + let byte_size = byte_size.min(max_byte_size); let total_bits = bits_per_byte .checked_mul(byte_size) .ok_or(VMError::Internal( @@ -274,6 +269,17 @@ impl VM { .ok_or(VMError::Internal( InternalError::ArithmeticOperationOverflow, ))?; + + let sign_bit_index: usize = match sign_bit_index.try_into() { + Ok(val) => val, + Err(_) => { + // this means the value_to_extend was too big to extend, so remains the same. + // Maybe this verification could be done before in this function + current_call_frame.stack.push(value_to_extend)?; + return Ok(OpcodeSuccess::Continue); + } + }; + let is_negative = value_to_extend.bit(sign_bit_index); let sign_bit_mask = checked_shift_left(U256::one(), U256::from(sign_bit_index))? From ceb79b01548b4d461a8b079b5fdc445ac30e5b1b Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Thu, 28 Nov 2024 16:39:49 -0300 Subject: [PATCH 19/41] Mannually change CI things --- .github/workflows/ci.yaml | 75 ++++ .github/workflows/integration.yaml | 117 ++++++ Cargo.lock | 598 ++++++++++++++--------------- 3 files changed, 479 insertions(+), 311 deletions(-) create mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/integration.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..8e3cf7a5f --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,75 @@ +name: CI +on: + push: + branches: ["main"] + merge_group: + pull_request: + branches: ["**"] + # paths-ignore: + # - "README.md" + # - "LICENSE" + # - "**/README.md" + # - "**/docs/**" + # - "crates/vm/levm/**" # We run this in a separate workflow + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +env: + RUST_VERSION: 1.81.0 + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Rustup toolchain install + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ env.RUST_VERSION }} + components: rustfmt, clippy + + - name: Add Rust Cache + uses: Swatinem/rust-cache@v2 + + - name: Run cargo check + run: cargo check + + - name: Run cargo build + run: | + cargo build + + - name: Run cargo clippy + run: | + cargo clippy --all-targets --all-features --workspace --exclude ethrex-prover -- -D warnings + + - name: Run cargo fmt + run: | + cargo fmt --all -- --check + + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Rustup toolchain install + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ env.RUST_VERSION }} + + - name: Caching + uses: Swatinem/rust-cache@v2 + + - name: Download test vectors + run: | + make download-test-vectors + + - name: Run tests + run: | + make test diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml new file mode 100644 index 000000000..234470ca0 --- /dev/null +++ b/.github/workflows/integration.yaml @@ -0,0 +1,117 @@ +name: Integration Test +on: + push: + branches: ["main"] + merge_group: + pull_request: + branches: ["**"] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +env: + RUST_VERSION: 1.81.0 + +jobs: + docker_build: + name: Docker Build image + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build Docker image + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + load: true + tags: ethrex + outputs: type=docker,dest=/tmp/ethrex_image.tar + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ethrex_image + path: /tmp/ethrex_image.tar + + run-assertoor: + name: Assertoor - Stability Check + runs-on: ubuntu-latest + needs: [docker_build] + steps: + - uses: actions/checkout@v4 + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: ethrex_image + path: /tmp + + - name: Load image + run: | + docker load --input /tmp/ethrex_image.tar + + - name: Setup kurtosis testnet and run assertoor tests + uses: ethpandaops/kurtosis-assertoor-github-action@v1 + with: + kurtosis_version: "1.4.2" + ethereum_package_url: "github.com/lambdaclass/ethereum-package" + ethereum_package_branch: "ethrex-integration" + ethereum_package_args: "./test_data/network_params.yaml" + + run-hive: + name: Hive - ${{ matrix.name }} + runs-on: ubuntu-latest + needs: [docker_build] + strategy: + matrix: + include: + - simulation: rpc-compat + name: "Rpc Compat tests" + run_command: make run-hive-on-latest SIMULATION=ethereum/rpc-compat TEST_PATTERN="/eth_chainId|eth_getTransactionByBlockHashAndIndex|eth_getTransactionByBlockNumberAndIndex|eth_getCode|eth_getStorageAt|eth_call|eth_getTransactionByHash|eth_getBlockByHash|eth_getBlockByNumber|eth_createAccessList|eth_getBlockTransactionCountByNumber|eth_getBlockTransactionCountByHash|eth_getBlockReceipts|eth_getTransactionReceipt|eth_blobGasPrice|eth_blockNumber|ethGetTransactionCount|debug_getRawHeader|debug_getRawBlock|debug_getRawTransaction|debug_getRawReceipts|eth_estimateGas|eth_getBalance|eth_sendRawTransaction|eth_getProof|eth_getLogs" + - simulation: rpc-auth + name: "Engine Auth tests" + run_command: make run-hive-on-latest SIMULATION=ethereum/engine TEST_PATTERN="auth/engine-auth" + - simulation: discv4 + name: "Devp2p discv4 tests" + run_command: make run-hive-on-latest SIMULATION=devp2p TEST_PATTERN="discv4" + - simulation: snap + name: "Devp2p snap tests" + run_command: make run-hive-on-latest SIMULATION=devp2p TEST_PATTERN="/AccountRange|StorageRanges|ByteCodes|TrieNodes" + - simulation: eth + name: "Devp2p eth tests" + run_command: make run-hive-on-latest SIMULATION=devp2p TEST_PATTERN="eth/Status|GetBlockHeaders|SimultaneousRequests|SameRequestID|ZeroRequestID|GetBlockBodies|MaliciousHandshake|MaliciousStatus|Transaction|InvalidTxs" + - simulation: engine + name: "Engine Auth and EC tests" + run_command: make run-hive-on-latest SIMULATION=ethereum/engine TEST_PATTERN="engine-(auth|exchange-capabilities)/" + - simulation: engine-cancun + name: "Cancun Engine tests" + run_command: make run-hive-on-latest SIMULATION=ethereum/engine HIVE_EXTRA_ARGS="--sim.parallelism 4" TEST_PATTERN="engine-cancun/Blob Transactions On Block 1|Blob Transaction Ordering, Single|Blob Transaction Ordering, Multiple Accounts|Replace Blob Transactions|Parallel Blob Transactions|ForkchoiceUpdatedV3 Modifies Payload ID on Different Beacon Root|NewPayloadV3 After Cancun|NewPayloadV3 Versioned Hashes|Incorrect BlobGasUsed|Bad Hash|ParentHash equals BlockHash|RPC:|in ForkchoiceState|Unknown|Invalid PayloadAttributes|Unique|ForkchoiceUpdated Version on Payload Request|Re-Execute Payload|In-Order Consecutive Payload|Multiple New Payloads|Valid NewPayload->|NewPayload with|Payload Build after|Build Payload with|Invalid Missing Ancestor ReOrg, StateRoot|Re-Org Back to|Re-org to Previously|Safe Re-Org to Side Chain|Transaction Re-Org, Re-Org Back In|Re-Org Back into Canonical Chain, Depth=5|Suggested Fee Recipient Test|PrevRandao Opcode|Invalid NewPayload, [^R][^e]|Fork ID Genesis=0, Cancun=0|Fork ID Genesis=0, Cancun=1|Fork ID Genesis=1, Cancun=0|Fork ID Genesis=1, Cancun=2, Shanghai=2" + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: ethrex_image + path: /tmp + + - name: Load image + run: | + docker load --input /tmp/ethrex_image.tar + + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Rustup toolchain install + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ env.RUST_VERSION }} + + - name: Setup Go + uses: actions/setup-go@v3 + + - name: Run Hive Simulation + run: ${{ matrix.run_command }} diff --git a/Cargo.lock b/Cargo.lock index fed75926c..2497d9165 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -86,9 +86,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.20" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alloy-consensus" @@ -97,7 +97,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "705687d5bfd019fee57cf9e206b27b30a9a9617535d5590a02b171e813208f8e" dependencies = [ "alloy-eips", - "alloy-primitives 0.8.14", + "alloy-primitives 0.8.11", "alloy-rlp", "alloy-serde", "auto_impl", @@ -112,7 +112,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives 0.8.11", "alloy-rlp", "serde", ] @@ -123,7 +123,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives 0.8.11", "alloy-rlp", "k256", "serde", @@ -137,7 +137,7 @@ checksum = "6ffb906284a1e1f63c4607da2068c8197458a352d0b3e9796e67353d72a9be85" dependencies = [ "alloy-eip2930", "alloy-eip7702", - "alloy-primitives 0.8.14", + "alloy-primitives 0.8.11", "alloy-rlp", "alloy-serde", "c-kzg", @@ -149,11 +149,11 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.8.14" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac4b22b3e51cac09fd2adfcc73b55f447b4df669f983c13f7894ec82b607c63f" +checksum = "ded610181f3dad5810f6ff12d1a99994cf9b42d2fcb7709029352398a5da5ae6" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives 0.8.11", "alloy-sol-type-parser", "serde", "serde_json", @@ -167,7 +167,7 @@ checksum = "801492711d4392b2ccf5fc0bc69e299fa1aab15167d74dcaa9aab96a54f684bd" dependencies = [ "alloy-consensus", "alloy-eips", - "alloy-primitives 0.8.14", + "alloy-primitives 0.8.11", "alloy-serde", "serde", ] @@ -196,9 +196,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.14" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9db948902dfbae96a73c2fbf1f7abec62af034ab883e4c777c3fd29702bd6e2c" +checksum = "fd58d377699e6cfeab52c4a9d28bdc4ef37e2bd235ff2db525071fe37a2e9af5" dependencies = [ "alloy-rlp", "bytes", @@ -206,7 +206,7 @@ dependencies = [ "const-hex", "derive_more 1.0.0", "foldhash", - "hashbrown 0.15.2", + "hashbrown 0.15.1", "hex-literal", "indexmap 2.6.0", "itoa", @@ -241,7 +241,7 @@ checksum = "2b09cae092c27b6f1bde952653a22708691802e57bfef4a2973b80bea21efd3f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -253,7 +253,7 @@ dependencies = [ "alloy-consensus", "alloy-eips", "alloy-network-primitives", - "alloy-primitives 0.8.14", + "alloy-primitives 0.8.11", "alloy-rlp", "alloy-serde", "alloy-sol-types", @@ -269,12 +269,12 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "017cad3e5793c5613588c1f9732bcbad77e820ba7d0feaba3527749f856fdbc5" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives 0.8.11", "alloy-rpc-types-eth", "alloy-serde", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 1.0.68", ] [[package]] @@ -283,30 +283,30 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9dff0ab1cdd43ca001e324dc27ee0e8606bd2161d6623c63e0e0b8c4dfc13600" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives 0.8.11", "serde", "serde_json", ] [[package]] name = "alloy-sol-macro" -version = "0.8.14" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bfd7853b65a2b4f49629ec975fee274faf6dff15ab8894c620943398ef283c0" +checksum = "841eabaa4710f719fddbc24c95d386eae313f07e6da4babc25830ee37945be0c" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.14" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82ec42f342d9a9261699f8078e57a7a4fda8aaa73c1a212ed3987080e6a9cd13" +checksum = "6672337f19d837b9f7073c45853aeb528ed9f7dd6a4154ce683e9e5cb7794014" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -315,31 +315,31 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.8.14" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2c50e6a62ee2b4f7ab3c6d0366e5770a21cad426e109c2f40335a1b3aff3df" +checksum = "0dff37dd20bfb118b777c96eda83b2067f4226d2644c5cfa00187b3bc01770ba" dependencies = [ "const-hex", "dunce", "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "0.8.14" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac17c6e89a50fb4a758012e4b409d9a0ba575228e69b539fe37d7a1bd507ca4a" +checksum = "12c71028bfbfec210e24106a542aad3def7caf1a70e2c05710e92a98481980d3" dependencies = [ "serde", "winnow", @@ -347,12 +347,12 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.8.14" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9dc0fffe397aa17628160e16b89f704098bf3c9d74d5d369ebc239575936de5" +checksum = "aa828bb1b9a6dc52208fbb18084fb9ce2c30facc2bfda6a5d922349b4990354f" dependencies = [ "alloy-json-abi", - "alloy-primitives 0.8.14", + "alloy-primitives 0.8.11", "alloy-sol-macro", "const-hex", "serde", @@ -433,9 +433,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.93" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" +checksum = "74f37166d7d48a0284b99dd824694c26119c700b53bf0d1540cdb147dbdaaf13" [[package]] name = "approx" @@ -448,9 +448,9 @@ dependencies = [ [[package]] name = "arbitrary" -version = "1.4.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" +checksum = "775a8770d29db3dadcb858482cc240af7b2ffde4ac4de67d1d4955728103f0e2" dependencies = [ "derive_arbitrary", ] @@ -709,7 +709,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -747,7 +747,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -758,9 +758,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" -version = "0.7.9" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" dependencies = [ "async-trait", "axum-core", @@ -782,7 +782,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper 1.0.2", + "sync_wrapper 1.0.1", "tokio", "tower", "tower-layer", @@ -805,7 +805,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 1.0.2", + "sync_wrapper 1.0.1", "tower-layer", "tower-service", "tracing", @@ -813,26 +813,25 @@ dependencies = [ [[package]] name = "axum-extra" -version = "0.9.6" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c794b30c904f0a1c2fb7740f7df7f7972dfaa14ef6f57cb6178dc63e5dca2f04" +checksum = "73c3220b188aea709cf1b6c5f9b01c3bd936bb08bd2b5184a12b35ac8131b1f9" dependencies = [ "axum", "axum-core", "bytes", - "fastrand", "futures-util", "headers", "http", "http-body", "http-body-util", "mime", - "multer", "pin-project-lite", "serde", "tower", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -898,7 +897,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -982,22 +981,22 @@ dependencies = [ [[package]] name = "bonsai-sdk" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2c2e9e4e10cef33bd6ee36198f8f91b0fed0d0c265da9fe88e87b18f7e29192" +checksum = "94032d3eece78099780ba07605d8ba6943e47ee152f76d73f1682e2f40cf889c" dependencies = [ "duplicate", "maybe-async", "reqwest", "serde", - "thiserror 1.0.69", + "thiserror 1.0.68", ] [[package]] name = "borsh" -version = "1.5.3" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" dependencies = [ "borsh-derive", "cfg_aliases", @@ -1005,15 +1004,16 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.3" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", + "syn_derive", ] [[package]] @@ -1040,9 +1040,9 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "bytemuck" -version = "1.20.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" dependencies = [ "bytemuck_derive", ] @@ -1055,7 +1055,7 @@ checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -1066,9 +1066,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.9.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" dependencies = [ "serde", ] @@ -1099,9 +1099,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.9" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" dependencies = [ "serde", ] @@ -1117,14 +1117,14 @@ dependencies = [ "semver 1.0.23", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 1.0.68", ] [[package]] name = "cc" -version = "1.2.1" +version = "1.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" +checksum = "0f57c4b4da2a9d619dd035f27316d7a426305b75be93d09e92f2b9229c34feaf" dependencies = [ "jobserver", "libc", @@ -1236,9 +1236,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.21" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -1246,9 +1246,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.21" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -1258,11 +1258,11 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.38" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9647a559c112175f17cf724dc72d3645680a883c58481332779192b0d8e7a01" +checksum = "11611dca53440593f38e6b25ec629de50b14cdfa63adc0fb856115a2c6d97595" dependencies = [ - "clap 4.5.21", + "clap 4.5.20", ] [[package]] @@ -1274,14 +1274,14 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] name = "clap_lex" -version = "0.7.3" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "colorchoice" @@ -1323,9 +1323,9 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.14.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0485bab839b018a8f1723fc5391819fea5f8f0f32288ef8a735fd096b6160c" +checksum = "0121754e84117e65f9d90648ee6aa4882a6e63110307ab73967a4c5e7e69e586" dependencies = [ "cfg-if", "cpufeatures", @@ -1384,9 +1384,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.16" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -1560,7 +1560,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -1571,7 +1571,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -1641,13 +1641,13 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.4.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" +checksum = "d475dfebcb4854d596b17b09f477616f80f17a550517f2b3615d8c205d5c802b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -1660,7 +1660,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.1", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -1680,7 +1680,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", "unicode-xid", ] @@ -1699,7 +1699,7 @@ dependencies = [ "console", "shell-words", "tempfile", - "thiserror 1.0.69", + "thiserror 1.0.68", "zeroize", ] @@ -1782,7 +1782,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -1807,7 +1807,7 @@ dependencies = [ "futures", "rand 0.8.5", "reqwest", - "thiserror 1.0.69", + "thiserror 1.0.68", "tokio", ] @@ -1868,7 +1868,7 @@ name = "ef_tests-levm" version = "0.1.0" dependencies = [ "bytes", - "clap 4.5.21", + "clap 4.5.20", "clap_complete", "colored", "ethrex-blockchain", @@ -1951,7 +1951,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -1994,12 +1994,12 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.10" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2042,7 +2042,7 @@ dependencies = [ "anyhow", "bytes", "cfg-if", - "clap 4.5.21", + "clap 4.5.20", "directories", "ethrex-blockchain", "ethrex-core", @@ -2078,7 +2078,7 @@ dependencies = [ "k256", "serde_json", "sha3", - "thiserror 1.0.69", + "thiserror 1.0.68", "tracing", ] @@ -2102,7 +2102,7 @@ dependencies = [ "serde", "serde_json", "sha3", - "thiserror 1.0.69", + "thiserror 1.0.68", "tinyvec", ] @@ -2121,7 +2121,7 @@ dependencies = [ "serde", "serde_json", "sha2", - "thiserror 1.0.69", + "thiserror 1.0.68", "tokio", "tracing", ] @@ -2150,7 +2150,7 @@ dependencies = [ "secp256k1", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 1.0.68", "tokio", "tokio-util", "tracing", @@ -2196,7 +2196,7 @@ dependencies = [ "serde_json", "sha3", "snap", - "thiserror 1.0.69", + "thiserror 1.0.68", "tokio", "tracing", ] @@ -2235,7 +2235,7 @@ dependencies = [ "hex-literal", "lazy_static", "snap", - "thiserror 1.0.69", + "thiserror 1.0.68", "tinyvec", ] @@ -2277,7 +2277,7 @@ dependencies = [ "itertools 0.13.0", "keccak-hash 0.11.0", "secp256k1", - "thiserror 1.0.69", + "thiserror 1.0.68", "tokio", ] @@ -2297,7 +2297,7 @@ dependencies = [ "serde", "serde_json", "sha3", - "thiserror 1.0.69", + "thiserror 1.0.68", "tracing", ] @@ -2322,7 +2322,7 @@ dependencies = [ "sha3", "smallvec", "tempdir", - "thiserror 1.0.69", + "thiserror 1.0.68", "tracing", ] @@ -2345,7 +2345,7 @@ dependencies = [ "revm-inspectors", "revm-primitives 10.0.0", "serde", - "thiserror 1.0.69", + "thiserror 1.0.68", "tracing", ] @@ -2363,7 +2363,7 @@ dependencies = [ "lazy_static", "secp256k1", "spinoff", - "thiserror 1.0.69", + "thiserror 1.0.68", "tokio", "tracing", ] @@ -2373,7 +2373,7 @@ name = "ethrex_l2_cli" version = "0.1.0" dependencies = [ "bytes", - "clap 4.5.21", + "clap 4.5.20", "clap_complete", "colored", "dialoguer", @@ -2424,15 +2424,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2" dependencies = [ "bit-set", - "regex-automata 0.4.9", + "regex-automata 0.4.8", "regex-syntax 0.8.5", ] [[package]] name = "fastrand" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fastrlp" @@ -2497,9 +2497,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.35" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "miniz_oxide", @@ -2544,7 +2544,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -2636,7 +2636,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -2733,7 +2733,7 @@ dependencies = [ "aho-corasick 1.1.3", "bstr", "log", - "regex-automata 0.4.9", + "regex-automata 0.4.8", "regex-syntax 0.8.5", ] @@ -2785,9 +2785,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.7" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", "bytes", @@ -2829,9 +2829,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" dependencies = [ "foldhash", "serde", @@ -3010,9 +3010,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "1.5.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -3220,7 +3220,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -3260,7 +3260,7 @@ dependencies = [ "globset", "log", "memchr", - "regex-automata 0.4.9", + "regex-automata 0.4.8", "same-file", "walkdir", "winapi-util", @@ -3295,13 +3295,13 @@ dependencies = [ [[package]] name = "impl-trait-for-tuples" -version = "0.2.3" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 1.0.109", ] [[package]] @@ -3334,7 +3334,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.2", + "hashbrown 0.15.1", "serde", ] @@ -3394,9 +3394,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.14" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" @@ -3517,7 +3517,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -3531,9 +3531,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.166" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ccc108bbc0b1331bd061864e7cd823c0cab660bbe6970e66e2c0614decde36" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libloading" @@ -3569,7 +3569,7 @@ dependencies = [ "parking_lot 0.12.3", "sealed", "tempfile", - "thiserror 1.0.69", + "thiserror 1.0.68", ] [[package]] @@ -3588,7 +3588,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc0bda45ed5b3a2904262c1bb91e526127aa70e7ef3758aba2ef93cf896b9b58" dependencies = [ - "clap 4.5.21", + "clap 4.5.20", "escape8259", "termcolor", "threadpool", @@ -3602,9 +3602,9 @@ checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "litemap" -version = "0.7.4" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" [[package]] name = "loc" @@ -3622,7 +3622,7 @@ checksum = "3669cf5561f8d27e8fc84cc15e58350e70f557d4d65f70e3154e54cd2f8e1782" dependencies = [ "libc", "neli", - "thiserror 1.0.69", + "thiserror 1.0.68", "windows-sys 0.59.0", ] @@ -3690,7 +3690,7 @@ checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -3773,23 +3773,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "multer" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" -dependencies = [ - "bytes", - "encoding_rs", - "futures-util", - "http", - "httparse", - "memchr", - "mime", - "spin", - "version_check", -] - [[package]] name = "native-tls" version = "0.2.12" @@ -4046,7 +4029,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -4090,29 +4073,28 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.7.0" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be4817d39f3272f69c59fe05d0535ae6456c2dc2fa1ba02910296c7e0a5c590" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", "bitvec", "byte-slice-cast", "impl-trait-for-tuples", "parity-scale-codec-derive", - "rustversion", "serde", ] [[package]] name = "parity-scale-codec-derive" -version = "3.7.0" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8781a75c6205af67215f382092b6e0a4ff3734798523e69073d4bcd294ec767b" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.89", + "syn 1.0.109", ] [[package]] @@ -4201,7 +4183,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ "memchr", - "thiserror 1.0.69", + "thiserror 1.0.68", "ucd-trie", ] @@ -4225,7 +4207,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -4307,15 +4289,15 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "portable-atomic" -version = "1.10.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "portable-atomic-util" -version = "0.2.4" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +checksum = "90a7d5beecc52a491b54d6dd05c7a45ba1801666a5baad9fdbfc6fef8d2d206c" dependencies = [ "portable-atomic", ] @@ -4410,14 +4392,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -4462,7 +4444,7 @@ dependencies = [ "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -4487,9 +4469,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quinn" -version = "0.11.6" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" dependencies = [ "bytes", "pin-project-lite", @@ -4498,29 +4480,26 @@ dependencies = [ "rustc-hash 2.0.0", "rustls", "socket2", - "thiserror 2.0.3", + "thiserror 1.0.68", "tokio", "tracing", ] [[package]] name = "quinn-proto" -version = "0.11.9" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" dependencies = [ "bytes", - "getrandom", "rand 0.8.5", "ring", "rustc-hash 2.0.0", "rustls", - "rustls-pki-types", "slab", - "thiserror 2.0.3", + "thiserror 1.0.68", "tinyvec", "tracing", - "web-time", ] [[package]] @@ -4681,7 +4660,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", - "thiserror 1.0.69", + "thiserror 1.0.68", ] [[package]] @@ -4692,7 +4671,7 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick 1.1.3", "memchr", - "regex-automata 0.4.9", + "regex-automata 0.4.8", "regex-syntax 0.8.5", ] @@ -4707,9 +4686,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick 1.1.3", "memchr", @@ -4772,7 +4751,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.2", + "sync_wrapper 1.0.1", "system-configuration", "tokio", "tokio-native-tls", @@ -4824,7 +4803,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43c44af0bf801f48d25f7baf25cf72aff4c02d610f83b428175228162fef0246" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives 0.8.11", "alloy-rpc-types-eth", "alloy-rpc-types-trace", "alloy-sol-types", @@ -4832,7 +4811,7 @@ dependencies = [ "colorchoice", "revm 14.0.3", "serde_json", - "thiserror 1.0.69", + "thiserror 1.0.68", ] [[package]] @@ -4922,7 +4901,7 @@ checksum = "6f1525851a03aff9a9d6a1d018b414d76252d6802ab54695b27093ecd7e7a101" dependencies = [ "alloy-eip2930", "alloy-eip7702", - "alloy-primitives 0.8.14", + "alloy-primitives 0.8.11", "auto_impl", "bitflags 2.6.0", "bitvec", @@ -4981,9 +4960,9 @@ dependencies = [ [[package]] name = "risc0-binfmt" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9749a29181f87bebd2580b39b3ec0368daaaefbb30429ff429383a7ade360321" +checksum = "543230f7117ce0e6b92b4797fbb3da722575973258cc38a48e28af8d3cf3a26d" dependencies = [ "anyhow", "borsh", @@ -4991,15 +4970,14 @@ dependencies = [ "risc0-zkp", "risc0-zkvm-platform", "serde", - "syn 2.0.89", "tracing", ] [[package]] name = "risc0-build" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc684382e24a8c91331040c33f1c789c755a5c1b0b8a32fefc1730ca36dd7072" +checksum = "c328bea983ffed4cf3721c92b06fa5076cc38c9e326e1488a9ae792e67a054c7" dependencies = [ "anyhow", "cargo_metadata", @@ -5016,9 +4994,9 @@ dependencies = [ [[package]] name = "risc0-build-kernel" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d9e660eee96e15354259604d6dca3ea809a759e991b606d8db7b599916848b" +checksum = "b186137d4b2b16f7fd017491032e888c56f55ba539812453adc7d3639eaf0113" dependencies = [ "cc", "directories", @@ -5032,9 +5010,9 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90745aa984e4eb404f0e0eb6a7ab2e956d963a0dad751fb89ef138cc6e4e3afc" +checksum = "436c762db677faf2cd616c55a69012d6b4f46c426b7d553c1b3d717e0c7e9438" dependencies = [ "anyhow", "bytemuck", @@ -5058,9 +5036,9 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion-sys" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd552b5590bd0c7030467c62defe2409aabd303d2dd6ff16d6f59421ae0b37a" +checksum = "e632f0cba360b49ab69755b49eca1e6c33bd2302d5eec5693f4b3202e6cb3334" dependencies = [ "glob", "risc0-build-kernel", @@ -5071,9 +5049,9 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "079b2c6789c6cbfee3500aff69108f853bdfe13fd0071ac1fbe3cbf7d0866420" +checksum = "21f81638d4349eb5a816f3fd6ea12b314007572fc63d45cdb83891bed64e2a2a" dependencies = [ "anyhow", "bytemuck", @@ -5099,9 +5077,9 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im-sys" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9844bd07c18aa6a263259d0c693e54df815a9995760270ff5b5351c5f81cfc" +checksum = "b3eea90914f44cd1227a23b40c2c9d12bee9923a3a7566ef0e6b5b3f3a85db9e" dependencies = [ "glob", "risc0-build-kernel", @@ -5112,9 +5090,9 @@ dependencies = [ [[package]] name = "risc0-core" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd39ba3f881fcf0197464bde04391602dbbb886f87fddc372a68d79aa9de9d9" +checksum = "1714b8968a5e4583a15018dc2ae95878c76f4cdbc643268a34670fde5b08252a" dependencies = [ "bytemuck", "nvtx", @@ -5124,9 +5102,9 @@ dependencies = [ [[package]] name = "risc0-groth16" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c86b43367c2f29ce1a0ee5730f0af6892e5b6197c8dded614c7ff1068afcd302" +checksum = "e5f11beecdcabeac264fb868e0b5db22c7e2db5fa2ce68fd482d8ab9ffb88e5d" dependencies = [ "anyhow", "ark-bn254", @@ -5148,11 +5126,10 @@ dependencies = [ [[package]] name = "risc0-sys" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abc7596a2ffa5e75e5a886fd95bccb0d593e769cdd2c43b83dcf2ac089423060" +checksum = "2a3afe2e8e95cec6317a75bb6eb13519f643e22c53c67a22a31c355117b7c447" dependencies = [ - "anyhow", "cc", "cust", "risc0-build-kernel", @@ -5161,9 +5138,9 @@ dependencies = [ [[package]] name = "risc0-zkp" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b5525e1f2abaa5954579e50df0d6a5d01b456b0ac6aae0e87cf92f073e12f7" +checksum = "285aa3993827b4a646d70e68240e138f71574680a02d2e97ad30b1db80efda80" dependencies = [ "anyhow", "blake2", @@ -5192,9 +5169,9 @@ dependencies = [ [[package]] name = "risc0-zkvm" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de11138ba073e43ec494d15728baeddbf3155fc95d5710000077eb5f7f345070" +checksum = "614fad8046130321e3be9ca3a36d9edad6ff4c538549ae191ec4d82576bb3893" dependencies = [ "addr2line 0.22.0", "anyhow", @@ -5231,9 +5208,9 @@ dependencies = [ [[package]] name = "risc0-zkvm-platform" -version = "1.1.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57748f1916078b24faed0bc620aa6dfc386e066e6f75a710ec0ac68f7126e7d7" +checksum = "b6acf0b0d7a55578f892e0460ed1f2ca06d0380e32440531d80ca82530d41272" dependencies = [ "bytemuck", "getrandom", @@ -5335,9 +5312,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.41" +version = "0.38.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" +checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" dependencies = [ "bitflags 2.6.0", "errno", @@ -5348,9 +5325,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.19" +version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ "once_cell", "ring", @@ -5374,9 +5351,6 @@ name = "rustls-pki-types" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" -dependencies = [ - "web-time", -] [[package]] name = "rustls-webpki" @@ -5435,9 +5409,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.11.6" +version = "2.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "346a3b32eba2640d17a9cb5927056b08f3de90f65b72fe09402c2ad07d684d0b" +checksum = "1aa7ffc1c0ef49b0452c6e2986abf2b07743320641ffd5fc63d552458e3b779b" dependencies = [ "cfg-if", "derive_more 1.0.0", @@ -5447,21 +5421,21 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.11.6" +version = "2.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6630024bf739e2179b91fb424b28898baf819414262c5d376677dbff1fe7ebf" +checksum = "46385cc24172cf615450267463f937c10072516359b3ff1cb24228a4a08bf951" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] name = "schannel" -version = "0.1.27" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ "windows-sys 0.59.0", ] @@ -5481,7 +5455,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -5532,9 +5506,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -5560,38 +5534,38 @@ dependencies = [ [[package]] name = "semver-parser" -version = "0.10.3" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9900206b54a3527fdc7b8a938bffd94a568bac4f4aa8113b209df75a09c0dec2" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" dependencies = [ "pest", ] [[package]] name = "serde" -version = "1.0.215" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "indexmap 2.6.0", "itoa", @@ -5658,7 +5632,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -5757,7 +5731,7 @@ checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ "num-bigint 0.4.6", "num-traits", - "thiserror 1.0.69", + "thiserror 1.0.68", "time", ] @@ -5810,9 +5784,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.8" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -5876,9 +5850,9 @@ dependencies = [ [[package]] name = "sppark" -version = "0.1.10" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac5090642d9ae844edd9a5c23cb1fce6724ca88d50c55178ee8d1f656df5826b" +checksum = "c8071dd7b75a6442c8a5031ed2eb764f05c92b45e18c33832d3f8f297cbb9332" dependencies = [ "cc", "which 4.4.2", @@ -5891,7 +5865,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" dependencies = [ "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -5956,9 +5930,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.89" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -5967,14 +5941,26 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.14" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0523f59468a2696391f2a772edc089342aacd53c3caa2ac3264e598edf119b" +checksum = "edf42e81491fb8871b74df3d222c64ae8cbc1269ea509fa768a3ed3e1b0ac8cb" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", +] + +[[package]] +name = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] @@ -5985,9 +5971,9 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sync_wrapper" -version = "1.0.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" dependencies = [ "futures-core", ] @@ -6000,7 +5986,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -6042,9 +6028,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.14.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", @@ -6105,11 +6091,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.69" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" dependencies = [ - "thiserror-impl 1.0.69", + "thiserror-impl 1.0.68", ] [[package]] @@ -6123,13 +6109,13 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "1.0.69" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -6140,7 +6126,7 @@ checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -6281,7 +6267,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -6393,9 +6379,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "log", "pin-project-lite", @@ -6405,20 +6391,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.28" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -6511,7 +6497,7 @@ checksum = "70b20a22c42c8f1cd23ce5e34f165d4d37038f5b663ad20fb6adbdf029172483" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -6602,9 +6588,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.14" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-width" @@ -6626,9 +6612,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.4" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", @@ -6745,7 +6731,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -6779,7 +6765,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6813,21 +6799,11 @@ 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.26.7" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" dependencies = [ "rustls-pki-types", ] @@ -7112,9 +7088,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.7.5" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" dependencies = [ "serde", "stable_deref_trait", @@ -7124,13 +7100,13 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.5" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", "synstructure", ] @@ -7152,27 +7128,27 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] name = "zerofrom" -version = "0.1.5" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.5" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", "synstructure", ] @@ -7193,7 +7169,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] @@ -7215,14 +7191,14 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.87", ] [[package]] name = "zip" -version = "2.2.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d52293fc86ea7cf13971b3bb81eb21683636e7ae24c729cdaf1b7c4157a352" +checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" dependencies = [ "arbitrary", "crc32fast", @@ -7231,7 +7207,7 @@ dependencies = [ "flate2", "indexmap 2.6.0", "memchr", - "thiserror 2.0.3", + "thiserror 1.0.68", "zopfli", ] @@ -7247,7 +7223,7 @@ dependencies = [ "risc0-build", "serde", "serde_with", - "thiserror 1.0.69", + "thiserror 1.0.68", ] [[package]] From f1d02c86210bc24cb80480cf28cf09a1d953cca7 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Thu, 28 Nov 2024 17:06:11 -0300 Subject: [PATCH 20/41] Don't increase balance in coinbase fee if it's 0 --- crates/vm/levm/src/vm.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index fb00a69ee..011ee9a6f 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -543,13 +543,9 @@ impl VM { .checked_mul(priority_fee_per_gas) .ok_or(VMError::BalanceOverflow)?; - self.increase_account_balance(coinbase_address, coinbase_fee)?; - - /* - if coinbase_fee.is_zero() { - self.cache.accounts.remove(&coinbase_address); - } - */ + if !coinbase_fee.is_zero() { + self.increase_account_balance(coinbase_address, coinbase_fee)?; + } report.new_state.clone_from(&self.cache); From f7ae0a7d30ab8d71f6b921331199cdef981f83e2 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Thu, 28 Nov 2024 17:11:50 -0300 Subject: [PATCH 21/41] fmt changes --- crates/vm/levm/src/vm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 011ee9a6f..e7c6c738d 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -545,7 +545,7 @@ impl VM { if !coinbase_fee.is_zero() { self.increase_account_balance(coinbase_address, coinbase_fee)?; - } + } report.new_state.clone_from(&self.cache); From 5a52dbfcf148e31a9e5d26de4d8e038674cbe7d9 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Fri, 29 Nov 2024 11:01:11 -0300 Subject: [PATCH 22/41] Fix selfdestruct behavior --- crates/vm/levm/src/opcode_handlers/system.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/crates/vm/levm/src/opcode_handlers/system.rs b/crates/vm/levm/src/opcode_handlers/system.rs index d3a34c03f..914a5d679 100644 --- a/crates/vm/levm/src/opcode_handlers/system.rs +++ b/crates/vm/levm/src/opcode_handlers/system.rs @@ -501,10 +501,6 @@ impl VM { .insert(current_call_frame.to); } - let (target_account_info, target_account_is_cold) = self.access_account(target_address); - - self.increase_account_balance(target_address, target_account_info.balance)?; - // Don't like to consume the gas after the operation but i need to don't cache both at the same time self.increase_consumed_gas( current_call_frame, From 0cf5c1bc9a6e640321eb3a4489dba6f50e12d529 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Fri, 29 Nov 2024 11:01:46 -0300 Subject: [PATCH 23/41] Add default touched accounts in call --- Cargo.lock | 16 +++++++++------- crates/vm/levm/src/opcode_handlers/system.rs | 8 +++++++- crates/vm/levm/src/vm.rs | 2 +- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2497d9165..86813c2d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2187,6 +2187,7 @@ dependencies = [ "ethrex-core", "ethrex-rlp", "ethrex-storage", + "ethrex-trie", "hex", "hex-literal", "hmac", @@ -3610,7 +3611,8 @@ checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" name = "loc" version = "0.1.0" dependencies = [ - "colored", + "serde", + "serde_json", "tokei", ] @@ -5543,18 +5545,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.214" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.214" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", @@ -5563,9 +5565,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "indexmap 2.6.0", "itoa", diff --git a/crates/vm/levm/src/opcode_handlers/system.rs b/crates/vm/levm/src/opcode_handlers/system.rs index 914a5d679..3c00b4e2c 100644 --- a/crates/vm/levm/src/opcode_handlers/system.rs +++ b/crates/vm/levm/src/opcode_handlers/system.rs @@ -493,7 +493,13 @@ impl VM { let (current_account_info, _current_account_is_cold) = self.access_account(current_call_frame.to); - self.decrease_account_balance(current_call_frame.to, current_account_info.balance)?; + let current_account_balance = current_account_info.balance; + + self.decrease_account_balance(current_call_frame.to, current_account_balance)?; + + let (target_account_info, target_account_is_cold) = self.access_account(target_address); + + self.increase_account_balance(target_address, current_account_balance)?; if self.tx_kind == TxKind::Create { self.accrued_substate diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index f867640e5..1eca17cb9 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -117,7 +117,7 @@ impl VM { accrued_substate: Substate::default(), cache, tx_kind: to, - touched_accounts: HashSet::new(), + touched_accounts: default_touched_accounts, touched_storage_slots: HashMap::new(), }) } From e97e3b8c078ef76e18d8d1560663dc4c74c9a69f Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Fri, 29 Nov 2024 11:31:08 -0300 Subject: [PATCH 24/41] Fix balance decrease --- crates/vm/levm/src/vm.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 1eca17cb9..c0c60d64d 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -655,14 +655,14 @@ impl VM { ret_size: usize, ) -> Result { let (sender_account_info, _address_was_cold) = - self.access_account(current_call_frame.msg_sender); + self.access_account(msg_sender); if sender_account_info.balance < value { current_call_frame.stack.push(U256::from(REVERT_FOR_CALL))?; return Ok(OpcodeSuccess::Continue); } - self.decrease_account_balance(current_call_frame.msg_sender, value)?; + self.decrease_account_balance(msg_sender, value)?; self.increase_account_balance(to, value)?; let (code_account_info, _address_was_cold) = self.access_account(code_address); From 2efb821f99f18edb98a6da2d08e5473174dff88a Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Fri, 29 Nov 2024 11:57:52 -0300 Subject: [PATCH 25/41] fmt --- crates/vm/levm/src/vm.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index c0c60d64d..a16073a0c 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -654,8 +654,7 @@ impl VM { ret_offset: usize, ret_size: usize, ) -> Result { - let (sender_account_info, _address_was_cold) = - self.access_account(msg_sender); + let (sender_account_info, _address_was_cold) = self.access_account(msg_sender); if sender_account_info.balance < value { current_call_frame.stack.push(U256::from(REVERT_FOR_CALL))?; From 65fee841cbc4316643bbb039383070c922575a7f Mon Sep 17 00:00:00 2001 From: ilitteri Date: Fri, 29 Nov 2024 12:48:08 -0300 Subject: [PATCH 26/41] Revert "Mannually change CI things" This reverts commit ceb79b01548b4d461a8b079b5fdc445ac30e5b1b. --- .github/workflows/ci.yaml | 75 ---- .github/workflows/integration.yaml | 117 ------ Cargo.lock | 586 +++++++++++++++-------------- 3 files changed, 305 insertions(+), 473 deletions(-) delete mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/integration.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 8e3cf7a5f..000000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,75 +0,0 @@ -name: CI -on: - push: - branches: ["main"] - merge_group: - pull_request: - branches: ["**"] - # paths-ignore: - # - "README.md" - # - "LICENSE" - # - "**/README.md" - # - "**/docs/**" - # - "crates/vm/levm/**" # We run this in a separate workflow - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -env: - RUST_VERSION: 1.81.0 - -jobs: - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Rustup toolchain install - uses: dtolnay/rust-toolchain@stable - with: - toolchain: ${{ env.RUST_VERSION }} - components: rustfmt, clippy - - - name: Add Rust Cache - uses: Swatinem/rust-cache@v2 - - - name: Run cargo check - run: cargo check - - - name: Run cargo build - run: | - cargo build - - - name: Run cargo clippy - run: | - cargo clippy --all-targets --all-features --workspace --exclude ethrex-prover -- -D warnings - - - name: Run cargo fmt - run: | - cargo fmt --all -- --check - - test: - name: Test - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Rustup toolchain install - uses: dtolnay/rust-toolchain@stable - with: - toolchain: ${{ env.RUST_VERSION }} - - - name: Caching - uses: Swatinem/rust-cache@v2 - - - name: Download test vectors - run: | - make download-test-vectors - - - name: Run tests - run: | - make test diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml deleted file mode 100644 index 234470ca0..000000000 --- a/.github/workflows/integration.yaml +++ /dev/null @@ -1,117 +0,0 @@ -name: Integration Test -on: - push: - branches: ["main"] - merge_group: - pull_request: - branches: ["**"] - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -env: - RUST_VERSION: 1.81.0 - -jobs: - docker_build: - name: Docker Build image - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: ./Dockerfile - load: true - tags: ethrex - outputs: type=docker,dest=/tmp/ethrex_image.tar - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ethrex_image - path: /tmp/ethrex_image.tar - - run-assertoor: - name: Assertoor - Stability Check - runs-on: ubuntu-latest - needs: [docker_build] - steps: - - uses: actions/checkout@v4 - - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: ethrex_image - path: /tmp - - - name: Load image - run: | - docker load --input /tmp/ethrex_image.tar - - - name: Setup kurtosis testnet and run assertoor tests - uses: ethpandaops/kurtosis-assertoor-github-action@v1 - with: - kurtosis_version: "1.4.2" - ethereum_package_url: "github.com/lambdaclass/ethereum-package" - ethereum_package_branch: "ethrex-integration" - ethereum_package_args: "./test_data/network_params.yaml" - - run-hive: - name: Hive - ${{ matrix.name }} - runs-on: ubuntu-latest - needs: [docker_build] - strategy: - matrix: - include: - - simulation: rpc-compat - name: "Rpc Compat tests" - run_command: make run-hive-on-latest SIMULATION=ethereum/rpc-compat TEST_PATTERN="/eth_chainId|eth_getTransactionByBlockHashAndIndex|eth_getTransactionByBlockNumberAndIndex|eth_getCode|eth_getStorageAt|eth_call|eth_getTransactionByHash|eth_getBlockByHash|eth_getBlockByNumber|eth_createAccessList|eth_getBlockTransactionCountByNumber|eth_getBlockTransactionCountByHash|eth_getBlockReceipts|eth_getTransactionReceipt|eth_blobGasPrice|eth_blockNumber|ethGetTransactionCount|debug_getRawHeader|debug_getRawBlock|debug_getRawTransaction|debug_getRawReceipts|eth_estimateGas|eth_getBalance|eth_sendRawTransaction|eth_getProof|eth_getLogs" - - simulation: rpc-auth - name: "Engine Auth tests" - run_command: make run-hive-on-latest SIMULATION=ethereum/engine TEST_PATTERN="auth/engine-auth" - - simulation: discv4 - name: "Devp2p discv4 tests" - run_command: make run-hive-on-latest SIMULATION=devp2p TEST_PATTERN="discv4" - - simulation: snap - name: "Devp2p snap tests" - run_command: make run-hive-on-latest SIMULATION=devp2p TEST_PATTERN="/AccountRange|StorageRanges|ByteCodes|TrieNodes" - - simulation: eth - name: "Devp2p eth tests" - run_command: make run-hive-on-latest SIMULATION=devp2p TEST_PATTERN="eth/Status|GetBlockHeaders|SimultaneousRequests|SameRequestID|ZeroRequestID|GetBlockBodies|MaliciousHandshake|MaliciousStatus|Transaction|InvalidTxs" - - simulation: engine - name: "Engine Auth and EC tests" - run_command: make run-hive-on-latest SIMULATION=ethereum/engine TEST_PATTERN="engine-(auth|exchange-capabilities)/" - - simulation: engine-cancun - name: "Cancun Engine tests" - run_command: make run-hive-on-latest SIMULATION=ethereum/engine HIVE_EXTRA_ARGS="--sim.parallelism 4" TEST_PATTERN="engine-cancun/Blob Transactions On Block 1|Blob Transaction Ordering, Single|Blob Transaction Ordering, Multiple Accounts|Replace Blob Transactions|Parallel Blob Transactions|ForkchoiceUpdatedV3 Modifies Payload ID on Different Beacon Root|NewPayloadV3 After Cancun|NewPayloadV3 Versioned Hashes|Incorrect BlobGasUsed|Bad Hash|ParentHash equals BlockHash|RPC:|in ForkchoiceState|Unknown|Invalid PayloadAttributes|Unique|ForkchoiceUpdated Version on Payload Request|Re-Execute Payload|In-Order Consecutive Payload|Multiple New Payloads|Valid NewPayload->|NewPayload with|Payload Build after|Build Payload with|Invalid Missing Ancestor ReOrg, StateRoot|Re-Org Back to|Re-org to Previously|Safe Re-Org to Side Chain|Transaction Re-Org, Re-Org Back In|Re-Org Back into Canonical Chain, Depth=5|Suggested Fee Recipient Test|PrevRandao Opcode|Invalid NewPayload, [^R][^e]|Fork ID Genesis=0, Cancun=0|Fork ID Genesis=0, Cancun=1|Fork ID Genesis=1, Cancun=0|Fork ID Genesis=1, Cancun=2, Shanghai=2" - steps: - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - name: ethrex_image - path: /tmp - - - name: Load image - run: | - docker load --input /tmp/ethrex_image.tar - - - name: Checkout sources - uses: actions/checkout@v3 - - - name: Rustup toolchain install - uses: dtolnay/rust-toolchain@stable - with: - toolchain: ${{ env.RUST_VERSION }} - - - name: Setup Go - uses: actions/setup-go@v3 - - - name: Run Hive Simulation - run: ${{ matrix.run_command }} diff --git a/Cargo.lock b/Cargo.lock index 012b441c7..2c2656561 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -86,9 +86,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" [[package]] name = "alloy-consensus" @@ -97,7 +97,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "705687d5bfd019fee57cf9e206b27b30a9a9617535d5590a02b171e813208f8e" dependencies = [ "alloy-eips", - "alloy-primitives 0.8.11", + "alloy-primitives 0.8.14", "alloy-rlp", "alloy-serde", "auto_impl", @@ -112,7 +112,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" dependencies = [ - "alloy-primitives 0.8.11", + "alloy-primitives 0.8.14", "alloy-rlp", "serde", ] @@ -123,7 +123,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" dependencies = [ - "alloy-primitives 0.8.11", + "alloy-primitives 0.8.14", "alloy-rlp", "k256", "serde", @@ -137,7 +137,7 @@ checksum = "6ffb906284a1e1f63c4607da2068c8197458a352d0b3e9796e67353d72a9be85" dependencies = [ "alloy-eip2930", "alloy-eip7702", - "alloy-primitives 0.8.11", + "alloy-primitives 0.8.14", "alloy-rlp", "alloy-serde", "c-kzg", @@ -149,11 +149,11 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.8.11" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded610181f3dad5810f6ff12d1a99994cf9b42d2fcb7709029352398a5da5ae6" +checksum = "ac4b22b3e51cac09fd2adfcc73b55f447b4df669f983c13f7894ec82b607c63f" dependencies = [ - "alloy-primitives 0.8.11", + "alloy-primitives 0.8.14", "alloy-sol-type-parser", "serde", "serde_json", @@ -167,7 +167,7 @@ checksum = "801492711d4392b2ccf5fc0bc69e299fa1aab15167d74dcaa9aab96a54f684bd" dependencies = [ "alloy-consensus", "alloy-eips", - "alloy-primitives 0.8.11", + "alloy-primitives 0.8.14", "alloy-serde", "serde", ] @@ -196,9 +196,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.11" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd58d377699e6cfeab52c4a9d28bdc4ef37e2bd235ff2db525071fe37a2e9af5" +checksum = "9db948902dfbae96a73c2fbf1f7abec62af034ab883e4c777c3fd29702bd6e2c" dependencies = [ "alloy-rlp", "bytes", @@ -206,7 +206,7 @@ dependencies = [ "const-hex", "derive_more 1.0.0", "foldhash", - "hashbrown 0.15.1", + "hashbrown 0.15.2", "hex-literal", "indexmap 2.6.0", "itoa", @@ -241,7 +241,7 @@ checksum = "2b09cae092c27b6f1bde952653a22708691802e57bfef4a2973b80bea21efd3f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -253,7 +253,7 @@ dependencies = [ "alloy-consensus", "alloy-eips", "alloy-network-primitives", - "alloy-primitives 0.8.11", + "alloy-primitives 0.8.14", "alloy-rlp", "alloy-serde", "alloy-sol-types", @@ -269,12 +269,12 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "017cad3e5793c5613588c1f9732bcbad77e820ba7d0feaba3527749f856fdbc5" dependencies = [ - "alloy-primitives 0.8.11", + "alloy-primitives 0.8.14", "alloy-rpc-types-eth", "alloy-serde", "serde", "serde_json", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -283,30 +283,30 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9dff0ab1cdd43ca001e324dc27ee0e8606bd2161d6623c63e0e0b8c4dfc13600" dependencies = [ - "alloy-primitives 0.8.11", + "alloy-primitives 0.8.14", "serde", "serde_json", ] [[package]] name = "alloy-sol-macro" -version = "0.8.10" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841eabaa4710f719fddbc24c95d386eae313f07e6da4babc25830ee37945be0c" +checksum = "3bfd7853b65a2b4f49629ec975fee274faf6dff15ab8894c620943398ef283c0" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.10" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6672337f19d837b9f7073c45853aeb528ed9f7dd6a4154ce683e9e5cb7794014" +checksum = "82ec42f342d9a9261699f8078e57a7a4fda8aaa73c1a212ed3987080e6a9cd13" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -315,31 +315,31 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.8.10" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dff37dd20bfb118b777c96eda83b2067f4226d2644c5cfa00187b3bc01770ba" +checksum = "ed2c50e6a62ee2b4f7ab3c6d0366e5770a21cad426e109c2f40335a1b3aff3df" dependencies = [ "const-hex", "dunce", "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "0.8.11" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12c71028bfbfec210e24106a542aad3def7caf1a70e2c05710e92a98481980d3" +checksum = "ac17c6e89a50fb4a758012e4b409d9a0ba575228e69b539fe37d7a1bd507ca4a" dependencies = [ "serde", "winnow", @@ -347,12 +347,12 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.8.10" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa828bb1b9a6dc52208fbb18084fb9ce2c30facc2bfda6a5d922349b4990354f" +checksum = "c9dc0fffe397aa17628160e16b89f704098bf3c9d74d5d369ebc239575936de5" dependencies = [ "alloy-json-abi", - "alloy-primitives 0.8.11", + "alloy-primitives 0.8.14", "alloy-sol-macro", "const-hex", "serde", @@ -433,9 +433,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f37166d7d48a0284b99dd824694c26119c700b53bf0d1540cdb147dbdaaf13" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "approx" @@ -448,9 +448,9 @@ dependencies = [ [[package]] name = "arbitrary" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775a8770d29db3dadcb858482cc240af7b2ffde4ac4de67d1d4955728103f0e2" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" dependencies = [ "derive_arbitrary", ] @@ -709,7 +709,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -747,7 +747,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -758,9 +758,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" -version = "0.7.7" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ "async-trait", "axum-core", @@ -782,7 +782,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper 1.0.2", "tokio", "tower", "tower-layer", @@ -805,7 +805,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 1.0.1", + "sync_wrapper 1.0.2", "tower-layer", "tower-service", "tracing", @@ -813,25 +813,26 @@ dependencies = [ [[package]] name = "axum-extra" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73c3220b188aea709cf1b6c5f9b01c3bd936bb08bd2b5184a12b35ac8131b1f9" +checksum = "c794b30c904f0a1c2fb7740f7df7f7972dfaa14ef6f57cb6178dc63e5dca2f04" dependencies = [ "axum", "axum-core", "bytes", + "fastrand", "futures-util", "headers", "http", "http-body", "http-body-util", "mime", + "multer", "pin-project-lite", "serde", "tower", "tower-layer", "tower-service", - "tracing", ] [[package]] @@ -897,7 +898,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -981,22 +982,22 @@ dependencies = [ [[package]] name = "bonsai-sdk" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94032d3eece78099780ba07605d8ba6943e47ee152f76d73f1682e2f40cf889c" +checksum = "c2c2e9e4e10cef33bd6ee36198f8f91b0fed0d0c265da9fe88e87b18f7e29192" dependencies = [ "duplicate", "maybe-async", "reqwest", "serde", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] name = "borsh" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" dependencies = [ "borsh-derive", "cfg_aliases", @@ -1004,16 +1005,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.87", - "syn_derive", + "syn 2.0.89", ] [[package]] @@ -1040,9 +1040,9 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "bytemuck" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" dependencies = [ "bytemuck_derive", ] @@ -1055,7 +1055,7 @@ checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1066,9 +1066,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" dependencies = [ "serde", ] @@ -1099,9 +1099,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" dependencies = [ "serde", ] @@ -1117,14 +1117,14 @@ dependencies = [ "semver 1.0.23", "serde", "serde_json", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] name = "cc" -version = "1.1.35" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57c4b4da2a9d619dd035f27316d7a426305b75be93d09e92f2b9229c34feaf" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ "jobserver", "libc", @@ -1236,9 +1236,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.20" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" +checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" dependencies = [ "clap_builder", "clap_derive", @@ -1246,9 +1246,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.20" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" +checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" dependencies = [ "anstream", "anstyle", @@ -1258,11 +1258,11 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.37" +version = "4.5.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11611dca53440593f38e6b25ec629de50b14cdfa63adc0fb856115a2c6d97595" +checksum = "d9647a559c112175f17cf724dc72d3645680a883c58481332779192b0d8e7a01" dependencies = [ - "clap 4.5.20", + "clap 4.5.21", ] [[package]] @@ -1274,14 +1274,14 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" [[package]] name = "colorchoice" @@ -1323,9 +1323,9 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0121754e84117e65f9d90648ee6aa4882a6e63110307ab73967a4c5e7e69e586" +checksum = "4b0485bab839b018a8f1723fc5391819fea5f8f0f32288ef8a735fd096b6160c" dependencies = [ "cfg-if", "cpufeatures", @@ -1384,9 +1384,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -1560,7 +1560,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1571,7 +1571,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1641,13 +1641,13 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d475dfebcb4854d596b17b09f477616f80f17a550517f2b3615d8c205d5c802b" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1660,7 +1660,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.1", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1680,7 +1680,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", "unicode-xid", ] @@ -1699,7 +1699,7 @@ dependencies = [ "console", "shell-words", "tempfile", - "thiserror 1.0.68", + "thiserror 1.0.69", "zeroize", ] @@ -1782,7 +1782,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1807,7 +1807,7 @@ dependencies = [ "futures", "rand 0.8.5", "reqwest", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", ] @@ -1868,7 +1868,7 @@ name = "ef_tests-levm" version = "0.1.0" dependencies = [ "bytes", - "clap 4.5.20", + "clap 4.5.21", "clap_complete", "colored", "ethrex-blockchain", @@ -1951,7 +1951,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1994,12 +1994,12 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2042,7 +2042,7 @@ dependencies = [ "anyhow", "bytes", "cfg-if", - "clap 4.5.20", + "clap 4.5.21", "directories", "ethrex-blockchain", "ethrex-core", @@ -2078,7 +2078,7 @@ dependencies = [ "k256", "serde_json", "sha3", - "thiserror 1.0.68", + "thiserror 1.0.69", "tracing", ] @@ -2102,7 +2102,7 @@ dependencies = [ "serde", "serde_json", "sha3", - "thiserror 1.0.68", + "thiserror 1.0.69", "tinyvec", ] @@ -2121,7 +2121,7 @@ dependencies = [ "serde", "serde_json", "sha2", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", "tracing", ] @@ -2150,7 +2150,7 @@ dependencies = [ "secp256k1", "serde", "serde_json", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", "tokio-util", "tracing", @@ -2197,7 +2197,7 @@ dependencies = [ "serde_json", "sha3", "snap", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", "tracing", ] @@ -2236,7 +2236,7 @@ dependencies = [ "hex-literal", "lazy_static", "snap", - "thiserror 1.0.68", + "thiserror 1.0.69", "tinyvec", ] @@ -2278,7 +2278,7 @@ dependencies = [ "itertools 0.13.0", "keccak-hash 0.11.0", "secp256k1", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", ] @@ -2298,7 +2298,7 @@ dependencies = [ "serde", "serde_json", "sha3", - "thiserror 1.0.68", + "thiserror 1.0.69", "tracing", ] @@ -2323,7 +2323,7 @@ dependencies = [ "sha3", "smallvec", "tempdir", - "thiserror 1.0.68", + "thiserror 1.0.69", "tracing", ] @@ -2346,7 +2346,7 @@ dependencies = [ "revm-inspectors", "revm-primitives 10.0.0", "serde", - "thiserror 1.0.68", + "thiserror 1.0.69", "tracing", ] @@ -2364,7 +2364,7 @@ dependencies = [ "lazy_static", "secp256k1", "spinoff", - "thiserror 1.0.68", + "thiserror 1.0.69", "tokio", "tracing", ] @@ -2374,7 +2374,7 @@ name = "ethrex_l2_cli" version = "0.1.0" dependencies = [ "bytes", - "clap 4.5.20", + "clap 4.5.21", "clap_complete", "colored", "dialoguer", @@ -2425,15 +2425,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2" dependencies = [ "bit-set", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] [[package]] name = "fastrand" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "fastrlp" @@ -2498,9 +2498,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -2545,7 +2545,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -2637,7 +2637,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -2734,7 +2734,7 @@ dependencies = [ "aho-corasick 1.1.3", "bstr", "log", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -2786,9 +2786,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ "atomic-waker", "bytes", @@ -2830,9 +2830,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.1" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" dependencies = [ "foldhash", "serde", @@ -3011,9 +3011,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", @@ -3221,7 +3221,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -3261,7 +3261,7 @@ dependencies = [ "globset", "log", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "same-file", "walkdir", "winapi-util", @@ -3296,13 +3296,13 @@ dependencies = [ [[package]] name = "impl-trait-for-tuples" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.89", ] [[package]] @@ -3335,7 +3335,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.1", + "hashbrown 0.15.2", "serde", ] @@ -3395,9 +3395,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jobserver" @@ -3518,7 +3518,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -3532,9 +3532,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.161" +version = "0.2.166" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "c2ccc108bbc0b1331bd061864e7cd823c0cab660bbe6970e66e2c0614decde36" [[package]] name = "libloading" @@ -3570,7 +3570,7 @@ dependencies = [ "parking_lot 0.12.3", "sealed", "tempfile", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -3589,7 +3589,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc0bda45ed5b3a2904262c1bb91e526127aa70e7ef3758aba2ef93cf896b9b58" dependencies = [ - "clap 4.5.20", + "clap 4.5.21", "escape8259", "termcolor", "threadpool", @@ -3603,9 +3603,9 @@ checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "litemap" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "loc" @@ -3624,7 +3624,7 @@ checksum = "3669cf5561f8d27e8fc84cc15e58350e70f557d4d65f70e3154e54cd2f8e1782" dependencies = [ "libc", "neli", - "thiserror 1.0.68", + "thiserror 1.0.69", "windows-sys 0.59.0", ] @@ -3692,7 +3692,7 @@ checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -3775,6 +3775,23 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "multer" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http", + "httparse", + "memchr", + "mime", + "spin", + "version_check", +] + [[package]] name = "native-tls" version = "0.2.12" @@ -4031,7 +4048,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -4075,28 +4092,29 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.12" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +checksum = "8be4817d39f3272f69c59fe05d0535ae6456c2dc2fa1ba02910296c7e0a5c590" dependencies = [ "arrayvec", "bitvec", "byte-slice-cast", "impl-trait-for-tuples", "parity-scale-codec-derive", + "rustversion", "serde", ] [[package]] name = "parity-scale-codec-derive" -version = "3.6.12" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +checksum = "8781a75c6205af67215f382092b6e0a4ff3734798523e69073d4bcd294ec767b" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.89", ] [[package]] @@ -4185,7 +4203,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ "memchr", - "thiserror 1.0.68", + "thiserror 1.0.69", "ucd-trie", ] @@ -4209,7 +4227,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -4291,15 +4309,15 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "portable-atomic" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" [[package]] name = "portable-atomic-util" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90a7d5beecc52a491b54d6dd05c7a45ba1801666a5baad9fdbfc6fef8d2d206c" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" dependencies = [ "portable-atomic", ] @@ -4394,14 +4412,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -4446,7 +4464,7 @@ dependencies = [ "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -4471,9 +4489,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quinn" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" dependencies = [ "bytes", "pin-project-lite", @@ -4482,26 +4500,29 @@ dependencies = [ "rustc-hash 2.0.0", "rustls", "socket2", - "thiserror 1.0.68", + "thiserror 2.0.3", "tokio", "tracing", ] [[package]] name = "quinn-proto" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", + "getrandom", "rand 0.8.5", "ring", "rustc-hash 2.0.0", "rustls", + "rustls-pki-types", "slab", - "thiserror 1.0.68", + "thiserror 2.0.3", "tinyvec", "tracing", + "web-time", ] [[package]] @@ -4662,7 +4683,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -4673,7 +4694,7 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick 1.1.3", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -4688,9 +4709,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick 1.1.3", "memchr", @@ -4753,7 +4774,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper 1.0.2", "system-configuration", "tokio", "tokio-native-tls", @@ -4805,7 +4826,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43c44af0bf801f48d25f7baf25cf72aff4c02d610f83b428175228162fef0246" dependencies = [ - "alloy-primitives 0.8.11", + "alloy-primitives 0.8.14", "alloy-rpc-types-eth", "alloy-rpc-types-trace", "alloy-sol-types", @@ -4813,7 +4834,7 @@ dependencies = [ "colorchoice", "revm 14.0.3", "serde_json", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] @@ -4903,7 +4924,7 @@ checksum = "6f1525851a03aff9a9d6a1d018b414d76252d6802ab54695b27093ecd7e7a101" dependencies = [ "alloy-eip2930", "alloy-eip7702", - "alloy-primitives 0.8.11", + "alloy-primitives 0.8.14", "auto_impl", "bitflags 2.6.0", "bitvec", @@ -4962,9 +4983,9 @@ dependencies = [ [[package]] name = "risc0-binfmt" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "543230f7117ce0e6b92b4797fbb3da722575973258cc38a48e28af8d3cf3a26d" +checksum = "9749a29181f87bebd2580b39b3ec0368daaaefbb30429ff429383a7ade360321" dependencies = [ "anyhow", "borsh", @@ -4972,14 +4993,15 @@ dependencies = [ "risc0-zkp", "risc0-zkvm-platform", "serde", + "syn 2.0.89", "tracing", ] [[package]] name = "risc0-build" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c328bea983ffed4cf3721c92b06fa5076cc38c9e326e1488a9ae792e67a054c7" +checksum = "dc684382e24a8c91331040c33f1c789c755a5c1b0b8a32fefc1730ca36dd7072" dependencies = [ "anyhow", "cargo_metadata", @@ -4996,9 +5018,9 @@ dependencies = [ [[package]] name = "risc0-build-kernel" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b186137d4b2b16f7fd017491032e888c56f55ba539812453adc7d3639eaf0113" +checksum = "d2d9e660eee96e15354259604d6dca3ea809a759e991b606d8db7b599916848b" dependencies = [ "cc", "directories", @@ -5012,9 +5034,9 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436c762db677faf2cd616c55a69012d6b4f46c426b7d553c1b3d717e0c7e9438" +checksum = "90745aa984e4eb404f0e0eb6a7ab2e956d963a0dad751fb89ef138cc6e4e3afc" dependencies = [ "anyhow", "bytemuck", @@ -5038,9 +5060,9 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion-sys" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e632f0cba360b49ab69755b49eca1e6c33bd2302d5eec5693f4b3202e6cb3334" +checksum = "7bd552b5590bd0c7030467c62defe2409aabd303d2dd6ff16d6f59421ae0b37a" dependencies = [ "glob", "risc0-build-kernel", @@ -5051,9 +5073,9 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21f81638d4349eb5a816f3fd6ea12b314007572fc63d45cdb83891bed64e2a2a" +checksum = "079b2c6789c6cbfee3500aff69108f853bdfe13fd0071ac1fbe3cbf7d0866420" dependencies = [ "anyhow", "bytemuck", @@ -5079,9 +5101,9 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im-sys" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3eea90914f44cd1227a23b40c2c9d12bee9923a3a7566ef0e6b5b3f3a85db9e" +checksum = "7f9844bd07c18aa6a263259d0c693e54df815a9995760270ff5b5351c5f81cfc" dependencies = [ "glob", "risc0-build-kernel", @@ -5092,9 +5114,9 @@ dependencies = [ [[package]] name = "risc0-core" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1714b8968a5e4583a15018dc2ae95878c76f4cdbc643268a34670fde5b08252a" +checksum = "8fd39ba3f881fcf0197464bde04391602dbbb886f87fddc372a68d79aa9de9d9" dependencies = [ "bytemuck", "nvtx", @@ -5104,9 +5126,9 @@ dependencies = [ [[package]] name = "risc0-groth16" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5f11beecdcabeac264fb868e0b5db22c7e2db5fa2ce68fd482d8ab9ffb88e5d" +checksum = "c86b43367c2f29ce1a0ee5730f0af6892e5b6197c8dded614c7ff1068afcd302" dependencies = [ "anyhow", "ark-bn254", @@ -5128,10 +5150,11 @@ dependencies = [ [[package]] name = "risc0-sys" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a3afe2e8e95cec6317a75bb6eb13519f643e22c53c67a22a31c355117b7c447" +checksum = "abc7596a2ffa5e75e5a886fd95bccb0d593e769cdd2c43b83dcf2ac089423060" dependencies = [ + "anyhow", "cc", "cust", "risc0-build-kernel", @@ -5140,9 +5163,9 @@ dependencies = [ [[package]] name = "risc0-zkp" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "285aa3993827b4a646d70e68240e138f71574680a02d2e97ad30b1db80efda80" +checksum = "15b5525e1f2abaa5954579e50df0d6a5d01b456b0ac6aae0e87cf92f073e12f7" dependencies = [ "anyhow", "blake2", @@ -5171,9 +5194,9 @@ dependencies = [ [[package]] name = "risc0-zkvm" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614fad8046130321e3be9ca3a36d9edad6ff4c538549ae191ec4d82576bb3893" +checksum = "de11138ba073e43ec494d15728baeddbf3155fc95d5710000077eb5f7f345070" dependencies = [ "addr2line 0.22.0", "anyhow", @@ -5210,9 +5233,9 @@ dependencies = [ [[package]] name = "risc0-zkvm-platform" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6acf0b0d7a55578f892e0460ed1f2ca06d0380e32440531d80ca82530d41272" +checksum = "57748f1916078b24faed0bc620aa6dfc386e066e6f75a710ec0ac68f7126e7d7" dependencies = [ "bytemuck", "getrandom", @@ -5314,9 +5337,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.39" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ "bitflags 2.6.0", "errno", @@ -5327,9 +5350,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.16" +version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ "once_cell", "ring", @@ -5353,6 +5376,9 @@ name = "rustls-pki-types" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +dependencies = [ + "web-time", +] [[package]] name = "rustls-webpki" @@ -5411,9 +5437,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.11.5" +version = "2.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aa7ffc1c0ef49b0452c6e2986abf2b07743320641ffd5fc63d552458e3b779b" +checksum = "346a3b32eba2640d17a9cb5927056b08f3de90f65b72fe09402c2ad07d684d0b" dependencies = [ "cfg-if", "derive_more 1.0.0", @@ -5423,21 +5449,21 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.11.5" +version = "2.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46385cc24172cf615450267463f937c10072516359b3ff1cb24228a4a08bf951" +checksum = "c6630024bf739e2179b91fb424b28898baf819414262c5d376677dbff1fe7ebf" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] name = "schannel" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ "windows-sys 0.59.0", ] @@ -5457,7 +5483,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -5508,9 +5534,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -5536,9 +5562,9 @@ dependencies = [ [[package]] name = "semver-parser" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +checksum = "9900206b54a3527fdc7b8a938bffd94a568bac4f4aa8113b209df75a09c0dec2" dependencies = [ "pest", ] @@ -5560,7 +5586,7 @@ checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -5634,7 +5660,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -5733,7 +5759,7 @@ checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ "num-bigint 0.4.6", "num-traits", - "thiserror 1.0.68", + "thiserror 1.0.69", "time", ] @@ -5786,9 +5812,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -5852,9 +5878,9 @@ dependencies = [ [[package]] name = "sppark" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8071dd7b75a6442c8a5031ed2eb764f05c92b45e18c33832d3f8f297cbb9332" +checksum = "ac5090642d9ae844edd9a5c23cb1fce6724ca88d50c55178ee8d1f656df5826b" dependencies = [ "cc", "which 4.4.2", @@ -5867,7 +5893,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" dependencies = [ "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -5932,9 +5958,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.87" +version = "2.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" dependencies = [ "proc-macro2", "quote", @@ -5943,26 +5969,14 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.11" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edf42e81491fb8871b74df3d222c64ae8cbc1269ea509fa768a3ed3e1b0ac8cb" +checksum = "da0523f59468a2696391f2a772edc089342aacd53c3caa2ac3264e598edf119b" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.87", -] - -[[package]] -name = "syn_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -5973,9 +5987,9 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] @@ -5988,7 +6002,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -6030,9 +6044,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -6093,11 +6107,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl 1.0.68", + "thiserror-impl 1.0.69", ] [[package]] @@ -6111,13 +6125,13 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -6128,7 +6142,7 @@ checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -6269,7 +6283,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -6381,9 +6395,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -6393,20 +6407,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -6499,7 +6513,7 @@ checksum = "70b20a22c42c8f1cd23ce5e34f165d4d37038f5b663ad20fb6adbdf029172483" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -6590,9 +6604,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-width" @@ -6614,9 +6628,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.3" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -6733,7 +6747,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", "wasm-bindgen-shared", ] @@ -6767,7 +6781,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6801,11 +6815,21 @@ 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.26.6" +version = "0.26.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" dependencies = [ "rustls-pki-types", ] @@ -7090,9 +7114,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" dependencies = [ "serde", "stable_deref_trait", @@ -7102,13 +7126,13 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", "synstructure", ] @@ -7130,27 +7154,27 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] name = "zerofrom" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", "synstructure", ] @@ -7171,7 +7195,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -7193,14 +7217,14 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] name = "zip" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" +checksum = "99d52293fc86ea7cf13971b3bb81eb21683636e7ae24c729cdaf1b7c4157a352" dependencies = [ "arbitrary", "crc32fast", @@ -7209,7 +7233,7 @@ dependencies = [ "flate2", "indexmap 2.6.0", "memchr", - "thiserror 1.0.68", + "thiserror 2.0.3", "zopfli", ] @@ -7225,7 +7249,7 @@ dependencies = [ "risc0-build", "serde", "serde_with", - "thiserror 1.0.68", + "thiserror 1.0.69", ] [[package]] From fd8b91c5ef961f74a2f8cd3f8b4883058c19562e Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Fri, 29 Nov 2024 12:52:54 -0300 Subject: [PATCH 27/41] Remove commented code --- crates/vm/levm/src/gas_cost.rs | 158 --------------------------------- 1 file changed, 158 deletions(-) diff --git a/crates/vm/levm/src/gas_cost.rs b/crates/vm/levm/src/gas_cost.rs index 7661ee449..4d96bd570 100644 --- a/crates/vm/levm/src/gas_cost.rs +++ b/crates/vm/levm/src/gas_cost.rs @@ -374,165 +374,7 @@ pub fn mcopy( .checked_add(memory_expansion_cost) .ok_or(OutOfGasError::GasCostOverflow) } -/* -#[allow(clippy::too_many_arguments)] -pub fn call( - current_call_frame: &mut CallFrame, - args_size: usize, - args_offset: usize, - ret_size: usize, - ret_offset: usize, - value: U256, - is_cached: bool, - account_is_empty: bool, -) -> Result { - let arg_sum = args_offset - .checked_add(args_size) - .ok_or(OutOfGasError::GasCostOverflow)?; - let ret_sum = ret_offset - .checked_add(ret_size) - .ok_or(OutOfGasError::GasCostOverflow)?; - - let memory_expansion_cost = if arg_sum > ret_sum { - current_call_frame - .memory - .expansion_cost(args_offset, args_size)? - } else { - current_call_frame - .memory - .expansion_cost(ret_offset, ret_size)? - }; - - let positive_value_cost = if !value.is_zero() { - NON_ZERO_VALUE_COST - .checked_add(BASIC_FALLBACK_FUNCTION_STIPEND) - .ok_or(OutOfGasError::GasCostOverflow)? - } else { - U256::zero() - }; - - let address_access_cost = if !is_cached { - COLD_ADDRESS_ACCESS_COST - } else { - WARM_ADDRESS_ACCESS_COST - }; - - let value_to_empty_account_cost = if !value.is_zero() && account_is_empty { - VALUE_TO_EMPTY_ACCOUNT_COST - } else { - U256::zero() - }; - memory_expansion_cost - .checked_add(address_access_cost) - .ok_or(OutOfGasError::GasCostOverflow)? - .checked_add(positive_value_cost) - .ok_or(OutOfGasError::GasCostOverflow)? - .checked_add(value_to_empty_account_cost) - .ok_or(OutOfGasError::GasCostOverflow) -} - -pub fn callcode( - current_call_frame: &mut CallFrame, - args_size: usize, - args_offset: usize, - ret_size: usize, - ret_offset: usize, - value: U256, - is_cached: bool, -) -> Result { - let transfer_cost = if value == U256::zero() { - U256::zero() - } else { - NON_ZERO_VALUE_COST - // Should also add BASIC_FALLBACK_FUNCTION_STIPEND?? - // See https://www.evm.codes/?fork=cancun#f2 and call impl - }; - - compute_gas_call( - current_call_frame, - args_size, - args_offset, - ret_size, - ret_offset, - is_cached, - )? - .checked_add(transfer_cost) - .ok_or(OutOfGasError::GasCostOverflow) -} - -pub fn delegatecall( - current_call_frame: &mut CallFrame, - args_size: usize, - args_offset: usize, - ret_size: usize, - ret_offset: usize, - is_cached: bool, -) -> Result { - compute_gas_call( - current_call_frame, - args_size, - args_offset, - ret_size, - ret_offset, - is_cached, - ) -} - -pub fn staticcall( - current_call_frame: &mut CallFrame, - args_size: usize, - args_offset: usize, - ret_size: usize, - ret_offset: usize, - is_cached: bool, -) -> Result { - compute_gas_call( - current_call_frame, - args_size, - args_offset, - ret_size, - ret_offset, - is_cached, - ) -} - -fn compute_gas_call( - current_call_frame: &mut CallFrame, - args_size: usize, - args_offset: usize, - ret_size: usize, - ret_offset: usize, - is_cached: bool, -) -> Result { - let arg_sum = args_offset - .checked_add(args_size) - .ok_or(OutOfGasError::GasCostOverflow)?; - let ret_sum = ret_offset - .checked_add(ret_size) - .ok_or(OutOfGasError::GasCostOverflow)?; - - let memory_expansion_cost = if arg_sum > ret_sum { - current_call_frame - .memory - .expansion_cost(args_offset, args_size)? - } else { - current_call_frame - .memory - .expansion_cost(ret_offset, ret_size)? - }; - - let access_cost = if is_cached { - WARM_ADDRESS_ACCESS_COST - } else { - COLD_ADDRESS_ACCESS_COST - }; - - memory_expansion_cost - .checked_add(access_cost) - .ok_or(OutOfGasError::GasCostOverflow) -} - */ pub fn create( current_call_frame: &mut CallFrame, code_offset_in_memory: usize, From 6ba52b76263186855a2539e0ceb07ca5f1172098 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Fri, 29 Nov 2024 13:04:03 -0300 Subject: [PATCH 28/41] return to previous selfdestruct implementation --- crates/vm/levm/src/opcode_handlers/system.rs | 25 ++++++++------------ 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/crates/vm/levm/src/opcode_handlers/system.rs b/crates/vm/levm/src/opcode_handlers/system.rs index 3c00b4e2c..5fa78cbc1 100644 --- a/crates/vm/levm/src/opcode_handlers/system.rs +++ b/crates/vm/levm/src/opcode_handlers/system.rs @@ -480,7 +480,6 @@ impl VM { // 3. Get the target account, checking if it is empty and if it is cold. Update gas cost accordingly. // 4. Add the balance of the current account to the target account // 5. Register account to be destroyed in accrued substate. - // Notes: // If context is Static, return error. // If executed in the same transaction a contract was created, the current account is registered to be destroyed @@ -490,16 +489,19 @@ impl VM { let target_address = word_to_address(current_call_frame.stack.pop()?); - let (current_account_info, _current_account_is_cold) = - self.access_account(current_call_frame.to); - - let current_account_balance = current_account_info.balance; + let (target_account_info, target_account_is_cold) = self.access_account(target_address); - self.decrease_account_balance(current_call_frame.to, current_account_balance)?; + self.increase_consumed_gas( + current_call_frame, + gas_cost::selfdestruct(target_account_is_cold, target_account_info.is_empty()) + .map_err(VMError::OutOfGas)?, + )?; - let (target_account_info, target_account_is_cold) = self.access_account(target_address); + let (current_account_info, _current_account_is_cold) = + self.access_account(current_call_frame.to); - self.increase_account_balance(target_address, current_account_balance)?; + self.increase_account_balance(target_address, current_account_info.balance)?; + self.decrease_account_balance(current_call_frame.to, current_account_info.balance)?; if self.tx_kind == TxKind::Create { self.accrued_substate @@ -507,13 +509,6 @@ impl VM { .insert(current_call_frame.to); } - // Don't like to consume the gas after the operation but i need to don't cache both at the same time - self.increase_consumed_gas( - current_call_frame, - gas_cost::selfdestruct(target_account_is_cold, target_account_info.is_empty()) - .map_err(VMError::OutOfGas)?, - )?; - Ok(OpcodeSuccess::Result(ResultReason::SelfDestruct)) } } From 393e4413e4be77e93aafe6d27e961eb5076c82b8 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Fri, 29 Nov 2024 17:02:15 -0300 Subject: [PATCH 29/41] Count warm address in warm slot --- crates/vm/levm/src/vm.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index a16073a0c..8227c670f 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -950,11 +950,12 @@ impl VM { /// Accessed storage slots take place in some gas cost computation. #[must_use] pub fn access_storage_slot(&mut self, address: Address, key: H256) -> (StorageSlot, bool) { + let account_is_cold = !self.touched_accounts.contains(&address); let storage_slot_was_cold = self .touched_storage_slots - .entry(address) - .or_default() - .insert(key); + .get_mut(&address) + .map(|storage| storage.insert(key)) + .unwrap_or_default(); let storage_slot = match cache::get_account(&self.cache, &address) { Some(account) => match account.storage.get(&key) { Some(storage_slot) => storage_slot.clone(), @@ -974,7 +975,7 @@ impl VM { } } }; - (storage_slot, storage_slot_was_cold) + (storage_slot, storage_slot_was_cold || account_is_cold) } pub fn increase_account_balance( From 9a924c5c76a4a135daa80c49da3468610636caa7 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Mon, 2 Dec 2024 13:24:33 -0300 Subject: [PATCH 30/41] Reset previous behavior in access_storage_slot --- crates/vm/levm/src/vm.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 8227c670f..3f4ce3ec3 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -948,14 +948,12 @@ impl VM { /// /// Accessed storage slots are stored in the `touched_storage_slots` set. /// Accessed storage slots take place in some gas cost computation. - #[must_use] pub fn access_storage_slot(&mut self, address: Address, key: H256) -> (StorageSlot, bool) { - let account_is_cold = !self.touched_accounts.contains(&address); let storage_slot_was_cold = self .touched_storage_slots - .get_mut(&address) - .map(|storage| storage.insert(key)) - .unwrap_or_default(); + .entry(address) + .or_default() + .insert(key); let storage_slot = match cache::get_account(&self.cache, &address) { Some(account) => match account.storage.get(&key) { Some(storage_slot) => storage_slot.clone(), @@ -975,7 +973,7 @@ impl VM { } } }; - (storage_slot, storage_slot_was_cold || account_is_cold) + (storage_slot, storage_slot_was_cold) } pub fn increase_account_balance( From ffd9b2ff9ab9643f317f1663e9db1297ec46848c Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Mon, 2 Dec 2024 13:26:04 -0300 Subject: [PATCH 31/41] Now delegate call dont transfer the value twice --- crates/vm/levm/src/opcode_handlers/system.rs | 4 ++++ crates/vm/levm/src/vm.rs | 16 ++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/crates/vm/levm/src/opcode_handlers/system.rs b/crates/vm/levm/src/opcode_handlers/system.rs index 5fa78cbc1..5f252c214 100644 --- a/crates/vm/levm/src/opcode_handlers/system.rs +++ b/crates/vm/levm/src/opcode_handlers/system.rs @@ -92,6 +92,7 @@ impl VM { args_size, return_data_start_offset, return_data_size, + true ) } @@ -172,6 +173,7 @@ impl VM { args_size, return_data_start_offset, return_data_size, + true ) } @@ -276,6 +278,7 @@ impl VM { args_size, return_data_start_offset, return_data_size, + false ) } @@ -353,6 +356,7 @@ impl VM { args_size, return_data_start_offset, return_data_size, + true ) } diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 3f4ce3ec3..6abf070c0 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -653,17 +653,20 @@ impl VM { args_size: usize, ret_offset: usize, ret_size: usize, + should_transfer_value: bool, ) -> Result { let (sender_account_info, _address_was_cold) = self.access_account(msg_sender); - if sender_account_info.balance < value { - current_call_frame.stack.push(U256::from(REVERT_FOR_CALL))?; - return Ok(OpcodeSuccess::Continue); + if should_transfer_value { + if sender_account_info.balance < value { + current_call_frame.stack.push(U256::from(REVERT_FOR_CALL))?; + return Ok(OpcodeSuccess::Continue); + } + + self.decrease_account_balance(msg_sender, value)?; + self.increase_account_balance(to, value)?; } - self.decrease_account_balance(msg_sender, value)?; - self.increase_account_balance(to, value)?; - let (code_account_info, _address_was_cold) = self.access_account(code_address); if code_account_info.bytecode.is_empty() { @@ -883,6 +886,7 @@ impl VM { code_size_in_memory, code_offset_in_memory, code_size_in_memory, + true )?; // Erases the success value in the stack result of calling generic call, probably this should be refactored soon... From 7e0267f91fe8f1d3f9fb9132fafdfe8d83664c52 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Mon, 2 Dec 2024 15:02:10 -0300 Subject: [PATCH 32/41] fmt changes --- crates/vm/levm/src/opcode_handlers/bitwise_comparison.rs | 2 -- crates/vm/levm/src/opcode_handlers/system.rs | 8 ++++---- crates/vm/levm/src/vm.rs | 6 +++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/crates/vm/levm/src/opcode_handlers/bitwise_comparison.rs b/crates/vm/levm/src/opcode_handlers/bitwise_comparison.rs index d3b8f46b8..399dd8a4f 100644 --- a/crates/vm/levm/src/opcode_handlers/bitwise_comparison.rs +++ b/crates/vm/levm/src/opcode_handlers/bitwise_comparison.rs @@ -274,7 +274,6 @@ pub fn checked_shift_left(value: U256, shift: U256) -> Result { let mut result = value; let mut shifts_left = shift; - while !shifts_left.is_zero() { result = match result.checked_mul(U256::from(2)) { Some(num) => num, @@ -309,7 +308,6 @@ fn checked_shift_right(value: U256, shift: U256) -> Result { let mut result = value; let mut shifts_left = shift; - while !shifts_left.is_zero() { result = result.checked_div(U256::from(2)).ok_or(VMError::Internal( InternalError::ArithmeticOperationDividedByZero, diff --git a/crates/vm/levm/src/opcode_handlers/system.rs b/crates/vm/levm/src/opcode_handlers/system.rs index 5f252c214..88458ecb9 100644 --- a/crates/vm/levm/src/opcode_handlers/system.rs +++ b/crates/vm/levm/src/opcode_handlers/system.rs @@ -92,7 +92,7 @@ impl VM { args_size, return_data_start_offset, return_data_size, - true + true, ) } @@ -173,7 +173,7 @@ impl VM { args_size, return_data_start_offset, return_data_size, - true + true, ) } @@ -278,7 +278,7 @@ impl VM { args_size, return_data_start_offset, return_data_size, - false + false, ) } @@ -356,7 +356,7 @@ impl VM { args_size, return_data_start_offset, return_data_size, - true + true, ) } diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 6abf070c0..9d7ea1c3f 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -662,9 +662,9 @@ impl VM { current_call_frame.stack.push(U256::from(REVERT_FOR_CALL))?; return Ok(OpcodeSuccess::Continue); } - + self.decrease_account_balance(msg_sender, value)?; - self.increase_account_balance(to, value)?; + self.increase_account_balance(to, value)?; } let (code_account_info, _address_was_cold) = self.access_account(code_address); @@ -886,7 +886,7 @@ impl VM { code_size_in_memory, code_offset_in_memory, code_size_in_memory, - true + true, )?; // Erases the success value in the stack result of calling generic call, probably this should be refactored soon... From e3e6d7818a4d50efbcc87c39773ea46e84c366b1 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Tue, 3 Dec 2024 13:27:28 -0300 Subject: [PATCH 33/41] Add calldata cost only if Result is success --- crates/vm/levm/src/vm.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index f2facc580..0b132e626 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -537,8 +537,12 @@ impl VM { let sender = initial_call_frame.msg_sender; - let calldata_cost = - gas_cost::tx_calldata(&initial_call_frame.calldata).map_err(VMError::OutOfGas)?; + let calldata_cost = match report.result { + TxResult::Success => { + gas_cost::tx_calldata(&initial_call_frame.calldata).map_err(VMError::OutOfGas)? + } + TxResult::Revert(_) => 0, + }; report.gas_used = report .gas_used From 009bbd1ced77834a5e15a2e13658fb761d145107 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Tue, 3 Dec 2024 14:32:03 -0300 Subject: [PATCH 34/41] Comment debugs --- cmd/ef_tests/levm/runner/levm_runner.rs | 3 +++ crates/vm/levm/src/vm.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cmd/ef_tests/levm/runner/levm_runner.rs b/cmd/ef_tests/levm/runner/levm_runner.rs index 5634e7fa7..261e8aa47 100644 --- a/cmd/ef_tests/levm/runner/levm_runner.rs +++ b/cmd/ef_tests/levm/runner/levm_runner.rs @@ -27,6 +27,9 @@ pub fn run_ef_test(test: &EFTest) -> Result { test.fork(), ); for (vector, _tx) in test.transactions.iter() { +/* if *vector != (2, 0, 0) { + continue; + } */ match run_ef_test_tx(vector, test) { Ok(_) => continue, Err(EFTestRunnerError::VMInitializationFailed(reason)) => { diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 0b132e626..765baf908 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -183,6 +183,9 @@ impl VM { let opcode = current_call_frame.next_opcode(); current_call_frame.increment_pc()?; + //dbg!(¤t_call_frame.gas_used); + //dbg!(¤t_call_frame.stack); + //dbg!(&opcode); let op_result: Result = match opcode { Opcode::STOP => Ok(OpcodeSuccess::Result(ResultReason::Stop)), Opcode::ADD => self.op_add(current_call_frame), From 4638ae5cf9d639b24802b9821e938755f4bd873b Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Tue, 3 Dec 2024 16:19:47 -0300 Subject: [PATCH 35/41] fmt changes --- cmd/ef_tests/levm/runner/levm_runner.rs | 2 +- crates/vm/levm/src/vm.rs | 26 ++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cmd/ef_tests/levm/runner/levm_runner.rs b/cmd/ef_tests/levm/runner/levm_runner.rs index 9d77c1b16..8f11ae83c 100644 --- a/cmd/ef_tests/levm/runner/levm_runner.rs +++ b/cmd/ef_tests/levm/runner/levm_runner.rs @@ -27,7 +27,7 @@ pub fn run_ef_test(test: &EFTest) -> Result { test.fork(), ); for (vector, _tx) in test.transactions.iter() { -/* if *vector != (2, 0, 0) { + /* if *vector != (2, 0, 0) { continue; } */ match run_ef_test_tx(vector, test) { diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 56d2d4d41..5042194ff 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -591,19 +591,19 @@ impl VM { let sender = initial_call_frame.msg_sender; - /* - let calldata_cost = match report.result { - TxResult::Success => { - gas_cost::tx_calldata(&initial_call_frame.calldata).map_err(VMError::OutOfGas)? - } - TxResult::Revert(_) => 0, - }; - - report.gas_used = report - .gas_used - .checked_add(calldata_cost) - .ok_or(VMError::OutOfGas(OutOfGasError::GasUsedOverflow))?; - */ + /* + let calldata_cost = match report.result { + TxResult::Success => { + gas_cost::tx_calldata(&initial_call_frame.calldata).map_err(VMError::OutOfGas)? + } + TxResult::Revert(_) => 0, + }; + + report.gas_used = report + .gas_used + .checked_add(calldata_cost) + .ok_or(VMError::OutOfGas(OutOfGasError::GasUsedOverflow))?; + */ if self.is_create() { match self.create_post_execution(&mut initial_call_frame, &mut report) { Ok(_) => {} From 547c68a328ffe80a97fe776cc67bdfc854a91d4c Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Tue, 3 Dec 2024 17:52:47 -0300 Subject: [PATCH 36/41] Skip tests from vmPerformance folder --- cmd/ef_tests/levm/parser.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/ef_tests/levm/parser.rs b/cmd/ef_tests/levm/parser.rs index f119581fc..4e9ed72dd 100644 --- a/cmd/ef_tests/levm/parser.rs +++ b/cmd/ef_tests/levm/parser.rs @@ -87,6 +87,12 @@ pub fn parse_ef_test_dir( continue; } + // Skip tests that are not in the list of tests to run. + if &test_dir.file_name().to_str().unwrap().to_owned() == "vmPerformance" + { + return Ok(Vec::new()); + } + // Skip tests that are not in the list of tests to run. if !opts.tests.is_empty() && !opts From 0aee17251c453626e2cb1659b224406035d7368a Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Tue, 3 Dec 2024 17:54:19 -0300 Subject: [PATCH 37/41] Transfer before the execution and revert that transfer in case of error --- crates/vm/levm/src/vm.rs | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 5042194ff..5aa9355f1 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -587,23 +587,19 @@ impl VM { let cache_before_execution = self.cache.clone(); self.validate_transaction(&mut initial_call_frame)?; - let mut report = self.execute(&mut initial_call_frame)?; - + // Maybe can be done in validate_transaction let sender = initial_call_frame.msg_sender; + let receiver_address = initial_call_frame.to; + self.decrease_account_balance(sender, initial_call_frame.msg_value)?; + self.increase_account_balance(receiver_address, initial_call_frame.msg_value)?; + + let mut report = self.execute(&mut initial_call_frame)?; + + if let TxResult::Revert(_) = report.result { + self.decrease_account_balance(receiver_address, initial_call_frame.msg_value)?; + self.increase_account_balance(sender, initial_call_frame.msg_value)?; + } - /* - let calldata_cost = match report.result { - TxResult::Success => { - gas_cost::tx_calldata(&initial_call_frame.calldata).map_err(VMError::OutOfGas)? - } - TxResult::Revert(_) => 0, - }; - - report.gas_used = report - .gas_used - .checked_add(calldata_cost) - .ok_or(VMError::OutOfGas(OutOfGasError::GasUsedOverflow))?; - */ if self.is_create() { match self.create_post_execution(&mut initial_call_frame, &mut report) { Ok(_) => {} @@ -629,14 +625,6 @@ impl VM { .ok_or(VMError::GasLimitPriceProductOverflow)?, )?; - let receiver_address = initial_call_frame.to; - // If execution was successful we want to transfer value from sender to receiver - if report.is_success() { - // Subtract to the caller the gas sent - self.decrease_account_balance(sender, initial_call_frame.msg_value)?; - self.increase_account_balance(receiver_address, initial_call_frame.msg_value)?; - } - // Send coinbase fee let priority_fee_per_gas = self .env From 8375e9287688cbffd98e2ae5a9c16dbdca2ca741 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Tue, 3 Dec 2024 17:54:42 -0300 Subject: [PATCH 38/41] fmt changes --- crates/vm/levm/src/vm.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 5aa9355f1..2eaf4b336 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -594,10 +594,10 @@ impl VM { self.increase_account_balance(receiver_address, initial_call_frame.msg_value)?; let mut report = self.execute(&mut initial_call_frame)?; - + if let TxResult::Revert(_) = report.result { self.decrease_account_balance(receiver_address, initial_call_frame.msg_value)?; - self.increase_account_balance(sender, initial_call_frame.msg_value)?; + self.increase_account_balance(sender, initial_call_frame.msg_value)?; } if self.is_create() { From 05222cf797c64fc092a229caa46c2ca772cde700 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Tue, 3 Dec 2024 17:57:09 -0300 Subject: [PATCH 39/41] general fmt --- cmd/ef_tests/levm/parser.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/ef_tests/levm/parser.rs b/cmd/ef_tests/levm/parser.rs index 4e9ed72dd..302d10545 100644 --- a/cmd/ef_tests/levm/parser.rs +++ b/cmd/ef_tests/levm/parser.rs @@ -88,8 +88,7 @@ pub fn parse_ef_test_dir( } // Skip tests that are not in the list of tests to run. - if &test_dir.file_name().to_str().unwrap().to_owned() == "vmPerformance" - { + if &test_dir.file_name().to_str().unwrap().to_owned() == "vmPerformance" { return Ok(Vec::new()); } From b4425422df846e200405f25d78fa94db92e65972 Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Tue, 3 Dec 2024 18:03:34 -0300 Subject: [PATCH 40/41] remove dbg prints --- crates/vm/levm/src/vm.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 2eaf4b336..cbeeada88 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -183,9 +183,6 @@ impl VM { let opcode = current_call_frame.next_opcode(); current_call_frame.increment_pc()?; - //dbg!(¤t_call_frame.gas_used); - //dbg!(¤t_call_frame.stack); - //dbg!(&opcode); let op_result: Result = match opcode { Opcode::STOP => Ok(OpcodeSuccess::Result(ResultReason::Stop)), Opcode::ADD => self.op_add(current_call_frame), From 631b6ce4fa11d8177403b6a95aa9406f77aaae80 Mon Sep 17 00:00:00 2001 From: Ivan Litteri <67517699+ilitteri@users.noreply.github.com> Date: Tue, 3 Dec 2024 18:20:28 -0300 Subject: [PATCH 41/41] Update cmd/ef_tests/levm/runner/levm_runner.rs --- cmd/ef_tests/levm/runner/levm_runner.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/cmd/ef_tests/levm/runner/levm_runner.rs b/cmd/ef_tests/levm/runner/levm_runner.rs index 8f11ae83c..63537d8af 100644 --- a/cmd/ef_tests/levm/runner/levm_runner.rs +++ b/cmd/ef_tests/levm/runner/levm_runner.rs @@ -27,9 +27,6 @@ pub fn run_ef_test(test: &EFTest) -> Result { test.fork(), ); for (vector, _tx) in test.transactions.iter() { - /* if *vector != (2, 0, 0) { - continue; - } */ match run_ef_test_tx(vector, test) { Ok(_) => continue, Err(EFTestRunnerError::VMInitializationFailed(reason)) => {