В настоящее время я работаю с доказательствами с нулевым знанием, и поэтому я использую Node.js с его пакетами circom и snark js.
Я пытаюсь запустить circom circuit.circom --r1cs --wasm --sym
по следующей схеме:
template Accum() {
signal private input a;
signal private input b;
signal input n;
signal output c;
c <== (a**b) % n;
}
component main = Accum();
но я получаю ошибку:
Error: Type NQ can not be converted to QEX
at LCAlgebra.toQEX (/usr/local/lib/node_modules/circom/src/lcalgebra.js:433:19)
at execConstrain (/usr/local/lib/node_modules/circom/src/construction_phase.js:931:37)
at execSignalAssignConstrain (/usr/local/lib/node_modules/circom/src/construction_phase.js:943:5)
at exec (/usr/local/lib/node_modules/circom/src/construction_phase.js:110:20)
at execBlock (/usr/local/lib/node_modules/circom/src/construction_phase.js:534:9)
at instantiateComponent (/usr/local/lib/node_modules/circom/src/construction_phase.js:521:9)
at execInstantiateComponet (/usr/local/lib/node_modules/circom/src/construction_phase.js:463:9)
at execAssignement (/usr/local/lib/node_modules/circom/src/construction_phase.js:364:31)
at exec (/usr/local/lib/node_modules/circom/src/construction_phase.js:106:20)
at execBlock (/usr/local/lib/node_modules/circom/src/construction_phase.js:534:9)
Type NQ can not be converted to QEX
Насколько я понимаю, ошибка связана с моим использованием возведения в степень и модулей, но я не смог ее исправить.
Заранее спасибо.