Commit f88aa3c
committed
fix(state_gas): fix state_gas_spent propagation and add TIP-1016 tests
Fix three bugs in state gas accounting:
- handle_reservoir_remaining_gas success path: accumulate child's
state_gas_spent into parent instead of overwriting, preserving
parent's prior charges (new_account + create state gas)
- handle_reservoir_remaining_gas revert path: set parent reservoir
to child's final reservoir to reflect consumed state gas
- load_account_delegated: only charge new_account_state_gas when
value is transferred, matching regular new_account_cost behavior
Add 34 comprehensive TIP-1016 tests covering all categories:
SSTORE, CREATE, CALL, CPU gas cap, propagation, interactions,
and reservoir refill, each with 5+ assertions.1 parent ff186d3 commit f88aa3c
3 files changed
Lines changed: 876 additions & 211 deletions
File tree
- crates
- ee-tests/src
- handler/src
- interpreter/src/instructions/contract
0 commit comments