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

Ethereum KZG polynomial commitments / EIP-4844 (part 1) #239

Merged
merged 10 commits into from
Aug 13, 2023
Merged

Ethereum KZG polynomial commitments / EIP-4844 (part 1) #239

merged 10 commits into from
Aug 13, 2023

Conversation

@mratsim mratsim added the enhancement :shipit: New feature or request label May 24, 2023
@mratsim
Copy link
Owner Author

mratsim commented May 29, 2023

Failures due to an upstream regression: nim-lang/Nim#21958

@mratsim mratsim closed this Jun 1, 2023
@mratsim mratsim reopened this Jun 1, 2023
@mratsim mratsim changed the title Ethereum KZG polynomial commitments / EIP-4844 Ethereum KZG polynomial commitments / EIP-4844 (part 1) Aug 13, 2023
@mratsim
Copy link
Owner Author

mratsim commented Aug 13, 2023

The EIP 4844 / Ethereum KZG PR has become too huge and will be split in at least 2 parts.
We will merge this part, with minimal testing, as it will serve as an example as Constantine public API for serialization of Banderwagon and the library structure for IPA commitments (cc @zah)

The first part introduces:

  • a significant refactoring of the serialization, codecs primitives and their error models. This impact the Ethereum BLS Signatures API.
  • The internal primitives (working on deserialized types) have all be implemented and significantly optimized, in particular:
    • bit-reversal permutations is 33% faster than reference c-kzg-4844 by optimizing cache line usage. Note: this can be pre-computed and cached for Ethereum, but might be critical for Plonkish arithmetization in ZK provers
    • KZG proof generation caches inverse generation
  • strided views (mono-dimensional tensors) for zero-copy FFTs.
  • Polynomials, lagrange interpolation and Barycentric formulas
    image
  • a binary trusted setup interchange format specification, tuned for loading speed, including with SIMD, https://github.com/mratsim/constantine/blob/48ecc5cec88696ef46994a87f6f46b70069d2622/constantine/trusted_setups/README.md
  • a SAGE generator for trusted setups related constants (primitives roots of unity, ...)

@mratsim mratsim marked this pull request as ready for review August 13, 2023 13:00
@mratsim mratsim merged commit f57d071 into master Aug 13, 2023
12 checks passed
@mratsim mratsim deleted the kzg branch August 13, 2023 13:08
@mratsim mratsim mentioned this pull request Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement :shipit: New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant