Fix custom predicate circuits and add tests for them (#235)

* add tests, fix custom predicates

* wip

* wip

* fix custom predicates

* modularize code

* fix typos

* remove scratch file

* update

* Update src/backends/plonky2/circuits/mainpod.rs

Co-authored-by: Ahmad Afuni <root@ahmadafuni.com>

---------

Co-authored-by: Ahmad Afuni <root@ahmadafuni.com>
This commit is contained in:
Eduard S. 2025-05-16 13:17:14 +02:00 committed by GitHub
parent f5a1aa7523
commit def0730462
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 629 additions and 153 deletions

View file

@ -276,16 +276,17 @@ mod tests {
// Alice attests that she is ETH friends with Charlie and Charlie
// attests that he is ETH friends with Bob.
let alice_attestation =
eth_friend_signed_pod_builder(&params, charlie.pubkey().into()).sign(&mut alice)?;
eth_friend_signed_pod_builder(&params, charlie.public_key().into()).sign(&mut alice)?;
let charlie_attestation =
eth_friend_signed_pod_builder(&params, bob.pubkey().into()).sign(&mut charlie)?;
eth_friend_signed_pod_builder(&params, bob.public_key().into()).sign(&mut charlie)?;
let mut prover = MockProver {};
let alice_bob_ethdos = eth_dos_pod_builder(
&params,
true,
&alice_attestation,
&charlie_attestation,
&bob.pubkey().into(),
bob.public_key().into(),
)?
.prove(&mut prover, &params)?;