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

Fill-in TODO for runtime table feature flag #16307

Open
wants to merge 2 commits into
base: compatible
Choose a base branch
from

Conversation

querolita
Copy link
Member

@querolita querolita commented Oct 29, 2024

Explain your changes:

  • While working on Support runtime tables o1-labs/o1js#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 Looking up values in runtime tables o1-labs/o1js#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

@querolita
Copy link
Member Author

!ci-build-me

@querolita querolita marked this pull request as ready for review October 30, 2024 11:11
@querolita querolita requested a review from a team as a code owner October 30, 2024 11:11
@dannywillems
Copy link
Member

Looks to me a relevant change.

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 this pull request may close these issues.

2 participants