Closed oleganza closed 4 years ago
Another idea:
scalar
for instantiating clear-text scalar values (was const
)commit
for high-level variables tied to Pedersen commitments ("external facts")alloc
for low-level variables not tied to any external commitments.
Problem
Current operation names
const
,var
andalloc
do not quite reflect what they are doing.Proposal
One way to make these better, although I'm still looking for a better naming:
const
->scalar
because it creates an expression with a clear-text scalar.var
->const
because it creates a r1cs "variable" out of a Pedersen commitment, which makes it a constant value in a sense.alloc
->var
because it create a true "variable" since the user can choose its value freely w/o being tied to any pre-existing commitments.Why these are not good enough?
scalar
name is close to perfect because it's what it literally does. But in the ZkVM spec it clashes with the section on the Scalar type, so we should probably rename it to "Scalar type" from simply "Scalar".var
/const
is not quite the correct distinction since in the r1cs most "low level variables", although secret, often assigned very specific values to satisfy constrains and do not dynamically change as the execution or verification happens, like regular variables/registers in an actual computer.