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

feat: Diff Tracking SP1 patches #665

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

feat: Diff Tracking SP1 patches #665

wants to merge 5 commits into from

Conversation

alxiong
Copy link
Contributor

@alxiong alxiong commented Aug 21, 2024

Not meant to merge into main !

Keep this as a draft PR to track the changes made.

Comment on lines +19 to +24
pub fn msm(p: &[G1Affine], s: &[ScalarField]) -> G1Affine {
let mut iter = p.iter().zip(s).filter(|(_, s)| !s.is_zero());
let mut result = {
let (p, s) = iter.next().unwrap();
let mut p = wrap_g1affine(p);
bn254_double_and_add(&mut p, s);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may i ask why we didn't use AffinePoint struct and the ::msm() directly from sp1-lib as suggested in https://github.com/EspressoSystems/zkrollup-integration/issues/21#issuecomment-2292645127?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw this after I had these working implementations. I don't think it's necessary to follow their APIs.

@alxiong alxiong requested a review from mrain August 21, 2024 02:45
@alxiong alxiong changed the title Diff Tracking: Sp1 patches feat: Diff Tracking SP1 patches Aug 21, 2024
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