Skip to content

feat(registry): implement FromProof for Registry#1083

Open
emturner wants to merge 1 commit into
mainfrom
emturner@tzx-135
Open

feat(registry): implement FromProof for Registry#1083
emturner wants to merge 1 commit into
mainfrom
emturner@tzx-135

Conversation

@emturner
Copy link
Copy Markdown
Contributor

@emturner emturner commented Jun 5, 2026

  • Closes TZX-135

What

Implement FromProof for Registry

Why

Required to deserialise a proof, and to recover the Registry<Verify> instance

How

mostly done by the verify mode for Vector

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.

@emturner emturner force-pushed the emturner@tzx-135 branch from aeb13d1 to ec7cca9 Compare June 5, 2026 09:27
@emturner emturner marked this pull request as ready for review June 5, 2026 09:32
@emturner emturner enabled auto-merge June 5, 2026 09:32
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Benchmark results for revision f02795e:

Metric Duration TPS
Mean 1.495428986s 26.749
Worst 1.508959828s 26.508
Best 1.480859827s 27.011
Standard Deviation ±7.266948ms ±0.130
Full results
Run Transfers Duration TPS
1 40 1.498129167s 26.700
2 40 1.506058886s 26.559
3 40 1.496247339s 26.734
4 40 1.493425134s 26.784
5 40 1.483806547s 26.958
6 40 1.505332961s 26.572
7 40 1.492616187s 26.799
8 40 1.501313144s 26.643
9 40 1.480859827s 27.011
10 40 1.484351247s 26.948
11 40 1.491756765s 26.814
12 40 1.48969044s 26.851
13 40 1.500044173s 26.666
14 40 1.49908942s 26.683
15 40 1.491591163s 26.817
16 40 1.501149016s 26.646
17 40 1.496871941s 26.722
18 40 1.494097374s 26.772
19 40 1.508959828s 26.508
20 40 1.493189168s 26.788

Compare the results above with those for the default branch.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.05%. Comparing base (94253a0) to head (ec7cca9).

Files with missing lines Patch % Lines
durable-storage/src/registry.rs 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1083      +/-   ##
==========================================
- Coverage   90.09%   90.05%   -0.04%     
==========================================
  Files         130      130              
  Lines       28355    28352       -3     
  Branches    28355    28352       -3     
==========================================
- Hits        25547    25533      -14     
- Misses       2045     2055      +10     
- Partials      763      764       +1     

☔ View full report in Codecov by Harness.
📢 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.

Copy link
Copy Markdown
Contributor

@victor-dumitrescu victor-dumitrescu left a comment

Choose a reason for hiding this comment

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

LGTM. Do you think it would be useful to add an ignored test which attempts proof_binary::deserialise::<Registry<KV, Verify>>(...)? Could also leave for when TZX-161 gets resolved.

@emturner
Copy link
Copy Markdown
Contributor Author

emturner commented Jun 5, 2026

LGTM. Do you think it would be useful to add an ignored test which attempts proof_binary::deserialise::<Registry<KV, Verify>>(...)? Could also leave for when TZX-161 gets resolved.

I think so! I'm in the process of writing some e2e tests which demonstrate the currently missing gaps - which will include this indeed 🙏🏻

I had intended them as a follow up - but actually it turns out it's preferable to do so now, as there's an additional change needed.

@emturner emturner disabled auto-merge June 5, 2026 14:10
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.

2 participants