Skip to content

Why patch crates-io for all the arkworks deps #90

@martyall

Description

@martyall

I'm curious why this was done:

https://github.com/arkworks-rs/circom-compat/blame/master/Cargo.toml#L73-L84

It was part of this PR, but unfortunately that PR has no description 🫤

I have a crate A which depends on other arkworks packages, and a crate B which depends on ark-circom and A, and I am unable to build B unless I duplicate this patch. I don't know enough about cargo etc to know why, but my instinct is that this blame-diff is the problem. The build errors I get are all about unsatisfied trait bounds for the ark-groth16, ark-snark and ark-relations packages, e.g.

error[E0277]: the trait bound `<E as Pairing>::ScalarField: ark_relations::gr1cs::Field` is not satisfied
   --> /home/martyall/.cargo/git/checkouts/groth16-d8ab00c2c052438d/b3b4a15/src/prover.rs:188:18
    |
188 |         let cs = ConstraintSystem::new_ref();
    |                  ^^^^^^^^^^^^^^^^ the trait `ark_relations::gr1cs::Field` is not implemented for `<E as Pairing>::ScalarField`
    |
note: required by a bound in `ConstraintSystem`
   --> /home/martyall/.cargo/git/checkouts/snark-9b8ad64dbe105ad6/02fed63/relations/src/gr1cs/constraint_system.rs:44:32
    |
44  | pub struct ConstraintSystem<F: Field> {
    |                                ^^^^^ required by this bound in `ConstraintSystem`
help: consider further restricting the associated type
    |
185 |         QAP: R1CSToQAP, <E as Pairing>::ScalarField: ark_relations::gr1cs::Field


Any idea what my problem might be, or is it normal that I copy/paste this patch in my downstream projects?

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