Skip to content

Commit

Permalink
Merge pull request #64 from 0xmozak/sai/merge_upstream
Browse files Browse the repository at this point in the history
Sync upstream
  • Loading branch information
matthiasgoergens authored Feb 27, 2024
2 parents 71c7980 + 84ef90a commit 3c735ea
Show file tree
Hide file tree
Showing 459 changed files with 3,139 additions and 73,927 deletions.
55 changes: 39 additions & 16 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ jobs:
uses: actions/checkout@v4

- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-02-01
uses: dtolnay/rust-toolchain@nightly

- name: Set up rust cache
uses: Swatinem/rust-cache@v2
Expand All @@ -54,24 +52,51 @@ jobs:
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1

- name: Check in evm subdirectory
run: cargo check --manifest-path evm/Cargo.toml
- name: Run cargo test
run: cargo test --workspace
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUST_LOG: 1
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1

- name: Run cargo test
run: cargo test --workspace
wasm:
name: Check wasm32 compatibility
runs-on: ubuntu-latest
timeout-minutes: 30
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
targets: wasm32-unknown-unknown

- name: Set up rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Check in plonky2 subdirectory for wasm targets
run: cargo check --manifest-path plonky2/Cargo.toml --target wasm32-unknown-unknown --no-default-features
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUST_LOG: 1
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1

wasm32:
name: wasm32 compatibility
- name: Check in starky subdirectory for wasm targets
run: cargo check --manifest-path starky/Cargo.toml --target wasm32-unknown-unknown --no-default-features
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUST_LOG: 1
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1

no_std:
name: Test Suite in no-std
runs-on: ubuntu-latest
timeout-minutes: 30
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
Expand All @@ -83,23 +108,22 @@ jobs:
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-02-01
targets: wasm32-unknown-unknown

- name: Set up rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Check in plonky2 subdirectory
run: cargo check --manifest-path plonky2/Cargo.toml --target wasm32-unknown-unknown --no-default-features
- name: Run cargo test in plonky2 subdirectory (no-std)
run: cargo test --manifest-path plonky2/Cargo.toml --no-default-features --lib
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUST_LOG: 1
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1

- name: Check in starky subdirectory
run: cargo check --manifest-path starky/Cargo.toml --target wasm32-unknown-unknown --no-default-features
- name: Run cargo test in starky subdirectory (no-std)
run: cargo test --manifest-path starky/Cargo.toml --no-default-features --lib
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUST_LOG: 1
Expand All @@ -116,9 +140,8 @@ jobs:
uses: actions/checkout@v4

- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@master
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2024-02-01
components: rustfmt, clippy

- name: Set up rust cache
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Changed
Always compile cross_table_lookups::debug_utils ([#1540](https://github.com/0xPolygonZero/plonky2/pull/1540))

## [0.2.0] - 2024-02-20
* Initial CHANGELOG tracking.
22 changes: 21 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
[workspace]
members = ["evm", "field", "maybe_rayon", "plonky2", "starky", "util"]
members = ["field", "maybe_rayon", "plonky2", "starky", "util"]
resolver = "2"

[workspace.dependencies]
ahash = { version = "0.8.7", default-features = false, features = ["compile-time-rng"] } # NOTE: Be sure to keep this version the same as the dependency in `hashbrown`.
anyhow = { version = "1.0.40", default-features = false }
hashbrown = { version = "0.14.3", default-features = false, features = ["ahash", "serde"] } # NOTE: When upgrading, see `ahash` dependency.
itertools = { version = "0.11.0", default-features = false }
log = { version = "0.4.14", default-features = false }
num = { version = "0.4", default-features = false, features = ["rand"] }
rand = { version = "0.8.4", default-features = false }
serde = { version = "1.0", default-features = false, features = ["derive"] }
static_assertions = { version = "1.1.0", default-features = false }
unroll = { version = "0.1.5", default-features = false }

[profile.release]
opt-level = 3
incremental = true
Expand All @@ -10,3 +22,11 @@ incremental = true

[profile.bench]
opt-level = 3

[workspace.package]
edition = "2021"
license = "MIT OR Apache-2.0"
homepage = "https://github.com/0xPolygonZero/plonky2"
repository = "https://github.com/0xPolygonZero/plonky2"
keywords = ["cryptography", "SNARK", "PLONK", "FRI", "plonky2"]
categories = ["cryptography"]
File renamed without changes.
File renamed without changes.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,12 @@ description for a performance improvement must clearly identify

## Licenses

As this is a monorepo, see the individual crates within for license information.
All crates of this monorepo are licensed under either of

* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)

at your option.


## Security
Expand All @@ -179,8 +184,14 @@ Plonky2's default hash function is Poseidon, configured with 8 full rounds, 22 p

## Links

- [System Zero](https://github.com/0xPolygonZero/system-zero), a zkVM built on top of Starky (no longer maintained)
- [Waksman](https://github.com/0xPolygonZero/plonky2-waksman), Plonky2 gadgets for permutation checking using Waksman networks (no longer maintained)
- [Insertion](https://github.com/0xPolygonZero/plonky2-insertion), Plonky2 gadgets for insertion into a list (no longer maintained)
- [u32](https://github.com/0xPolygonZero/plonky2-u32), Plonky2 gadgets for u32 arithmetic (no longer actively maintained)
- [ECDSA](https://github.com/0xPolygonZero/plonky2-ecdsa), Plonky2 gadgets for the ECDSA algorithm (no longer actively maintained)
#### Actively maintained

- [Polygon Zero's zkEVM](https://github.com/0xPolygonZero/zk_evm), an efficient Type 1 zkEVM built on top of Starky and plonky2

#### No longer maintained

- [System Zero](https://github.com/0xPolygonZero/system-zero), a zkVM built on top of Starky
- [Waksman](https://github.com/0xPolygonZero/plonky2-waksman), Plonky2 gadgets for permutation checking using Waksman networks
- [Insertion](https://github.com/0xPolygonZero/plonky2-insertion), Plonky2 gadgets for insertion into a list
- [u32](https://github.com/0xPolygonZero/plonky2-u32), Plonky2 gadgets for u32 arithmetic
- [ECDSA](https://github.com/0xPolygonZero/plonky2-ecdsa), Plonky2 gadgets for the ECDSA algorithm
1 change: 0 additions & 1 deletion evm/.cargo/katex-header.html

This file was deleted.

66 changes: 0 additions & 66 deletions evm/Cargo.toml

This file was deleted.

Loading

0 comments on commit 3c735ea

Please sign in to comment.