Skip to content

Commit

Permalink
fix: Potential off-by-one error
Browse files Browse the repository at this point in the history
Co-authored-by: Rodrigo Ferrera <[email protected]>
  • Loading branch information
Alan and raugfer committed Jul 9, 2024
1 parent fce084f commit 6c5e197
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/fri.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def prove( self, codeword, proof_stream ):
codewords = self.commit(codeword, proof_stream)

# get indices
top_level_indices = self.sample_indices(proof_stream.prover_fiat_shamir(), len(codewords[1]), len(codewords[-1]), self.num_colinearity_tests)
top_level_indices = self.sample_indices(proof_stream.prover_fiat_shamir(), len(codewords[0])/2, len(codewords[-1]), self.num_colinearity_tests)
indices = [index for index in top_level_indices]

# query phase
Expand Down

3 comments on commit 6c5e197

@Holindauer
Copy link
Contributor

@Holindauer Holindauer commented on 6c5e197 Jul 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes an infinite loop for tests that involve fri

@aszepieniec
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes an infinite loop for tests that involve fri

Which test, specifically? And how about suggesting a fix?

@Holindauer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made a pr with fix and explanation

Please sign in to comment.