-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate docs website + improved docs (#389)
* Update README.md (#385) * refactor * refactor * refactor * rename task * update codespell * multi gpu docs (#391) * Refactor * refacotr * fix typo * Apply suggestions from code review Co-authored-by: Jeremy Felder <[email protected]> * refactor * refactor --------- Co-authored-by: DmytroTym <[email protected]> Co-authored-by: ChickenLover <[email protected]> Co-authored-by: Jeremy Felder <[email protected]>
- Loading branch information
1 parent
e8cd2d7
commit 7026bfb
Showing
49 changed files
with
15,988 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'docs/*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to GitHub Pages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: 'repo' | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: npm | ||
cache-dependency-path: ./repo/docs/package-lock.json | ||
|
||
- name: Install dependencies | ||
run: npm install --frozen-lockfile | ||
working-directory: ./repo/docs | ||
|
||
- name: Build website | ||
run: npm run build | ||
working-directory: ./repo/docs | ||
|
||
- name: Copy CNAME to build directory | ||
run: echo "dev.ingonyama.com" > ./build/CNAME | ||
working-directory: ./repo/docs | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./build | ||
user_name: github-actions[bot] | ||
user_email: 41898282+github-actions[bot]@users.noreply.github.com | ||
working-directory: ./repo/docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Test Deploy to GitHub Pages | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'docs/*' | ||
|
||
jobs: | ||
test-deploy: | ||
name: Test deployment of docs webiste | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: 'repo' | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: npm | ||
cache-dependency-path: ./repo/docs/package-lock.json | ||
|
||
- name: Install dependencies | ||
run: npm install --frozen-lockfile | ||
working-directory: ./repo/docs | ||
- name: Test build website | ||
run: npm run build | ||
working-directory: ./repo/docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ICICLE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.docusaurus/ | ||
node_modules/ | ||
yarn.lock | ||
.DS_Store | ||
|
||
# tex build artifacts | ||
.aux | ||
.bbl | ||
.bcf | ||
.blg | ||
.fdb_latexmk | ||
.fls | ||
.log | ||
.out | ||
.xml | ||
.gz | ||
.toc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.docusaurus/ | ||
node_modules/ | ||
yarn.lock | ||
.DS_Store | ||
|
||
# tex build artifacts | ||
.aux | ||
.bbl | ||
.bcf | ||
.blg | ||
.fdb_latexmk | ||
.fls | ||
.log | ||
.out | ||
.xml | ||
.gz | ||
.toc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"proseWrap": "preserve", | ||
"endOfLine": "lf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dev.ingonyama.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ npm i | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ npm start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ npm run build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true npm run deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> npm run deploy | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# ZKContainer | ||
|
||
We found that developing ZK provers with ICICLE gives developers the ability to scale ZK provers across many machines and many GPUs. To make this possible we developed the ZKContainer. | ||
|
||
## What is a ZKContainer? | ||
|
||
A ZKContainer is a standardized, optimized and secure docker container that we configured with ICICLE applications in mind. A developer using our ZKContainer can deploy an ICICLE application on a single machine or on a thousand GPU machines in a data center with minimal concerns regarding compatibility. | ||
|
||
ZKContainer has been used by Ingonyama clients to achieve scalability across large data centers. | ||
We suggest you read our [article](https://medium.com/@ingonyama/product-announcement-zk-containers-0e2a1f2d0a2b) regarding ZKContainer to understand the benefits of using them. | ||
|
||
![ZKContainer inside a ZK data center](../static/img/architecture-zkcontainer.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Contributor's Guide | ||
|
||
We welcome all contributions with open arms. At Ingonyama we take a village approach, believing it takes many hands and minds to build a ecosystem. | ||
|
||
## Contributing to ICICLE | ||
|
||
- Make suggestions or report bugs via [GitHub issues](https://github.com/ingonyama-zk/icicle/issues) | ||
- Contribute to the ICICLE by opening a [pull request](https://github.com/ingonyama-zk/icicle/pulls). | ||
- Contribute to our [documentation](https://github.com/ingonyama-zk/icicle/tree/main/docs) and [examples](https://github.com/ingonyama-zk/icicle/tree/main/examples). | ||
- Ask questions on Discord | ||
|
||
### Opening a pull request | ||
|
||
When opening a [pull request](https://github.com/ingonyama-zk/icicle/pulls) please keep the following in mind. | ||
|
||
- `Clear Purpose` - The pull request should solve a single issue and be clean of any unrelated changes. | ||
- `Clear description` - If the pull request is for a new feature describe what you built, why you added it and how its best that we test it. For bug fixes please describe the issue and the solution. | ||
- `Consistent style` - Rust and Golang code should be linted by the official linters (golang fmt and rust fmt) and maintain a proper style. For CUDA and C++ code we use [`clang-format`](https://github.com/ingonyama-zk/icicle/blob/main/.clang-format), [here](https://github.com/ingonyama-zk/icicle/blob/605c25f9d22135c54ac49683b710fe2ce06e2300/.github/workflows/main-format.yml#L46) you can see how we run it. | ||
- `Minimal Tests` - please add test which cover basic usage of your changes . | ||
|
||
## Questions? | ||
|
||
Find us on [Discord](https://discord.gg/6vYrE7waPj). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Ingonyama Grant programs | ||
|
||
Ingonyama understands the importance of supporting and fostering a vibrant community of researchers and builders to advance ZK. To encourage progress, we are not only developing in the open but also sharing resources with researchers and builders through various programs. | ||
|
||
## ICICLE ZK-GPU Ecosystem Grant | ||
|
||
Ingonyama invites researchers and practitioners to collaborate in advancing ZK acceleration. We are allocating $100,000 for grants to support this initiative. | ||
|
||
### Bounties & Grants | ||
|
||
Eligibility for grants includes: | ||
|
||
1. **Students**: Utilize ICICLE in your research. | ||
2. **Performance Improvement**: Enhance the performance of accelerated primitives in ICICLE. | ||
3. **Protocol Porting**: Migrate existing ZK protocols to ICICLE. | ||
4. **New Primitives**: Contribute new primitives to ICICLE. | ||
5. **Benchmarking**: Compare ZK benchmarks against ICICLE. | ||
|
||
## Contact | ||
|
||
For questions or submissions: [[email protected]](mailto:[email protected]) | ||
|
||
**Read the full article [here](https://www.ingonyama.com/blog/icicle-for-researchers-grants-challenges)** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
# Run ICICLE on Google Colab | ||
|
||
Google Colab lets you use a GPU free of charge, it's an Nvidia T4 GPU with 16 GB of memory, capable of running latest CUDA (tested on Cuda 12.2) | ||
As Colab is able to interact with shell commands, a user can also install a framework and load git repositories into Colab space. | ||
|
||
## Prepare Colab environment | ||
|
||
First thing to do in a notebook is to set the runtime type to a T4 GPU. | ||
|
||
- in the upper corner click on the dropdown menu and select "change runtime type" | ||
|
||
![Change runtime](../../static/img/colab_change_runtime.png) | ||
|
||
- In the window select "T4 GPU" and press Save | ||
|
||
![T4 GPU](../../static/img/t4_gpu.png) | ||
|
||
Installing Rust is rather simple, just execute the following command: | ||
|
||
```sh | ||
!apt install rustc cargo | ||
``` | ||
|
||
To test the installation of Rust: | ||
|
||
```sh | ||
!rustc --version | ||
!cargo --version | ||
``` | ||
|
||
A successful installation will result in a rustc and cargo version print, a faulty installation will look like this: | ||
|
||
```sh | ||
/bin/bash: line 1: rustc: command not found | ||
/bin/bash: line 1: cargo: command not found | ||
``` | ||
|
||
Now we will check the environment: | ||
|
||
```sh | ||
!nvcc --version | ||
!gcc --version | ||
!cmake --version | ||
!nvidia-smi | ||
``` | ||
|
||
A correct environment should print the result with no bash errors for `nvidia-smi` command and result in a **Teslt T4 GPU** type: | ||
|
||
```sh | ||
nvcc: NVIDIA (R) Cuda compiler driver | ||
Copyright (c) 2005-2023 NVIDIA Corporation | ||
Built on Tue_Aug_15_22:02:13_PDT_2023 | ||
Cuda compilation tools, release 12.2, V12.2.140 | ||
Build cuda_12.2.r12.2/compiler.33191640_0 | ||
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 | ||
Copyright (C) 2021 Free Software Foundation, Inc. | ||
This is free software; see the source for copying conditions. There is NO | ||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
|
||
cmake version 3.27.9 | ||
|
||
CMake suite maintained and supported by Kitware (kitware.com/cmake). | ||
Wed Jan 17 13:10:18 2024 | ||
+---------------------------------------------------------------------------------------+ | ||
| NVIDIA-SMI 535.104.05 Driver Version: 535.104.05 CUDA Version: 12.2 | | ||
|-----------------------------------------+----------------------+----------------------+ | ||
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | ||
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | ||
| | | MIG M. | | ||
|=========================================+======================+======================| | ||
| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 | | ||
| N/A 39C P8 9W / 70W | 0MiB / 15360MiB | 0% Default | | ||
| | | N/A | | ||
+-----------------------------------------+----------------------+----------------------+ | ||
|
||
+---------------------------------------------------------------------------------------+ | ||
| Processes: | | ||
| GPU GI CI PID Type Process name GPU Memory | | ||
| ID ID Usage | | ||
|=======================================================================================| | ||
| No running processes found | | ||
+---------------------------------------------------------------------------------------+ | ||
``` | ||
|
||
## Cloning ICICLE and running test | ||
|
||
Now we are ready to clone ICICE repository, | ||
|
||
```sh | ||
!git clone https://github.com/ingonyama-zk/icicle.git | ||
``` | ||
|
||
We now can browse the repository and run tests to check the runtime environment: | ||
|
||
```sh | ||
!ls -la | ||
%cd icicle | ||
``` | ||
|
||
Let's run a test! | ||
Navigate to icicle/wrappers/rust/icicle-curves/icicle-bn254 and run cargo test: | ||
|
||
```sh | ||
%cd wrappers/rust/icicle-curves/icicle-bn254/ | ||
!cargo test --release | ||
``` | ||
|
||
:::note | ||
|
||
Compiling the first time may take a while | ||
|
||
::: | ||
|
||
Test run should end like this: | ||
|
||
```sh | ||
running 15 tests | ||
test curve::tests::test_ark_point_convert ... ok | ||
test curve::tests::test_ark_scalar_convert ... ok | ||
test curve::tests::test_affine_projective_convert ... ok | ||
test curve::tests::test_point_equality ... ok | ||
test curve::tests::test_field_convert_montgomery ... ok | ||
test curve::tests::test_scalar_equality ... ok | ||
test curve::tests::test_points_convert_montgomery ... ok | ||
test msm::tests::test_msm ... ok | ||
test msm::tests::test_msm_skewed_distributions ... ok | ||
test ntt::tests::test_ntt ... ok | ||
test ntt::tests::test_ntt_arbitrary_coset ... ok | ||
test msm::tests::test_msm_batch has been running for over 60 seconds | ||
test msm::tests::test_msm_batch ... ok | ||
test ntt::tests::test_ntt_coset_from_subgroup ... ok | ||
test ntt::tests::test_ntt_device_async ... ok | ||
test ntt::tests::test_ntt_batch ... ok | ||
|
||
test result: ok. 15 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 99.39s | ||
``` | ||
|
||
Viola, ICICLE in Colab! |
Oops, something went wrong.