-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make selector polynomials optional (#753)
- Loading branch information
1 parent
338788c
commit 3abb3af
Showing
8 changed files
with
847 additions
and
912 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 |
---|---|---|
|
@@ -22,21 +22,21 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: jetli/[email protected] | ||
- name: Add wasm32-unknown-unknown target | ||
run: rustup target add wasm32-unknown-unknown | ||
|
||
- name: Add rust-src | ||
run: rustup component add rust-src --toolchain nightly-2024-01-04-x86_64-unknown-linux-gnu | ||
run: rustup component add rust-src --toolchain nightly-2024-02-06-x86_64-unknown-linux-gnu | ||
- name: Install binaryen | ||
run: | | ||
set -e | ||
curl -L https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_116-x86_64-linux.tar.gz | tar xzf - | ||
export PATH=$PATH:$PWD/binaryen-version_116/bin | ||
wasm-opt --version | ||
set -e | ||
curl -L https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_116-x86_64-linux.tar.gz | tar xzf - | ||
export PATH=$PATH:$PWD/binaryen-version_116/bin | ||
wasm-opt --version | ||
- name: Build wasm files for both web and nodejs compilation targets | ||
run: | | ||
wasm-pack build --release --target nodejs --out-dir ./pkg/nodejs . -- -Z build-std="panic_abort,std" | ||
|
@@ -92,19 +92,19 @@ jobs: | |
const jsonObject = JSONBig.parse(string); | ||
return jsonObject; | ||
} | ||
function serialize(data) { // data is an object // return a Uint8ClampedArray | ||
// Step 1: Stringify the Object with BigInt support | ||
if (typeof data === "object") { | ||
data = JSONBig.stringify(data); | ||
} | ||
// Step 2: Encode the JSON String | ||
const uint8Array = new TextEncoder().encode(data); | ||
// Step 3: Convert to Uint8ClampedArray | ||
return new Uint8ClampedArray(uint8Array.buffer); | ||
} | ||
module.exports = { | ||
deserialize, | ||
serialize | ||
|
@@ -123,15 +123,15 @@ jobs: | |
const jsonObject = parse(string); | ||
return jsonObject; | ||
} | ||
export function serialize(data) { // data is an object // return a Uint8ClampedArray | ||
// Step 1: Stringify the Object with BigInt support | ||
if (typeof data === "object") { | ||
data = stringify(data); | ||
} | ||
// Step 2: Encode the JSON String | ||
const uint8Array = new TextEncoder().encode(data); | ||
// Step 3: Convert to Uint8ClampedArray | ||
return new Uint8ClampedArray(uint8Array.buffer); | ||
} | ||
|
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 |
---|---|---|
|
@@ -26,7 +26,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- name: Build | ||
|
@@ -38,7 +38,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- name: Docs | ||
|
@@ -50,7 +50,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: baptiste0928/cargo-install@v1 | ||
|
@@ -73,7 +73,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: baptiste0928/cargo-install@v1 | ||
|
@@ -106,7 +106,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: baptiste0928/cargo-install@v1 | ||
|
@@ -139,7 +139,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: baptiste0928/cargo-install@v1 | ||
|
@@ -172,7 +172,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: baptiste0928/cargo-install@v1 | ||
|
@@ -189,7 +189,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: jetli/[email protected] | ||
|
@@ -199,7 +199,7 @@ jobs: | |
- name: Install wasm32-unknown-unknown | ||
run: rustup target add wasm32-unknown-unknown | ||
- name: Add rust-src | ||
run: rustup component add rust-src --toolchain nightly-2024-01-04-x86_64-unknown-linux-gnu | ||
run: rustup component add rust-src --toolchain nightly-2024-02-06-x86_64-unknown-linux-gnu | ||
- name: Run wasm verifier tests | ||
# on mac: | ||
# AR=/opt/homebrew/opt/llvm/bin/llvm-ar CC=/opt/homebrew/opt/llvm/bin/clang wasm-pack test --firefox --headless -- -Z build-std="panic_abort,std" --features web | ||
|
@@ -212,7 +212,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: baptiste0928/cargo-install@v1 | ||
|
@@ -229,7 +229,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: baptiste0928/cargo-install@v1 | ||
|
@@ -286,7 +286,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: baptiste0928/cargo-install@v1 | ||
|
@@ -303,6 +303,8 @@ jobs: | |
with: | ||
node-version: "18.12.1" | ||
cache: "pnpm" | ||
- name: "Add rust-src" | ||
run: rustup component add rust-src --toolchain nightly-2024-02-06-x86_64-unknown-linux-gnu | ||
- name: Install dependencies for js tests and in-browser-evm-verifier package | ||
run: | | ||
pnpm install --no-frozen-lockfile | ||
|
@@ -324,7 +326,7 @@ jobs: | |
- name: Install solc | ||
run: (hash svm 2>/dev/null || cargo install svm-rs) && svm install 0.8.20 && solc --version | ||
- name: Install Anvil | ||
run: cargo install --git https://github.com/foundry-rs/foundry --rev b320f350156a0fb15c2eb13dc380deb2367c4474 --profile local --locked anvil --force | ||
run: cargo install --git https://github.com/foundry-rs/foundry --rev c2233ec9fe61e0920c61c6d779bc707252852037 --profile local --locked anvil --force | ||
- name: KZG prove and verify tests (EVM + VK rendered seperately) | ||
run: cargo nextest run --release --verbose tests_evm::kzg_evm_prove_and_verify_render_seperately_ --test-threads 1 | ||
- name: KZG prove and verify tests (EVM + kzg all) | ||
|
@@ -357,15 +359,15 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: jetli/[email protected] | ||
- name: Add wasm32-unknown-unknown target | ||
run: rustup target add wasm32-unknown-unknown | ||
|
||
- name: Add rust-src | ||
run: rustup component add rust-src --toolchain nightly-2024-01-04-x86_64-unknown-linux-gnu | ||
run: rustup component add rust-src --toolchain nightly-2024-02-06-x86_64-unknown-linux-gnu | ||
- uses: actions/checkout@v3 | ||
- name: Use pnpm 8 | ||
uses: pnpm/action-setup@v2 | ||
|
@@ -429,11 +431,11 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- name: Add rust-src | ||
run: rustup component add rust-src --toolchain nightly-2024-01-04-x86_64-unknown-linux-gnu | ||
run: rustup component add rust-src --toolchain nightly-2024-02-06-x86_64-unknown-linux-gnu | ||
- uses: actions/checkout@v3 | ||
- uses: baptiste0928/cargo-install@v1 | ||
with: | ||
|
@@ -463,7 +465,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: baptiste0928/cargo-install@v1 | ||
|
@@ -481,7 +483,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: baptiste0928/cargo-install@v1 | ||
|
@@ -498,7 +500,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: baptiste0928/cargo-install@v1 | ||
|
@@ -515,7 +517,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: baptiste0928/cargo-install@v1 | ||
|
@@ -525,7 +527,7 @@ jobs: | |
- name: Install solc | ||
run: (hash svm 2>/dev/null || cargo install svm-rs) && svm install 0.8.20 && solc --version | ||
- name: Install Anvil | ||
run: cargo install --git https://github.com/foundry-rs/foundry --rev b320f350156a0fb15c2eb13dc380deb2367c4474 --profile local --locked anvil --force | ||
run: cargo install --git https://github.com/foundry-rs/foundry --rev c2233ec9fe61e0920c61c6d779bc707252852037 --profile local --locked anvil --force | ||
- name: KZG prove and verify aggr tests | ||
run: cargo nextest run --release --verbose tests_evm::kzg_evm_aggr_prove_and_verify_::t --test-threads 4 -- --include-ignored | ||
|
||
|
@@ -536,7 +538,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: baptiste0928/cargo-install@v1 | ||
|
@@ -558,15 +560,15 @@ jobs: | |
python-version: "3.7" | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- name: Install solc | ||
run: (hash svm 2>/dev/null || cargo install svm-rs) && svm install 0.8.20 && solc --version | ||
- name: Setup Virtual Env and Install python dependencies | ||
run: python -m venv .env; source .env/bin/activate; pip install -r requirements.txt; | ||
- name: Install Anvil | ||
run: cargo install --git https://github.com/foundry-rs/foundry --rev b320f350156a0fb15c2eb13dc380deb2367c4474 --profile local --locked anvil --force | ||
run: cargo install --git https://github.com/foundry-rs/foundry --rev c2233ec9fe61e0920c61c6d779bc707252852037 --profile local --locked anvil --force | ||
- name: Build python ezkl | ||
run: source .env/bin/activate; unset CONDA_PREFIX; maturin develop --features python-bindings --release | ||
- name: Run pytest | ||
|
@@ -582,7 +584,7 @@ jobs: | |
python-version: "3.7" | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: baptiste0928/cargo-install@v1 | ||
|
@@ -613,7 +615,7 @@ jobs: | |
python-version: "3.10" | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly-2024-01-04 | ||
toolchain: nightly-2024-02-06 | ||
override: true | ||
components: rustfmt, clippy | ||
- uses: baptiste0928/cargo-install@v1 | ||
|
@@ -623,7 +625,7 @@ jobs: | |
- name: Install solc | ||
run: (hash svm 2>/dev/null || cargo install svm-rs) && svm install 0.8.20 && solc --version | ||
- name: Install Anvil | ||
run: cargo install --git https://github.com/foundry-rs/foundry --rev b320f350156a0fb15c2eb13dc380deb2367c4474 --profile local --locked anvil --force | ||
run: cargo install --git https://github.com/foundry-rs/foundry --rev c2233ec9fe61e0920c61c6d779bc707252852037 --profile local --locked anvil --force | ||
- name: Setup Virtual Env and Install python dependencies | ||
run: python -m venv .env; source .env/bin/activate; pip install -r requirements.txt; | ||
- name: Build python ezkl | ||
|
Oops, something went wrong.