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

Add pi to BlobCommitment to enable optimized kzg commitment verification #1037

Open
litt3 opened this issue Dec 19, 2024 · 1 comment
Open
Assignees

Comments

@litt3
Copy link
Contributor

litt3 commented Dec 19, 2024

Problem

  • Currently, the process for a client to verify the kzg commitment contained in the BlobCommitment involves recomputing the commitment, and checking whether the computed commitment matches the received commitment
  • This is not always ideal, since computing the commitment requires the blob to have SRS data for the whole length of a blob (currently 32MiB, could be increased in the future)

Optimization

  • The proposed optimization involves computing an opening pi of the kzg commitment, and including pi in the BlobCommitment
  • Looking at this formula e(pi, s-z) = e(C-y, H):
    • z is the blob hash
    • C is the kzg commitment to the blob polynomial p
    • pi is the evaluation of C at z
    • s is the first public SRS point
    • y is the evaluation of p at z
    • H is the g2 generator
  • With access to pi from the BlobCommitment, a client will be able to check the equality of these pairings, thus verifying the commitment without any SRS data

Implementation Details

  • pi must be added to the BlobCommitment
  • any party creating the BlobCommitment will be responsible for also computing pi
    • this is either the client doing the dispersal, or the disperser
@litt3 litt3 self-assigned this Dec 19, 2024
@bxue-l2
Copy link
Contributor

bxue-l2 commented Dec 19, 2024

Related material. 4844 spec has a function definition for this purpose, see link here

But because 4844 treat the data as evaluation, the way to compute y is a bit different.

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

No branches or pull requests

2 participants