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

Test simple Plonk circuit on Edwards and BN128 curves #108

Open
vesselinux opened this issue Jan 19, 2023 · 0 comments
Open

Test simple Plonk circuit on Edwards and BN128 curves #108

vesselinux opened this issue Jan 19, 2023 · 0 comments

Comments

@vesselinux
Copy link
Collaborator

vesselinux commented Jan 19, 2023

Add unit tests for the simple quadratic residue circuit for the Edwards and BN128 curves. Issue #103 addresses this for all curves except Edwards and BN128. For the latter two, the following compilation errors are generated:

Edwards:

libsnark/depends/libff/libff/algebra/fields/bigint.tcc:36: libff::bigint<n>::bigint(const char*) [with long int n = 3]: Assertion limbs_written <= n failed.

BN128:

libsnark/depends/libff/libff/algebra/fields/field_serialization.tcc:133:51: error: ‘const class mie::Fp’ has no member named ‘coeffs’
133 |             typename std::decay<decltype(field_el.coeffs[0])>::type;

By the message, the BN128 error (serialization) may be related to the fact that when we are adding an element or a curve point to the hasher buffer, we first convert it into a string and then copy the string as a sequence of uint8_t elements at the end of the buffer. Possible solution to try would be to use the specific functions which can serialize as bytes in libff (see serialization files in the algebra dir).

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