From e6d17bb1395a3740bd6df7e14488a0daec2f4344 Mon Sep 17 00:00:00 2001 From: Pham Tu Date: Tue, 27 Feb 2024 17:23:08 +0700 Subject: [PATCH 1/5] add epi-191 --- interchaintest/go.mod | 2 +- orai/go.mod | 2 +- orai/go.sum | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/interchaintest/go.mod b/interchaintest/go.mod index df95c284..7386914e 100644 --- a/interchaintest/go.mod +++ b/interchaintest/go.mod @@ -8,7 +8,7 @@ replace ( // go list -m -json github.com/oraichain/wasmvm@main | jq '.|"\(.Path) \(.Version)"' -r github.com/CosmWasm/wasmvm => github.com/oraichain/wasmvm v1.5.2 // interchaintest supports ICS features so we need this for now - github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.45.16-ics + github.com/cosmos/cosmos-sdk => github.com/oraichain/cosmos-sdk v0.45.16-ics-epi-191 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 github.com/tendermint/tendermint => github.com/oraichain/cometbft v0.34.30-0.20230711110635-482cde0c4e04 diff --git a/orai/go.mod b/orai/go.mod index 53e861b3..c1207c0b 100755 --- a/orai/go.mod +++ b/orai/go.mod @@ -175,7 +175,7 @@ replace ( // same version as cosmos-sdk github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.22.2 - github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.45.16-ics + github.com/cosmos/cosmos-sdk => github.com/oraichain/cosmos-sdk v0.45.16-ics-epi-191 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 // downgrade of goleveldb to avoid issues: see https://github.com/cosmos/cosmos-sdk/issues/14949 github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 diff --git a/orai/go.sum b/orai/go.sum index 4c3b57e9..7a6b214c 100755 --- a/orai/go.sum +++ b/orai/go.sum @@ -161,8 +161,6 @@ github.com/cosmos/cosmos-db v1.0.0-rc.1 h1:SjnT8B6WKMW9WEIX32qMhnEEKcI7ZP0+G1Sa9 github.com/cosmos/cosmos-db v1.0.0-rc.1/go.mod h1:Dnmk3flSf5lkwCqvvjNpoxjpXzhxnCAFzKHlbaForso= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.45.16-ics h1:KsPigLNmdyyQMktAsJzW42eBFsq1uajhQF7rlnHDUgM= -github.com/cosmos/cosmos-sdk v0.45.16-ics/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -623,11 +621,14 @@ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/oraichain/cometbft v0.34.30-0.20230711110635-482cde0c4e04 h1:YEF6VhvB3xrUqLRoEKyJprOXlZ5iaxMzB/87HapgV0s= github.com/oraichain/cometbft v0.34.30-0.20230711110635-482cde0c4e04/go.mod h1:L9shMfbkZ8B+7JlwANEr+NZbBcn+hBpwdbeYvA5rLCw= +github.com/oraichain/cosmos-sdk v0.45.16-ics-epi-191 h1:xQrW8zgHNvuzeGxD7Yd2KPS4rZH4uTGsjFrWVHOW4eQ= +github.com/oraichain/cosmos-sdk v0.45.16-ics-epi-191/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40= github.com/oraichain/juno/x/clock v0.0.0-20231104204142-9bedf967a294 h1:22CZITFka+bEXz6Ob9wt+RdOsjKAbxzsOJ9wKQS+GIc= github.com/oraichain/juno/x/clock v0.0.0-20231104204142-9bedf967a294/go.mod h1:9bcy6YbLhOQ3IXqlOk1O5un+mFWUoSnCYTon5zANNkM= github.com/oraichain/wasmd v0.30.2-0.20230822113616-27ffe7fdd4d1 h1:zuyxYHrgoQ8+jkNj8VayWj4CLcvYS5zw2EFakBgDm7o= github.com/oraichain/wasmd v0.30.2-0.20230822113616-27ffe7fdd4d1/go.mod h1:DUWz5+p7h3BbDxXAt7IBovagwt5NRPCGVuQkweIixzM= github.com/oraichain/wasmvm v1.5.2 h1:hN5Pa4EPlRb0BYKkNh2cgixd0+L6kPpzc+s30Il2W/Q= +github.com/oraichain/wasmvm v1.5.2/go.mod h1:fXB+m2gyh4v9839zlIXdMZGeLAxqUdYdFQqYsTha2hc= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230105184425-1e6fcd979d99 h1:8yYGNa5u8MmFdh+FpZQ7/4jlGABd5XSDfPcENJE9HXs= github.com/osmosis-labs/osmosis/osmoutils v0.0.0-20230105184425-1e6fcd979d99/go.mod h1:K4de+n3DtLdueen98dOzaRXZvqMd8JvigL8O1xW445o= From 8ceabcd46671783262b695fd2d3c8e12a7efaa8b Mon Sep 17 00:00:00 2001 From: ducphamle2 Date: Wed, 28 Feb 2024 21:38:58 -0800 Subject: [PATCH 2/5] pump docker image & binary version --- interchaintest/go.sum | 3 +-- orai/app/app.go | 2 +- orai/docker-compose-e2e-upgrade.yml | 6 +++--- orai/docker-compose.prod.yml | 2 +- orai/docker-compose.yml | 2 +- orai/scripts/e2e-docker-upgrade.sh | 6 +++--- orai/scripts/e2e-upgrade-statesync.sh | 4 ++-- orai/scripts/e2e-upgrade.sh | 4 ++-- 8 files changed, 14 insertions(+), 15 deletions(-) diff --git a/interchaintest/go.sum b/interchaintest/go.sum index 463040bc..f7730eda 100644 --- a/interchaintest/go.sum +++ b/interchaintest/go.sum @@ -158,8 +158,6 @@ github.com/cosmos/cosmos-db v1.0.0-rc.1 h1:SjnT8B6WKMW9WEIX32qMhnEEKcI7ZP0+G1Sa9 github.com/cosmos/cosmos-db v1.0.0-rc.1/go.mod h1:Dnmk3flSf5lkwCqvvjNpoxjpXzhxnCAFzKHlbaForso= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.45.16-ics h1:KsPigLNmdyyQMktAsJzW42eBFsq1uajhQF7rlnHDUgM= -github.com/cosmos/cosmos-sdk v0.45.16-ics/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -529,6 +527,7 @@ github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6 github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/oraichain/cometbft v0.34.30-0.20230711110635-482cde0c4e04 h1:YEF6VhvB3xrUqLRoEKyJprOXlZ5iaxMzB/87HapgV0s= github.com/oraichain/cometbft v0.34.30-0.20230711110635-482cde0c4e04/go.mod h1:L9shMfbkZ8B+7JlwANEr+NZbBcn+hBpwdbeYvA5rLCw= +github.com/oraichain/cosmos-sdk v0.45.16-ics-epi-191 h1:xQrW8zgHNvuzeGxD7Yd2KPS4rZH4uTGsjFrWVHOW4eQ= github.com/oraichain/wasmd v0.30.2-0.20230822113616-27ffe7fdd4d1 h1:zuyxYHrgoQ8+jkNj8VayWj4CLcvYS5zw2EFakBgDm7o= github.com/oraichain/wasmvm v1.5.2 h1:hN5Pa4EPlRb0BYKkNh2cgixd0+L6kPpzc+s30Il2W/Q= github.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ= diff --git a/orai/app/app.go b/orai/app/app.go index 8ed46d39..3bcc6f55 100755 --- a/orai/app/app.go +++ b/orai/app/app.go @@ -145,7 +145,7 @@ const appName = "Oraichain" var ( NodeDir = ".oraid" - BinaryVersion = "v0.41.5" + BinaryVersion = "v0.41.7" // If EnabledSpecificProposals is "", and this is "true", then enable all x/wasm proposals. // If EnabledSpecificProposals is "", and this is not "true", then disable all x/wasm proposals. diff --git a/orai/docker-compose-e2e-upgrade.yml b/orai/docker-compose-e2e-upgrade.yml index ba49dc45..e1120618 100755 --- a/orai/docker-compose-e2e-upgrade.yml +++ b/orai/docker-compose-e2e-upgrade.yml @@ -2,7 +2,7 @@ version: '3.3' services: validator1: container_name: validator1 - image: oraichain/foundation-orai:0.41.4-alpine-prod # one version lower so we can test the network upgrade + image: oraichain/foundation-orai:0.41.5-alpine-prod # one version lower so we can test the network upgrade working_dir: /workspace tty: true ulimits: @@ -21,7 +21,7 @@ services: validator2: container_name: validator2 - image: oraichain/foundation-orai:0.41.4-alpine-prod + image: oraichain/foundation-orai:0.41.5-alpine-prod working_dir: /workspace tty: true ulimits: @@ -40,7 +40,7 @@ services: validator3: container_name: validator3 - image: oraichain/foundation-orai:0.41.4-alpine-prod + image: oraichain/foundation-orai:0.41.5-alpine-prod working_dir: /workspace tty: true ulimits: diff --git a/orai/docker-compose.prod.yml b/orai/docker-compose.prod.yml index 19c4446f..882a969c 100755 --- a/orai/docker-compose.prod.yml +++ b/orai/docker-compose.prod.yml @@ -2,7 +2,7 @@ version: "3.3" services: orai: container_name: orai_node - image: oraichain/foundation-orai:0.41.5-alpine-prod + image: oraichain/foundation-orai:0.41.7-alpine-prod working_dir: /workspace tty: true ulimits: diff --git a/orai/docker-compose.yml b/orai/docker-compose.yml index 32c3f503..79e4e5fc 100755 --- a/orai/docker-compose.yml +++ b/orai/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.3" services: orai: container_name: orai_node - image: oraichain/foundation-orai:0.41.5-alpine-dev + image: oraichain/foundation-orai:0.41.7-alpine-dev working_dir: /workspace tty: true ulimits: diff --git a/orai/scripts/e2e-docker-upgrade.sh b/orai/scripts/e2e-docker-upgrade.sh index 940afbc5..32f7300f 100755 --- a/orai/scripts/e2e-docker-upgrade.sh +++ b/orai/scripts/e2e-docker-upgrade.sh @@ -3,10 +3,10 @@ set -ux # setup the network using the old binary -OLD_VERSION=${OLD_VERSION:-"v0.41.4"} +OLD_VERSION=${OLD_VERSION:-"v0.41.5"} ARGS="--chain-id testing -y --keyring-backend test --fees 200orai --gas 20000000 --gas-adjustment 1.5 -b block" -NEW_VERSION=${NEW_VERSION:-"v0.41.5"} -UPGRADE_INFO_VERSION=${UPGRADE_INFO_VERSION:-"v0.41.5"} +NEW_VERSION=${NEW_VERSION:-"v0.41.7"} +UPGRADE_INFO_VERSION=${UPGRADE_INFO_VERSION:-"v0.41.7"} MIGRATE_MSG=${MIGRATE_MSG:-'{}'} EXECUTE_MSG=${EXECUTE_MSG:-'{"ping":{}}'} docker_command="docker-compose -f $PWD/docker-compose-e2e-upgrade.yml exec" diff --git a/orai/scripts/e2e-upgrade-statesync.sh b/orai/scripts/e2e-upgrade-statesync.sh index 38e61416..85dd3c81 100755 --- a/orai/scripts/e2e-upgrade-statesync.sh +++ b/orai/scripts/e2e-upgrade-statesync.sh @@ -2,10 +2,10 @@ # setup the network using the old binary -OLD_VERSION=${OLD_VERSION:-"v0.41.4"} +OLD_VERSION=${OLD_VERSION:-"v0.41.5"} WASM_PATH=${WASM_PATH:-"../oraiwasm/package/plus/swapmap/artifacts/swapmap.wasm"} ARGS="--chain-id testing -y --keyring-backend test --fees 200orai --gas auto --gas-adjustment 1.5 -b block" -NEW_VERSION=${NEW_VERSION:-"v0.41.5"} +NEW_VERSION=${NEW_VERSION:-"v0.41.7"} VALIDATOR_HOME=${VALIDATOR_HOME:-"$HOME/.oraid/validator1"} MIGRATE_MSG=${MIGRATE_MSG:-'{}'} EXECUTE_MSG=${EXECUTE_MSG:-'{"ping":{}}'} diff --git a/orai/scripts/e2e-upgrade.sh b/orai/scripts/e2e-upgrade.sh index aace8d47..b2d8a85a 100755 --- a/orai/scripts/e2e-upgrade.sh +++ b/orai/scripts/e2e-upgrade.sh @@ -2,10 +2,10 @@ # setup the network using the old binary -OLD_VERSION=${OLD_VERSION:-"v0.41.4"} +OLD_VERSION=${OLD_VERSION:-"v0.41.5"} WASM_PATH=${WASM_PATH:-"$PWD/scripts/wasm_file/swapmap.wasm"} ARGS="--chain-id testing -y --keyring-backend test --fees 200orai --gas auto --gas-adjustment 1.5 -b block" -NEW_VERSION=${NEW_VERSION:-"v0.41.5"} +NEW_VERSION=${NEW_VERSION:-"v0.41.7"} VALIDATOR_HOME=${VALIDATOR_HOME:-"$HOME/.oraid/validator1"} MIGRATE_MSG=${MIGRATE_MSG:-'{}'} EXECUTE_MSG=${EXECUTE_MSG:-'{"ping":{}}'} From f788b7799ef85bff0c671f8f527f6efff2ff25b1 Mon Sep 17 00:00:00 2001 From: ducphamle2 Date: Wed, 28 Feb 2024 21:42:16 -0800 Subject: [PATCH 3/5] switch to v0.41.6 instead --- orai/scripts/e2e-docker-upgrade.sh | 1 - orai/scripts/e2e-upgrade-statesync.sh | 2 +- orai/scripts/e2e-upgrade.sh | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/orai/scripts/e2e-docker-upgrade.sh b/orai/scripts/e2e-docker-upgrade.sh index 32f7300f..7a5db2a7 100755 --- a/orai/scripts/e2e-docker-upgrade.sh +++ b/orai/scripts/e2e-docker-upgrade.sh @@ -3,7 +3,6 @@ set -ux # setup the network using the old binary -OLD_VERSION=${OLD_VERSION:-"v0.41.5"} ARGS="--chain-id testing -y --keyring-backend test --fees 200orai --gas 20000000 --gas-adjustment 1.5 -b block" NEW_VERSION=${NEW_VERSION:-"v0.41.7"} UPGRADE_INFO_VERSION=${UPGRADE_INFO_VERSION:-"v0.41.7"} diff --git a/orai/scripts/e2e-upgrade-statesync.sh b/orai/scripts/e2e-upgrade-statesync.sh index 85dd3c81..c3dfd5ae 100755 --- a/orai/scripts/e2e-upgrade-statesync.sh +++ b/orai/scripts/e2e-upgrade-statesync.sh @@ -2,7 +2,7 @@ # setup the network using the old binary -OLD_VERSION=${OLD_VERSION:-"v0.41.5"} +OLD_VERSION=${OLD_VERSION:-"v0.41.6"} WASM_PATH=${WASM_PATH:-"../oraiwasm/package/plus/swapmap/artifacts/swapmap.wasm"} ARGS="--chain-id testing -y --keyring-backend test --fees 200orai --gas auto --gas-adjustment 1.5 -b block" NEW_VERSION=${NEW_VERSION:-"v0.41.7"} diff --git a/orai/scripts/e2e-upgrade.sh b/orai/scripts/e2e-upgrade.sh index b2d8a85a..eaeed35a 100755 --- a/orai/scripts/e2e-upgrade.sh +++ b/orai/scripts/e2e-upgrade.sh @@ -2,7 +2,7 @@ # setup the network using the old binary -OLD_VERSION=${OLD_VERSION:-"v0.41.5"} +OLD_VERSION=${OLD_VERSION:-"v0.41.6"} WASM_PATH=${WASM_PATH:-"$PWD/scripts/wasm_file/swapmap.wasm"} ARGS="--chain-id testing -y --keyring-backend test --fees 200orai --gas auto --gas-adjustment 1.5 -b block" NEW_VERSION=${NEW_VERSION:-"v0.41.7"} From a727cec28b500a77e00d0b6e5c9bdeb1b120b631 Mon Sep 17 00:00:00 2001 From: ducphamle2 Date: Wed, 28 Feb 2024 21:53:07 -0800 Subject: [PATCH 4/5] fix: remove clock module from upgrade handler --- orai/app/app.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/orai/app/app.go b/orai/app/app.go index 3bcc6f55..c72a99d6 100755 --- a/orai/app/app.go +++ b/orai/app/app.go @@ -1035,10 +1035,6 @@ func (app *OraichainApp) upgradeHandler() { app.upgradeKeeper.SetUpgradeHandler(BinaryVersion, func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { ctx.Logger().Info("start to migrate modules...") ctx.Logger().Info("vm module: %v\n", fromVM) - // x/clock - if err := app.ClockKeeper.SetParams(ctx, clocktypes.DefaultParams()); err != nil { - return nil, err - } return app.mm.RunMigrations(ctx, app.configurator, fromVM) }) @@ -1049,9 +1045,7 @@ func (app *OraichainApp) upgradeHandler() { if upgradeInfo.Name == BinaryVersion && !app.upgradeKeeper.IsSkipHeight(upgradeInfo.Height) { // configure store loader that checks if version == upgradeHeight and applies store upgrades - app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storetypes.StoreUpgrades{ - Added: []string{clocktypes.StoreKey}, - })) + app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storetypes.StoreUpgrades{})) } } From 903e43fe56410824c21a77e8c3cec5213bbf6548 Mon Sep 17 00:00:00 2001 From: ducphamle2 Date: Wed, 28 Feb 2024 21:58:24 -0800 Subject: [PATCH 5/5] fix: re-add added empty store upgrade --- orai/app/app.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/orai/app/app.go b/orai/app/app.go index c72a99d6..591c0d5c 100755 --- a/orai/app/app.go +++ b/orai/app/app.go @@ -1045,7 +1045,9 @@ func (app *OraichainApp) upgradeHandler() { if upgradeInfo.Name == BinaryVersion && !app.upgradeKeeper.IsSkipHeight(upgradeInfo.Height) { // configure store loader that checks if version == upgradeHeight and applies store upgrades - app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storetypes.StoreUpgrades{})) + app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storetypes.StoreUpgrades{ + Added: []string{}, + })) } }