ICS27: Define De/Serialization format
Opened this issue · 1 comments
I read that there is one type EXECUTE_TX, which is fine.
And when received, we should parse the bytes into multiple messages: https://github.com/cosmos/ibc/tree/master/spec/app/ics-027-interchain-accounts#packet-relay
However, the serialization format is never defined in the spec. This make building a compatible implementation impossible. Please define this format explicitly here: https://github.com/cosmos/ibc/tree/master/spec/app/ics-027-interchain-accounts#packet-data
Also, I must admit that seeing go code lightly masquerading as the typescript spec code (just changed the name from func to function otherwise Go syntax) is a bit surprising.
Great suggestion, sorry we haven't addressed it yet.
In ibc-go we currently use proto3 json which results in a json string like such:
{"type":"TYPE_EXECUTE_TX","data":"ZGF0YQ==","memo":"memo"}
We could switch to json which would look like (the "type" encoding changes):
{"type":1,"data":"ZGF0YQ==","memo":"memo"}
If we made the switch, we would continue using proto3 json to unmarshal because the standard json library would fail to unmarshal the proto3 json encoding (which may be sent by a chain on an existing version)