diff --git a/ante/ante.go b/ante/ante.go index 19a63231111..0128cf4b744 100644 --- a/ante/ante.go +++ b/ante/ante.go @@ -5,6 +5,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + ibcante "github.com/cosmos/ibc-go/v3/modules/core/ante" ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper" gaiafeeante "github.com/cosmos/gaia/v8/x/globalfee/ante" @@ -47,22 +48,19 @@ func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) { anteDecorators := []sdk.AnteDecorator{ ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first - // ante.NewExtensionOptionsDecorator(opts.ExtensionOptionChecker), + ante.NewRejectExtensionOptionsDecorator(), ante.NewValidateBasicDecorator(), ante.NewTxTimeoutHeightDecorator(), ante.NewValidateMemoDecorator(opts.AccountKeeper), ante.NewConsumeGasForTxSizeDecorator(opts.AccountKeeper), gaiafeeante.NewFeeDecorator(opts.BypassMinFeeMsgTypes, opts.GlobalFeeSubspace, opts.StakingSubspace), - // if opts.TxFeeCheck is nil, it is the default fee check ante.NewDeductFeeDecorator(opts.AccountKeeper, opts.BankKeeper, opts.FeegrantKeeper), - // ante.NewDeductFeeDecorator(opts.AccountKeeper, opts.BankKeeper, opts.FeegrantKeeper, opts.TxFeeChecker), 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), - // TODO: check what this is - // ibcante.NewRedundantRelayDecorator(opts.IBCkeeper), + ibcante.NewAnteDecorator(opts.IBCkeeper), } return sdk.ChainAnteDecorators(anteDecorators...), nil diff --git a/app/app.go b/app/app.go index b6c4f162e37..8cb5a76bb19 100644 --- a/app/app.go +++ b/app/app.go @@ -197,18 +197,6 @@ func NewGaiaApp( FeegrantKeeper: app.FeeGrantKeeper, SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), SigGasConsumer: ante.DefaultSigVerificationGasConsumer, - // TxFeeChecker is not the default fee check, it will not check if the fee meets min_gas_price, this is checked in NewFeeWithBypassDecorator already. - // TxFeeChecker: func(ctx sdk.Context, tx sdk.Tx) (sdk.Coins, int64, error) { - // feeTx, ok := tx.(sdk.FeeTx) - // if !ok { - // return nil, 0, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") - // } - - // feeCoins := feeTx.GetFee() - // priority := gaiafeeante.GetTxPriority(feeCoins) - - // return feeCoins, priority, nil - // }, }, IBCkeeper: app.IBCKeeper, BypassMinFeeMsgTypes: bypassMinFeeMsgTypes, diff --git a/docs/modules/gov.md b/docs/modules/gov.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index 16f471c6ef8..76ed74a0e64 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -18,8 +18,6 @@ func (s *IntegrationTestSuite) TestGov() { // globalfee in genesis is set to be "0.00001uatom" func (s *IntegrationTestSuite) TestQueryGlobalFeesInGenesis() { - // TODO: Fix and add back this test - s.T().Skip() chainAAPIEndpoint := fmt.Sprintf("http://%s", s.valResources[s.chainA.id][0].GetHostPort("1317/tcp")) feeInGenesis, err := sdk.ParseDecCoins(initialGlobalFeeAmt + uatomDenom) s.Require().NoError(err) @@ -66,9 +64,7 @@ test4: gov propose globalfee = 0.000001uatom (lower than min_gas_price), 0photo test5: check balance correct: all the successful bank sent tokens are received test6: gov propose change back to initial globalfee = 0.00001photon, This is for not influence other e2e tests. */ -// TODO: add back global fee tests func (s *IntegrationTestSuite) TestGlobalFees() { - s.T().Skip() chainAAPIEndpoint := fmt.Sprintf("http://%s", s.valResources[s.chainA.id][0].GetHostPort("1317/tcp")) submitterAddr := s.chainA.validators[0].keyInfo.GetAddress() @@ -79,7 +75,8 @@ func (s *IntegrationTestSuite) TestGlobalFees() { var beforeRecipientPhotonBalance sdk.Coin s.Require().Eventually( func() bool { - beforeRecipientPhotonBalance, err := getSpecificBalance(chainAAPIEndpoint, recipient, photonDenom) + var err error + beforeRecipientPhotonBalance, err = getSpecificBalance(chainAAPIEndpoint, recipient, photonDenom) s.Require().NoError(err) return beforeRecipientPhotonBalance.IsValid()