Cosmos-sdk: Same attributes for all connection/ channel/ packet IBC events

Created on 17 Jun 2020  路  6Comments  路  Source: cosmos/cosmos-sdk

Summary

Same attributes for all connection/ channel/ packet IBC events

Problem Definition

Code for extracting IBC events from Tx notifications is currently unnecessarily verbose as event attribute sets for a given category, e.g. connection, vary depending on the actual event. Also, in some handlers there are missing attributes that are useful for monitoring or some relayer strategies.

Proposal

Emmit events with same attributes in connection handlers. Here are the details:

  • Add new counterparty connection ID event attribute, counterparty_connection_id, to HandleMsgConnectionOpenInit and HandleMsgConnectionOpenTry

  • Add following attributes to HandleMsgConnectionOpenAck and HandleMsgConnectionOpenConfirm:
    client_id
    counterparty_connection_id
    counterparty_client_id

Emmit events with same attributes in channel handlers. Here are the details:

  • Add following attributes to HandleMsgChannelOpenAck, HandleMsgChannelOpenConfirm, HandleMsgChannelCloseInit and HandleMsgChannelCloseConfirm:
    connection_id
    counterparty_port_id
    counterparty_channel_id

Add following attributes to AcknowledgePacket:
packet_data


For Admin Use

  • [X] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned
good first issue ibc

Most helpful comment

Hi, can I work on this?

All 6 comments

Hi, can I work on this?

@dauTT that would be great thanks

Hi, I have changed the connection.proto file and defined a message, MsgConnectionBasic, that will carry all the common attributes of different connections msg. Now I would like to generate the connection.pb.go file but I have problem to use correctly the protoc compiler. Could someone explain me how to generate pb.go file correctly?

Selection_072

I was able to generate the 'pb.go' file that I need with this commands:

protoc -I=. -I=./third_party/proto -I=./proto --go_out=$GOPATH/src ./proto/ibc/connection/connection.proto

but the output is quite different from the other pb.go files in the cosmos-sdk repository.

I believe we will need to wait to fix first #6476, before I can continue with this issue.

@dauTT you can use make proto-gen

Hi @anilCSE ,

I have tried but it doesn't work for me. So I have raised this issue here: #6476

Was this page helpful?
0 / 5 - 0 ratings