Skip to content

Commit

Permalink
IVC: attempt to write to define the real number of columns
Browse files Browse the repository at this point in the history
And clean old not functional/drafty code
  • Loading branch information
dannywillems committed Jun 18, 2024
1 parent c1bef1f commit d083fdd
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions ivc/src/ivc/columns.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::N_LIMBS_XLARGE;
use super::{N_ADDITIONAL_WIT_COL_QUAD, N_LIMBS_XLARGE};
use crate::poseidon_8_56_5_3_2::{
bn254::{
Column as IVCPoseidonColumn, NB_FULL_ROUND as IVC_POSEIDON_NB_FULL_ROUND,
Expand Down Expand Up @@ -330,11 +330,15 @@ pub enum IVCColumn {
}

impl ColumnIndexer for IVCColumn {
// This should be
// const N_COL: usize = std::cmp::max(IVCPoseidonColumn::N_COL, FECColumn::N_COL);
// which is runtime-only expression..?
// 333 is not enough
const N_COL: usize = 600;
/// Number of columns used by the IVC circuit
/// It contains at least the columns used for Poseidon, and the columns used
/// to reduce to degree 2 the constraints of the circuit
/// FIXME: This can be improved by changing a bit the layer.
/// The reduction to degree 2 should happen in the gadgets to avoid adding
/// extra columns and leave sparse rows.
// We consider IVCPoseidonColumn::N_COL but it should be the maximum with
// the different gadgets at each row.
const N_COL: usize = IVCPoseidonColumn::N_COL + N_ADDITIONAL_WIT_COL_QUAD;

fn to_column(self) -> Column {
match self {
Expand Down

0 comments on commit d083fdd

Please sign in to comment.