Expose the last outputs and number of steps from RecursiveSNARK#285
Merged
srinathsetty merged 1 commit intomicrosoft:mainfrom Jan 2, 2024
Merged
Conversation
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`
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both of these data are easily accessible, and could be very useful to clients:
num_stepsintoCompressedSNARK::verify