-
Notifications
You must be signed in to change notification settings - Fork 130
Description
Description
Currently, the reported line counts are always used to determine the height of modules in the generated lt file. There are two competing issues here:
- (Silent Errors) When the reported line counts differ from the actual line counts for some module
m, theltfile ends up withnullrows at the end of the trace form. This happens without warning, and which can then lead to a constraint failure. - (Inaccurate Counts) The other issue is that the line counts are used as a metric to estimate the cost of a given operation. But, the cost of one call (i.e. row) to a
zkasmfunction may result in multiple rows in the final (expanded) trace. Thus, if we counted only one row, then our cost metric is not very accurate.
NOTE: there are two reasons one row for a zkasm function can lead to multiple rows in the final trace: (i) for multi-line functions, that one row will be expanded into potentially multiple lines during trace expansion; (ii) that zkasm function may call other functions (which hence add more cells).
Approach
The proposed approach is to decouple line counts from the lt file generation. That is, the lt file is generated using the actual rows inserted, and does not consider the reported line counts. This may require a go-corset update since it currently uses the ColumnHeader to determine the module height.