Skip to content

Commit

Permalink
update zkevm-circuits and trace files (#342)
Browse files Browse the repository at this point in the history
* update snark verifier

* update trace

* flatten proof

* update default trace

* ...

* use default trace file of post-curie

* zkevm circuit develop

* rm

* update deps

* lint

* fix test

---------

Co-authored-by: Dream Wu <wwuwwei@126.com>
  • Loading branch information
lispc and DreamWuGit authored Sep 10, 2024
1 parent 56e591f commit 69f764b
Show file tree
Hide file tree
Showing 9 changed files with 2,444,486 additions and 3,018,758 deletions.
103 changes: 59 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ethers-providers = "2"
glob = "0.3"
itertools = "0.10"
log = "0.4"
log4rs = { version = "1.2", default_features = false, features = ["console_appender", "file_appender"] }
log4rs = { version = "1.2", default-features = false, features = ["console_appender", "file_appender"] }
rand = "0.8"
rand_xorshift = "0.3"
reqwest = { version = "0.11", default-features = false, features = [ "json", "rustls-tls" ] }
Expand All @@ -27,7 +27,7 @@ serde_json = "1.0"
tokio = { version = "1.32", features = ["full"] }

halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "v1.1" }
prover = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.13.1", default-features = false, features = ["parallel_syn", "scroll"] }
prover = { git = "https://github.com/scroll-tech/zkevm-circuits.git", branch = "develop", default-features = false, features = ["parallel_syn", "scroll"] }
integration = { path = "integration" }

[patch.crates-io]
Expand Down
3 changes: 2 additions & 1 deletion integration/src/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ pub const ASSETS_DIR: &str = "./test_assets";
pub const PARAMS_DIR: &str = "./params";

pub fn trace_path_for_test() -> String {
// use trace file of post-curie upgrade
read_env_var(
"TRACE_PATH",
"tests/extra_traces/batch_34700/chunk_1236462/block_4176564.json".to_string(),
"tests/extra_traces/batch1/chunk_1/block_7156762.json".to_string(),
)
}

Expand Down
4 changes: 4 additions & 0 deletions integration/tests/download_trace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set -x
blk=$1
curl -s -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"scroll_getBlockTraceByNumberOrHash", "params": ["'$(printf '0x%x' $blk)'", {"StorageProofFormat": "flatten"}], "id": 99}' 127.0.0.1:8545 | jq .result >/tmp/${blk}.json
#curl -s -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"scroll_getTxByTxBlockTrace", "params": ["'$(printf '0x%x' $blk)'", null], "id": 99}' 127.0.0.1:8545 | jq .result >/tmp/${blk}.json
6 changes: 2 additions & 4 deletions integration/tests/e2e_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ fn gen_batch_proving_task(
log::info!("Constructed zkevm prover");
let chunk_proofs: Vec<_> = chunks
.into_iter()
.enumerate()
.map(|(_, block_traces)| {
.map(|block_traces| {
zkevm_prover
.gen_chunk_proof(
ChunkProvingTask::from(block_traces),
Expand Down Expand Up @@ -261,8 +260,7 @@ fn log_batch_pi(trace_paths: &[String]) {

let mut chunk_hashes: Vec<ChunkInfo> = chunk_traces
.into_iter()
.enumerate()
.map(|(_i, chunk_trace)| {
.map(|chunk_trace| {
let witness_block = chunk_trace_to_witness_block(chunk_trace.clone()).unwrap();
ChunkInfo::from_witness_block(&witness_block, false)
})
Expand Down
Loading

0 comments on commit 69f764b

Please sign in to comment.