-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Query for tracking ICA msg execution #2300
Comments
@okwme Thanks for opening the issue and raising awareness for this problem. After discussing with the rest of the team we have decided the following:
|
It's nice to be able to see from the controller side whether the tx was successful in the Ack but it does not achieve the goals stated in the issue above unless all of the events are also carried through the Ack. As a user I want to know whether my tx was successful and what the events that followed were and this is only possible by querying the host side. @AdityaSripal mentioned that a new packet ID system was being implemented, being able to query the host for the packet ID and receiving the events would satisfy the flow I'm describing I believe. |
Hey @okwme, what is your use case? Is this only going to be used for testing purposes? |
As someone who is facillitating a governance enabled interchain account transaction I need to populate the gov module with correct subsequent transactions to be voted on. One flow in mind is adding liquidity to an osmosis pool or swapping tokens on an osmosis pool. It should be possible to query the account for LP tokens or resulting tokens but if the account already has a balance it is much safer to check the event logs to ensure the correct amount. Since ICA can be used with any variety of host chain modules I would expect there to be a generalized way to query resulting events. Beyond being the party resposible for checking gov ICA messages and setting up subsequent ones there is, as you said, a need just for debugging that this would enable. |
Thanks for the followup @okwme. We will add a cli to the host chain which takes in the channel-id and sequence on the host chain side and returns the events associated with the ica tx execution For the implementer, see how sdk queries events via cli |
Events aren't included in the ack sent to the controller due to the nondeterminism.
We implemented a query on the host for packet events in: #782 |
So good that you remembered about this, @damiannolan! :) So then we can close this issue? |
Closing as packet events query implemented in #782 👍 |
Summary
Add a query to host and controller chains to make it easy to see the results of a message executed with interchain accounts. These messages aren't executed in the way normal messages are where the user is given a tx hash to query. There is a tx hash but it's difficult to know what it will be since it is submitted by some relayer.
Problem Definition
Pasting the relevant parts of a conversation in the IBC internal slack channel about querying the results of interchain account msg execution under Problem Definition.
it looks like the only query the host module of ica has is for the params. I guess when a message is submitted via ICA it's the relayer's tx that contains information about the execution of the ICA msg right? Is there a convenient method for the user/module that initiated the ICA msg (controller side) to query the host about the results of the Msg? I know there is some Ack logic in the controller demo but it has to be custom created to handle each msg type and isn't necessary unless there is some action that takes place depending on the results of the execution.
basically what i'm looking for is how to check the results of the ICA msg on the host chain. Would the flow be something like:
...
as a user who initiated the transaction would i do the following:
EventTypeSendPacket
which contains all the unique info of my outgoing packet. However I don't see any universal unique ID here that I might be able to query on the host chain.Now I know that there's the possibility for the packet to be submitted to the host chain but I don't know who will do it so I don't know what the tx hash of that tx will be. Is there any generic query on the host chain to ask for the tx that contained my message?
is it possible to query the host chain for transactions that contain
EventTypeRecvPacket
messages where all the attributes fromEventTypeSendPacket
are the same?...
You can query all txs on the host by running something like this:
where the event attribute of interest is the channel source port. Piping the JSON output through jq is a little more readable, but you do get quiet a hefty response, as the relayer sends a multi msg tx including the
MsgUpdateClient
as well as theMsgRecvPacket
....
I wonder if it's worth considering a new query on the host chain that is designed for this specifically? maybe like the tx command but for messages that have been executed by an ICA? Adding new queries doesn't break state so it could be a patch release down the line and not block any major or minor releases in the mean time.
just thinking it would make debugging ICA account interactions easier for users and eventually wallets / applications.
...
In the v6.0.0 release (with the ICA improvements) the
MsgSendTxResponse
will include the sequence number, so maybe we can use that on the query on the host to get information about the message execution. Although then any custom authentication modules (like mauth) would need to implement also a response message that includes the sequence (i.e. adding it here).Proposal
On the controller chain make it easy to retrieve a set of unique identifiers for a message sent over ICA using a new query (or the result returned from the originally executed message)
On the host chain create a query that accepts the set of unique identifiers for a message sent over ICA to return results similar to a tx query for that specific set of messages.
For Admin Use
The text was updated successfully, but these errors were encountered: