This repository was archived by the owner on Oct 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Update abstract IBC implementation #290
Draft
CyberHoward
wants to merge
59
commits into
main
Choose a base branch
from
update/abstract-ibc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or 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
a6bc895
to
d810619
Compare
Codecov Report
|
Kayanski
reviewed
May 9, 2023
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 logic is the following :
- The admin registers the port they want to connect on from the remote chain
- On channel connect, we save the associated port in storage (channel_id -> port_id)
- On who_am_i verification, we check that the
chain -> port_id
corresponds to the relation that was registered in storage (throughchain_id --> channel_id --> port_id
that we now have).
Potential attack vectors :
- No-one can connect to the contract from IBC if the chain is not registered (good to prevent future integrations)
- If a
chain_id --> port_id
pair is registered, someone can fake both and connect to the contract. This can't be prevented with this approach. If that happens, the admin can still remove the saved channel and overwrite thechain_id --> port_id
association
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.