message: [kimchi][index] handy function to create an index based on a circuit
diff: @@ -417,3 +417,23 @@ where
  .map_err(|e| e.to_string())
  }
  }
  +
  +pub mod testing {
  + use super::*;
  + use crate::circuits::gate::CircuitGate;
  + use commitment_dlog::srs::endos;
  + use mina_curves::pasta::{pallas::Affine as Other, vesta::Affine, Fp};
  +
  + pub fn new_index_for_test(gates: Vec<CircuitGate<Fp>>, public: usize) -> Index<Affine> {
  + let fp_sponge_params = oracle::pasta::fp::params();
  + let cs = ConstraintSystem::<Fp>::create(gates, vec![], fp_sponge_params, public).unwrap();
  +
  + let mut srs = SRS::<Affine>::create(cs.domain.d1.size as usize);
  + srs.add_lagrange_basis(cs.domain.d1);
  + let srs = Arc::new(srs);
  +
  + let fq_sponge_params = oracle::pasta::fq::params();
  + let (endo_q, _endo_r) = endos::<Other>();
  + Index::<Affine>::create(cs, fq_sponge_params, endo_q, srs)
  + }
  +}
  