You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mulfib8 example is supposed to compute the n-th term of the multiplicative Fibonacci sequence, but the sequence is underconstrained for this purpose.
The transition constraints
only ensure that the next line is computed correctly from the last two entries in the current line.
However, the assertions
let last_step = self.trace_length() - 1;vec![Assertion::single(0,0,BaseElement::new(1)),Assertion::single(1,0,BaseElement::new(2)),Assertion::single(6, last_step,self.result),]
only fix the first two entries of the first row. The prover can thus set the rest of the first row to arbitrary values, in particular the last two entries, and thus change the result that is supposed to be the n-th term of the multiplicative Fibonacci sequence.
The fix should probably be to add constraints for the rest of the first row:
let last_step = self.trace_length() - 1;vec![Assertion::single(0,0,BaseElement::new(1)),Assertion::single(1,0,BaseElement::new(2)),Assertion::single(2,0,BaseElement::new(2)),Assertion::single(3,0,BaseElement::new(4)),Assertion::single(4,0,BaseElement::new(8)),Assertion::single(5,0,BaseElement::new(32)),Assertion::single(6,0,BaseElement::new(256)),Assertion::single(7,0,BaseElement::new(8192)),Assertion::single(6, last_step,self.result),]
All code is from examples/src/fibonacci/mulfib8/air.rs.
The text was updated successfully, but these errors were encountered:
The mulfib8 example is supposed to compute the n-th term of the multiplicative Fibonacci sequence, but the sequence is underconstrained for this purpose.
The transition constraints
only ensure that the next line is computed correctly from the last two entries in the current line.
However, the assertions
only fix the first two entries of the first row. The prover can thus set the rest of the first row to arbitrary values, in particular the last two entries, and thus change the result that is supposed to be the n-th term of the multiplicative Fibonacci sequence.
The fix should probably be to add constraints for the rest of the first row:
All code is from
examples/src/fibonacci/mulfib8/air.rs
.The text was updated successfully, but these errors were encountered: