Skip to content

Commit

Permalink
Add minimal fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RomarQ committed Mar 9, 2025
1 parent bca04e1 commit 2b9360b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions runtime/common/src/apis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,14 @@ macro_rules! impl_runtime_apis_plus_common {
for ext in extrinsics.into_iter() {
match &ext.0.function {
RuntimeCall::Ethereum(transact { transaction }) => {

// Reset the previously consumed weight when tracing multiple transactions.
// This is necessary because EVM tracing introduces additional
// (ref_time) overhead, which differs from the production runtime behavior.
// Without resetting the block weight, the extra tracing overhead could
// leading to some transactions to incorrectly fail during tracing.
frame_system::BlockWeight::<Runtime>::kill();

let tx_hash = &transaction.hash();
if known_transactions.contains(&tx_hash) {
// Each known extrinsic is a new call stack.
Expand Down

0 comments on commit 2b9360b

Please sign in to comment.