argumentcomputer / bellpepper

SNARK Circuit library inspired by bellman/bellperson (contact: @porcuquine)
Other
69 stars 17 forks source link

add public getters to WitnessCS fields to permit arecibo refactor #48

Closed jobez closed 1 year ago

jobez commented 1 year ago

Per this discussion: https://github.com/lurk-lab/arecibo/issues/77#issuecomment-1787358390

This change makes the WitnessCS fields public, enabling arecibo's SatisfyingAssignment to be reimplemented as a type alias.

jobez commented 1 year ago

Making this public means making those fields mutable as well as readable. Are there any instances in arecibo where it's necessary to mutate?

If not, would a public getter suffice ?

If a public getter would be enough, please note the API conventions on naming getters.

Ok, seeing these previously defined public getters are actually used by https://github.com/lurk-lab/neptune/blob/6ada3b3bab263358354e8134883de454f977e13c/src/circuit2_witness.rs#L435

https://github.com/lurk-lab/bellpepper/blob/ac5f2bf388b76c06d39e5788b688f5284d798d7f/crates/bellpepper/src/util_cs/witness_cs.rs#L170-L178

Will opt for reusing them