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

Revise participation tracking in light client #2810

Closed
wants to merge 1 commit into from
Closed

Revise participation tracking in light client #2810

wants to merge 1 commit into from

Conversation

etan-status
Copy link
Contributor

The current mechanism to track historic sync committee participation is
suboptimal in these aspects:

  • During sync, LightClientUpdate are fetched across multiple sync
    committee periods. The sync participation may change drastically over
    time. If any of those synced periods had unusually high participation
    and is followed by periods of unusually low participation, this may
    prevent optimistic header updates until current_slot has advanced
    sufficiently (from the sync time, not from the update time).
  • When the light client suspends, process_slot_for_light_client_store
    needs to be called for all missed slots after resuming, which is not
    practical (optimizations would be possible).

This patch changes the rollover of the tracked participation to happen
whenever the store.finalized_header's sync committee period advances.
While in sync with the network, rollovers happen at the same frequency
as before, but this guarantees that participation is no longer mixed
across multiple sync committee periods, avoiding the problems above.

The current mechanism to track historic sync committee participation is
suboptimal in these aspects:
- During sync, `LightClientUpdate` are fetched across multiple sync
  committee periods. The sync participation may change drastically over
  time. If any of those synced periods had unusually high participation
  and is followed by periods of unusually low participation, this may
  prevent optimistic header updates until `current_slot` has advanced
  sufficiently (from the sync time, not from the update time).
- When the light client suspends, `process_slot_for_light_client_store`
  needs to be called for all missed slots after resuming, which is not
  practical (optimizations would be possible).

This patch changes the rollover of the tracked participation to happen
whenever the `store.finalized_header`'s sync committee period advances.
While in sync with the network, rollovers happen at the same frequency
as before, but this guarantees that participation is no longer mixed
across multiple sync committee periods, avoiding the problems above.
@etan-status
Copy link
Contributor Author

  • Rebased to dev.

@etan-status etan-status marked this pull request as draft April 26, 2022 20:58
@etan-status
Copy link
Contributor Author

This PR is no longer necessary, as other light client sync protocol updates will replace the automated force-update based on wall clock with a manual trigger based on heuristics depending on the risk profile of the corresponding use case.

@etan-status etan-status closed this May 3, 2022
@etan-status etan-status deleted the lc-suspend branch May 3, 2022 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants