-
Notifications
You must be signed in to change notification settings - Fork 990
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
Add LightClientBootstrap
#2935
Add LightClientBootstrap
#2935
Conversation
Introduces a new `LightClientBootstrap` structure to allow setting up a `LightClientStore` with the initial sync committee and block header from a user-configured trusted block root. This leads to new cases where the `LightClientStore` is only aware of the current but not the next sync committee. As a side effect of these new cases, the store's `finalized_header` may now advance into the next sync committee period before a corresponding `LightClientUpdate` with the new sync committee is obtained, improving responsiveness. Note that so far, `LightClientUpdate.attested_header.slot` needed to be newer than `LightClientStore.finalized_header.slot`. However, it is now necessary to also consider certain older updates to try and backfill the `next_sync_committee`. The `is_better_update` helper is also updated to improve `best_valid_update` tracking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having a bootstrap looks reasonable to me.
/cc @dapplion and @wemeetagain, you may be interested in this.
Co-authored-by: Hsiao-Wei Wang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, this is in line with what we discussed in Amsterdam
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍
Introduces a new
LightClientBootstrap
structure to allow setting up aLightClientStore
with the initial sync committee and block header froma user-configured trusted block root.
This leads to new cases where the
LightClientStore
is only aware ofthe current but not the next sync committee. As a side effect of these
new cases, the store's
finalized_header
may now advance into the nextsync committee period before a corresponding
LightClientUpdate
withthe new sync committee is obtained, improving responsiveness.
Note that so far,
LightClientUpdate.attested_header.slot
needed to benewer than
LightClientStore.finalized_header.slot
. However, it is nownecessary to also consider certain older updates to try and backfill the
next_sync_committee
. Theis_better_update
helper is also updated toimprove
best_valid_update
tracking.