Skip to content

Commit a56c3be

Browse files
committed
fix risc0
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
1 parent 61059ce commit a56c3be

File tree

2 files changed

+46
-15
lines changed

2 files changed

+46
-15
lines changed

Cargo.lock

Lines changed: 41 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/zkevm-risc0/host/src/main.rs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,16 @@ fn main() {
88
.with_env_filter(tracing_subscriber::filter::EnvFilter::from_default_env())
99
.init();
1010

11-
// Obtain the default prover.
12-
let prover = default_prover();
13-
1411
run_benchmark(
1512
RISC0GUEST_ELF,
1613
"risc0",
1714
|blockchain_corpus: &BlocksAndWitnesses, _elf_data: &'static [u8]| {
15+
// Obtain the default prover.
16+
let prover = default_prover();
1817
let mut reports = Vec::new();
1918
let corpus_name = &blockchain_corpus.name;
20-
let num_blocks_in_corpus = blockchain_corpus.blocks_and_witnesses.len();
2119

22-
for (block_id, client_input) in
23-
blockchain_corpus.blocks_and_witnesses.iter().enumerate()
24-
{
20+
for client_input in &blockchain_corpus.blocks_and_witnesses {
2521
let block_number = client_input.block.number;
2622

2723
let env = ExecutorEnv::builder()
@@ -33,17 +29,15 @@ fn main() {
3329
.unwrap();
3430

3531
// Proof information by proving the specified ELF binary.
36-
let prove_info = prover.prove(env, RISC0GUEST_ELF).unwrap();
37-
let receipt = prove_info.receipt;
38-
let total_num_cycles = receipt.cycles;
32+
let _ = prover.prove(env, RISC0GUEST_ELF).unwrap();
3933

4034
// RISC0 receipt does not provide detailed region cycle counts by default.
4135
// We'll use an empty HashMap for region_cycles.
4236
let region_cycles: HashMap<String, u64> = HashMap::new();
4337

4438
let metrics = WorkloadMetrics {
4539
name: format!("{}-{}", corpus_name, block_number),
46-
total_num_cycles,
40+
total_num_cycles: 0, // TODO
4741
region_cycles,
4842
};
4943
reports.push(metrics);

0 commit comments

Comments
 (0)