.codesyntax. E.g. the babyJubJub features and the Pedersen features seem to be contained entirely within zokrates_stdlib without any rust or c++ backend (i.e. without going through zokrates_core/src/imports.js). Is there a reason for this? Am I missing some of this functionality getting offloaded to the sapling_crypto library at some point? Does implementing solely in
.codefiles not make for a 'slower' implementation?
Does there always need to be a return statement in the ZoKrates DSL? Most examples
return 1 and hence have function signature with ending
Taking the simple 'knowledge of square root' example, why would the following simplification not suffice?:
def main(private field a, field b) -> (): a * a == b
(This won't compile. I've made up the syntax
-> ():for illustration. Although
def main(private field a, field b): would be even simpler.)
Surely the constraints of my proof are still satisfied without the
return 1 statement? And (crucially) I would save myself some verification computational effort with a smaller input vector [b] (rather than input [b, 1]).