Skip to content

Commit

Permalink
feat: refactor inner-product prover (#57)
Browse files Browse the repository at this point in the history
The inner-product prover is a bit clunky, as it requires the range
prover to set up a struct, perform iterative rounds, and then parse out
the proof elements it needs. This also requires consistency checks that
it would be nicer to avoid.

This PR moves the inner-product prover into the range prover, which
simplifies things at the cost of a longer prover function.

It also fixes some [vector
allocations](https://github.com/tari-project/bulletproofs-plus/blob/d9d0cc9063f85684179908569227dda251981751/src/inner_product_round.rs#L111-L112)
that were much bigger than necessary.

Closes #61. Closes #55. Supersedes #56.
  • Loading branch information
SWvheerden committed Aug 24, 2023
2 parents d9d0cc9 + 98c15d2 commit aa7593f
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 598 deletions.
3 changes: 3 additions & 0 deletions src/errors.rs
Expand Up @@ -20,4 +20,7 @@ pub enum ProofError {
/// Invalid `Blake2b` hash operation
#[error("Invalid Blake2b")]
InvalidBlake2b,
/// Internal size overflow
#[error("Internal size overflow")]
SizeOverflow,
}

0 comments on commit aa7593f

Please sign in to comment.