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

fix: typos in documentation files #271

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions mcl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## About

This is a KZG10 implmentation in Rust, heavily based on the Go implementation by protolambda https://github.com/protolambda/go-kzg.
This is a KZG10 implementation in Rust, heavily based on the Go implementation by protolambda https://github.com/protolambda/go-kzg.

This repo also contains Herumi MCL, as I could not find a way to make the cargo crate for mcl_rust work, and it does seem abandoned. It can be found here: https://github.com/herumi/mcl-rust.

Expand All @@ -24,4 +24,4 @@ To run benchmarks, just run

```bash
cargo bench
```
```
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Support for multiple backend ECC libraries is implemented via [Traits](https://g

# Drop-in replacement for c-kzg-4844

We aim to expose [an identical C interface](https://github.com/sifraitech/rust-kzg/blob/b4de1923a6218ea37021d0f9e3bd375dbf529d34/blst-from-scratch/src/eip_4844.rs#L604:L835) compared to [c-kzg-4844](https://github.com/ethereum/c-kzg-4844) so that `rust-kzg` could work as a drop-in replacement for c-kzg-4844. If you already use [c-kzg-4844 bindings](https://github.com/ethereum/c-kzg-4844/tree/main/bindings) you can try faster paralellized `rust-kzg` without any changes to your code-base by simply replacing the binary. Instructions for C#, Java, Nodejs, Python, Rust bindings are available [here](https://github.com/sifraitech/rust-kzg/blob/main/blst/run-c-kzg-4844-tests.sh).
We aim to expose [an identical C interface](https://github.com/sifraitech/rust-kzg/blob/b4de1923a6218ea37021d0f9e3bd375dbf529d34/blst-from-scratch/src/eip_4844.rs#L604:L835) compared to [c-kzg-4844](https://github.com/ethereum/c-kzg-4844) so that `rust-kzg` could work as a drop-in replacement for c-kzg-4844. If you already use [c-kzg-4844 bindings](https://github.com/ethereum/c-kzg-4844/tree/main/bindings) you can try faster parallelized `rust-kzg` without any changes to your code-base by simply replacing the binary. Instructions for C#, Java, Nodejs, Python, Rust bindings are available [here](https://github.com/sifraitech/rust-kzg/blob/main/blst/run-c-kzg-4844-tests.sh).

# Example

Expand Down
4 changes: 2 additions & 2 deletions tasks/II.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Task II - Optimise MSM
Task II - Optimize MSM

* The codebase needs to be updated to the latest [c-kzg-4844](https://github.com/ethereum/c-kzg-4844), dependencies also needs to be upgraded;
* KZG10 does a heavy MSM computation when calculating commitment and opening. `rust-kzg` with `blst` backend uses Pippenger method (including the parallel version of it) and produces decent results, however, `go-kzg-4844` is faster here, so there is a place for improvements. Possible optimisation directions:
- BGMW algoritm ([this dissertation](https://uwspace.uwaterloo.ca/bitstream/handle/10012/19626/Luo_Guiwen.pdf?sequence=3) is an easy to read source). We will likely benefit from it because our trusted setup is not very large, we can store precomputations in the memory. C++ implementation can be found [here](https://github.com/LuoGuiwen/MSM_blst/blob/2e098f09f07969ac3191406976be6d1c197100f2/main_p1.cpp#L294). However, we need a parallelized Rust version, so it could be that the best way is to build on top of [blst parallel implementation](https://github.com/supranational/blst/blob/master/bindings/rust/src/pippenger.rs#L116). Feel free to explore other code bases and use it if there is actually a more convenient parallel Pippenger implementation in Rust.
- BGMW algorithm ([this dissertation](https://uwspace.uwaterloo.ca/bitstream/handle/10012/19626/Luo_Guiwen.pdf?sequence=3) is an easy to read source). We will likely benefit from it because our trusted setup is not very large, we can store precomputations in the memory. C++ implementation can be found [here](https://github.com/LuoGuiwen/MSM_blst/blob/2e098f09f07969ac3191406976be6d1c197100f2/main_p1.cpp#L294). However, we need a parallelized Rust version, so it could be that the best way is to build on top of [blst parallel implementation](https://github.com/supranational/blst/blob/master/bindings/rust/src/pippenger.rs#L116). Feel free to explore other code bases and use it if there is actually a more convenient parallel Pippenger implementation in Rust.
- Other optimisations proposed in that [this dissertation](https://uwspace.uwaterloo.ca/bitstream/handle/10012/19626/Luo_Guiwen.pdf?sequence=3);
- Optimisations implemented in [arkmsm](https://github.com/snarkify/arkmsm), they also have an [explanation](https://hackmd.io/@drouyang/msm);
- Cuda GPU parallel algorithms, some examples [here](https://github.com/z-prize/2022-entries/tree/main/open-division/prize1-msm/prize1a-msm-gpu), but very likely there are faster versions now;
Expand Down
2 changes: 1 addition & 1 deletion tasks/III.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Task III - Join MSM optimisations

* The codebase needs to be updated to the latest [c-kzg-4844](https://github.com/ethereum/c-kzg-4844), dependencies also needs to be upgraded;
* The goal is to join all previous optimisations into one optimised MSM implementation. The teams need to collaborate in order to make the optimisations compatible between each other.
* Joints MSM optimisations needs to be genereric (compatible with multiple ECC backend). If not possible - consult with supervisor.
* Joints MSM optimisations needs to be generic (compatible with multiple ECC backend). If not possible - consult with supervisor.
* Optimisations needs to be fuzzed against `go-kzg-4844` and `c-kzg-4844` with the [fuzzer](https://github.com/jtraglia/kzg-fuzz).
* The build must pass on Github CI.

Expand Down
Loading