From 4334aa134613ad4322dfa5d2655fb9dac8445f47 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 6 Nov 2023 18:54:44 +0800 Subject: [PATCH 01/10] Problem: reopen ica account is not tested --- integration_tests/ibc_utils.py | 6 ++--- integration_tests/test_ica_precompile.py | 31 +++++++++++++++++++++++- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/integration_tests/ibc_utils.py b/integration_tests/ibc_utils.py index c3659827b6..2b64e19825 100644 --- a/integration_tests/ibc_utils.py +++ b/integration_tests/ibc_utils.py @@ -576,8 +576,8 @@ def check_contract_balance_change(): return amount, contract.address -def wait_for_check_channel_ready(cli, connid, channel_id): - print("wait for channel ready", channel_id) +def wait_for_check_channel_ready(cli, connid, channel_id, target="STATE_OPEN"): + print("wait for channel ready", channel_id, target) def check_channel_ready(): channels = cli.ibc_query_channels(connid)["channels"] @@ -589,7 +589,7 @@ def check_channel_ready(): ) except StopIteration: return False - return state == "STATE_OPEN" + return state == target wait_for_fn("channel ready", check_channel_ready) diff --git a/integration_tests/test_ica_precompile.py b/integration_tests/test_ica_precompile.py index 4bf394aa6f..765a8bfbe2 100644 --- a/integration_tests/test_ica_precompile.py +++ b/integration_tests/test_ica_precompile.py @@ -198,6 +198,7 @@ def test_sc_call(ibc): signer = ADDRS[name] keys = KEYS[name] data = {"from": signer, "gas": 400000} + channel_id = get_next_channel(cli_controller, connid) ica_address = register_acc( cli_controller, w3, @@ -205,7 +206,7 @@ def test_sc_call(ibc): contract.functions.queryAccount, data, addr, - get_next_channel(cli_controller, connid), + channel_id, ) balance = funds_ica(cli_host, ica_address) assert tcontract.caller.getAccount() == signer @@ -319,3 +320,31 @@ def submit_msgs_ro(func, str): assert status == Status.FAIL assert_packet_result(tcontract.events.OnPacketResult, last_seq, status) assert cli_host.balance(ica_address, denom=denom) == balance + wait_for_check_channel_ready(cli_controller, connid, channel_id, "STATE_CLOSED") + ica_address2 = register_acc( + cli_controller, + w3, + tcontract.functions.callRegister, + contract.functions.queryAccount, + data, + addr, + get_next_channel(cli_controller, connid), + ) + assert ica_address2 == ica_address, ica_address2 + expected_seq = 1 + str, diff = submit_msgs( + ibc, + tcontract.functions.callSubmitMsgs, + data, + ica_address, + False, + expected_seq, + ) + last_seq = tcontract.caller.getLastSeq() + wait_for_status_change(tcontract, last_seq) + status = tcontract.caller.statusMap(last_seq) + assert expected_seq == last_seq + assert status == Status.SUCCESS + assert_packet_result(tcontract.events.OnPacketResult, last_seq, status) + balance -= diff + assert cli_host.balance(ica_address, denom=denom) == balance From c758d9c164a314cd5b2bbf8291aa7614130b014c Mon Sep 17 00:00:00 2001 From: mmsqe Date: Tue, 7 Nov 2023 09:39:07 +0800 Subject: [PATCH 02/10] larger timeout to avoid reject tx by relayer --- integration_tests/test_ica_precompile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/integration_tests/test_ica_precompile.py b/integration_tests/test_ica_precompile.py index 765a8bfbe2..bbe3cefa87 100644 --- a/integration_tests/test_ica_precompile.py +++ b/integration_tests/test_ica_precompile.py @@ -302,7 +302,7 @@ def submit_msgs_ro(func, str): # balance should not change on timeout expected_seq += 1 - timeout = 300000 + timeout = 1000000000 submit_msgs( ibc, tcontract.functions.callSubmitMsgs, @@ -331,6 +331,8 @@ def submit_msgs_ro(func, str): get_next_channel(cli_controller, connid), ) assert ica_address2 == ica_address, ica_address2 + # wait new channel get ready + wait_for_new_blocks(cli_controller, 5) expected_seq = 1 str, diff = submit_msgs( ibc, From 241f493ea33a9ec83c8aeae0c3fcaceb9d6f0557 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Tue, 7 Nov 2023 09:39:37 +0800 Subject: [PATCH 03/10] fix check log --- integration_tests/test_ica_precompile.py | 26 ++++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/integration_tests/test_ica_precompile.py b/integration_tests/test_ica_precompile.py index bbe3cefa87..07636d319a 100644 --- a/integration_tests/test_ica_precompile.py +++ b/integration_tests/test_ica_precompile.py @@ -23,6 +23,7 @@ eth_to_bech32, send_transaction, wait_for_fn, + wait_for_new_blocks, ) CONTRACT = "0x0000000000000000000000000000000000000066" @@ -179,10 +180,15 @@ def check_status(): wait_for_fn("current status", check_status) -def assert_packet_result(event, seq, status): - (logs) = event.getLogs() - assert len(logs) > 0 - return logs[0].args == AttributeDict({"seq": seq, "status": status}) +def wait_for_packet_log(event, seq, status): + print("wait for log arrive") + expected = AttributeDict({"seq": seq, "status": status}) + + def check_log(): + (logs) = event.getLogs() + return len(logs) > 0 and logs[0].args == expected + + wait_for_fn("packet log", check_log) def test_sc_call(ibc): @@ -254,7 +260,7 @@ def submit_msgs_ro(func, str): status = tcontract.caller.statusMap(last_seq) assert expected_seq == last_seq assert status == Status.SUCCESS - assert_packet_result(tcontract.events.OnPacketResult, last_seq, status) + wait_for_packet_log(tcontract.events.OnPacketResult, last_seq, status) balance -= diff assert cli_host.balance(ica_address, denom=denom) == balance @@ -275,7 +281,7 @@ def submit_msgs_ro(func, str): status = tcontract.caller.statusMap(last_seq) assert expected_seq == last_seq assert status == Status.SUCCESS - assert_packet_result(tcontract.events.OnPacketResult, last_seq, status) + wait_for_packet_log(tcontract.events.OnPacketResult, last_seq, status) balance -= diff assert cli_host.balance(ica_address, denom=denom) == balance @@ -297,7 +303,7 @@ def submit_msgs_ro(func, str): status = tcontract.caller.statusMap(last_seq) assert expected_seq == last_seq assert status == Status.FAIL - assert_packet_result(tcontract.events.OnPacketResult, last_seq, status) + wait_for_packet_log(tcontract.events.OnPacketResult, last_seq, status) assert cli_host.balance(ica_address, denom=denom) == balance # balance should not change on timeout @@ -318,7 +324,7 @@ def submit_msgs_ro(func, str): status = tcontract.caller.statusMap(last_seq) assert expected_seq == last_seq assert status == Status.FAIL - assert_packet_result(tcontract.events.OnPacketResult, last_seq, status) + wait_for_packet_log(tcontract.events.OnPacketResult, last_seq, status) assert cli_host.balance(ica_address, denom=denom) == balance wait_for_check_channel_ready(cli_controller, connid, channel_id, "STATE_CLOSED") ica_address2 = register_acc( @@ -341,12 +347,14 @@ def submit_msgs_ro(func, str): ica_address, False, expected_seq, + contract.events.SubmitMsgsResult, ) last_seq = tcontract.caller.getLastSeq() wait_for_status_change(tcontract, last_seq) status = tcontract.caller.statusMap(last_seq) assert expected_seq == last_seq assert status == Status.SUCCESS - assert_packet_result(tcontract.events.OnPacketResult, last_seq, status) + # wait for ack to add log from call evm + wait_for_packet_log(tcontract.events.OnPacketResult, last_seq, status) balance -= diff assert cli_host.balance(ica_address, denom=denom) == balance From 0badb462a4b5ca71965cda694c9e7508a32dca17 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Tue, 7 Nov 2023 09:50:48 +0800 Subject: [PATCH 04/10] Update integration_tests/test_ica_precompile.py Co-authored-by: yihuang Signed-off-by: mmsqe --- integration_tests/test_ica_precompile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/test_ica_precompile.py b/integration_tests/test_ica_precompile.py index 07636d319a..2121513e58 100644 --- a/integration_tests/test_ica_precompile.py +++ b/integration_tests/test_ica_precompile.py @@ -185,7 +185,7 @@ def wait_for_packet_log(event, seq, status): expected = AttributeDict({"seq": seq, "status": status}) def check_log(): - (logs) = event.getLogs() + logs = event.getLogs() return len(logs) > 0 and logs[0].args == expected wait_for_fn("packet log", check_log) From 693f98a918f9f2a5158767064c9d25047f6df023 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Tue, 7 Nov 2023 09:52:03 +0800 Subject: [PATCH 05/10] clean up --- integration_tests/test_ica_precompile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/test_ica_precompile.py b/integration_tests/test_ica_precompile.py index 2121513e58..185a107891 100644 --- a/integration_tests/test_ica_precompile.py +++ b/integration_tests/test_ica_precompile.py @@ -116,7 +116,7 @@ def submit_msgs( print(f"wait for {timeout_in_s}s") wait_for_check_tx(cli_host, ica_address, num_txs, timeout_in_s) else: - (logs) = event.getLogs() + logs = event.getLogs() assert len(logs) > 0 assert logs[0].args == AttributeDict({"seq": expected_seq}) if need_wait: From 4c467d182b775ffbc8f7c1906366e4c915a5aeb2 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 13 Nov 2023 09:01:41 +0800 Subject: [PATCH 06/10] test channel close with large txs --- integration_tests/test_ica.py | 116 +++++++++++++---------- integration_tests/test_ica_precompile.py | 16 ++-- 2 files changed, 76 insertions(+), 56 deletions(-) diff --git a/integration_tests/test_ica.py b/integration_tests/test_ica.py index 3aa590feb3..ea654e8591 100644 --- a/integration_tests/test_ica.py +++ b/integration_tests/test_ica.py @@ -1,6 +1,7 @@ import json import pytest +from pystarport import cluster from .ibc_utils import ( assert_channel_open_init, @@ -15,9 +16,15 @@ @pytest.fixture(scope="module") def ibc(request, tmp_path_factory): "prepare-network" - name = "ibc" + name = "ibc_rly" path = tmp_path_factory.mktemp(name) - yield from prepare_network(path, name, incentivized=False, connection_only=True) + yield from prepare_network( + path, + name, + incentivized=False, + connection_only=True, + relayer=cluster.Relayer.RLY.value, + ) def test_ica(ibc, tmp_path): @@ -25,60 +32,69 @@ def test_ica(ibc, tmp_path): cli_host = ibc.chainmain.cosmos_cli() cli_controller = ibc.cronos.cosmos_cli() - print("register ica account") - rsp = cli_controller.icaauth_register_account( - connid, from_="signer2", gas="400000", fees="100000000basetcro" - ) - _, channel_id = assert_channel_open_init(rsp) - wait_for_check_channel_ready(cli_controller, connid, channel_id) + def register_acc(): + print("register ica account") + rsp = cli_controller.icaauth_register_account( + connid, from_="signer2", gas="400000", fees="100000000basetcro" + ) + _, channel_id = assert_channel_open_init(rsp) + wait_for_check_channel_ready(cli_controller, connid, channel_id) - print("query ica account") - ica_address = cli_controller.ica_query_account( - connid, cli_controller.address("signer2") - )["interchain_account_address"] - print("ica address", ica_address) + print("query ica account") + ica_address = cli_controller.ica_query_account( + connid, cli_controller.address("signer2") + )["interchain_account_address"] + print("ica address", ica_address, "channel_id", channel_id) + return ica_address, channel_id + ica_address, channel_id = register_acc() balance = funds_ica(cli_host, ica_address) num_txs = len(cli_host.query_all_txs(ica_address)["txs"]) - - # generate a transaction to send to host chain - generated_tx = tmp_path / "generated_tx.txt" to = cli_host.address("signer2") amount = 1000 denom = "basecro" - # generate msgs send to host chain - m = gen_send_msg(ica_address, to, denom, amount) - msgs = [] - for i in range(2): - msgs.append(m) - balance -= amount - fee = {"denom": "basetcro", "amount": "20000000000000000"} - generated_tx_msg = { - "body": { - "messages": msgs, - }, - "auth_info": { - "fee": { - "amount": [fee], - "gas_limit": "200000", + + def generated_tx_txt(msg_num): + # generate a transaction to send to host chain + generated_tx = tmp_path / "generated_tx.txt" + m = gen_send_msg(ica_address, to, denom, amount) + msgs = [] + for i in range(msg_num): + msgs.append(m) + generated_tx_msg = { + "body": { + "messages": msgs, }, - }, - } - generated_tx.write_text(json.dumps(generated_tx_msg)) - # submit transaction on host chain on behalf of interchain account - rsp = cli_controller.icaauth_submit_tx( - connid, - generated_tx, - timeout_duration="2h", - from_="signer2", - ) - assert rsp["code"] == 0, rsp["raw_log"] - packet_seq = next( - int(evt["attributes"][4]["value"]) - for evt in rsp["events"] - if evt["type"] == "send_packet" - ) - print("packet sequence", packet_seq) - wait_for_check_tx(cli_host, ica_address, num_txs) - # check if the funds are reduced in interchain account + } + generated_tx.write_text(json.dumps(generated_tx_msg)) + return generated_tx + + no_timeout = 60 + + def submit_msgs(msg_num, timeout_in_s=no_timeout, gas="200000"): + # submit transaction on host chain on behalf of interchain account + rsp = cli_controller.icaauth_submit_tx( + connid, + generated_tx_txt(msg_num), + timeout_duration=f"{timeout_in_s}s", + gas=gas, + from_="signer2", + ) + assert rsp["code"] == 0, rsp["raw_log"] + timeout = timeout_in_s + 3 if timeout_in_s < no_timeout else None + wait_for_check_tx(cli_host, ica_address, num_txs, timeout) + + # submit large txs to trigger timeout + msg_num = 140 + submit_msgs(msg_num, 5, "600000") assert cli_host.balance(ica_address, denom=denom) == balance + wait_for_check_channel_ready(cli_controller, connid, channel_id, "STATE_CLOSED") + # reopen ica account after channel get closed + ica_address2, channel_id2 = register_acc() + assert ica_address2 == ica_address, ica_address2 + assert channel_id2 != channel_id, channel_id2 + # submit normal txs should work + msg_num = 2 + submit_msgs(msg_num) + # check if the funds are reduced in interchain account + assert cli_host.balance(ica_address, denom=denom) == balance - amount * msg_num diff --git a/integration_tests/test_ica_precompile.py b/integration_tests/test_ica_precompile.py index 185a107891..501d99aa44 100644 --- a/integration_tests/test_ica_precompile.py +++ b/integration_tests/test_ica_precompile.py @@ -23,7 +23,6 @@ eth_to_bech32, send_transaction, wait_for_fn, - wait_for_new_blocks, ) CONTRACT = "0x0000000000000000000000000000000000000066" @@ -79,6 +78,7 @@ def submit_msgs( timeout=no_timeout, amount=amt, need_wait=True, + msg_num=2, ): cli_host = ibc.chainmain.cosmos_cli() cli_controller = ibc.cronos.cosmos_cli() @@ -88,7 +88,7 @@ def submit_msgs( m = gen_send_msg(ica_address, to, denom, amount) msgs = [] diff_amt = 0 - for i in range(2): + for i in range(msg_num): msgs.append(m) diff_amt += amount if add_delegate: @@ -181,7 +181,7 @@ def check_status(): def wait_for_packet_log(event, seq, status): - print("wait for log arrive") + print("wait for log arrive", seq, status) expected = AttributeDict({"seq": seq, "status": status}) def check_log(): @@ -203,7 +203,8 @@ def test_sc_call(ibc): name = "signer2" signer = ADDRS[name] keys = KEYS[name] - data = {"from": signer, "gas": 400000} + default_gas = 400000 + data = {"from": signer, "gas": default_gas} channel_id = get_next_channel(cli_controller, connid) ica_address = register_acc( cli_controller, @@ -220,7 +221,7 @@ def test_sc_call(ibc): # register from another user should fail name = "signer1" - data = {"from": ADDRS[name], "gas": 400000} + data = {"from": ADDRS[name], "gas": default_gas} version = "" tx = tcontract.functions.callRegister(connid, version).build_transaction(data) res = send_transaction(w3, tx, KEYS[name]) @@ -308,7 +309,8 @@ def submit_msgs_ro(func, str): # balance should not change on timeout expected_seq += 1 - timeout = 1000000000 + timeout = 5000000000 + data["gas"] = 800000 submit_msgs( ibc, tcontract.functions.callSubmitMsgs, @@ -318,6 +320,7 @@ def submit_msgs_ro(func, str): expected_seq, contract.events.SubmitMsgsResult, timeout, + msg_num=100, ) last_seq = tcontract.caller.getLastSeq() wait_for_status_change(tcontract, last_seq) @@ -327,6 +330,7 @@ def submit_msgs_ro(func, str): wait_for_packet_log(tcontract.events.OnPacketResult, last_seq, status) assert cli_host.balance(ica_address, denom=denom) == balance wait_for_check_channel_ready(cli_controller, connid, channel_id, "STATE_CLOSED") + data["gas"] = default_gas ica_address2 = register_acc( cli_controller, w3, From 644422f5fe652753eacbc7b1407700ff699a36d0 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 13 Nov 2023 09:01:48 +0800 Subject: [PATCH 07/10] point to log level --- integration_tests/poetry.lock | 99 ++++++++++++++++++++++++++++++-- integration_tests/pyproject.toml | 2 +- 2 files changed, 96 insertions(+), 5 deletions(-) diff --git a/integration_tests/poetry.lock b/integration_tests/poetry.lock index 0b75203d31..86f8ad7af7 100644 --- a/integration_tests/poetry.lock +++ b/integration_tests/poetry.lock @@ -1,9 +1,10 @@ -# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. +# This file is automatically @generated by Poetry and should not be changed by hand. [[package]] name = "aiohttp" version = "3.8.5" description = "Async http client/server framework (asyncio)" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -112,6 +113,7 @@ speedups = ["Brotli", "aiodns", "cchardet"] name = "aiosignal" version = "1.2.0" description = "aiosignal: a list of registered asynchronous callbacks" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -126,6 +128,7 @@ frozenlist = ">=1.1.0" name = "async-timeout" version = "4.0.2" description = "Timeout context manager for asyncio programs" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -137,6 +140,7 @@ files = [ name = "atomicwrites" version = "1.4.0" description = "Atomic file writes." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -148,6 +152,7 @@ files = [ name = "attrs" version = "21.4.0" description = "Classes Without Boilerplate" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -165,6 +170,7 @@ tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy" name = "base58" version = "2.1.1" description = "Base58 and Base58Check implementation." +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -179,6 +185,7 @@ tests = ["PyHamcrest (>=2.0.2)", "mypy", "pytest (>=4.6)", "pytest-benchmark", " name = "bech32" version = "1.2.0" description = "Reference implementation for Bech32 and segwit addresses." +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -190,6 +197,7 @@ files = [ name = "bitarray" version = "2.6.0" description = "efficient arrays of booleans -- C extension" +category = "main" optional = false python-versions = "*" files = [ @@ -271,6 +279,7 @@ files = [ name = "black" version = "22.6.0" description = "The uncompromising code formatter." +category = "main" optional = false python-versions = ">=3.6.2" files = [ @@ -317,6 +326,7 @@ uvloop = ["uvloop (>=0.15.2)"] name = "certifi" version = "2023.7.22" description = "Python package for providing Mozilla's CA Bundle." +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -328,6 +338,7 @@ files = [ name = "charset-normalizer" version = "2.0.12" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +category = "main" optional = false python-versions = ">=3.5.0" files = [ @@ -342,6 +353,7 @@ unicode-backport = ["unicodedata2"] name = "click" version = "8.1.2" description = "Composable command line interface toolkit" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -356,6 +368,7 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "colorama" version = "0.4.4" description = "Cross-platform colored terminal text." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -367,6 +380,7 @@ files = [ name = "cprotobuf" version = "0.1.11" description = "pythonic and high performance protocol buffer implementation." +category = "main" optional = false python-versions = "*" files = [ @@ -377,6 +391,7 @@ files = [ name = "cytoolz" version = "0.11.2" description = "Cython implementation of Toolz: High performance functional utilities" +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -393,6 +408,7 @@ cython = ["cython"] name = "docker" version = "5.0.3" description = "A Python library for the Docker Engine API." +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -413,6 +429,7 @@ tls = ["cryptography (>=3.4.7)", "idna (>=2.0.0)", "pyOpenSSL (>=17.5.0)"] name = "durations" version = "0.3.3" description = "UNKNOWN" +category = "main" optional = false python-versions = "*" files = [ @@ -423,6 +440,7 @@ files = [ name = "eth-abi" version = "3.0.1" description = "eth_abi: Python utilities for working with Ethereum ABI definitions, especially encoding and decoding" +category = "main" optional = false python-versions = ">=3.7, <4" files = [ @@ -446,6 +464,7 @@ tools = ["hypothesis (>=4.18.2,<5.0.0)"] name = "eth-account" version = "0.7.0" description = "eth-account: Sign Ethereum transactions and messages with local private keys" +category = "main" optional = false python-versions = ">=3.6, <4" files = [ @@ -473,6 +492,7 @@ test = ["hypothesis (>=4.18.0,<5)", "pytest (>=6.2.5,<7)", "pytest-xdist", "tox name = "eth-bloom" version = "1.0.4" description = "Python implementation of the Ethereum Trie structure" +category = "main" optional = false python-versions = ">=3.6, <4" files = [ @@ -493,6 +513,7 @@ test = ["hypothesis (==3.7.0)", "pytest (==3.0.7)", "tox (==2.6.0)"] name = "eth-hash" version = "0.3.2" description = "eth-hash: The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3" +category = "main" optional = false python-versions = ">=3.5, <4" files = [ @@ -515,6 +536,7 @@ test = ["pytest (==5.4.1)", "pytest-xdist", "tox (==3.14.6)"] name = "eth-keyfile" version = "0.6.0" description = "A library for handling the encrypted keyfiles used to store ethereum private keys." +category = "main" optional = false python-versions = "*" files = [ @@ -537,6 +559,7 @@ test = ["pytest (>=6.2.5,<7)"] name = "eth-keys" version = "0.4.0" description = "Common API for Ethereum key operations." +category = "main" optional = false python-versions = "*" files = [ @@ -559,6 +582,7 @@ test = ["asn1tools (>=0.146.2,<0.147)", "eth-hash[pycryptodome]", "eth-hash[pysh name = "eth-rlp" version = "0.3.0" description = "eth-rlp: RLP definitions for common Ethereum objects in Python" +category = "main" optional = false python-versions = ">=3.7, <4" files = [ @@ -581,6 +605,7 @@ test = ["eth-hash[pycryptodome]", "pytest (>=6.2.5,<7)", "pytest-xdist", "tox (= name = "eth-typing" version = "3.2.0" description = "eth-typing: Common type annotations for ethereum python packages" +category = "main" optional = false python-versions = ">=3.6, <4" files = [ @@ -598,6 +623,7 @@ test = ["pytest (>=6.2.5,<7)", "pytest-xdist", "tox (>=2.9.1,<3)"] name = "eth-utils" version = "2.0.0" description = "eth-utils: Common utility functions for python code that interacts with Ethereum" +category = "main" optional = false python-versions = ">=3.6,<4" files = [ @@ -621,6 +647,7 @@ test = ["hypothesis (>=4.43.0,<5.0.0)", "pytest (>=6.2.5,<7)", "pytest-xdist", " name = "fire" version = "0.4.0" description = "A library for automatically generating command line interfaces." +category = "main" optional = false python-versions = "*" files = [ @@ -635,6 +662,7 @@ termcolor = "*" name = "flake8" version = "4.0.1" description = "the modular source code checker: pep8 pyflakes and co" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -651,6 +679,7 @@ pyflakes = ">=2.4.0,<2.5.0" name = "flake8-black" version = "0.3.2" description = "flake8 plugin to call black as a code style validator" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -667,6 +696,7 @@ tomli = "*" name = "flake8-isort" version = "4.1.1" description = "flake8 plugin that integrates isort ." +category = "main" optional = false python-versions = "*" files = [ @@ -686,6 +716,7 @@ test = ["pytest-cov"] name = "flake8-polyfill" version = "1.0.2" description = "Polyfill package for Flake8 plugins" +category = "main" optional = false python-versions = "*" files = [ @@ -700,6 +731,7 @@ flake8 = "*" name = "flaky" version = "3.7.0" description = "Plugin for nose or pytest that automatically reruns flaky tests." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -711,6 +743,7 @@ files = [ name = "frozenlist" version = "1.3.0" description = "A list-like structure which implements collections.abc.MutableSequence" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -779,6 +812,7 @@ files = [ name = "grpcio" version = "1.53.0" description = "HTTP/2-based RPC framework" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -836,6 +870,7 @@ protobuf = ["grpcio-tools (>=1.53.0)"] name = "hexbytes" version = "0.2.2" description = "hexbytes: Python `bytes` subclass that decodes hex, with a readable console output" +category = "main" optional = false python-versions = ">=3.6, <4" files = [ @@ -853,6 +888,7 @@ test = ["eth-utils (>=1.0.1,<2)", "hypothesis (>=3.44.24,<4)", "pytest (==5.4.1) name = "idna" version = "3.3" description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -864,6 +900,7 @@ files = [ name = "importlib-resources" version = "5.7.1" description = "Read resources from Python packages" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -882,6 +919,7 @@ testing = ["pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", name = "iniconfig" version = "1.1.1" description = "iniconfig: brain-dead simple config-ini parsing" +category = "main" optional = false python-versions = "*" files = [ @@ -893,6 +931,7 @@ files = [ name = "ipfshttpclient" version = "0.8.0a2" description = "Python IPFS HTTP CLIENT library" +category = "main" optional = false python-versions = ">=3.6.2,!=3.7.0,!=3.7.1" files = [ @@ -908,6 +947,7 @@ requests = ">=2.11" name = "isort" version = "5.10.1" description = "A Python utility / library to sort Python imports." +category = "main" optional = false python-versions = ">=3.6.1,<4.0" files = [ @@ -925,6 +965,7 @@ requirements-deprecated-finder = ["pip-api", "pipreqs"] name = "jsonmerge" version = "1.8.0" description = "Merge a series of JSON documents." +category = "main" optional = false python-versions = "*" files = [ @@ -938,6 +979,7 @@ jsonschema = "*" name = "jsonnet" version = "0.18.0" description = "Python bindings for Jsonnet - The data templating language" +category = "main" optional = false python-versions = "*" files = [ @@ -948,6 +990,7 @@ files = [ name = "jsonschema" version = "4.4.0" description = "An implementation of JSON Schema validation for Python" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -968,6 +1011,7 @@ format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339- name = "lru-dict" version = "1.1.7" description = "An Dict like LRU container." +category = "main" optional = false python-versions = "*" files = [ @@ -978,6 +1022,7 @@ files = [ name = "mccabe" version = "0.6.1" description = "McCabe checker, plugin for flake8" +category = "main" optional = false python-versions = "*" files = [ @@ -989,6 +1034,7 @@ files = [ name = "multiaddr" version = "0.0.9" description = "Python implementation of jbenet's multiaddr" +category = "main" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" files = [ @@ -1006,6 +1052,7 @@ varint = "*" name = "multidict" version = "6.0.2" description = "multidict implementation" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1074,6 +1121,7 @@ files = [ name = "multitail2" version = "1.5.2" description = "Enables following multiple files for new lines at once, automatically handling file creation/deletion/rotation" +category = "main" optional = false python-versions = "*" files = [ @@ -1087,6 +1135,7 @@ six = "*" name = "mypy-extensions" version = "0.4.3" description = "Experimental type system extensions for programs checked with the mypy typechecker." +category = "main" optional = false python-versions = "*" files = [ @@ -1098,6 +1147,7 @@ files = [ name = "netaddr" version = "0.8.0" description = "A network address manipulation library for Python" +category = "main" optional = false python-versions = "*" files = [ @@ -1109,6 +1159,7 @@ files = [ name = "packaging" version = "21.3" description = "Core utilities for Python packages" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1123,6 +1174,7 @@ pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" name = "parsimonious" version = "0.8.1" description = "(Soon to be) the fastest pure-Python PEG parser I could muster" +category = "main" optional = false python-versions = "*" files = [ @@ -1136,6 +1188,7 @@ six = ">=1.9.0" name = "pathspec" version = "0.10.1" description = "Utility library for gitignore style pattern matching of file paths." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1147,6 +1200,7 @@ files = [ name = "pep8-naming" version = "0.11.1" description = "Check PEP-8 naming conventions, plugin for flake8" +category = "main" optional = false python-versions = "*" files = [ @@ -1161,6 +1215,7 @@ flake8-polyfill = ">=1.0.2,<2" name = "platformdirs" version = "2.5.2" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1176,6 +1231,7 @@ test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1191,6 +1247,7 @@ testing = ["pytest", "pytest-benchmark"] name = "protobuf" version = "3.20.1" description = "Protocol Buffers" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1224,6 +1281,7 @@ files = [ name = "py" version = "1.11.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -1235,6 +1293,7 @@ files = [ name = "pycodestyle" version = "2.8.0" description = "Python style guide checker" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -1246,6 +1305,7 @@ files = [ name = "pycryptodome" version = "3.14.1" description = "Cryptographic library for Python" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -1285,6 +1345,7 @@ files = [ name = "pyflakes" version = "2.4.0" description = "passive checker of Python programs" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -1296,6 +1357,7 @@ files = [ name = "pyparsing" version = "3.0.8" description = "pyparsing module - Classes and methods to define and execute parsing grammars" +category = "main" optional = false python-versions = ">=3.6.8" files = [ @@ -1310,6 +1372,7 @@ diagrams = ["jinja2", "railroad-diagrams"] name = "pyrsistent" version = "0.18.1" description = "Persistent/Functional/Immutable data structures" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1340,6 +1403,7 @@ files = [ name = "pysha3" version = "1.0.2" description = "SHA-3 (Keccak) for Python 2.7 - 3.5" +category = "main" optional = false python-versions = "*" files = [ @@ -1370,6 +1434,7 @@ files = [ name = "pystarport" version = "0.2.5" description = "Spawn local devnets for cosmos-sdk chains" +category = "main" optional = false python-versions = "^3.8" files = [] @@ -1393,13 +1458,14 @@ tomlkit = "^0.7.0" [package.source] type = "git" url = "https://github.com/crypto-com/pystarport.git" -reference = "326bb3e8c4523458463496a524defad0fb7a655e" -resolved_reference = "326bb3e8c4523458463496a524defad0fb7a655e" +reference = "39ecbd29fcdd50cb3015524c13755fda05bdf23d" +resolved_reference = "39ecbd29fcdd50cb3015524c13755fda05bdf23d" [[package]] name = "pytest" version = "7.1.1" description = "pytest: simple powerful testing with Python" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1424,6 +1490,7 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2. name = "pytest-github-actions-annotate-failures" version = "0.1.6" description = "pytest plugin to annotate failed tests with a workflow command for GitHub Actions" +category = "main" optional = false python-versions = "*" files = [ @@ -1438,6 +1505,7 @@ pytest = ">=4.0.0" name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -1452,6 +1520,7 @@ six = ">=1.5" name = "python-dotenv" version = "0.19.2" description = "Read key-value pairs from a .env file and set them as environment variables" +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1466,6 +1535,7 @@ cli = ["click (>=5.0)"] name = "pywin32" version = "227" description = "Python for Window Extensions" +category = "main" optional = false python-versions = "*" files = [ @@ -1487,6 +1557,7 @@ files = [ name = "pyyaml" version = "6.0.1" description = "YAML parser and emitter for Python" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1546,6 +1617,7 @@ files = [ name = "pyyaml-include" version = "1.3" description = "Extending PyYAML with a custom constructor for including YAML files within YAML files" +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1564,6 +1636,7 @@ toml = ["toml"] name = "requests" version = "2.31.0" description = "Python HTTP for Humans." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1585,6 +1658,7 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "rlp" version = "3.0.0" description = "A package for Recursive Length Prefix encoding and decoding" +category = "main" optional = false python-versions = "*" files = [ @@ -1606,6 +1680,7 @@ test = ["hypothesis (==5.19.0)", "pytest (>=6.2.5,<7)", "tox (>=2.9.1,<3)"] name = "setuptools" version = "65.5.1" description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1622,6 +1697,7 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs ( name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1633,6 +1709,7 @@ files = [ name = "supervisor" version = "4.2.4" description = "A system for controlling process state under UNIX" +category = "main" optional = false python-versions = "*" files = [ @@ -1650,6 +1727,7 @@ testing = ["pytest", "pytest-cov"] name = "termcolor" version = "1.1.0" description = "ANSII Color formatting for output in terminal." +category = "main" optional = false python-versions = "*" files = [ @@ -1660,6 +1738,7 @@ files = [ name = "testfixtures" version = "6.18.5" description = "A collection of helpers and mock objects for unit tests and doc tests." +category = "main" optional = false python-versions = "*" files = [ @@ -1676,6 +1755,7 @@ test = ["django", "django (<2)", "mock", "pytest (>=3.6)", "pytest-cov", "pytest name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" +category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1687,6 +1767,7 @@ files = [ name = "tomli" version = "2.0.1" description = "A lil' TOML parser" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1698,6 +1779,7 @@ files = [ name = "tomlkit" version = "0.7.2" description = "Style preserving TOML library" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -1709,6 +1791,7 @@ files = [ name = "toolz" version = "0.11.2" description = "List processing tools and functional utilities" +category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1720,6 +1803,7 @@ files = [ name = "typing-extensions" version = "4.2.0" description = "Backported and Experimental Type Hints for Python 3.7+" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1731,6 +1815,7 @@ files = [ name = "urllib3" version = "1.26.18" description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ @@ -1747,6 +1832,7 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] name = "varint" version = "1.0.2" description = "Simple python varint implementation" +category = "main" optional = false python-versions = "*" files = [ @@ -1757,6 +1843,7 @@ files = [ name = "web3" version = "6.0.0b6" description = "Web3.py" +category = "main" optional = false python-versions = ">=3.7.2" files = [ @@ -1790,6 +1877,7 @@ tester = ["eth-tester[py-evm] (==v0.7.0-beta.1)", "py-geth (>=3.9.1,<4)"] name = "websocket-client" version = "1.3.2" description = "WebSocket client for Python with low level API options" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1806,6 +1894,7 @@ test = ["websockets"] name = "websockets" version = "10.3" description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1863,6 +1952,7 @@ files = [ name = "yarl" version = "1.7.2" description = "Yet another URL library" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1948,6 +2038,7 @@ multidict = ">=4.0" name = "zipp" version = "3.8.0" description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1962,4 +2053,4 @@ testing = ["func-timeout", "jaraco.itertools", "pytest (>=6)", "pytest-black (>= [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "97a734f440b40396ee61496f50c3c1c03e513c9b1d187b1d669048c3300cdff7" +content-hash = "18d622c6ef865cb4666dda7f262d9ff4a23fbcbf2d4d50eac76660f3b5a3c179" diff --git a/integration_tests/pyproject.toml b/integration_tests/pyproject.toml index 1cf87b1aca..eaa361bcd9 100644 --- a/integration_tests/pyproject.toml +++ b/integration_tests/pyproject.toml @@ -20,7 +20,7 @@ python-dateutil = "^2.8.1" web3 = "^6.0.0b6" eth-bloom = "^1.0.4" python-dotenv = "^0.19.2" -pystarport = { git = "https://github.com/crypto-com/pystarport.git", branch = "main", rev = "326bb3e8c4523458463496a524defad0fb7a655e" } +pystarport = { git = "https://github.com/crypto-com/pystarport.git", branch = "main", rev = "39ecbd29fcdd50cb3015524c13755fda05bdf23d" } websockets = "^10.3" toml = "^0.10.2" pysha3 = "^1.0.2" From ac692a450a607d653ea608b6de9aa7a15d0ce263 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 13 Nov 2023 09:01:51 +0800 Subject: [PATCH 08/10] point to chain-main with ibc-go 5.0.0 --- nix/sources.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index bf51bd3309..5a01afb4ca 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -5,10 +5,10 @@ "homepage": "https://crypto.org", "owner": "crypto-org-chain", "repo": "chain-main", - "rev": "7e7d49839283f6d77516f614c2e2ff7441771e5a", - "sha256": "1gm70jfd9rvi8shf6n7fjfvs4krdv3vjz50f44id3dv8fgg5zni1", + "rev": "02455a4eafa8f2f6e4bd4aa9886904cfd3d518aa", + "sha256": "0ndlld82xw5004ma97ap6z6vhfsbkcma8yhvw891l3bf98rfllgk", "type": "tarball", - "url": "https://github.com/crypto-org-chain/chain-main/archive/7e7d49839283f6d77516f614c2e2ff7441771e5a.tar.gz", + "url": "https://github.com/crypto-org-chain/chain-main/archive/02455a4eafa8f2f6e4bd4aa9886904cfd3d518aa.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "cosmos-sdk": { From 38319c1250de4de24c847b91c343a32e81641cae Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 13 Nov 2023 09:01:54 +0800 Subject: [PATCH 09/10] point to fix close confirm in rly --- integration_tests/test_ica_precompile.py | 2 -- nix/sources.json | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/integration_tests/test_ica_precompile.py b/integration_tests/test_ica_precompile.py index 501d99aa44..6ef3cd1f10 100644 --- a/integration_tests/test_ica_precompile.py +++ b/integration_tests/test_ica_precompile.py @@ -341,8 +341,6 @@ def submit_msgs_ro(func, str): get_next_channel(cli_controller, connid), ) assert ica_address2 == ica_address, ica_address2 - # wait new channel get ready - wait_for_new_blocks(cli_controller, 5) expected_seq = 1 str, diff = submit_msgs( ibc, diff --git a/nix/sources.json b/nix/sources.json index 5a01afb4ca..b00ccdc3c9 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -123,13 +123,13 @@ "relayer": { "branch": "main", "description": "An IBC relayer for ibc-go", - "homepage": "https://github.com/crypto-org-chain/relayer", - "owner": "crypto-org-chain", + "homepage": "https://github.com/mmsqe/relayer", + "owner": "mmsqe", "repo": "relayer", - "rev": "f202a264463e9d5829398f6be50bff990421b483", - "sha256": "08x4bhwglx12rp78gs4hzgp2cywzqwr7gghk1kxasmvy9z0qxp92", + "rev": "65602c715c21c9f0696cfd0391bb4baa1c8316a7", + "sha256": "1xv5cchljjfwxbb4b557mgpcj8ygdm1i08vm2i9fgx1w7p98pa0x", "type": "tarball", - "url": "https://github.com/crypto-org-chain/relayer/archive/f202a264463e9d5829398f6be50bff990421b483.tar.gz", + "url": "https://github.com/mmsqe/relayer/archive/65602c715c21c9f0696cfd0391bb4baa1c8316a7.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } } From 6a18c2c9bff3a3f1e4cec8b8861a88f7f42e1906 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 13 Nov 2023 11:28:08 +0800 Subject: [PATCH 10/10] update rly --- nix/sources.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index b00ccdc3c9..e7d83917be 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -123,13 +123,13 @@ "relayer": { "branch": "main", "description": "An IBC relayer for ibc-go", - "homepage": "https://github.com/mmsqe/relayer", - "owner": "mmsqe", + "homepage": "https://github.com/crypto-org-chain/relayer", + "owner": "crypto-org-chain", "repo": "relayer", - "rev": "65602c715c21c9f0696cfd0391bb4baa1c8316a7", - "sha256": "1xv5cchljjfwxbb4b557mgpcj8ygdm1i08vm2i9fgx1w7p98pa0x", + "rev": "e097df316002173930a408cb5a7bce3040131c9c", + "sha256": "0xhgba9db9i56gglpgznpilkv0kb98m299yzgvpla60ldsd41imp", "type": "tarball", - "url": "https://github.com/mmsqe/relayer/archive/65602c715c21c9f0696cfd0391bb4baa1c8316a7.tar.gz", + "url": "https://github.com/crypto-org-chain/relayer/archive/e097df316002173930a408cb5a7bce3040131c9c.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } }