NilFoundation / zkllvm-blueprint

Circuit components definition library for zkLLVM circuit compiler
MIT License
43 stars 17 forks source link

Enable_selector doesn't increase allocated_rows #389

Closed ETatuzova closed 5 months ago

ETatuzova commented 5 months ago

Satisfiability check runs on blueprint assignment table "allocated_rows": https://github.com/NilFoundation/zkllvm-blueprint/blob/master/include/nil/blueprint/utils/satisfiability_check.hpp#L63

allocated_rows increases when witnesses or selectors are set, but they are not changed by enable_selector function: https://github.com/NilFoundation/zkllvm-blueprint/blob/master/include/nil/blueprint/blueprint/plonk/assignment.hpp#L368

So, if selector is switched on some last rows, where witnesses are not allocated, satisfiability check will be passed, but table may not satisfy constraints on these last rows.