Skip to content
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] Add o1js-stub to Mina repo in place of SnarkyJS #14649

Merged
merged 19 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
82fee60
feat(o1js-stubs): add new dune and o1js_stub.ml files for js_of_ocaml…
MartinMinkov Oct 29, 2023
9a9ba0a
feat(kimchi): add kimchi lib from o1js-bindings
MartinMinkov Nov 13, 2023
da15dfe
refactor(nix): remove snarky_js and update paths for kimchi and plonk…
MartinMinkov Nov 13, 2023
288f56e
feat(dune-project): add bindings_js package to support JavaScript bin…
MartinMinkov Nov 14, 2023
de06395
remove(SnarkyJSTest.dhall): delete SnarkyJSTest.dhall file as it's no…
MartinMinkov Nov 30, 2023
36b82f4
feat(buildkite/scripts): remove test-snarkyjs-bindings-minimal.sh and…
MartinMinkov Nov 30, 2023
c935d72
chore: remove redundant SnarkyJS build scripts
MartinMinkov Nov 30, 2023
c8e9d66
refactor(Makefile): remove snarkyjs and snarkyjs_no_types build targe…
MartinMinkov Nov 30, 2023
9d6e14f
chore(CODEOWNERS): remove snarkyjs directory from product-eng-reviewe…
MartinMinkov Nov 30, 2023
9f0e6d1
feat(kimchi): use develop version instead of copied main versions
MartinMinkov Nov 30, 2023
14b1130
Update kimchi library with latest develop changes
MartinMinkov Dec 11, 2023
ba1d03e
Merge branch 'develop' into feat/add-o1js-stubs-develop
MartinMinkov Dec 11, 2023
4b2ffbc
fix dune pathing in cargo kimchi wasm
MartinMinkov Dec 11, 2023
4f7c81b
Merge branch 'develop' into feat/add-o1js-stubs-develop
MartinMinkov Dec 13, 2023
4c9d45c
feat: fixup mina to compile as submodule in o1js
MartinMinkov Dec 13, 2023
cf39617
Merge branch 'develop' into feat/add-o1js-stubs-develop
MartinMinkov Dec 19, 2023
9fb4f06
move /kimchi/{wasm,js} to kimchi_bindings
mitschabaude Dec 19, 2023
a681b13
add back newline
mitschabaude Dec 19, 2023
d22d685
fix(rust.nix): update regex pattern to match kimchi_bindings instead …
MartinMinkov Dec 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions src/lib/crypto/kimchi/js/bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ var tsBindings = globalThis.__snarkyTsBindings;
// Requires: tsBindings, plonk_wasm
var tsRustConversion = tsBindings.rustConversion(plonk_wasm);

// Provides: tsSrs
// Requires: plonk_wasm
var tsSrs = tsBindings.srs(plonk_wasm);

// Provides: getTsBindings
// Requires: tsBindings
function getTsBindings() {
Expand Down Expand Up @@ -92,8 +88,10 @@ var free_on_finalize = function (x) {
// srs

// Provides: caml_fp_srs_create
// Requires: tsSrs
var caml_fp_srs_create = tsSrs.fp.create;
// Requires: plonk_wasm, free_on_finalize
var caml_fp_srs_create = function (i) {
return free_on_finalize(plonk_wasm.caml_fp_srs_create(i));
};

// Provides: caml_fp_srs_write
// Requires: plonk_wasm, caml_jsstring_of_string
Expand Down Expand Up @@ -123,8 +121,11 @@ var caml_fp_srs_read = function (offset, path) {
};

// Provides: caml_fp_srs_lagrange_commitment
// Requires: tsSrs
var caml_fp_srs_lagrange_commitment = tsSrs.fp.lagrangeCommitment;
// Requires: plonk_wasm, tsRustConversion
var caml_fp_srs_lagrange_commitment = function (t, domain_size, i) {
var res = plonk_wasm.caml_fp_srs_lagrange_commitment(t, domain_size, i);
return tsRustConversion.fp.polyCommFromRust(res);
};

// Provides: caml_fp_srs_commit_evaluations
// Requires: plonk_wasm, tsRustConversion
Expand Down Expand Up @@ -178,13 +179,11 @@ var caml_fp_srs_h = function (t) {
return tsRustConversion.fp.pointFromRust(plonk_wasm.caml_fp_srs_h(t));
};

// Provides: caml_fp_srs_add_lagrange_basis
// Requires: tsSrs
var caml_fp_srs_add_lagrange_basis = tsSrs.fp.addLagrangeBasis;

// Provides: caml_fq_srs_create
// Requires: tsSrs
var caml_fq_srs_create = tsSrs.fq.create;
// Requires: plonk_wasm, free_on_finalize
var caml_fq_srs_create = function (i) {
return free_on_finalize(plonk_wasm.caml_fq_srs_create(i));
};

// Provides: caml_fq_srs_write
// Requires: plonk_wasm, caml_jsstring_of_string
Expand Down Expand Up @@ -214,8 +213,11 @@ var caml_fq_srs_read = function (offset, path) {
};

// Provides: caml_fq_srs_lagrange_commitment
// Requires: tsSrs
var caml_fq_srs_lagrange_commitment = tsSrs.fq.lagrangeCommitment;
// Requires: plonk_wasm, tsRustConversion
var caml_fq_srs_lagrange_commitment = function (t, domain_size, i) {
var res = plonk_wasm.caml_fq_srs_lagrange_commitment(t, domain_size, i);
return tsRustConversion.fq.polyCommFromRust(res);
};

// Provides: caml_fq_srs_commit_evaluations
// Requires: plonk_wasm, tsRustConversion
Expand Down Expand Up @@ -270,8 +272,10 @@ var caml_fq_srs_h = function (t) {
};

// Provides: caml_fq_srs_add_lagrange_basis
// Requires: tsSrs
var caml_fq_srs_add_lagrange_basis = tsSrs.fq.addLagrangeBasis;
// Requires: plonk_wasm
function caml_fq_srs_add_lagrange_basis(srs, log2_size) {
return plonk_wasm.caml_fq_srs_add_lagrange_basis(srs, log2_size);
}

// gate vector

Expand Down
1 change: 0 additions & 1 deletion src/lib/crypto/kimchi/js/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(library
(name bindings_js)
(public_name bindings_js)
(js_of_ocaml
(javascript_files
bindings.js
Expand Down
84 changes: 0 additions & 84 deletions src/lib/crypto/kimchi/js/js_backend/bigint256.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/lib/crypto/kimchi/js/js_backend/dune

This file was deleted.

Loading