Progress on the MainPod circuit (#159)

* feat: add SignedPodVerify test

* unify circuits style

* more clear sizes

* get operation_verify test working

* be consistent with names
This commit is contained in:
Eduard S. 2025-03-21 16:53:03 +01:00 committed by GitHub
parent 9afc43675d
commit b93187c9bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 411 additions and 175 deletions

View file

@ -13,6 +13,9 @@ impl Statement {
pub fn is_none(&self) -> bool {
self.0 == Predicate::Native(NativePredicate::None)
}
pub fn predicate(&self) -> Predicate {
self.0.clone()
}
/// Argument method. Trailing Nones are filtered out.
pub fn args(&self) -> Vec<StatementArg> {
let maybe_last_arg_index = (0..self.1.len()).rev().find(|i| !self.1[*i].is_none());
@ -96,7 +99,7 @@ impl TryFrom<Statement> for middleware::Statement {
impl From<middleware::Statement> for Statement {
fn from(s: middleware::Statement) -> Self {
match s.code() {
match s.predicate() {
middleware::Predicate::Native(c) => Statement(
middleware::Predicate::Native(c),
s.args().into_iter().collect(),