rollkit / rollkit

A modular framework for rollups, with an ABCI-compatible client interface.
Apache License 2.0
323 stars 147 forks source link

Spec out IBC light-client #36

Open liamsi opened 3 years ago

liamsi commented 3 years ago

Summary

We need to fully specify the light-client for cosmos-sdk based rollup chains.

Scope of the Specification

At its core this light-client is similar to any other light-client: it just follows the headers of the chain by downloading the first few bytes that comprise the header from the Data Availability layer (leveraging https://github.com/lazyledger/lazyledger-core/issues/221 like a full-node but only downloading the first few header-size bytes as headers should be of fixed size ideally).

But there are properties and questions around an ORU chain's light-client that need further clarifications:

The light-client could be configured locally to e.g. not run DA sampling. We need to clearly define the security properties gained by doing this vs. the implications of not doing this. What is the relation between handling state transition fraud proofs for the DA chain and additionally running DA proofs for the data behind the headers of that chain. Are both really required or wouldn't it be sufficiently secure to trust the validator set of the DA layer chain (LL)?

Execution Environment Agnostic Spec

IMO, we also should have a more general and rather execution-environment-agnostic specification of light-clients of rollup chains using LazyLedger as a DA layer in the lazyledger-specs as well. That specification should clearly articulate all requirements of such a client. This would clarify some of the questions around timing and security properties above, too. (cc @adlerjohn)

Then we can have multiple instantiations / more concrete specifications per execution environments we are targeting. IMO, they could also live in the specs repository but the best fit for this issue still seems to be this repository.

liamsi commented 3 years ago

As per today's call, we will draft a general IBC rollup client and open a PR with an ICS against the IBC repo. This will help us understanding the impact on other parts of the IBC spec as well as with specifying a full (active) ORU chain light-client. I'm going to start a draft in the following days.

cc @milosevic @adlerjohn @musalbas