Skip to content

Test simple Plonk circuit on Edwards and BN128 curves #108

@vesselinux

Description

@vesselinux

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions