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

support serialize and deserialize for engines #307

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

RyanKung
Copy link
Contributor

@RyanKung RyanKung commented Feb 5, 2024

No description provided.

@RyanKung
Copy link
Contributor Author

RyanKung commented Feb 5, 2024

@microsoft-github-policy-service agree [company="{Rings Network}"]

@RyanKung
Copy link
Contributor Author

RyanKung commented Feb 5, 2024

@microsoft-github-policy-service agree company="rings network"

@srinathsetty
Copy link
Collaborator

Hi @RyanKung Could you please clarify the need for serde on Engine related types?

@RyanKung
Copy link
Contributor Author

RyanKung commented Feb 6, 2024

Hi @RyanKung Could you please clarify the need for serde on Engine related types?

My use case is like

use crate::provider::VestaEngine;
use crate::provider::PallasEngine;

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Wrap<E1, E2>
where
      E1: Engine<Base = <E2 as Engine>::Scalar>,
      E2: Engine<Base = <E1 as Engine>::Scalar>,
{
    inner: (E1, E2),
}

#[derive(Serialize, Deserialize, Clone)]
enum Example
{
    VestaPallas(Wrap<VestaEngine, PallasEngine>),
    PallasVasta(Wrap<PallasEngine, VestaEngine>),
}

This will cause a compile error:

error[E0277]: the trait bound `VestaEngine: Serialize` is not satisfied
   --> src/lib.rs:855:10
    |
855 | #[derive(Serialize, Deserialize, Clone)]
    |          ^^^^^^^^^ the trait `Serialize` is not implemented for `VestaEngine`
...
858 |     VestaPallas(Wrap<VestaEngine, PallasEngine>),
    |                 ------------------------------- required by a bound introduced by this call
    |
    = help: the following other types implement trait `Serialize`:
              bool
              char
              isize
              i8
              i16
              i32
              i64
              i128
            and 238 others

src/provider/mod.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@srinathsetty srinathsetty merged commit bdf3439 into microsoft:main Feb 7, 2024
6 checks passed
huitseeker added a commit to huitseeker/Nova that referenced this pull request Feb 14, 2024
* refactor: Refactor public param digest tests in lib.rs

- Refactored test functions within the tests module for greater efficiency and readability.
- Removed `DlogGroup` trait usage within the `test_pp_digest_with` function.
- Simplified `test_pp_digest` function by removing redundant circuit instantiation.

* chore: Upgrade Rust Toolchain Version to 1.76.0

- Upgraded the rust toolchain version from `1.75` to `1.76.0` in `rust-toolchain.toml` file.
- Closes microsoft#307

* chore: Refactor pprof dependency

- Shifted `pprof` from `dev-dependencies` to `dependencies` for non-wasm32 targets to optimize benchmarking builds.
- Introduced "flamegraph" feature to include `pprof` during benchmarking.
- Closes microsoft#309

* refactor: Refactor computation in sumcheck module

- Streamlined calculation of evaluation points in `compute_eval_points_quad` and `compute_eval_points_cubic_with_additive_term` functions within `src/spartan/sumcheck/mod.rs`.
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