mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-07 00:03:10 +00:00
Fix arithmetic stark padding (#1069)
This commit is contained in:
parent
0d819cf888
commit
49bbe4e084
@ -138,8 +138,10 @@ impl<F: RichField, const D: usize> ArithmeticStark<F, D> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pad the trace with zero rows if it doesn't have enough rows
|
// Pad the trace with zero rows if it doesn't have enough rows
|
||||||
// to accommodate the range check columns.
|
// to accommodate the range check columns. Also make sure the
|
||||||
for _ in trace_rows.len()..RANGE_MAX {
|
// trace length is a power of two.
|
||||||
|
let padded_len = trace_rows.len().next_power_of_two();
|
||||||
|
for _ in trace_rows.len()..std::cmp::max(padded_len, RANGE_MAX) {
|
||||||
trace_rows.push(vec![F::ZERO; columns::NUM_ARITH_COLUMNS]);
|
trace_rows.push(vec![F::ZERO; columns::NUM_ARITH_COLUMNS]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user