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

panicked at /src/zokrates_ark/src/groth16.rs:42:18: called Result::unwrap() on an Err value: IoError(Error { kind: UnexpectedEof, message: "failed to fill whole buffer" }) #1363

Open
SagarKarmoker opened this issue Feb 21, 2024 · 2 comments

Comments

@SagarKarmoker
Copy link

Description

panicked at /src/zokrates_ark/src/groth16.rs:42:18:
called Result::unwrap() on an Err value: IoError(Error { kind: UnexpectedEof, message: "failed to fill whole buffer" })

Stack:

Error
at imports.wbg.__wbg_new_693216e109162396 (file:///W:/U%20Disk/CSE400/Code/SmartContractTest/kycbackend/node_modules/zokrates-js/wasm.js:402:17)
at wasm://wasm/0d2249e6:wasm-function[23821]:0x301108a
at wasm://wasm/0d2249e6:wasm-function[39798]:0x33a1f00
at wasm://wasm/0d2249e6:wasm-function[32366]:0x32d5a59
at wasm://wasm/0d2249e6:wasm-function[34085]:0x3320e52
at wasm://wasm/0d2249e6:wasm-function[37363]:0x3381def
at wasm://wasm/0d2249e6:wasm-function[38515]:0x33996cf
at wasm://wasm/0d2249e6:wasm-function[35779]:0x33586d3
at wasm://wasm/0d2249e6:wasm-function[20399]:0x2e4ec2c
at wasm://wasm/0d2249e6:wasm-function[17484]:0x2c75f07

Error in generating proof: RuntimeError: unreachable
at wasm://wasm/0d2249e6:wasm-function[32366]:0x32d5a7f
at wasm://wasm/0d2249e6:wasm-function[34085]:0x3320e52
at wasm://wasm/0d2249e6:wasm-function[37363]:0x3381def
at wasm://wasm/0d2249e6:wasm-function[38515]:0x33996cf
at wasm://wasm/0d2249e6:wasm-function[35779]:0x33586d3
at wasm://wasm/0d2249e6:wasm-function[20399]:0x2e4ec2c
at wasm://wasm/0d2249e6:wasm-function[17484]:0x2c75f07
at wasm://wasm/0d2249e6:wasm-function[2810]:0x14ee021
at Module.generate_proof (file:///W:/U%20Disk/CSE400/Code/SmartContractTest/kycbackend/node_modules/zokrates-js/wasm.js:218:10)
at Object.generateProof (file:///W:/U%20Disk/CSE400/Code/SmartContractTest/kycbackend/node_modules/zokrates-js/index.js:92:26)
RuntimeError: unreachable
at wasm://wasm/0d2249e6:wasm-function[32366]:0x32d5a7f
at wasm://wasm/0d2249e6:wasm-function[34085]:0x3320e52
at wasm://wasm/0d2249e6:wasm-function[37363]:0x3381def
at wasm://wasm/0d2249e6:wasm-function[38515]:0x33996cf
at wasm://wasm/0d2249e6:wasm-function[35779]:0x33586d3
at wasm://wasm/0d2249e6:wasm-function[20399]:0x2e4ec2c
at wasm://wasm/0d2249e6:wasm-function[17484]:0x2c75f07
at wasm://wasm/0d2249e6:wasm-function[2810]:0x14ee021
at Module.generate_proof (file:///W:/U%20Disk/CSE400/Code/SmartContractTest/kycbackend/node_modules/zokrates-js/wasm.js:218:10)
at Object.generateProof (file:///W:/U%20Disk/CSE400/Code/SmartContractTest/kycbackend/node_modules/zokrates-js/index.js:92:26)

Environment

  • Compiler version: 1.1.9
  • Operating system: windows 10

Steps to Reproduce

@imilio
Copy link

imilio commented Apr 1, 2024

Any solutions to this bug? just encountered the same

@dark64
Copy link
Member

dark64 commented Apr 3, 2024

This occurs when the process of proving key deserialization fails, which can be due to several reasons:

  • Passing it in an unexpected format (difficult to determine without reviewing your code),
  • Executing the setup with a different engine, such as bellman, while attempting to generate proof with ark using bellman artifacts,
  • Version mismatch, where the setup is run on an older version of Zokrates.

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

3 participants