Skip to content

Commit 86ebdf0

Browse files
authored
Merge pull request #18038 from MinaProtocol/florian/verifier-index-napi
(native prover) verifier index
2 parents 6a807db + f7c9778 commit 86ebdf0

File tree

4 files changed

+34
-16
lines changed

4 files changed

+34
-16
lines changed

src/lib/crypto/kimchi_bindings/js/bindings/verifier-index.js

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,16 @@ var caml_opt_to_rust = function (caml_optional_value, to_rust) {
2424
// Provides: caml_pasta_fp_plonk_verifier_index_create
2525
// Requires: plonk_wasm, tsRustConversion
2626
var caml_pasta_fp_plonk_verifier_index_create = function (x) {
27+
console.log("caml_pasta_fp_plonk_verifier_index_create")
2728
var vk = plonk_wasm.caml_pasta_fp_plonk_verifier_index_create(x);
2829
return tsRustConversion.fp.verifierIndexFromRust(vk);
2930
};
3031

3132
// Provides: caml_pasta_fp_plonk_verifier_index_read
3233
// Requires: plonk_wasm, caml_jsstring_of_string, tsRustConversion
3334
var caml_pasta_fp_plonk_verifier_index_read = function (offset, urs, path) {
35+
console.log("caml_pasta_fp_plonk_verifier_index_read")
36+
3437
if (offset === 0) {
3538
offset = undefined;
3639
} else {
@@ -48,6 +51,8 @@ var caml_pasta_fp_plonk_verifier_index_read = function (offset, urs, path) {
4851
// Provides: caml_pasta_fp_plonk_verifier_index_write
4952
// Requires: plonk_wasm, caml_jsstring_of_string, tsRustConversion
5053
var caml_pasta_fp_plonk_verifier_index_write = function (append, t, path) {
54+
console.log("caml_pasta_fp_plonk_verifier_index_write")
55+
5156
if (append === 0) {
5257
append = undefined;
5358
} else {
@@ -60,24 +65,20 @@ var caml_pasta_fp_plonk_verifier_index_write = function (append, t, path) {
6065
);
6166
};
6267

63-
// Provides: caml_pasta_fp_plonk_verifier_index_shifts
64-
// Requires: plonk_wasm, tsRustConversion
65-
var caml_pasta_fp_plonk_verifier_index_shifts = function (log2_size) {
66-
return tsRustConversion.fp.shiftsFromRust(
67-
plonk_wasm.caml_pasta_fp_plonk_verifier_index_shifts(log2_size)
68-
);
69-
};
7068

7169
// Provides: caml_pasta_fp_plonk_verifier_index_dummy
7270
// Requires: plonk_wasm, tsRustConversion
7371
var caml_pasta_fp_plonk_verifier_index_dummy = function () {
72+
console.log("caml_pasta_fp_plonk_verifier_index_dummy")
73+
7474
var res = plonk_wasm.caml_pasta_fp_plonk_verifier_index_dummy();
7575
return tsRustConversion.fp.verifierIndexFromRust(res);
7676
};
7777

7878
// Provides: caml_pasta_fp_plonk_verifier_index_deep_copy
7979
// Requires: plonk_wasm, tsRustConversion
8080
var caml_pasta_fp_plonk_verifier_index_deep_copy = function (x) {
81+
console.log("caml_pasta_fp_plonk_verifier_index_deep_copy")
8182
return tsRustConversion.fp.verifierIndexFromRust(
8283
plonk_wasm.caml_pasta_fp_plonk_verifier_index_deep_copy(
8384
tsRustConversion.fp.verifierIndexToRust(x)
@@ -88,6 +89,7 @@ var caml_pasta_fp_plonk_verifier_index_deep_copy = function (x) {
8889
// Provides: caml_pasta_fq_plonk_verifier_index_create
8990
// Requires: plonk_wasm, tsRustConversion
9091
var caml_pasta_fq_plonk_verifier_index_create = function (x) {
92+
console.log("caml_pasta_fq_plonk_verifier_index_create")
9193
return tsRustConversion.fq.verifierIndexFromRust(
9294
plonk_wasm.caml_pasta_fq_plonk_verifier_index_create(x)
9395
);
@@ -96,6 +98,7 @@ var caml_pasta_fq_plonk_verifier_index_create = function (x) {
9698
// Provides: caml_pasta_fq_plonk_verifier_index_read
9799
// Requires: plonk_wasm, caml_jsstring_of_string, tsRustConversion
98100
var caml_pasta_fq_plonk_verifier_index_read = function (offset, urs, path) {
101+
console.log("caml_pasta_fq_plonk_verifier_index_read")
99102
if (offset === 0) {
100103
offset = undefined;
101104
} else {
@@ -113,6 +116,7 @@ var caml_pasta_fq_plonk_verifier_index_read = function (offset, urs, path) {
113116
// Provides: caml_pasta_fq_plonk_verifier_index_write
114117
// Requires: plonk_wasm, caml_jsstring_of_string, tsRustConversion
115118
var caml_pasta_fq_plonk_verifier_index_write = function (append, t, path) {
119+
console.log("caml_pasta_fq_plonk_verifier_index_write")
116120
if (append === 0) {
117121
append = undefined;
118122
} else {
@@ -125,17 +129,10 @@ var caml_pasta_fq_plonk_verifier_index_write = function (append, t, path) {
125129
);
126130
};
127131

128-
// Provides: caml_pasta_fq_plonk_verifier_index_shifts
129-
// Requires: plonk_wasm, tsRustConversion
130-
var caml_pasta_fq_plonk_verifier_index_shifts = function (log2_size) {
131-
return tsRustConversion.fq.shiftsFromRust(
132-
plonk_wasm.caml_pasta_fq_plonk_verifier_index_shifts(log2_size)
133-
);
134-
};
135-
136132
// Provides: caml_pasta_fq_plonk_verifier_index_dummy
137133
// Requires: plonk_wasm, tsRustConversion
138134
var caml_pasta_fq_plonk_verifier_index_dummy = function () {
135+
console.log("caml_pasta_fq_plonk_verifier_index_dummy")
139136
return tsRustConversion.fq.verifierIndexFromRust(
140137
plonk_wasm.caml_pasta_fq_plonk_verifier_index_dummy()
141138
);
@@ -144,6 +141,7 @@ var caml_pasta_fq_plonk_verifier_index_dummy = function () {
144141
// Provides: caml_pasta_fq_plonk_verifier_index_deep_copy
145142
// Requires: plonk_wasm, tsRustConversion, tsRustConversion
146143
var caml_pasta_fq_plonk_verifier_index_deep_copy = function (x) {
144+
console.log("caml_pasta_fq_plonk_verifier_index_deep_copy")
147145
return tsRustConversion.fq.verifierIndexFromRust(
148146
plonk_wasm.caml_pasta_fq_plonk_verifier_index_deep_copy(
149147
tsRustConversion.fq.verifierIndexToRust(x)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* global plonk_wasm, tsRustConversionNative */
2+
3+
4+
// Provides: caml_pasta_fq_plonk_verifier_index_shifts
5+
// Requires: plonk_wasm, tsRustConversionNative
6+
var caml_pasta_fq_plonk_verifier_index_shifts = function (log2_size) {
7+
return tsRustConversionNative.fq.shiftsFromRust(
8+
plonk_wasm.caml_pasta_fq_plonk_verifier_index_shifts(log2_size)
9+
);
10+
};
11+
12+
// Provides: caml_pasta_fp_plonk_verifier_index_shifts
13+
// Requires: plonk_wasm, tsRustConversionNative
14+
var caml_pasta_fp_plonk_verifier_index_shifts = function (log2_size) {
15+
return tsRustConversionNative.fp.shiftsFromRust(
16+
plonk_wasm.caml_pasta_fp_plonk_verifier_index_shifts(log2_size)
17+
);
18+
};

src/lib/crypto/kimchi_bindings/js/node_js/node_backend.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ var plonk_wasm = (function() {
1616
"caml_pasta_fp_poseidon_block_cipher",
1717
"caml_pasta_fq_poseidon_block_cipher",
1818
"caml_pasta_fp_plonk_proof_create",
19+
"caml_pasta_fp_plonk_verifier_index_shifts",
20+
"caml_pasta_fq_plonk_verifier_index_shifts",
1921
]
2022

2123
overrides.forEach(function (override) {

0 commit comments

Comments
 (0)