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

Commit

Permalink
Add PiCircuit to integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ed255 committed Jun 1, 2023
1 parent 73b2aeb commit 0bfad3d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions integration-tests/src/integration_test_circuits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ use zkevm_circuits::{
evm_circuit::TestEvmCircuit,
exp_circuit::TestExpCircuit,
keccak_circuit::TestKeccakCircuit,
pi_circuit::TestPiCircuit,
state_circuit::TestStateCircuit,
super_circuit::SuperCircuit,
tx_circuit::TestTxCircuit,
Expand Down Expand Up @@ -79,6 +80,7 @@ const COPY_CIRCUIT_DEGREE: u32 = 16;
const KECCAK_CIRCUIT_DEGREE: u32 = 16;
const SUPER_CIRCUIT_DEGREE: u32 = 20;
const EXP_CIRCUIT_DEGREE: u32 = 16;
const PI_CIRCUIT_DEGREE: u32 = 17;

lazy_static! {
/// Data generation.
Expand Down Expand Up @@ -125,6 +127,10 @@ lazy_static! {
/// Integration test for Exp circuit
pub static ref EXP_CIRCUIT_TEST: TokioMutex<IntegrationTest<TestExpCircuit::<Fr>>> =
TokioMutex::new(IntegrationTest::new("Exp", EXP_CIRCUIT_DEGREE));

/// Integration test for Pi circuit
pub static ref PI_CIRCUIT_TEST: TokioMutex<IntegrationTest<TestPiCircuit::<Fr>>> =
TokioMutex::new(IntegrationTest::new("Pi", PI_CIRCUIT_DEGREE));
}

/// Generic implementation for integration tests
Expand Down
8 changes: 7 additions & 1 deletion integration-tests/tests/circuits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ macro_rules! declare_tests {
async fn [<serial_test_exp_ $name>]() {
run_test! (EXP_CIRCUIT_TEST, $block_tag, $real_prover);
}

#[tokio::test]
async fn [<serial_test_pi_ $name>]() {
run_test! (PI_CIRCUIT_TEST, $block_tag, $real_prover);
}
}
};
}
Expand All @@ -64,7 +69,8 @@ macro_rules! unroll_tests {
COPY_CIRCUIT_TEST,
KECCAK_CIRCUIT_TEST,
SUPER_CIRCUIT_TEST,
EXP_CIRCUIT_TEST
EXP_CIRCUIT_TEST,
PI_CIRCUIT_TEST,
};
use integration_tests::log_init;
mod real_prover {
Expand Down
2 changes: 2 additions & 0 deletions zkevm-circuits/src/pi_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ mod param;
mod dev;
#[cfg(any(feature = "test", test))]
mod test;
#[cfg(any(feature = "test", test, feature = "test-circuits"))]
pub use dev::PiCircuit as TestPiCircuit;

use eth_types::{
geth_types::{BlockConstants, Transaction},
Expand Down
1 change: 1 addition & 0 deletions zkevm-circuits/src/pi_circuit/dev.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub use super::PiCircuit;
use super::*;

/// Public Input Circuit configuration parameters
Expand Down

0 comments on commit 0bfad3d

Please sign in to comment.