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

feat: add light client support #59

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

evilrobot-01
Copy link
Contributor

Still very much a work in progress, but creating this draft PR in case anyone wants to try it out.

cargo run --features=light-client -- follow chain -r ./tests/polkadot.json -p ./tests/polkadot-asset-hub.json

The chainspecs can be sourced from https://github.com/smol-dot/smoldot/tree/main/demo-chain-specs.

Takes a few seconds to start, butt you should then start to see blocks flowing in:

Polkadot: #19,867,305, parent hash: 0x9c4d2b5672c3ae9df60afe3e25665d194a870224266fef535ea582448e027c07, state root: 0x1d241b1f70955d92d423e26954a190fb9979e5558b1662fc739ac07155912fcb, extrinsics root: 0xe6ce7891499d3d242ac009e28085831e1c54c6db6d7398318bf7a560fdb32005
Polkadot: #19,867,306, parent hash: 0xf13b5662d092412d8053b60047f916e809f6e9e2535a32bd149ac4fb3c53a88b, state root: 0x2d354a91fe39b07e6fe7924f85bcde6a442ce9790c695fb3920dec376e5cd1fa, extrinsics root: 0x67c96e35313f277bc0640422804853182a8af3b015ae5ed419a282dda9012142
Polkadot Asset Hub: #5,845,019, parent hash: 0x9f2a5dc303ba92117f8d7f3daf851f9374351795212dba2f3fd6c1f05ae86296, state root: 0x7b1fcad27dca9b789efdaf9b06e415b7573d66c02dc99542d121b58df6f93e76, extrinsics root: 0x9a0d0736484058bed00785ac8e22392a2aa76a7e9afb2dcd058995e41127f9e9
Polkadot Asset Hub: #5,845,020, parent hash: 0x025804268b1c92d25118c21ead06dfa0976bb8288f19475f8e59fe038c3bec42, state root: 0x896d9fb1eb572ba0ba015db183f2fa40827dd0b7385e67c4ef31c1e243811e1c, extrinsics root: 0x73726cdc48f859f9ed1a0119f9e3e72d381f03ddf81986acb86d34b22d917c83

Goals are to enable tracing, useful for debugging connectivity and potentially a nice feature to have running in a background terminal.

@Daanvdplas
Copy link
Collaborator

Curious on your thoughts whether we want to use https://github.com/paritytech/json-rpc-interface-spec ?

@evilrobot-01
Copy link
Contributor Author

Ideally, but depends on whether there is any interest in this beyond me. It was put together pretty quickly thus far.

@AlexD10S
Copy link
Collaborator

To improve user' UX we should download the chainspecs. Maybe -r polkadot or -r rococo and get the polkadot.json directly.

Does pop connect instead of pop follow makes sense?

Is nice how easy to is to run a light client with pop, but hard for me to see real use cases, What kind of users do you think will use this feature?

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

Successfully merging this pull request may close these issues.

3 participants