-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: resolve the errors in GetLightClientUpdatesByRange
function
#14171
Conversation
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.
Let's not merge without tests to make sure we don't forget about them
tests added! Pls let me know if any more changes are required |
} | ||
|
||
if syncAggregate.SyncCommitteeBits.Count()*3 < config.SyncCommitteeSize*2 { | ||
if syncAggregate.SyncCommitteeBits.Count() < 1 { |
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.
I'm not sure if we even should filter out the blocks with zero SyncComitteeBits. since the light clients themselves check that.
But according to the specs, this will not count as a valid update anyway, so maybe we could save them the trouble of computation and just don't send them invalid updates.
Unless there is another use for this function.
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.
The full node spec does not require to send only updates with 1 or more participants, but since it's the sync committee that provides an update, having 0 participants essentially means that the sync committee did not give an update.
What type of PR is this?
Bug fix
What does this PR do? Why is it needed?
HandleError
in places wherecontinue
is used insideif err != nil
Which issues(s) does this PR fix?
Fixes #14170
Other notes for review
I am yet to add unit tests for the 3rd change