-
Notifications
You must be signed in to change notification settings - Fork 80
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
ICS-20: Acknowledgement::AsRef<u8>
is incorrect
#369
Comments
Since the JSON serialization/deserialization is quite simple, it can be done by hand in the The serialized form of the success message is:
and the error message:
|
I was confused because we had tested token transfers between basecoin-rs and I also confirmed that the success message output by ibc-go is We will fix the output of acknowledgements in #364 and properly integration-test them in #370. |
Acknowledgement::AsRef
is incorrectAcknowledgement::AsRef<u8>
is incorrect
Actually I was wrong there. An implementation could insert spaces in its JSON and still be compatible with ibc-go. The precise requirements for the acknowledgement are:
ExplanationAssume chain A sends a token to chain B.
The key realizations are:
|
Bug Summary
The
Acknowledgement
struct's serialization in ICS-20 is incorrect.Details
The
Acknowledgement
struct in ICS-20 has 2 different ways to serialize to bytes: theAsRef<[u8]>
andserde
.The correct one seems to be the
serde
way (see ibc-go); it's also the one that has tests for it. However, theAsRef
implementation is the one that's being used inwrite_acknowledgement()
.Version
0.27.0
The text was updated successfully, but these errors were encountered: