Specific bytecode inputs to the EVM could lead to overflowing additions in gas and balance variables. This PR makes turns those additions into saturating_add so that balance/gas requirements will always exceed the capacity of the caller to incur those costs, and the call will fail.
@guidovranken hi I would also like to verify the correctness of gas consumption. Could you please provide a testing method? Thank you very much for your help.
Description
Specific bytecode inputs to the EVM could lead to overflowing additions in gas and balance variables. This PR makes turns those additions into
saturating_add
so that balance/gas requirements will always exceed the capacity of the caller to incur those costs, and the call will fail.Performance / NEAR gas cost considerations
Testing
Fuzzing.
How should this be reviewed
Additional information