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

Properly using msm_chunks #854

Open
vaqxai opened this issue Sep 3, 2024 · 0 comments
Open

Properly using msm_chunks #854

vaqxai opened this issue Sep 3, 2024 · 0 comments

Comments

@vaqxai
Copy link

vaqxai commented Sep 3, 2024

Hi! I have two vectors/slices
One contains my bases: Vec<<E as Pairing>::G1Affine>
And the other my scalars: Vec<<E as Pairing>::ScalarField>

I can use them just fine with msm_unchecked providing &bases and scalars as arguments.

I cannot however figure out how to do it with msm_chunks.

I tried creating iterators out of them:

let base_iter = bases.iter();
let scalar_iter = scalars.iter();

Or even

let base_iter = ark_ec::iterable::Iterable::iter(&bases);
let scalar_iter = ark_ec::iterable::Iterable::iter(&scalars);

Yet, I always receive the error:

error[E0277]: the trait bound `std::slice::Iter<'_, <E as Pairing>::G1Affine>: std::marker::Copy` is not satisfied
  --> /home/vaqxai/ark-project/ark-module/src/mod.rs:92:21
   |
92 |         let result = E::G1::msm_chunks(&bases.iter(), &scalars.iter());
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::slice::Iter<'_, <E as Pairing>::G1Affine>`, which is required by `std::slice::Iter<'_, <E as Pairing>::G1Affine>: Iterable`
   |
   = help: the trait `Iterable` is implemented for `ark_std::iterable::Reverse<I>`
   = note: required for `std::slice::Iter<'_, <E as Pairing>::G1Affine>` to implement `Iterable`
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