Replies: 1 comment 3 replies
-
Hi @vck3000 , I am curious about the 5., do you have a way to return a boolean telling if a<b? Currently we have |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys,
Extremely cool project, thanks for putting in so much effort into open sourcing this for us.
I've been developing some circuits for some university research and had some ideas on possible features for usability that I thought might have been nice to have. If you'd like me to make an issue/discussion for some or all of the below, let me know!
Option to configure the logger.
I'm wrapping a circuit up in a web framework and it would be nice if we could configure the logger by means of an API call or by passing a logger object in to control the verbosity of messages. Sometimes I would also want to print multiple things on the same line for easier viewing so maybe a
api.Print()
method may also be nice to have?Solving for output value in
backend.Prove()
along with proof.Prove()
currently requires a complete witness to work. I believe some other frameworks allow us to define "output" wires, and given inputs, can solve for the output. I understand that computing the result of a circuit in normal programming paradigms is fairly trivial in most cases, but if the circuit has to compute it itself anyway, I thought it might be nice for the circuit itself to be able to calculate and output the result rather than computing the result twice.Implementing
assert.ProverSucceededSingleCurve()
(or modifyingassert.ProverSucceeded()
).The current
assert.ProverSucceeded()
runs slowly due to it testing through all the implemented backends and curves, making my unit tests time consuming to sit through. I think to the end user, circuit correctness is more important, and I reckon we assume that any implemented backend/curve should still work. If "for a given circuit that works for one backend/curve, it will work for all backends/curves" is a bad assumption, perhaps we could note that somewhere for future readers.Aliasing
Not()
toIsZero()
.When working with boolean logic in the circuit design, I found
Not()
to have the same functionality asIsZero()
but with a more intuitive name. Given we have AND, OR, XOR, etc. I think it might be nice to simply aliasNot()
toIsZero()
.Implementing
LessThan()
.assertEquals()
solves the issue of equality, however inequalities are currently difficult to compute. I implemented aCompare(a, b []frontend.Variable)
function that compares bit by bit and determines which one is larger. Happy to share my code if you'd like to see.Documenting negative numbers.
This probably is obvious to most people, but when I was learning I didn't realise that
api.ToBinary()
doesn't support negative numbers (finite fields... of course). It might be nice to have it in the docs too? It seems thatfrontend.Variable
does indeed handle negative signs though.Missing
ReadRawFrom()
.Not sure if this was intentional, but
WriteTo
has a counterpartReadFrom
, butWriteRawTo
doesn't have a counterpartReadRawFrom
currently.Beta Was this translation helpful? Give feedback.
All reactions