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

Resolve client info and chain-id from channel:port #2

Open
sahith-narahari opened this issue Feb 12, 2021 · 1 comment
Open

Resolve client info and chain-id from channel:port #2

sahith-narahari opened this issue Feb 12, 2021 · 1 comment
Assignees

Comments

@sahith-narahari
Copy link
Contributor

No description provided.

@sahith-narahari sahith-narahari self-assigned this Feb 12, 2021
@alessio alessio added this to the M-0 Chain Directory milestone Feb 13, 2021
@sahith-narahari
Copy link
Contributor Author

Conclusion:

I explored the ibc transfer and based on suggestions from @AdityaSripal , here's the conclusion on resolving denom hashes to respective chains utilising ibc and cns modules.

Process :

We use the channel and port obtained by parsing denom hash, to identify the clientId used for the respective ibc transfer. As we store a canonical ClientId on-chain using cns, it's possible to verify if the clientId(from denom hash) belongs to the same chain as Canonical ClientId. We further ensure this by comparing Consensus States(same val set) just in case someone creates a chain with similar chainId.

Future Improvements:

Would be nice to generalise this to other applications of ibc(out of scope for the intial implementations of cns)

Cons:

One concern we have is, it won't be possible to map denom hash to a particual chain in case the transfer has been routed through multiple chains to the hub. We can alternatively provide functionality to help wallets connected to multiple chains to resolve the denom hashes, but this wouldn't be possible using only on chain data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants