Minimal 4844 version of c-kzg
Go to file
Pawan Dhananjay 2c151d7f7e
Rust bindings (#4)
* working build

* Move bindings.rs to root directory

* tidy build script

* Add initial rust safe bindings

* import fewer c stuff in bindings

* remove unnecessary blst definitions in bindings

* remove bindgen build dependency

* improve interface

* Remove more stuff from bindings

* Add a simple test

* Update error type

* Update verify_kzg_proof interface

* Return array instead of vec

* link with no-pie

* impl Send and Sync for KzgSettings; change mut pointers to const

* Remove no-pie linking

* Make FIELD_ELEMENTS_PER_BLOB a compile time variable

* Add load_trusted_setup method

* Cleanup

* Add failure case to bytes_to_bls_field

* Fix conditional compilation and ensure canonical blobs in test

* Add test vectors

* Remove blobk_commitment test case

* Change function signature

* Copy and delete instead of rename in build script

* Make consts public

* Add error conditions for invalid trusted setup

* Lowercase renamings

* Make blob public

* Add benchmarks

* Run test vectors only for mainnet spec

* Add README

* clippy

* Add rust CI checks

* actually add CI checks

* Fix CI

* Fix workflow again
2023-01-12 17:50:12 +00:00
.github/workflows Rust bindings (#4) 2023-01-12 17:50:12 +00:00
bindings Rust bindings (#4) 2023-01-12 17:50:12 +00:00
blst@6382d67c72 Add blst as submodule 2022-11-03 23:15:50 -07:00
inc Use BYTES_PER_FIELD_ELEMENT 2022-11-04 11:44:57 -07:00
lib Insert lib/ directory and update Readme 2021-02-02 11:36:36 +00:00
src Convert Polynomial type to struct (#60) 2023-01-12 17:35:59 +00:00
.gitignore Rust bindings (#4) 2023-01-12 17:50:12 +00:00
.gitmodules Patch blst submodule sha 2022-11-04 00:13:02 -07:00
LICENSE Initial commit 2021-02-01 20:15:45 +00:00
README.md Basic setup instructions in README 2022-11-04 16:56:16 -07:00
blst_sha.patch Patch blst submodule sha 2022-11-04 00:13:02 -07:00

README.md

C-KZG-4844: A minimal library for EIP-4844 Polynomial Commitments

This is a copy of C-KZG stripped down to support the Polynomial Commitments API:

  • compute_aggregate_kzg_proof
  • verify_aggregate_kzg_proof
  • blob_to_kzg_commitment
  • verify_kzg_proof

We also provide load_trusted_setup and free_trusted_setup to load the trusted setup data from a file into an object that can be passed to the API functions, and functions for converting commitments/proofs/points to/from bytes.

Installation

Install the blst submodule

git submodule update --init

Build blst

cd src
make blst

Build the C-KZG code

cd src
make