Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

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

Closed
brapse opened this issue Aug 5, 2020 · 4 comments
Closed

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

brapse opened this issue Aug 5, 2020 · 4 comments
Assignees
Labels
C:light Component: Light client

Comments

@brapse
Copy link
Contributor

brapse commented Aug 5, 2020

Related to informalsystems/tendermint-rs#201

@josef-widder
Copy link
Contributor

The current spec misses initialization totally. Also, it misses a supervisor. We are currently discussing a write-up for a sequential supervisor in informalsystems/tendermint-rs#479

Right now the sequential supervisor does not take input parameters.

To address this issue, I suggest that we adapt the supervisor so that it takes as input an option of either a

  • genesis state, or
  • a lightblock.

Depending on what is passed in, it initializes the Lightstore with a trusted header. In case of the genesis state, this initial trusted lightblock is initializied with the information from genesis (next validators). From then on the lightstore can be used as before. (No fork detection is done on the initial block) Does the genesis state contain something equivalent to bftTime?

@milosevic : what do you think about that?

@josef-widder
Copy link
Contributor

In case of the genesis state, this initial trusted lightblock is initializied with the information from genesis (next validators). From then on the lightstore can be used as before. (No fork detection is done on the initial block) Does the genesis state contain something equivalent to bftTime?

After a discussion with @milosevic , I think the best way to do it, is to take the genesis state that contains the validator set of block 1, download block 1, verify block 1, and then initialize the lightstore with block 1 (we might need to cross-check block 1, that is, run fork detection)

@ebuchman
Copy link
Contributor

Does the genesis state contain something equivalent to bftTime?

It does contain a genesis time (and Tendermint nodes don't formally start until the local clock has passed this time).

I think the best way to do it, is to take the genesis state that contains the validator set of block 1, download block 1, verify block 1, and then initialize the lightstore with block 1 (we might need to cross-check block 1, that is, run fork detection)

This sounds pretty reasonable. Not sure exactly the use cases here yet but conceivably the light node might start before the genesis time so it may need to handle the case where block 1 isnt available yet and it needs to poll for it? Maybe an edge case

@josef-widder
Copy link
Contributor

closed with #186

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C:light Component: Light client
Projects
None yet
Development

No branches or pull requests

4 participants