# Test super circuit with real trace --- ## scroll-zkevm Since there are some mismatches between the latest `main` branch and the trace format, we build the `realtrace0505` branch on top of the May 5 commits (for temporary use) ![](https://hackmd.io/_uploads/S14bqDQU2.png) `realtrace.sh` will run super&agg circuit with trace file 617365.json ```bash git clone git@github.com:scroll-tech/scroll-zkevm.git cd scroll-zkevm git checkout realtrace0505 ./realtrace.sh ``` The degree of super circuit and aggregation circuit are 20 and 26 respectively It may take 20~30 minutes to generate params in the first execution ```bash [2023-05-30T10:38:12Z INFO aggregation_tests::test_util] git version prealpha-v2.0-17-gd0490c5-modified [2023-05-30T10:38:12Z INFO aggregation_tests] created output dir output_20230530_103812_multi [2023-05-30T10:38:12Z INFO aggregation_tests::test_util] test cases traces: ["/home/ubuntu/.../617365.json"] [2023-05-30T10:38:12Z INFO aggregation_tests] loaded block trace creating params for 26 test test_aggregation_api has been running for over 60 seconds [2023-05-30T10:56:17Z INFO aggregation_tests] loaded parameters for degrees 20 and 26 ... ``` --- ## profiling The [[profile feature]](https://github.com/scroll-tech/halo2/blob/develop/halo2_proofs/Cargo.toml#L92) is turned off by default for scroll\halo2 We can enable it by add `"halo2_proofs/profile"` to the feature list of scroll-zkevm: [scroll-zkevm/zkevm/Cargo.toml#L50](https://github.com/scroll-tech/scroll-zkevm/blob/realtrace0505/zkevm/Cargo.toml#L50) ```bash default = ["halo2_proofs/profile"] ``` Then profiling messages will be like: ``` ····Start: assign region: hash table ······Start: assign region 1st pass: hash table ······End: assign region 1st pass: hash table ..................................22.980s [2023-05-15T22:12:50Z DEBUG halo2_proofs::circuit::floor_planner::single_pass] region row_count "hash table": 111113 [2023-05-15T22:12:50Z DEBUG halo2_proofs::circuit::floor_planner::single_pass] region "hash table", idx 3 start 0 ······Start: assign region 2nd pass: hash table ······End: assign region 2nd pass: hash table ..................................22.946s ····End: assign region: hash table .............................................45.927s ``` <aside> 💡 The amount of profiling message of assign_region() is huge, resulting in a large log file (>200MB), so it is recommended to add a timer manually if the specific code block has been located: </aside> ```rust let part1_timer = Instant::now(); ... println!("part1_timer: {:?}", part1_timer.elapsed()); ``` Then, add the local path to `~/.cargo/config` to [override](https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#paths-overrides) the dependent crate: ```bash paths = ["/home/ubuntu/projects/poseidon-circuit"] ``` ---