Skip to content
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

Add Zkverse application #1563

Merged
merged 28 commits into from
Mar 13, 2023
Merged

Add Zkverse application #1563

merged 28 commits into from
Mar 13, 2023

Conversation

VegeBun-csj
Copy link
Contributor

Project Abstract

At present, ZKP technology is constantly developing and innovating in the scaling and expansion track in Ethereum, especially some zk rollup projects, such as zksync, scroll, starknit, etc. So the main goal of this project is to introduce ZKP technology into the Polkadot/Substrate ecosystem. Polkadot/Substrate natively does not support ZKP, so this project(Zkverse, which means zk universe) will provide zk-related pallets to support substrate and more efficient zk proof generation ways.

There are three main goals for project:

  • Integrate some zkp libray(like bellman, plonk library and eg...) into substrate pallet
  • Maximize the efficiency and convenience of zk proof generation(The proof is not generated on the chain, but through some developer friendly libraries(like snarkjs) which will be adapted to the zk lib on substrate-based chain.). This is very important and convenient for scaling. It can realize rollup for app-specific Dapps and greatly increase the throughput of the substrated-based chain. It can be said "Off-chain execution and on-chain verification".
  • Publish some tutorial blogs/demos to let more substrate community developers enjoy the convenience of the above zkp development kits.

Meanwhile, We know that snakjs and circom are excellent and popular zkp development libraries. They are very popular in the Ethereum ecosystem and can automatically generate verification contract codes. We observed this very good feature, so we want to generate circuit codes more easily through circom, and generate proofs by snarkjs, which will be verified on substrate-based chain. Due to many people using snakjs, and circom is developer friendly, Unlike some domain-specific circuit writing methods, our project can attract many developers who are familiar with snarkjs to develop zkp Dapps in substrate/polkadot ecosystem. They can also enjoy the convenience of developing zkp applications in Polkadot ecosystem. So our main goal is to provide zkp infrastructure that is convenient for Polkadot developers. Also ,we will show a minimal example with Merkle tree and ZKP for rollup.

h(h(h(sm0+sm1) + h(sm2+sm3)) + sm4) (merkle root)
      /                         \
    h(h(sm0+sm1) + h(sm2+sm3))  sm4 (2 siblings)
    /          \                /
   h(sm0+sm1)   h(sm2+sm3)   sm4 (3 siblings)
  /   \        /   \         /
sm0   sm1   sm2    sm3      sm4 (leaves are the base level, 5 siblings)
^     ^     ^      ^        ^
|     |     |      |        |
m0    m1    m2     m3       m4

Grant level

  • Level 1: Up to $10,000, 2 approvals
  • Level 2: Up to $30,000, 3 approvals
  • Level 3: Unlimited, 5 approvals (for >$100k: Web3 Foundation Council approval)

Application Checklist

  • The application template has been copied and aptly renamed (project_name.md).
  • I have read the application guidelines.
  • Payment details have been provided (bank details via email or BTC, Ethereum (USDC/DAI) or Polkadot/Kusama (USDT) address in the application).
  • The software delivered for this grant will be released under an open-source license specified in the application.
  • The initial PR contains only one commit (squash and force-push if needed).
  • The grant will only be announced once the first milestone has been accepted (see the announcement guidelines).
  • I prefer the discussion of this application to take place in a private Element/Matrix channel. My username is: @_______:matrix.org (change the homeserver if you use a different one)

Copy link
Member

@semuelle semuelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @VegeBun-csj. Thank you for your application. I have a couple of follow-up questions:

  • Are you planning to use these pallets yourself, or have you talked to anyone personally who would use them?
  • You state that your project will "do more education" than the ZK-Snarks tutorial, but there are no education-related deliverables in your roadmap. If you meant the 0e deliverables (article/workshop), it would be great if you could expand their specification a bit. Given the price of the grant, I think it'd be justified to include detailed workshops from an introduction to zkp to implementation of example proofs.
  • You already listed some similar projects, but did you check our tech stack for other, existing implementations?

FYI, the Zeropool project is still active.

@VegeBun-csj
Copy link
Contributor Author

VegeBun-csj commented Feb 24, 2023

@semuelle Thank you for your reply and guiding suggestions, and I will answer your questions separately.

  • Are you planning to use these pallets yourself, or have you talked to anyone personally who would use them?

Yes, I will also use this Pallet after developed. Also, we have talked with some developers before. They will also hope to develop some zkp dapps in Polkadot ecosystem. But at present, the threshold of using some zkp libraries is a little high, so we have made this project based on this pain point. I think we will promote it after we make it, and there should be many people interested. Because we will combine some relatively friendly libraries to facilitate developers.

  • You state that your project will "do more education" than the ZK-Snarks tutorial, but there are no education-related deliverables in your roadmap. If you meant the 0e deliverables (article/workshop), it would be great if you could expand their specification a bit. Given the price of the grant, I think it'd be justified to include detailed workshops from an introduction to zkp to implementation of example proofs.

Thank you for your suggestion. I have pushed the latest commit which involve the detailed plans of eucation. Also, Our example is not a simple circuit like 1+1, but a relatively practical example, which can make developers feel more intuitively.

  • You already listed some similar projects, but did you check our tech stack for other, existing implementations?
    FYI, the Zeropool project is still active.

Yes, i have seen many similar projects, they do not implement our ideas. Our main idea is to make some libraries that are easy for developers to write circuit and generate zkp proof (such as snarkjs) compatible with some zkp libraries integrated on the substrate-based chain (these libraries need to develop relatively low-level circuits, which are not very friendly for developers to develop circuits and easy to make mistakes). At present, many projects use one library for proof generation and verification, so we did what they didn't do, which is developer friendly.

I just saw that they do have new actions, but their code base is relatively old. We intend to be compatible with the latest zkp library. In the future, we will also update Pallet to maintain the latest version compatibility with substrate and support developers. In the future, we will support more ZKP proof systems

| **0b.** | Documentation | We will provide both **inline documentation** of the code and a basic **tutorial** that explains how a user can (for example) spin up one of our Substrate nodes and send test transactions, which will show how the new functionality works. |
| **0c.** | Testing and Testing Guide | Core functions will be fully covered by comprehensive unit tests to ensure functionality and robustness. In the guide, we will describe how to run these tests. |
| **0d.** | Docker | We will provide a Dockerfile(s) that can be used to test all the functionality delivered with this milestone. |
| 0e. | Article | We will publish an **article**/workshop to explain.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that you have an "education" deliverable in each milestone, I'd say it makes sense to remove this article. Focus on the education part instead and, ideally, publish an article introducing the project separately for M2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that you have an "education" deliverable in each milestone, I'd say it makes sense to remove this article. Focus on the education part instead and, ideally, publish an article introducing the project separately for M2.

thanks, i have modified it according to your suggestion

@semuelle semuelle self-assigned this Feb 24, 2023
Copy link
Member

@semuelle semuelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update, @VegeBun-csj. I am generally happy to proceed. I would just like to ask you to add the deliverables 0b (at least inline documentation) and 0c from our template to both milestones, potentially also 0d (Docker) if the test setup is complex.

@VegeBun-csj
Copy link
Contributor Author

VegeBun-csj commented Mar 6, 2023

Thanks for the quick reply, and it’s nice to see that you are already working on this. However, we usually don’t fund work that is already been done, and previously we were unaware of your project, which is why we supported the other team. Sorry for this. Could you potentially reduce the price of the first milestone and/or focus more on the new features that you want to implement from now on?

Thank you very much for your suggestion. I reduced the amount of first milestone a little. Although I have completed some work before, it has not been standardized and there are still many parts to be optimized, such as the adapter and the part of integrating pallet needs to be added and improved, eg: further developing pallet and optimize, version upgrade, function tests and some benchmarks. There is still a lot of work. At the same time, We also add relevant educational content. It is not a simple example, such as Simple operation, but a more practical example (such as rollup or the other) to show devs how to use our tools to develop a more practical zk dapps. As I said above, our implementation is better and more general, this feature is very meaningful :)

@VegeBun-csj VegeBun-csj requested review from Noc2 and semuelle and removed request for Noc2 March 6, 2023 11:20
Copy link
Collaborator

@Noc2 Noc2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update and the price reduction. However, the current delivery for the first milestone could basically be a copy of the work done here based on the current specification. So I’m personally unwilling to accept it at this price point and given the current level of details, but others might have a different opinion.

@VegeBun-csj
Copy link
Contributor Author

VegeBun-csj commented Mar 6, 2023

Thanks for the update and the price reduction. However, the current delivery for the first milestone could basically be a copy of the work done here based on the current specification. So I’m personally unwilling to accept it at this price point and given the current level of details, but others might have a different opinion.

Kindly ping @Noc2. Thanks for your reply sincerely, but our implementation is not a copy. It is different from the details of the implementation. Can you reconsider my updated price reduction?
Also, Sorry sir. Maybe I didn't fully explain it. The work we did was compatible with snarkjs(generate proof) and bellman(verify proof), but they did their own verification implementation for the snarkjs proof on the chain which may not be the best implementation. Bellman is a cryptography library with a security test developed by zcash. They didn't use bellman. This is our biggest difference. Also devs can use snarkjs or bellman to generate proof which can all be verified by our implementation. We know that we all use snarkjs, and groth16, but the proof verification technique details are different. If you still think it is not suitable, can you give me a reference price?Looking forward to your reply, thanks.

@VegeBun-csj VegeBun-csj requested review from Noc2 and semuelle and removed request for semuelle and Noc2 March 7, 2023 14:09
@VegeBun-csj
Copy link
Contributor Author

Hi sir. I have reduced the price of milestone1 again. Can you take a look for my application?😃
Thank you very much for your suggestions. @Noc2

Copy link
Collaborator

@Noc2 Noc2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. But you changed the total costs of the first milestone to 70k USD (= 70,000). Was this intentional?

@VegeBun-csj
Copy link
Contributor Author

VegeBun-csj commented Mar 13, 2023

Thanks for the update. But you changed the total costs of the first milestone to 70k USD (= 70,000). Was this intentional?

@Noc2. No offense. I'm very sorry, sir. I didn't mean to. In the previous modification, my total amount was reduced, so the price of milestone1 is caused by carelessness. I'm very sorry for it. I have revised my application, listen to your suggestions Sincerely. Please forgive that brings you the inconvenience.

Copy link
Collaborator

@Noc2 Noc2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. I'm happy to go ahead with it.

Copy link
Contributor

@keeganquigley keeganquigley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the application @VegeBun-csj and for the deep dive @semuelle @Noc2 sounds like an interesting project. Hopefully these libraries will make zkp easier for devs. Happy to go forward with it also.

Copy link
Contributor

@dsm-w3f dsm-w3f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VegeBun-csj I'm happy to support the project. The only part that I think you should be aware of is to focus more on the parts not covered for zk-SNARKs grant, i.e., bellman, plonk, etc, and when explaining the similar parts try to perform it with a different approach with different examples. I think this is a very useful project.

@Noc2 Noc2 merged commit c3071b4 into w3f:master Mar 13, 2023
@github-actions
Copy link
Contributor

Congratulations and welcome to the Web3 Foundation Grants Program! Please refer to our Milestone Delivery repository for instructions on how to submit milestones and invoices, our FAQ for frequently asked questions and the support section of our README for more ways to find answers to your questions.

Before you start, take a moment to read through our announcement guidelines for all communications related to the grant or make them known to the right person in your organisation. In particular, please don't announce the grant publicly before at least the first milestone of your project has been approved. At that point or shortly before, you can get in touch with us at [email protected] and we'll be happy to collaborate on an announcement about the work you’re doing.

Lastly, please remember to let us know in case you run into any delays or deviate from the deliverables in your application. You can either leave a comment here or directly request to amend your application via PR. We wish you luck with your project! 🚀

ainhoa-a pushed a commit to ainhoa-a/Grants-Program that referenced this pull request Jan 26, 2024
* add some web3 grant info

* add paln info

* Update zkverse.md

* Update zkverse.md

* add Entity

* complete zkverse

* update project name

* update

* update

* add some education

* delete some doc

* delete some doc

* delete

* update

* update

* update

* update

* Update

* update
@keeganquigley
Copy link
Contributor

Hi @VegeBun-csj how is milestone 2 coming along?

@keeganquigley
Copy link
Contributor

pinging @VegeBun-csj

@keeganquigley
Copy link
Contributor

Hi @VegeBun-csj if we don't hear back within 2 weeks we will close the grant due to inactivity. Let me know if you have any questions regarding this.

@keeganquigley keeganquigley mentioned this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review The project is ready to be reviewed by the committee members.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants