Closed womensrights closed 3 months ago
Some additional useful context is also detailed in this write up.
The main argument is that json is too expensive in EVM environments and for ZK based applications
One question in my mind is how IBC can more intentionally address the demand for alternative serialization in ICS-20.
There is a considerable amount of demand for Ethereum 's ABI encoding and Borsh for Near/solana.
One way might be to define ICS-20 v2 as a family of similar protocols each with its own serialization.
One question in my mind is how IBC can more intentionally address the demand for alternative serialization in ICS-20.
This sounds like a good idea, but probably something that should live one level up. Maybe the Packet
itself could have an optional field specifying the serialization format of the data.
Maybe the Packet itself could have an optional field specifying the serialization format of the data.
I think it makes sense to use ChannelEnd's version
to determine which packet encoding method during Channel handshake. This prevents the receiving of packets with encoding that is not supported by the chain.
Looks like this idea is also described in https://github.com/cosmos/ibc/tree/main/spec/core/ics-004-channel-and-packet-semantics#definitions.
The version string stores an opaque channel version, which is agreed upon during the handshake. This can determine module-level configuration such as which packet encoding is used for the channel.
Thank y'all for the feedback. We will go ahead with this proposal for now and use protobuf encoding in ICS20 v2. However, we envision a not so distant future where we should be able to have an ICS04 packet that contains enough information to explain the type and the encoding of the application packet data.
Closed by #1118
The encoding type used for the
FungibleTokenPacketData
andFungibleTokenPacketAcknowledgement
in the current ICS-20 spec is JSON. There have been some suggestions to use protobuf based encoding instead which I am personally on board with. Some of the reasons for the change are detailed below and is intended to open up the discussion for the choice of encoding for ICS-20 v2:Advantages of using protobuf over json
Disadvantages of using protobuf over json