Modified extension gadget missing constraints
miha-stopar opened this issue · comments
What command(s) is the bug in?
No response
Describe the bug
StorageLeafConfig
and AccountLeafConfig
disable some constraints for the modified extension scenarios, see
for is_s in [true, false] {
ifx! {not!(config.is_mod_extension[is_s.idx()].expr()) => {
This is to be revised, some of the constraints (like the number of nibbles) need to triggered in these cases too.
Concrete steps to reproduce the bug. If it's able reproduce via testool, please share test_id
from jenkins report
No response
Closing this issue - after some reconsideration I realised it's all good. The constraints are disables only for the part (S
or C
) of the proof where there is no leaf returned by getProof
(note is_s.idx()
):
ifx! {not!(config.is_mod_extension[is_s.idx()].expr())
In this part of the proof, the last proof element is an extension node. The witness generator then adds a placeholder leaf to the end of the proof to maintain the layout, but the constraints are not needed for this one.