w3f / apk-proofs

Apache License 2.0
56 stars 19 forks source link

highest_degree_to_commit not a setup property #35

Open swasilyev opened 2 years ago

swasilyev commented 2 years ago
fn highest_degree_to_commit(domain_size: usize) -> usize {
    3 * domain_size - 3
}

shouldn't belong to setup.rs

https://github.com/w3f/apk-proofs/blob/1f413bce76e0a4ea57153ac7f1ec0e5843244166/bw6/src/prover.rs#L95-L97

https://github.com/w3f/apk-proofs/blob/1f413bce76e0a4ea57153ac7f1ec0e5843244166/bw6/src/piop/mod.rs#L119-L124

This value is usually deg(q_poly) = deg(aggregate_constraint_polynomial / domain_vanishing_polynomial) = max(deg(constraint)) - n

So 3n+3 works only until the highest constraint degree is 4n+3