pub fn mask_buffer_dimensions(
n_vars: usize,
degree: usize,
n_extra_dof: usize,
) -> (usize, usize)Expand description
Returns (m_n, m_d) dimensions for a mask polynomial buffer.
The ZK MLE-check protocol uses a separable mask polynomial with n_vars univariate polynomials,
each of degree d. The mask coefficients are stored in a 2^m_n × 2^m_d matrix where:
m_n: log of number of rows (one per variable, padded to power of two)m_d: log of row size (degree + 1 coefficients, padded to power of two)
The protocol imposes n * d + 1 linear constraints on the coefficients. The n_extra_dof
parameter specifies additional degrees of freedom needed (e.g., for FRI openings), which
may increase m_n to ensure 2^(m_n + m_d) >= n * d + 1 + n_extra_dof.
§Arguments
n_vars- Number of variables (n).degree- Degree of each univariate polynomial (d).n_extra_dof- Number of additional degrees of freedom.
§Returns
A tuple (m_n, m_d) where the total mask buffer size is 2^(m_n + m_d).