-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
bug in aggregateVote.numAggregateSig
#7
Comments
I'm not 100% sure what That said, this logic around BLS aggregate signatures still holds when used in other data structures. |
Hi Danny, Thank you so much for submitting an issue. We do indeed have relics of the previous spec in this repo. We are going to be going over the repo, and creating issues to make sure I follow your advice on making it easier for others to contribute. |
I think this can be closed due to #39 |
Issue
aggregateVote.numAggregateSig
currently incorrectly uses the length ofaggregate_sig
to get the number of aggregate signatures.https://github.com/ChainSafeSystems/lodestar_chain/blob/a270c7a577a3deda88f96cebb41bc3f173e26b1d/lodestar_chain/state/aggregateVote.js#L36-L38
aggregate_sig
is in fact always just the length of 2 so this fails.Proposed Implementation
You can use the number of
1
s in the bitfield to get the length. If you need the length often, you might consider some sort of helper attribute that caches this results.The text was updated successfully, but these errors were encountered: