LBruyne / Scalable-Collaborative-zkSNARK

Proof-of-concept implementation of scalable collaborative zk-SNARKs with fully distributed proof generation.
https://eprint.iacr.org/2024/940
MIT License
36 stars 2 forks source link

Inquiry about running tests for the dsumcheck crate #1

Closed LorenzoTomaz closed 4 months ago

LorenzoTomaz commented 4 months ago

Hey, I'm inspired by your paper, and after reading it I started playing with the code. I've found out that after no dsum commit the tests dsumcheck::tests::dsumcheck_test and _dsumcheck::tests::dsumcheck_product_test_ are failing, returning this:

assertion failed: res0.windows(2).all(|w| w[0] == w[1])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- dsumcheck::tests::dsumcheck_product_test stdout ----
thread 'dsumcheck::tests::dsumcheck_product_test' panicked at dist-primitive/src/dsumcheck.rs:820:17:
assertion failed: res0.windows(2).all(|w| w[0] == w[1])

If I replace the dsumcheck code with its previous version then it works, and all tests pass. Do the new changes improve the codebase somehow or does it fix previous bugs in the dsumcheck crate? Can I use the old code and assume that it fulfills the dsumcheck protocol outlined in your paper?

I work as a machine learning engineer and Zk developer at AE Studio and I think your work can have an enormous impact on the verifiable computing industry. I would gladly work as a contributor if you guys plan to implement an open-source production-ready version of your protocol suited for dealing with ML models. Thanks!

LBruyne commented 4 months ago

Hey, I'm inspired by your paper, and after reading it I started playing with the code. I've found out that after no dsum commit the tests dsumcheck::tests::dsumcheck_test and _dsumcheck::tests::dsumcheck_product_test_ are failing, returning this:

assertion failed: res0.windows(2).all(|w| w[0] == w[1])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- dsumcheck::tests::dsumcheck_product_test stdout ----
thread 'dsumcheck::tests::dsumcheck_product_test' panicked at dist-primitive/src/dsumcheck.rs:820:17:
assertion failed: res0.windows(2).all(|w| w[0] == w[1])

If I replace the dsumcheck code with its previous version then it works, and all tests pass. Do the new changes improve the codebase somehow or does it fix previous bugs in the dsumcheck crate? Can I use the old code and assume that it fulfills the dsumcheck protocol outlined in your paper?

I work as a machine learning engineer and Zk developer at AE Studio and I think your work can have an enormous impact on the verifiable computing industry. I would gladly work as a contributor if you guys plan to implement an open-source production-ready version of your protocol suited for dealing with ML models. Thanks!

Hello Tomaz, thanks for your attention on this work. The code you test is decades ago and we are doing new improvements and experiments right now. Please take a look at the branch ''no-permutation'' and test the sumcheck product example at this moment. A commands like cargo run -F leader --release --example sumcheck -- --l 4 --n 20 can help, which will enable the leader feature and simulate the work you are focusing on. If you are fimiliar with Rust, you can explore more features as you wish, which will be concluded and published in the next month. As for the collaboration, we are pleased to work with the community. This codebase is still under implementation now. After it is done, any production or intergration can be done immediately. If you are interested, we can have further communication (See my contact details). Thanks again for your attention.

LorenzoTomaz commented 4 months ago

Hi @LBruyne, Awesome! It's working now! I will get in touch, thanks! Closing the issue since I got your feedback, thanks again!