Skip to content

Commit

Permalink
ExpCircuit integration test (scroll-tech#1295)
Browse files Browse the repository at this point in the history
### Description

ExpCircuit integration test

### Issue Link

Closes
privacy-scaling-explorations#1100

### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Contents

- ExpCircuit integration test

### Rationale

For fun and profit

### How Has This Been Tested?

Running integration tests
  • Loading branch information
leolara authored Mar 9, 2023
1 parent 5f79b10 commit ad87905
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
13 changes: 6 additions & 7 deletions integration-tests/src/integration_test_circuits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use tokio::sync::Mutex as TokioMutex;
use zkevm_circuits::bytecode_circuit::circuit::BytecodeCircuit;
use zkevm_circuits::copy_circuit::CopyCircuit;
use zkevm_circuits::evm_circuit::EvmCircuit;
use zkevm_circuits::exp_circuit::ExpCircuit;
use zkevm_circuits::keccak_circuit::KeccakCircuit;
use zkevm_circuits::state_circuit::StateCircuit;
use zkevm_circuits::super_circuit::SuperCircuit;
Expand Down Expand Up @@ -67,20 +68,14 @@ const CIRCUITS_PARAMS: CircuitsParams = CircuitsParams {
max_keccak_rows: MAX_KECCAK_ROWS,
};

/// EVM Circuit degree
const EVM_CIRCUIT_DEGREE: u32 = 18;
/// State Circuit degree
const STATE_CIRCUIT_DEGREE: u32 = 17;
/// Tx Circuit degree
const TX_CIRCUIT_DEGREE: u32 = 20;
/// Bytecode Circuit degree
const BYTECODE_CIRCUIT_DEGREE: u32 = 16;
/// Copy Circuit degree
const COPY_CIRCUIT_DEGREE: u32 = 16;

const KECCAK_CIRCUIT_DEGREE: u32 = 16;
/// Super Circuit degree
const SUPER_CIRCUIT_DEGREE: u32 = 20;
const EXP_CIRCUIT_DEGREE: u32 = 16;

lazy_static! {
/// Data generation.
Expand Down Expand Up @@ -123,6 +118,10 @@ lazy_static! {
/// Integration test for Copy circuit
pub static ref SUPER_CIRCUIT_TEST: TokioMutex<IntegrationTest<SuperCircuit::<Fr, MAX_TXS, MAX_CALLDATA, TEST_MOCK_RANDOMNESS>>> =
TokioMutex::new(IntegrationTest::new("Super", SUPER_CIRCUIT_DEGREE));

/// Integration test for Exp circuit
pub static ref EXP_CIRCUIT_TEST: TokioMutex<IntegrationTest<ExpCircuit::<Fr>>> =
TokioMutex::new(IntegrationTest::new("Exp", EXP_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 @@ -44,6 +44,11 @@ macro_rules! declare_tests {
async fn [<serial_test_super_ $name>]() {
run_test! (SUPER_CIRCUIT_TEST, $block_tag, $real_prover);
}

#[tokio::test]
async fn [<serial_test_exp_ $name>]() {
run_test! (EXP_CIRCUIT_TEST, $block_tag, $real_prover);
}
}
};
}
Expand All @@ -58,7 +63,8 @@ macro_rules! unroll_tests {
BYTECODE_CIRCUIT_TEST,
COPY_CIRCUIT_TEST,
KECCAK_CIRCUIT_TEST,
SUPER_CIRCUIT_TEST
SUPER_CIRCUIT_TEST,
EXP_CIRCUIT_TEST
};
use integration_tests::log_init;
mod real_prover {
Expand Down

0 comments on commit ad87905

Please sign in to comment.