Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant check in recover_polynomial_coeff? #251

Closed
kevaundray opened this issue Sep 5, 2024 · 2 comments · Fixed by #289
Closed

Redundant check in recover_polynomial_coeff? #251

kevaundray opened this issue Sep 5, 2024 · 2 comments · Fixed by #289

Comments

@kevaundray
Copy link
Contributor

This has been taken from Benedikt Wagner's document.

You already check that:
-  (1) cell indices contain no duplicates
-  (2) all cell indices are between 0 and CELLS_PER_EXT_BLOB. 
This should imply that there at most CELLS_PER_EXT_BLOB many cell indices.

I believe this code should be spec compliant, so this might imply a spec change is needed too.

Related to #246

@b-wagn
Copy link

b-wagn commented Sep 6, 2024

Note: this comment was about this part of the code.

@b-wagn
Copy link

b-wagn commented Sep 6, 2024

Also, you are right: this is also explicitly checked in the spec:

assert CELLS_PER_EXT_BLOB / 2 <= len(cell_indices) <= CELLS_PER_EXT_BLOB in this function.

To be spec cimpliant, we should have it explicitly. This also has the advantage of clearly stating the assumptions we make.
Feel free to just close the issue, or leave a comment saying it may be redundant in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants