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

Optionally disable c bindings #278

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

ArtiomTr
Copy link
Contributor

@ArtiomTr ArtiomTr commented Jan 4, 2025

In this PR:

  • Added "c_bindings" feature in backend crates, allowing to optionally disable C bindings
  • Added _raw functions, that accept raw bytes

Related: grandinetech/grandine#73

ArtiomTr and others added 11 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
python install build module
@sauliusgrigaitis
Copy link
Member

So the motivation to disable this by default is that potentially c-kzg-4844 users will try to use rust-kzg without removing c-kzg-4844 and enabled bindings will lead to a cryptic error message.

@ArtiomTr ArtiomTr force-pushed the Optionally-disable-c-bindings branch 2 times, most recently from 500911c to 1d0a945 Compare January 8, 2025 20:29
@ArtiomTr ArtiomTr force-pushed the Optionally-disable-c-bindings branch from 1d0a945 to 884f7e6 Compare January 8, 2025 20:43
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.

7 participants