Closed m-Peter closed 1 month ago
The changes involve enhancements to the transaction model and testing framework within the codebase. Key modifications include the introduction of an EffectiveGasPrice
method to better calculate gas prices based on transaction types, updates to comments for clarity, and the addition of end-to-end tests for transaction fee evaluations across various Ethereum transaction types.
Files | Change Summary |
---|---|
api/models.go | Updated comments in NewTransaction for clarity regarding GasPrice assignment. |
models/transaction.go | Introduced EffectiveGasPrice method in Transaction interface and its implementations in structs. |
tests/e2e_web3js_test.go | Added a new sub-test in TestWeb3_E2E for evaluating transaction type fees. |
tests/web3js/eth_transaction_type_fees_test.js | New test file for comprehensive testing of transaction fee calculations across different Ethereum transaction types. |
sequenceDiagram
participant Client
participant EVM Gateway
participant TransactionProcessor
participant Database
Client->>EVM Gateway: Send transaction
EVM Gateway->>TransactionProcessor: Process transaction
TransactionProcessor->>TransactionProcessor: Calculate EffectiveGasPrice
TransactionProcessor->>Database: Store transaction details
Database->>EVM Gateway: Confirm transaction
EVM Gateway->>Client: Return transaction receipt
Objective | Addressed | Explanation |
---|---|---|
Use the proper value for EffectiveGasPrice (#355) |
✅ |
🐇 In the meadow, transactions play,
Gas prices dance in a whimsical way.
With methods new and tests so bright,
We hop along, all feels just right!
For every fee, we now have a guide,
In the code, our joys reside! 🌼✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Question? why not just using the EffectiveGasTipValue method on the geth.Transaction type, it automatically make internal calls based on the types.
Question? why not just using the EffectiveGasTipValue method on the geth.Transaction type, it automatically make internal calls based on the types.
@ramtinms Good idea :ok_hand: Updated in https://github.com/onflow/flow-evm-gateway/pull/479/commits/a355b9c4228c9c39e6344389c399b14fd27e2bb5
Closes: https://github.com/onflow/flow-evm-gateway/issues/355
Description
There was a bug, with the
EffectiveGasPrice
field on receipts from dynamic fee transactions. We fix this, and add plenty of test cases, to make sure that we use the proper value for this field, and that we correctly drop transactions which do not meet the minimum gas price set by EVM Gateway operators. EffectiveGasPrice implementation from our fork ofgo-ethereum
.For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
Bug Fixes
Tests