in air/src/air/mod.rs [472:496]
fn get_constraint_composition_coefficients<E, H>(
&self,
public_coin: &mut RandomCoin<Self::BaseField, H>,
) -> Result<ConstraintCompositionCoefficients<E>, RandomCoinError>
where
E: FieldElement<BaseField = Self::BaseField>,
H: Hasher,
{
let mut t_coefficients = Vec::new();
for _ in 0..self.num_transition_constraints() {
t_coefficients.push(public_coin.draw_pair()?);
}
// TODO: calling self.get_assertions() is heavy; find a better way to specify the number
// assertions
let mut b_coefficients = Vec::new();
for _ in 0..self.get_assertions().len() {
b_coefficients.push(public_coin.draw_pair()?);
}
Ok(ConstraintCompositionCoefficients {
transition: t_coefficients,
boundary: b_coefficients,
})
}