Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

EIP-1559 Transaction Gas Fixes #1307

Merged
merged 38 commits into from
Oct 7, 2021
Merged

EIP-1559 Transaction Gas Fixes #1307

merged 38 commits into from
Oct 7, 2021

Conversation

MicaiahReid
Copy link
Contributor

@MicaiahReid MicaiahReid commented Oct 5, 2021

  • Adds effectiveGasPrice to GanacheRawExtraTx so that it is stored in the db.
    • Uses forked tx's gasPrice to store effectiveGasPrice when creating the forked tx.
    • Uses stored effectiveGasPrice to set gasPrice when getting a tx from the db.
    • This fixes a bug where certain database transaction's gasPrice when fetching via eth_getTransactionByHash would sometimes be wrong.
  • Updates test for eth_getTransactionByHash to check more values than just transactionIndex.
  • Updates forking transaction test to make sure gasPrice values line up for the very specific fail case.
  • Fixes broken tests in the miner that were caused by the the incorrect gasPrice bug
  • Uses eip-1559 gas fields in eth_call
  • Adds very basic tests for eth_call
  • Fixes bug in RuntimeBlock where a 0 value for baseFeePerGas would completely leave out the baseFeePerGas field from the block.
  • Fixes bug in TransactionFactory where a tx that omits the type but has maxFeePerGas/maxPriorityFeePerGas specified would have those fields overwritten. (no type => assume type 0, no gasPrice => upgrade to type 2 => assume no type 2 fields were given. the last assumption is wrong)
  • Adds field checks that were previously left out of eip-1559 tx tests

Closes #1213 & #1214

@MicaiahReid MicaiahReid changed the title Fix/eip 1559 tx gas EIP-1559 Transaction Gas Fixes Oct 5, 2021
@MicaiahReid MicaiahReid self-assigned this Oct 5, 2021
Copy link
Member

@davidmurdoch davidmurdoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really great work here! Just a few comments/suggestions!

@davidmurdoch davidmurdoch self-requested a review October 7, 2021 16:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type 2 gasPrice needs to be handled better
2 participants