dalek-cryptography / bulletproofs

A pure-Rust implementation of Bulletproofs using Ristretto.
MIT License
1.02k stars 218 forks source link

Add ConstraintSystem:: multipliers_len() #284

Closed rubdos closed 4 years ago

rubdos commented 5 years ago

For some benchmarks and tests it is useful to retrieve the amount of actually allocated multipliers from the proof system.

This is especially useful when building complex and composed circuits, when one doesn't want to count them manually :-)

oleganza commented 4 years ago

Oh, sorry for having this sitting for so long. Just one nitpick: maybe rename to multipliers_count, so it does not sound like it starts a slow and complicated counting procedure?

rubdos commented 4 years ago

Oh, sorry for having this sitting for so long. Just one nitpick: maybe rename to multipliers_count, so it does not sound like it starts a slow and complicated counting procedure?

I've seen another repository where they used num_multipliers, and I was just thinking about multipliers_len() or len_multipliers(), in accordance with Vec::len(). what would you prefer?

oleganza commented 4 years ago

multipliers_len also works!