Skip to content
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

Explicitly mention IDs can be restricted #252

Closed
mossid opened this issue Sep 5, 2019 · 4 comments · Fixed by #262

Comments

@mossid
Copy link
Collaborator

commented Sep 5, 2019

There is no semantic restriction on the identifiers in the spec because supporting only the syntactic rule(ASCII+numeric) will make the implementation compatible with the protocol. However, it is possible to restrict the identifier formats depending on the characteristics of the chains, for example:

  • IDs have to be over a certain length, to remove social value on identifiers
  • Channel IDs have to be same with the Connection IDs that they are bounded on, to increase human readability
  • IDs can be assigned only if there are some amount of bonded token, to prevent dos attack on occupying

All of them are purely optional but people might make the misassumption that "having restriction on assigning IDs is a violation of protocol", so the allowance of them should be explicitly stated ].

This has to be declared inside the relayer module spec where those restrictions will be defined by the implementation users(as an injectible callback function/enum, with a default provided per ecosystem discussion).

@cwgoes

This comment has been minimized.

Copy link
Collaborator

commented Sep 5, 2019

Concurred: more discussion, slottable validation function, default validation function implementation.

@cwgoes

This comment has been minimized.

Copy link
Collaborator

commented Sep 9, 2019

Want to submit a PR for this @mossid or should I do it?

@cwgoes

This comment has been minimized.

Copy link
Collaborator

commented Sep 10, 2019

Let's slate this for rc4.

@cwgoes cwgoes added this to the IBC Specification 1.0.0-rc4 milestone Sep 10, 2019

@mossid mossid self-assigned this Sep 11, 2019

@mossid

This comment has been minimized.

Copy link
Collaborator Author

commented Sep 11, 2019

  • Client/Connection/Port Identifier validation will be defined as a global function in 002/003/005 respectively, which MUST be provided by the implementations(with no semantic restriction).
  • Channel Identifier validation will be defined as a callback function in 026, which is then provided by the application modules. Different modules(=different ports) can have different channel id validation methods.
  • Chains are RECOMMENDED to accept counterparty identifiers without restriction, thus no remote inspection happens on handshaking.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.