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

[v18] Base + IBC Callbacks + Incr Gov Metadata + CosmWasm 1.4 #818

Merged
merged 7 commits into from
Sep 19, 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/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: 1.20.7
GO_VERSION: 1.21.0

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: 1.20.7
GO_VERSION: 1.21.0

jobs:
analyze:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: 1.20.7
GO_VERSION: 1.21.0

jobs:
golangci:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/interchaintest-E2E.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
packages: write

env:
GO_VERSION: 1.20.7
GO_VERSION: 1.21.0
TAR_PATH: /tmp/juno-docker-image.tar
IMAGE_NAME: juno-docker-image

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# docker build . -t cosmoscontracts/juno:latest
# docker run --rm -it cosmoscontracts/juno:latest /bin/sh
FROM golang:1.20-alpine AS go-builder
FROM golang:1.21-alpine AS go-builder

# this comes from standard alpine nightly file
# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile
Expand Down
10 changes: 5 additions & 5 deletions app/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"

decorators "github.com/CosmosContracts/juno/v17/app/decorators"
feeshareante "github.com/CosmosContracts/juno/v17/x/feeshare/ante"
feesharekeeper "github.com/CosmosContracts/juno/v17/x/feeshare/keeper"
globalfeeante "github.com/CosmosContracts/juno/v17/x/globalfee/ante"
globalfeekeeper "github.com/CosmosContracts/juno/v17/x/globalfee/keeper"
decorators "github.com/CosmosContracts/juno/v18/app/decorators"
feeshareante "github.com/CosmosContracts/juno/v18/x/feeshare/ante"
feesharekeeper "github.com/CosmosContracts/juno/v18/x/feeshare/keeper"
globalfeeante "github.com/CosmosContracts/juno/v18/x/globalfee/ante"
globalfeekeeper "github.com/CosmosContracts/juno/v18/x/globalfee/keeper"
)

// Lower back to 1 mil after https://github.com/cosmos/relayer/issues/1255
Expand Down
37 changes: 24 additions & 13 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,19 @@ import (
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/CosmosContracts/juno/v17/app/keepers"
"github.com/CosmosContracts/juno/v17/app/openapiconsole"
upgrades "github.com/CosmosContracts/juno/v17/app/upgrades"
v10 "github.com/CosmosContracts/juno/v17/app/upgrades/v10"
v11 "github.com/CosmosContracts/juno/v17/app/upgrades/v11"
v12 "github.com/CosmosContracts/juno/v17/app/upgrades/v12"
v13 "github.com/CosmosContracts/juno/v17/app/upgrades/v13"
v14 "github.com/CosmosContracts/juno/v17/app/upgrades/v14"
v15 "github.com/CosmosContracts/juno/v17/app/upgrades/v15"
v16 "github.com/CosmosContracts/juno/v17/app/upgrades/v16"
v17 "github.com/CosmosContracts/juno/v17/app/upgrades/v17"
"github.com/CosmosContracts/juno/v17/docs"
"github.com/CosmosContracts/juno/v18/app/keepers"
"github.com/CosmosContracts/juno/v18/app/openapiconsole"
upgrades "github.com/CosmosContracts/juno/v18/app/upgrades"
v10 "github.com/CosmosContracts/juno/v18/app/upgrades/v10"
v11 "github.com/CosmosContracts/juno/v18/app/upgrades/v11"
v12 "github.com/CosmosContracts/juno/v18/app/upgrades/v12"
v13 "github.com/CosmosContracts/juno/v18/app/upgrades/v13"
v14 "github.com/CosmosContracts/juno/v18/app/upgrades/v14"
v15 "github.com/CosmosContracts/juno/v18/app/upgrades/v15"
v16 "github.com/CosmosContracts/juno/v18/app/upgrades/v16"
v17 "github.com/CosmosContracts/juno/v18/app/upgrades/v17"
v18 "github.com/CosmosContracts/juno/v18/app/upgrades/v18"
"github.com/CosmosContracts/juno/v18/docs"
)

const (
Expand All @@ -95,7 +96,17 @@ var (
// https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34
EnableSpecificProposals = ""

Upgrades = []upgrades.Upgrade{v10.Upgrade, v11.Upgrade, v12.Upgrade, v13.Upgrade, v14.Upgrade, v15.Upgrade, v16.Upgrade, v17.Upgrade}
Upgrades = []upgrades.Upgrade{
v10.Upgrade,
v11.Upgrade,
v12.Upgrade,
v13.Upgrade,
v14.Upgrade,
v15.Upgrade,
v16.Upgrade,
v17.Upgrade,
v18.Upgrade,
}
)

// These constants are derived from the above variables.
Expand Down
4 changes: 2 additions & 2 deletions app/apptesting/test_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/CosmosContracts/juno/v17/app"
appparams "github.com/CosmosContracts/juno/v17/app/params"
"github.com/CosmosContracts/juno/v18/app"
appparams "github.com/CosmosContracts/juno/v18/app/params"
)

type KeeperTestHelper struct {
Expand Down
2 changes: 1 addition & 1 deletion app/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package app
import (
"github.com/cosmos/cosmos-sdk/std"

"github.com/CosmosContracts/juno/v17/app/params"
"github.com/CosmosContracts/juno/v18/app/params"
)

// MakeEncodingConfig creates an EncodingConfig for testing
Expand Down
37 changes: 21 additions & 16 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package keepers

import (
"math"
"path/filepath"

"github.com/CosmWasm/wasmd/x/wasm"
Expand Down Expand Up @@ -81,24 +82,24 @@ import (
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

clockkeeper "github.com/CosmosContracts/juno/v17/x/clock/keeper"
clocktypes "github.com/CosmosContracts/juno/v17/x/clock/types"
dripkeeper "github.com/CosmosContracts/juno/v17/x/drip/keeper"
driptypes "github.com/CosmosContracts/juno/v17/x/drip/types"
feesharekeeper "github.com/CosmosContracts/juno/v17/x/feeshare/keeper"
feesharetypes "github.com/CosmosContracts/juno/v17/x/feeshare/types"
"github.com/CosmosContracts/juno/v17/x/globalfee"
globalfeekeeper "github.com/CosmosContracts/juno/v17/x/globalfee/keeper"
globalfeetypes "github.com/CosmosContracts/juno/v17/x/globalfee/types"
mintkeeper "github.com/CosmosContracts/juno/v17/x/mint/keeper"
minttypes "github.com/CosmosContracts/juno/v17/x/mint/types"
"github.com/CosmosContracts/juno/v17/x/tokenfactory/bindings"
tokenfactorykeeper "github.com/CosmosContracts/juno/v17/x/tokenfactory/keeper"
tokenfactorytypes "github.com/CosmosContracts/juno/v17/x/tokenfactory/types"
clockkeeper "github.com/CosmosContracts/juno/v18/x/clock/keeper"
clocktypes "github.com/CosmosContracts/juno/v18/x/clock/types"
dripkeeper "github.com/CosmosContracts/juno/v18/x/drip/keeper"
driptypes "github.com/CosmosContracts/juno/v18/x/drip/types"
feesharekeeper "github.com/CosmosContracts/juno/v18/x/feeshare/keeper"
feesharetypes "github.com/CosmosContracts/juno/v18/x/feeshare/types"
"github.com/CosmosContracts/juno/v18/x/globalfee"
globalfeekeeper "github.com/CosmosContracts/juno/v18/x/globalfee/keeper"
globalfeetypes "github.com/CosmosContracts/juno/v18/x/globalfee/types"
mintkeeper "github.com/CosmosContracts/juno/v18/x/mint/keeper"
minttypes "github.com/CosmosContracts/juno/v18/x/mint/types"
"github.com/CosmosContracts/juno/v18/x/tokenfactory/bindings"
tokenfactorykeeper "github.com/CosmosContracts/juno/v18/x/tokenfactory/keeper"
tokenfactorytypes "github.com/CosmosContracts/juno/v18/x/tokenfactory/types"
)

var (
wasmCapabilities = "iterator,staking,stargate,token_factory,cosmwasm_1_1,cosmwasm_1_2,cosmwasm_1_3"
wasmCapabilities = "iterator,staking,stargate,token_factory,cosmwasm_1_1,cosmwasm_1_2,cosmwasm_1_3,cosmwasm_1_4"

tokenFactoryCapabilities = []string{
tokenfactorytypes.EnableBurnFrom,
Expand Down Expand Up @@ -344,14 +345,18 @@ func NewAppKeepers(
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(appKeepers.UpgradeKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(appKeepers.IBCKeeper.ClientKeeper))

// Update the max metadata length to be >255
govConfig := govtypes.DefaultConfig()
govConfig.MaxMetadataLen = math.MaxUint64

govKeeper := govkeeper.NewKeeper(
appCodec,
appKeepers.keys[govtypes.StoreKey],
appKeepers.AccountKeeper,
appKeepers.BankKeeper,
appKeepers.StakingKeeper,
bApp.MsgServiceRouter(),
govtypes.DefaultConfig(),
govConfig,
govModAddress,
)
appKeepers.GovKeeper = *govKeeper.SetHooks(
Expand Down
12 changes: 6 additions & 6 deletions app/keepers/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

clocktypes "github.com/CosmosContracts/juno/v17/x/clock/types"
driptypes "github.com/CosmosContracts/juno/v17/x/drip/types"
feesharetypes "github.com/CosmosContracts/juno/v17/x/feeshare/types"
globalfeetypes "github.com/CosmosContracts/juno/v17/x/globalfee/types"
minttypes "github.com/CosmosContracts/juno/v17/x/mint/types"
tokenfactorytypes "github.com/CosmosContracts/juno/v17/x/tokenfactory/types"
clocktypes "github.com/CosmosContracts/juno/v18/x/clock/types"
driptypes "github.com/CosmosContracts/juno/v18/x/drip/types"
feesharetypes "github.com/CosmosContracts/juno/v18/x/feeshare/types"
globalfeetypes "github.com/CosmosContracts/juno/v18/x/globalfee/types"
minttypes "github.com/CosmosContracts/juno/v18/x/mint/types"
tokenfactorytypes "github.com/CosmosContracts/juno/v18/x/tokenfactory/types"
)

func (appKeepers *AppKeepers) GenerateKeys() {
Expand Down
24 changes: 12 additions & 12 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ import (
"github.com/cosmos/cosmos-sdk/x/upgrade"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

encparams "github.com/CosmosContracts/juno/v17/app/params"
"github.com/CosmosContracts/juno/v17/x/clock"
clocktypes "github.com/CosmosContracts/juno/v17/x/clock/types"
"github.com/CosmosContracts/juno/v17/x/drip"
driptypes "github.com/CosmosContracts/juno/v17/x/drip/types"
feeshare "github.com/CosmosContracts/juno/v17/x/feeshare"
feesharetypes "github.com/CosmosContracts/juno/v17/x/feeshare/types"
"github.com/CosmosContracts/juno/v17/x/globalfee"
"github.com/CosmosContracts/juno/v17/x/mint"
minttypes "github.com/CosmosContracts/juno/v17/x/mint/types"
"github.com/CosmosContracts/juno/v17/x/tokenfactory"
tokenfactorytypes "github.com/CosmosContracts/juno/v17/x/tokenfactory/types"
encparams "github.com/CosmosContracts/juno/v18/app/params"
"github.com/CosmosContracts/juno/v18/x/clock"
clocktypes "github.com/CosmosContracts/juno/v18/x/clock/types"
"github.com/CosmosContracts/juno/v18/x/drip"
driptypes "github.com/CosmosContracts/juno/v18/x/drip/types"
feeshare "github.com/CosmosContracts/juno/v18/x/feeshare"
feesharetypes "github.com/CosmosContracts/juno/v18/x/feeshare/types"
"github.com/CosmosContracts/juno/v18/x/globalfee"
"github.com/CosmosContracts/juno/v18/x/mint"
minttypes "github.com/CosmosContracts/juno/v18/x/mint/types"
"github.com/CosmosContracts/juno/v18/x/tokenfactory"
tokenfactorytypes "github.com/CosmosContracts/juno/v18/x/tokenfactory/types"
)

// ModuleBasics defines the module BasicManager is in charge of setting up basic,
Expand Down
4 changes: 2 additions & 2 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

apphelpers "github.com/CosmosContracts/juno/v17/app/helpers"
appparams "github.com/CosmosContracts/juno/v17/app/params"
apphelpers "github.com/CosmosContracts/juno/v18/app/helpers"
appparams "github.com/CosmosContracts/juno/v18/app/params"
)

// SimAppChainID hardcoded chainID for simulation
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/CosmosContracts/juno/v17/app/keepers"
"github.com/CosmosContracts/juno/v18/app/keepers"
)

// BaseAppParamManager defines an interrace that BaseApp is expected to fullfil
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v10/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/CosmosContracts/juno/v17/app/upgrades"
"github.com/CosmosContracts/juno/v18/app/upgrades"
)

// UpgradeName defines the on-chain upgrade name for the Juno v10 upgrade.
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v10/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/CosmosContracts/juno/v17/app/keepers"
"github.com/CosmosContracts/juno/v18/app/keepers"
)

// CreateV10UpgradeHandler makes an upgrade handler for v10 of Juno
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v11/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/CosmosContracts/juno/v17/app/upgrades"
"github.com/CosmosContracts/juno/v18/app/upgrades"
)

// UpgradeName defines the on-chain upgrade name for the Juno v11 upgrade.
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v11/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/CosmosContracts/juno/v17/app/keepers"
"github.com/CosmosContracts/juno/v18/app/keepers"
)

// CreateV11UpgradeHandler makes an upgrade handler for v11 of Juno
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v12/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package v12
import (
store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/CosmosContracts/juno/v17/app/upgrades"
"github.com/CosmosContracts/juno/v18/app/upgrades"
)

const UpgradeName = "v12"
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v12/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/CosmosContracts/juno/v17/app/keepers"
"github.com/CosmosContracts/juno/v18/app/keepers"
)

func CreateV12UpgradeHandler(
Expand Down
6 changes: 3 additions & 3 deletions app/upgrades/v13/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (

store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/CosmosContracts/juno/v17/app/upgrades"
feesharetypes "github.com/CosmosContracts/juno/v17/x/feeshare/types"
tokenfactorytypes "github.com/CosmosContracts/juno/v17/x/tokenfactory/types"
"github.com/CosmosContracts/juno/v18/app/upgrades"
feesharetypes "github.com/CosmosContracts/juno/v18/x/feeshare/types"
tokenfactorytypes "github.com/CosmosContracts/juno/v18/x/tokenfactory/types"
)

// UpgradeName defines the on-chain upgrade name for the upgrade.
Expand Down
8 changes: 4 additions & 4 deletions app/upgrades/v13/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/CosmosContracts/juno/v17/app/keepers"
"github.com/CosmosContracts/juno/v17/app/upgrades"
"github.com/CosmosContracts/juno/v18/app/keepers"
"github.com/CosmosContracts/juno/v18/app/upgrades"
// types
feesharetypes "github.com/CosmosContracts/juno/v17/x/feeshare/types"
tokenfactorytypes "github.com/CosmosContracts/juno/v17/x/tokenfactory/types"
feesharetypes "github.com/CosmosContracts/juno/v18/x/feeshare/types"
tokenfactorytypes "github.com/CosmosContracts/juno/v18/x/tokenfactory/types"
)

func CreateV13UpgradeHandler(
Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/v14/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/CosmosContracts/juno/v17/app/upgrades"
"github.com/CosmosContracts/juno/v17/x/globalfee"
"github.com/CosmosContracts/juno/v18/app/upgrades"
"github.com/CosmosContracts/juno/v18/x/globalfee"
)

// UpgradeName defines the on-chain upgrade name for the upgrade.
Expand Down
6 changes: 3 additions & 3 deletions app/upgrades/v14/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/CosmosContracts/juno/v17/app/keepers"
"github.com/CosmosContracts/juno/v17/app/upgrades"
globalfeetypes "github.com/CosmosContracts/juno/v17/x/globalfee/types"
"github.com/CosmosContracts/juno/v18/app/keepers"
"github.com/CosmosContracts/juno/v18/app/upgrades"
globalfeetypes "github.com/CosmosContracts/juno/v18/x/globalfee/types"
)

func CreateV14UpgradeHandler(
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v15/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package v15
import (
store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/CosmosContracts/juno/v17/app/upgrades"
"github.com/CosmosContracts/juno/v18/app/upgrades"
)

// UpgradeName defines the on-chain upgrade name for the upgrade.
Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/v15/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/CosmosContracts/juno/v17/app/keepers"
tokenfactorytypes "github.com/CosmosContracts/juno/v17/x/tokenfactory/types"
"github.com/CosmosContracts/juno/v18/app/keepers"
tokenfactorytypes "github.com/CosmosContracts/juno/v18/x/tokenfactory/types"
)

// We now charge 2 million gas * gas price to create a denom.
Expand Down
Loading
Loading