DotRing: Milestone 1 Delivery#8
DotRing: Milestone 1 Delivery#8prasad-kumkar wants to merge 3 commits intoPolkadotOpenSourceGrants:masterfrom
Conversation
|
@prasad-kumkar Thanks for the milestone delivery. Please take a look at the evaluation document and provide proper improvements and fixes. Some curves/modules need test coverage improvements. Let me know when I can evaluate this milestone again. |
|
@ditavia-br Thanks for the review and suggestions! We’ll work on the improvements and test coverage updates, and let you know once everything is ready for reevaluation. |
@ditavia-br Ready for evaluation |
|
@konasiva7 Thanks for the improvements and fixes. Some files still have low coverage, please take a look at the evaluation document and either improve them or explain why this is the case. I’ll kindly ask @drskalman and @davxy, who reviewed the application, to take a look and share their opinions. Let me know when I can review it again. |
|
@ditavia-br Thanks for the suggestions! please take a look at the updates below:
Ready for review |
|
@konasiva7 Thanks for the improvements. From my side, the delivery looks good, but let’s wait for the review from @drskalman and @davxy. I’ll ask to have them added as reviewers on the PR, since I don’t have permission to do it myself. |
|
Hello there, could you please add a test to deserialize this proof and verify it? also if you could write a test which serialize the proof generated by DotRing, I could test it in rust implementation. Thank you. |
|
pinging @prasad-kumkar & @konasiva7 |
|
I'm on it @semuelle ; apologies for the delay, have been focused on optimization and had a restructuring underway |
|
Hello @drskalman, may i know the structure of |
|
Sharing DotRing generated vectors here: https://github.com/Chainscore/dot-ring/tree/main/tests/vectors/dot-ring @drskalman |
@drskalman would be great to have this ^ Also wanted to share that we have been working on performance optimisation, and with significant improvements we have added our benchmarks, which are comparable with ark-vrf bench. We also submitted our Milestone 2 with release of the library |
|
ping @drskalman |
Yeah. It is the point and the commitment to the fixed_columns: https://github.com/w3f/ring-proof/blob/skalman--export-json-proof/w3f-ring-proof/src/piop/mod.rs#L184 It is where it gets serialized: |
|
ping @prasad-kumkar |
|
@drskalman we were unable to verify, but we noticed the export file uses random srs params (I couldn't follow if they're deterministic?) - https://github.com/w3f/ring-proof/blob/b165b1d2a2ecf95cb88212033c4451775fbb509d/w3f-ring-proof/examples/export_sample_ring_proof.rs#L94-L96 However, we have successfully verified the test vectors generated by ark-vrf, which does inherit Would it be acceptable for this milestone? |
|
ping @drskalman |
|
@prasad-kumkar I spoke with @drskalman and he explained me that the verification key, which is part of srs that is needed for verification, is given. So, it should be possible to verify. The code should be able work with srs different than Zcash ones. Can you elaborate on that? I asked an AI to evaluate the code and suggest the changes. Here is the answer: Right now the ring‑proof KZG SRS is hard‑wired to the bundled Zcash file (dot_ring/vrf/data/bls12-381-srs-2-11-uncompressed-zcash.bin) and used directly by KZG.default() → SRS.from_loaded() → g1_points/g2_points. So verification only works if proofs were generated from that same SRS. If you want to support a non‑Zcash SRS, you’d need to make the SRS configurable and thread it through ring‑proof creation and verification. A minimal path:
Can you move forward to implement this way? |
|
@ditavia-br you are right! It does include the the SRS params, I misunderstood it to be the result point - which was infact missing and deterministically randomly generated so I executed the rust export script locally to get those values. At the end we are able to verify the given proof in our implementation. Following is the test script: uv run pytest tests/test_verify_rust_proof.py |
|
@prasad-kumkar Thank you! I'll take a look at the verification. Meanwhile could you generate a proof and export it in the same json format so I can verify it on the rust side? Thanks a lot. |
|
@drskalman definitely! I generated a couple for diff domain sizes: https://github.com/Chainscore/dot-ring/tree/main/tests/vectors/others I also cross-checked the rust implementation with this alongside the export script - https://gist.github.com/prasad-kumkar/600c60e2bccd3b2788ef7dcaaa80650f |
|
@prasad-kumkar Thanks for the changes. I was able to verify the proofs. I’ll wait for @drskalman to double-check before approving this milestone. He mentioned that he will review it in the next few days. In the meantime, do you think any adjustments are needed to have Milestone 2 ready for evaluation? |
|
Amazing, thank you @ditavia-br :) All changes are merged on main branch so both milestones can be evaluated. For context - M2 is mostly performance changes & production release - here are the benchmarking results dotring comparable with ark-vrf. Additionally we have shared PyPi release and documentation for review. |
|
@prasad-kumkar thanks for the information. I'll check that soon. By the way, could you please fix the Dockerfile in this project? We should be able to generate and verify the proofs using docker to have isolation of the code from the local environment. Thanks! |
|
@ditavia-br Dockerfile should be fixed now. We've also added a workflow which tests in a containerised environment as such - https://github.com/Chainscore/dot-ring/actions/runs/21911120890/job/63265025224?pr=26#logs |
|
ping @ditavia-br @drskalman |
Milestone Delivery Checklist
Link to the application pull request: PolkadotOpenSourceGrants/apply#14