Skip to content

Commit

Permalink
feat: upgrade to Cosmos SDK Twilight (backport #33) (#127)
Browse files Browse the repository at this point in the history
Co-authored-by: John Letey <john@kyve.network>
  • Loading branch information
mergify[bot] and johnletey authored Sep 26, 2023
1 parent 55b9f4b commit f1b72f0
Show file tree
Hide file tree
Showing 104 changed files with 1,723 additions and 1,448 deletions.
2 changes: 1 addition & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The KYVE Network

###### v1.3.1
###### v1.4.0

The KYVE consensus layer is the backbone of the KYVE ecosystem. This layer is a
sovereign Delegated Proof of Stake network built using the
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@

An '!' indicates a state machine breaking change.

## [Unreleased]

### Improvements

- (deps) [#33](https://github.com/KYVENetwork/chain/pull/33) Upgrade Cosmos SDK to [v0.47.5](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.5) ([`v0.47.5-kyve`](https://github.com/KYVENetwork/cosmos-sdk/releases/tag/v0.47.5-kyve-rc0)).

## [v1.3.1](https://github.com/KYVENetwork/chain/releases/tag/v1.3.1) - 2023-08-02

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
COMMIT := $(shell git log -1 --format='%H')
GO_VERSION := $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1,2)
VERSION := v1.3.1 # $(shell echo $(shell git describe --tags) | sed 's/^v//')
VERSION := v1.4.0 # $(shell echo $(shell git describe --tags) | sed 's/^v//')

TEAM_ALLOCATION := 165000000000000
ifeq ($(ENV),kaon)
Expand Down
20 changes: 7 additions & 13 deletions app/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,20 @@ import (
// Global
"github.com/KYVENetwork/chain/x/global"
globalKeeper "github.com/KYVENetwork/chain/x/global/keeper"
// Gov
govKeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
// IBC
ibcAnte "github.com/cosmos/ibc-go/v6/modules/core/ante"
ibcKeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"
// IBC Core
ibcAnte "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibcKeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
// Staking
stakingKeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
)

// https://github.com/cosmos/cosmos-sdk/blob/release/v0.46.x/x/auth/ante/ante.go#L25
// https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/x/auth/ante/ante.go#L25

func NewAnteHandler(
accountKeeper authKeeper.AccountKeeper,
bankKeeper bankKeeper.Keeper,
feeGrantKeeper feeGrantKeeper.Keeper,
globalKeeper globalKeeper.Keeper,
govKeeper govKeeper.Keeper,
ibcKeeper *ibcKeeper.Keeper,
stakingKeeper stakingKeeper.Keeper,
sigGasConsumer ante.SignatureVerificationGasConsumer,
Expand All @@ -40,8 +37,6 @@ func NewAnteHandler(

gasAdjustmentDecorator := global.NewGasAdjustmentDecorator(globalKeeper)

initialDepositDecorator := global.NewInitialDepositDecorator(globalKeeper, govKeeper)

anteDecorators := []sdk.AnteDecorator{
ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first
gasAdjustmentDecorator,
Expand All @@ -57,7 +52,6 @@ func NewAnteHandler(
ante.NewSigVerificationDecorator(accountKeeper, signModeHandler),
ante.NewIncrementSequenceDecorator(accountKeeper),
ibcAnte.NewRedundantRelayDecorator(ibcKeeper),
initialDepositDecorator,
}

return sdk.ChainAnteDecorators(anteDecorators...), nil
Expand All @@ -69,12 +63,12 @@ func NewPostHandler(
bankKeeper bankKeeper.Keeper,
feeGrantKeeper feeGrantKeeper.Keeper,
globalKeeper globalKeeper.Keeper,
) (sdk.AnteHandler, error) {
) (sdk.PostHandler, error) {
refundFeeDecorator := global.NewRefundFeeDecorator(bankKeeper, feeGrantKeeper, globalKeeper)

postDecorators := []sdk.AnteDecorator{
postDecorators := []sdk.PostDecorator{
refundFeeDecorator,
}

return sdk.ChainAnteDecorators(postDecorators...), nil
return sdk.ChainPostDecorators(postDecorators...), nil
}
Loading

0 comments on commit f1b72f0

Please sign in to comment.