Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EASY] IVC: attempt to define the real number of columns #2364

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions ivc/src/ivc/columns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,17 @@ 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.
/// It does not include the additional columns that might be required
/// to reduce to degree 2.
/// 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 of
// the different gadgets/blocks.
// We also add 1 for the FoldIteration column.
const N_COL: usize = IVCPoseidonColumn::N_COL + 1 + N_BLOCKS;

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