Add up the possible value that user must pay beforehand to buy gas
Deduct that amount from the sender's account in intraBlockState, but:
Don't deduct the gas value amount if the user doesn't have enough, and gasBailout is set
New behaviour:
Don't check if sender's balance is enough to pay gas value amount, nor deduct it, if gasBailout is set
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)
Existing behaviour:
intraBlockState
, but:gasBailout
is setNew behaviour:
gasBailout
is setMore rationale This would mean the sender's account would show
"balance": "="
intrace_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)