MainPod circuit skeleton (#151)

* feat: add MainPod circuit skeleton

* feat: use ValueTarget in mt, verify SignedPod type

* wip

* feat: match structure with mock

* apply feedback from @arnaucube

* add 2 operations

* fix test compilation

* Add missing todo
This commit is contained in:
Eduard S. 2025-03-20 13:32:12 +01:00 committed by GitHub
parent 2a2628ccbf
commit 22db6ce4c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 513 additions and 51 deletions

View file

@ -46,7 +46,7 @@ pub struct MockSignedPod {
impl Pod for MockSignedPod {
fn verify(&self) -> bool {
// Verify type
// 1. Verify type
let value_at_type = match self.dict.get(&hash_str(KEY_TYPE).into()) {
Ok(v) => v,
Err(_) => return false,
@ -55,7 +55,7 @@ impl Pod for MockSignedPod {
return false;
}
// Verify id
// 2. Verify id
let mt = match MerkleTree::new(
MAX_DEPTH,
&self
@ -72,7 +72,7 @@ impl Pod for MockSignedPod {
return false;
}
// Verify signature
// 3. Verify signature
let pk_hash = match self.dict.get(&hash_str(KEY_SIGNER).into()) {
Ok(v) => v,
Err(_) => return false,