While working on https://github.com/o1-labs/o1js/issues/1859, I found a TODO when computing the runtime table feature flag inside the verifier index in the WASM Kimchi bindings (which was set to false by default). Instead, it is now true if the selector for runtime tables exists.
Explain how you tested your changes:
Unfortunately, this is not sufficient to make https://github.com/o1-labs/o1js/pull/1858 be able to use runtime tables from o1js. In particular, tests show that it still fails when a table is configured (so the selector is set), but the feature flag interpreted from the circuit is still false.
In particular, despite this change, testing the runtime tables in o1js still returns this error:
error
/workspace_root/src/bindings/ocaml/jsoo_exports/overrides.js:45
if (err instanceof Error) throw err;
^
Error: assert_equal: 0x0000000000000000000000000000000000000000000000000000000000000001 != 0x0000000000000000000000000000000000000000000000000000000000000000
at failwith (/nix/store/y36p5lfc6mnanacky4rcj0pak3h1v1lc-ocaml-base-compiler-4.14.0/lib/ocaml/stdlib.ml:29:14)
at <anonymous> (/nix/store/9vc13hac8f1jm4pb4i52xrhxd1afcybi-base-v0.14.3/lib/ocaml/4.14.0/site-lib/base/printf.ml:6:43)
at assert_equal (src/mina/src/lib/snarky/src/base/checked.ml:84:11)
at of_cvar (src/mina/src/lib/snarky/src/base/utils.ml:388:39)
at symbol$6 (src/mina/src/lib/snarky/src/base/snark0.ml:874:29)
at assert_consistent (src/mina/src/lib/pickles/wrap_main.ml:291:28)
at <anonymous> (src/mina/src/lib/pickles/wrap_main.ml:309:13)
at with_label (src/mina/src/lib/snarky/src/base/snark0.ml:1253:15)
at step_domains (src/mina/src/lib/pickles/wrap_main.ml:166:20)
at <anonymous> (src/mina/src/lib/promise/js/promise.js:27:16)
at main (src/mina/src/lib/pickles/compile.ml:676:38)
at mark_active (src/mina/src/lib/snarky/src/base/snark0.ml:1167:19)
at _kXf_ (src/mina/src/lib/snarky/src/base/snark0.ml:1287:52)
at as_stateful (src/mina/src/lib/snarky/src/base/snark0.ml:755:15)
at _k$R_ (src/mina/src/lib/snarky/src/base/runners.ml:274:55)
at run_computation (src/mina/src/lib/snarky/src/base/runners.ml:246:33)
at constraint_system (src/mina/src/lib/snarky/src/base/runners.ml:274:9)
at <anonymous> (src/mina/src/lib/snarky/src/base/snark0.ml:1287:19)
at finalize_is_running (src/mina/src/lib/snarky/src/base/snark0.ml:1272:15)
at constraint_system (src/mina/src/lib/snarky/src/base/snark0.ml:1286:7)
at _iDy_ (src/mina/src/lib/pickles/compile.ml:678:14)
at <anonymous> (src/mina/src/lib/promise/js/promise.js:25:37)
at async <anonymous> (o1js/src/lib/proof-system/zkprogram.ts:627:32)
at async withThreadPool (o1js/src/bindings/js/node/node-backend.js:56:14)
at async prettifyStacktracePromise (o1js/src/lib/util/errors.ts:138:12)
at async compileProgram (o1js/src/lib/proof-system/zkprogram.ts:613:5)
at async Object.compile (o1js/src/lib/proof-system/zkprogram.ts:292:50)
at async file:////o1js/dist/node/lib/provable/test/lookup.unit-test.js:37:3
Changing featureFlagsFromGates() to undefined or true is also not sufficient. Tests actually return exactly the same error:
error
Error: assert_equal: 0x0000000000000000000000000000000000000000000000000000000000000001 != 0x0000000000000000000000000000000000000000000000000000000000000000
at failwith (/nix/store/y36p5lfc6mnanacky4rcj0pak3h1v1lc-ocaml-base-compiler-4.14.0/lib/ocaml/stdlib.ml:29:14)
at <anonymous> (/nix/store/9vc13hac8f1jm4pb4i52xrhxd1afcybi-base-v0.14.3/lib/ocaml/4.14.0/site-lib/base/printf.ml:6:43)
at assert_equal (src/mina/src/lib/snarky/src/base/checked.ml:84:11)
at of_cvar (src/mina/src/lib/snarky/src/base/utils.ml:388:39)
at symbol$6 (src/mina/src/lib/snarky/src/base/snark0.ml:874:29)
at assert_consistent (src/mina/src/lib/pickles/wrap_main.ml:291:28)
at <anonymous> (src/mina/src/lib/pickles/wrap_main.ml:309:13)
at with_label (src/mina/src/lib/snarky/src/base/snark0.ml:1253:15)
at step_domains (src/mina/src/lib/pickles/wrap_main.ml:166:20)
at <anonymous> (src/mina/src/lib/promise/js/promise.js:27:16)
at main (src/mina/src/lib/pickles/compile.ml:676:38)
at mark_active (src/mina/src/lib/snarky/src/base/snark0.ml:1167:19)
at _kXf_ (src/mina/src/lib/snarky/src/base/snark0.ml:1287:52)
at as_stateful (src/mina/src/lib/snarky/src/base/snark0.ml:755:15)
at _k$R_ (src/mina/src/lib/snarky/src/base/runners.ml:274:55)
at run_computation (src/mina/src/lib/snarky/src/base/runners.ml:246:33)
at constraint_system (src/mina/src/lib/snarky/src/base/runners.ml:274:9)
at <anonymous> (src/mina/src/lib/snarky/src/base/snark0.ml:1287:19)
at finalize_is_running (src/mina/src/lib/snarky/src/base/snark0.ml:1272:15)
at constraint_system (src/mina/src/lib/snarky/src/base/snark0.ml:1286:7)
at _iDy_ (src/mina/src/lib/pickles/compile.ml:678:14)
at <anonymous> (src/mina/src/lib/promise/js/promise.js:25:37)
at async <anonymous> (o1js/src/lib/proof-system/zkprogram.ts:627:32)
at async withThreadPool (o1js/src/bindings/js/node/node-backend.js:56:14)
at async prettifyStacktracePromise (o1js/src/lib/util/errors.ts:138:12)
at async compileProgram (o1js/src/lib/proof-system/zkprogram.ts:613:5)
at async Object.compile (o1js/src/lib/proof-system/zkprogram.ts:292:50)
at async file:////o1js/dist/node/lib/provable/test/lookup.unit-test.js:37:3
Explain your changes:
false
by default). Instead, it is nowtrue
if the selector for runtime tables exists.Explain how you tested your changes:
false
.error
featureFlagsFromGates()
toundefined
ortrue
is also not sufficient. Tests actually return exactly the same error:error