-
Notifications
You must be signed in to change notification settings - Fork 320
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
ADR 004: IBC Whitelisting #696
Closed
rahulghangas
wants to merge
6
commits into
celestiaorg:main
from
rahulghangas:feat/ADR-004-ibc-whitelist
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
77934d8
feat: add initial vesion of ADR for whitelisting chains
rahulghangas 70b7f6e
chore: remove markdown lint
rahulghangas ffabfbd
chore: typo
rahulghangas b407e4b
chore: typo
rahulghangas 35694cc
chore: only use allowlist
rahulghangas e3b6219
chore: rename ADR-004-ibc whitelist to ADR-004-ibc-allowlist
rahulghangas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# ADR 004: IBC Allowlist | ||
|
||
## Terminology | ||
|
||
All terminology is defined in [ICS 024](https://github.com/cosmos/ibc/tree/main/spec/core/ics-024-host-requirements) and some references are from corresponding implementation of [ICS 002](https://github.com/cosmos/ibc/tree/main/spec/core/ics-002-client-semantics) in [ibc-go](https://github.com/cosmos/ibc-go/blob/da1b7e0aaf4b7d466b1a7d1ed4f5d81149ff1d5b/modules/core/02-client) | ||
|
||
## Changelog | ||
|
||
- 2022-03-03: Initial Commit | ||
|
||
## Context | ||
|
||
While enabling IBC, we want to connect, and allow messages from selected chains. However, we don't want the ability for an arbitrary entity to create an IBC connection with a zone. This is so that we can keep the state machine as minimal and focused as possible. | ||
|
||
ICS specification indicates that is possible by providing a custom `validateClientIdentifier`, but no such functionality exists currently. | ||
|
||
Secondly, the ICS specification dictates that `createClient` takes in an `Identifier`. A potential solution could be to create a store for allowed `Identifiers` at genesis, and reject creation of clients for invalid identifiers. However, this is not true for the current state of the implementation. Rather, client ID is generated from an incremental counter `NextClientSequence` and the client type. | ||
|
||
## Proposal | ||
|
||
Fork IBC, and create a store of whitelisted public keys. Only `createClient` txns that are signed by private keys corresponding to whitelisted/stored public keys are deemed valid, and the rest are invalidated. Specific keys will only be required for client creation, and rest of IBC will work as is. | ||
|
||
## Alternative approaches | ||
|
||
1. Simplest solution is fork to IBC, and add a small change to disallow creation/registration of new clients. Then we can create clients for the chains that we want to allow at genesis, and effectively create a whitelist. However, adding new clients or removing clients is not feasible under this. | ||
|
||
2. Add a middleware to revert packets from non-whitelisted chains. This still adds state bloat since clients and corresponding connections are allowed to be established, but adds economic incentive in terms of lost gas from the malicious user/actor | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another approach that @zmanian mentioned a while ago, is to allow only transfers with Celestia tokens as denomination. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think we first need to fully understand the overhead in the state machine of IBC and its pricing.