Skip to content

Commit

Permalink
Add interaction_element_ids to Component trait.
Browse files Browse the repository at this point in the history
  • Loading branch information
alonh5 committed May 16, 2024
1 parent c2d33be commit a8fa06c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/prover/src/core/air/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ pub trait Component {
point: CirclePoint<SecureField>,
) -> ColumnVec<Vec<CirclePoint<SecureField>>>;

// Returns the ids of the interaction elements used by the component.
fn interaction_element_ids(&self) -> Vec<String>;

/// Evaluates the constraint quotients combination of the component, given the mask values.
fn evaluate_constraint_quotients_at_point(
&self,
Expand Down
4 changes: 4 additions & 0 deletions crates/prover/src/core/prover/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ mod tests {
vec![vec![point]]
}

fn interaction_element_ids(&self) -> Vec<String> {
vec![]
}

fn evaluate_constraint_quotients_at_point(
&self,
_point: CirclePoint<SecureField>,
Expand Down
4 changes: 4 additions & 0 deletions crates/prover/src/examples/fibonacci/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ impl Component for FibonacciComponent {
)
}

fn interaction_element_ids(&self) -> Vec<String> {
vec![]
}

fn evaluate_constraint_quotients_at_point(
&self,
point: CirclePoint<SecureField>,
Expand Down
7 changes: 7 additions & 0 deletions crates/prover/src/examples/wide_fibonacci/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ impl Component for WideFibComponent {
fixed_mask_points(&vec![vec![0_usize]; self.n_columns()], point)
}

fn interaction_element_ids(&self) -> Vec<String> {
vec![
"wide_fibonacci_alpha".to_string(),
"wide_fibonacci_z".to_string(),
]
}

fn evaluate_constraint_quotients_at_point(
&self,
point: CirclePoint<SecureField>,
Expand Down

0 comments on commit a8fa06c

Please sign in to comment.