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

Implement check_code for pure-rust verify #258

Merged
merged 2 commits into from Aug 29, 2022
Merged

Implement check_code for pure-rust verify #258

merged 2 commits into from Aug 29, 2022

Conversation

flaub
Copy link
Member

@flaub flaub commented Aug 27, 2022

  • Workaround SHA circuit bug under pure-prove
  • All pure-prove tests are 'passing'
  • Add pure-prove tests to CI
  • Fix guest build warnings
  • Ensure risc0-build treats MethodIDs as being distinct between C++ and pure-prove
  • Drop integration tests in favor of pure-prove unit tests

* Workaround SHA circuit bug under pure-prove
* All pure-prove tests are 'passing'
* Add tests pure-prove to CI
* Fix guest build warnings
* Ensure risc0-build treats MethodIDs as being distinct between C++ and pure-prove
* Drop integration tests in favor of pure-prove unit tests
@flaub flaub self-assigned this Aug 27, 2022
// This is intended as a temporary workaround for bugs in the SHA circuit.
// The hash will still be computed on the host via a GPIO signal,
// but the polynomial constraints will not be applied to the ZKP.
// *DO NOT USE IN PRODUCTION*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, but yeah, I guess when we make pure-prove the default we'll notice this when we go to remote the feature.

const CODE_SIZE: usize = 16;
#[cfg(feature = "circuit")]
lazy_static::lazy_static! {
pub static ref CIRCUIT: risc0_zkvm_circuit::CircuitImpl =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it work to have CircuitImpl have a constant constructor so we don't have to use lazy_static? Or maybe just "CIRCUIT: risc0_zkvm_circuit::CircuitImpl = CircuitImpl;" so we don't have to modify cirgen?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if a constant constructor will ensure that only a single copy is resident in memory. That's the intent with the lazy_static

@flaub flaub merged commit 7f09758 into main Aug 29, 2022
@flaub flaub deleted the flaub/check_code branch August 29, 2022 20:41
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.

None yet

2 participants