Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup failing mips program #2921

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

martyall
Copy link
Contributor

@martyall martyall commented Jan 2, 2025

Setup a failing MIPS test due to padding errors

I added 2 tests to o1vm/tests/test_mips_elf.

# one time make command to build bin files
> make build-mips-programs
> cd o1vm
> RUST_LOG=debug cargo test --release --test test_mips_elf -- --nocapture
  1. test_nor_execution: This checks the correct execution of the nor.asm program.
  2. test_nor_proving: This checks the prove/verify steps from the main loop. It is currently failing because padding with zeros is not a valid way to extend a proof to the full domain. NOTE: This test also builds an SRS from scratch, it will take a while. This cost is amortized the more tests we add.

Changes

  1. Add a halt_address field to cannon::VmConfiguration type. This flag allows us to signal the step function that we are finished executing -- if the next instruction pointer is the halt_address, stop execution. This hack was borrowed from the cannon codebase.

  2. Factor out the core logic from pickles/main.rs to pickles/mod.rs so that it can be exported via o1vm::pickles. I didn't change any of the logic, but in order to add the "pad an incomplete execution" logic I had to separate some things out.

  3. Add a dummy ProofInputs::pad function that pads a proof with zeros. We know this isn't working, but I did this as a way to stub out where the correct solution can go.

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 0% with 24 lines in your changes missing coverage. Please review.

Project coverage is 74.63%. Comparing base (343132b) to head (be3660f).
Report is 19 commits behind head on master.

Files with missing lines Patch % Lines
o1vm/src/pickles/main.rs 0.00% 13 Missing ⚠️
o1vm/src/interpreters/mips/witness.rs 0.00% 7 Missing ⚠️
o1vm/src/cli/cannon.rs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2921      +/-   ##
==========================================
- Coverage   74.66%   74.63%   -0.03%     
==========================================
  Files         259      259              
  Lines       61713    61734      +21     
==========================================
+ Hits        46075    46078       +3     
- Misses      15638    15656      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant