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

Separate verify #721

Merged
merged 1 commit into from
Jul 11, 2024
Merged

Separate verify #721

merged 1 commit into from
Jul 11, 2024

Conversation

spapinistarkware
Copy link
Contributor

@spapinistarkware spapinistarkware commented Jul 11, 2024

This change is Reviewable

Copy link
Contributor Author

spapinistarkware commented Jul 11, 2024

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 Jul 11, 2024

Codecov Report

Attention: Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.60%. Comparing base (56e997c) to head (f169315).
Report is 2 commits behind head on dev.

Files Patch % Lines
crates/prover/src/core/prover/mod.rs 96.55% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #721      +/-   ##
==========================================
+ Coverage   90.56%   90.60%   +0.04%     
==========================================
  Files          76       76              
  Lines       10153    10274     +121     
  Branches    10153    10274     +121     
==========================================
+ Hits         9195     9309     +114     
- Misses        876      884       +8     
+ Partials       82       81       -1     

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

Copy link
Contributor

@alonh5 alonh5 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 r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @spapinistarkware)


crates/prover/src/core/prover/mod.rs line 195 at r1 (raw file):

    );

    prove_without_commit(

and change prove to be commit_and_prove.
Also in verifier.

Suggestion:

prove

crates/prover/src/core/prover/mod.rs line 206 at r1 (raw file):

pub fn verify(
    proof: StarkProof,
    air: &(impl Air + AirTraceVerifier),

To be symmetric with prove.

Suggestion:

air: &AirTraceVerifier,

@spapinistarkware spapinistarkware force-pushed the spapini/07-11-separate_verify branch from 072ad92 to 210bc34 Compare July 11, 2024 11:32
@spapinistarkware spapinistarkware changed the base branch from spapini/07-11-remove_n_interactions_from_air to dev July 11, 2024 11:32
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: 0 of 14 files reviewed, 1 unresolved discussion (waiting on @alonh5)


crates/prover/src/core/prover/mod.rs line 206 at r1 (raw file):

Previously, alonh5 (Alon Haramati) wrote…

To be symmetric with prove.

A bit harder, but went an extra step towards there. And added a TODO.

Copy link
Contributor

@alonh5 alonh5 left a comment

Choose a reason for hiding this comment

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

Reviewed 6 of 11 files at r3, 8 of 8 files at r4, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @spapinistarkware)


crates/prover/src/core/prover/mod.rs line 79 at r4 (raw file):

    let interaction_elements = air.interaction_elements(channel);
    let interaction_trace = air.interact(&trace, &interaction_elements);
    if !interaction_elements.is_empty() {

Why this change? Technically a component could declare interaction elements without having an interaction trace, this would cause an panic when trying to commit on an empty vec.


crates/prover/src/core/prover/mod.rs line 222 at r4 (raw file):

    let interaction_elements = air.interaction_elements(channel);

    if !interaction_elements.is_empty() {

Similarly to the previous comment, this could cause an out of range index in the commitments. Once you complete the TODO you can use the column log sizes. Until then maybe check the length of the commitments?

@spapinistarkware spapinistarkware force-pushed the spapini/07-11-separate_verify branch from 210bc34 to 132176c Compare July 11, 2024 11:59
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: 13 of 14 files reviewed, 2 unresolved discussions (waiting on @alonh5)


crates/prover/src/core/prover/mod.rs line 79 at r4 (raw file):

Previously, alonh5 (Alon Haramati) wrote…

Why this change? Technically a component could declare interaction elements without having an interaction trace, this would cause an panic when trying to commit on an empty vec.

Done.


crates/prover/src/core/prover/mod.rs line 222 at r4 (raw file):

Previously, alonh5 (Alon Haramati) wrote…

Similarly to the previous comment, this could cause an out of range index in the commitments. Once you complete the TODO you can use the column log sizes. Until then maybe check the length of the commitments?

Done.

@spapinistarkware spapinistarkware force-pushed the spapini/07-11-separate_verify branch from 132176c to f169315 Compare July 11, 2024 12:30
Copy link
Contributor

@alonh5 alonh5 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 1 of 1 files at r5, 1 of 1 files at r6, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @spapinistarkware)

@spapinistarkware spapinistarkware merged commit e4e9d03 into dev Jul 11, 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