From 7d23973ea47b3be254d062834da72e33b642f7c7 Mon Sep 17 00:00:00 2001 From: Aryan Tikarya Date: Fri, 22 May 2026 21:14:38 +0530 Subject: [PATCH] fix trace is evm or eam check to return correct error code --- CHANGELOG.md | 4 +++- src/rpc/methods/eth/trace/parity.rs | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0b49e7e9787..69407297e64a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,12 +35,14 @@ ### Changed -- [`#7066`](https://github.com/ChainSafe/forest/pull/7066): Disable JSON-RPC HTTP response compression by default. Set `FOREST_RPC_COMPRESS_MIN_BODY_SIZE` to a non-negative value (e.g. `1024`) to re-enable gzip compression of responses above that size. +- [#7066](https://github.com/ChainSafe/forest/pull/7066): Disable JSON-RPC HTTP response compression by default. Set `FOREST_RPC_COMPRESS_MIN_BODY_SIZE` to a non-negative value (e.g. `1024`) to re-enable gzip compression of responses above that size. ### Removed ### Fixed +- [#6748](https://github.com/ChainSafe/forest/issues/6748): Fixed trace transaction api returns the correct error. + ## Forest v0.33.4 "Stray" Mandatory release for mainnet node operators. It includes support for the _NV28 FireHorse_ network upgrade on mainnet, which is set to activate at epoch `6052800` (2026-05-27T14:00:00Z). It also includes a few improvements and fixes for the JSON-RPC server. diff --git a/src/rpc/methods/eth/trace/parity.rs b/src/rpc/methods/eth/trace/parity.rs index a958a601406e..0afdd756e9dc 100644 --- a/src/rpc/methods/eth/trace/parity.rs +++ b/src/rpc/methods/eth/trace/parity.rs @@ -33,8 +33,10 @@ use tracing::debug; /// Returns `true` if the invoked actor is an EVM contract or the Ethereum Account Manager. fn trace_is_evm_or_eam(trace: &ExecutionTrace) -> bool { if let Some(invoked_actor) = &trace.invoked_actor { - is_evm_actor(&invoked_actor.state.code) - || invoked_actor.id != Address::ETHEREUM_ACCOUNT_MANAGER_ACTOR.id().unwrap() + let eam_actor_id = Address::ETHEREUM_ACCOUNT_MANAGER_ACTOR + .id() + .expect("EAM actor address should be an ID address"); + is_evm_actor(&invoked_actor.state.code) || invoked_actor.id == eam_actor_id } else { false }