Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Sizes in assignment must be the same #63

Open
Komari-Koshigaya opened this issue Oct 9, 2021 · 0 comments
Open

ERROR: Sizes in assignment must be the same #63

Komari-Koshigaya opened this issue Oct 9, 2021 · 0 comments

Comments

@Komari-Koshigaya
Copy link

// test.circom
include "../circomlib/circuits/bitify.circom";
include "../circomlib/circuits/escalarmulfix.circom";

template PublicKey() {
  signal private input in;
  signal output out[2];

  component privBits = Num2Bits(253);
  privBits.in <== in;

  var BASE8 = [
    5299619240641551281634865583518297030282874472190772894086521144482721001553,
    16950150798460657717958625567821834550301663161624707787222815936182638968203
  ];

  component mulFix = EscalarMulFix(253, BASE8);
  for (var i = 0; i < 253; i++) {
    mulFix.e[i] <== privBits.out[i];
  }

  out[0] <== mulFix.out[0];
  out[1] <== mulFix.out[1];
}

component main = PublicKey();

I encountered the following problem, when I try to execute circom test.circom --r1cs --wasm --sym to compile the circuit above.

test.circom:11,2-14,3   Sizes in assignment must be the same
{
 "type": "OP",
 "op": "=",
 "values": [
  {
   "type": "DECLARE",
   "declareType": "VARIABLE",
   "name": {
    "type": "VARIABLE",
    "name": "BASE8",
    "selectors": [],
    "first_line": 11,
    "first_column": 6,
    "last_line": 11,
    "last_column": 11
   },
   "first_line": 11,
   "first_column": 2,
   "last_line": 11,
   "last_column": 11,
   "refId": 3
  },
  {
   "type": "ARRAY",
   "values": [
    {
     "type": "NUMBER",
     "value": "5299619240641551281634865583518297030282874472190772894086521144482721001553",
     "first_line": 12,
     "first_column": 4,
     "last_line": 12,
     "last_column": 80
    },
    {
     "type": "NUMBER",
     "value": "16950150798460657717958625567821834550301663161624707787222815936182638968203",
     "first_line": 13,
     "first_column": 4,
     "last_line": 13,
     "last_column": 81
    }
   ],
   "first_line": 11,
   "first_column": 14,
   "last_line": 14,
   "last_column": 3
  }
 ],
 "first_line": 11,
 "first_column": 2,
 "last_line": 14,
 "last_column": 3
}

=========== environment ===========
circom: 0.5.45
node: V14.15.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant