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

Expose the last outputs and number of steps from RecursiveSNARK #285

Merged

Conversation

jbearer
Copy link
Contributor

@jbearer jbearer commented Dec 30, 2023

Both of these data are easily accessible, and could be very useful to clients:

  • Exposing the last outputs allows us to get the current state of the computation on the prover side without wasting energy recomputing it
  • Exposing the number of steps makes it easier to eventually pass num_steps into CompressedSNARK::verify

Both of these data are easily accessible, and could be very useful
to clients:
* Exposing the last outputs allows us to get the current state of
  the computation on the prover side without wasting energy
  recomputing it
* Exposing the number of steps makes it easier to eventually pass
  `num_steps` into `CompressedSNARK::verify`
@srinathsetty srinathsetty merged commit 5e584da into microsoft:main Jan 2, 2024
6 checks passed
hero78119 pushed a commit to hero78119/SuperNova that referenced this pull request Jan 5, 2024
…t#226)

* Expose the last outputs and number of steps from RecursiveSNARK (microsoft#285)

Both of these data are easily accessible, and could be very useful
to clients:
* Exposing the last outputs allows us to get the current state of
  the computation on the prover side without wasting energy
  recomputing it
* Exposing the number of steps makes it easier to eventually pass
  `num_steps` into `CompressedSNARK::verify`

* Improve error handling (microsoft#286)

* When a function already returns a `Result`, propagate errors
  instead of panicking with `expect`
* For `NovaError::SynthesisError`, retain information about the
  original bellpepper error. Since `NovaError` implements `Clone`
  but bellpepper's `SynthesisError` does not, we keep the error
  information as a `String`.

This commit only fixes low-hanging fruit in lib.rs, for functions
that already return a `Result` and can easily propagate errors just
by replacing `expect(...)` with `?`. There are still many `unwrap()`
calls in functions returning `Result` in other modules, particularly
gadgets. But I don't understand the code well in those parts, and I
suspect some of those `unwrap()`s actually can't fail based on
invariants of the code, so it makes perfect sense to leave them as is.

Co-authored-by: Francois Garillot <[email protected]>

---------

Co-authored-by: Jeb Bearer <[email protected]>
huitseeker added a commit to huitseeker/Nova that referenced this pull request Feb 2, 2024
…or Nova & SuperNova (microsoft#285)

* refactor: Refactor codebase to use `Arc` for commitment keys

- Major changes in the handling of the Commitment Key object across several files, moving from direct references to using the Arc (Atomic Reference Counting) mechanism for improved thread-safety and efficient sharing of data.
- Removed the `Abomonation` trait from several structures, such as `ProverKey` and `VerifierKey`.
- Introduced the `SimpleDigestible` trait to VerifierKey in several files, allowing them to be converted into a digestible form for hashing or storage.
- Numerous updates in test cases and instances to reflect the shift from direct Commitment Key references to Arc.
- Refactoring of the `setup` and `prove` methods in multiple files to handle the Arc type for Commitment Key.
- Removal of several `abomonate_with` and `abomonation_skip` attribute annotations.
- Enhancement of error details in multiple `assert` statements.
- Added "rc" feature to the serde dependency in the Cargo.toml file.
- Made comments on minimizing unnecessary data copies and keeping `setup` methods inexpensive.

* refactor: Serialization with Abomonation

- Extended functionality in `lib.rs` with new `PublicParams` structure, efficient abomonationwith `FlatPublicParams`,
- Updated `mod.rs` for conditional feature `abomonate`, added `AuxParams` struct, and implemented conversions between `AuxParams` and `FlatAuxParams`.
- demoed the new use of Abomonation in the minroot example

* refactor: clean up superfluous Abomonation bounds

- Removed Abomonation dependency from several files.

* fix: remove uneeded Abomonation bounds
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.

2 participants