-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: remove build.rs and integrate zkey downloading into utils #11
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
Conversation
- Deleted the `build.rs` file, which previously handled downloading semaphore artifacts. - Introduced a new `download_zkey` function in `utils.rs` to manage zkey downloads. - Updated `proof.rs` to utilize the new `download_zkey` function for fetching zkeys dynamically based on tree depth. - Added a new `witness.rs` file to handle witness dispatching based on tree depth. - Updated `Cargo.toml` to remove `rust-witness` dependency and adjust `circom-prover` to use the latest version from the main branch. - Added multiple witness graph binary files for different depths.
- Added a step to install the `protobuf-compiler` in the GitHub Actions workflow. - Refactored import order in `identity.rs` for consistency. - Adjusted import order in `group.rs` for improved readability.
circom-prover = { git = "https://github.com/zkmopro/mopro.git", branch = "main", features = [ | ||
"circom-witnesscalc", | ||
] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we haven't published this
and circom-witnesscalc
also hasn't been published by iden3
we will ask them to publish one so that we can publish a new circom-prover
1_u16 => { | ||
graph!(semaphore1, "../witness_graph/semaphore-1.bin"); | ||
semaphore1_witness |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be improved, but haven't figured out how
ideally we can download the .bin
and use it
but just some type error
I have a different perspective on the statement that "set depth in building time is not flexible". In our case, I believe that your design offers great flexibility. However, for an application, developers typically need to specify the @vplasencia , you have more experience with Semaphore and would like to hear your opinions. |
@@ -25,16 +27,10 @@ serde = { version = "1", features = ["derive"], optional = true } | |||
serde_json = "1" | |||
|
|||
# circom-prover | |||
rust-witness = "0.1" | |||
circom-prover = "=0.1.1" | |||
circom-prover = { git = "https://github.com/zkmopro/mopro.git", branch = "main", features = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to specify the branch here if it's the main
branch.
## 🛠 Install | ||
|
||
Clone this repository: | ||
|
||
```sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should either use "sh" or "bash".
@KimiWu123 cargo add semaphore-rs (like worldcoin use feature flags to specify depth, but it only provides 3 kind of depth and if we choose to use feature flags so ideally the best way is not setting depth |
We don't need feature flags; we used env var,
I know we only need to download once, and usually, when users download the app, they have internet for sure. Two minor considerations:
|
but
I am good with a
I think the mobile temp folder is related to each app
we can make sure it works then improve this 🙏🏻 |
Description
Problems:
Changes:
build.rs
file, which previously handled downloading semaphore artifacts.download_zkey
function inutils.rs
to manage zkey downloads.proof.rs
to utilize the newdownload_zkey
function for fetching zkeys dynamically based on tree depth.witness.rs
file to handle witness dispatching based on tree depth.Cargo.toml
to removerust-witness
dependency and adjustcircom-prover
to use the latest version from the main branch.Related Issue(s)
According to the benchmark result zkmopro/mopro#427
and the compare the different usage of witness calculator
I choose the
circom-witnesscalc
as witness calculator and arkworks as proving backendOther information
Checklist
yarn style
without getting any errorsImportant
We do not accept minor grammatical fixes (e.g., correcting typos, rewording sentences) unless they significantly improve clarity in technical documentation. These contributions, while appreciated, are not a priority for merging. If there is a grammatical error feel free to message the team.