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

Poseidon2 #683

Merged
merged 1 commit into from
Jun 30, 2024
Merged

Poseidon2 #683

merged 1 commit into from
Jun 30, 2024

Conversation

spapinistarkware
Copy link
Contributor

@spapinistarkware spapinistarkware commented Jun 30, 2024

This change is Reviewable

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @spapinistarkware and the rest of your teammates on Graphite Graphite

@codecov-commenter
Copy link

codecov-commenter commented Jun 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.95%. Comparing base (f59f722) to head (ee39b89).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #683      +/-   ##
==========================================
+ Coverage   89.94%   89.95%   +0.01%     
==========================================
  Files          75       75              
  Lines        9645     9657      +12     
  Branches     9645     9657      +12     
==========================================
+ Hits         8675     8687      +12     
  Misses        889      889              
  Partials       81       81              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a comment

Choose a reason for hiding this comment

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

Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @spapinistarkware)


crates/prover/src/examples/poseidon/mod.rs line 184 at r1 (raw file):

// Applies the internal round matrix.
// See https://eprint.iacr.org/2023/323.pdf 5.2 .
fn apply_internal_round_matrix<F>(state: &mut [F; 16])

Do we need to add round constants here?

Code quote:

fn apply_internal_round_matrix<F>(state: &mut [F; 16])

Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @spapinistarkware)


crates/prover/src/examples/poseidon/mod.rs line 183 at r1 (raw file):

// Applies the internal round matrix.
// See https://eprint.iacr.org/2023/323.pdf 5.2 .

Can you state here what are the \mu that you are using?

Code quote:

// See https://eprint.iacr.org/2023/323.pdf 5.2 .

crates/prover/src/examples/poseidon/mod.rs line 188 at r1 (raw file):

    F: Copy + AddAssign<F> + Add<F, Output = F> + Sub<F, Output = F> + Mul<BaseField, Output = F>,
{
    // TODO(spapini): Check that these coefficients are good according to Seciotn 5.3 of Poseidon2

Suggestion:

// TODO(spapini): Check that these coefficients are good according to Section 5.3 of Poseidon2

Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @spapinistarkware)


crates/prover/src/examples/poseidon/mod.rs line 334 at r1 (raw file):

}

// TODO(AlonH): Implement.

Remove

Code quote:

// TODO(AlonH): Implement.

@spapinistarkware spapinistarkware force-pushed the spapini/06-27-poseidon branch 3 times, most recently from 5486f28 to 3831d32 Compare June 30, 2024 09:29
Copy link
Contributor Author

@spapinistarkware spapinistarkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 7 files reviewed, 4 unresolved discussions (waiting on @shaharsamocha7)


crates/prover/src/examples/poseidon/mod.rs line 183 at r1 (raw file):

Previously, shaharsamocha7 wrote…

Can you state here what are the \mu that you are using?

Done.


crates/prover/src/examples/poseidon/mod.rs line 188 at r1 (raw file):

    F: Copy + AddAssign<F> + Add<F, Output = F> + Sub<F, Output = F> + Mul<BaseField, Output = F>,
{
    // TODO(spapini): Check that these coefficients are good according to Seciotn 5.3 of Poseidon2

Done.


crates/prover/src/examples/poseidon/mod.rs line 334 at r1 (raw file):

Previously, shaharsamocha7 wrote…

Remove

Done.

Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @spapinistarkware)

Copy link
Contributor Author

@spapinistarkware spapinistarkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 7 files reviewed, 1 unresolved discussion (waiting on @shaharsamocha7)


crates/prover/src/examples/poseidon/mod.rs line 184 at r1 (raw file):

Previously, shaharsamocha7 wrote…

Do we need to add round constants here?

Added at the callsite

Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r3.
Reviewable status: 6 of 7 files reviewed, all discussions resolved (waiting on @spapinistarkware)

Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @spapinistarkware)

@spapinistarkware spapinistarkware merged commit 2506932 into dev Jun 30, 2024
14 checks passed
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.

3 participants