MynaWallet / monorepo

15 stars 4 forks source link

Missing files required to run `gov-sig-build-circuit` in `packages/circom-circuit` #49

Open sakuyacatcat opened 6 months ago

sakuyacatcat commented 6 months ago

What command(s) is the bug in?

make gov-sig-build-circuit

Describe the bug

When I run make gov-sig-build-circuit, the following error is output:

> make gov-sig-build-circuit
circom src/verify-gov-sig.circom --r1cs --wasm --sym -o ./gov-sig-build
invalid output path
previous errors were found
make: *** [gov-sig-build-circuit] Error 1

Therefore, I created a gov-sig-build directory under packages/circom-circuit and ran it again.

> make gov-sig-build-circuit
circom src/verify-gov-sig.circom --r1cs --wasm --sym -o ./gov-sig-build
...
non-linear constraints: 798452
linear constraints: 0
public inputs: 34
public outputs: 1
private inputs: 1618
private outputs: 0
wires: 791047
labels: 4480289
Written successfully: ./gov-sig-build/verify-gov-sig.r1cs
Written successfully: ./gov-sig-build/verify-gov-sig.sym
Written successfully: ./gov-sig-build/verify-gov-sig_js/verify-gov-sig.wasm
Everything went okay, circom safe
node gov-sig-build/verify-gov-sig_js/generate_witness.js ./gov-sig-build/verify-gov-sig_js/verify-gov-sig.wasm ./gov-sig-setup/input.json ./gov-sig-setup/witness.wtns
node:internal/fs/utils:351
    throw err;
    ^

Error: ENOENT: no such file or directory, open './gov-sig-setup/input.json'
  ...
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: './gov-sig-setup/input.json'
}

Node.js v20.5.0
make: *** [gov-sig-build-circuit] Error 1

It reports that packages/circom-circuit/gov-sig-setup/input.json is missing, and upon checking the directory, it indeed does not exist. Meanwhile, a similar make command user-sig-build-circuit uses packages/circom-circuit/user-sig-setup/input.json, which was committed. Therefore, I suspect that packages/circom-circuit/gov-sig-setup/input.json might have been accidentally omitted from the commit.

Additionally, within the same gov-sig-build-circuit command, gov-sig-setup/witness.wtns also appears to be a required file, but I'm unsure if its absence would prevent the command from executing successfully. I've included this in the report for clarity.

Concrete steps to reproduce the bug. If it's able reproduce via testool, please share test_id from jenkins report

  1. Check out the develop branch.
  2. Move to the packages/circom-circuit directory.
  3. Execute Makefile commands in order from the top.
  4. Encounter the above error when executing the gov-sig-build-circuit command.