Find a file
arnaucube b1689c5b37
Merkleproof verify circuit (#143)
* merkletree: add keypath circuit

* merkletree-circuit: implement proof of existence verification in-circuit

* parametrize max_depth at the tree circuit

* Constrain selectors in-circuit

* implement merketree nonexistence proof circuit, and add edgecase tests

* add non-existence proofs documentation in the mdbook, mv EMPTY->EMPTY_VALUE & NULL->EMPTY_HASH, dependency clean and public exposure methods

* review comments, some extra polishing and add a test that expects wrong proofs to fail

* Add circuit to check only merkleproofs-of-existence

With this, the merkletree_circuit module offers two different circuits:
- `MerkleProofCircuit`: allows to verify both proofs of existence and proofs
non-existence with the same circuit.
- `MerkleProofExistenceCircuit`: allows to verify proofs of existence only.

In this way, if only proofs of existence are needed,
`MerkleProofExistenceCircuit` should be used, which requires less amount
of constraints than `MerkleProofCircuit`.

* Code review

---------

Co-authored-by: Ahmad <root@ahmadafuni.com>
2025-03-18 19:34:01 +01:00
.github/workflows implement proof-based signatures using plonky2 proofs (#112) 2025-03-08 00:27:14 +10:00
book Merkleproof verify circuit (#143) 2025-03-18 19:34:01 +01:00
src Merkleproof verify circuit (#143) 2025-03-18 19:34:01 +01:00
.gitignore Aard custom (#49) 2025-02-24 09:05:30 -08:00
Cargo.toml Featurize middleware types that are actually defined by the backend (#94) 2025-02-27 14:15:31 +01:00
README.md Featurize middleware types that are actually defined by the backend (#94) 2025-02-27 14:15:31 +01:00
rust-toolchain.toml add initial MerkleTree implementation (#13) 2025-02-03 18:03:45 +01:00

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
  • Go to the book directory: cd book
  • Run the mdbook: mdbook serve