Skip to content

Commit

Permalink
chore: merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
shifty11 committed Sep 26, 2023
2 parents 1b302c0 + d4570af commit cca1fee
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 52 deletions.
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@

An '!' indicates a state machine breaking change.

## [v1.4.0](https://github.com/KYVENetwork/chain/releases/tag/v1.4.0) - 2023-09-12
## [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)).
- [#35](https://github.com/KYVENetwork/chain/pull/35) Use [interchaintest](https://github.com/strangelove-ventures/interchaintest) to test chain upgrades.
- (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

Expand Down
6 changes: 6 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,12 @@ func NewKYVEApp(
app.AccountKeeper,
)

app.FeeGrantKeeper = feeGrantKeeper.NewKeeper(
appCodec,
keys[feeGrantTypes.StoreKey],
app.AccountKeeper,
)

app.GroupKeeper = groupKeeper.NewKeeper(
keys[groupTypes.StoreKey],
appCodec,
Expand Down
36 changes: 34 additions & 2 deletions app/upgrades/v1_4/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ import (
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
authTypes "github.com/cosmos/cosmos-sdk/x/auth/types"
bankTypes "github.com/cosmos/cosmos-sdk/x/bank/types"
crisisTypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
distributionTypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
govTypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
mintTypes "github.com/cosmos/cosmos-sdk/x/mint/types"
paramsTypes "github.com/cosmos/cosmos-sdk/x/params/types"
slashingTypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
stakingTypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/cosmos/ibc-go/v7/modules/core/exported"
ibcTmMigrations "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint/migrations"

Expand All @@ -19,7 +28,6 @@ import (

// Params
paramsKeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
paramsTypes "github.com/cosmos/cosmos-sdk/x/params/types"
// Upgrade
upgradeTypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)
Expand All @@ -38,13 +46,37 @@ func CreateUpgradeHandler(
logger := ctx.Logger().With("upgrade", UpgradeName)
logger.Info("Run v1.4 upgrade")

var err error
distributionSpace, _ := paramsKeeper.GetSubspace("distribution")
distributionSpace.WithKeyTable(distributionTypes.ParamKeyTable())

stakingSpace, _ := paramsKeeper.GetSubspace("staking")
stakingSpace.WithKeyTable(stakingTypes.ParamKeyTable())

authSpace, _ := paramsKeeper.GetSubspace("auth")
authSpace.WithKeyTable(authTypes.ParamKeyTable())

bankSpace, _ := paramsKeeper.GetSubspace("bank")
bankSpace.WithKeyTable(bankTypes.ParamKeyTable())

crisisSpace, _ := paramsKeeper.GetSubspace("crisis")
crisisSpace.WithKeyTable(crisisTypes.ParamKeyTable())

govSpace, _ := paramsKeeper.GetSubspace("gov")
govSpace.WithKeyTable(govTypes.ParamKeyTable())

mintSpace, _ := paramsKeeper.GetSubspace("mint")
mintSpace.WithKeyTable(mintTypes.ParamKeyTable())

slashingSpace, _ := paramsKeeper.GetSubspace("slashing")
slashingSpace.WithKeyTable(slashingTypes.ParamKeyTable())

// Migrate consensus parameters from x/params to dedicated x/consensus module.
baseAppSubspace := paramsKeeper.Subspace(baseapp.Paramspace).
WithKeyTable(paramsTypes.ConsensusParamsKeyTable())
baseapp.MigrateParams(ctx, baseAppSubspace, &consensusKeeper)

var err error

// ibc-go v7.0 to v7.1 upgrade
// explicitly update the IBC 02-client params, adding the localhost client type
params := ibcKeeper.ClientKeeper.GetParams(ctx)
Expand Down
30 changes: 15 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ require (
github.com/spf13/viper v1.16.0
github.com/strangelove-ventures/packet-forward-middleware/v7 v7.0.0-20230523193151-73dea436e53f
github.com/stretchr/testify v1.8.4
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d
google.golang.org/grpc v1.58.1
google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529
google.golang.org/grpc v1.56.2
mvdan.cc/gofumpt v0.5.0
)

require (
4d63.com/gocheckcompilerdirectives v1.2.1 // indirect
4d63.com/gochecknoglobals v0.2.1 // indirect
cloud.google.com/go v0.110.6 // indirect
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go v0.110.4 // indirect
cloud.google.com/go/compute v1.20.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.1 // indirect
cloud.google.com/go/iam v1.1.0 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
cosmossdk.io/api v0.3.1 // indirect
cosmossdk.io/core v0.5.1 // indirect
Expand Down Expand Up @@ -287,22 +287,22 @@ require (
go.uber.org/goleak v1.1.12 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect
golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect
golang.org/x/mod v0.11.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/term v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sync v0.2.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/term v0.10.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/tools v0.8.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.126.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand All @@ -318,7 +318,7 @@ require (

replace (
// use kyve flavored cosmos/cosmos-sdk
github.com/cosmos/cosmos-sdk => github.com/KYVENetwork/cosmos-sdk v0.47.4-0.20230912091353-d2c627552db3
github.com/cosmos/cosmos-sdk => github.com/KYVENetwork/cosmos-sdk v0.47.5-kyve-rc0

// use cosmos flavored gogo/protobuf
// https://github.com/cosmos/cosmos-sdk/issues/8469
Expand Down
Loading

0 comments on commit cca1fee

Please sign in to comment.