slashing types incompatibility between v45 provider and v47 consumer #1092
Labels
scope: cosmos-sdk
Integration with Cosmos SDK
type: bug
Issues that need priority attention -- something isn't working
Problem
During testing it was discovered that an incompatibility exists between ICS <= v2.0.0 and ICS v3 release candidates.
The incompatibility arises from the fact that ICS v3 uses
cosmos-sdk
slashing proto definitions, whereas ICS <= v2 uses custom proto definitions.For ICS v3 this is the
Infraction enum
used:ICS <= v2 uses a slightly different definition:
This difference makes the
ICS v2 provider
(cosmos-sdk v45, ibc-go v4) unable to process slash packets coming fromICS v3-rc consumer
(cosmos-sdk v47, ibc-go v7).The changes are not state breaking since the underlying structure stored on chain is the same (both are INT). When sending packets, the structures get marshalled into different JSON strings causing an error when the slashes are processed on the provider. The provider cannot unmarshal the Slash packet Infraction enum.
ICS <= v2 (cosmos-sdk v45, ibc-go v4):
ICS v3-rc (cosmos-sdk v47, ibc-go v7):
Closing criteria
Address the issue by conforming to the
infraction
proto/json type used by the earlier versions of ICS so the protocol communication over the wire is not hindered.Possible solutions:
json_name
pseudo-option just like fields protocolbuffers/protobuf#4328Problem details
Details available on cosmos-sdk:
The text was updated successfully, but these errors were encountered: