Switch KZG implementation to rust-kzg
#1281
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an upgrade from Dusk/Plonk stack to
rust-kzg
, the same that we use insubspace-erasure-coding
crate.blst
library is used from a fork that is in supranational/blst#150 (https://github.com/subspace/blst/tree/subspace-v1) andrust-kzg
is used from a fork that uses this fork ofblst
library (https://github.com/subspace/rust-kzg/tree/subspace-v1).Both of those forks are, hopefully, temporary.
Trusted setup for KZG is now designed for
2^15
elements, which is much bigger and no longer embedded in runtime by default. We verify solutions with runtime interface thanks to #1278 to make it still work and be fast too.I think API can still be improved around handling of zero bit at the end of each 32 bytes chunk at input of polynomial creation, but this is good enough replacement for now before we make further changes.
Fixes #1280.
Code contributor checklist: