-
Notifications
You must be signed in to change notification settings - Fork 103
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
Add ibc v3 support #332
Add ibc v3 support #332
Conversation
types/ibc.go
Outdated
@@ -133,16 +133,19 @@ func (m *IBCCloseConfirm) ToMsg() IBCChannelCloseMsg { | |||
} | |||
|
|||
type IBCPacketReceiveMsg struct { | |||
Packet IBCPacket `json:"packet"` | |||
Packet IBCPacket `json:"packet"` | |||
Relayer string `json:"relayer,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this guaranteed to be non-empty in v3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it must always be a valid address in ibcv3.
I guess we can remove omitempty, if we assume anyone importing this is supporting ibc3, which is a fair assumption
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The omitempty
then makes perfect sense for the v1 case. Good to know we don't have a case distiction withon v3.
Is this good to merge? We can safely merge before the new CosmWasm tag, as it works fine with the old VM (and ibc1 contract in the new VM) Reason would be to make a wasmd PR as well with these types. It won't really work (enable features) until we have a new tagged CosmWasm and wasmvm release, but we could write and code it now to make less work when tagging releases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Did you test this?
@@ -133,16 +133,19 @@ func (m *IBCCloseConfirm) ToMsg() IBCChannelCloseMsg { | |||
} | |||
|
|||
type IBCPacketReceiveMsg struct { | |||
Packet IBCPacket `json:"packet"` | |||
Packet IBCPacket `json:"packet"` | |||
Relayer string `json:"relayer"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry if I confused you, but isn't omitempt required or at least useful to support v1 and v3 at the same time? In v1 the field should not be there. In v3 it is always set.
I guess both ways work. Why did you change it?
This updates the Go types to match changes in CosmWasm/cosmwasm#1302
Only merge once that will be merged. Doesn't require the library to be updated first, just that we agree on the structs. This is backwards compatible.