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

Commit 2465f6f

Browse files
committed
Utilise all unused constant columns for lookups in tests.
1 parent c2c7bc8 commit 2465f6f

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
@@ -264,13 +264,13 @@ namespace nil {
264264
}
265265

266266
if constexpr (nil::blueprint::use_lookups<component_type>()) {
267-
// Components with lookups may use constant columns.
268-
// But now all constants are placed in the first column.
269-
// So we reserve the first column for non-lookup constants.
270-
// Rather universal for testing
271-
// We may start from zero if component doesn't use ordinary constants.
267+
// Use all of the unused constant columns for lookups
272268
std::vector<size_t> lookup_columns_indices;
273-
for( std::size_t i = 1; i < assignment.constants_amount(); i++ ) lookup_columns_indices.push_back(i);
269+
for(std::size_t i = 0; i < desc.constant_columns; i++) {
270+
if(assignment.constants()[i].size() == 0) {
271+
lookup_columns_indices.push_back(i);
272+
}
273+
}
274274

275275
std::size_t cur_selector_id = 0;
276276
for(const auto &gate: bp.gates()){

0 commit comments

Comments
 (0)