Skip to content

Commit fbf82d8

Browse files
committed
feat: csvtraces fill up to column size
1 parent 3f1f9b7 commit fbf82d8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

prover/utils/csvtraces/csvtraces.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,11 @@ func (c *CsvTrace) Assign(run *wizard.ProverRuntime, names ...string) {
211211
length := utils.NextPowerOfTwo(c.nbRows)
212212
for _, k := range names {
213213
if v, ok := c.mapped[k]; ok {
214-
sv := smartvectors.RightZeroPadded(v, length)
214+
colLength := run.Spec.Columns.GetSize(ifaces.ColID(k))
215+
if colLength < length {
216+
utils.Panic("column %s has size %d, but trace has %d rows", k, colLength, c.nbRows)
217+
}
218+
sv := smartvectors.RightZeroPadded(v, colLength)
215219
run.AssignColumn(ifaces.ColID(k), sv)
216220
} else {
217221
utils.Panic("column not found %s", k)

0 commit comments

Comments
 (0)