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

Integration test & benchmark automation #165

Draft
wants to merge 20 commits into
base: integration-refactor
Choose a base branch
from
Draft
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
2,099 changes: 1,134 additions & 965 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ members = [
]

[patch.crates-io]
halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20" }
halo2_proofs = { git = "https://github.com/taikoxyz/halo2.git", branch = "integration-dependency" }

# Definition of benchmarks profile to use.
[profile.bench]
Expand Down
4 changes: 2 additions & 2 deletions bus-mapping/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mock = { path = "../mock", optional = true }

ethers-core = "=2.0.0"
ethers-providers = "=2.0.0"
halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20" }
halo2_proofs = { git = "https://github.com/taikoxyz/halo2.git", branch = "integration-dependency" }
itertools = "0.10"
lazy_static = "1.4"
log = "0.4.14"
Expand All @@ -23,7 +23,7 @@ serde_json = "1.0.66"
strum = "0.24"
strum_macros = "0.24"

revm-precompile = "2.0.2"
revm-precompile = "2.0.3"

[dev-dependencies]
hex = "0.4.3"
Expand Down
8 changes: 4 additions & 4 deletions circuit-benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ license = "MIT OR Apache-2.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20" }
snark-verifier = { git = "https://github.com/brechtpd/snark-verifier.git", branch = "feat/add-sdk", default-features = false, features = ["loader_halo2", "system_halo2", "loader_evm", "parallel"] }
snark-verifier-sdk = { git = "https://github.com/brechtpd/snark-verifier.git", branch = "feat/add-sdk", default-features = false, features = ["loader_halo2", "loader_evm", "parallel", "display", "halo2_circuit_params"] }
halo2_proofs = { git = "https://github.com/taikoxyz/halo2.git", branch = "integration-dependency" }
snark-verifier = { git = "https://github.com/taikoxyz/snark-verifier.git", branch = "integration-dependency", default-features = false, features = ["loader_halo2", "system_halo2", "loader_evm", "parallel"] }
snark-verifier-sdk = { git = "https://github.com/taikoxyz/snark-verifier.git", branch = "integration-dependency", default-features = false, features = ["loader_halo2", "loader_evm", "parallel", "display", "halo2_circuit_params"] }

ark-std = { version = "0.3", features = ["print-trace"] }
zkevm-circuits = { path = "../zkevm-circuits", features = ["test"] }
Expand All @@ -28,5 +28,5 @@ serde_json = "*"
hex = "0.4.3"

[features]
default = []
default = ["benches"]
benches = []
2 changes: 1 addition & 1 deletion eth-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ethers-core = "=2.0.0"
ethers-signers = "=2.0.0"
hex = "0.4"
lazy_static = "1.4"
halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20" }
halo2_proofs = { git = "https://github.com/taikoxyz/halo2.git", branch = "integration-dependency" }
regex = "1.5.4"
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "1.0.66"
Expand Down
2 changes: 1 addition & 1 deletion gadgets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["The appliedzkp team"]
license = "MIT OR Apache-2.0"

[dependencies]
halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20" }
halo2_proofs = { git = "https://github.com/taikoxyz/halo2.git", branch = "integration-dependency" }
sha3 = "0.7.2"
eth-types = { path = "../eth-types" }
digest = "0.7.6"
Expand Down
5 changes: 3 additions & 2 deletions integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@ url = "2.2.2"
pretty_assertions = "1.0.0"
log = "0.4.14"
env_logger = "0.9"
halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20" }
halo2_proofs = { git = "https://github.com/taikoxyz/halo2.git", branch = "integration-dependency" }
rand_chacha = "0.3"
paste = "1.0"
rand_xorshift = "0.3.0"
rand_core = "0.6.4"
mock = { path = "../mock" }
cli-table = { version = "0.4"}

[dev-dependencies]
pretty_assertions = "1.0.0"

[features]
default = []
default = ["circuit_input_builder"]
rpc = []
circuit_input_builder = []
circuits = []
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The following software needs to be installed to run the integration tests script
## How to run circuits for Taiko
Block explorer URL is https://explorer.internal.taiko.xyz
```
export GETH0_URL="https://rpc.internal.taiko.xyz"
export GETH_L2_URL="https://rpc.internal.taiko.xyz"
./run.sh --steps tests --tests taiko_circuit_input_builder
./run.sh --steps tests --tests taiko_circuits::mock_prover
```
15 changes: 10 additions & 5 deletions integration-tests/src/bin/gen_blockchain_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use ethers::{
};
use integration_tests::{
get_client, get_provider, get_wallet, log_init, CompiledContract, GenDataOutput, CONTRACTS,
CONTRACTS_PATH,
CONTRACTS_PATH, GETH_L2_URL,
};
use log::{error, info};
use std::{collections::HashMap, fs::File, path::Path, sync::Arc, thread::sleep, time::Duration};
Expand Down Expand Up @@ -110,7 +110,7 @@ async fn main() {
contracts.insert(name.to_string(), compiled_contract);
}

let prov = get_provider();
let prov = get_provider(&GETH_L2_URL);

// Wait for geth to be online.
loop {
Expand Down Expand Up @@ -164,7 +164,7 @@ async fn main() {
//

let mut deployments = HashMap::new();
let prov_wallet0 = Arc::new(SignerMiddleware::new(get_provider(), wallet0));
let prov_wallet0 = Arc::new(SignerMiddleware::new(get_provider(&GETH_L2_URL), wallet0));

// Greeter
let contract = deploy(
Expand Down Expand Up @@ -205,10 +205,15 @@ async fn main() {
info!("Generating block with multiple transfers...");
const NUM_TXS: usize = 4; // NUM_TXS must be >= 4 for the rest of the cases to work.
let wallets: Vec<_> = (0..NUM_TXS + 1)
.map(|i| Arc::new(SignerMiddleware::new(get_provider(), get_wallet(i as u32))))
.map(|i| {
Arc::new(SignerMiddleware::new(
get_provider(&GETH_L2_URL),
get_wallet(i as u32),
))
})
.collect();

let cli = get_client();
let cli = get_client(&GETH_L2_URL);

// Fund NUM_TXS wallets from coinbase
cli.miner_stop().await.expect("cannot stop miner");
Expand Down
Loading
Loading