This repository has been archived by the owner on Apr 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 562
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
crypto-facs
requested review from
fedekunze,
khoslaventures and
jolube
as code owners
June 1, 2022 18:54
alexanderbez
reviewed
Jun 1, 2022
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.
I can't speak for the changes in app/ante/eth.go
, but otherwise this looks like the correct approach 👍
fedekunze
reviewed
Jun 2, 2022
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.
Left some comments, there are also some tests failing 👍
Can you update the specification to reflect the new changes?
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
fedekunze
reviewed
Jun 3, 2022
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## main #1105 +/- ##
==========================================
+ Coverage 61.36% 61.78% +0.42%
==========================================
Files 88 88
Lines 7213 7257 +44
==========================================
+ Hits 4426 4484 +58
+ Misses 2563 2553 -10
+ Partials 224 220 -4
|
fedekunze
reviewed
Jun 3, 2022
yihuang
reviewed
Jun 3, 2022
fedekunze
reviewed
Jun 3, 2022
fedekunze
reviewed
Jun 4, 2022
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
fedekunze
approved these changes
Jun 5, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes: #XXX
Description
This PR aims to fix a design issue on our current BaseFee calculation by the FeeMarket. Our BaseFee is currently reacting to network congestion based on how much
gasUsed
did the parent block had. We are storing this value in theGenesisState
of the FeeMarket module for it to be used on the child block and calculate the new BaseFee based on that (increase or decrease). This does not reflect the network congestion on a Cosmos SDK chain as blocks are actually filled based ongasWanted
(aka GasLimit) independently from how much we refund the user after how muchgasUsed
did the tx required.Based on this, a solution had been discussed where we base this reaction on a total
gasWanted
value per block that is tracked on the FeeMarket TransientStore for it to be stored onEndBlock
on theGenesisState
of the FeeMarket module for the child block to calculate BaseFee on it.The was no need to changed the GenesisState
BlockGas
property name, just the way it was calculated.NOTE: I am missing some tests to make sure the BaseFee is being calculated correctly.
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)