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

02-client: Allow verification methods to verify parachains #793

Closed
AdityaSripal opened this issue Jan 26, 2022 · 5 comments
Closed

02-client: Allow verification methods to verify parachains #793

AdityaSripal opened this issue Jan 26, 2022 · 5 comments
Labels
02-client core needs discussion Issues that need discussion before they can be worked on type: refactor Architecture, code or CI improvements that may or may not tackle technical debt.

Comments

@AdityaSripal
Copy link
Member

AdityaSripal commented Jan 26, 2022

Ref: #284

The Polkadot architecture allows a single beefy client to verify all para chains.

Currently in IBC, we have a single client for a single chain. We should determine how deeply this assumption is baked into the code, to see if we could easily change it.

  1. If it is trivially changable, then we may decide to modify the ClientState interfaces to enable a client to represent multiple chain.
  2. If it is not trivially changable, then I believe we can still get efficient clients. We can create two client implementations. One of which is the relay chain.
// Relay Chain ClientState
ClientState{
    ...
}
// Para Chain ClientState
ClientState{
    chainID string, // identifier for this individual parent chain
    relayClient *ClientState,
}

Here the RelayChain ClientState is going to be updated with the headers of the relay chain and can use the ClientState to verify the relay chain.

The ParaChain ClientState is just a thin wrapper around the RelayChain ClientState. Here it can No-Op or error on any UpdateClient. All verify functions will pass through to the underlying RelayChain ClientState and we can verify with the embedded chainID.

This second approach seems to me to get what we would want in terms of efficiency without major changes to the interfaces. Does this approach seem viable? cc: @colin-axner @seunlanlege @jackzampolin

@seunlanlege
Copy link
Contributor

should be "para"-chains

@notbdu
Copy link
Contributor

notbdu commented Jan 28, 2022

On an abstract level, looks like we're specifying client state dependencies here.

Could we also consider the case of rollups as well (and recursive rollups)?

For example, I think we'd need to be able to access finalized state roots of the parent chain to determine inclusion/finality?

Without digging into L2 specifics, I think we'd roughly need to associate child commitment path -> child commitment root -> parent commitment path -> parent commitment root for as many layers/levels as we need to.

@AdityaSripal AdityaSripal changed the title 02-client: Allow verification methods to verify parrot chains 02-client: Allow verification methods to verify parachains Feb 2, 2022
@crodriguezvega crodriguezvega added 02-client core type: refactor Architecture, code or CI improvements that may or may not tackle technical debt. labels Feb 7, 2022
@crodriguezvega crodriguezvega moved this to Backlog in ibc-go Feb 7, 2022
@crodriguezvega crodriguezvega added the needs discussion Issues that need discussion before they can be worked on label Mar 21, 2022
@crodriguezvega crodriguezvega removed the status in ibc-go Sep 22, 2022
CosmosCar pushed a commit to caelus-labs/ibc-go that referenced this issue Nov 6, 2023
use commetbft types in rollkit in order to comply with cosmos-sdk 0.47.0
by replacing tendermint with cometbft, and then replacing cometbft with
the rollkit fork of tendermint

---------

Co-authored-by: Ganesha Upadhyaya <[email protected]>
@crodriguezvega
Copy link
Contributor

@AdityaSripal is this issue still relevant? Is there anything from here that we should take into account for the work on conditional clients?

@AdityaSripal
Copy link
Member Author

It's unclear to me if the RelayChain is only needed in UpdateClient, or also in the verifyMembership function. It's worth asking composable.

If VerifyMembership is also needed, we should ensure that we allow the querier calls for all client methods in our design, not just UpdateClient

@crodriguezvega
Copy link
Contributor

@AdityaSripal I asked Composable and they said that they don't reference the state of the relay chain in VerifyMembership, so looks like it will not be needed. I will therefore close the issue for now, but we can reopen in the future if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
02-client core needs discussion Issues that need discussion before they can be worked on type: refactor Architecture, code or CI improvements that may or may not tackle technical debt.
Projects
Status: Done 🥳
Development

No branches or pull requests

4 participants