pod2/book/src
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
..
img feat: add architecture doc (#73) 2025-02-18 16:31:39 +01:00
anchoredkeys.md Merge changes to docs (#41) 2025-02-10 19:06:45 +01:00
architecture.md feat: add architecture doc (#73) 2025-02-18 16:31:39 +01:00
backendtypes.md Organize docs: front and back end; custom predicates. (#96) 2025-03-03 02:26:29 +10:00
custom.md Organize docs: front and back end; custom predicates. (#96) 2025-03-03 02:26:29 +10:00
custom2.md Aard custom (#49) 2025-02-24 09:05:30 -08:00
customexample.md Aard custom (#49) 2025-02-24 09:05:30 -08:00
customhash.md Organize docs: front and back end; custom predicates. (#96) 2025-03-03 02:26:29 +10:00
custompred.md Organize docs: front and back end; custom predicates. (#96) 2025-03-03 02:26:29 +10:00
deductions.md feat: move code here (#11) 2025-01-31 16:20:57 +01:00
examples.md sync spec & code (#107) 2025-03-05 11:35:23 -08:00
front_and_back.md Organize docs: front and back end; custom predicates. (#96) 2025-03-03 02:26:29 +10:00
introduction.md feat: move code here (#11) 2025-01-31 16:20:57 +01:00
mainpod.md feat: move code here (#11) 2025-01-31 16:20:57 +01:00
merklestatements.md sync spec & code (#107) 2025-03-05 11:35:23 -08:00
merkletree.md Merkleproof verify circuit (#143) 2025-03-18 19:34:01 +01:00
operations.md sync spec & code (#107) 2025-03-05 11:35:23 -08:00
podtypes.md Merge changes to docs (#41) 2025-02-10 19:06:45 +01:00
signature.md add signature documentation page (#123) 2025-03-11 19:49:12 +01:00
signedpod.md add signature documentation page (#123) 2025-03-11 19:49:12 +01:00
simpleexample.md Aard custom (#49) 2025-02-24 09:05:30 -08:00
statements.md sync spec & code (#107) 2025-03-05 11:35:23 -08:00
SUMMARY.md add signature documentation page (#123) 2025-03-11 19:49:12 +01:00
values.md sync spec & code (#107) 2025-03-05 11:35:23 -08:00