-
Notifications
You must be signed in to change notification settings - Fork 87
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
Allow the host implementation to specify the generateIdentifier
function for connection and channel identifiers
#14
Comments
Related to #39 |
Closer LookHaving a closer look at the related part of the specs:
In addition, looking at the However, ICS03 and ICS04 RESTRICTS and a bit bypass the above definitions. Identifiers must somehow contain an integer and be incrementable according to the followings:
And also, there is no space for users to pick their own identifier and pass it to the Next?If we wanted to add an identifier field to the client creation and accept users’ choice, it requires an update on protos and would be a breaking one. Maybe this can be left (shouldn’t be an immediate need!) in the “divergence from the ICS” list. |
Not exactly; the spec mandates that the host returns an identifier, and gives an example of how the host could implement that function (by incrementing a counter). So technically speaking, we are against the spec here since we mandate the identifier-generation process (i.e. we mandate that it be of the form However I don't think we need change it, nor even declare it as a divergence from the spec, since the set of identifiers we generate is a subset of the allowed set of identifiers (so identifier validation on counterparty chains will never fail). An added benefit of the current approach is that it prevents chains from generating the same channel identifier twice which would break ICS-20 (this part is currently under-specified IMO). I think we should just leave things as is, and only change it if a user would like the ability to name their identifiers differently. WDYT? |
Hmm, one thing I find out from your comment... I looked at the issue more from the users' perspective (who operate the cmds), not the |
Nope, if you're okay with it, I would just close it. |
Summary of Bug
We currently define trait methods like
ConnectionReader::connection_counter()
and use them to generate the connection identifier ->https://github.com/informalsystems/ibc-rs/blob/57b8af939eedab3a5ad55d7045a108ed0dfab1f6/modules/src/core/ics03_connection/handler/conn_open_init.rs#L42-L44
This restricts host implementations' ability to generate custom identifiers and is a deviation from the spec.
Version
v0.16.0
Acceptance Criteria
Either provide a way for host impls to specify their own
generateIdentifier
or document this as a divergence (in divergence from the ICS).For Admin Use
The text was updated successfully, but these errors were encountered: