From d0e290f80a44330eaf2ac007ea660325d1147cd2 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Tue, 22 Nov 2022 16:58:13 +0800 Subject: [PATCH 01/29] wait new blk right before send tx --- tests/integration_tests/test_filters.py | 2 ++ tests/integration_tests/utils.py | 15 +++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/integration_tests/test_filters.py b/tests/integration_tests/test_filters.py index e4ec2fba91..3cc398ea90 100644 --- a/tests/integration_tests/test_filters.py +++ b/tests/integration_tests/test_filters.py @@ -7,6 +7,7 @@ deploy_contract, send_successful_transaction, send_transaction, + w3_wait_for_new_blocks, ) @@ -17,6 +18,7 @@ def test_pending_transaction_filter(cluster): # without tx assert flt.get_new_entries() == [] # GetFilterChanges + w3_wait_for_new_blocks(w3, 1, sleep=0.1) # with tx txhash = send_successful_transaction(w3) assert txhash in flt.get_new_entries() diff --git a/tests/integration_tests/utils.py b/tests/integration_tests/utils.py index e0cad6d852..3eb131d732 100644 --- a/tests/integration_tests/utils.py +++ b/tests/integration_tests/utils.py @@ -63,22 +63,21 @@ def wait_for_port(port, host="127.0.0.1", timeout=40.0): ) from ex -def w3_wait_for_new_blocks(w3, n): +def w3_wait_for_new_blocks(w3, n, sleep=0.5): begin_height = w3.eth.block_number while True: - time.sleep(0.5) + time.sleep(sleep) cur_height = w3.eth.block_number if cur_height - begin_height >= n: break -def wait_for_new_blocks(cli, n): - begin_height = int((cli.status())["SyncInfo"]["latest_block_height"]) - while True: - time.sleep(0.5) +def wait_for_new_blocks(cli, n, sleep=0.5): + cur_height = begin_height = int((cli.status())["SyncInfo"]["latest_block_height"]) + while cur_height - begin_height < n: + time.sleep(sleep) cur_height = int((cli.status())["SyncInfo"]["latest_block_height"]) - if cur_height - begin_height >= n: - break + return cur_height def wait_for_block(cli, height, timeout=240): From bf43d11aee8b95140a1b61ec7cdac519bd25e792 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Tue, 22 Nov 2022 17:47:59 +0800 Subject: [PATCH 02/29] larger timeout_commit for priority test --- .../configs/long_timeout_commit.jsonnet | 11 +++++++++++ tests/integration_tests/test_priority.py | 17 ++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 tests/integration_tests/configs/long_timeout_commit.jsonnet diff --git a/tests/integration_tests/configs/long_timeout_commit.jsonnet b/tests/integration_tests/configs/long_timeout_commit.jsonnet new file mode 100644 index 0000000000..b54ad60e0e --- /dev/null +++ b/tests/integration_tests/configs/long_timeout_commit.jsonnet @@ -0,0 +1,11 @@ +local default = import 'default.jsonnet'; + +default { + 'ethermint_9000-1'+: { + config+: { + consensus+: { + timeout_commit: '5s', + }, + }, + }, +} diff --git a/tests/integration_tests/test_priority.py b/tests/integration_tests/test_priority.py index c3de9cec0f..75a79e99ae 100644 --- a/tests/integration_tests/test_priority.py +++ b/tests/integration_tests/test_priority.py @@ -1,11 +1,22 @@ import sys +from pathlib import Path -from .network import Ethermint +import pytest + +from .network import setup_custom_ethermint from .utils import ADDRS, KEYS, eth_to_bech32, sign_transaction, wait_for_new_blocks PRIORITY_REDUCTION = 1000000 +@pytest.fixture(scope="module") +def ethermint(tmp_path_factory): + path = tmp_path_factory.mktemp("priority") + yield from setup_custom_ethermint( + path, 26200, Path(__file__).parent / "configs/long_timeout_commit.jsonnet" + ) + + def effective_gas_price(tx, base_fee): if "maxFeePerGas" in tx: # dynamic fee tx @@ -27,7 +38,7 @@ def tx_priority(tx, base_fee): return (tx["gasPrice"] - base_fee) // PRIORITY_REDUCTION -def test_priority(ethermint: Ethermint): +def test_priority(ethermint): """ test priorities of different tx types @@ -112,7 +123,7 @@ def test_priority(ethermint: Ethermint): assert all(i1 > i2 for i1, i2 in zip(tx_indexes, tx_indexes[1:])) -def test_native_tx_priority(ethermint: Ethermint): +def test_native_tx_priority(ethermint): cli = ethermint.cosmos_cli() base_fee = cli.query_base_fee() print("base_fee", base_fee) From 017c443fb69b148ea830c9763a1baafca3da78ee Mon Sep 17 00:00:00 2001 From: mmsqe Date: Wed, 23 Nov 2022 10:32:01 +0800 Subject: [PATCH 03/29] larger timeout_commit for mempool related test --- tests/integration_tests/conftest.py | 12 +++++++++--- tests/integration_tests/network.py | 8 ++++++-- tests/integration_tests/test_priority.py | 8 +++----- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/tests/integration_tests/conftest.py b/tests/integration_tests/conftest.py index ea50d89071..1d6279ff5f 100644 --- a/tests/integration_tests/conftest.py +++ b/tests/integration_tests/conftest.py @@ -11,6 +11,12 @@ def ethermint(tmp_path_factory): yield from setup_ethermint(path, 26650) +@pytest.fixture(scope="session") +def ethermint_long_timeout_commit(tmp_path_factory): + path = tmp_path_factory.mktemp("long_timeout_commit") + yield from setup_ethermint(path, 26200, True) + + @pytest.fixture(scope="session") def ethermint_indexer(tmp_path_factory): path = tmp_path_factory.mktemp("indexer") @@ -28,17 +34,17 @@ def geth(tmp_path_factory): @pytest.fixture( scope="session", params=["ethermint", "geth", "ethermint-ws", "enable-indexer"] ) -def cluster(request, ethermint, ethermint_indexer, geth): +def cluster(request, ethermint_long_timeout_commit, ethermint_indexer, geth): """ run on both ethermint and geth """ provider = request.param if provider == "ethermint": - yield ethermint + yield ethermint_long_timeout_commit elif provider == "geth": yield geth elif provider == "ethermint-ws": - ethermint_ws = ethermint.copy() + ethermint_ws = ethermint_long_timeout_commit.copy() ethermint_ws.use_websocket() yield ethermint_ws elif provider == "enable-indexer": diff --git a/tests/integration_tests/network.py b/tests/integration_tests/network.py index 3134151524..c638e2a563 100644 --- a/tests/integration_tests/network.py +++ b/tests/integration_tests/network.py @@ -68,8 +68,12 @@ def __init__(self, w3): self.w3 = w3 -def setup_ethermint(path, base_port): - cfg = Path(__file__).parent / "configs/default.jsonnet" +def setup_ethermint(path, base_port, long_timeout_commit=False): + cfg = Path(__file__).parent / ( + "configs/default.jsonnet" + if long_timeout_commit + else "configs/long_timeout_commit.jsonnet" + ) yield from setup_custom_ethermint(path, base_port, cfg) diff --git a/tests/integration_tests/test_priority.py b/tests/integration_tests/test_priority.py index 75a79e99ae..05e82785d2 100644 --- a/tests/integration_tests/test_priority.py +++ b/tests/integration_tests/test_priority.py @@ -1,9 +1,8 @@ import sys -from pathlib import Path import pytest -from .network import setup_custom_ethermint +from .network import setup_ethermint from .utils import ADDRS, KEYS, eth_to_bech32, sign_transaction, wait_for_new_blocks PRIORITY_REDUCTION = 1000000 @@ -11,9 +10,8 @@ @pytest.fixture(scope="module") def ethermint(tmp_path_factory): - path = tmp_path_factory.mktemp("priority") - yield from setup_custom_ethermint( - path, 26200, Path(__file__).parent / "configs/long_timeout_commit.jsonnet" + yield from setup_ethermint( + tmp_path_factory.mktemp("priority"), 26200, long_timeout_commit=True ) From 4769ba25d89d03ba255e098a1e8a6940f804e16c Mon Sep 17 00:00:00 2001 From: mmsqe Date: Wed, 23 Nov 2022 12:36:48 +0800 Subject: [PATCH 04/29] mv chain id test to cluster used test --- tests/integration_tests/test_basic.py | 3 --- tests/integration_tests/test_filters.py | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 tests/integration_tests/test_basic.py diff --git a/tests/integration_tests/test_basic.py b/tests/integration_tests/test_basic.py deleted file mode 100644 index ed2b19fec1..0000000000 --- a/tests/integration_tests/test_basic.py +++ /dev/null @@ -1,3 +0,0 @@ -def test_basic(cluster): - w3 = cluster.w3 - assert w3.eth.chain_id == 9000 diff --git a/tests/integration_tests/test_filters.py b/tests/integration_tests/test_filters.py index 3cc398ea90..cf320800ea 100644 --- a/tests/integration_tests/test_filters.py +++ b/tests/integration_tests/test_filters.py @@ -11,6 +11,11 @@ ) +def test_basic(cluster): + w3 = cluster.w3 + assert w3.eth.chain_id == 9000 + + def test_pending_transaction_filter(cluster): w3: Web3 = cluster.w3 flt = w3.eth.filter("pending") From 468ea2d2b5fc06d6c45f851d1c17b0bbb2b19818 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Wed, 23 Nov 2022 12:37:04 +0800 Subject: [PATCH 05/29] keep cluster in module scope --- tests/integration_tests/conftest.py | 40 +----------------------- tests/integration_tests/test_filters.py | 39 +++++++++++++++++++++++ tests/integration_tests/test_priority.py | 7 ++--- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/tests/integration_tests/conftest.py b/tests/integration_tests/conftest.py index 1d6279ff5f..bd3f66fddf 100644 --- a/tests/integration_tests/conftest.py +++ b/tests/integration_tests/conftest.py @@ -1,8 +1,6 @@ -from pathlib import Path - import pytest -from .network import setup_custom_ethermint, setup_ethermint, setup_geth +from .network import setup_ethermint, setup_geth @pytest.fixture(scope="session") @@ -11,48 +9,12 @@ def ethermint(tmp_path_factory): yield from setup_ethermint(path, 26650) -@pytest.fixture(scope="session") -def ethermint_long_timeout_commit(tmp_path_factory): - path = tmp_path_factory.mktemp("long_timeout_commit") - yield from setup_ethermint(path, 26200, True) - - -@pytest.fixture(scope="session") -def ethermint_indexer(tmp_path_factory): - path = tmp_path_factory.mktemp("indexer") - yield from setup_custom_ethermint( - path, 26660, Path(__file__).parent / "configs/enable-indexer.jsonnet" - ) - - @pytest.fixture(scope="session") def geth(tmp_path_factory): path = tmp_path_factory.mktemp("geth") yield from setup_geth(path, 8545) -@pytest.fixture( - scope="session", params=["ethermint", "geth", "ethermint-ws", "enable-indexer"] -) -def cluster(request, ethermint_long_timeout_commit, ethermint_indexer, geth): - """ - run on both ethermint and geth - """ - provider = request.param - if provider == "ethermint": - yield ethermint_long_timeout_commit - elif provider == "geth": - yield geth - elif provider == "ethermint-ws": - ethermint_ws = ethermint_long_timeout_commit.copy() - ethermint_ws.use_websocket() - yield ethermint_ws - elif provider == "enable-indexer": - yield ethermint_indexer - else: - raise NotImplementedError - - @pytest.fixture( scope="session", params=["ethermint", "ethermint-ws"] ) diff --git a/tests/integration_tests/test_filters.py b/tests/integration_tests/test_filters.py index cf320800ea..0e71ffb763 100644 --- a/tests/integration_tests/test_filters.py +++ b/tests/integration_tests/test_filters.py @@ -1,6 +1,9 @@ +from pathlib import Path + import pytest from web3 import Web3 +from .network import setup_custom_ethermint, setup_ethermint from .utils import ( ADDRS, CONTRACTS, @@ -11,6 +14,42 @@ ) +@pytest.fixture(scope="module") +def custom_ethermint(tmp_path_factory): + path = tmp_path_factory.mktemp("filters") + yield from setup_ethermint(path, 26200, long_timeout_commit=True) + + +@pytest.fixture(scope="module") +def ethermint_indexer(tmp_path_factory): + path = tmp_path_factory.mktemp("indexer") + yield from setup_custom_ethermint( + path, 26660, Path(__file__).parent / "configs/enable-indexer.jsonnet" + ) + + +@pytest.fixture( + scope="module", params=["ethermint", "geth", "ethermint-ws", "enable-indexer"] +) +def cluster(request, custom_ethermint, ethermint_indexer, geth): + """ + run on both ethermint and geth + """ + provider = request.param + if provider == "ethermint": + yield custom_ethermint + elif provider == "geth": + yield geth + elif provider == "ethermint-ws": + ethermint_ws = custom_ethermint.copy() + ethermint_ws.use_websocket() + yield ethermint_ws + elif provider == "enable-indexer": + yield ethermint_indexer + else: + raise NotImplementedError + + def test_basic(cluster): w3 = cluster.w3 assert w3.eth.chain_id == 9000 diff --git a/tests/integration_tests/test_priority.py b/tests/integration_tests/test_priority.py index 05e82785d2..c505f7a589 100644 --- a/tests/integration_tests/test_priority.py +++ b/tests/integration_tests/test_priority.py @@ -9,10 +9,9 @@ @pytest.fixture(scope="module") -def ethermint(tmp_path_factory): - yield from setup_ethermint( - tmp_path_factory.mktemp("priority"), 26200, long_timeout_commit=True - ) +def custom_ethermint(tmp_path_factory): + path = tmp_path_factory.mktemp("priority") + yield from setup_ethermint(path, 26800, long_timeout_commit=True) def effective_gas_price(tx, base_fee): From 462920509119e99a45412ce28deac02068d2967d Mon Sep 17 00:00:00 2001 From: mmsqe Date: Thu, 24 Nov 2022 09:25:45 +0800 Subject: [PATCH 06/29] sync gomod2nix --- gomod2nix.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gomod2nix.toml b/gomod2nix.toml index 976248c459..422a118ee7 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -97,8 +97,8 @@ schema = 3 version = "v1.0.0-alpha8" hash = "sha256-iXzXoS5Kfh5DBy+PhdFWraDWXda/3M4j7j4VECjv4CA=" [mod."github.com/cosmos/cosmos-sdk"] - version = "v0.46.5-0.20221114064055-2114ec42dfa1" - hash = "sha256-swqznmZfl2dlj/8ReJJs0zagFN2xpzF2ehsfVvPbohc=" + version = "v0.46.6" + hash = "sha256-H1VZxZUWXhpXiY3A9smLp09MEGpXmh+XvX6YUiXPcpQ=" [mod."github.com/cosmos/go-bip39"] version = "v1.0.0" hash = "sha256-Qm2aC2vaS8tjtMUbHmlBSagOSqbduEEDwc51qvQaBmA=" @@ -362,8 +362,8 @@ schema = 3 version = "v0.0.5" hash = "sha256-/5i70IkH/qSW5KjGzv8aQNKh9tHoz98tqtL0K2DMFn4=" [mod."github.com/onsi/ginkgo/v2"] - version = "v2.5.0" - hash = "sha256-mu8Ry88hLAVv9bcvENfP08dBP/yN1DYZrFf6ejxp8co=" + version = "v2.5.1" + hash = "sha256-VB29+H9k7l6il63oXJvsjamSUhsw/e99iI/BeTCderA=" [mod."github.com/onsi/gomega"] version = "v1.24.1" hash = "sha256-REfxQTDRcO23GnmJfOW8/MmPJf9oE2grVvvGiC1eSbo=" @@ -527,8 +527,8 @@ schema = 3 version = "v0.0.0-20221116193143-41c2ba794472" hash = "sha256-uQuxuOvWRsdMii5M5QresisVd1E+Ss8s2WfR2n7QSXk=" [mod."google.golang.org/grpc"] - version = "v1.50.1" - hash = "sha256-38nk4qIme+fE57SsCqNxtCZnc8fyzzi4Sb60uDTT2KE=" + version = "v1.51.0" + hash = "sha256-RzH5DU13D/ulxxOouIKpdNt8eHdff7mrEnB+JUupbLU=" [mod."google.golang.org/protobuf"] version = "v1.28.2-0.20220831092852-f930b1dc76e8" hash = "sha256-li5hXlXwTJ5LIZ8bVki1AZ6UFI2gXHl33JwdX1dOrtM=" From 4b8a4e6e36b3c312cdf1cfe7b9dd0dbc88fb1a38 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Thu, 24 Nov 2022 17:14:40 +0800 Subject: [PATCH 07/29] adjust timeout_commit --- tests/integration_tests/configs/cosmovisor.jsonnet | 5 +++++ tests/integration_tests/configs/default.jsonnet | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/integration_tests/configs/cosmovisor.jsonnet b/tests/integration_tests/configs/cosmovisor.jsonnet index 1fbf075f05..624efdbaca 100644 --- a/tests/integration_tests/configs/cosmovisor.jsonnet +++ b/tests/integration_tests/configs/cosmovisor.jsonnet @@ -2,6 +2,11 @@ local config = import 'default.jsonnet'; config { 'ethermint_9000-1'+: { + config+: { + consensus+: { + timeout_commit: '2s', + }, + }, genesis+: { app_state+: { feemarket+: { diff --git a/tests/integration_tests/configs/default.jsonnet b/tests/integration_tests/configs/default.jsonnet index e135056f9d..b181297d5b 100644 --- a/tests/integration_tests/configs/default.jsonnet +++ b/tests/integration_tests/configs/default.jsonnet @@ -4,10 +4,6 @@ cmd: 'ethermintd', 'start-flags': '--trace', config: { - consensus: { - // larger timeout for more stable mempool tests - timeout_commit: '2s', - }, mempool: { // use v1 mempool to enable tx prioritization version: 'v1', From 3515a3dedd0c0d55a536eece909b4d33fabe1f8c Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 28 Nov 2022 09:39:20 +0800 Subject: [PATCH 08/29] rm prune all in indexer config --- tests/integration_tests/configs/enable-indexer.jsonnet | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/integration_tests/configs/enable-indexer.jsonnet b/tests/integration_tests/configs/enable-indexer.jsonnet index c21c6a98c0..697ffa7aaa 100644 --- a/tests/integration_tests/configs/enable-indexer.jsonnet +++ b/tests/integration_tests/configs/enable-indexer.jsonnet @@ -8,10 +8,6 @@ config { }, }, 'app-config'+: { - pruning: 'everything', - 'state-sync'+: { - 'snapshot-interval': 0, - }, 'json-rpc'+: { 'enable-indexer': true, }, From 1509f3279ae64a03d9265984e938642794949832 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 28 Nov 2022 09:39:27 +0800 Subject: [PATCH 09/29] add missing min_gas_multiplier --- tests/integration_tests/configs/cosmovisor.jsonnet | 3 +++ tests/integration_tests/configs/enable-indexer.jsonnet | 9 +++++++++ tests/integration_tests/configs/pruned_node.jsonnet | 9 +++++++++ 3 files changed, 21 insertions(+) diff --git a/tests/integration_tests/configs/cosmovisor.jsonnet b/tests/integration_tests/configs/cosmovisor.jsonnet index 624efdbaca..4612069b84 100644 --- a/tests/integration_tests/configs/cosmovisor.jsonnet +++ b/tests/integration_tests/configs/cosmovisor.jsonnet @@ -7,6 +7,9 @@ config { timeout_commit: '2s', }, }, + 'app-config'+: { + 'minimum-gas-prices': '100000000000aphoton', + }, genesis+: { app_state+: { feemarket+: { diff --git a/tests/integration_tests/configs/enable-indexer.jsonnet b/tests/integration_tests/configs/enable-indexer.jsonnet index 697ffa7aaa..1a5b0d14dc 100644 --- a/tests/integration_tests/configs/enable-indexer.jsonnet +++ b/tests/integration_tests/configs/enable-indexer.jsonnet @@ -12,5 +12,14 @@ config { 'enable-indexer': true, }, }, + genesis+: { + app_state+: { + feemarket+: { + params+: { + min_gas_multiplier: '0', + }, + }, + }, + }, }, } diff --git a/tests/integration_tests/configs/pruned_node.jsonnet b/tests/integration_tests/configs/pruned_node.jsonnet index ffb6a83044..cd00fc0a7d 100644 --- a/tests/integration_tests/configs/pruned_node.jsonnet +++ b/tests/integration_tests/configs/pruned_node.jsonnet @@ -8,5 +8,14 @@ config { 'snapshot-interval': 0, }, }, + genesis+: { + app_state+: { + feemarket+: { + params+: { + min_gas_multiplier: '0', + }, + }, + }, + }, }, } From 5d5b7610ffe789ade27c767419985f3d1f140ff2 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 28 Nov 2022 09:39:31 +0800 Subject: [PATCH 10/29] wait 1 more blk in upgrade --- tests/integration_tests/test_upgrade.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration_tests/test_upgrade.py b/tests/integration_tests/test_upgrade.py index 9ce3fbd259..400e9a9f30 100644 --- a/tests/integration_tests/test_upgrade.py +++ b/tests/integration_tests/test_upgrade.py @@ -141,7 +141,7 @@ def test_cosmovisor_upgrade(custom_ethermint: Ethermint): cli = custom_ethermint.cosmos_cli() # block should pass the target height - wait_for_block(cli, target_height + 1, timeout=480) + wait_for_block(cli, target_height + 2, timeout=480) wait_for_port(ports.rpc_port(custom_ethermint.base_port(0))) # test migrate keystore From df0ecc974617a1f7099dc47ff25ebd47c861ef92 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 28 Nov 2022 09:39:35 +0800 Subject: [PATCH 11/29] only keep 2 validators --- .../configs/rollback-test.jsonnet | 2 +- tests/integration_tests/test_grpc_only.py | 10 ++--- tests/integration_tests/test_rollback.py | 38 +++++++++---------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/tests/integration_tests/configs/rollback-test.jsonnet b/tests/integration_tests/configs/rollback-test.jsonnet index e39437ec58..0e6c3ffca3 100644 --- a/tests/integration_tests/configs/rollback-test.jsonnet +++ b/tests/integration_tests/configs/rollback-test.jsonnet @@ -2,7 +2,7 @@ local config = import 'default.jsonnet'; config { 'ethermint_9000-1'+: { - validators: super.validators + [{ + validators: super.validators[0:1] + [{ name: 'fullnode', }], }, diff --git a/tests/integration_tests/test_grpc_only.py b/tests/integration_tests/test_grpc_only.py index 7dfa664517..5f9f8886f3 100644 --- a/tests/integration_tests/test_grpc_only.py +++ b/tests/integration_tests/test_grpc_only.py @@ -58,7 +58,7 @@ def test_grpc_mode(custom_ethermint): "to": contract.address, "data": contract.encodeABI(fn_name="currentChainID"), } - api_port = ports.api_port(custom_ethermint.base_port(2)) + api_port = ports.api_port(custom_ethermint.base_port(1)) # in normal mode, grpc query works even if we don't pass chain_id explicitly rsp = grpc_eth_call(api_port, msg) print(rsp) @@ -66,25 +66,25 @@ def test_grpc_mode(custom_ethermint): assert 9000 == int.from_bytes(base64.b64decode(rsp["ret"].encode()), "big") supervisorctl( - custom_ethermint.base_dir / "../tasks.ini", "stop", "ethermint_9000-1-node2" + custom_ethermint.base_dir / "../tasks.ini", "stop", "ethermint_9000-1-node1" ) # run grpc-only mode directly with existing chain state - with (custom_ethermint.base_dir / "node2.log").open("w") as logfile: + with (custom_ethermint.base_dir / "node1.log").open("w") as logfile: proc = subprocess.Popen( [ "ethermintd", "start", "--grpc-only", "--home", - custom_ethermint.base_dir / "node2", + custom_ethermint.base_dir / "node1", ], stdout=logfile, stderr=subprocess.STDOUT, ) try: # wait for grpc and rest api ports - grpc_port = ports.grpc_port(custom_ethermint.base_port(2)) + grpc_port = ports.grpc_port(custom_ethermint.base_port(1)) wait_for_port(grpc_port) wait_for_port(api_port) diff --git a/tests/integration_tests/test_rollback.py b/tests/integration_tests/test_rollback.py index 1fbe316356..f6dd656a71 100644 --- a/tests/integration_tests/test_rollback.py +++ b/tests/integration_tests/test_rollback.py @@ -10,7 +10,7 @@ from .utils import supervisorctl, wait_for_block, wait_for_port -def update_node2_cmd(path, cmd, i): +def update_node_cmd(path, cmd, i): ini_path = path / SUPERVISOR_CONFIG_FILE ini = configparser.RawConfigParser() ini.read(ini_path) @@ -29,7 +29,7 @@ def update_node2_cmd(path, cmd, i): def post_init(broken_binary): def inner(path, base_port, config): chain_id = "ethermint_9000-1" - update_node2_cmd(path / chain_id, broken_binary, 2) + update_node_cmd(path / chain_id, broken_binary, 1) return inner @@ -66,33 +66,33 @@ def test_rollback(custom_ethermint): - use rollback command to rollback the db. - switch to correct binary should make the node syncing again. """ - wait_for_port(ports.rpc_port(custom_ethermint.base_port(2))) + target_port = ports.rpc_port(custom_ethermint.base_port(1)) + wait_for_port(target_port) - print("wait for node2 to sync the first 10 blocks") - cli2 = custom_ethermint.cosmos_cli(2) - wait_for_block(cli2, 10) + print("wait for node1 to sync the first 10 blocks") + cli1 = custom_ethermint.cosmos_cli(1) + wait_for_block(cli1, 10) print("wait for a few more blocks on the healthy nodes") - cli = custom_ethermint.cosmos_cli(0) - wait_for_block(cli, 13) + cli0 = custom_ethermint.cosmos_cli(0) + wait_for_block(cli0, 13) # (app hash mismatch happens after the 10th block, detected in the 11th block) - print("check node2 get stuck at block 10") - assert cli2.block_height() == 10 + print("check node1 get stuck at block 10") + assert cli1.block_height() == 10 - print("stop node2") + print("stop node1") supervisorctl( - custom_ethermint.base_dir / "../tasks.ini", "stop", "ethermint_9000-1-node2" + custom_ethermint.base_dir / "../tasks.ini", "stop", "ethermint_9000-1-node1" ) - print("do rollback on node2") - cli2.rollback() + print("do rollback on node1") + cli1.rollback() print("switch to normal binary") - update_node2_cmd(custom_ethermint.base_dir, "ethermintd", 2) + update_node_cmd(custom_ethermint.base_dir, "ethermintd", 1) supervisorctl(custom_ethermint.base_dir / "../tasks.ini", "update") - wait_for_port(ports.rpc_port(custom_ethermint.base_port(2))) + wait_for_port(target_port) - print("check node2 sync again") - cli2 = custom_ethermint.cosmos_cli(2) - wait_for_block(cli2, 15) + print("check node1 sync again") + wait_for_block(cli1, 15) From c02f04b57e28d32f0e8a1f42db73ee703704875e Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 28 Nov 2022 09:39:39 +0800 Subject: [PATCH 12/29] add retry for grpc_eth_call --- tests/integration_tests/test_grpc_only.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tests/integration_tests/test_grpc_only.py b/tests/integration_tests/test_grpc_only.py index 5f9f8886f3..2d4aef4b04 100644 --- a/tests/integration_tests/test_grpc_only.py +++ b/tests/integration_tests/test_grpc_only.py @@ -1,6 +1,7 @@ import base64 import json import subprocess +import time from pathlib import Path import pytest @@ -60,11 +61,18 @@ def test_grpc_mode(custom_ethermint): } api_port = ports.api_port(custom_ethermint.base_port(1)) # in normal mode, grpc query works even if we don't pass chain_id explicitly - rsp = grpc_eth_call(api_port, msg) - print(rsp) - assert "code" not in rsp, str(rsp) - assert 9000 == int.from_bytes(base64.b64decode(rsp["ret"].encode()), "big") - + success = False + for i in range(3): + rsp = grpc_eth_call(api_port, msg) + print(i, rsp) + assert "code" not in rsp, str(rsp) + ret = rsp["ret"] + valid = ret is not None + if valid and 9000 == int.from_bytes(base64.b64decode(ret.encode()), "big"): + success = True + break + time.sleep(1) + assert success supervisorctl( custom_ethermint.base_dir / "../tasks.ini", "stop", "ethermint_9000-1-node1" ) From ac41f329c195e086d83e7333bdcf05ff702d5aa6 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 28 Nov 2022 09:39:43 +0800 Subject: [PATCH 13/29] wait 1 block before stop --- tests/integration_tests/test_grpc_only.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/integration_tests/test_grpc_only.py b/tests/integration_tests/test_grpc_only.py index 2d4aef4b04..4c059e29d2 100644 --- a/tests/integration_tests/test_grpc_only.py +++ b/tests/integration_tests/test_grpc_only.py @@ -14,6 +14,7 @@ decode_bech32, deploy_contract, supervisorctl, + wait_for_block, wait_for_port, ) @@ -73,12 +74,15 @@ def test_grpc_mode(custom_ethermint): break time.sleep(1) assert success + # wait 1 block before stop + for i in range(2): + wait_for_block(custom_ethermint.cosmos_cli(i), 1) supervisorctl( custom_ethermint.base_dir / "../tasks.ini", "stop", "ethermint_9000-1-node1" ) # run grpc-only mode directly with existing chain state - with (custom_ethermint.base_dir / "node1.log").open("w") as logfile: + with (custom_ethermint.base_dir / "node1-new.log").open("w") as logfile: proc = subprocess.Popen( [ "ethermintd", @@ -107,9 +111,7 @@ def test_grpc_mode(custom_ethermint): assert "validator does not exist" in rsp["message"] # pass the first validator's consensus address to grpc query - cons_addr = decode_bech32( - custom_ethermint.cosmos_cli(0).consensus_address() - ) + cons_addr = decode_bech32(custom_ethermint.cosmos_cli(0).consensus_address()) # should work with both chain_id and proposer_address set rsp = grpc_eth_call( From 30b0c6163cdcee1cad15d175f0918f15c70679d4 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 28 Nov 2022 10:09:04 +0800 Subject: [PATCH 14/29] fix lint --- tests/integration_tests/test_grpc_only.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration_tests/test_grpc_only.py b/tests/integration_tests/test_grpc_only.py index 4c059e29d2..c342e73927 100644 --- a/tests/integration_tests/test_grpc_only.py +++ b/tests/integration_tests/test_grpc_only.py @@ -111,7 +111,8 @@ def test_grpc_mode(custom_ethermint): assert "validator does not exist" in rsp["message"] # pass the first validator's consensus address to grpc query - cons_addr = decode_bech32(custom_ethermint.cosmos_cli(0).consensus_address()) + addr = custom_ethermint.cosmos_cli(0).consensus_address() + cons_addr = decode_bech32(addr) # should work with both chain_id and proposer_address set rsp = grpc_eth_call( From f4a106d10c835d55dc63ddb8971a6217895b2268 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Wed, 30 Nov 2022 12:38:34 +0800 Subject: [PATCH 15/29] disable recheck --- tests/integration_tests/configs/default.jsonnet | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration_tests/configs/default.jsonnet b/tests/integration_tests/configs/default.jsonnet index b181297d5b..c938302379 100644 --- a/tests/integration_tests/configs/default.jsonnet +++ b/tests/integration_tests/configs/default.jsonnet @@ -7,6 +7,7 @@ mempool: { // use v1 mempool to enable tx prioritization version: 'v1', + recheck: false, }, }, 'app-config': { From ad876a0320dcad25d5b1e0e76f16f25bacb74c19 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Wed, 30 Nov 2022 12:48:48 +0800 Subject: [PATCH 16/29] bump up upgrade --- tests/integration_tests/configs/cosmovisor.jsonnet | 7 ------- .../integration_tests/configs/upgrade-test-package.nix | 4 ++-- tests/integration_tests/cosmoscli.py | 10 +++++++--- tests/integration_tests/test_upgrade.py | 1 - 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/tests/integration_tests/configs/cosmovisor.jsonnet b/tests/integration_tests/configs/cosmovisor.jsonnet index 4612069b84..dc3cb1a4a2 100644 --- a/tests/integration_tests/configs/cosmovisor.jsonnet +++ b/tests/integration_tests/configs/cosmovisor.jsonnet @@ -2,11 +2,6 @@ local config = import 'default.jsonnet'; config { 'ethermint_9000-1'+: { - config+: { - consensus+: { - timeout_commit: '2s', - }, - }, 'app-config'+: { 'minimum-gas-prices': '100000000000aphoton', }, @@ -14,9 +9,7 @@ config { app_state+: { feemarket+: { params+: { - no_base_fee: false, base_fee:: super.base_fee, - initial_base_fee: super.base_fee, }, }, }, diff --git a/tests/integration_tests/configs/upgrade-test-package.nix b/tests/integration_tests/configs/upgrade-test-package.nix index a703086f90..6b8345cef8 100644 --- a/tests/integration_tests/configs/upgrade-test-package.nix +++ b/tests/integration_tests/configs/upgrade-test-package.nix @@ -4,9 +4,9 @@ let released = pkgs.buildGo118Module rec { name = "ethermintd"; # the commit before https://github.com/evmos/ethermint/pull/943 - src = fetchEthermint "f21592ebfe74da7590eb42ed926dae970b2a9a3f"; + src = fetchEthermint "8866ae0ffd67a104e9d1cf4e50fba8391dda6c45"; subPackages = [ "cmd/ethermintd" ]; - vendorSha256 = "sha256-ABm5t6R/u2S6pThGrgdsqe8n3fH5tIWw7a57kxJPbYw="; + vendorSha256 = "sha256-oDtMamNlwe/393fZd+RNtRy6ipWpusbco8Xg1ZuKWYw="; doCheck = false; }; current = pkgs.callPackage ../../../. { }; diff --git a/tests/integration_tests/cosmoscli.py b/tests/integration_tests/cosmoscli.py index 7a1edbe631..71bde8f61e 100644 --- a/tests/integration_tests/cosmoscli.py +++ b/tests/integration_tests/cosmoscli.py @@ -6,6 +6,7 @@ from pystarport.utils import build_cli_args_safe, interact DEFAULT_GAS_PRICE = "5000000000000aphoton" +DEFAULT_GAS = "250000" class ChainCommand: @@ -636,16 +637,19 @@ def edit_validator( ) def gov_propose(self, proposer, kind, proposal, **kwargs): + method = "submit-legacy-proposal" kwargs.setdefault("gas_prices", DEFAULT_GAS_PRICE) + kwargs.setdefault("gas", DEFAULT_GAS) if kind == "software-upgrade": return json.loads( self.raw( "tx", "gov", - "submit-proposal", + method, kind, proposal["name"], "-y", + "--no-validate", from_=proposer, # content title=proposal.get("title"), @@ -664,7 +668,7 @@ def gov_propose(self, proposer, kind, proposal, **kwargs): self.raw( "tx", "gov", - "submit-proposal", + method, kind, "-y", from_=proposer, @@ -685,7 +689,7 @@ def gov_propose(self, proposer, kind, proposal, **kwargs): self.raw( "tx", "gov", - "submit-proposal", + method, kind, fp.name, "-y", diff --git a/tests/integration_tests/test_upgrade.py b/tests/integration_tests/test_upgrade.py index 400e9a9f30..fd0b55101b 100644 --- a/tests/integration_tests/test_upgrade.py +++ b/tests/integration_tests/test_upgrade.py @@ -120,7 +120,6 @@ def test_cosmovisor_upgrade(custom_ethermint: Ethermint): # get proposal_id ev = parse_events(rsp["logs"])["submit_proposal"] - assert ev["proposal_type"] == "SoftwareUpgrade", rsp proposal_id = ev["proposal_id"] rsp = cli.gov_vote("validator", proposal_id, "yes") From 6ffe8473a49068545e807ccde642e2da2b38d0e7 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Wed, 30 Nov 2022 12:56:36 +0800 Subject: [PATCH 17/29] sync gomod2nix --- gomod2nix.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gomod2nix.toml b/gomod2nix.toml index 422a118ee7..650e3d13a1 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -20,8 +20,8 @@ schema = 3 version = "v1.0.0-beta.7" hash = "sha256-XblGvIx6Wvvq6wggXjp+KbeJGXoe7AZH7hXEdauCezU=" [mod."cosmossdk.io/math"] - version = "v1.0.0-beta.3" - hash = "sha256-lTQ27ZlL+kWlc+S//sJmyiOwaf9qS+YLv61I4OXi9XE=" + version = "v1.0.0-beta.4" + hash = "sha256-UYdq/46EubyjxkldGike8FlwJLWGCB576VB7th285ao=" [mod."filippo.io/edwards25519"] version = "v1.0.0-rc.1" hash = "sha256-3DboBqby2ejRU33FG96Z8JF5AJ8HP2rC/v++VyoQ2LQ=" From ba3bfc8212e5002df55b5cfafd593c89cbb27202 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Wed, 30 Nov 2022 18:01:43 +0800 Subject: [PATCH 18/29] Apply suggestions from code review --- tests/integration_tests/test_grpc_only.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/integration_tests/test_grpc_only.py b/tests/integration_tests/test_grpc_only.py index c342e73927..abc0973dec 100644 --- a/tests/integration_tests/test_grpc_only.py +++ b/tests/integration_tests/test_grpc_only.py @@ -63,7 +63,9 @@ def test_grpc_mode(custom_ethermint): api_port = ports.api_port(custom_ethermint.base_port(1)) # in normal mode, grpc query works even if we don't pass chain_id explicitly success = False - for i in range(3): + max_retry = 3 + sleep = 1 + for i in range(max_retry): rsp = grpc_eth_call(api_port, msg) print(i, rsp) assert "code" not in rsp, str(rsp) @@ -72,9 +74,9 @@ def test_grpc_mode(custom_ethermint): if valid and 9000 == int.from_bytes(base64.b64decode(ret.encode()), "big"): success = True break - time.sleep(1) + time.sleep(sleep) assert success - # wait 1 block before stop + # wait 1 more block to avoid both nodes stopped before tnx included for i in range(2): wait_for_block(custom_ethermint.cosmos_cli(i), 1) supervisorctl( From 91bc698b1405ff423c5b1ab3507ba714b2576ac2 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Wed, 30 Nov 2022 20:16:56 +0800 Subject: [PATCH 19/29] Apply suggestions from code review --- tests/integration_tests/test_grpc_only.py | 4 ++-- tests/integration_tests/test_upgrade.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration_tests/test_grpc_only.py b/tests/integration_tests/test_grpc_only.py index abc0973dec..7948a2a38e 100644 --- a/tests/integration_tests/test_grpc_only.py +++ b/tests/integration_tests/test_grpc_only.py @@ -67,7 +67,6 @@ def test_grpc_mode(custom_ethermint): sleep = 1 for i in range(max_retry): rsp = grpc_eth_call(api_port, msg) - print(i, rsp) assert "code" not in rsp, str(rsp) ret = rsp["ret"] valid = ret is not None @@ -76,7 +75,7 @@ def test_grpc_mode(custom_ethermint): break time.sleep(sleep) assert success - # wait 1 more block to avoid both nodes stopped before tnx included + # wait 1 more block for both nodes to avoid node stopped before tnx get included for i in range(2): wait_for_block(custom_ethermint.cosmos_cli(i), 1) supervisorctl( @@ -84,6 +83,7 @@ def test_grpc_mode(custom_ethermint): ) # run grpc-only mode directly with existing chain state + # rename as node1-new.log to avoid overwrite previous node's log file after restart with (custom_ethermint.base_dir / "node1-new.log").open("w") as logfile: proc = subprocess.Popen( [ diff --git a/tests/integration_tests/test_upgrade.py b/tests/integration_tests/test_upgrade.py index fd0b55101b..2d86ce643b 100644 --- a/tests/integration_tests/test_upgrade.py +++ b/tests/integration_tests/test_upgrade.py @@ -140,7 +140,7 @@ def test_cosmovisor_upgrade(custom_ethermint: Ethermint): cli = custom_ethermint.cosmos_cli() # block should pass the target height - wait_for_block(cli, target_height + 2, timeout=480) + wait_for_block(cli, target_height + 1, timeout=480) wait_for_port(ports.rpc_port(custom_ethermint.base_port(0))) # test migrate keystore From 60c43289ab79144df95058d3a2fbfa6d6dd3e1c5 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Thu, 1 Dec 2022 10:23:38 +0800 Subject: [PATCH 20/29] append node log --- tests/integration_tests/test_grpc_only.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/integration_tests/test_grpc_only.py b/tests/integration_tests/test_grpc_only.py index 7948a2a38e..74391b0e9e 100644 --- a/tests/integration_tests/test_grpc_only.py +++ b/tests/integration_tests/test_grpc_only.py @@ -83,8 +83,7 @@ def test_grpc_mode(custom_ethermint): ) # run grpc-only mode directly with existing chain state - # rename as node1-new.log to avoid overwrite previous node's log file after restart - with (custom_ethermint.base_dir / "node1-new.log").open("w") as logfile: + with (custom_ethermint.base_dir / "node1.log").open("a") as logfile: proc = subprocess.Popen( [ "ethermintd", From 5a625fd8289ad6c274858b4c83dbacf0d58fdc23 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Thu, 1 Dec 2022 10:41:58 +0800 Subject: [PATCH 21/29] fix lint --- tests/integration_tests/test_filters.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration_tests/test_filters.py b/tests/integration_tests/test_filters.py index 3b11428bd3..12948036b4 100644 --- a/tests/integration_tests/test_filters.py +++ b/tests/integration_tests/test_filters.py @@ -56,6 +56,7 @@ def test_basic(cluster): w3 = cluster.w3 assert w3.eth.chain_id == 9000 + # Smart contract names GREETER_CONTRACT = "Greeter" ERC20_CONTRACT = "TestERC20A" From 77e9990fd1b56621369847556bf2cf5b106574b9 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Thu, 1 Dec 2022 10:46:35 +0800 Subject: [PATCH 22/29] expect less gas after ecd76396eb55dc44535842018c5f13f234af7da3 --- tests/integration_tests/expected_constants.py | 8 ++++---- tests/integration_tests/test_pruned_node.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration_tests/expected_constants.py b/tests/integration_tests/expected_constants.py index 2f75f71581..e3d39d85f6 100644 --- a/tests/integration_tests/expected_constants.py +++ b/tests/integration_tests/expected_constants.py @@ -152,10 +152,10 @@ EXPECTED_CONTRACT_CREATE_TRACER = { "from": "0x57f96e6b86cdefdb3d412547816a82e3e0ebf9d2", - "gas": "0x810ee", - "gasUsed": "0x810ee", - "input": "0x608060405234801561001057600080fd5b50604080518082018252600981526805465737445524332360bc1b60208083019182528351808501909452600484526315195cdd60e21b90840152815191929161005c91600391610176565b508051610070906004906020840190610176565b50505061008e336a52b7d2dcc80cd2e400000061009360201b60201c565b610270565b6001600160a01b0382166100ed5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b80600260008282546100ff919061020f565b90915550506001600160a01b0382166000908152602081905260408120805483929061012c90849061020f565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b82805461018290610235565b90600052602060002090601f0160209004810192826101a457600085556101ea565b82601f106101bd57805160ff19168380011785556101ea565b828001600101855582156101ea579182015b828111156101ea5782518255916020019190600101906101cf565b506101f69291506101fa565b5090565b5b808211156101f657600081556001016101fb565b6000821982111561023057634e487b7160e01b600052601160045260246000fd5b500190565b600181811c9082168061024957607f821691505b6020821081141561026a57634e487b7160e01b600052602260045260246000fd5b50919050565b61088780620002806000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c391906106c4565b60405180910390f35b6100df6100da366004610735565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f36600461075f565b61024a565b604051601281526020016100c3565b6100df610131366004610735565b61026e565b6100f361014436600461079b565b6001600160a01b031660009081526020819052604090205490565b6100b6610290565b6100df610175366004610735565b61029f565b6100df610188366004610735565b61031f565b6100f361019b3660046107bd565b61032d565b6060600380546101af906107f0565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107f0565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b919061082b565b610358565b6060600480546101af906107f0565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260208190526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061066b90849061082b565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106b791815260200190565b60405180910390a36104f0565b600060208083528351808285015260005b818110156106f1578581018301518582016040015282016106d5565b81811115610703576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461073057600080fd5b919050565b6000806040838503121561074857600080fd5b61075183610719565b946020939093013593505050565b60008060006060848603121561077457600080fd5b61077d84610719565b925061078b60208501610719565b9150604084013590509250925092565b6000602082840312156107ad57600080fd5b6107b682610719565b9392505050565b600080604083850312156107d057600080fd5b6107d983610719565b91506107e760208401610719565b90509250929050565b600181811c9082168061080457607f821691505b6020821081141561082557634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561084c57634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220c0d85a7786c0e64745bde36a97db64a8cb6d2d67c277d21b95a0c43bf2d1b86d64736f6c634300080a0033", # noqa: E501 - "output": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c391906106c4565b60405180910390f35b6100df6100da366004610735565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f36600461075f565b61024a565b604051601281526020016100c3565b6100df610131366004610735565b61026e565b6100f361014436600461079b565b6001600160a01b031660009081526020819052604090205490565b6100b6610290565b6100df610175366004610735565b61029f565b6100df610188366004610735565b61031f565b6100f361019b3660046107bd565b61032d565b6060600380546101af906107f0565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107f0565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b919061082b565b610358565b6060600480546101af906107f0565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260208190526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061066b90849061082b565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106b791815260200190565b60405180910390a36104f0565b600060208083528351808285015260005b818110156106f1578581018301518582016040015282016106d5565b81811115610703576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461073057600080fd5b919050565b6000806040838503121561074857600080fd5b61075183610719565b946020939093013593505050565b60008060006060848603121561077457600080fd5b61077d84610719565b925061078b60208501610719565b9150604084013590509250925092565b6000602082840312156107ad57600080fd5b6107b682610719565b9392505050565b600080604083850312156107d057600080fd5b6107d983610719565b91506107e760208401610719565b90509250929050565b600181811c9082168061080457607f821691505b6020821081141561082557634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561084c57634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220c0d85a7786c0e64745bde36a97db64a8cb6d2d67c277d21b95a0c43bf2d1b86d64736f6c634300080a0033", # noqa: E501 + "gas": "0x7ef9d", + "gasUsed": "0x7ef9d", + "input": "0x608060405234801561001057600080fd5b50604080518082018252600981526805465737445524332360bc1b60208083019182528351808501909452600484526315195cdd60e21b90840152815191929161005c91600391610156565b508051610070906004906020840190610156565b50505061008e336a52b7d2dcc80cd2e400000061009360201b60201c565b610250565b6001600160a01b0382166100ed5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b80600260008282546100ff91906101ef565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b82805461016290610215565b90600052602060002090601f01602090048101928261018457600085556101ca565b82601f1061019d57805160ff19168380011785556101ca565b828001600101855582156101ca579182015b828111156101ca5782518255916020019190600101906101af565b506101d69291506101da565b5090565b5b808211156101d657600081556001016101db565b6000821982111561021057634e487b7160e01b600052601160045260246000fd5b500190565b600181811c9082168061022957607f821691505b6020821081141561024a57634e487b7160e01b600052602260045260246000fd5b50919050565b61085d8061025f6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069a565b60405180910390f35b6100df6100da36600461070b565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610735565b61024a565b604051601281526020016100c3565b6100df61013136600461070b565b61026e565b6100f3610144366004610771565b6001600160a01b031660009081526020819052604090205490565b6100b6610290565b6100df61017536600461070b565b61029f565b6100df61018836600461070b565b61031f565b6100f361019b366004610793565b61032d565b6060600380546101af906107c6565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c6565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610801565b610358565b6060600480546101af906107c6565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260208190526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f0565b600060208083528351808285015260005b818110156106c7578581018301518582016040015282016106ab565b818111156106d9576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070657600080fd5b919050565b6000806040838503121561071e57600080fd5b610727836106ef565b946020939093013593505050565b60008060006060848603121561074a57600080fd5b610753846106ef565b9250610761602085016106ef565b9150604084013590509250925092565b60006020828403121561078357600080fd5b61078c826106ef565b9392505050565b600080604083850312156107a657600080fd5b6107af836106ef565b91506107bd602084016106ef565b90509250929050565b600181811c908216806107da57607f821691505b602082108114156107fb57634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082257634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220fee840cc9e1cfac46e073588ade030be1401c580c5849dd4e63f659a75eb220c64736f6c634300080a0033", # noqa: E501 + "output": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069a565b60405180910390f35b6100df6100da36600461070b565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610735565b61024a565b604051601281526020016100c3565b6100df61013136600461070b565b61026e565b6100f3610144366004610771565b6001600160a01b031660009081526020819052604090205490565b6100b6610290565b6100df61017536600461070b565b61029f565b6100df61018836600461070b565b61031f565b6100f361019b366004610793565b61032d565b6060600380546101af906107c6565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c6565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610801565b610358565b6060600480546101af906107c6565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260208190526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f0565b600060208083528351808285015260005b818110156106c7578581018301518582016040015282016106ab565b818111156106d9576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070657600080fd5b919050565b6000806040838503121561071e57600080fd5b610727836106ef565b946020939093013593505050565b60008060006060848603121561074a57600080fd5b610753846106ef565b9250610761602085016106ef565b9150604084013590509250925092565b60006020828403121561078357600080fd5b61078c826106ef565b9392505050565b600080604083850312156107a657600080fd5b6107af836106ef565b91506107bd602084016106ef565b90509250929050565b600181811c908216806107da57607f821691505b602082108114156107fb57634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082257634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220fee840cc9e1cfac46e073588ade030be1401c580c5849dd4e63f659a75eb220c64736f6c634300080a0033", # noqa: E501 "to": "0x8c76cfc1934d5120cc673b6e5ddf7b88feb1c18c", "type": "CREATE", "value": "0x0", diff --git a/tests/integration_tests/test_pruned_node.py b/tests/integration_tests/test_pruned_node.py index de21d12229..9ead542423 100644 --- a/tests/integration_tests/test_pruned_node.py +++ b/tests/integration_tests/test_pruned_node.py @@ -103,7 +103,7 @@ def test_pruned_node(pruned): exp_tx = AttributeDict( { "from": "0x57f96e6B86CdeFdB3d412547816a82E3E0EbF9D2", - "gas": 51542, + "gas": 51406, "input": ( "0xa9059cbb000000000000000000000000378c50d9264c63f3f92b806d4ee56e" "9d86ffb3ec000000000000000000000000000000000000000000000000000000" From 12385ea58f89766f2f4fc25d16b1fcf8500c5445 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 5 Dec 2022 17:24:56 +0800 Subject: [PATCH 23/29] allow retry continue on empty rsp --- tests/integration_tests/test_grpc_only.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration_tests/test_grpc_only.py b/tests/integration_tests/test_grpc_only.py index 74391b0e9e..0531bcfaaa 100644 --- a/tests/integration_tests/test_grpc_only.py +++ b/tests/integration_tests/test_grpc_only.py @@ -67,7 +67,6 @@ def test_grpc_mode(custom_ethermint): sleep = 1 for i in range(max_retry): rsp = grpc_eth_call(api_port, msg) - assert "code" not in rsp, str(rsp) ret = rsp["ret"] valid = ret is not None if valid and 9000 == int.from_bytes(base64.b64decode(ret.encode()), "big"): From e49f98c64d4a2ddf82d65a933448d6b3e0b876a9 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Thu, 8 Dec 2022 17:37:25 -0500 Subject: [PATCH 24/29] update gomod2nix --- gomod2nix.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gomod2nix.toml b/gomod2nix.toml index f09b5baeb7..eb31415b76 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -163,8 +163,8 @@ schema = 3 version = "v1.0.0" hash = "sha256-k1DYvCqO3BKNcGEve/nMW0RxzMkK2tGfXbUbycqcVSo=" [mod."github.com/ethereum/go-ethereum"] - version = "v1.10.25" - hash = "sha256-tNlI2XyuTXjGuBoe5vlYDcaGN2Sub7yltVtI6TeLLSc=" + version = "v1.10.26" + hash = "sha256-gkMEwJ4rOgn12amD4QpZ4th/10uyTTeoFmpseuKDQPs=" [mod."github.com/felixge/httpsnoop"] version = "v1.0.1" hash = "sha256-TNXnnC/ZGNY9lInAcES1cBGqIdEljKuh5LH/khVFjVk=" From 58d3add90d43829e760dd729b1a1c9a349bc9319 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Thu, 8 Dec 2022 17:38:12 -0500 Subject: [PATCH 25/29] fix flake --- tests/integration_tests/test_gas.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration_tests/test_gas.py b/tests/integration_tests/test_gas.py index e35ae96cb6..5589f951fc 100644 --- a/tests/integration_tests/test_gas.py +++ b/tests/integration_tests/test_gas.py @@ -102,5 +102,4 @@ def test_block_gas_limit(ethermint): ) (ethermint.w3.eth.wait_for_transaction_receipt(ethermint_txhash)) - return From 89f92ea4c7e4816fe444921a7e0a9064db8a054d Mon Sep 17 00:00:00 2001 From: mmsqe Date: Fri, 9 Dec 2022 09:31:21 +0800 Subject: [PATCH 26/29] mod tidy --- gomod2nix.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gomod2nix.toml b/gomod2nix.toml index 7689bb3266..68d0506aeb 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -497,8 +497,8 @@ schema = 3 version = "v0.0.0-20220722155223-a9213eeb770e" hash = "sha256-kNgzydWRpjm0sZl4uXEs3LX5L0xjJtJRAFf/CTlYUN4=" [mod."golang.org/x/net"] - version = "v0.2.0" - hash = "sha256-0MqnHDdLkkau6k7hlWD9MzIoAFROvxulyT+KzZkSXOs=" + version = "v0.4.0" + hash = "sha256-7IwGZh/xg4mQz88cJio2Ov5d3jGRXKj1itlAja/EAbQ=" [mod."golang.org/x/oauth2"] version = "v0.0.0-20221014153046-6fdb5e3db783" hash = "sha256-IoygidVNqyAZmN+3macDeIefK8hhJToygpcqlwehdYQ=" @@ -506,11 +506,11 @@ schema = 3 version = "v0.1.0" hash = "sha256-Hygjq9euZ0qz6TvHYQwOZEjNiTbTh1nSLRAWZ6KFGR8=" [mod."golang.org/x/sys"] - version = "v0.2.0" - hash = "sha256-N6yfQH7R2gfcvyWTQZbxWuSNyVy6hAxiab2WFzgAykI=" + version = "v0.3.0" + hash = "sha256-TIHhfYbZ99sCU1ZMikxwomXH5AEtD/lA1VMMW+UAhbU=" [mod."golang.org/x/term"] - version = "v0.2.0" - hash = "sha256-azcllZ0o/9TurqX9udaJ0o9yxqSoI0/bSJsvQQLYIQc=" + version = "v0.3.0" + hash = "sha256-NKv2o8wz8DB/2W2h/muGEIHb+S06mBXZxhG254RpQ5s=" [mod."golang.org/x/text"] version = "v0.5.0" hash = "sha256-ztH+xQyM/clOcQl+y/UEPcfNKbc3xApMbEPDDZ9up0o=" From 86eb2c33bc61dff816bdfaf4a3b76a382d9e6b21 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Fri, 9 Dec 2022 09:32:01 +0800 Subject: [PATCH 27/29] keep grpc only test --- tests/integration_tests/test_grpc_only.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/integration_tests/test_grpc_only.py b/tests/integration_tests/test_grpc_only.py index f635d1730e..0531bcfaaa 100644 --- a/tests/integration_tests/test_grpc_only.py +++ b/tests/integration_tests/test_grpc_only.py @@ -47,9 +47,6 @@ def grpc_eth_call(port: int, args: dict, chain_id=None, proposer_address=None): ).json() -@pytest.mark.skip( - reason="undeterministic test - https://github.com/evmos/ethermint/issues/1530" -) def test_grpc_mode(custom_ethermint): """ - restart a fullnode in grpc-only mode From 6e45dc075b075905673b60b7118d8a4c17e71441 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 22 Dec 2022 15:04:00 -0300 Subject: [PATCH 28/29] tests(integration): enable recheck tx mode --- tests/integration_tests/configs/default.jsonnet | 1 - tests/integration_tests/test_upgrade.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/integration_tests/configs/default.jsonnet b/tests/integration_tests/configs/default.jsonnet index c938302379..b181297d5b 100644 --- a/tests/integration_tests/configs/default.jsonnet +++ b/tests/integration_tests/configs/default.jsonnet @@ -7,7 +7,6 @@ mempool: { // use v1 mempool to enable tx prioritization version: 'v1', - recheck: false, }, }, 'app-config': { diff --git a/tests/integration_tests/test_upgrade.py b/tests/integration_tests/test_upgrade.py index 2d86ce643b..566f41e3d6 100644 --- a/tests/integration_tests/test_upgrade.py +++ b/tests/integration_tests/test_upgrade.py @@ -92,9 +92,6 @@ def test_cosmovisor_upgrade(custom_ethermint: Ethermint): - check that queries on legacy blocks still works after upgrade. """ cli = custom_ethermint.cosmos_cli() - height = cli.block_height() - target_height = height + 10 - print("upgrade height", target_height) w3 = custom_ethermint.w3 contract, _ = deploy_contract(w3, CONTRACTS["TestERC20A"]) @@ -104,6 +101,9 @@ def test_cosmovisor_upgrade(custom_ethermint: Ethermint): old_erc20_balance = contract.caller.balanceOf(ADDRS["validator"]) print("old values", old_height, old_balance, old_base_fee) + target_height = w3.eth.block_number + 10 + print("upgrade height", target_height) + plan_name = "integration-test-upgrade" rsp = cli.gov_propose( "community", From 673093de2ae6ed480d4b66808c1d16dadad0fb8e Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Fri, 23 Dec 2022 07:29:41 -0500 Subject: [PATCH 29/29] update gomod2nix --- gomod2nix.toml | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/gomod2nix.toml b/gomod2nix.toml index 68d0506aeb..b0ca46f2b8 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -60,8 +60,8 @@ schema = 3 version = "v0.22.1" hash = "sha256-hBU+roIELcmbW2Gz7eGZzL9qNA1bakq5wNxqCgs4TKc=" [mod."github.com/btcsuite/btcd/btcec/v2"] - version = "v2.2.0" - hash = "sha256-cwoIqi0SiAaGEBtuQKip9OVirKIeJw5fUoWo7x/xfOc=" + version = "v2.3.2" + hash = "sha256-natWs+yIAuD1UI07iZtjPilroQLfXizFn3lNOiOT83U=" [mod."github.com/btcsuite/btcd/chaincfg/chainhash"] version = "v1.0.1" hash = "sha256-vix0j/KGNvoKjhlKgVeSLY6un2FHeIEoZWMC4z3yvZ4=" @@ -91,14 +91,14 @@ schema = 3 hash = "sha256-mFKxFHp7RaE1L5NdtH9H9px2Cy6I5uOZVnFOgE8Nrew=" replaced = "github.com/cosmos/cosmos-sdk/ics23/go" [mod."github.com/cosmos/btcutil"] - version = "v1.0.4" - hash = "sha256-JvcBXBdjdmnaW/nyf/tw/uaOAGn1b78yxrtl2/Rs3kA=" + version = "v1.0.5" + hash = "sha256-t572Sr5iiHcuMKLMWa2i+LBAt192oa+G1oA371tG/eI=" [mod."github.com/cosmos/cosmos-proto"] version = "v1.0.0-beta.1" hash = "sha256-oATkuj+fM5eBn+ywO+w/tL0AFSIEkx0J3Yz+VhVe0QA=" [mod."github.com/cosmos/cosmos-sdk"] - version = "v0.46.6" - hash = "sha256-H1VZxZUWXhpXiY3A9smLp09MEGpXmh+XvX6YUiXPcpQ=" + version = "v0.46.7" + hash = "sha256-54DCF8lrnA1oUmBJlbUlWXOP5UbenRInUROn5P5I9qI=" [mod."github.com/cosmos/go-bip39"] version = "v1.0.0" hash = "sha256-Qm2aC2vaS8tjtMUbHmlBSagOSqbduEEDwc51qvQaBmA=" @@ -112,14 +112,11 @@ schema = 3 version = "v0.19.4" hash = "sha256-EmpRZ48pjPFq/fIHneut9Vyo5QJATfb3ZO7KzWnqs9g=" [mod."github.com/cosmos/ibc-go/v5"] - version = "v5.1.0" - hash = "sha256-9ZwGw6XqYkBtj+vTQ2IodNb7VcGesTFnVsxjd+G1I6Q=" + version = "v5.2.0" + hash = "sha256-Gfqhdz9ZKEgb7LCkHiXCwYZYUYluQ+vMew/GkssfVj8=" [mod."github.com/cosmos/ledger-cosmos-go"] - version = "v0.11.1" - hash = "sha256-yli+VvVtZmHo2LPvCY6lYVUfcCDn3sBLDL+a8KIlqDA=" - [mod."github.com/cosmos/ledger-go"] - version = "v0.9.2" - hash = "sha256-0YI+0A6wFBjiebBwzWOQjkgXkTakCrf7Gjg2xEaQdoM=" + version = "v0.12.1" + hash = "sha256-9+nr+/r4MyiogddS0JcXOuriPqXP4nxln8ts+mYQRcg=" [mod."github.com/creachadair/taskgroup"] version = "v0.3.2" hash = "sha256-Y261IO/d9xjV0UScqHvo31broxvnKn4IQQC9Mu6jNkE=" @@ -362,11 +359,11 @@ schema = 3 version = "v0.0.5" hash = "sha256-/5i70IkH/qSW5KjGzv8aQNKh9tHoz98tqtL0K2DMFn4=" [mod."github.com/onsi/ginkgo/v2"] - version = "v2.5.1" - hash = "sha256-VB29+H9k7l6il63oXJvsjamSUhsw/e99iI/BeTCderA=" + version = "v2.6.1" + hash = "sha256-OEiWYKCGPCaqL3vzSrHquHGm+Q8URT2anpanAVK5hRo=" [mod."github.com/onsi/gomega"] - version = "v1.24.1" - hash = "sha256-REfxQTDRcO23GnmJfOW8/MmPJf9oE2grVvvGiC1eSbo=" + version = "v1.24.2" + hash = "sha256-iascSzzBT1Uv/XybezSblIwwrq78BU4a9BVB5MvK6MM=" [mod."github.com/pelletier/go-toml"] version = "v1.9.5" hash = "sha256-RJ9K1BTId0Mled7S66iGgxHkZ5JKEIsrrNaEfM8aImc=" @@ -464,8 +461,8 @@ schema = 3 version = "v0.16.0" hash = "sha256-JW4zO/0vMzf1dXLePOqaMtiLUZgNbuIseh9GV+jQlf0=" [mod."github.com/tendermint/tendermint"] - version = "v0.34.23" - hash = "sha256-eir0vr8lQOG+FTPo+ZUeDidAIACfyUq2ie3XRE8rIa4=" + version = "v0.34.24" + hash = "sha256-3HFTv4XgN535RDaJ5OwUS+fnJHgkmLTwU7CNU2ilxEQ=" [mod."github.com/tendermint/tm-db"] version = "v0.6.7" hash = "sha256-hl/3RrBrpkk2zA6dmrNlIYKs1/GfqegSscDSkA5Pjlo=" @@ -482,8 +479,11 @@ schema = 3 version = "v0.5.8" hash = "sha256-bfG3dssBUn+mSOAuKL+a/DTGGLUA+eASgLoGv/Gkqs0=" [mod."github.com/zondax/hid"] - version = "v0.9.1-0.20220302062450-5552068d2266" - hash = "sha256-IZea8SHuLQxlltm1avieRVI054TWZg2jEoplodvNtwk=" + version = "v0.9.1" + hash = "sha256-hSVmN/f/lQHFhF60o6ej78ELC0MMoqQgqIX2hHjdTXg=" + [mod."github.com/zondax/ledger-go"] + version = "v0.14.0" + hash = "sha256-RozTPSNs4RerZ4DQMBcGmvREjoRtH1G69xjhccYjIOk=" [mod."go.etcd.io/bbolt"] version = "v1.3.6" hash = "sha256-DenVAmyN22xUiivk6fdJp4C9ZnUJXCMDUf8E0goRRV4="