2022-11-01 14:24:02 +00:00
|
|
|
# C-KZG-4844: A minimal library for EIP-4844 Polynomial Commitments
|
|
|
|
|
2023-01-17 20:58:45 +00:00
|
|
|
This is a copy of [C-KZG](https://github.com/benjaminion/c-kzg) stripped-down to support the
|
|
|
|
[Polynomial Commitments](https://github.com/ethereum/consensus-specs/blob/dev/specs/eip4844/polynomial-commitments.md) API:
|
2022-11-04 23:56:16 +00:00
|
|
|
|
2022-11-01 14:24:02 +00:00
|
|
|
- `compute_aggregate_kzg_proof`
|
|
|
|
- `verify_aggregate_kzg_proof`
|
|
|
|
- `blob_to_kzg_commitment`
|
|
|
|
- `verify_kzg_proof`
|
|
|
|
|
2023-01-17 20:58:45 +00:00
|
|
|
We also provide functions for loading/freeing the trusted setup:
|
|
|
|
|
|
|
|
- `load_trusted_setup`
|
|
|
|
- `load_trusted_setup_file`
|
|
|
|
- `free_trusted_setup`
|
2022-11-04 23:56:16 +00:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
2023-01-17 20:58:45 +00:00
|
|
|
Initialize the blst submodule:
|
2022-11-04 23:56:16 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
git submodule update --init
|
|
|
|
```
|
|
|
|
|
2023-01-17 20:58:45 +00:00
|
|
|
Build blst:
|
2022-11-04 23:56:16 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
cd src
|
|
|
|
make blst
|
|
|
|
```
|
|
|
|
|
2023-01-17 20:58:45 +00:00
|
|
|
Build the C-KZG code:
|
2022-11-04 23:56:16 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
cd src
|
|
|
|
make
|
|
|
|
```
|