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

feat: simplify inner-product generator folding #52

Merged
merged 1 commit into from Aug 4, 2023

Conversation

AaronFeickert
Copy link
Contributor

@AaronFeickert AaronFeickert commented Aug 3, 2023

Simplifies the handling of prover inner-product generator folding for efficiency. Currently, this folding process is done using element-by-element scalar-group multiplication followed by group addition. This PR combines these operations into element-by-element multiscalar multiplications. The result is an impressive 35% speedup for single 64-bit range proving.

Also removes unnecessary helper functions.

Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

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

ACK

Nice improvement. See my prover bench results below (this PR was the 1st run)
[BP+ this PR = red, BP+ main = blue]

  • range_proof_creation/Agg 64-bit BP+ create agg factor 1 degree DefaultPedersen

image

  • range_proof_creation/Agg 64-bit BP+ create agg factor 2 degree DefaultPedersen

image

  • range_proof_creation/Agg 64-bit BP+ create agg factor 4 degree DefaultPedersen

image

  • range_proof_creation/Agg 64-bit BP+ create agg factor 8 degree DefaultPedersen

image

@SWvheerden SWvheerden merged commit 271892c into tari-project:main Aug 4, 2023
6 checks passed
@AaronFeickert AaronFeickert deleted the prover-speedup branch August 4, 2023 14:41
@SWvheerden SWvheerden mentioned this pull request Aug 7, 2023
stringhandler pushed a commit that referenced this pull request Aug 7, 2023
##
[0.3.2](v0.3.1...v0.3.2)
(2023-08-07)


## Features

* change precomputation `rc` to `arc`
([44](#44))
([d495fb2](d495fb2))
* minor verifier optimizations
([53](#53))
([7960214](7960214))
* simplify inner-product generator folding
([52](#52))
([271892c](271892c))


## Bug Fixes

* promise check in range statement
([48](#48))
([3e0008e](3e0008e))
* reduce vector capacity
([45](#45))
([9caa0c9](9caa0c9))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants