template DecodeUint(len) {
signal input x;
signal input pos;
signal output value;
signal output nextpos;
component getV = GetV(len);
if (x <= 23) {
value <== x;
pos ==> nextpos;
}
else if(x == 24) {
value <== 255;
pos + 1 ==> nextpos;
}
}
我收到此错误:
error[T2005]: Typing error found
┌─ "/Users/ilia/compiling/main-circom/main.circom":93:13
│
93 │ else if(x == 24) {
│ ^^^^^^^ There are constraints depending on the value of the condition and it can be unknown during the constraint generation phase
如何以可以生成电路的形式重写条件?除了 if 条件之外,是否有类似Quin Selector的东西?