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

Make Structure of README's more Consistent and Fix Dead Link #507

Merged
merged 3 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ high-level languages, providing convenient wrappers around C functions. These
bindings are intended to be used by Ethereum clients, to avoid re-implementation
of crucial cryptographic functions.

For all bindings, you first need to make sure that the `blst` submodule is correctly pulled after clone.
To do so, you may need to run:

```
git submodule update --init
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm we should try to fix the Makefiles so this isn't necessary. We can do something like this:

$(MAKE) -C ../../src blst

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove this comment and we can open another PR for fixing the Makefiles. :)

```


| Language | Link |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe a single blank line between paragraphs/sections is most common in this repo.

|----------|--------------------------------------|
| C# | [README](bindings/csharp/README.md) |
Expand Down Expand Up @@ -88,8 +96,8 @@ C-KZG-4844 is not expected to be used outside the bindings.
The source code of C-KZG-4844 was audited by [Sigma
Prime](https://sigmaprime.io/) in June 2023. You can find the [audit
report](doc/audit/Sigma_Prime_Ethereum_Foundation_KZG_Implementations_Security_Assessment.pdf)
in the `doc/audit/` directory. Notably, the audit was for commit `fd24cf8` and
code introduced for EIP-7594 *has not been audited yet*.
in the `doc/audit/` directory. Notably, the audit was for commit `fd24cf8` and
code introduced for EIP-7594 *has not been audited yet*.

### Why C?

Expand Down
2 changes: 1 addition & 1 deletion bindings/csharp/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# C# bindings
# C# Bindings for the C-KZG Library

This directory contains C# bindings for the C-KZG-4844 library.

Expand Down
18 changes: 9 additions & 9 deletions bindings/go/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Go bindings
# Go Bindings for the C-KZG Library

This package implements Go bindings (using [Cgo](https://go.dev/blog/cgo)) for the
exported functions in [C-KZG-4844](https://github.com/ethereum/c-kzg-4844).
This directory contains Go bindings for the C-KZG-4844 library.
The bindings use [Cgo](https://go.dev/blog/cgo).

b-wagn marked this conversation as resolved.
Show resolved Hide resolved
## Prerequisites

This package requires `1.19rc1` or later. Version `1.19beta1` and before will
not work. These versions have a linking issue and are unable to see `blst`
functions.

## Installation

```
go get github.com/ethereum/c-kzg-4844/v2
```

## Go version

This package requires `1.19rc1` or later. Version `1.19beta1` and before will
not work. These versions have a linking issue and are unable to see `blst`
functions.

## Tests

Run the tests with this command:
Expand Down
10 changes: 5 additions & 5 deletions bindings/java/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Java binding
# Java Bindings for the C-KZG Library

## Build shared library
This directory contains Java bindings for the C-KZG-4844 library.

### Prerequisites
## Prerequisites

* Build blst by running `make blst` in the [library source directory](../../src).
* Set `JAVA_HOME` environment variable to a JDK with an `include` folder containing a `jni.h` file.

### Build
## Build

```bash
make build
Expand All @@ -25,7 +25,7 @@ the [Makefile](./Makefile).
make test
```

## Library
## Public Maven Repo

The library which uses this binding and publishes a package to a public maven repo
is [jc-kzg-4844](https://github.com/ConsenSys/jc-kzg-4844).
24 changes: 13 additions & 11 deletions bindings/nim/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Nim bindings
# Nim Bindings for the C-KZG Library

This directory contains Nim bindings for the c-kzg-4844 library.
This directory contains Nim bindings for the C-KZG-4844 library.

## Requirements
## Prerequisites

These bindings support Nim compiler version 1.2, 1.4, 1.6, and devel.

Expand All @@ -12,6 +12,14 @@ You also need to install dependencies:
nimble install stew
```

## Installation
Install via nimble:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add blank line between these.

```
nimble install https://github.com/ethereum/c-kzg-4844
```


## Tests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete second blank line.

Currently, reference tests only support Nim compiler version 1.4, and 1.6 because of yaml library limitations.
Expand All @@ -36,12 +44,6 @@ Or from c-kzg-4844 root folder:
nimble test
```

## How to use these bindings in your project

Install via nimble:

```
nimble install https://github.com/ethereum/c-kzg-4844
```
## Usage

Then import `kzg4844/kzg` or `kzg4844/kzg_abi` into your project.
After installation, import `kzg4844/kzg` or `kzg4844/kzg_abi` into your project.
15 changes: 3 additions & 12 deletions bindings/node.js/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
# C-KZG-4844

This is a TypeScript library for EIP-4844 and EIP-7594 that implements the
[Polynomial Commitments](https://github.com/ethereum/consensus-specs/blob/dev/specs/deneb/polynomial-commitments.md)
API. The core functionality was originally a stripped-down copy of
[C-KZG](https://github.com/benjaminion/c-kzg), but has been heavily modified
since then. This package wraps that native `c-kzg` C code in C/C++ NAPI
bindings for use in node.js applications.

Important Links:
[EIP-4844 - Polynomial Commitments](https://github.com/ethereum/consensus-specs/blob/dev/specs/deneb/polynomial-commitments.md)
[EIP-7594 - Polynomial Commitments Sampling](https://github.com/ethereum/consensus-specs/blob/dev/specs/_features/eip7594/polynomial-commitments-sampling.md)
# Node.js Bindings for the C-KZG Library

This directory contains Node.js bindings for the C-KZG-4844 library.

## Prerequisites

Expand Down
4 changes: 2 additions & 2 deletions bindings/python/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Python bindings
# Python Bindings for the C-KZG Library

This directory contains Python bindings for the C-KZG-4844 library.

## Prerequisites

These bindings require `python3` and `PyYAML`.
These bindings require `python3`, `PyYAML` and `make`.
```
sudo apt install python3 python3-pip
python3 -m pip install PyYAML
Expand Down
13 changes: 11 additions & 2 deletions bindings/rust/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Rust bindings
# Rust Bindings for the C-KZG Library

Generates the rust bindings for the c-kzg library.
This directory contains Rust bindings for the C-KZG-4844 library.

## Prerequisites

Make sure you have `cargo` and `rust` installed.
You can do so with [`rustup`](https://rustup.rs):

```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

## Build

Expand Down
4 changes: 3 additions & 1 deletion fuzz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ there is a `fuzz_<function>.rs` file for each target. These use
can provide the reference tests as the starting corpus, which gives `arbitrary` a better idea of
what inputs should be. This will differentially fuzz EIP-4844 functions with
[Constantine](https://github.com/mratsim/constantine) and EIP-7594 functions with
[Rust-Eth-KZG](https://github.com/crate-crypto/rust-eth-kzg(https://github.com/crate-crypto/peerdas-kzg).
[Rust-Eth-KZG](https://github.com/crate-crypto/rust-eth-kzg).

## Dependencies

Expand All @@ -31,6 +31,8 @@ cargo install cargo-fuzz

# Nim dependencies

Get and build `nim v1.6` like this:

```
git clone git@github.com:nim-lang/Nim.git
cd Nim
Expand Down
Loading