Skip to content

Commit

Permalink
fix(verifier): debug set_trace_coefficients
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinLinus committed Dec 14, 2022
1 parent 5e72116 commit e9b9651
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/stark_verifier/air/air_instance.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct ConstraintCompositionCoefficients {

struct TraceCoefficients {
n_values: felt,
values: felt,
values: felt*,
}

// Coefficients used in construction of DEEP composition polynomial
Expand Down Expand Up @@ -139,9 +139,16 @@ func set_trace_coefficients{
if (n_vec == 0) {
return ();
}
draw_elements(n_elements=n_coefficients, elements=coefficients);
// Create a new TraceCoefficients object
let (values) = alloc();
assert coefficients[0] = TraceCoefficients(n_coefficients, values);

// Fill it with random elements
draw_elements(n_elements=n_coefficients, elements=values);

// Recurse
set_trace_coefficients(
n_vec=n_vec - 1, n_coefficients=n_coefficients, coefficients=coefficients
n_vec=n_vec - 1, n_coefficients=n_coefficients, coefficients=&coefficients[1]
);
return ();
}
Expand Down

0 comments on commit e9b9651

Please sign in to comment.