Skip to content

Commit 2686bf1

Browse files
committed
jsoo: remove proof conversions
1 parent 940cf31 commit 2686bf1

File tree

1 file changed

+6
-6
lines changed
  • src/lib/crypto/kimchi_bindings/js/native/native-overrides

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ var caml_pasta_fp_plonk_proof_create = function (
2020
var wasm_runtime_tables =
2121
tsRustConversionNative.fp.runtimeTablesToRust(caml_runtime_tables);
2222
prev_sgs = tsRustConversionNative.fp.pointsToRust(prev_sgs);
23-
var proof = plonk_wasm.caml_pasta_fp_plonk_proof_create(
23+
// Because proof is an external object, it does not need conversion
24+
return plonk_wasm.caml_pasta_fp_plonk_proof_create(
2425
index,
2526
witness_cols,
2627
wasm_runtime_tables,
2728
prev_challenges,
2829
prev_sgs
2930
);
30-
return tsRustConversionNative.fp.proofFromRust(proof);
3131
};
3232

3333
// Provides: caml_pasta_fp_plonk_proof_verify
3434
// Requires: plonk_wasm, tsRustConversionNative
3535
var caml_pasta_fp_plonk_proof_verify = function (index, proof) {
3636
index = tsRustConversionNative.fp.verifierIndexToRust(index);
37-
proof = tsRustConversionNative.fp.proofToRust(proof);
37+
// Because proof is an external object, it does not need conversion
3838
return plonk_wasm.caml_pasta_fp_plonk_proof_verify(index, proof);
3939
};
4040

@@ -58,20 +58,20 @@ var caml_pasta_fq_plonk_proof_create = function (
5858
var wasm_runtime_tables =
5959
tsRustConversionNative.fq.runtimeTablesToRust(caml_runtime_tables);
6060
prev_sgs = tsRustConversionNative.fq.pointsToRust(prev_sgs);
61-
var proof = plonk_wasm.caml_pasta_fq_plonk_proof_create(
61+
// Because proof is an external object, it does not need conversion
62+
return plonk_wasm.caml_pasta_fq_plonk_proof_create(
6263
index,
6364
witness_cols,
6465
wasm_runtime_tables,
6566
prev_challenges,
6667
prev_sgs
6768
);
68-
return tsRustConversionNative.fq.proofFromRust(proof);
6969
};
7070

7171
// Provides: caml_pasta_fq_plonk_proof_verify
7272
// Requires: plonk_wasm, tsRustConversionNative
7373
var caml_pasta_fq_plonk_proof_verify = function (index, proof) {
7474
index = tsRustConversionNative.fq.verifierIndexToRust(index);
75-
proof = tsRustConversionNative.fq.proofToRust(proof);
75+
// Because proof is an external object, it does not need conversion
7676
return plonk_wasm.caml_pasta_fq_plonk_proof_verify(index, proof);
7777
};

0 commit comments

Comments
 (0)