Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #42 from oraichain/feat/eip-191
Browse files Browse the repository at this point in the history
Feat/eip 191
  • Loading branch information
ducphamle2 authored Feb 29, 2024
2 parents 611a00d + 903e43f commit 493537d
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 24 deletions.
2 changes: 1 addition & 1 deletion interchaintest/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions interchaintest/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
8 changes: 2 additions & 6 deletions orai/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
})

Expand All @@ -1050,7 +1046,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},
Added: []string{},
}))
}
}
Expand Down
6 changes: 3 additions & 3 deletions orai/docker-compose-e2e-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion orai/docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion orai/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion orai/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions orai/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
5 changes: 2 additions & 3 deletions orai/scripts/e2e-docker-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ set -ux

# setup the network using the old binary

OLD_VERSION=${OLD_VERSION:-"v0.41.4"}
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"
Expand Down
4 changes: 2 additions & 2 deletions orai/scripts/e2e-upgrade-statesync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# setup the network using the old binary

OLD_VERSION=${OLD_VERSION:-"v0.41.4"}
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.5"}
NEW_VERSION=${NEW_VERSION:-"v0.41.7"}
VALIDATOR_HOME=${VALIDATOR_HOME:-"$HOME/.oraid/validator1"}
MIGRATE_MSG=${MIGRATE_MSG:-'{}'}
EXECUTE_MSG=${EXECUTE_MSG:-'{"ping":{}}'}
Expand Down
4 changes: 2 additions & 2 deletions orai/scripts/e2e-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# setup the network using the old binary

OLD_VERSION=${OLD_VERSION:-"v0.41.4"}
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.5"}
NEW_VERSION=${NEW_VERSION:-"v0.41.7"}
VALIDATOR_HOME=${VALIDATOR_HOME:-"$HOME/.oraid/validator1"}
MIGRATE_MSG=${MIGRATE_MSG:-'{}'}
EXECUTE_MSG=${EXECUTE_MSG:-'{"ping":{}}'}
Expand Down

0 comments on commit 493537d

Please sign in to comment.