Automatically merged updates to draft EIP(s) 1559 (#2835)

Hi, I'm a bot! This change was automatically merged because:

 - It only modifies existing Draft or Last Call EIP(s)
 - The PR was approved or written by at least one author of each modified EIP
 - The build is passing
This commit is contained in:
Naoya Okanami 2020-08-02 00:43:05 +09:00 committed by GitHub
parent 172dbeb85b
commit ab5191baf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,7 +93,7 @@ For the gas price:
* During transaction execution, for EIP1559 transactions we calculate the cost to the `tx.origin` and the gain to the `block.coinbase` as follows:
* Set `GASPRICE = min(BASEFEE + tx.GasPremium, tx.fee_cap)`
* Let `GASUSED` be the gas used during the transaction execution/state transition
* The `tx.origin` initially pays `GASPRICE * tx.gas`, and gets refunded `GASPRICE * (tx.gas - GASUSED)`
* The `tx.origin` initially pays `GASPRICE * tx.gasLimit`, and gets refunded `GASPRICE * (tx.gasLimit - GASUSED)`
* The `block.coinbase` gains `(GASPRICE - BASEFEE) * GASUSED`.
* If `GASPRICE < BASEFEE` (due to the `FEECAP`), this means that the `block.coinbase` _loses_ funds from this operation; in this case, we check that the post-balance is non-negative and throw an exception if it is negative.