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

PeerDAS (EIP-7594) implementation #277

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

ArtiomTr
Copy link
Contributor

@ArtiomTr ArtiomTr commented Jan 2, 2025

In this pull request:

  • Added 2 arguments for new function in KZGSettings trait:
    • g1_lagrange_brp, for g1 points in Lagrange bit-reversal permutation form (same as c-kzg-4844);
    • cell_size - number of field elements per cell, used in DAS.
    - KZGSettings::new(g1_monomial, g2_monomial, fft_settings)
    + KZGSettings::new(g1_monomial, g1_lagrange_brp, g2_monomial, fft_settings, cell_size)
    Backends arkworks, arkworks3, blst, constantine and zkcrypto are updated accordingly
  • Renamed old DAS trait to DASExtension
  • Added new trait EcBackend, used to define backend for elliptic curve operations
  • Added new trait DAS, implementing EIP-7594 for specified EcBackend
  • Imported test vectors from c-kzg-4844
  • Bumped c-kzg-4844 hash to 0894e3ded53d6f85f5aa146f4fe3e80afb411b94
  • Added benchmarks from c-kzg-4844
  • Added rust-eth-kzg as benchmark target

ArtiomTr and others added 6 commits January 2, 2025 11:45
fix compute roots of unity issues for test to pass

_fft_field helper function

fix traits implementations for compute_roots_of_unity

compute_cells_and_kzg_proof

implement reverse bit order

Configured EIP-7594 vector tests

blst implement compute_cells_and_kzg_proofs, start implementing recover_cells_and_kzg_proofs

recovery

Cell recovery

Proof recovery

verify_cell_kzg_proof_batch

bug fix

bug fixes

Fix bindings

Fix clippy issues

EIP-7594 trait implementation

Optimized verify_cell_kzg_proof_batch by adding #[cfg(feature = "parallel")] in the function itself and also in some helper functions

Amended some parallelized functions: added cfg_iter_mut macro to simplify some code, deleted unsed parallelization, in intermediate_weights changed chunk size from 64 to r_powers.len() / rayon::current_num_threads() (also tried with thread::available_parallelism but this added more code with no performance improvment found

altered code to avoid zero index error

Refactor DAS implementation to support various trusted setup sizes / cell sizes

Refactor KZGSettings to remove Preset trait

Make DAS implementation work with different FIELD_ELEMENTS_PER_EXT_BLOB

Remove unused files
Fix formatting

Added parallel feature for rust-eth-kzg-benches

Added load_trusted_setup benchmarks

Fix rust-eth-kzg benchmarks
Added C bindings in eip-7594

Fix constantine tests
Remove unnecessary import

Remove unnecessary closures

Format files
arkworks implementation eip-7594

fix some errors

fix more errors

fix remaining ones

fix

remove

remove unused imports

try foix

make tests pass

fix

fix again

yet another fix

fix test
@ArtiomTr ArtiomTr mentioned this pull request Jan 2, 2025
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.

6 participants