-
Notifications
You must be signed in to change notification settings - Fork 639
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
Define what Success() in the Acknowledgement interface means #3434
Comments
In addition to the above, the current Acknowledgement isn't spec compliant. ICS-004 says that ACKs SHOULD be encoded as protobufs: message Acknowledgement {
oneof response {
bytes result = 21;
string error = 22;
}
} However, the ACKs used in ibc-go's ICS-027 and ICS-20 implementations are JSON encoded. Was this done intentionally? Writing IBC protocols is currently very hard when the implementations are not spec compliant. As another example, ICS-027's spec says that messages must be signed by the sender; however, the implementation does not enforce this and seems only to require the signer be the sender if a signer is specified. |
This is explicitly discussed in the ICS-20 spec. From there it was probably just continued, at least I did not find the section in ICS-27 yet. Anyways, this is a whole new (important!) topic that deserves its own ticket. |
Thank you @webmaster128 and @0xekez for the discussion here.
A successful acknowledgement is returned by the
I believe the spec and implementation are in sync: the message sent to the interchain account on the host (which is encoded in the
There is also an issue in the specs about this. We'll try to improve and clarify this. |
@crodriguezvega thank you for the additional info! I'm still not sure I understand this so I made an issue here writing up the question a little better: #3494 |
Thank you @crodriguezvega. I wrote what I understood to be correct as a doc comment in #3515. If that is right, we can close here. If not or incomplete/unprecise, let's discuss over there. With this doc comment an interface implementor should have a much better idea how to implement the interface. |
In ibc-go we have the interface
In wasmd we try to use that (not sure if that's the right way though).
Now it is not clear to me from the interface definition what
Success()
means. Does it mean a non-error acknowledgement? Does it mean the ack is committed to state and can be either success or error? We can only find this implementation details. But we don't want to derive the intended meaning from the implementation.Ideally the
Acknowledgement
interface does not make a different between error and success and just stores an app specific binary acknowledgement. It is easy to envision non-binary acknowledgements in applications. In our case in wasmd we don't know the meaning if an acknowledgement that we receive from a contract.The text was updated successfully, but these errors were encountered: