-
Notifications
You must be signed in to change notification settings - Fork 384
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
ICS4: Introduce Socket type to capture the (Port, Channel) tuple #583
Comments
I'm in favor, but this is breaks channel handshakes (I assume the protobuf definition would change?) We would need to utilize the connection version to indicate that the v2 channel protobuf definition should be used, in order to maintain backwards compatibility. I believe you would always need to have the connection as well, in order to decode the channel from the store. For example, if I want to query transfer/channel-0, how would I know whether it uses v1 or v2 protobuf definition for decoding? The only way I can think of is via the connection struct Alternatively, we could push this change to a time when we are ready to disable creation of new channels to chains running older versions. That is, force all new channel handshakes to utilize connection versions >= 2 (or whatever the next version increment is) In general I'm in favor of not letting backwards compatibility hinder improvements (even if minor). I'd rather work on building a robust setup for supporting breaking changes in a backwards compatible fashion. Otherwise IBC will become frozen in time |
I think this would make the spec a lot clearer for the pseudo-code and descriptions. I would not change the protobuf files though. I understood the idea to just make the spec easier to follow. |
As I understand your proposal, the Regarding upgrades I concur with @colin-axner and I do not think changing the protobuf here is high-priority enough to merit its own upgrade, I would just bundle it with another one. |
Thank you all for the quick feedback, these are all points that deserve a thorough discussion! First, it would be good for this change to eventually propagate into the protobufs. We can treat as a separate problem the question of whether we do it in a backwards compatible way ASAP, or whether we delay & bundle this with other changes (and deprecate v1.channels). Let's discuss this question now..
I would vote that the change to protobufs should wait. Reading through these comments, I see two reasons to prefer that:
I'd go even further and propose that other types (e.g., I can see going forward as follows:
This is important, I'm very curious to learn more about maintaining backwards compatibility. We're already experiencing different SDK versions in practice (e.g., yesterday with Hermes trying to relay between a regen 1.1.0 building on SDK 0.43.0.beta1 and a gaiad 4.2.1 atop SDK 0.42.4). One way to think about this is as a balancing between two concerns: avoiding the issue of IBC becoming "frozen in time", versus the mounting complexity of maintaining compatibility across multiple versions. |
Nice summary @adizere . Sounds like a good course of action. I realized there are more options for backwards compatibility than I initially commented on. If we only changed the packet protobuf definition, on ibc-go, the only affected items are the I'd suggest we make a discussion thread on this repository to discuss breaking changes which cause concern for backwards compatibility. I think it'd be good if we start documenting which changes are really hard/complex vs which are relatively easy and straightforward. This will help us identify problem areas that we can hopefully mitigate in the future, or batch a bunch of improvements for some mega upgrade down the line. I think it is good we discuss these issues on cosmos/ibc since it is hard for me as a developer of ibc-go to understand how much complexity a change might cause on the relayer |
This idea proved not very useful nor getting traction in particular due to breaking nature. Might be useful for a v2 specification of IBC in the future. |
The tuple
(Port, Channel)
appears all over the place in the core ICS spec, notably in ICS 004. We can refactor this into a single type, namedSocket
, to reduce the number of arguments in some methods, and simplify some calls and interfaces.I will do a first pass over the specs and open a PR, but first I'd like to make sure there is no obvious drawback (e.g., awkward or misleading) about introducing a
Socket
type.Ref: https://github.com/informalsystems/ibc-rs/issues/745#issuecomment-828739480
The text was updated successfully, but these errors were encountered: