updates current docs to reflect recent changes to our contracts and the coprocessor now that they're tied together#436
Conversation
…he coprocessor now that they're tied together
There was a problem hiding this comment.
Summary of Changes
Hello @hxrts, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request primarily focuses on updating and expanding the documentation to accurately reflect recent architectural changes and tighter integration between the Valence Protocol's contracts and the ZK Coprocessor. The changes provide clearer distinctions between CosmWasm and EVM environments, introduce new concepts like Domain Proofs, and enhance the overall understanding of the authorization and zero-knowledge proof systems within the protocol.
Highlights
- New Documentation for Domain Proofs: A new comprehensive document has been added detailing 'Domain Proofs', explaining their structure, how state is bound to the Coprocessor root, the process of adding new blocks, recursive proofs, and their on-chain consumption. This new concept is also integrated into the main ZK documentation summary.
- Clarified CosmWasm vs. EVM Processor Differences: Extensive updates across multiple files now clearly distinguish the architecture, execution behavior, message processing models, and cross-chain integration of the CosmWasm (Full Processor) and EVM (Lite Processor) environments. This includes detailed comparisons in instantiation, owner actions, user actions, and overall processor functionality.
- Enhanced ZK Authorization and Coprocessor Documentation: The documentation for the ZK Authorization contract has been significantly expanded to include distinct 'Standard Authorizations' and 'ZK Authorizations' mechanisms, detailing their implementation differences across CosmWasm and EVM. Furthermore, the ZK Coprocessor documentation has been refined with updates to the system overview, development workflow, on-chain integration, and new sections on client library usage and service APIs.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request provides a comprehensive update to the documentation, reflecting recent changes to the contracts and the coprocessor. The new documentation is much more detailed, clear, and well-structured, especially with the separation of concerns for CosmWasm and EVM environments and the addition of new sections on Domain Proofs and ZK flows. The changes are excellent and significantly improve the developer experience. I've added a couple of minor suggestions to further enhance readability in the documentation.
|
|
||
| ## ZK Authorizations | ||
|
|
||
| ZK authorizations enable proof‑based execution via a registry‑keyed configuration. Each registry stores allowed execution addresses, a verification key, a verification route (for a VerificationRouter), optional last‑block validation for replay prevention, and a metadata hash linking the VK to the program. |
There was a problem hiding this comment.
This sentence is quite long and lists several properties of a ZK authorization registry. For better readability, consider formatting this as a bulleted list.
| ZK authorizations enable proof‑based execution via a registry‑keyed configuration. Each registry stores allowed execution addresses, a verification key, a verification route (for a VerificationRouter), optional last‑block validation for replay prevention, and a metadata hash linking the VK to the program. | |
| ZK authorizations enable proof‑based execution via a registry‑keyed configuration. Each registry stores: | |
| - Allowed execution addresses | |
| - A verification key (VK) | |
| - A verification route (for a `VerificationRouter`) | |
| - Optional last‑block validation for replay prevention | |
| - A metadata hash linking the VK to the program |
| Developing a Coprocessor App typically follows a sequence of steps from setup to deployment and testing: | ||
|
|
||
| 1. **Environment Setup:** The initial step involves preparing your development environment. This requires installing Docker, a recent Rust toolchain, and the [Cargo Valence subcommand](https://github.com/timewave-computer/valence-coprocessor/tree/v0.1.13?tab=readme-ov-file#cli-helper). You would then clone the `valence-coprocessor-app` template repository to serve as the foundation for your new ZK application. For development, you can either use the public Valence ZK Coprocessor service at `prover.timewave.computer:37281` or optionally run a [local Valence coprocessor instance](https://github.com/timewave-computer/valence-coprocessor/tree/v0.1.13?tab=readme-ov-file#local-execution). | ||
| 1. **Environment Setup:** The initial step involves preparing your development environment. This requires installing Docker, a recent Rust toolchain, and the Cargo Valence subcommand (the `cargo-valence` CLI included in this repository). You would then clone the `valence-coprocessor-app` template repository to serve as the foundation for your new ZK application. For development, you can either use the public Valence ZK Coprocessor service at `https://service.coprocessor.valence.zone` (default socket) or optionally run a [local instance](https://github.com/timewave-computer/valence-coprocessor#local-execution). |
There was a problem hiding this comment.
The phrasing "the Cargo Valence subcommand (the cargo-valence CLI included in this repository)" could be slightly confusing. It might be clearer to state directly that it's a CLI tool provided in the repository to avoid ambiguity with cargo's built-in subcommands.
| 1. **Environment Setup:** The initial step involves preparing your development environment. This requires installing Docker, a recent Rust toolchain, and the Cargo Valence subcommand (the `cargo-valence` CLI included in this repository). You would then clone the `valence-coprocessor-app` template repository to serve as the foundation for your new ZK application. For development, you can either use the public Valence ZK Coprocessor service at `https://service.coprocessor.valence.zone` (default socket) or optionally run a [local instance](https://github.com/timewave-computer/valence-coprocessor#local-execution). | |
| 1. **Environment Setup:** The initial step involves preparing your development environment. This requires installing Docker, a recent Rust toolchain, and the `cargo-valence` command-line tool (included in this repository). You would then clone the `valence-coprocessor-app` template repository to serve as the foundation for your new ZK application. For development, you can either use the public Valence ZK Coprocessor service at `https://service.coprocessor.valence.zone` (default socket) or optionally run a [local instance](https://github.com/timewave-computer/valence-coprocessor#local-execution). |
Primarily focuses on the authorization system, coprocessor interface, domain proof, and state proof system