Fork of https://github.com/0xPARC/pod2
In this commit I remove all `*Gadget` types and instead implement the naming convention defined here https://github.com/0xPARC/pod2/issues/181#issuecomment-3051954321 The biggest changes can be summarized by: - a) Removal of `*Gadget` types and their `eval_*` methods in favour of `verb_object_circuit` functions. - b) The above functions don't create targets that need to be witness-assigned later. Instead they receive those as arguments. This clearly shows what's the circuit input and output. I'm specially happy about the changes from b), I think they make the flow of data in the circuit more clear. Missing things that I did not address in this PR - The RecursiveCircuit still uses some old naming conventions like `build`. - We have some `*Target` types that have methods that define constraints. I think we can keep those as they are convenient and I don't see them as strongly breaking the new convention: I see them as the object-oriented way to apply the convention. In those cases the `object` can be omitted from the method when it's implied by the type name, and the `_circuit` suffix doesn't appear because it's implied by the fact that the type is a `*Target`. Examples are: `SignatureTarget::verify -> BoolTarget`, `StatementTarget::has_native_type -> BoolTarget` or `OperationTypeTarget::as_custom -> (BoolTarget, HashOutTarget, Target)`. |
||
|---|---|---|
| .github/workflows | ||
| book | ||
| examples | ||
| src | ||
| .gitignore | ||
| Cargo.toml | ||
| README.md | ||
| rust-analyzer.toml | ||
| rust-toolchain.toml | ||
| rustfmt.toml | ||
POD2
Usage
- Run tests:
cargo test --release - Rustfmt:
cargo fmt - Check typos:
typos -c .github/workflows/typos.toml
Book
The book contains the specification of POD2. A rendered version of the site can be found at: https://0xparc.github.io/pod2/
To run it locally:
- Requirements
- mdbook:
cargo install mdbook - mdbook-katex:
cargo install mdbook-katex
- mdbook:
- Go to the book directory:
cd book - Run the mdbook:
mdbook serve