You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(execute): add gas validation for benchmark tests in execute mode
Previously, execute mode was not validating that transactions consumed
the expected amount of gas when expected_benchmark_gas_used was set.
This could cause benchmark tests to incorrectly pass even when consuming
significantly less gas than expected (e.g., due to missing factory contracts).
This feature is needed by benchmark tests like the ones in #2186 in
order to make sure that the benchmarks are indeed consuming all gas
available or causing a failure otherwise when the flag is set.
Changes:
- Add expected_benchmark_gas_used and skip_gas_used_validation fields to TransactionPost
- Implement gas validation logic in TransactionPost.execute() using transaction receipts
- Pass gas validation parameters from StateTest and BlockchainTest to TransactionPost
- Add eth_getTransactionReceipt RPC method to fetch gas used from receipts
This ensures benchmark tests fail appropriately when gas consumption doesn't match
expectations, preventing false positives in performance testing.
0 commit comments