Skip to content

feat(durable): generate proof from Prove-mode registry#1076

Merged
emturner merged 2 commits into
mainfrom
emturner@proof-durable
Jun 1, 2026
Merged

feat(durable): generate proof from Prove-mode registry#1076
emturner merged 2 commits into
mainfrom
emturner@proof-durable

Conversation

@emturner
Copy link
Copy Markdown
Contributor

@emturner emturner commented May 29, 2026

  • Part of TZX-147

What

Add produce_proof on Registry<Prove> - to generate a proof with the merkle proof, and final state hash.

Why

Required as part of the methods exposed by the NDS api (the same functionality exists for the RISC-V api also)

How

Re-use the Proof struct used by the PVM. Combine the MerkleProof fold, and the HashFold, into the same structure.

Manually Testing

make all

Tasks for the Author

  • Link all Linear issues related to this MR using magic words (e.g. part of, relates to, closes).
  • Eliminate dead code and other spurious artefacts introduced in your changes.
  • Document new public functions, methods and types.
  • Make sure the documentation for updated functions, methods, and types is correct.
  • Add tests for bugs that have been fixed.
  • Explain changes to regression test captures when applicable.
  • Write commit messages in agreement with our guidelines.
  • Self-review your changes to ensure they are high-quality.
  • Complete all of the above before assigning this MR to reviewers.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

❌ Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.07%. Comparing base (1f2991f) to head (83b935c).

Files with missing lines Patch % Lines
data/src/merkle_proof/proof.rs 0.00% 5 Missing ⚠️
durable-storage/src/registry.rs 0.00% 5 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1076      +/-   ##
==========================================
- Coverage   90.12%   90.07%   -0.05%     
==========================================
  Files         130      130              
  Lines       28337    28342       +5     
  Branches    28337    28342       +5     
==========================================
- Hits        25539    25530       -9     
- Misses       2040     2054      +14     
  Partials      758      758              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@emturner emturner force-pushed the emturner@proof-durable branch 5 times, most recently from 3ad7003 to ec1eca2 Compare June 1, 2026 13:06
@emturner emturner marked this pull request as ready for review June 1, 2026 13:10
@emturner emturner force-pushed the emturner@proof-durable branch from ec1eca2 to 08419c1 Compare June 1, 2026 13:11
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

Benchmark results for revision 402c8e3:

Metric Duration TPS
Mean 1.511699542s 26.461
Worst 1.524211745s 26.243
Best 1.501755276s 26.635
Standard Deviation ±6.796173ms ±0.119
Full results
Run Transfers Duration TPS
1 40 1.524211745s 26.243
2 40 1.503144982s 26.611
3 40 1.503361707s 26.607
4 40 1.519623359s 26.322
5 40 1.513109115s 26.436
6 40 1.504777601s 26.582
7 40 1.509587021s 26.497
8 40 1.511985288s 26.455
9 40 1.514573902s 26.410
10 40 1.51386322s 26.422
11 40 1.513072768s 26.436
12 40 1.517447211s 26.360
13 40 1.501755276s 26.635
14 40 1.519907331s 26.317
15 40 1.509742852s 26.495
16 40 1.503300612s 26.608
17 40 1.516773484s 26.372
18 40 1.509741067s 26.495
19 40 1.502284717s 26.626
20 40 1.52172758s 26.286

Compare the results above with those for the default branch.

Comment thread pvm/src/state_backend/proof_backend.rs
Copy link
Copy Markdown
Contributor

@thomasathorne thomasathorne left a comment

Choose a reason for hiding this comment

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

LGTM

@emturner emturner enabled auto-merge June 1, 2026 16:57
@emturner emturner force-pushed the emturner@proof-durable branch from 08419c1 to dce1625 Compare June 1, 2026 17:13
@emturner emturner force-pushed the emturner@proof-durable branch from dce1625 to 83b935c Compare June 1, 2026 17:19
@emturner emturner added this pull request to the merge queue Jun 1, 2026
Merged via the queue into main with commit 6f5bc4b Jun 1, 2026
9 of 10 checks passed
@emturner emturner deleted the emturner@proof-durable branch June 1, 2026 19:32
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