Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Conversation

@ph4r05
Copy link

@ph4r05 ph4r05 commented Jul 15, 2021

This PR fixes small_fib example for indices of format 2^x.

When testing claims with index: 2^x, x >=1, value 1 passes the proof verification. I think the reason is how the trace is constructed.

Trace length is defined as power of two:

let trace_length = self.index.next_power_of_two();

But if self.index is already power of two, trace_length == self.index. It can be a bit misleading that next keyword returns greater or equal power of two

Thus if I change it to

let trace_length = (self.index + 1).next_power_of_two();

all indices work fine now.

  • Tag the PR with wip while in development.
  • Assign yourself as to the PR
  • Assign relevant labels such as bug, enhancement.
  • Request reviews if the PR is large, complex or you would like an extra pair of eyes to go over it.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • Add new entries to the Changelog.md.
  • Update version numbers as needed.

https://semver.org/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants