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

fix: support arbitrary range proof batching #5049

Merged
merged 3 commits into from
Dec 13, 2022

Conversation

AaronFeickert
Copy link
Collaborator

@AaronFeickert AaronFeickert commented Dec 13, 2022

Description

Removes an unnecessary power-of-two batch decomposition for range proof batch verification.

Closes issue #5048.

Motivation and Context

Range proofs can be verified in batches for significant performance improvements. However, they are currently verified only in batches with power-of-two sizes. This may be due to a misunderstanding between aggregation (which requires such a restriction) and batching (which does not).

This work removes the restriction and provides the range proof verifier with all proofs in a batch.

Because of performance limitations, it may be useful to impose a size restriction in the verifier, where a very large batch is split into smaller batches.

How Has This Been Tested?

Existing tests pass.

@CjS77 CjS77 added the P-merge Process - Queued for merging label Dec 13, 2022
Copy link
Collaborator

@CjS77 CjS77 left a comment

Choose a reason for hiding this comment

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

LGTM

@CjS77 CjS77 merged commit 3dd10bd into tari-project:development Dec 13, 2022
@AaronFeickert AaronFeickert deleted the range-proof-batch-fix branch December 13, 2022 21:05
agubarev pushed a commit to agubarev/tari that referenced this pull request Dec 14, 2022
* Support arbitrary range proof batching

* Empty batches are valid

* Formatting
stringhandler pushed a commit that referenced this pull request Jan 4, 2023
Description
---
Updates `tari-crypto` dependencies to use range proof batch splitting.

Motivation and Context
---
An [earlier PR](#5049) removed an unnecessary restriction on range proof batch splitting. Recent `bulletproofs-plus` work [updates range proof batching](tari-project/bulletproofs-plus#22) to split large batches for performance reasons, and also updates the verification API for clarity. A [corresponding PR](tari-project/tari-crypto#160) in `tari-crypto` uses this new API, but does not change its own external range proof verification API.

This PR updates `tari-crypto` dependencies to take advantage of this new functionality.

How Has This Been Tested?
---
Existing tests pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-merge Process - Queued for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[base node] Fix pub fn batch_verify_range_proofs(..) to not use powers of two, but batch all proofs
2 participants