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

Add LightClientBootstrap #2935

Merged
merged 3 commits into from
Jul 14, 2022
Merged

Add LightClientBootstrap #2935

merged 3 commits into from
Jul 14, 2022

Conversation

etan-status
Copy link
Contributor

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.

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.
Copy link
Contributor

@hwwhww hwwhww left a 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.

specs/altair/sync-protocol.md Outdated Show resolved Hide resolved
specs/altair/sync-protocol.md Show resolved Hide resolved
Copy link
Contributor

@wemeetagain wemeetagain left a 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

Copy link
Contributor

@hwwhww hwwhww left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

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