-
Notifications
You must be signed in to change notification settings - Fork 11
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
[develop] Bindings - add runtime table cfg to prover index creation #79
[develop] Bindings - add runtime table cfg to prover index creation #79
Conversation
33be4ed
to
7c170df
Compare
8ca90f8
to
f6bbee5
Compare
29df59b
to
586c3bb
Compare
586c3bb
to
aaa0d26
Compare
…ver-index-creation
3dfadad
to
e8e4d40
Compare
4087d49
to
3b8142a
Compare
EDIT: it seems happening because of other changes, removed later in this branch. I kept track of it in With the latest changes, I have runtime errors with null pointers passed to rust. Trying to fix it. It seems to be related to the finalizer. Digging into it. As we do allocations for the runtime table cfgs, it might come from there. See snarkyjs CI.
or
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to include unrelated changes (deleting tests etc.). Please revert
f43e72b
to
8462906
Compare
8462906
to
9546526
Compare
9546526
to
c5871c6
Compare
…d runtime table cfg
It also makes the code clearer.
c5871c6
to
410a97b
Compare
Done |
kimchi/js/bindings.js
Outdated
var caml_create_rust_empty_vector = function () { | ||
// If this is correct, it should be equivalent than calling | ||
// js_class_vector_to_rust_vector with an empty js array | ||
return new joo_global_object.Uint32Array(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this comment, IIUC, you want me to remove these two functions? It is equivalent to caml_array_to_rust_vector
with the JS array [0]
(i.e. the empty caml array).
It was the initial version but I thought introducing helpers would be nice. Removed here.
kimchi/js/bindings.js
Outdated
// ...] is | ||
// represented as a JavaScript array [0, v1, v2, ...] where [0] is the runtime | ||
// tag | ||
return caml_array.length === 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #79 (comment)
kimchi/js/bindings.js
Outdated
@@ -1219,6 +1235,46 @@ var caml_fq_plonk_gate_to_rust = function (gate) { | |||
); | |||
}; | |||
|
|||
// Provides: caml_fp_lookup_table_to_rust | |||
// Requires: plonk_wasm, caml_fp_vector_of_rust | |||
var caml_fp_lookup_table_to_rust = function (caml_lookup_table, mk_class) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused, delete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 96ba0ae. However, it was there because this PR is built on top of others, which introduce it. Will add it back later.
kimchi/js/bindings.js
Outdated
|
||
// Provides: caml_fq_lookup_table_to_rust | ||
// Requires: plonk_wasm, caml_fq_vector_to_rust | ||
var caml_fq_lookup_table_to_rust = function (caml_lookup_table, mk_class) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused, delete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #79 (comment)
kimchi/js/bindings.js
Outdated
@@ -2129,6 +2251,22 @@ var caml_pasta_fp_proof_of_rust = function (x) { | |||
return [0, messages, proof, evals, ft_eval1, public_, prev_challenges]; | |||
}; | |||
|
|||
// Provides: caml_fp_runtime_table_to_rust | |||
// Requires: plonk_wasm, caml_fp_vector_to_rust | |||
var caml_fp_runtime_table_to_rust = function (caml_runtime_table, mk_class) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused, delete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for lookup tables, removed in 6070f67
kimchi/js/bindings.js
Outdated
@@ -2367,6 +2505,22 @@ var caml_pasta_fq_proof_of_rust = function (x) { | |||
return [0, messages, proof, evals, ft_eval1, public_, prev_challenges]; | |||
}; | |||
|
|||
// Provides: caml_fq_runtime_table_to_rust | |||
// Requires: plonk_wasm, caml_fq_vector_to_rust | |||
var caml_fq_runtime_table_to_rust = function (caml_runtime_table, mk_class) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused, delete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #79 (comment)
kimchi/js/bindings.js
Outdated
@@ -46,6 +46,22 @@ var caml_bigint_256_of_decimal_string = function (s) { | |||
); | |||
}; | |||
|
|||
// Provides: caml_create_rust_empty_vector | |||
var caml_create_rust_empty_vector = function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name is misleading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #79 (comment)
Will be reintroduced later
Will be reintroduced later
It is equivalent to caml_array_to_rust_vector with an empty array
See MinaProtocol/mina#13549 for more explanation.
Related to o1-labs/o1js#1020.
Built on top of #78
Also did:
The result of
npm run bindings
has been commited in the latest commit.