Skip to content

feat(Merkle): partially implement Verify mode#991

Merged
kurtisc merged 1 commit intomainfrom
kurtis/durable-storage/verify-merkle
Apr 10, 2026
Merged

feat(Merkle): partially implement Verify mode#991
kurtisc merged 1 commit intomainfrom
kurtis/durable-storage/verify-merkle

Conversation

@kurtisc
Copy link
Copy Markdown
Contributor

@kurtisc kurtisc commented Apr 9, 2026

Part of RV-959

What

Implements (most of) Verify mode for the Merkle layer

Why

We want to move towards Verify and Prove mode implementations up to the Registry. This is a prerequisite.

How

  • Introduces VerifyImpl and MerkleLayer<KV, Verify>::from_verify_tree
  • Fills in 'impl MerkleLayerMode for Verify', delegating to MerkleLayerMode
  • Moves the VerifyTreeId::Default impl and makes default trees present. This makes sense to me as nodes that are created or rebalanced must be present, but is worth revisiting during implementation of the round-trip tests.

Doesn't implement proof parsing yet, which needs RV-958 and will allow construction of a Verify Merkle layer in production.

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 Apr 9, 2026

Codecov Report

❌ Patch coverage is 95.20000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.60%. Comparing base (bbf9876) to head (08db65e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
durable-storage/src/merkle_layer.rs 94.95% 2 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #991      +/-   ##
==========================================
+ Coverage   89.59%   89.60%   +0.01%     
==========================================
  Files         125      125              
  Lines       26863    26985     +122     
  Branches    26863    26985     +122     
==========================================
+ Hits        24067    24181     +114     
- Misses       2166     2171       +5     
- Partials      630      633       +3     

☔ 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.

@kurtisc kurtisc force-pushed the kurtis/durable-storage/verify-merkle branch 5 times, most recently from ece9634 to b0729f5 Compare April 10, 2026 08:37
Adds an implementation of the MerkleLayer using `Verify` mode.

Stubs `MerkleLayerMode::hash`.
@kurtisc kurtisc force-pushed the kurtis/durable-storage/verify-merkle branch from b0729f5 to 08db65e Compare April 10, 2026 08:39
@kurtisc kurtisc marked this pull request as ready for review April 10, 2026 08:41
@github-actions
Copy link
Copy Markdown

Benchmark results for revision b4a0ebe:

Metric Duration TPS
Mean 1.521731716s 26.286
Worst 1.531862093s 26.112
Best 1.515722048s 26.390
Standard Deviation ±4.119041ms ±0.071
Full results
Run Transfers Duration TPS
1 40 1.522020167s 26.281
2 40 1.52993071s 26.145
3 40 1.515952745s 26.386
4 40 1.527047935s 26.194
5 40 1.52248531s 26.273
6 40 1.519050031s 26.332
7 40 1.515722048s 26.390
8 40 1.520506621s 26.307
9 40 1.52177013s 26.285
10 40 1.519245307s 26.329
11 40 1.531862093s 26.112
12 40 1.519437723s 26.326
13 40 1.523201539s 26.260
14 40 1.518486865s 26.342
15 40 1.518636675s 26.339
16 40 1.519426261s 26.326
17 40 1.525768059s 26.216
18 40 1.523330257s 26.258
19 40 1.521015482s 26.298
20 40 1.519738361s 26.320

Compare the results above with those for the default branch.

@kurtisc kurtisc added this pull request to the merge queue Apr 10, 2026
Merged via the queue into main with commit 3c5cd88 Apr 10, 2026
10 checks passed
@kurtisc kurtisc deleted the kurtis/durable-storage/verify-merkle branch April 10, 2026 13:49
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