-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix effectiveGasPrice computation for eth_getTransactionReceipt #2610
Merged
Conversation
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
elfedy
added
the
B5-clientnoteworthy
Changes should be mentioned in any downstream projects' release notes
label
Jan 5, 2024
Coverage Report@@ Coverage Diff @@
## master elfedy-fix-receipt-gas +/- ##
=========================================================
Coverage 80.94% 80.94% 0.00%
Files 287 287
Lines 94330 94330
=========================================================
Hits 76354 76354
Misses 17976 17976
|
librelois
reviewed
Jan 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work @elfedy, the test looks good to me, and it fail properly.
Now you can use your frontier branch with the fix
elfedy
added
the
D5-nicetohaveaudit⚠️
PR contains trivial changes to logic that should be properly reviewed.
label
Jan 9, 2024
elfedy
force-pushed
the
elfedy-fix-receipt-gas
branch
from
January 9, 2024 15:01
8db3477
to
a4f0a6c
Compare
librelois
approved these changes
Jan 12, 2024
librelois
changed the title
Fix effectiveGasPrice computaton for eth_getTransactionReceipt
Fix effectiveGasPrice computation for eth_getTransactionReceipt
Jan 12, 2024
ahmadkaouk
approved these changes
Jan 15, 2024
Agusrodri
approved these changes
Jan 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
B5-clientnoteworthy
Changes should be mentioned in any downstream projects' release notes
D5-nicetohaveaudit⚠️
PR contains trivial changes to logic that should be properly reviewed.
not-breaking
Does not need to be mentioned in breaking changes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does it do?
Fixes wrong value for
effectiveGasPrice
oneth_getTransactionReceipt
which is usingNextFeeMultiplier
from the block the transaction happened vs theNextFeeMultiplier
on the previous block which is the actual value used to compute the base fee for the transaction.Is there something left for follow-up PRs?
There might be other places where
gas_price
runtime call with the hash of the block is used to get the base fee. Those places should also be updated for the sake of consistency, maybe abstracting the computation of the base fee. Example: https://github.com/moonbeam-foundation/frontier/blob/2f509926db8df03aa6f831d48fcf18a3c456cc49/client/rpc/src/eth/block.rs#L114What alternative implementations were considered?
eth_getTransactionReceipt
rpc call makes a runtime call to moonbeam internally, there is the argument of implementing the fix on moonbeam via that runtime call vs patching frontier.Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?
moonbeam-foundation/frontier#199
What value does it bring to the blockchain users?
RPC users will get the actual effectiveGasPrice used by the transaction.