forked from ethereum-optimism/op-geth
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-instate correct eip1559 gas price calcualtions (#197)
* Re-instate correct eip1559 gas price calcualtions In this commit dfd1d38 Ponti mistakenly removed gas price calculation for eip1559 style transactions retreived via the RPC. This resulted in gasFeeCap being returned for all transactions except depost transactions. So this commit fixes that but also adds support for calculating gas price for our migrated transactions as well. Prior to the gingerbread hardfork celo stored the base fee in state as opposed to on the block, this PR does not add code to be able to retrieve the base fee from state, so for all pre-gingerbread eip1559 style transactions we have no way to calculate the gas price and therefore will return null. Post gingerbread celo added the base fee to the block, this enables us to calculate the correct gas price for transactions using the native currency. For transactions using alternative fee currencies we still cannot calculate the correct gas price since we would need to look up the base fee and exchange rate from the state and we havend added code to do this. Post cel2 for celo eip1559 style transactions the baseFee in fee currency is stored on the receipt which means that we can calcualte the correct base fee for all transactions. Co-authored-by: Paul Lange <[email protected]>
- Loading branch information
Showing
4 changed files
with
490 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.