-
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
refactor(x/auth/middleware)!: tx middleware to support pluggable feemarket module #11413
Conversation
319ee44
to
d4f51a2
Compare
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.
blocking for now, would prefer to include this in 0.47, to be able to have ledger support
Codecov Report
@@ Coverage Diff @@
## master #11413 +/- ##
==========================================
- Coverage 65.96% 65.87% -0.10%
==========================================
Files 675 678 +3
Lines 69832 69843 +11
==========================================
- Hits 46065 46009 -56
- Misses 21073 21130 +57
- Partials 2694 2704 +10
|
If we agree to put extensions in
|
So according to my understanding, we have here choices here:
So the consequences of 1 and 3 are the same if we add the reject condition in |
1967e9e
to
3c0b971
Compare
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.
Implementation LGTM, added a couple of few nits here and there
Let's go back to analysis and discuss pros/cons of including adding new extensions to AuthInfo or Fee. Tier selection is related to the tx priority and tx fee level (higher tires have higher fees - but this is not necessary a case). Based on the AuthInfo doc, following the pedantic approach, then the tier / priority selection should also not be a part of the
So we go back to re-use the Supporting Leger seams to be a very valid use case, specially that some ledger transactions will like to get executed immediately. What's the chance that a transaction won't be processed in next 2-3 blocks in a busy chains like Terra or Crypto.com? Can we add |
Adding extensions to Authinfo has all the pros, and @yihuang's solution 3 in #11413 (comment) makes sure there's no malleability issue. The only con is Ledger support. We can add ledger support for extension_options in both TxBody and AuthInfo, but it'll take some time. The current solution can be merged for v0.46, we just make it clear amino signing is not supported. And ledger support will come in 0.47 |
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.
Not blocking but we should not sneak in such a large breaking change right before the release of 0.46-beta without a deprecation path for the old middleware
now I see in the comment that the old behaviour is in the staticfeemarket but there is not changelog entry for this. Why do we need to break the api here?
Co-authored-by: Amaury <[email protected]>
Sounds good to me. |
Got a response from ledger that unknown fields are simply ignored by the ledger app. IMO, this means that we cannot add We can merge this PR as-is. |
Since this is an important decision for transaction processing, I would like to wait for a final ack from @aaronc . He will be back on Monday. |
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.
Just a few small things I would like to see addressed. It would be nice to make the language about "fee markets" a little clearer and either come up with a different term or explain it better. Generally this looks like a good approach 👍
Added one more thing: Unpack the how it's gonna be used: https://github.com/yihuang/cosmos-sdk/blob/a61283b5aefaf1ce30177666442ecf4ec6311aff/x/tieredfee/types/codec.go. |
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.
Thanks for the update
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. Let's put automerge as soon as the test is fixed
Closes: #11415
Description
FeeMarket
interface, and move exiting static fee logic intoStaticFeeMarket
implementation.MempoolFeeMiddleware
andTxPriorityMiddleware
intoDeductFeeMiddleware
, so we can deduct fee based on the check result.Support extension options inKeep in TxBodyTx.AuthInfo
, so feemarket module can extend the tx fields.Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change