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 254-bit inputs/outputs #14

Closed
vivianjeng opened this issue Oct 25, 2023 · 1 comment
Closed

Support 254-bit inputs/outputs #14

vivianjeng opened this issue Oct 25, 2023 · 1 comment

Comments

@vivianjeng
Copy link
Collaborator

vivianjeng commented Oct 25, 2023

Problem

Now the generate_proof in mopro-ffi doesn't support 254-bit inputs/outputs
(which is the snark scalar field in bn254)

https://github.com/oskarth/mopro/blob/018bb1e3075d6f75f5e8edf0037bceff3f62bfbf/mopro-ffi/src/lib.rs#L66-L69

Notes

The acceptable types are listed here: https://mozilla.github.io/uniffi-rs/udl/builtin_types.html
We can change the serialize_inputs

pub fn serialize_inputs(inputs: &SerializableInputs) -> Vec<Vec<u8>> 

and the generate_proof in mopro-ffi

    pub fn generate_proof(
        &self,
        inputs: HashMap<String, Vec<Vec<u8>>>,
    ) -> Result<GenerateProofResult, MoproError> 

(or other uint type e.g. u64)

Acceptance criteria

  • It should accept bigint like 21888242871839275222246405745257275088548364400416034343698204186575808495616
  • It should work with current tests
  • (There can be a test to input the bigint)
@vivianjeng
Copy link
Collaborator Author

fixed by #24

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

No branches or pull requests

1 participant