crypto-com / chain-indexing

Other
35 stars 28 forks source link

Chain Indexing: parse IBC and ICA message on EVM transaction #865

Closed vincentysc closed 9 months ago

vincentysc commented 10 months ago

Issue

IBC channel projection failed to update the channel data due to no IBC channel is found.

Background

Example

create IBC channel from cronos testnet to croeseid-4

Related Transaction

  1. cronos testnet ChanOpenInit http://internal-testnet2-cronos-internal-fn-alb-1137839070.ap-southeast-1.elb.amazonaws.com:1317/cosmos/tx/v1beta1/txs/C31E1CE706773D3631F53B22BA336197AB8240658C01F8489AB52DC9E572ECDD
  2. croeseid-4 ChanOpenTry https://testnet-croeseid-4.crypto.org:1317/cosmos/tx/v1beta1/txs/9ECFF5C4A22EE6EF2248BF23E041A9A7D6690A2C201271D0A1BD5D3F91450CAE
  3. cronos testnet ChanOpenAck http://internal-testnet2-cronos-internal-fn-alb-1137839070.ap-southeast-1.elb.amazonaws.com:1317/cosmos/tx/v1beta1/txs/73F2310AC97E78A427B91C57E9DF8B7FBC4990E5892CEE28FBC36C0DADFE63DB
  4. croeseid-4 ChanOpenConfirm https://testnet-croeseid-4.crypto.org:1317/cosmos/tx/v1beta1/txs/A44D32F442488161A6AD66E7A7D16E31C3202B48558D4F5A3D37551C8259B77A
  5. Register Account http://internal-testnet2-cronos-internal-fn-alb-1137839070.ap-southeast-1.elb.amazonaws.com:26657/tx_search?query=%22ethereum_tx.ethereumTxHash=%270x40911cbe18fc9cfb0d4cf092da20f127f4e59655f5788e6338684b979cb96179%27%22
  6. Submit Tx http://internal-testnet2-cronos-internal-fn-alb-1137839070.ap-southeast-1.elb.amazonaws.com:1317/cosmos/tx/v1beta1/txs/7D1BF9509E342CC4273C6C1019463B232EB6B331D272BDC59C06BC2EC962E6F0

EVM tx error on the first tx https://cronos.3ona.co/ct3-evm-explorer/tx/0x16ff68e3b57724c77299a546dc28e46ff7d6600baba2249cfa40b8c69391528b

channel handshake open init failed: could not create channel capability for port ID icacontroller-tcrc1qr2s7h6xwcpkjpw3af6de4mnhdfcyw3xj8gmmr and channel ID channel-31: module: ibc, name: capabilities/ports/icacontroller-tcrc1qr2s7h6xwcpkjpw3af6de4mnhdfcyw3xj8gmmr/channels/channel-31: capability name already taken

I guess the error is referred to emit double channel_open_init events. Normally, it should be one channel_open_init event.

Useful thread: https://crypt0-hq-hk.slack.com/archives/C02MBHRDFTN/p1698822599351279