Skip to content

Commit 614cf33

Browse files
authored
chore: add pv_stream to emulator return values in sdk (#26) (#27)
1 parent cb82bc4 commit 614cf33

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

perf/src/bin/bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ where
359359

360360
log_section("RISCV PHASE");
361361
info!("Running RISCV");
362-
let (cycles, riscv_duration) = time_operation(|| riscv.emulate(stdin));
362+
let ((cycles, _pv_stream), riscv_duration) = time_operation(|| riscv.emulate(stdin));
363363

364364
log_section("PERFORMANCE SUMMARY");
365365
info!("Time Metrics (wall time)");

sdk/sdk/src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ macro_rules! create_sdk_prove_client {
152152
pub fn emulate(
153153
&self,
154154
stdin: EmulatorStdinBuilder<Vec<u8>>,
155-
) -> u64 {
155+
) -> (u64, Vec<u8>) {
156156
let stdin = stdin.finalize();
157157
self.riscv.emulate(stdin)
158158
}

vm/src/proverchain/riscv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ where
7373
}
7474
}
7575

76-
pub fn emulate(&self, stdin: EmulatorStdin<Program, Vec<u8>>) -> u64 {
76+
pub fn emulate(&self, stdin: EmulatorStdin<Program, Vec<u8>>) -> (u64, Vec<u8>) {
7777
let witness = ProvingWitness::<SC, RiscvChips<SC>, _>::setup_for_riscv(
7878
self.program.clone(),
7979
stdin,
@@ -88,7 +88,7 @@ where
8888
break;
8989
}
9090
}
91-
emulator.cycles()
91+
(emulator.cycles(), emulator.get_pv_stream())
9292
}
9393

9494
pub fn get_program(&self) -> Arc<Program> {

0 commit comments

Comments
 (0)