pokt-network / pocket

Official implementation of the Pocket Network Protocol v1
https://pokt.network
MIT License
63 stars 33 forks source link

[IBC] Implement ICS-02 IBC Light Client Interface #894

Closed h5law closed 1 year ago

h5law commented 1 year ago

Objective

IBC relies on the verification of state of a counterparty chain through the use of IBC "light clients". IBC light clients are not "fully featured" light clients from the typical sense of the word, instead they are simply state verification algorithms. They are given the current state of the chain they represent periodically by relayers and must:

  1. Verify the state transition is valid (2/3 of their trusted validator set has signed the new state they receive)
  2. Identify misbehaviour from the chain it represents
  3. Verify the inclusion/exclusion of any particular element via a CommitmentProof against the consensus state of the network they represent

ICS-02 defines the interface, functions, data types and processes to interact with IBC clients in general. ICS-02 is not an implementation of any particular client but instead defines how each client implementation must work.

This issue tracks the creation of such an interface and all other definitions outlined by the ICS-02 specification

Origin Document

ICS-02 Specification IBC Light Clients Document

Goals

Deliverable

Non-goals / Non-deliverables

General issue deliverables

Testing Methodology


Creator: @h5law Co-Owners: @h5law

Olshansk commented 1 year ago

@h5law I looked at all the goals & deliverables and this is definitely a hefty task. I think it makes sense to keep this as one issue but make sure to try and keep the PRs small and independent as you're working on it.

Identify misbehaviour from the chain it represents

Do you have pointers/ideas as to what this may be? For example: double signing, invalid tx, other types of Evidence?

h5law commented 1 year ago

@Olshansk

Do you have pointers/ideas as to what this may be? For example: double signing, invalid tx, other types of Evidence?

So here misbehaviour is actually relatively simple ie: is the new block height more than the previous one. This kind of thing. I will find a reference and give more details but it's not much more complex than some basic validation.

Hefty task

This will actually be a smaller PR compared to the interface implementation with ICS-08 which will be a separate issue and PR. Im hoping to use this to setup the WASM integration to be smoother. ultimately this will be laying the groundwork for the client implementations to come