Skip to content

Commit 85a0fe2

Browse files
authored
Merge pull request #17993 from MinaProtocol/florian/napi-prover-index
(Native prover) prover index
2 parents 862a8a0 + c67721a commit 85a0fe2

File tree

11 files changed

+329
-413
lines changed

11 files changed

+329
-413
lines changed
Lines changed: 0 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -1,148 +0,0 @@
1-
/* eslint-disable no-unused-vars */
2-
/* global plonk_wasm, caml_string_of_jsstring,
3-
free_on_finalize, tsRustConversion, caml_bytes_of_uint8array
4-
*/
5-
6-
/*
7-
// Provides: caml_pasta_fp_plonk_gate_vector_create
8-
// Requires: plonk_wasm, free_on_finalize
9-
var caml_pasta_fp_plonk_gate_vector_create = function () {
10-
return free_on_finalize(plonk_wasm.caml_pasta_fp_plonk_gate_vector_create());
11-
};
12-
*/
13-
14-
/*
15-
// Provides: caml_pasta_fp_plonk_gate_vector_add
16-
// Requires: plonk_wasm, tsRustConversion
17-
var caml_pasta_fp_plonk_gate_vector_add = function (v, x) {
18-
return plonk_wasm.caml_pasta_fp_plonk_gate_vector_add(
19-
v,
20-
tsRustConversion.fp.gateToRust(x)
21-
);
22-
};
23-
*/
24-
25-
/*
26-
// Provides: caml_pasta_fp_plonk_gate_vector_get
27-
// Requires: plonk_wasm, tsRustConversion
28-
var caml_pasta_fp_plonk_gate_vector_get = function (v, i) {
29-
return tsRustConversion.fp.gateFromRust(
30-
plonk_wasm.caml_pasta_fp_plonk_gate_vector_get(v, i)
31-
);
32-
};
33-
*/
34-
35-
/*
36-
// Provides: caml_pasta_fp_plonk_gate_vector_len
37-
// Requires: plonk_wasm
38-
var caml_pasta_fp_plonk_gate_vector_len = function (v) {
39-
return plonk_wasm.caml_pasta_fp_plonk_gate_vector_len(v);
40-
};
41-
*/
42-
43-
/*
44-
// Provides: caml_pasta_fp_plonk_gate_vector_wrap
45-
// Requires: plonk_wasm, tsRustConversion
46-
var caml_pasta_fp_plonk_gate_vector_wrap = function (v, x, y) {
47-
return plonk_wasm.caml_pasta_fp_plonk_gate_vector_wrap(
48-
v,
49-
tsRustConversion.wireToRust(x),
50-
tsRustConversion.wireToRust(y)
51-
);
52-
};
53-
*/
54-
55-
/*
56-
// Provides: caml_pasta_fp_plonk_gate_vector_digest
57-
// Requires: plonk_wasm, caml_bytes_of_uint8array
58-
var caml_pasta_fp_plonk_gate_vector_digest = function (
59-
public_input_size,
60-
gate_vector
61-
) {
62-
var uint8array = plonk_wasm.caml_pasta_fp_plonk_gate_vector_digest(
63-
public_input_size,
64-
gate_vector
65-
);
66-
return caml_bytes_of_uint8array(uint8array);
67-
};
68-
*/
69-
70-
/*
71-
// Provides: caml_pasta_fp_plonk_circuit_serialize
72-
// Requires: plonk_wasm, caml_string_of_jsstring
73-
var caml_pasta_fp_plonk_circuit_serialize = function (
74-
public_input_size,
75-
gate_vector
76-
) {
77-
return caml_string_of_jsstring(
78-
plonk_wasm.caml_pasta_fp_plonk_circuit_serialize(
79-
public_input_size,
80-
gate_vector
81-
)
82-
);
83-
};
84-
*/
85-
86-
/*
87-
// Provides: caml_pasta_fq_plonk_gate_vector_create
88-
// Requires: plonk_wasm, free_on_finalize
89-
var caml_pasta_fq_plonk_gate_vector_create = function () {
90-
return free_on_finalize(plonk_wasm.caml_pasta_fq_plonk_gate_vector_create());
91-
};
92-
*/
93-
94-
/*
95-
// Provides: caml_pasta_fq_plonk_gate_vector_add
96-
// Requires: plonk_wasm, tsRustConversion
97-
var caml_pasta_fq_plonk_gate_vector_add = function (v, x) {
98-
return plonk_wasm.caml_pasta_fq_plonk_gate_vector_add(
99-
v,
100-
tsRustConversion.fq.gateToRust(x)
101-
);
102-
};
103-
*/
104-
105-
/*
106-
// Provides: caml_pasta_fq_plonk_gate_vector_get
107-
// Requires: plonk_wasm, tsRustConversion
108-
var caml_pasta_fq_plonk_gate_vector_get = function (v, i) {
109-
return tsRustConversion.fq.gateFromRust(
110-
plonk_wasm.caml_pasta_fq_plonk_gate_vector_get(v, i)
111-
);
112-
};
113-
*/
114-
115-
/*
116-
// Provides: caml_pasta_fq_plonk_gate_vector_len
117-
// Requires: plonk_wasm
118-
var caml_pasta_fq_plonk_gate_vector_len = function (v) {
119-
return plonk_wasm.caml_pasta_fq_plonk_gate_vector_len(v);
120-
};
121-
*/
122-
123-
/*
124-
// Provides: caml_pasta_fq_plonk_gate_vector_wrap
125-
// Requires: plonk_wasm, tsRustConversion
126-
var caml_pasta_fq_plonk_gate_vector_wrap = function (v, x, y) {
127-
return plonk_wasm.caml_pasta_fq_plonk_gate_vector_wrap(
128-
v,
129-
tsRustConversion.wireToRust(x),
130-
tsRustConversion.wireToRust(y)
131-
);
132-
};
133-
*/
134-
135-
/*
136-
// Provides: caml_pasta_fq_plonk_gate_vector_digest
137-
// Requires: plonk_wasm, caml_bytes_of_uint8array
138-
var caml_pasta_fq_plonk_gate_vector_digest = function (
139-
public_input_size,
140-
gate_vector
141-
) {
142-
var uint8array = plonk_wasm.caml_pasta_fq_plonk_gate_vector_digest(
143-
public_input_size,
144-
gate_vector
145-
);
146-
return caml_bytes_of_uint8array(uint8array);
147-
};
148-
*/
Lines changed: 0 additions & 232 deletions
Original file line numberDiff line numberDiff line change
@@ -1,232 +0,0 @@
1-
/* global plonk_wasm, tsRustConversion, caml_string_of_jsstring,
2-
free_on_finalize, caml_jsstring_of_string
3-
*/
4-
5-
/*
6-
// Provides: caml_pasta_fq_plonk_circuit_serialize
7-
// Requires: plonk_wasm, caml_string_of_jsstring
8-
var caml_pasta_fq_plonk_circuit_serialize = function (
9-
public_input_size,
10-
gate_vector
11-
) {
12-
return caml_string_of_jsstring(
13-
plonk_wasm.caml_pasta_fq_plonk_circuit_serialize(
14-
public_input_size,
15-
gate_vector
16-
)
17-
);
18-
};
19-
*/
20-
21-
// Provides: caml_pasta_fp_plonk_index_create
22-
// Requires: plonk_wasm, free_on_finalize, tsRustConversion
23-
var caml_pasta_fp_plonk_index_create = function (
24-
gates,
25-
public_inputs,
26-
caml_lookup_tables,
27-
caml_runtime_table_cfgs,
28-
prev_challenges,
29-
urs,
30-
lazy_mode
31-
) {
32-
var wasm_lookup_tables =
33-
tsRustConversion.fp.lookupTablesToRust(caml_lookup_tables);
34-
var wasm_runtime_table_cfgs = tsRustConversion.fp.runtimeTableCfgsToRust(
35-
caml_runtime_table_cfgs
36-
);
37-
38-
var t = plonk_wasm.caml_pasta_fp_plonk_index_create(
39-
gates,
40-
public_inputs,
41-
wasm_lookup_tables,
42-
wasm_runtime_table_cfgs,
43-
prev_challenges,
44-
urs,
45-
lazy_mode
46-
);
47-
return free_on_finalize(t);
48-
};
49-
50-
// Provides: caml_pasta_fp_plonk_index_create_bytecode
51-
// Requires: caml_pasta_fp_plonk_index_create
52-
var caml_pasta_fp_plonk_index_create_bytecode = function (
53-
gates,
54-
public_inputs,
55-
caml_lookup_tables,
56-
caml_runtime_table_cfgs,
57-
prev_challenges,
58-
urs,
59-
lazy_mode
60-
) {
61-
return caml_pasta_fp_plonk_index_create(
62-
gates,
63-
public_inputs,
64-
caml_lookup_tables,
65-
caml_runtime_table_cfgs,
66-
prev_challenges,
67-
urs,
68-
lazy_mode
69-
);
70-
};
71-
72-
// Provides: caml_pasta_fp_plonk_index_max_degree
73-
// Requires: plonk_wasm
74-
var caml_pasta_fp_plonk_index_max_degree =
75-
plonk_wasm.caml_pasta_fp_plonk_index_max_degree;
76-
77-
// Provides: caml_pasta_fp_plonk_index_public_inputs
78-
// Requires: plonk_wasm
79-
var caml_pasta_fp_plonk_index_public_inputs =
80-
plonk_wasm.caml_pasta_fp_plonk_index_public_inputs;
81-
82-
// Provides: caml_pasta_fp_plonk_index_domain_d1_size
83-
// Requires: plonk_wasm
84-
var caml_pasta_fp_plonk_index_domain_d1_size =
85-
plonk_wasm.caml_pasta_fp_plonk_index_domain_d1_size;
86-
87-
// Provides: caml_pasta_fp_plonk_index_domain_d4_size
88-
// Requires: plonk_wasm
89-
var caml_pasta_fp_plonk_index_domain_d4_size =
90-
plonk_wasm.caml_pasta_fp_plonk_index_domain_d4_size;
91-
92-
// Provides: caml_pasta_fp_plonk_index_domain_d8_size
93-
// Requires: plonk_wasm
94-
var caml_pasta_fp_plonk_index_domain_d8_size =
95-
plonk_wasm.caml_pasta_fp_plonk_index_domain_d8_size;
96-
97-
// Provides: caml_pasta_fp_plonk_index_read
98-
// Requires: plonk_wasm, caml_jsstring_of_string
99-
var caml_pasta_fp_plonk_index_read = function (offset, urs, path) {
100-
if (offset === 0) {
101-
offset = undefined;
102-
} else {
103-
offset = offset[1];
104-
}
105-
return plonk_wasm.caml_pasta_fp_plonk_index_read(
106-
offset,
107-
urs,
108-
caml_jsstring_of_string(path)
109-
);
110-
};
111-
112-
// Provides: caml_pasta_fp_plonk_index_write
113-
// Requires: plonk_wasm, caml_jsstring_of_string
114-
var caml_pasta_fp_plonk_index_write = function (append, t, path) {
115-
if (append === 0) {
116-
append = undefined;
117-
} else {
118-
append = append[1];
119-
}
120-
return plonk_wasm.caml_pasta_fp_plonk_index_write(
121-
append,
122-
t,
123-
caml_jsstring_of_string(path)
124-
);
125-
};
126-
127-
// Provides: caml_pasta_fq_plonk_index_create
128-
// Requires: plonk_wasm, free_on_finalize, tsRustConversion
129-
var caml_pasta_fq_plonk_index_create = function (
130-
gates,
131-
public_inputs,
132-
caml_lookup_tables,
133-
caml_runtime_table_cfgs,
134-
prev_challenges,
135-
urs,
136-
lazy_mode
137-
) {
138-
var wasm_lookup_tables =
139-
tsRustConversion.fq.lookupTablesToRust(caml_lookup_tables);
140-
var wasm_runtime_table_cfgs = tsRustConversion.fq.runtimeTableCfgsToRust(
141-
caml_runtime_table_cfgs
142-
);
143-
144-
return free_on_finalize(
145-
plonk_wasm.caml_pasta_fq_plonk_index_create(
146-
gates,
147-
public_inputs,
148-
wasm_lookup_tables,
149-
wasm_runtime_table_cfgs,
150-
prev_challenges,
151-
urs,
152-
lazy_mode
153-
)
154-
);
155-
};
156-
157-
// Provides: caml_pasta_fq_plonk_index_create_bytecode
158-
// Requires: caml_pasta_fq_plonk_index_create
159-
var caml_pasta_fq_plonk_index_create_bytecode = function (
160-
gates,
161-
public_inputs,
162-
caml_lookup_tables,
163-
caml_runtime_table_cfgs,
164-
prev_challenges,
165-
urs,
166-
lazy_mode
167-
) {
168-
return caml_pasta_fq_plonk_index_create(
169-
gates,
170-
public_inputs,
171-
caml_lookup_tables,
172-
caml_runtime_table_cfgs,
173-
prev_challenges,
174-
urs,
175-
lazy_mode
176-
);
177-
};
178-
179-
// Provides: caml_pasta_fq_plonk_index_max_degree
180-
// Requires: plonk_wasm
181-
var caml_pasta_fq_plonk_index_max_degree =
182-
plonk_wasm.caml_pasta_fq_plonk_index_max_degree;
183-
184-
// Provides: caml_pasta_fq_plonk_index_public_inputs
185-
// Requires: plonk_wasm
186-
var caml_pasta_fq_plonk_index_public_inputs =
187-
plonk_wasm.caml_pasta_fq_plonk_index_public_inputs;
188-
189-
// Provides: caml_pasta_fq_plonk_index_domain_d1_size
190-
// Requires: plonk_wasm
191-
var caml_pasta_fq_plonk_index_domain_d1_size =
192-
plonk_wasm.caml_pasta_fq_plonk_index_domain_d1_size;
193-
194-
// Provides: caml_pasta_fq_plonk_index_domain_d4_size
195-
// Requires: plonk_wasm
196-
var caml_pasta_fq_plonk_index_domain_d4_size =
197-
plonk_wasm.caml_pasta_fq_plonk_index_domain_d4_size;
198-
199-
// Provides: caml_pasta_fq_plonk_index_domain_d8_size
200-
// Requires: plonk_wasm
201-
var caml_pasta_fq_plonk_index_domain_d8_size =
202-
plonk_wasm.caml_pasta_fq_plonk_index_domain_d8_size;
203-
204-
// Provides: caml_pasta_fq_plonk_index_read
205-
// Requires: plonk_wasm, caml_jsstring_of_string
206-
var caml_pasta_fq_plonk_index_read = function (offset, urs, path) {
207-
if (offset === 0) {
208-
offset = undefined;
209-
} else {
210-
offset = offset[1];
211-
}
212-
return plonk_wasm.caml_pasta_fq_plonk_index_read(
213-
offset,
214-
urs,
215-
caml_jsstring_of_string(path)
216-
);
217-
};
218-
219-
// Provides: caml_pasta_fq_plonk_index_write
220-
// Requires: plonk_wasm, caml_jsstring_of_string
221-
var caml_pasta_fq_plonk_index_write = function (append, t, path) {
222-
if (append === 0) {
223-
append = undefined;
224-
} else {
225-
append = append[1];
226-
}
227-
return plonk_wasm.caml_pasta_fq_plonk_index_write(
228-
append,
229-
t,
230-
caml_jsstring_of_string(path)
231-
);
232-
};

src/lib/crypto/kimchi_bindings/js/dune

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
bindings/util.js
1616
bindings/srs.js
1717
bindings/verifier-index.js
18-
native/native-overrides/gate-vector.js
1918
native/native-overrides/oracles.js
2019
native/native-overrides/util.js
21-
native/native-overrides/circuit.js))
20+
native/native-overrides/circuit.js
21+
native/native-overrides/prover-index.js
22+
native/native-overrides/gate-vector.js))
2223
(instrumentation
2324
(backend bisect_ppx))
2425
(preprocess

0 commit comments

Comments
 (0)