Open Trivo25 opened 1 year ago
The function noted is in fact the incorrect one, the correct function is here.
The real issue, however, is that the thread pool is uninitialised. I figured this out after sprinkling the code with some console.logs.
The real real issue, however, is that no useful debugging information is contained within the error message.
run_in_pool
uses .unwrap()
instead of .expect(...)
, but even when using the latter, the message, nor the line number, nor the (correct) stack trace is reported!
This is a symptom of console_error_panic_hook
not being used, I made a PR to fix this completely: https://github.com/o1-labs/snarkyjs-bindings/pull/63
Previously it was set ad-hoc in some functions (I assume a relic of debugging the implementations).
Nice find @L-as! At the time I introduced the console panic hook, I made it activate in those functions that would be the only important entry points for catching errors in snarkyjs
Invoking any method that that accesses
caml_fp_srs_b_poly_commitment
in the bindings layer causes anRuntime unreachable
errorexample:
which invokes a rust function
logs
compiling smart contracts also invoked
caml_fp_srs_b_poly_commitment
. however, in that case it doesn't fail while in any other situation it does.