-
Notifications
You must be signed in to change notification settings - Fork 214
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
Rename ConstraintSystemRef
to R1CSBuilder
#343
Comments
I feel the Regarding "Driver", the situation appears since an R1CS likely would have many drivers. How about the ancient name "R1CSGadget"? |
Hmm R1CSRef would imply it’s a reference for R1CS, which it isn’t. The reason to call it Builder is because you use it incrementally build up the R1CS matrices and variable assignments. Maybe we can just say in documentation that it is cheap to clone.
I suggested Driver because it “drives” the building of the Builder. Maybe we can call it R1CSContext instead, as it contains the the Context to start the building? |
sorry to chime in here,
imo, "builder" has the implicit association with the traditional "builder pattern", (e.g. clap.rs API), however the process of CS building has lots of sequential dependency (e.g. // traditional Builder workflow
let cs: R1CS = R1CSBuilder::new().add_xxx_constraint()
.add_multi_exp_constraint()
.add_xxx_constraint()
.build();
// in reality, what we might end up with:
let mut builder = R1CSBuilder::new();
let a_var = builder.new_witness_var(a);
let b_var = builder.new_witness_var(b);
builder.enforce_add(a_var, b_var);
builder.finalize(); Question: The rationale behind having a separate I can see that it's a signal for cloneable object, avoiding cloning a giant object like CS itself, but why can't we just have a Regarding Thanks |
Summary
R1CS
.ConstraintSystemRef
->R1CSBuilder
.ConstraintSynthesizer
->R1CSDriver
(maybe something else?).Workflow:
What do you think?
For Admin Use
The text was updated successfully, but these errors were encountered: