diff --git a/CHANGELOG.md b/CHANGELOG.md index 9459a1f3e6..c9e471e8c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,8 @@ ### Bug Fixes -* [#1713](https://github.com/crypto-org-chain/cronos/pull/1713) Register legacy codec to allow query historical txs from deleted icaauth module. * [#1714](https://github.com/crypto-org-chain/cronos/pull/1714) Avoid nil pointer error when query blocks before feemarket module gets enabled. +* [#1713](https://github.com/crypto-org-chain/cronos/pull/1713) Register legacy codec to allow query historical txs whose modules are removed. ### Improvements diff --git a/integration_tests/configs/cosmovisor_with_ibc.jsonnet b/integration_tests/configs/cosmovisor_with_ibc.jsonnet deleted file mode 100644 index d27c5ec45a..0000000000 --- a/integration_tests/configs/cosmovisor_with_ibc.jsonnet +++ /dev/null @@ -1,32 +0,0 @@ -local ibc = import 'ibc.jsonnet'; - -ibc { - 'cronos_777-1'+: { - 'app-config'+: { - 'app-db-backend': 'rocksdb', - 'iavl-lazy-loading':: super['iavl-lazy-loading'], - }, - validators: [super.validators[0] { - 'app-config'+: { - store: { - streamers: ['versiondb'], - }, - }, - }] + super.validators[1:], - genesis+: { - consensus_params: { - block: { - max_bytes: '1048576', - max_gas: '81500000', - }, - }, - app_state+: { - gov+: { - params+: { - expedited_voting_period:: super['expedited_voting_period'], - }, - }, - }, - }, - }, -} diff --git a/integration_tests/configs/upgrade-test-package-recent.nix b/integration_tests/configs/upgrade-test-package-recent.nix deleted file mode 100644 index 00b125c946..0000000000 --- a/integration_tests/configs/upgrade-test-package-recent.nix +++ /dev/null @@ -1,33 +0,0 @@ -let - pkgs = import ../../nix { }; - fetchFlake = - repo: rev: - (pkgs.flake-compat { - src = { - outPath = builtins.fetchTarball "https://github.com/${repo}/archive/${rev}.tar.gz"; - inherit rev; - shortRev = builtins.substring 0 7 rev; - }; - }).defaultNix; - # release/v1.3.x - releasedGenesis = - (fetchFlake "crypto-org-chain/cronos" "e1d819c862b30f0ce978baf2addb12516568639e").default; - # release/v1.4.x - released1_4 = - (fetchFlake "crypto-org-chain/cronos" "ce797fa995000530ee53cd1fbeb3c67180648002").default; - current = pkgs.callPackage ../../. { }; -in -pkgs.linkFarm "upgrade-test-package" [ - { - name = "genesis"; - path = releasedGenesis; - } - { - name = "v1.4"; - path = released1_4; - } - { - name = "v1.4.0-rc5-testnet"; - path = current; - } -] diff --git a/integration_tests/test_upgrade_with_ibc.py b/integration_tests/test_upgrade_with_ibc.py deleted file mode 100644 index 2c0f0b1478..0000000000 --- a/integration_tests/test_upgrade_with_ibc.py +++ /dev/null @@ -1,89 +0,0 @@ -import json -import shutil -import stat -import subprocess -from pathlib import Path - -import pytest -import requests -from pystarport import cluster, ports - -from .ibc_utils import ( - assert_channel_open_init, - prepare_network, - wait_for_check_channel_ready, -) -from .utils import do_upgrade, post_init - -pytestmark = pytest.mark.upgrade - - -@pytest.fixture(scope="module") -def ibc(tmp_path_factory): - path = tmp_path_factory.mktemp("upgrade") - nix_name = "upgrade-test-package-recent" - configdir = Path(__file__).parent - name = "cosmovisor_with_ibc" - cmd = [ - "nix-build", - configdir / f"configs/{nix_name}.nix", - ] - print(*cmd) - subprocess.run(cmd, check=True) - - # copy the content so the new directory is writable. - upgrades = path / "upgrades" - shutil.copytree("./result", upgrades) - mod = stat.S_IRWXU - upgrades.chmod(mod) - for d in upgrades.iterdir(): - d.chmod(mod) - - binary = str(upgrades / "genesis/bin/cronosd") - yield from prepare_network( - path, - name, - incentivized=False, - connection_only=True, - post_init=post_init, - chain_binary=f"chain-maind,{binary}", - relayer=cluster.Relayer.RLY.value, - ) - - -def get_tx(base_port, hash): - p = ports.api_port(base_port) - url = f"http://127.0.0.1:{p}/cosmos/tx/v1beta1/txs/{hash}" - return requests.get(url).json() - - -def test_cosmovisor_upgrade(ibc): - c = ibc.cronos - cli = c.cosmos_cli() - connid = "connection-0" - v = json.dumps({"fee_version": "ics29-1", "app_version": ""}) - signer = "signer2" - rsp = cli.icaauth_register_account( - connid, - from_=signer, - gas="400000", - version=v, - ) - ica_txhash = rsp["txhash"] - _, channel_id = assert_channel_open_init(rsp) - wait_for_check_channel_ready(cli, connid, channel_id) - ica_address = cli.icaauth_query_account( - connid, - cli.address(signer), - )["interchain_account_address"] - print("ica address", ica_address, "channel_id", channel_id) - base_port = c.base_port(0) - ica_bf = get_tx(base_port, ica_txhash) - cli = do_upgrade(c, "v1.4", cli.block_height() + 15) - - with pytest.raises(AssertionError): - cli.query_params("icaauth") - - cli = do_upgrade(c, "v1.4.0-rc5-testnet", cli.block_height() + 15) - ica_af = get_tx(base_port, ica_txhash) - assert ica_bf == ica_af, ica_af diff --git a/nix/rocksdb.nix b/nix/rocksdb.nix index 32e1e0720e..e507cffde6 100644 --- a/nix/rocksdb.nix +++ b/nix/rocksdb.nix @@ -21,13 +21,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocksdb"; - version = "9.7.4"; + version = "9.8.4"; src = fetchFromGitHub { owner = "facebook"; repo = finalAttrs.pname; rev = "v${finalAttrs.version}"; - hash = "sha256-u5uuShM2SxHc9/zL4UU56IhCcR/ZQbzde0LgOYS44bM="; + hash = "sha256-A6Gx4FqoGlxITUUz9k6tkDjUcLtMUBK9JS8vuAS96H0="; }; nativeBuildInputs = [