-After the prologue has run and we've checked in part that the account can cover its gas liability, the rest of the transaction flow starts with the "gas tank" full at `max\_gas\_amount`. The `MIN\_TXN\_FEE` is charged, after which the gas tank is then deducted (or "charged") for each instruction executed by the VM. This per-instruction deduction continues until either (1) the execution of the transaction has completed — in which case, the epilogue is run and the execution fee deducted — or (2) the "gas tank" becomes empty, in which case an `OutOfGas` error is raised. In the former, the fee is distributed and the result of the transaction is persisted. The latter causes the execution of the transaction to stop when the error is raised, following which the total gas liability of the transaction is deducted and distributed. No other remnants of the execution are persisted other than the deduction in this case [2].
0 commit comments