-
Notifications
You must be signed in to change notification settings - Fork 248
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
Polynomial erasure coding (based on FFT, like v2.2 farmer plotting) #1163
Comments
I have a few questions, @dariolina. I see that Wouldn't we want to play with arguments in the future to expand more than 2x since our commitments are fixed size now? |
@nazar-pc To your second question, these FFTs work so nicely only with powers of 2, so if you want the number of source chunks to be arbitrary in the future, it should get pumped to the next power of 2 (which was happening under the hood in arkworks, and we hated it). Maybe have a separate helper that explicitly determines the correct |
Thanks, that is sufficient information for me for now |
I think I'll go with Arkworks-based implementation in rust-kzg for now. I hit numerous issues and glad I was able to compile the dependency at last:
That is in case it provides necessary APIs because otherwise I'll have to fix ckzg Rust integration, which I'd rather not spend time on. Alternatively we can try blst-from-scratch version, which being Rust only should at least compile without major issues. A whole other topic is that none of those libraries are |
|
Thanks a lot for suggestion, I'll go with it then |
Draft PR: #1214 |
Do we want to move the last task to a separate "improvement" issue since it's not necessary but a nice to have so you can close this big issue? |
Yes, please. Or we can just create an issue from it and resolve this one anyway. |
The correct way to erasure-code chunks is based on FFT, but in a different way than in v2.2 (used coset FFT).
To save time binding c-kzg ourselves, we could initially reuse existing. bindings from rust-kzg, which supports all needed functions.
We need several ingredients:
Corresponds to c-kzg new_fft_settings and rust-kzg
Corresponds to c-kzg das_fft_extension and rust-kzg
Corresponds to c-kzg recover_poly_from_samples and rust-kzg
See this test for a Rust mock-up of erasure coding and recovery for chunks.
Requires c-kzg fft_g1 or rust-kzg
Should implement the same functionality as mocked here
Additional function to improve Farming:
Similar to the above, but recovers the polynomial in coefficient form for use with KZG, instead of source chunks. Corresponds to
recover_poly_from_samples
from rust_kzg but without the last FFT in this line. See spec.The text was updated successfully, but these errors were encountered: