You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I use DPC to instantiate the very simple "conserve" predicate required to encode the basic user-defined asset from the reference paper [1]?
I could not figure out how to do this. The current implementation hardcodes an "always accept" predicate and it's unclear how to instantiate the "conserve" predicate: the sum of inputs should equal the sum of outputs.
My current plan seems much more complicated than expected; am I on the right track?
Step 1: Create R1CS
It seems like I'd have to implement the ConstraintSynthesizer trait generating a R1CS for the predicate. But, how can I represent the "conserve" predicate as a R1CS? I know there are reductions from arithmetic circuits to R1CS [2] but don't know a standalone tool which automates this (I could not figure out how to do this in libsnark).
Step 2: Integrate predicate
The "always accept" predicate EmptyPredicateCircuit is hard-coded in the plain_dpc module (even outside the tests). Hence, I'd have to refactor the code to allow a different predicate.
How can I use DPC to instantiate the very simple "conserve" predicate required to encode the basic user-defined asset from the reference paper [1]?
I could not figure out how to do this. The current implementation hardcodes an "always accept" predicate and it's unclear how to instantiate the "conserve" predicate: the sum of inputs should equal the sum of outputs.
[1] https://eprint.iacr.org/2018/962
The text was updated successfully, but these errors were encountered: