erigontech / erigon

Ethereum implementation on the efficiency frontier https://erigon.gitbook.io
GNU Lesser General Public License v3.0
3.1k stars 1.09k forks source link

core: Check `gasBailout` before deducting balance in trace_call (#11813) #11866

Closed somnathb1 closed 1 week ago

somnathb1 commented 1 week ago

Existing behaviour:

New behaviour:

More rationale This would mean the sender's account would show "balance": "=" in trace_call rpc method, that is, no change, if gas is the only thing the user pays for. This is fine because the gas price can fluctuate in a real transaction. This also removes the inconsistency of sometimes having to bother deducting the amount if it is less than sender's balance, thereby causing a bug/inconsistency.(https://github.com/erigontech/erigon/pull/11813)

somnathb1 commented 1 week ago

Cherry pick from release/2.60