From 82cccf3cddd07df253f9a4c497d53507df545763 Mon Sep 17 00:00:00 2001 From: sprites0 <199826320+sprites0@users.noreply.github.com> Date: Thu, 10 Jul 2025 18:32:50 +0000 Subject: [PATCH] fix: Implement transact_system_call per HyperEVM spec --- src/node/evm/mod.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/node/evm/mod.rs b/src/node/evm/mod.rs index 1a4796002..931b43cf8 100644 --- a/src/node/evm/mod.rs +++ b/src/node/evm/mod.rs @@ -15,11 +15,12 @@ use reth::{ use reth_evm::{Evm, EvmEnv}; use revm::{ context::{ - result::{EVMError, HaltReason, ResultAndState}, + result::{EVMError, ExecutionResult, HaltReason, Output, ResultAndState, SuccessReason}, BlockEnv, TxEnv, }, handler::{instructions::EthInstructions, EthPrecompiles, PrecompileProvider}, interpreter::{interpreter::EthInterpreter, InterpreterResult}, + state::EvmState, Context, Database, ExecuteEvm, InspectEvm, Inspector, }; use std::ops::{Deref, DerefMut}; @@ -109,7 +110,18 @@ where _contract: Address, _data: Bytes, ) -> Result, Self::Error> { - unimplemented!() + // NOTE: (HACK) Per hyper-evm-sync, HyperEVM doesn't seem to call this method, so we just return a success result with no changes + // This is used for block traces. In a long term, consider implementing SystemCaller. + Ok(ResultAndState::new( + ExecutionResult::Success { + reason: SuccessReason::Stop, + gas_used: 0, + gas_refunded: 0, + logs: vec![], + output: Output::Call(Bytes::new()), + }, + EvmState::default(), + )) } fn db_mut(&mut self) -> &mut Self::DB {