diff --git a/test/test_plonk_component.hpp b/test/test_plonk_component.hpp index a1e5c8c51..2045b9bf0 100644 --- a/test/test_plonk_component.hpp +++ b/test/test_plonk_component.hpp @@ -277,13 +277,13 @@ namespace nil { } if constexpr (nil::blueprint::use_lookups()) { - // Components with lookups may use constant columns. - // But now all constants are placed in the first column. - // So we reserve the first column for non-lookup constants. - // Rather universal for testing - // We may start from zero if component doesn't use ordinary constants. + // Use all of the unused constant columns for lookups std::vector lookup_columns_indices; - for( std::size_t i = 1; i < ArithmetizationParams::constant_columns; i++ ) lookup_columns_indices.push_back(i); + for(std::size_t i = 0; i < ArithmetizationParams::constant_columns; i++) { + if(assignment.constants()[i].size() == 0) { + lookup_columns_indices.push_back(i); + } + } desc.usable_rows_amount = zk::snark::pack_lookup_tables_horizontal( bp.get_reserved_indices(), bp.get_reserved_tables(),