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:
parent
0637f52573
commit
4a94b34792
7 changed files with 357 additions and 182 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue