Add SignedPod verification circuit (SignedPodVerifyGadget) (#170)

* add boolean selector to the MerkleProofGadget, to allow skipping proof verifications when all the slots are not used (eg. in the SignedPod circuit)

* move existing signedpod's circuits draft to its own file

* implement SignedPodVerify circuit
This commit is contained in:
arnaucube 2025-04-01 18:20:28 +02:00 committed by GitHub
parent 0637f52573
commit 4a94b34792
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 357 additions and 182 deletions

View file

@ -11,7 +11,7 @@ use crate::middleware::{
use super::primitives::signature::{PublicKey, SecretKey, Signature};
pub struct Signer(SecretKey);
pub struct Signer(pub SecretKey);
impl PodSigner for Signer {
fn sign(&mut self, _params: &Params, kvs: &HashMap<Hash, Value>) -> Result<Box<dyn Pod>> {
@ -34,9 +34,9 @@ impl PodSigner for Signer {
#[derive(Clone, Debug)]
pub struct SignedPod {
id: PodId,
signature: Signature,
dict: Dictionary,
pub id: PodId,
pub signature: Signature,
pub dict: Dictionary,
}
impl Pod for SignedPod {