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:
parent
f5a1aa7523
commit
def0730462
16 changed files with 629 additions and 153 deletions
|
|
@ -19,7 +19,7 @@ pub struct MockSigner {
|
|||
}
|
||||
|
||||
impl MockSigner {
|
||||
pub fn pubkey(&self) -> Hash {
|
||||
pub fn public_key(&self) -> Hash {
|
||||
hash_str(&self.pk)
|
||||
}
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ impl MockSigner {
|
|||
impl MockSigner {
|
||||
fn _sign(&mut self, _params: &Params, kvs: &HashMap<Key, Value>) -> Result<MockSignedPod> {
|
||||
let mut kvs = kvs.clone();
|
||||
let pubkey = self.pubkey();
|
||||
let pubkey = self.public_key();
|
||||
kvs.insert(Key::from(KEY_SIGNER), Value::from(pubkey));
|
||||
kvs.insert(Key::from(KEY_TYPE), Value::from(PodType::MockSigned));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue