From e94525b1ef1afa02afeda0329c5dfede684f9aff Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Thu, 22 Feb 2024 13:25:34 +0100 Subject: [PATCH 1/3] fix typos --- tasks/II.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/II.md b/tasks/II.md index c8017afc6..db3710f1d 100644 --- a/tasks/II.md +++ b/tasks/II.md @@ -1,13 +1,13 @@ Task II - Optimise 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; +* The codebase needs to be updated to the latest [c-kzg-4844](https://github.com/ethereum/c-kzg-4844), dependencies also need 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. - - Other optimisations proposed in that [this dissertation](https://uwspace.uwaterloo.ca/bitstream/handle/10012/19626/Luo_Guiwen.pdf?sequence=3); + - 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 [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; - Discuss other ideas with the supervisor. -* Teams will need to try to figure out a way to get their algorithms useful for other ECC backends, if this is not possible for some reason - MSM optimistations will be needed to be implemented for `blst` backend; +* Teams will need to try to figure out a way to get their algorithms useful for other ECC backends, if this is not possible for some reason - MSM optimisations will be needed to be implemented for `blst` backend; * The build must pass on Github CI. Points: 2 From 6bccf97040d19772cd1adc981b4e81be18aca1cb Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Thu, 22 Feb 2024 13:26:53 +0100 Subject: [PATCH 2/3] fix typos --- tasks/III.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/III.md b/tasks/III.md index c4f8c35f5..94adb44a8 100644 --- a/tasks/III.md +++ b/tasks/III.md @@ -1,9 +1,9 @@ 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 codebase needs to be updated to the latest [c-kzg-4844](https://github.com/ethereum/c-kzg-4844), dependencies also need 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. -* Optimisations needs to be fuzzed against `go-kzg-4844` and `c-kzg-4844` with the [fuzzer](https://github.com/jtraglia/kzg-fuzz). +* Joints MSM optimisations need to be generic (compatible with multiple ECC backend). If not possible - consult with supervisor. +* Optimisations need 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. Points: 2 From 2a5aee13a176e7476389f7d51353fae36ea37071 Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Thu, 22 Feb 2024 13:27:22 +0100 Subject: [PATCH 3/3] fix typo --- mcl/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mcl/README.md b/mcl/README.md index b20382b8a..d067490c5 100644 --- a/mcl/README.md +++ b/mcl/README.md @@ -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. @@ -24,4 +24,4 @@ To run benchmarks, just run ```bash cargo bench -``` \ No newline at end of file +```