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

Introduce ProofReceipt struct #510

Merged
merged 12 commits into from
Dec 5, 2024
Merged

Conversation

prajwolrg
Copy link
Contributor

@prajwolrg prajwolrg commented Dec 2, 2024

Description

The current Proof type in zkvm/src/proof is overloaded, sometimes including public values and sometimes not. This PR tries to address this ambiguity needs by creating ProofReceipt struct .

pub struct ProofReceipt {
  proof: Proof,
  public_values: PublicValues
}

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

Copy link

codecov bot commented Dec 2, 2024

Codecov Report

Attention: Patch coverage is 57.31707% with 35 lines in your changes missing coverage. Please review.

Project coverage is 58.44%. Comparing base (d944fc8) to head (38d3e01).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
crates/zkvm/adapters/sp1/src/host.rs 0.00% 21 Missing ⚠️
crates/zkvm/adapters/sp1/src/input.rs 0.00% 5 Missing ⚠️
crates/zkvm/zkvm/src/proof.rs 75.00% 5 Missing ⚠️
crates/zkvm/zkvm/src/host.rs 0.00% 4 Missing ⚠️
@@            Coverage Diff             @@
##             main     #510      +/-   ##
==========================================
- Coverage   58.45%   58.44%   -0.02%     
==========================================
  Files         278      278              
  Lines       29290    29303      +13     
==========================================
+ Hits        17122    17126       +4     
- Misses      12168    12177       +9     
Files with missing lines Coverage Δ
crates/proof-impl/btc-blockspace/src/prover.rs 100.00% <100.00%> (ø)
crates/proof-impl/checkpoint/src/prover.rs 100.00% <100.00%> (ø)
crates/proof-impl/cl-agg/src/prover.rs 100.00% <100.00%> (ø)
crates/proof-impl/cl-stf/src/prover.rs 100.00% <100.00%> (ø)
crates/proof-impl/evm-ee-stf/src/prover.rs 100.00% <100.00%> (ø)
crates/proof-impl/l1-batch/src/prover.rs 96.00% <100.00%> (ø)
crates/zkvm/adapters/native/src/host.rs 100.00% <100.00%> (+10.34%) ⬆️
crates/zkvm/adapters/native/src/input.rs 100.00% <100.00%> (ø)
crates/zkvm/zkvm/src/prover.rs 100.00% <100.00%> (ø)
crates/zkvm/zkvm/src/host.rs 0.00% <0.00%> (ø)
... and 3 more

... and 6 files with indirect coverage changes

@prajwolrg prajwolrg changed the title Str 669 proof with public values Introduce ProofReceipt Dec 2, 2024
@prajwolrg prajwolrg changed the title Introduce ProofReceipt Introduce ProofReceipt struct Dec 2, 2024
@prajwolrg prajwolrg marked this pull request as ready for review December 2, 2024 09:56
@prajwolrg prajwolrg requested review from a team as code owners December 2, 2024 09:56
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.

Nice work with the docstrings. I think this is an overall good idea. Just have 1 thing to discuss.

crates/zkvm/zkvm/src/proof.rs Outdated Show resolved Hide resolved
crates/zkvm/adapters/risc0/src/host.rs Show resolved Hide resolved
crates/zkvm/adapters/risc0/src/input.rs Outdated Show resolved Hide resolved
crates/zkvm/adapters/sp1/src/host.rs Show resolved Hide resolved
crates/zkvm/zkvm/src/proof.rs Show resolved Hide resolved
@prajwolrg prajwolrg force-pushed the STR-669-proof-with-public-values branch from a695f66 to 9b51c64 Compare December 3, 2024 02:57
@prajwolrg prajwolrg self-assigned this Dec 3, 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 38d3e01
I had a nit with the pub fields in ProofReceipt that making them not pub is more future-proof.

@MdTeach MdTeach added this pull request to the merge queue Dec 5, 2024
Merged via the queue into main with commit 3ee14b7 Dec 5, 2024
16 of 17 checks passed
@MdTeach MdTeach deleted the STR-669-proof-with-public-values branch December 5, 2024 03:59
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.

4 participants