From e3500b3525cd7bab937eedca08441a07b61ac2b0 Mon Sep 17 00:00:00 2001 From: maskpp Date: Fri, 27 Dec 2024 14:56:13 +0800 Subject: [PATCH 1/3] keep the error message alignment with geth --- crates/storage/errors/src/provider.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/storage/errors/src/provider.rs b/crates/storage/errors/src/provider.rs index deef3b85b085..37d5692305fd 100644 --- a/crates/storage/errors/src/provider.rs +++ b/crates/storage/errors/src/provider.rs @@ -142,7 +142,7 @@ pub enum ProviderError { L1OriginNotFound(BlockNumber), /// Head L1 origin error - #[display("head L1Origin does not exist")] + #[display("not found")] HeadL1OriginNotFound, } From b9a32e713a81d3d805dc82c6c836c42a8895c944 Mon Sep 17 00:00:00 2001 From: maskpp Date: Fri, 27 Dec 2024 15:00:20 +0800 Subject: [PATCH 2/3] keep the error message alignment with geth --- crates/storage/errors/src/provider.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/storage/errors/src/provider.rs b/crates/storage/errors/src/provider.rs index 37d5692305fd..f5dbc331642c 100644 --- a/crates/storage/errors/src/provider.rs +++ b/crates/storage/errors/src/provider.rs @@ -138,7 +138,7 @@ pub enum ProviderError { InvalidStorageOutput, /// L1 origin error - #[display("not L1Origin found for block #{_0}")] + #[display("not found")] L1OriginNotFound(BlockNumber), /// Head L1 origin error From 5fa3fcb1d44ba191a73b0adc55174c683530c38e Mon Sep 17 00:00:00 2001 From: maskpp Date: Fri, 27 Dec 2024 15:37:31 +0800 Subject: [PATCH 3/3] handle optional parameter ext --- crates/taiko/evm/src/lib.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/crates/taiko/evm/src/lib.rs b/crates/taiko/evm/src/lib.rs index 27a74a698e79..9d4ee09093d6 100644 --- a/crates/taiko/evm/src/lib.rs +++ b/crates/taiko/evm/src/lib.rs @@ -68,17 +68,18 @@ impl ConfigureEvmEnv for TaikoEvmConfig { ) { transaction.fill_tx_env(tx_env, sender); - let EnvExt { is_anchor, block_number, extra_data } = ext.unwrap(); - // Set taiko specific data - tx_env.taiko.is_anchor = is_anchor; + if let Some(ext) = ext { + let EnvExt { is_anchor, block_number, extra_data } = ext; + // Set taiko specific data + tx_env.taiko.is_anchor = is_anchor; + if self.chain_spec.is_ontake_active_at_block(block_number) { + // set the basefee ratio + tx_env.taiko.basefee_ratio = decode_ontake_extra_data(extra_data); + } + } // set the treasury address let treasury = self.chain_spec.treasury(); tx_env.taiko.treasury = treasury; - - if self.chain_spec.is_ontake_active_at_block(block_number) { - // set the basefee ratio - tx_env.taiko.basefee_ratio = decode_ontake_extra_data(extra_data); - } } fn fill_tx_env_system_contract_call(