-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
move feegrant ante to auth ante #8682
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8682 +/- ##
==========================================
+ Coverage 58.91% 59.22% +0.31%
==========================================
Files 574 568 -6
Lines 32122 31804 -318
==========================================
- Hits 18924 18837 -87
+ Misses 10979 10760 -219
+ Partials 2219 2207 -12
|
…-sdk into atheesh/move_feegrant_ante
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.
lgtm
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.
So reading this PR again, I still think it's quite confusing.
I believe we initially wanted separate decorators, because feegrant seemed like an optional module, which apps could choose to include or not.
TBH right now I really wish to see it as a core module that will be in most/all chains, so I propose @aaronc's (a) solution: to have one single decorator in x/auth that handles everything related to fees.
So:
- we remove RejectFeeGranterDecorator and DeductGrantedFeeDecorator
- we put all their logic in the single DeductFeeDecorator (it takes a nullable FeeGrantKeeper as argument)
It will also be easier to understand the fee deduction logic in this case.
Sorry @atheeshp again for not having thought this through at first.
Ah, yes I think I misunderstood what @aaronc is saying here, thanks for making it clear @AmauryM . |
Benchmark beginning. Status page: https://github.orijtech.com/benchmark/status?commit=576a93a1b0ef31b733eac3950d7fefac38b2011e |
Benchmark finished. See the result: https://github.orijtech.com/benchmark/result?id=e7adba9d3c064ffc8537c4231f4aa2e8 |
anteHandler, err := ante.NewAnteHandler( | ||
ante.HandlerOptions{ | ||
AccountKeeper: app.AccountKeeper, | ||
BankKeeper: app.BankKeeper, | ||
SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), | ||
FeegrantKeeper: app.FeeGrantKeeper, | ||
SigGasConsumer: ante.DefaultSigVerificationGasConsumer, | ||
}, |
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.
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.
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.
Verbal ACK from @alexanderbez on our SDK call today
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.
Looks great!
…-sdk into atheesh/move_feegrant_ante
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.
LGTM, can we add a changelog entry?
Benchmark beginning. Status page: https://github.orijtech.com/benchmark/status?commit=bb91e5b3f9b9b51b3781e790d3960297d61317cc |
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.
ACK'd - pending changelog entry.
func TestAnteTestSuite(t *testing.T) { | ||
suite.Run(t, new(AnteTestSuite)) | ||
} |
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.
If you remove this, the test cases in AnteTestSuite
won't run.
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.
This suite is no longer required, since all tests which are in x/feegrant/ante
moved to x/auth/ante
and using the test suite from the same package(x/auth/ante
).
…-sdk into atheesh/move_feegrant_ante
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.
changelog added, I'm putting automerge on!
* move feegrant ante to auth ante * update ante builder * remove commented code * review changes * fix lint * review changes * review changes * review changes * review changes * fix ante builder * review changes * update ante builder with options struct * review changes * review changes * add changelog Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> Co-authored-by: Aaron Craelius <aaron@regen.network>
Description
closes: #8611
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes