-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: Move TxDecoder into its own middleware #10612
Conversation
e793cd2
to
c63122e
Compare
…0610-txdecoder-middleware
This pull request introduces 1 alert when merging d6b0884 into 5d86db3 - view on LGTM.com new alerts:
|
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
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
@@ -112,6 +112,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ | |||
* (x/gov) [\#10373](https://github.com/cosmos/cosmos-sdk/pull/10373) Removed gov `keeper.{MustMarshal, MustUnmarshal}`. | |||
* [\#10348](https://github.com/cosmos/cosmos-sdk/pull/10348) StdSignBytes takes a new argument of type `*tx.Tip` for signing over tips using LEGACY_AMINO_JSON. | |||
* [\#10208](https://github.com/cosmos/cosmos-sdk/pull/10208) The `x/auth/signing.Tx` interface now also includes a new `GetTip() *tx.Tip` method for verifying tipped transactions. The `x/auth/types` expected BankKeeper interface now expects the `SendCoins` method too. | |||
* [\#10612](https://github.com/cosmos/cosmos-sdk/pull/10612) `baseapp.NewBaseApp` constructor function doesn't take the `sdk.TxDecoder` anymore. This logic has been moved into the TxDecoderMiddleware. |
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 to mention this is required to be added in middleware, so when people read this they know this is a change they must make
* WIP: middleware refactor * refactor `tx.Request` * Add MsgResponses any in sdk.Result * add helper functions in abci * refactor tips * review changes * Fix mock tests * Update baseapp/abci.go * Update baseapp/abci.go * Update types/tx/middleware.go * Update types/tx/middleware.go * tx.Response to abci conversion * refactor makeABCIData * Add comments * Fix build * fix build error * fix tests * fix test * fix tests * Fix TestSimulateTx * fix tests * fix test * Fix build * Simplify code * fix test build * Use repeated bytes in txMsgData * Fix grpc-gateway test * Make proto-gen * Automagically register MsgResponse * review changes * Use froydi's trick * Use Any in TxMsgData * Finally remove API breaking change * Revert unnecessary stuff * refactor: Move TxDecoder into its own middleware * Add test for txDecoderMiddleware * Fix some baseapp tests * Fix some more tests * Fix mock tests * Fix middleware tests * Add cl * Fix tests * Update types/tx/middleware.go Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com> Co-authored-by: atheesh <atheesh@vitwit.com> Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
* WIP: middleware refactor * refactor `tx.Request` * Add MsgResponses any in sdk.Result * add helper functions in abci * refactor tips * review changes * Fix mock tests * Update baseapp/abci.go * Update baseapp/abci.go * Update types/tx/middleware.go * Update types/tx/middleware.go * tx.Response to abci conversion * refactor makeABCIData * Add comments * Fix build * fix build error * fix tests * fix test * fix tests * Fix TestSimulateTx * fix tests * fix test * Fix build * Simplify code * fix test build * Use repeated bytes in txMsgData * Fix grpc-gateway test * Make proto-gen * Automagically register MsgResponse * review changes * Use froydi's trick * Use Any in TxMsgData * Finally remove API breaking change * Revert unnecessary stuff * refactor: Move TxDecoder into its own middleware * Add test for txDecoderMiddleware * Fix some baseapp tests * Fix some more tests * Fix mock tests * Fix middleware tests * Add cl * Fix tests * Update types/tx/middleware.go Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com> Co-authored-by: atheesh <atheesh@vitwit.com> Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
Description
Closes: #10610
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