polymerdao / plonky2-circom

Apache License 2.0
155 stars 49 forks source link

Error when compiling circuit with Circom: Uninitialized inputs in component cdouble #6

Closed kiwi202202 closed 6 months ago

kiwi202202 commented 6 months ago

Hello,

The error occurs in the script ./e2e_test_recursive_proof_circom_verification.sh. Below is the error message:

****COMPILING CIRCUIT****
error[T3001]: Component cdouble is created but not all its inputs are initialized
    ┌─ "/home/plonky2-circom/polymer/plonky2-circom/circom/circuits/goldilocks_ext.circom":149:5
    │
149 │     cdouble[i] = GlExtSquare();
    │     ^^^^^^^^^^^^^^^^^^^^^^^^^^ found here
    │
    = call trace:
      ->VerifyPlonky2Proof
       ->EvalVanishingPoly
        ->EvalGateConstraints
         ->Poseidon12
          ->GlExtExpN

previous errors were found

Here's some context about my setup:

It seems like the cdouble component is created without all its inputs being initialized properly.

kiwi202202 commented 6 months ago

The problem is solved, simply add these two dummy lines to satisfy circom:

  cdouble[N-1].a[0] <== 0;
  cdouble[N-1].a[1] <== 0;