Skip to content

Commit

Permalink
Problem: redundant logs are added from relayer (#1183)
Browse files Browse the repository at this point in the history
* Problem: redundant logs are added from relayer

* add change doc
  • Loading branch information
mmsqe authored Sep 25, 2023
1 parent 0899767 commit a47e6b1
Show file tree
Hide file tree
Showing 6 changed files with 249 additions and 2,726 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
- [#1171](https://github.com/crypto-org-chain/cronos/pull/1171) Add memiavl background snapshot writing concurrency limit.
- [#1179](https://github.com/crypto-org-chain/cronos/pull/1179) Support blocking addresses in mempool.
- [#1182](https://github.com/crypto-org-chain/cronos/pull/1182) Bump librocksdb to 8.5.3.
- [#1183](https://github.com/crypto-org-chain/cronos/pull/1183) Avoid redundant logs added from relayer.

*April 13, 2023*

Expand Down
13 changes: 0 additions & 13 deletions integration_tests/test_ibc_rly.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,6 @@ def burn(burner, amt, denom):
}


def update_client():
return {
"clientId": keccak(text="07-tendermint-0"),
"clientType": keccak(text="07-tendermint"),
}


def recv_packet(src, dst, amt, denom):
return {
"packetDataHex": (dst, src, [(amt, denom)]),
Expand Down Expand Up @@ -251,7 +244,6 @@ def check_balance_change():
cronos_addr = module_address("cronos")
transfer_addr = module_address("transfer")
expected = [
update_client(),
recv_packet(relayer0, cronos_signer2, src_amount, src_denom),
denom_trace(denom),
*send_from_module_to_acc(transfer_addr, cronos_signer2, src_amount, denom),
Expand All @@ -260,7 +252,6 @@ def check_balance_change():
*send_from_module_to_acc(cronos_addr, cronos_signer2, dst_amount, dst_denom),
write_ack(relayer0, cronos_signer2, src_amount, src_denom),
]

for i, log in enumerate(logs):
method_name, args = get_topic_data(w3, log)
assert args == AttributeDict(expected[i]), [i, method_name]
Expand Down Expand Up @@ -288,7 +279,6 @@ def test_ibc_incentivized_transfer(ibc):
feeibc_addr = module_address("feeibc")
escrow = get_escrow_address(cli, channel)
expected = [
update_client(),
acknowledge_packet(),
distribute_fee(src_relayer, fee),
*send_coins(feeibc_addr, src_relayer, src_amount, fee_denom),
Expand All @@ -297,7 +287,6 @@ def test_ibc_incentivized_transfer(ibc):
distribute_fee(cronos_signer2, fee),
*send_coins(feeibc_addr, cronos_signer2, src_amount, fee_denom),
fungible(checksum_dst_adr, cronos_signer2, amount, dst_denom),
update_client(),
recv_packet(dst_adr, cronos_signer2, amount, transfer_denom),
*send_coins(escrow, cronos_signer2, amount, dst_denom),
fungible(cronos_signer2, checksum_dst_adr, amount, transfer_denom),
Expand All @@ -315,10 +304,8 @@ def get_transfer_source_tokens_topics(dst_adr, amount, contract, escrow):
cronos_denom = f"cronos{contract}"
transfer_cronos_denom = f"transfer/{channel}/{cronos_denom}"
return [
update_client(),
acknowledge_packet(),
fungible(checksum_dst_adr, ADDRS["validator"], amount, cronos_denom),
update_client(),
recv_packet(dst_adr, cronos_signer2, amount, transfer_cronos_denom),
*send_coins(escrow, cronos_signer2, amount, cronos_denom),
fungible(cronos_signer2, checksum_dst_adr, amount, transfer_cronos_denom),
Expand Down
Loading

0 comments on commit a47e6b1

Please sign in to comment.