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

Incompatibility with circom2's WASM file after breaking changes in v2.0.7 #28

Closed
JSedlmeir92 opened this issue Sep 28, 2022 · 0 comments · Fixed by #29
Closed

Incompatibility with circom2's WASM file after breaking changes in v2.0.7 #28

JSedlmeir92 opened this issue Sep 28, 2022 · 0 comments · Fixed by #29

Comments

@JSedlmeir92
Copy link

I managed to use ark-circom's circomBuilder to load circom-generated r1cs and wasm files when they were created with circom v2.0.0 - v2.0.6 (also the subsequent trusted setup, proof creation and proof verification worked). It seems that from circom v2.0.7, breaking changes were introduced (see iden3/circom_runtime#38) that make the generated wasm file incompatible with ark-circom. I tested with circuits compiled with circom v2.0.8 - current version and got the following error every time:

thread 'main' panicked at 'called Result::unwrap() on an Err value: Error while importing "runtime"."printErrorMessage": unknown import. Expected Function(FunctionType { params: [], results: [] })

Location:
/home/user/.cargo/git/checkouts/ark-circom-1c15f1eba3004428/06eb075/src/witness/witness_calculator.rs:87:34', /home/user/.cargo/git/checkouts/ark-circom-1c15f1eba3004428/06eb075/src/circom/builder.rs:28:49
stack backtrace:
0: 0x5564991efa9d - std::backtrace_rs::backtrace::libunwind::trace::h8217d0a8f3fd2f41
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x5564991efa9d - std::backtrace_rs::backtrace::trace_unsynchronized::h308103876b3af410
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x5564991efa9d - std::sys_common::backtrace::_print_fmt::hc208018c6153605e
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:66:5
3: 0x5564991efa9d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf89a7ed694dfb585
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:45:22
4: 0x556499212d4c - core::fmt::write::h21038c1382fe4264
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/fmt/mod.rs:1197:17
5: 0x5564991ed7c1 - std::io::Write::write_fmt::h7dbb1c9a3c254aef
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/io/mod.rs:1672:15
6: 0x5564991f1245 - std::sys_common::backtrace::_print::h4e8889719c9ddeb8
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:48:5
7: 0x5564991f1245 - std::sys_common::backtrace::print::h1506fe2cb3022667
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:35:9
8: 0x5564991f1245 - std::panicking::default_hook::{{closure}}::hd9d7ce2a8a782440
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:295:22
9: 0x5564991f0f66 - std::panicking::default_hook::h5b16ec25444b1b5d
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:314:9
10: 0x5564991f17d6 - std::panicking::rust_panic_with_hook::hb0138cb6e6fea3e4
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:698:17
11: 0x5564991f16c7 - std::panicking::begin_panic_handler::{{closure}}::h4cb67095557cd1aa
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:588:13
12: 0x5564991eff54 - std::sys_common::backtrace::__rust_end_short_backtrace::h2bfcac279dcdc911
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:138:18
13: 0x5564991f13f9 - rust_begin_unwind
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
14: 0x556498d7b303 - core::panicking::panic_fmt::h1de71520faaa17d3
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
15: 0x556498d7b3f3 - core::result::unwrap_failed::hc0baa33ef8bc7db8
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/result.rs:1805:5
16: 0x556498d8a4a6 - ark_circom::circom::builder::CircomConfig::new::h3f61e57d14c619f8
17: 0x556498dececb - ark_circom_tests::main::h0e7770b10430361b
18: 0x556498da4cd3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h72cde959798951cc
19: 0x556498dcdd99 - std::rt::lang_start::{{closure}}::hf28b541f898e72af
20: 0x5564991e92be - core::ops::function::impls::<impl core::ops::function::FnOnce for &F>::call_once::h4937aaa125c8d4b2
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/ops/function.rs:280:13
21: 0x5564991e92be - std::panicking::try::do_call::h6f5c70e8b0a34f92
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40
22: 0x5564991e92be - std::panicking::try::h68766ba264ecf2e2
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19
23: 0x5564991e92be - std::panic::catch_unwind::hc36033d2f9cc04af
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14
24: 0x5564991e92be - std::rt::lang_start_internal::{{closure}}::h78c037f4a1a28ded
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:128:48
25: 0x5564991e92be - std::panicking::try::do_call::he6e1fffda4c750ee
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40
26: 0x5564991e92be - std::panicking::try::h48a77ddbb2f4c87a
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19
27: 0x5564991e92be - std::panic::catch_unwind::hfa809b06a550a9e7
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14
28: 0x5564991e92be - std::rt::lang_start_internal::h4db69ed48eaca005
at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:128:20
29: 0x556498df1ea2 - main
30: 0x7f49bf715083 - __libc_start_main
at /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
31: 0x556498d7b5fe - _start
32: 0x0 -

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

Successfully merging a pull request may close this issue.

1 participant