-
Notifications
You must be signed in to change notification settings - Fork 997
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
Integrate new CosetEvals type #3701
Conversation
Hmm, I'm not a huge fan of I agree with Justin that ideally we would make With regards to the internal Fr representation, our job here seems harder than the Another (IMO worse) approach is to just handle the internal Fr representation with an untyped |
Yeah I think the naming can be improved, approved because we can iterate, and the important thing in this PR is removing internal cryptography types from the API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still a few issues around the PR. I'm fine with merging it as is, and iterating it on it, if you feel that's the right move.
@@ -370,7 +391,7 @@ def coset_for_cell(cell_id: CellID) -> Cell: | |||
roots_of_unity_brp = bit_reversal_permutation( | |||
compute_roots_of_unity(FIELD_ELEMENTS_PER_EXT_BLOB) | |||
) | |||
return Cell(roots_of_unity_brp[FIELD_ELEMENTS_PER_CELL * cell_id:FIELD_ELEMENTS_PER_CELL * (cell_id + 1)]) | |||
return CosetEvals(roots_of_unity_brp[FIELD_ELEMENTS_PER_CELL * cell_id:FIELD_ELEMENTS_PER_CELL * (cell_id + 1)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something wrong here with the function wants to return an evaluation domain but we are returning CosetEvals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed bc607ec in an attempt to clarify things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't approve my own PR. But this LGTM, thanks for the help guys!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks all!
This PR renames
Cell
toCosetEvals
and adds a newCell
type which is a flat array of bytes, likeBlob
. The oldCell
type was an abstraction leak (leaking BLS field elements) & the input bytes-representation wasn't a flat array of bytes; it wasVector[Bytes32, FIELD_ELEMENTS_PER_CELL]
which is difficult to work with.