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

feat: kzg commitments over rs encoded grids #53

Merged
merged 13 commits into from
Nov 14, 2023
Merged

Conversation

dndll
Copy link
Collaborator

@dndll dndll commented Nov 2, 2023

Description

Introduces a KZG erasure commitment scheme over 2D reed-solomon codes with perfect squares. Commits to each row in the matrix, ready for disseminating (fields, proofs) to DAS nodes. Sampling these DAS nodes, we can easily verify the proof provided and determine if the DAS node is colluding quite quickly.

With the provided interface, we can quickly drop in new schemes, such as a Homormorphic Hash based commitment scheme. This is required when we consider DAS requirements on the network.

We should, in the future, abstract away the erasure coding, as we don't always need an MDS code for efficient schemes.

I will utilise this for da-client in another PR, which also requires deciding on a trusted setup and how to commit the root to L1. We can probably get away with one root commitment, compressing the point and posting that, but needs more investigation. I've also removed the point compression as Lambdaworks might implement point compression and endianness serialization soon. Related work https://github.com/lambdaclass/lambdaworks/blob/main/crypto/src/commitments/kzg.rs#L52 & lambdaclass/lambdaworks#323

Other:

  • makes blob store compile at test time
  • style and formatting
  • workspace dependencies for most crates

Bumps major version due to:

  • blob contract optimisations
  • erasure commitments

@dndll dndll force-pushed the feat/2d-interleaved-codes branch 4 times, most recently from 308e8ef to a4745b6 Compare November 2, 2023 15:12
@dndll dndll force-pushed the feat/2d-interleaved-codes branch 2 times, most recently from 53c4c05 to 3a4efd1 Compare November 13, 2023 13:08
@dndll dndll force-pushed the feat/2d-interleaved-codes branch from 3a4efd1 to a494fce Compare November 13, 2023 13:11
@dndll dndll mentioned this pull request Nov 13, 2023
8 tasks
@dndll dndll force-pushed the feat/2d-interleaved-codes branch 4 times, most recently from e850dd4 to 616b45b Compare November 14, 2023 11:39
@dndll dndll force-pushed the feat/2d-interleaved-codes branch from 616b45b to 39a4231 Compare November 14, 2023 11:45
@dndll dndll marked this pull request as ready for review November 14, 2023 11:56
@dndll dndll merged commit 9aef854 into main Nov 14, 2023
3 checks passed
@dndll dndll deleted the feat/2d-interleaved-codes branch November 14, 2023 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant