From 87e69ac5ffb5b84db8685f0b79cbb259890d87d1 Mon Sep 17 00:00:00 2001 From: Rodi-Can Bozman Date: Tue, 24 Jun 2025 11:37:00 +0200 Subject: [PATCH] Etherlink/Revm: sender can have code with REVM (>=Prague) --- etherlink/kernel_latest/kernel/src/apply.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/etherlink/kernel_latest/kernel/src/apply.rs b/etherlink/kernel_latest/kernel/src/apply.rs index c0f0e2906c47..7451a156aa4a 100644 --- a/etherlink/kernel_latest/kernel/src/apply.rs +++ b/etherlink/kernel_latest/kernel/src/apply.rs @@ -267,10 +267,14 @@ fn is_valid_ethereum_transaction_common( return Ok(Validity::InvalidPrePay); } - // The sender does not have code, see EIP3607. - if code_exists { - log!(host, Benchmarking, "Transaction status: ERROR_CODE."); - return Ok(Validity::InvalidCode); + // TODO: Whenever the configuration/spec id of our EVM + // is properly propagated to REVM, re-adjust this condition. + if let Ok(false) = is_revm_enabled(host) { + // The sender does not have code, see EIP3607. + if code_exists { + log!(host, Benchmarking, "Transaction status: ERROR_CODE."); + return Ok(Validity::InvalidCode); + } } // check that enough gas is provided to cover fees -- GitLab