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

Integrate Yamux substreams into the light client logic #17

Closed
StoyanDrumev opened this issue Mar 6, 2023 · 4 comments
Closed

Integrate Yamux substreams into the light client logic #17

StoyanDrumev opened this issue Mar 6, 2023 · 4 comments
Assignees

Comments

@StoyanDrumev
Copy link
Collaborator

  • /kad - Allows the client to respond to FIND_NODE Kademlia requests

  • /light/2

    Light clients are applications that fetch the required data that they need from a Polkadot node with an associated proof to validate the data. The light client messages make this functionality possible

    • Create RemoteCallRequest, RemoteReadRequest, RemoteReadChildRequest messages that have to Protobuf encoded
    • Validate RemoteCallResponse and RemoteReadResponse messages that are Protobuf encoded
  • /sync/warp

    Warp sync is the fastest available process designed specifically for light clients’ needs.

@StoyanDrumev StoyanDrumev added this to the M3. Substreams & Sync milestone Mar 6, 2023
@vikinatora
Copy link
Collaborator

vikinatora commented Mar 23, 2023

Keep in mind this issue when doing the warp sync logic. smol-dot/smoldot#239 and this PR smol-dot/smoldot#441

@vikinatora
Copy link
Collaborator

@vikinatora vikinatora self-assigned this Mar 23, 2023
@bokoto000 bokoto000 self-assigned this Apr 3, 2023
vikinatora added a commit that referenced this issue Apr 4, 2023
# Conflicts:
#	libs/nabu-v0.0.1-SNAPSHOT-jar-with-dependencies.jar
#	src/main/java/com/limechain/network/Network.java
#	src/main/java/com/limechain/network/kad/KademliaService.java
@vikinatora
Copy link
Collaborator

vikinatora commented Apr 7, 2023

@StoyanDrumev This task can be divided into 4 smaller tasks, one for each endpoint:

  1. /kad - Task name could be 'Add kademlia protocol negotiation logic' - The task is completed already
  2. /light/2 - Task name could be 'Add light messages protocol negotiation and request handling logic'
  3. /sync/warp - Task name could be 'Add warp sync messages protocol negotiation and request handling logic'

and 4th task regarding the subtasks for /sync/warp:

[Implement grandpa justifications verification algorithm](https://spec.polkadot.network/#warp-sync) using the info coming from /sync/warp
Implement a sync query process based on this [algorithm](https://spec.polkadot.network/#algo-light-clients-query-state) because it’s used by the warp sync algorithm
Persist latest finalized block information to DB

It should a separate task called 'Implement light client sync algorithm' with description the text above.

@StoyanDrumev
Copy link
Collaborator Author

vikinatora pushed a commit that referenced this issue Apr 12, 2023
* Add initial commit with proto setup

* Add block requests

* Add block request by number

* Fix checkstyle errors

* Refactor

* Remove print line

* Fix comments

* Add block request timeout

* Add javadoc

---------

Co-authored-by: Boris Velkovski <[email protected]>
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

4 participants