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

Serialize/deserialize ark-zkey #130

Open
vivianjeng opened this issue Apr 24, 2024 · 1 comment
Open

Serialize/deserialize ark-zkey #130

vivianjeng opened this issue Apr 24, 2024 · 1 comment

Comments

@vivianjeng
Copy link
Collaborator

Problem

Previously we use ark-zkey to decrease zkey size and loading time ark-zkey
But then we use new_unchecked to fix circom-compat zkey loading time
#25 (comment)
and ark-zkey serialization/deserialization is much more slower than the current load_zkey

Now we use zkey for mopro but ark-zkey is still doable and possible to decrease zkey size

Approaches

Serialization

could be

key.serialize_uncompressed
key.serialize_compressed

Deserialization
e.g.
https://github.com/arkworks-rs/circom-compat/blob/170b10fc9ed182b5f72ecf379033dda023d0bf07/src/zkey.rs#L328

Acceptance criteria

load arkzkey from ark-zkey and replace load_zkey in mopro-core

@vivianjeng
Copy link
Collaborator Author

18th July Updates:
The performance between compressed and uncompressed zkey differs too much
The table shows to deserialize a bn254 G1Affine element

method time
deserialize_compressed_unchecked 599.791µs
deserialize_uncompressed_unchecked 7.375µs

The compressed one took ~100x time to deserialize

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