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

Developer quality of life improvements (Nova forward ports) #226

Merged

Commits on Jan 3, 2024

  1. Expose the last outputs and number of steps from RecursiveSNARK (argu…

    …mentcomputer#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`
    jbearer authored and huitseeker committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    9009b7b View commit details
    Browse the repository at this point in the history
  2. Improve error handling (argumentcomputer#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]>
    jbearer and huitseeker committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    2988796 View commit details
    Browse the repository at this point in the history