rollmint icon indicating copy to clipboard operation
rollmint copied to clipboard

[EPIC] Rollkit Light Client

Open tzdybal opened this issue 3 years ago • 3 comments

This is a tracking issue for creating Optimint Light Client.

Light client functionality depends on availability of SMT in cosmos-sdk, so we're blocked on https://github.com/celestiaorg/optimint/issues/358.

Technical requirements for optimint light clients:

  • full node must be able to generate proofs
  • full node must be able to gossip fraud proofs
  • light node must be able to receive and gossip fraud proofs
  • light node must be able to validate fraud proofs
  • changes to data structures:
    • intermediate state roots for DeliverTxs should be included in block body; committed in header
    • intermediate state roots for BeginBlock and EndBlock can be included in header
  • SMT-based multi-commit store is required for effective generation and validation of Fraud Proofs in cosmos-sdk
  • customized multi-commit store is required for generation of intermediate state roots (ISRs)
  • changes to ABCI are required
    • ResponseBeginBlock, ResponseEndBlock and ResponseDeliverTx need to contain intermediate state root
    • note: state root in ResponseEndBlock should be the same as the one reported by ResponseCommit.
    • there needs to be a way to trigger fraud proof generation; we discussed two options:
      • optimint compares expected ISR and actual ISR returned by cosmos-sdk/app, and triggers fraud proof generation
        • IMHO it's cleaner design from high level perspective
      • optimint passes expected ISR; cosmos-sdk/app compares it with actual ISR; if they are different it returns fraud proof
    • fraud proof data type needs to be defined
  • ADR-007 - commitment do data in headers aka "headers as footers"

  • [x] #526
  • [ ] Configuration option to enable light client mode
  • [ ] Light client mode
    • [ ] Disable mempool
    • [ ] Disable block sync
  • [ ] Celestia-node header sync
    • [x] #541
    • [x] #540
    • [x] #542
  • [ ] TX inclusion proof generation (full node)
  • [ ] TX inclusion proof verification (light node)
  • [ ] Changes in full node
    • [ ] Separate header and block sync
    • [ ] TX inclusion proof generation
  • [ ] Changes in light node
    • [ ] Forward queries to trusted nodes
    • [ ] Disable TX gossiping
  • [x] #642

tzdybal avatar Apr 11 '22 14:04 tzdybal

related:

  • https://github.com/celestiaorg/optimint/issues/36
  • https://github.com/celestiaorg/optimint/issues/87

The light client also will need to understand how leader selection works btw.

liamsi avatar Apr 11 '22 14:04 liamsi

Related Notion doc: https://www.notion.so/celestiaorg/Light-client-520b89c50d8b4eb489a0e4fcc3798ed9

jbowen93 avatar Apr 26 '22 16:04 jbowen93

Thanks for the great summary Tomasz. I'm going to make sub issues for all of this.

jbowen93 avatar May 03 '22 14:05 jbowen93