Skip to content

Conversation

@mokita-j
Copy link
Contributor

@mokita-j mokita-j commented Jan 28, 2026

Description

ExecutionTracer was reporting gasCost=0 for parent traces containing sub-calls. The gasCost should reflect the opcode cost plus the cumulative gas consumed by all sub-calls.

This PR:

  • Aggregates gas_cost and weight_cost in ExecutionTracer for nested calls
  • Adds test coverage for nested call gas tracking in both EVM and PVM modes

Review Notes

To check that ExecuteTracer has gasCost=0 for any *CALL trace. Run delegatecall-playground.ts

git clone https://github.com/paritytech/contracts-boilerplate.git
git checkout mj/trace-gas-cost-geth
# with revive node running
./cli/delegatecall-playground.ts

*This can also be checked in the benchmark reports, e.g. table.

To check Geth behaviour run the same script with geth node.

@mokita-j mokita-j requested a review from pgherveou January 28, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants