diff --git a/app/config/const.go b/app/config/const.go index e25af1d1..b64f7790 100644 --- a/app/config/const.go +++ b/app/config/const.go @@ -219,4 +219,5 @@ const ( Upgrade2_6 = "v2.6" Upgrade2_7 = "v2.7" Upgrade2_8 = "v2.8" + Upgrade2_9 = "v2.9" ) diff --git a/app/upgrade_handler.go b/app/upgrade_handler.go index ab3bce97..23f19618 100644 --- a/app/upgrade_handler.go +++ b/app/upgrade_handler.go @@ -14,6 +14,7 @@ import ( v2_6 "github.com/terra-money/core/v2/app/upgrades/v2.6" v2_7 "github.com/terra-money/core/v2/app/upgrades/v2.7" v2_8 "github.com/terra-money/core/v2/app/upgrades/v2.8" + v2_9 "github.com/terra-money/core/v2/app/upgrades/v2.9" feesharetypes "github.com/terra-money/core/v2/x/feeshare/types" tokenfactorytypes "github.com/terra-money/core/v2/x/tokenfactory/types" @@ -84,6 +85,14 @@ func (app *TerraApp) RegisterUpgradeHandlers() { app.GetAppCodec(), ), ) + app.Keepers.UpgradeKeeper.SetUpgradeHandler( + terraappconfig.Upgrade2_9, + v2_9.CreateUpgradeHandler( + app.GetModuleManager(), + app.GetConfigurator(), + app.GetAppCodec(), + ), + ) } func (app *TerraApp) RegisterUpgradeStores() { diff --git a/app/upgrades/v2.9/upgrade.go b/app/upgrades/v2.9/upgrade.go new file mode 100644 index 00000000..370ae121 --- /dev/null +++ b/app/upgrades/v2.9/upgrade.go @@ -0,0 +1,18 @@ +package v2_9 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" +) + +func CreateUpgradeHandler( + mm *module.Manager, + cfg module.Configurator, + cdc codec.Codec, +) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return mm.RunMigrations(ctx, cfg, fromVM) + } +} diff --git a/client/docs/config.json b/client/docs/config.json index d289fb3a..345b5698 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -1,8 +1,8 @@ { "swagger": "2.0", "info": { - "description": "Source code for Terra Core v2.8
UI to interact with the blockchain Station
Create a DAO on Terra using Enterprise
Run on-chain automted jobs Wrap
Explore the network using TerraScope
Anything you need to know about shared security on Alliance Docs
More info about the protocol on Terra Docs", - "version": "v2.8" + "description": "Source code for Terra Core v2.9
UI to interact with the blockchain Station
Create a DAO on Terra using Enterprise
Run on-chain automted jobs Wrap
Explore the network using TerraScope
Anything you need to know about shared security on Alliance Docs
More info about the protocol on Terra Docs", + "version": "v2.9" }, "apis": [ { diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 9e7629f5..374f4fa9 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -2,7 +2,7 @@ swagger: '2.0' info: description: >- Source code for Terra Core v2.8
UI to + href='https://github.com/terra-money/core'>Terra Core v2.9
UI to interact with the blockchain Station
Create a DAO on Terra using Alliance Docs
More info about the protocol on Terra Docs - version: 'v2.8' + version: 'v2.9' paths: /terra/alliances: get: diff --git a/integration-tests/README.md b/integration-tests/README.md index 9eec00bd..5baaa345 100644 --- a/integration-tests/README.md +++ b/integration-tests/README.md @@ -1,14 +1,10 @@ # Terra Core Integration Tests -This project is meant to increase the success ratio for new core releases, improve reliability and features for [@terra-money/feather.js](https://github.com/terra-money/feather.js). This tests are written using TypeScript with [jest](https://jestjs.io/) and executed in parallel to improve time execution. +This project is meant to increase the success ratio of new core releases, improve reliability and features for [@terra-money/feather.js](https://github.com/terra-money/feather.js). This tests are written using TypeScript with [jest](https://jestjs.io/) and tries to improve the coverage by asserting as many outputs as possible. ### Development -This set of tests must run out of the box in Linux-based systems installing [GoLang 1.20](https://go.dev/), [jq](https://stedolan.github.io/jq/), [screen](https://www.geeksforgeeks.org/screen-command-in-linux-with-examples/) and [rly](https://github.com/cosmos/relayer). - -Keep in mind that tests are executed in paralel when using the same account with two different tests it can misslead test results with errors like "account missmatch sequence" when submitting two transactions with the same nonce, missmatching balances, etc... - -Another good practice with this framework is to isolate and assert values within a test considering that the data is not wiped out each time a new test is executed. +This set of tests must run out of the box in Linux-based systems installing [GoLang 1.20](https://go.dev/), [jq](https://stedolan.github.io/jq/) and [screen](https://www.geeksforgeeks.org/screen-command-in-linux-with-examples/). The relayer used in the tests is [go relayer](https://github.com/cosmos/relayer). Keep in mind that the data is not wiped out each time a new test is executed. Folders structure: diff --git a/integration-tests/package-lock.json b/integration-tests/package-lock.json index ce5c4316..bfcffad7 100644 --- a/integration-tests/package-lock.json +++ b/integration-tests/package-lock.json @@ -1,12 +1,12 @@ { "name": "@terra-money/core-integration-tests", - "version": "v2.8.0", + "version": "v2.9.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@terra-money/core-integration-tests", - "version": "v2.8.0", + "version": "v2.9.0", "license": "MIT", "dependencies": { "@terra-money/feather.js": "^2.0.0-beta.14", diff --git a/integration-tests/package.json b/integration-tests/package.json index 882f2ba9..d2acc023 100644 --- a/integration-tests/package.json +++ b/integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@terra-money/core-integration-tests", - "version": "v2.8.0", + "version": "v2.9.0", "description": "Integration tests for Core using feather.js", "main": "index.ts", "scripts": { @@ -9,7 +9,7 @@ "test:chain:upgrade" : "bash src/setup/chain-upgrade/chain-upgrade.sh", "test:start" : "jest --runInBand --detectOpenHandles", "start": "npm run test:init && npm run test:relayer && npm run test:start", - "test:clean": "rm -rf src/test-data chain-upgrade-data && pkill terrad && pkill terrad && pkill rly" + "test:clean": "rm -rf src/test-data chain-upgrade-data && pkill terrad && pkill terrad && pkill relayer" }, "repository": { "type": "git", diff --git a/integration-tests/src/modules/wasm/ics20.test.ts b/integration-tests/src/modules/wasm/ics20.test.ts index 6987a3c1..72f86aa9 100644 --- a/integration-tests/src/modules/wasm/ics20.test.ts +++ b/integration-tests/src/modules/wasm/ics20.test.ts @@ -110,7 +110,7 @@ describe("Wasm Module (https://github.com/CosmWasm/wasmd/releases/tag/v0.45.0) " test("must create the channel for the ICS20 contract", async () => { // Stop the relayer to don't create conflicts try { - execSync("pkill rly") + execSync("pkill relayer") } catch (e) { console.log(e) @@ -118,12 +118,12 @@ describe("Wasm Module (https://github.com/CosmWasm/wasmd/releases/tag/v0.45.0) " // Create the path const pathToRelayDir = path.join(__dirname, "/../../test-data/relayer"); - execSync(`rly tx link "test1-test2" --src-port="wasm.${ics20ContractAddr}" --dst-port="transfer" --version="ics20-1" --home="${pathToRelayDir}"`, { stdio: "ignore" }) + execSync(`relayer tx link "test1-test2" --src-port="wasm.${ics20ContractAddr}" --dst-port="transfer" --version="ics20-1" --home="${pathToRelayDir}"`, { stdio: "ignore" }) await blockInclusion(); // Start the relayer again - const rlyStart = exec(`rly start "test1-test2" -p="events" -b=100 --flush-interval="1s" --time-threshold="1s" --home="${pathToRelayDir}" > ${pathToRelayDir}/relayer.log 2>&1`) - rlyStart.unref(); + const relayerStart = exec(`relayer start "test1-test2" -p="events" -b=100 --flush-interval="1s" --time-threshold="1s" --home="${pathToRelayDir}" > ${pathToRelayDir}/relayer.log 2>&1`) + relayerStart.unref(); const res = await LCD.chain1.ibc.channels("test-1", { "pagination.limit": 1, diff --git a/integration-tests/src/setup/chain-upgrade/chain-upgrade.sh b/integration-tests/src/setup/chain-upgrade/chain-upgrade.sh index 73fa4ea8..8b42ee9c 100755 --- a/integration-tests/src/setup/chain-upgrade/chain-upgrade.sh +++ b/integration-tests/src/setup/chain-upgrade/chain-upgrade.sh @@ -1,11 +1,11 @@ #!/bin/bash -OLD_VERSION=release/v2.7 +OLD_VERSION=release/v2.8 UPGRADE_HEIGHT=20 CHAIN_ID=pisco-1 CHAIN_HOME=$(pwd)/chain-upgrade-data DENOM=uluna -SOFTWARE_UPGRADE_NAME="v2.8" +SOFTWARE_UPGRADE_NAME="v2.9" GOV_PERIOD="5s" VAL_MNEMONIC_1="clock post desk civil pottery foster expand merit dash seminar song memory figure uniform spice circle try happy obvious trash crime hybrid hood cushion" diff --git a/integration-tests/src/setup/init-test-framework.sh b/integration-tests/src/setup/init-test-framework.sh index 640074fc..2473546d 100755 --- a/integration-tests/src/setup/init-test-framework.sh +++ b/integration-tests/src/setup/init-test-framework.sh @@ -54,7 +54,7 @@ rm -rf $CHAIN_DIR echo "Stopping any processes related with the tests..." pkill terrad pkill terrad -pkill rly +pkill relayer # Add directories for both chains, exit if an error occurs if ! mkdir -p $CHAIN_DIR/$CHAINID_1 2>/dev/null; then diff --git a/integration-tests/src/setup/relayer/init-relayer.sh b/integration-tests/src/setup/relayer/init-relayer.sh index 6d871736..d73aa885 100755 --- a/integration-tests/src/setup/relayer/init-relayer.sh +++ b/integration-tests/src/setup/relayer/init-relayer.sh @@ -7,7 +7,7 @@ echo "##################" echo "" # Configure predefined mnemonic pharses -BINARY=rly +BINARY=relayer CHAIN_DIR=$(pwd)/src/test-data CHAINID_1=test-1 CHAINID_2=test-2 @@ -17,8 +17,8 @@ MNEMONIC_2="record gift you once hip style during joke field prize dust unique l # Ensure rly is installed if ! [ -x "$(command -v $BINARY)" ]; then echo "$BINARY is required to run this script..." - echo "You can download at https://github.com/cosmos/relayer" - exit 1 + echo "Installing go relayer https://github.com/cosmos/relayer" + go install github.com/cosmos/relayer/v2@v2.4.2 fi echo "Initializing $BINARY..." diff --git a/integration-tests/src/teardown.ts b/integration-tests/src/teardown.ts index 4d9ba20e..fe0fa714 100644 --- a/integration-tests/src/teardown.ts +++ b/integration-tests/src/teardown.ts @@ -4,7 +4,7 @@ import path from 'path'; module.exports = async () => { try { const pathToDataDir = path.join(__dirname, "/test-data"); - execSync("pkill rly") + execSync("pkill relayer") execSync("pkill terrad") execSync("pkill terrad") execSync(`rm -r ${pathToDataDir}`)