Allow literals in statements (#276)

Implements #229 and #261.
This commit is contained in:
Daniel Gulotta 2025-06-13 10:27:19 -07:00 committed by GitHub
parent 21ab3c2d0d
commit 7d0d3ad769
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 992 additions and 825 deletions

View file

@ -671,8 +671,7 @@ impl Default for Params {
max_signed_pod_values: 8,
max_public_statements: 10,
num_public_statements_id: 16,
// TODO: Reduce to 5 or less after https://github.com/0xPARC/pod2/issues/229
max_statement_args: 6,
max_statement_args: 5,
max_operation_args: 5,
max_custom_predicate_batches: 2,
max_custom_predicate_verifications: 5,
@ -793,7 +792,7 @@ pub trait Pod: fmt::Debug + DynClone + Any {
self.pub_statements()
.into_iter()
.filter_map(|st| match st {
Statement::ValueOf(ak, v) => Some((ak, v)),
Statement::Equal(ValueRef::Key(ak), ValueRef::Literal(v)) => Some((ak, v)),
_ => None,
})
.collect()