Skip to content

Commit

Permalink
Beginning of inclusion of plonky3 in circuits with BitShift Stark (#924)
Browse files Browse the repository at this point in the history
The PR marks the beginning of rewriting our circuits in plonky3. We are
experimenting with `uni_stark` crate for now.
Current limitations: #927

---------

Co-authored-by: Matthias Görgens <[email protected]>
  • Loading branch information
codeblooded1729 and matthiasgoergens authored Nov 27, 2023
1 parent 799cbf6 commit 0a362c0
Show file tree
Hide file tree
Showing 11 changed files with 665 additions and 1 deletion.
289 changes: 289 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

[workspace]
exclude = ["sdk"]
members = ["cli", "runner", "circuits", "node-cli", "node", "rpc", "state"]
members = ["cli", "runner", "circuits", "node-cli", "node", "rpc", "state", "circuits3"]
resolver = "2"

[profile.dev]
Expand Down
36 changes: 36 additions & 0 deletions circuits3/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[package]
categories = ["cryptography"]
description = "MozakVM circuits with plonky3"
edition = "2021"
keywords = ["crypto", "zero-knowledge", "vm"]
license = "All rights reserved"
name = "mozak-circuits3"
readme = "README.md"
repository = "https://github.com/0xmozak/mozak-vm"
version = "0.1.0"


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
log = "0.4"
mozak-circuits = { path = "../circuits" }
p3-air = { git = "https://github.com/Plonky3/Plonky3.git" }
p3-field = { git = "https://github.com/Plonky3/Plonky3.git" }
p3-matrix = { git = "https://github.com/Plonky3/Plonky3.git" }


[dev-dependencies]
p3-challenger = { git = "https://github.com/Plonky3/Plonky3.git" }
p3-commit = { git = "https://github.com/Plonky3/Plonky3.git" }
p3-dft = { git = "https://github.com/Plonky3/Plonky3.git" }
p3-fri = { git = "https://github.com/Plonky3/Plonky3.git" }
p3-goldilocks = { git = "https://github.com/Plonky3/Plonky3.git" }
p3-keccak = { git = "https://github.com/Plonky3/Plonky3.git" }
p3-ldt = { git = "https://github.com/Plonky3/Plonky3.git" }
p3-mds = { git = "https://github.com/Plonky3/Plonky3.git" }
p3-merkle-tree = { git = "https://github.com/Plonky3/Plonky3.git" }
p3-poseidon2 = { git = "https://github.com/Plonky3/Plonky3.git" }
p3-symmetric = { git = "https://github.com/Plonky3/Plonky3.git" }
p3-uni-stark = { git = "https://github.com/Plonky3/Plonky3.git" }
rand = "0.8.5"
9 changes: 9 additions & 0 deletions circuits3/src/bitshift/columns.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use crate::columns_view::columns_view_impl;

columns_view_impl!(BitShift);
#[repr(C)]
#[derive(Clone, Copy, Eq, PartialEq, Debug, Default)]
pub struct BitShift<T> {
pub amount: T,
pub multiplier: T,
}
2 changes: 2 additions & 0 deletions circuits3/src/bitshift/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub mod columns;
pub mod stark;
Loading

0 comments on commit 0a362c0

Please sign in to comment.