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

Str-700: Preparation work for the prover CI performance metrics #546

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

evgenyzdanovich
Copy link
Contributor

@evgenyzdanovich evgenyzdanovich commented Dec 17, 2024

Description

Preparation work for the prover CI performance metrics. Includes:

  • define ProofReport simple structure
  • factor out bin/prover-client/zkvm into a separate crate. Reuse this crate in provers/tests and de-duplicate some code. Later use it for in prover CI performance metrics.
  • Adjust Cargo.lock files in provers/

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature/Enhancement (non-breaking change which adds functionality or enhances an existing one)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor
  • New or updated tests
  • Dependency Update

Notes to Reviewers

Checklist

  • I have performed a self-review of my code.
  • I have commented my code where necessary.
  • I have updated the documentation if needed.
  • My changes do not introduce new warnings.
  • I have added tests that prove my changes are effective or that my feature works.
  • New and existing tests pass with my changes.

Related Issues

Unblocks STR-651.

@evgenyzdanovich evgenyzdanovich force-pushed the str-700-prep-work-for-prover-ci branch from c4b49d5 to bd3e6ea Compare December 17, 2024 23:31
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 64.00000% with 27 lines in your changes missing coverage. Please review.

Project coverage is 56.72%. Comparing base (5a42f42) to head (e978582).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/zkvm/zkvm/src/prover.rs 0.00% 9 Missing ⚠️
crates/zkvm/adapters/native/src/host.rs 0.00% 7 Missing ⚠️
crates/zkvm/adapters/sp1/src/host.rs 0.00% 7 Missing ⚠️
crates/zkvm/hosts/src/lib.rs 50.00% 3 Missing ⚠️
bin/prover-client/src/primitives/vms.rs 0.00% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main     #546      +/-   ##
==========================================
- Coverage   56.73%   56.72%   -0.02%     
==========================================
  Files         308      309       +1     
  Lines       31316    31387      +71     
==========================================
+ Hits        17768    17805      +37     
- Misses      13548    13582      +34     
Files with missing lines Coverage Δ
bin/prover-client/src/main.rs 0.00% <ø> (ø)
bin/prover-client/src/primitives/prover_input.rs 0.00% <ø> (ø)
bin/prover-client/src/prover.rs 0.00% <ø> (ø)
crates/zkvm/hosts/src/native.rs 100.00% <100.00%> (ø)
crates/zkvm/hosts/src/sp1.rs 0.00% <ø> (ø)
crates/zkvm/zkvm/src/host.rs 100.00% <ø> (ø)
crates/zkvm/zkvm/src/proof.rs 46.80% <ø> (ø)
bin/prover-client/src/primitives/vms.rs 0.00% <0.00%> (ø)
crates/zkvm/hosts/src/lib.rs 50.00% <50.00%> (ø)
crates/zkvm/adapters/native/src/host.rs 58.82% <0.00%> (-15.26%) ⬇️
... and 2 more

... and 1 file with indirect coverage changes

@evgenyzdanovich evgenyzdanovich force-pushed the str-700-prep-work-for-prover-ci branch from bd3e6ea to b672e9a Compare December 18, 2024 00:05
@evgenyzdanovich evgenyzdanovich marked this pull request as ready for review December 18, 2024 00:24
@evgenyzdanovich evgenyzdanovich requested review from a team as code owners December 18, 2024 00:24
MdTeach
MdTeach previously approved these changes Dec 18, 2024
Copy link
Member

@storopoli storopoli left a comment

Choose a reason for hiding this comment

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

Cosmetic nits.
Otherwise looks good and will ACK it.
Nice work

bin/prover-client/Cargo.toml Outdated Show resolved Hide resolved
crates/zkvm/hosts/src/lib.rs Show resolved Hide resolved
crates/zkvm/hosts/src/native.rs Show resolved Hide resolved
crates/zkvm/hosts/src/native.rs Show resolved Hide resolved
crates/zkvm/hosts/src/native.rs Show resolved Hide resolved
provers/tests/src/provers/generators.rs Show resolved Hide resolved
provers/tests/src/provers/generators.rs Outdated Show resolved Hide resolved
provers/tests/src/provers/l1_batch.rs Show resolved Hide resolved
provers/tests/src/provers/l2_batch.rs Show resolved Hide resolved
provers/tests/src/provers/mod.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@delbonis delbonis left a comment

Choose a reason for hiding this comment

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

Correct me if my understanding of how this works is incorrect but I would think that the proof generators should have the input be based on the block ranges so that it uniquely refers to what we're making the proof about. So that if we run the proof gen with the same input twice we always get the same proof.

Otherwise, concur with Jose's comments but looks well-reasoned.

@evgenyzdanovich
Copy link
Contributor Author

@delbonis Yes, you are correct. Isn't it the case for the current prover generators in the tests? I don't quite get your concerns, would appreciate if you unwrap your thinking more.

Generators are used in tests and operate on the test data (test btc block segment, ee block segment, etc). The inputs are defined directly in test cases. Generators input currently work as a convertor into the underlying prover input (for the underlying prover).

@delbonis
Copy link
Contributor

Yeah I'm seeing it in the other PR now. Not an issue that can be solved here.

delbonis
delbonis previously approved these changes Dec 18, 2024
delbonis
delbonis previously approved these changes Dec 19, 2024
storopoli
storopoli previously approved these changes Dec 20, 2024
Copy link
Member

@storopoli storopoli left a comment

Choose a reason for hiding this comment

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

ACK 55ac98c

@evgenyzdanovich evgenyzdanovich dismissed stale reviews from storopoli and delbonis via 0aa4b56 December 20, 2024 14:37
@evgenyzdanovich evgenyzdanovich force-pushed the str-700-prep-work-for-prover-ci branch from 55ac98c to 0aa4b56 Compare December 20, 2024 14:37
storopoli
storopoli previously approved these changes Dec 20, 2024
Copy link
Member

@storopoli storopoli left a comment

Choose a reason for hiding this comment

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

ACK 0aa4b56

@storopoli storopoli enabled auto-merge December 20, 2024 14:46
prajwolrg
prajwolrg previously approved these changes Dec 20, 2024
@evgenyzdanovich evgenyzdanovich dismissed stale reviews from prajwolrg and storopoli via e978582 December 20, 2024 14:54
Copy link
Member

@storopoli storopoli left a comment

Choose a reason for hiding this comment

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

ACK e978582

@storopoli storopoli added this pull request to the merge queue Dec 20, 2024
Merged via the queue into main with commit 5bc29bf Dec 20, 2024
18 checks passed
@storopoli storopoli deleted the str-700-prep-work-for-prover-ci branch December 20, 2024 15:43
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.

5 participants