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

core/sigagg: implement signature aggregation #192

Merged
merged 4 commits into from
Mar 8, 2022
Merged

Conversation

corverroos
Copy link
Contributor

Implements the core workflow's signature aggregation component.

category: feature
ticket: #184

@codecov
Copy link

codecov bot commented Mar 8, 2022

Codecov Report

❗ No coverage uploaded for pull request base (main@2aa0198). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 00253a8 differs from pull request most recent head 55fe9c0. Consider uploading reports for the commit 55fe9c0 to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #192   +/-   ##
=======================================
  Coverage        ?   52.43%           
=======================================
  Files           ?       46           
  Lines           ?     2935           
  Branches        ?        0           
=======================================
  Hits            ?     1539           
  Misses          ?     1216           
  Partials        ?      180           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2aa0198...55fe9c0. Read the comment docs.

Copy link
Contributor

@dB2510 dB2510 left a comment

Choose a reason for hiding this comment

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

Looks great!

core/sigagg/sigagg.go Outdated Show resolved Hide resolved

var (
blsSigs []*bls_sig.PartialSignature
first core.ParSignedData
Copy link
Contributor

Choose a reason for hiding this comment

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

this variable name can be just data

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It implies we are taking the first data, so does convey extra meaning.

return err
}

if i == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

this step can be done to before for loop that way i think we will not need this if else

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, but I like the fact that this means, if it is the first item, use it as reference, also compare the data against the first. If you split it out, then that logic is also split.

@@ -34,3 +38,90 @@ func RandomPubKey(t *testing.T) core.PubKey {

return pubkey
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for this! this was much needed for tests

corverroos and others added 2 commits March 8, 2022 15:45
Co-authored-by: Dhruv Bodani <dhruvbodani2510@gmail.com>
@corverroos corverroos merged commit fe1554d into main Mar 8, 2022
@corverroos corverroos deleted the corver/sigagg branch March 8, 2022 13:52
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.

None yet

2 participants