Skip to content
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

feat: upgrade to Cosmos SDK Twilight #33

Merged
merged 21 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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