Rust port of https://github.com/ethereum/c-kzg-4844 . Uses the blst rust bindings for all BLS functionality.
Tries to be almost a line to line port of the C code in c_kzg_4844.c while rearranging some consts and utils into
their own rust modules. Runs same test vectors from the original repository.
The crate exports 2 modules: kzg_mainnet and kzg_minimal which correspond to the mainnet and minimal spec variants
in the ethereum consensus specs
Each module contains the following:
Following constants:
FIELD_ELEMENTS_PER_BLOBBYTES_PER_BLOB
A Kzg struct with the associated methods:
load_trusted_setupload_trusted_setup_fileblob_to_kzg_commitmentcompute_kzg_proofcompute_blob_kzg_proofverify_kzg_proofverify_blob_kzg_proofverify_blob_kzg_proof_batch
The following structs with specified values of the FIELD_ELEMENTS_PER_BLOB constant which refers to either mainnet or minimal spec parameters:
BlobKzgSettingsTrustedSetup
The TrustedSetup struct is provided as an additional helper struct in this library to parse trusted setups in the json format provided in the
ethereum consensus specs
cargo bench