Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
remove auto impl
Browse files Browse the repository at this point in the history
  • Loading branch information
Schaeff committed Sep 12, 2024
1 parent 16d55a3 commit 1a3b276
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion keccak-air/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ p3-air = { path = "../air" }
p3-field = { path = "../field" }
p3-matrix = { path = "../matrix" }
p3-maybe-rayon = { path = "../maybe-rayon" }
p3-uni-stark = { path = "../uni-stark" }
p3-util = { path = "../util" }
tracing = "0.1.37"

Expand All @@ -29,7 +30,6 @@ p3-poseidon = { path = "../poseidon" }
p3-poseidon2 = { path = "../poseidon2" }
p3-sha256 = { path = "../sha256", features = ["asm"] }
p3-symmetric = { path = "../symmetric" }
p3-uni-stark = { path = "../uni-stark" }
rand = "0.8.5"
tracing-subscriber = { version = "0.3.17", features = ["std", "env-filter"] }
tracing-forest = { version = "0.1.6", features = ["ansi", "smallvec"] }
Expand Down
3 changes: 3 additions & 0 deletions keccak-air/src/air.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use core::borrow::Borrow;
use p3_air::{Air, AirBuilder, BaseAir};
use p3_field::AbstractField;
use p3_matrix::Matrix;
use p3_uni_stark::MultiStageAir;

use crate::columns::{KeccakCols, NUM_KECCAK_COLS};
use crate::constants::rc_value_bit;
Expand All @@ -20,6 +21,8 @@ impl<F> BaseAir<F> for KeccakAir {
}
}

impl<AB: AirBuilder> MultiStageAir<AB> for KeccakAir {}

impl<AB: AirBuilder> Air<AB> for KeccakAir {
#[inline]
fn eval(&self, builder: &mut AB) {
Expand Down
2 changes: 0 additions & 2 deletions uni-stark/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,3 @@ pub trait MultiStageAir<AB: AirBuilder>: Air<AB> {
0
}
}

impl<AB: AirBuilder, A: Air<AB>> MultiStageAir<AB> for A {}
4 changes: 3 additions & 1 deletion uni-stark/tests/fib_air.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use p3_matrix::Matrix;
use p3_merkle_tree::FieldMerkleTreeMmcs;
use p3_poseidon2::{Poseidon2, Poseidon2ExternalMatrixGeneral};
use p3_symmetric::{PaddingFreeSponge, TruncatedPermutation};
use p3_uni_stark::{prove, verify, StarkConfig};
use p3_uni_stark::{prove, verify, MultiStageAir, StarkConfig};
use rand::thread_rng;

/// For testing the public values feature
Expand Down Expand Up @@ -56,6 +56,8 @@ impl<AB: AirBuilderWithPublicValues> Air<AB> for FibonacciAir {
}
}

impl<AB: AirBuilderWithPublicValues> MultiStageAir<AB> for FibonacciAir {}

pub fn generate_trace_rows<F: PrimeField64>(a: u64, b: u64, n: usize) -> RowMajorMatrix<F> {
assert!(n.is_power_of_two());

Expand Down
6 changes: 4 additions & 2 deletions uni-stark/tests/mul_air.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::fmt::Debug;
use std::marker::PhantomData;

use itertools::Itertools;
use p3_air::{Air, AirBuilder, BaseAir};
use p3_air::{Air, AirBuilder, AirBuilderWithPublicValues, BaseAir};
use p3_baby_bear::{BabyBear, DiffusionMatrixBabyBear};
use p3_challenger::{DuplexChallenger, HashChallenger, SerializingChallenger32};
use p3_circle::CirclePcs;
Expand All @@ -21,7 +21,7 @@ use p3_poseidon2::{Poseidon2, Poseidon2ExternalMatrixGeneral};
use p3_symmetric::{
CompressionFunctionFromHasher, PaddingFreeSponge, SerializingHasher32, TruncatedPermutation,
};
use p3_uni_stark::{prove, verify, StarkConfig, StarkGenericConfig, Val};
use p3_uni_stark::{prove, verify, MultiStageAir, StarkConfig, StarkGenericConfig, Val};
use rand::distributions::{Distribution, Standard};
use rand::{thread_rng, Rng};

Expand Down Expand Up @@ -116,6 +116,8 @@ impl<AB: AirBuilder> Air<AB> for MulAir {
}
}

impl<AB: AirBuilderWithPublicValues> MultiStageAir<AB> for MulAir {}

fn do_test<SC: StarkGenericConfig>(
config: SC,
air: MulAir,
Expand Down

0 comments on commit 1a3b276

Please sign in to comment.