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

Use the Genesis state as a Trusted State in the light client #201

Open
yihuang opened this issue Apr 1, 2020 · 4 comments
Open

Use the Genesis state as a Trusted State in the light client #201

yihuang opened this issue Apr 1, 2020 · 4 comments
Labels
light-client Issues/features which involve the light client

Comments

@yihuang
Copy link
Contributor

yihuang commented Apr 1, 2020

It seems verify_single need a TrustedState from previous block, TrustedState contains a signed header and validator set, but when verifying the first block, there is no previous signed header.

Maybe we should make TrustedState into (Option<SignedHeader>, ValidatorSet), then genesis trusted state would be (None, genesis validator set).

@tomtau
Copy link
Contributor

tomtau commented Apr 2, 2020

#186

@ebuchman
Copy link
Member

ebuchman commented Jun 3, 2020

Great point. We'll need to ensure you can use the genesis as a TrustedState somehow.

The light client API is undergoing pretty heavy restructuring, but will make sure this gets addressed.

Essentially the problem is that the Genesis State does not contain a header, though it does have a timestamp and an initial validator set. We should still be able to initialize from it - we can consider it height 0.

@ebuchman ebuchman added this to the Light Node milestone Jun 3, 2020
@ebuchman ebuchman added the light-client Issues/features which involve the light client label Jun 3, 2020
@ebuchman ebuchman changed the title How to verify the first block against genesis validator set with lite client API? Use the Genesis state as a Trusted State in the light client Jun 27, 2020
@OStevan
Copy link
Contributor

OStevan commented Jul 3, 2020

Container issue is somewhat related with this.

@ebuchman ebuchman modified the milestones: v0.15.0, v0.16.0 Jul 8, 2020
@brapse
Copy link
Contributor

brapse commented Aug 5, 2020

This blocked by specification work, perhaps @josef-widder can help here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
light-client Issues/features which involve the light client
Projects
None yet
Development

No branches or pull requests

6 participants