Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ jobs:
# cargo build --verbose --target ${{ env.target }} -p p3-fri-air
# cargo build --verbose --target ${{ env.target }} -p p3-interpolation-air
cargo build --verbose --target ${{ env.target }} -p p3-mmcs-air
cargo build --verbose --target ${{ env.target }} -p p3-poseidon2-circuit-air
cargo build --verbose --target ${{ env.target }} -p p3-symmetric-air
cargo build --verbose --target ${{ env.target }} -p p3-recursion
Expand Down
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ members = [
"fri-air",
"interpolation-air",
"mmcs-air",
"poseidon2-circuit-air",
"recursion",
"symmetric-air",
]
Expand Down Expand Up @@ -41,6 +42,8 @@ p3-koala-bear = { git = "https://github.com/Plonky3/Plonky3" }
p3-matrix = { git = "https://github.com/Plonky3/Plonky3" }
p3-maybe-rayon = { git = "https://github.com/Plonky3/Plonky3" }
p3-merkle-tree = { git = "https://github.com/Plonky3/Plonky3" }
p3-poseidon2 = { git = "https://github.com/Plonky3/Plonky3" }
p3-poseidon2-air = { git = "https://github.com/Plonky3/Plonky3" }
p3-symmetric = { git = "https://github.com/Plonky3/Plonky3" }
p3-uni-stark = { git = "https://github.com/Plonky3/Plonky3" }
p3-util = { git = "https://github.com/Plonky3/Plonky3" }
Expand Down Expand Up @@ -72,6 +75,7 @@ p3-field-air = { path = "field-air", version = "0.1.0" }
p3-fri-air = { path = "fri-air", version = "0.1.0" }
p3-interpolation-air = { path = "interpolation-air", version = "0.1.0" }
p3-mmcs-air = { path = "mmcs-air", version = "0.1.0" }
p3-poseidon2-circuit-air = { path = "poseidon2-circuit-air", version = "0.1.0" }
p3-recursion = { path = "recursion", version = "0.1.0" }
p3-symmetric-air = { path = "symmetric-air", version = "0.1.0" }

Expand Down
1 change: 1 addition & 0 deletions circuit-prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ p3-matrix.workspace = true
p3-maybe-rayon.workspace = true
p3-merkle-tree.workspace = true
p3-mmcs-air.workspace = true
p3-poseidon2-air.workspace = true
p3-symmetric.workspace = true
p3-uni-stark.workspace = true
rand.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions circuit/src/tables/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ mod add;
mod constant;
mod mmcs;
mod mul;
mod poseidon2;
mod public;
mod runner;
mod witness;
Expand All @@ -12,6 +13,7 @@ pub use add::AddTrace;
pub use constant::ConstTrace;
pub use mmcs::{MmcsPathTrace, MmcsPrivateData, MmcsTrace};
pub use mul::MulTrace;
pub use poseidon2::{Poseidon2CircuitRow, Poseidon2CircuitTrace};
pub use public::PublicTrace;
pub use runner::CircuitRunner;
pub use witness::WitnessTrace;
Expand Down
18 changes: 18 additions & 0 deletions circuit/src/tables/poseidon2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
use alloc::vec::Vec;

/// Poseidon2 operation table
pub struct Poseidon2CircuitRow<F> {
/// Poseidon2 operation type
pub is_sponge: bool,
/// Reset flag
pub reset: bool,
/// Absorb flags
pub absorb_flags: Vec<bool>,
/// Inputs to the Poseidon2 permutation
pub input_values: Vec<F>,
/// Input indices
pub input_indices: Vec<u32>,
/// Output indices
pub output_indices: Vec<u32>,
}
pub type Poseidon2CircuitTrace<F> = Vec<Poseidon2CircuitRow<F>>;
44 changes: 44 additions & 0 deletions poseidon2-circuit-air/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[package]
name = "p3-poseidon2-circuit-air"
description = "An AIR implementation of Poseidon2 modified for the circuit builder."
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true

[dependencies]
p3-air.workspace = true
p3-circuit.workspace = true
p3-field.workspace = true
p3-matrix.workspace = true
p3-maybe-rayon.workspace = true
p3-poseidon2.workspace = true
p3-poseidon2-air.workspace = true
p3-symmetric.workspace = true

itertools.workspace = true
rand.workspace = true
tracing.workspace = true

[target.'cfg(target_family = "unix")'.dev-dependencies]
tikv-jemallocator = "0.6"

[dev-dependencies]
p3-baby-bear.workspace = true
p3-challenger.workspace = true
p3-commit.workspace = true
p3-dft.workspace = true
p3-fri.workspace = true
p3-keccak.workspace = true
p3-koala-bear.workspace = true
p3-merkle-tree.workspace = true
p3-uni-stark.workspace = true

tracing-forest = { workspace = true, features = ["ansi", "smallvec"] }
tracing-subscriber = { workspace = true, features = ["std", "env-filter"] }

[features]
parallel = ["p3-maybe-rayon/parallel"]
Loading
Loading