-
Notifications
You must be signed in to change notification settings - Fork 33
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
Tachyon integration spike #143
Comments
Hey, |
Thank you @Meyanis95 ! bazel build --config ios_arm64 //... It might be able to build in bazel's app The question is that it sometimes show the error and difficult to know how to fix ✗ CARGO_BAZEL_REPIN=true bazel build --ios_multi_cpus=arm64 --platforms=//:ios_arm64 //Cpp:prover_main --verbose_failures --sandbox_debug
INFO: Analyzed target //Cpp:prover_main (1 packages loaded, 99 targets configured).
ERROR: /private/var/tmp/_bazel_zhengyawen/fe4a1850bfded67e7176592107efb57e/external/kroma_network_tachyon/tachyon/math/elliptic_curves/bn/bn254/BUILD.bazel:150:19: Action external/kroma_network_tachyon/tachyon/math/elliptic_curves/bn/bn254/g2.h failed: (Killed): generator failed: error executing Action command (from target @@kroma_network_tachyon//tachyon/math/elliptic_curves/bn/bn254:g2_gen_hdr)
(cd /private/var/tmp/_bazel_zhengyawen/fe4a1850bfded67e7176592107efb57e/execroot/_main && \
exec env - \
bazel-out/ios_arm64-opt/bin/external/kroma_network_tachyon/tachyon/math/elliptic_curves/short_weierstrass/generator/generator '--out=bazel-out/ios_arm64-opt/bin/external/kroma_network_tachyon/tachyon/math/elliptic_curves/bn/bn254/g2.h' '--namespace=tachyon::math::bn254' '--base_field=Fq2' '--base_field_degree=2' '--base_field_hdr=tachyon/math/elliptic_curves/bn/bn254/fq2.h' '--scalar_field=Fr' '--scalar_field_hdr=tachyon/math/elliptic_curves/bn/bn254/fr.h' '--cpu_hdr_tpl_path=external/kroma_network_tachyon/tachyon/math/elliptic_curves/short_weierstrass/generator/cpu.h.tpl' '--gpu_hdr_tpl_path=external/kroma_network_tachyon/tachyon/math/elliptic_curves/short_weierstrass/generator/gpu.h.tpl' '--class=G2' '-a=0' '-a=0' '-b=19485874751759354771024239261021720505790618469301721065564631296452457478373' '-b=266929791119991161246907387137283842545076965332900288569378510910307636690' '-x=10857046999023057135944570762232829481370756359578518086990519993285655852781' '-x=11559732032986387107991004021392285783925812861821192530917403151452391805634' '-y=8495653923123431417604973247489272438418190587263600148770280649306958101930' '-y=4082367875863433681332203403145435568316851327593401208105741076214120093531' '--endomorphism_coefficient=21888242871839275220042445260109153167277707414472061641714758635765020556616' '--endomorphism_coefficient=0' '--lambda=4407920970296243842393367215006156084916469457145843978461' '--glv_coefficients=-147946756881789319010696353538189108491' '--glv_coefficients=-9931322734385697763' '--glv_coefficients=9931322734385697763' '--glv_coefficients=-147946756881789319000765030803803410728')
# Configuration: bf3972a02adbb15cade8f58d8a6135b2970c25f65eaf2dd7f94d39c7355f3c11
# Execution platform: @@local_config_platform//:host
Target //Cpp:prover_main failed to build I also suggest that you join their telegram group |
@Meyanis95 bazel build --config ios_arm64 //tachyon/math/finite_field:finite_field it could sometimes give more useful messages. |
Sounds good! |
Problem
For Groth16, we currently rely on wasm3 for witness generation and circom-compat for proof generation. There's circom-witness-rs which seems promising and would be roughly comparable with rapidsnark+witnesscalc.
Recently a new library has emerged, Tachyon, https://github.com/kroma-network/tachyon which seems promising and could lead to further performance gains. It seems useful to experimentally integrate this.
Currently it doesn't support mobile (Android or iOS), so this is the first step.
Details
See https://docs.google.com/spreadsheets/d/1irKg_TOP-yXms8igwCN_3OjVrtFe5gTHkuF0RbrVuho/edit#gid=289866675 for benchmarks @vivianjeng has done on MacOS.
First step here is to get Tachyon to work on iOS, which requires getting libgmpxx (libgmp for C++) and some other things to work. This is quite gnarly.
@vivianjeng has done a bunch of work to get this to compile and added to the https://github.com/zkmopro/benchmark benchmark app but not quite there.
See:
Acceptance criteria
Tachyon running on mobile real device with iOS.
Next steps
Once this is working, we want to integrate it with mopro. This would be better as a separate issue but here's a sketch of what it would likely involve:
(The same logic would apply to rapidsnark+witnesscalc).
The text was updated successfully, but these errors were encountered: