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

Switch KZG implementation to rust-kzg #1281

Merged
merged 1 commit into from
Mar 22, 2023
Merged

Switch KZG implementation to rust-kzg #1281

merged 1 commit into from
Mar 22, 2023

Conversation

nazar-pc
Copy link
Member

This is an upgrade from Dusk/Plonk stack to rust-kzg, the same that we use in subspace-erasure-coding crate.

blst library is used from a fork that is in supranational/blst#150 (https://github.com/subspace/blst/tree/subspace-v1) and rust-kzg is used from a fork that uses this fork of blst 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:

@nazar-pc nazar-pc added the breaking-consensus This PR introduces breaking changes to the consensus label Mar 21, 2023
@nazar-pc nazar-pc force-pushed the runtime-interface-for-solution-verification branch from 02b3277 to 94db1f3 Compare March 22, 2023 08:19
Base automatically changed from runtime-interface-for-solution-verification to main March 22, 2023 08:20
@nazar-pc nazar-pc force-pushed the rust-kzg-kzg branch 2 times, most recently from 17d601a to d6435ed Compare March 22, 2023 09:23
@nazar-pc
Copy link
Member Author

Another conflict with main, rebased once again, sorry

@nazar-pc
Copy link
Member Author

@i1i1 @ozgunozerk also note that proper Clang needs to be installed on macOS now due to C dependency

@nazar-pc nazar-pc requested a review from dariolina March 22, 2023 16:52
vedhavyas

This comment was marked as duplicate.

@nazar-pc nazar-pc merged commit 3cfd452 into main Mar 22, 2023
@nazar-pc nazar-pc deleted the rust-kzg-kzg branch March 22, 2023 19:24
@nazar-pc nazar-pc restored the rust-kzg-kzg branch March 22, 2023 19:26
@nazar-pc nazar-pc mentioned this pull request Mar 22, 2023
1 task
@nazar-pc nazar-pc deleted the rust-kzg-kzg branch March 22, 2023 19:26
i1i1 added a commit to autonomys/subspace-pulsar-sdk that referenced this pull request Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-consensus This PR introduces breaking changes to the consensus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace KZG implementation with the same primitives used for polynomial erasure coding
2 participants