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:
parent
9afc43675d
commit
b93187c9bb
11 changed files with 411 additions and 175 deletions
|
|
@ -93,6 +93,8 @@ pub struct Params {
|
|||
// in a custom predicate
|
||||
pub max_custom_predicate_arity: usize,
|
||||
pub max_custom_batch_size: usize,
|
||||
// maximum depth for merkle tree gates
|
||||
pub max_depth_mt_gate: usize,
|
||||
}
|
||||
|
||||
impl Default for Params {
|
||||
|
|
@ -107,6 +109,7 @@ impl Default for Params {
|
|||
max_operation_args: 5,
|
||||
max_custom_predicate_arity: 5,
|
||||
max_custom_batch_size: 5,
|
||||
max_depth_mt_gate: 32,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -116,15 +119,27 @@ impl Params {
|
|||
self.max_statements - self.max_public_statements
|
||||
}
|
||||
|
||||
pub fn statement_tmpl_arg_size() -> usize {
|
||||
pub const fn statement_tmpl_arg_size() -> usize {
|
||||
2 * HASH_SIZE + 1
|
||||
}
|
||||
|
||||
pub fn predicate_size() -> usize {
|
||||
pub const fn predicate_size() -> usize {
|
||||
HASH_SIZE + 2
|
||||
}
|
||||
|
||||
pub fn statement_tmpl_size(&self) -> usize {
|
||||
pub const fn operation_type_size() -> usize {
|
||||
HASH_SIZE + 2
|
||||
}
|
||||
|
||||
pub fn statement_size(&self) -> usize {
|
||||
Self::predicate_size() + STATEMENT_ARG_F_LEN * self.max_statement_args
|
||||
}
|
||||
|
||||
pub fn operation_size(&self) -> usize {
|
||||
Self::operation_type_size() + OPERATION_ARG_F_LEN * self.max_operation_args
|
||||
}
|
||||
|
||||
pub const fn statement_tmpl_size(&self) -> usize {
|
||||
Self::predicate_size() + self.max_statement_args * Self::statement_tmpl_arg_size()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue