privacy-scaling-explorations / acceleration-program

Accelerate Early Stage Programmable Cryptography Talents
73 stars 7 forks source link

Proposal: Porting zk-kit Circom circuits to Noir - 1 #47

Open RajeshRk18 opened 2 months ago

RajeshRk18 commented 2 months ago

General Grant Proposal

Overview

This is a project to port circomlib circuits from Circom to Noir for integrating with zk-kit circuit repo for Noir. The circuits are;

Project Details

Team :busts_in_silhouette:

Team

Team Website

N/A

Team's experience

Team Code Repos

Development Roadmap :nut_and_bolt:

Overview

Milestone 1: Port circuits

Milestone 2: Add tests

Milestone 3: Optimize constraints

Deliverables and Specifications

0a. Codebase (Milestone 1+Milestone 2+Milestone 3, mostly Milestone 1)

Will have noir circuits for Baby-JubJub Curve, and Eddsa poseidon.

0b. Documentation (Milestone 1+Milestone 2+Milestone 3)

I will provide inline documentation of the circuits.

0c. Testing Guide (Milestone 2)

The circuits will come with lots of unit tests and integration tests(wherever possible).

0d. Benchmarks (MIlestone 3)

I will try to add the number of constraints for each circuit.

NOOMA-42 commented 2 months ago

Thanks for submission, I'll get the task detail out asap. A potential reviewer is currently ooo til 25th, please kindly wait till he come back

RajeshRk18 commented 2 months ago

@NOOMA-42 when it will be reviewed?

NOOMA-42 commented 2 months ago

@NOOMA-42 when it will be reviewed?

We'll try to fill out the task detail this week and start to review. Thanks for your patience

NOOMA-42 commented 2 months ago

@RajeshRk18 I've updated the task detail. the scope of first part covers eddsa-poseidon, baby-jubjub, and utils. Would you like to modify the proposal based on this? We'll also have 2 more tasks covering the rest of the zk-kit circuit

RajeshRk18 commented 2 months ago

@RajeshRk18 I've updated the task detail. the scope of first part covers eddsa-poseidon, baby-jubjub, and utils. Would you like to modify the proposal based on this? We'll also have 2 more tasks covering the rest of the zk-kit circuit

Ok, I'll adjust. Shall I also apply for the other 2 proposals?

NOOMA-42 commented 2 months ago

I'd said let's focus on this one first. Let me know when you've modified the proposal

@RajeshRk18 I've updated the task detail. the scope of first part covers eddsa-poseidon, baby-jubjub, and utils. Would you like to modify the proposal based on this? We'll also have 2 more tasks covering the rest of the zk-kit circuit

Ok, I'll adjust. Shall I also apply for the other 2 proposals?

RajeshRk18 commented 2 months ago

Hey @NOOMA-42 , I have updated the proposal.

NOOMA-42 commented 2 months ago

Thank you! @aguzmant103 is looking for a grant liaison to review this proposal.

Hey @NOOMA-42 , I have updated the proposal.

NOOMA-42 commented 1 month ago

@cedoor would review this proposal

cedoor commented 1 month ago

@NOOMA-42 would it be possible to update the description of this proposal?

EdDSA proof is actually just built on top of the Circomlib circuits (Baby Jubjub and Poseidon). We're also moving it to the Semaphore repo as it's actually quite specific (i.e. it's the Semaphore Identity schema). I don't think they should be included here.

"Baby-JubJub curve" and "EdDSA Poseidon" look fine, but their Circom implementation is not part of ZK-Kit, they're part of the Circomlib repo. The amount of time to build them in Noir defined in this proposal seems fine to me, depending on the dev's experience ofc.

Also, I'd suggest to anyone working on these circuits that they work on them in a personal repo, and then integrate them into zk-kit, which will soon provide a separate repo for Noir circuits only (zk-kit.noir).

RajeshRk18 commented 1 month ago

@NOOMA-42 would it be possible to update the description of this proposal?

EdDSA proof is actually just built on top of the Circomlib circuits (Baby Jubjub and Poseidon). We're also moving it to the Semaphore repo as it's actually quite specific (i.e. it's the Semaphore Identity schema). I don't think they should be included here.

Yeah, I thought of that. So, maybe porting zk-kit circuits will imply porting the circuits it builds on.

RajeshRk18 commented 1 month ago

"Baby-JubJub curve" and "EdDSA Poseidon" look fine, but their Circom implementation is not part of ZK-Kit, they're part of the Circomlib repo. The amount of time to build them in Noir defined in this proposal seems fine to me, depending on the dev's experience ofc.

Yeah, I can make it within the deadline!

RajeshRk18 commented 1 month ago

Also, I'd suggest to anyone working on these circuits that they work on them in a personal repo, and then integrate them into zk-kit, which will soon provide a separate repo for Noir circuits only (zk-kit.noir).

Sure

NOOMA-42 commented 1 month ago

@cedoor I've updated it, @RajeshRk18 do you have anything you want to update?

RajeshRk18 commented 1 month ago

@cedoor I've updated it, @RajeshRk18 do you have anything you want to update?

Yeah I'll do that

RajeshRk18 commented 1 month ago

@NOOMA-42 I have updated the proposal!

NOOMA-42 commented 1 month ago

LGTM @cedoor do you want to review again?

RajeshRk18 commented 1 month ago

@NOOMA-42 where to discuss the budget?

NOOMA-42 commented 1 month ago

There will be a separate call after we finish the content wise review

@NOOMA-42 where to discuss the budget?

cedoor commented 1 month ago

LGTM @cedoor do you want to review again?

Hey sorry for my late reply. I've reviewed it again and looked into it. The Noir team's already implemented these circuits:

What can be done in this proposal is to optimize them and make them more efficient, taking advantage of recursion perhaps, which should be the Noir's superpower. I would also add this idea to the proposal: https://aztecnetwork.notion.site/f06968995c124de1be359459775ca2cb?v=613d3cb893dd46899a5bd3793b01e63b, which is closely related to Baby Jubjub and another PSE project: https://github.com/cursive-team/babyjubjub-ecdsa.

Please let me know if this makes sense for you @NOOMA-42 @RajeshRk18 . It seems proportionate to the amount of work defined in this proposal to me.

RajeshRk18 commented 1 month ago

LGTM @cedoor do you want to review again?

Hey sorry for my late reply. I've reviewed it again and looked into it. The Noir team's already implemented these circuits:

What can be done in this proposal is to optimize them and make them more efficient, taking advantage of recursion perhaps, which should be the Noir's superpower. I would also add this idea to the proposal: https://aztecnetwork.notion.site/f06968995c124de1be359459775ca2cb?v=613d3cb893dd46899a5bd3793b01e63b, which is closely related to Baby Jubjub and another PSE project: https://github.com/cursive-team/babyjubjub-ecdsa.

Please let me know if this makes sense for you @NOOMA-42 @RajeshRk18 . It seems proportionate to the amount of work defined in this proposal to me.

Looks good to me! Here is my rough proposal idea: