Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit 0bd5368

Browse files
committed
Testing rig now uses all empty constant columns for lookup table packing.
1 parent 9da6da0 commit 0bd5368

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/test_plonk_component.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,13 @@ namespace nil {
277277
}
278278

279279
if constexpr (nil::blueprint::use_lookups<component_type>()) {
280-
// Components with lookups may use constant columns.
281-
// But now all constants are placed in the first column.
282-
// So we reserve the first column for non-lookup constants.
283-
// Rather universal for testing
284-
// We may start from zero if component doesn't use ordinary constants.
280+
// Use all of the unused constant columns for lookups
285281
std::vector<size_t> lookup_columns_indices;
286-
for( std::size_t i = 1; i < ArithmetizationParams::constant_columns; i++ ) lookup_columns_indices.push_back(i);
282+
for(std::size_t i = 0; i < ArithmetizationParams::constant_columns; i++) {
283+
if(assignment.constants()[i].size() == 0) {
284+
lookup_columns_indices.push_back(i);
285+
}
286+
}
287287
desc.usable_rows_amount = zk::snark::pack_lookup_tables_horizontal(
288288
bp.get_reserved_indices(),
289289
bp.get_reserved_tables(),

0 commit comments

Comments
 (0)