Skip to content

Commit

Permalink
feat!: remove gov ante decorators (#224)
Browse files Browse the repository at this point in the history
## Description

This PR removes the `gov ante decorators that were copied over from
Gaia, making it possible to use expedited proposals with any king of
proposal type.

<!-- Add a description of the changes that this PR introduces and the
files that
are the most critical to review. -->

---

### 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...

- [x] included the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR
Targeting](https://github.com/milkyway-labs/milkyway/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [x] followed the guidelines for [building
modules](https://docs.cosmos.network/v0.44/building-modules/intro.html)
- [ ] included the necessary unit and integration
[tests](https://github.com/milkyway-labs/milkyway/blob/master/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go
code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### 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...

- [ ] confirmed the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
  • Loading branch information
RiccardoM authored Dec 18, 2024
1 parent 163b4cb commit bd09f9a
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 731 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: feat
module: other
pull_request: 224
description: Removed gov ante decorators to allow any proposal to be run as expedited
backward_compatible: false
date: 2024-12-18T05:18:18.516560841Z
8 changes: 3 additions & 5 deletions ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type HandlerOptions struct {
AccountKeeper feemarketante.AccountKeeper
BankKeeper feemarketante.BankKeeper
Codec codec.BinaryCodec
IBCkeeper *ibckeeper.Keeper
IBCKeeper *ibckeeper.Keeper
StakingKeeper *stakingkeeper.Keeper
FeeMarketKeeper *feemarketkeeper.Keeper
TxFeeChecker ante.TxFeeChecker
Expand All @@ -57,7 +57,7 @@ func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) {
if opts.SignModeHandler == nil {
return nil, errorsmod.Wrap(milkywayerrors.ErrLogic, "sign mode handler is required for AnteHandler")
}
if opts.IBCkeeper == nil {
if opts.IBCKeeper == nil {
return nil, errorsmod.Wrap(milkywayerrors.ErrLogic, "IBC keeper is required for AnteHandler")
}
if opts.FeeMarketKeeper == nil {
Expand All @@ -82,14 +82,12 @@ func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) {
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(opts.AccountKeeper),
ante.NewConsumeGasForTxSizeDecorator(opts.AccountKeeper),
NewGovVoteDecorator(opts.Codec, opts.StakingKeeper),
NewGovExpeditedProposalsDecorator(opts.Codec),
ante.NewSetPubKeyDecorator(opts.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators
ante.NewValidateSigCountDecorator(opts.AccountKeeper),
ante.NewSigGasConsumeDecorator(opts.AccountKeeper, sigGasConsumer),
ante.NewSigVerificationDecorator(opts.AccountKeeper, opts.SignModeHandler),
ante.NewIncrementSequenceDecorator(opts.AccountKeeper),
ibcante.NewRedundantRelayDecorator(opts.IBCkeeper),
ibcante.NewRedundantRelayDecorator(opts.IBCKeeper),
}

if UseFeeMarketDecorator {
Expand Down
80 changes: 0 additions & 80 deletions ante/gov_expedited_ante.go

This file was deleted.

218 changes: 0 additions & 218 deletions ante/gov_expedited_ante_test.go

This file was deleted.

Loading

0 comments on commit bd09f9a

Please sign in to comment.