-
Notifications
You must be signed in to change notification settings - Fork 975
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
Manually trigger LightClientStore
force updates
#2947
Conversation
Replaces `process_slot_for_light_client_store` which force updates the `LightClientStore` automatically based on `finalized_header` age with `try_light_client_store_force_update` which may be manually called based on use case dependent heuristics if light client sync appears stuck. Not all use cases share the same risk profile.
apply_light_client_update(store, store.best_valid_update) | ||
store.best_valid_update = None | ||
``` | ||
- `try_light_client_store_force_update` MAY be called based on use case dependent heuristics if light client sync appears stuck. |
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.
it seems a big change to light client behavior.
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.
Previous behaviour can be simulated by calling this on every slot, same as before. But new behaviour allows for use cases such as historic data sync where it is not appropriate to force-apply every single update just because it is historic.
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.
@etan-status I see. So it is backward compatible. 👍
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
Replaces
process_slot_for_light_client_store
which force updates theLightClientStore
automatically based onfinalized_header
age withtry_light_client_store_force_update
which may be manually called basedon use case dependent heuristics if light client sync appears stuck.
Not all use cases share the same risk profile.