Skip to content

Commit c53b209

Browse files
authored
Merge pull request #18074 from MinaProtocol/leon/native/napi/cleanup
chore: native/napi trunk cleanup
2 parents 6ea5599 + e7e7bd2 commit c53b209

File tree

7 files changed

+18
-13
lines changed

7 files changed

+18
-13
lines changed

src/lib/crypto/kimchi_bindings/js/native/header-d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,13 @@
55
// external pointer types.
66

77
type WasmPastaFpPlonkIndex = {};
8+
type NapiVector<T> = {};
9+
type NapiGVesta = {};
10+
type NapiGPallas = {};
11+
type NapiPastaFpPlonkIndex = {};
12+
type NapiPastaFqPlonkIndex = {};
13+
type NapiLookupInfo = {};
14+
type NapiPastaFp = {};
15+
type NapiPastaFq = {};
816

917
// Header section end

src/lib/crypto/kimchi_bindings/js/native/native-overrides/prover-index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ var caml_pasta_fp_plonk_index_write = function (append, t, path) {
198198
};
199199

200200
// Provides: caml_pasta_fq_plonk_index_create
201-
// Requires: plonk_wasm, free_on_finalize, tsRustConversion
201+
// Requires: plonk_wasm, free_on_finalize, tsRustConversionNative
202202
var caml_pasta_fq_plonk_index_create = function (
203203
gates,
204204
public_inputs,

src/lib/crypto/kimchi_bindings/js/native/native-overrides/srs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ var caml_fq_srs_b_poly_commitment = function (srs, chals) {
177177
};
178178

179179
// Provides: caml_fq_srs_batch_accumulator_check
180-
// Requires: plonk_wasm, tsRustConversion
180+
// Requires: plonk_wasm, tsRustConversionNative
181181
var caml_fq_srs_batch_accumulator_check = function (srs, comms, chals) {
182182
console.log("native caml_fq_srs_batch_accumulator_check");
183183
var rust_comms = tsRustConversionNative.fq.pointsToRust(comms);

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ var plonk_wasm = (function() {
1717
"prover_index_fq_to_bytes",
1818
"caml_pasta_fp_poseidon_block_cipher",
1919
"caml_pasta_fq_poseidon_block_cipher",
20-
"caml_pasta_fp_plonk_proof_create",
2120
"caml_pasta_fp_plonk_verifier_index_shifts",
2221
"caml_pasta_fq_plonk_verifier_index_shifts",
2322
"WasmFpPolyComm",
@@ -98,9 +97,7 @@ var plonk_wasm = (function() {
9897
wasm.native = true;
9998
} catch (e) {
10099
if (process.env.O1JS_REQUIRE_NATIVE_BINDINGS) {
101-
console.error(e)
102-
console.log("native didn't load")
103-
process.exit(1);
100+
throw e
104101
}
105102
}
106103
return wasm

src/lib/crypto/kimchi_bindings/stubs/kimchi_bindings.ml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,7 @@ module Protocol = struct
215215
-> SRS.Fp.t
216216
-> bool
217217
-> t
218-
= "caml_pasta_fp_plonk_index_create_bytecode"
219-
"caml_pasta_fp_plonk_index_create"
218+
= "caml_pasta_fp_plonk_index_create_bytecode" "caml_pasta_fp_plonk_index_create"
220219

221220
external max_degree : t -> int = "caml_pasta_fp_plonk_index_max_degree"
222221

@@ -251,8 +250,7 @@ module Protocol = struct
251250
-> SRS.Fq.t
252251
-> bool
253252
-> t
254-
= "caml_pasta_fq_plonk_index_create_bytecode"
255-
"caml_pasta_fq_plonk_index_create"
253+
= "caml_pasta_fq_plonk_index_create_bytecode" "caml_pasta_fq_plonk_index_create"
256254

257255
external max_degree : t -> int = "caml_pasta_fq_plonk_index_max_degree"
258256

src/lib/pickles/plonk_checks/scalars.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2831,7 +2831,8 @@ module Tick : S = struct
28312831
+ if_feature
28322832
( LookupPattern RangeCheck
28332833
, (fun () ->
2834-
cell (var (LookupKindIndex RangeCheck, Curr)) )
2834+
cell (var (LookupKindIndex RangeCheck, Curr))
2835+
)
28352836
, fun () ->
28362837
field
28372838
"0x0000000000000000000000000000000000000000000000000000000000000000"
@@ -2841,7 +2842,8 @@ module Tick : S = struct
28412842
, (fun () ->
28422843
cell
28432844
(var
2844-
(LookupKindIndex ForeignFieldMul, Curr) ) )
2845+
(LookupKindIndex ForeignFieldMul, Curr) )
2846+
)
28452847
, fun () ->
28462848
field
28472849
"0x0000000000000000000000000000000000000000000000000000000000000000"

0 commit comments

Comments
 (0)