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

Adding bucket support to debug group #124

Merged
merged 24 commits into from
Sep 16, 2021
Merged

Adding bucket support to debug group #124

merged 24 commits into from
Sep 16, 2021

Conversation

rheitjoh
Copy link
Member

@rheitjoh rheitjoh commented Jul 8, 2021

Done

  • Added bucket support to DebugGroup and DebugBilinearGroup
  • Added constructor to DebugBilinearGroup that takes in group size. Constructor for group bit size has been removed temporarily
  • Math version is now v3.0.0 due to API-breaking changes
  • Fixed counting tests to work with new bucket counting
  • The operation and pairing counting is now thread-safe (incrementing and retrieval is atomic). The more complex retrieval methods such as formatCounterData won't be made atomic.
  • Wrote new documentation for online doc page
  • Javadocs
  • Added more unit tests to test buckets and static counting
  • Updated JUnit5 version to 5.7.2 to fix a ClassDefNotFoundError

How does it work?

DebugGroup and DebugBilinearGroup now support using named buckets to distinguish between different sets of counter data. The bucket can be switched via the setBucket method (for DebugBilinearGroup it will switch the buckets for G1, G2, GT, and the pairing counter all together). The system also distinguishes between the buckets sets for G1, G2, and GT, as well as the DebugGroup not belonging to a bilinear group (if you use the latter directly).

Initially, a default bucket is selected which is not named. You can go back to the default bucket via setDefaultBucket and it has separate getter methods and result formatting methods. Having it not be named increases the number of methods but ensures you do not need to remember a name such as "default".

There are also methods that sum up all the values from all the buckets. These have the suffix "allBuckets".

To format the results, there are still the formatCounterData() methods, albeit with some more options.
These will currently print the results for all buckets plus the summed up results.

@rheitjoh rheitjoh linked an issue Jul 8, 2021 that may be closed by this pull request
@rheitjoh rheitjoh self-assigned this Jul 13, 2021
@rheitjoh rheitjoh marked this pull request as ready for review July 30, 2021 06:56
@rheitjoh rheitjoh requested a review from JanBobolz July 30, 2021 06:56
@JanBobolz JanBobolz merged commit 3a8ab9b into develop Sep 16, 2021
@JanBobolz JanBobolz deleted the debug-buckets branch September 16, 2021 15:27
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.

Introduce "buckets" to DebugGroup counting
2 participants