-
Notifications
You must be signed in to change notification settings - Fork 119
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
feat: Use FFT to encode polynomials in eval form #385
Conversation
…but we give it num_coeffs, which is degree+1
// TODO TEMPORARY: enforce power-of-2 chunk size | ||
// Remove this restriction after we get KZG in eval form | ||
// https://github.com/EspressoSystems/jellyfish/issues/339 | ||
if payload_chunk_size != eval_domain.size() { |
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.
If payload_chunk_size
is smaller. Could we simply padding zero here?
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.
Yes. The FFT pads with zero up to the next power of 2. This wouldn't be a problem except it screws up recovery. For a degree d
polynomial I need next_power_of_2(d)
points to interpolate, so we're essentially forced to use a power of 2 degree anyway. This PR is intended to be a temporary stop-gap, so I decided that it's best for now to simply enforce a power-of-2 degree at construction. This sanity check is merely a redundant backup check on the constructor.
Description
closes: #384
closes: #313
Tests are currently trivial due to lack of proper namespace API.
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
Pending
section inCHANGELOG.md
Files changed
in the GitHub PR explorer