Serialization for Plonky2 Signed and Main PODs (#234)
* WIP * WIP * Working serialization for both Mock and Plonky2 versions of Signed and Main Pods * Restore useful comment about serialized_proof() * Use plonky2 serialization for signatures and proofs * Add schema renames for Serialized SignedPod/MainPod types * Break out utility function for generating common circuit data * Review feedback fixes
This commit is contained in:
parent
def0730462
commit
de9b206852
8 changed files with 381 additions and 115 deletions
|
|
@ -271,6 +271,10 @@ impl MockMainPod {
|
|||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn params(&self) -> &Params {
|
||||
&self.params
|
||||
}
|
||||
}
|
||||
|
||||
impl Pod for MockMainPod {
|
||||
|
|
|
|||
|
|
@ -59,6 +59,10 @@ impl MockSignedPod {
|
|||
pub(crate) fn new(id: PodId, signature: String, kvs: HashMap<Key, Value>) -> Self {
|
||||
Self { id, signature, kvs }
|
||||
}
|
||||
|
||||
pub fn signature(&self) -> String {
|
||||
self.signature.clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl MockSignedPod {
|
||||
|
|
@ -131,7 +135,7 @@ impl Pod for MockSignedPod {
|
|||
}
|
||||
|
||||
fn serialized_proof(&self) -> String {
|
||||
self.signature.to_string()
|
||||
serde_json::to_string(&self.signature).unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue