Skip to content

Commit

Permalink
Some fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
shimkiv committed Oct 20, 2024
1 parent b7dccca commit 524c24c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion o1vm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ python3 -m http.server 8765
- Then run the o1vm with the following command:

```shell
O1VM_FLAVOR="pickles" STOP_AT="=10000000" ./run-code.sh
FILENAME="env-for-latest-l2-block.sh" O1VM_FLAVOR="pickles" STOP_AT="=10000000" ./run-code.sh
```

- Don't forget to stop the HTTP server after you are done.
Expand Down
5 changes: 4 additions & 1 deletion o1vm/src/interpreters/mips/witness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,10 @@ impl<Fp: Field, PreImageOracle: PreImageOracleT> Env<Fp, PreImageOracle> {
let insn = self.get_opcode().unwrap();

// Approximate instruction per seconds
let how_many_steps = step as usize - start.step;
let how_many_steps = (step as usize)
.checked_sub(start.step)
.unwrap_or_else(|| panic!("Step counter overflowed: {} - {}", step, start.step));

let ips = how_many_steps as f64 / elapsed.as_secs() as f64;

let pages = self.memory.len();
Expand Down

0 comments on commit 524c24c

Please sign in to comment.