From 52f1cd5f58bdba2c28afcbf59faa134d28016282 Mon Sep 17 00:00:00 2001 From: enitrat Date: Thu, 14 Nov 2024 13:10:09 +0700 Subject: [PATCH 1/3] feat: update base_fee storage location mirroring kakarot new strategy --- crates/ef-testing/src/evm_sequencer/evm_state/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs b/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs index c48cac8b..aff5c90e 100644 --- a/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs +++ b/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs @@ -103,9 +103,11 @@ impl Evm for KakarotSequencer { coinbase_address, )?; - // Set the base fee. + // Set the base fee at index 'current_block' let [low_fee, high_fee] = split_u256(base_fee); - let basefee_address = get_storage_var_address(KAKAROT_BASE_FEE, &[]); + let key = Felt::from_bytes_be_slice(&"current_block".as_bytes()); + println!("key: {:?}", key); + let basefee_address = get_storage_var_address(KAKAROT_BASE_FEE, &[key]); self.state_mut() .set_storage_at(kakarot_address, basefee_address, low_fee.into())?; self.state_mut().set_storage_at( From 3b98c9b9092a2f767b54cda8dadce40041d71509 Mon Sep 17 00:00:00 2001 From: enitrat Date: Thu, 14 Nov 2024 13:21:03 +0700 Subject: [PATCH 2/3] check fix --- crates/ef-testing/src/evm_sequencer/evm_state/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs b/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs index aff5c90e..177e29b1 100644 --- a/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs +++ b/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs @@ -105,7 +105,7 @@ impl Evm for KakarotSequencer { // Set the base fee at index 'current_block' let [low_fee, high_fee] = split_u256(base_fee); - let key = Felt::from_bytes_be_slice(&"current_block".as_bytes()); + let key = Felt::from_bytes_be_slice("current_block".as_bytes()); println!("key: {:?}", key); let basefee_address = get_storage_var_address(KAKAROT_BASE_FEE, &[key]); self.state_mut() From b01ffdf1015863eb451f1e4c748b8451c32367bc Mon Sep 17 00:00:00 2001 From: enitrat Date: Thu, 14 Nov 2024 15:30:37 +0700 Subject: [PATCH 3/3] trunk check fix --- crates/ef-testing/src/evm_sequencer/evm_state/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs b/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs index 177e29b1..c1e6af75 100644 --- a/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs +++ b/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs @@ -105,7 +105,7 @@ impl Evm for KakarotSequencer { // Set the base fee at index 'current_block' let [low_fee, high_fee] = split_u256(base_fee); - let key = Felt::from_bytes_be_slice("current_block".as_bytes()); + let key = Felt::from_bytes_be_slice(b"current_block"); println!("key: {:?}", key); let basefee_address = get_storage_var_address(KAKAROT_BASE_FEE, &[key]); self.state_mut()