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

Fix/425 #14

Merged
merged 2 commits into from
Jun 15, 2022
Merged

Fix/425 #14

merged 2 commits into from
Jun 15, 2022

Conversation

mmaker
Copy link

@mmaker mmaker commented Jun 14, 2022

The default, user-friendly way is to multiply group elements by elements
in the scalar field. In an attempt to add some ergonomics,
I'm using the same template but for scalars and adding a big fat warning
that no checks is performed on the size.

The function that acts immediately on the bigints can also be called
explicitly if the caller knows that the same scalar vectors will be used
multiple times. Note that copying that vector only buys a few ms per
MSM of 2^20 elements or more.
The extra function `msm_bigint` also allows to perform  optimizations
on `msm` before the call to `msm_bigint`: instead of
normalizing into `BigInt`s with `u64` we can move to `i32` and use half the
number of buckets in Pippenger, exploiting group addition,
using the representation in buckets as [-w/2 + 1, w/2] instead of [0, w-1].

Use the frontend API `VariableBaseMSM::msm` in tests when possible.

Change (again) defaults for VariableBaseMSM not to panic.

After asking around, looks like most people assume that there is no bound
check (e.g. when committing to a vector or a polynomial). I'm therefore
reverting the change on the bound check
@mmagician mmagician merged commit 8cced93 into mmagician:msm-refactor-2 Jun 15, 2022
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

Successfully merging this pull request may close these issues.

2 participants