Skip to content

Make MerkleLayer modal#792

Open
kurtisc wants to merge 2 commits intomainfrom
kurtis/durable-storage/modal-merkle-layer
Open

Make MerkleLayer modal#792
kurtisc wants to merge 2 commits intomainfrom
kurtis/durable-storage/modal-merkle-layer

Conversation

@kurtisc
Copy link
Contributor

@kurtisc kurtisc commented Feb 6, 2026

Closes RV-902

What

Refactors MerkleLayer to pass off methods to a modal implementation.

Why

We will need to be able to implement these for Proof and Verify modes.

How

  • Adds a new trait MerkleLayerMode
  • Implements the trait for Normal
  • Makes MerkleLayer generic over this trait
  • Implements the functionality using this trait for Normal

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.

@kurtisc kurtisc force-pushed the kurtis/durable-storage/modal-merkle-layer branch from f19297a to 0582d41 Compare February 6, 2026 18:19
@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.05%. Comparing base (5b58082) to head (f0fdcbd).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #792      +/-   ##
==========================================
- Coverage   91.08%   91.05%   -0.03%     
==========================================
  Files         110      110              
  Lines       20831    20831              
  Branches    20831    20831              
==========================================
- Hits        18973    18968       -5     
- Misses       1485     1490       +5     
  Partials      373      373              

☔ 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/modal-merkle-layer branch 3 times, most recently from ecb539d to 4a3ce9e Compare February 10, 2026 13:59
Adds modal generics to `MerkleLayer`

Adds a `MerkleLayerMode` trait

Implements `MerkleLayerMode` for `Normal`
Implements `MerkleLayer` methods using the associated modal type.
@kurtisc kurtisc force-pushed the kurtis/durable-storage/modal-merkle-layer branch from 4a3ce9e to f0fdcbd Compare February 10, 2026 15:24
@kurtisc kurtisc marked this pull request as ready for review February 10, 2026 17:54
@github-actions
Copy link

Benchmark results for revision abbcbf7:

Metric Duration TPS
Mean 1.51829718s 26.346
Worst 1.524812298s 26.233
Best 1.504052573s 26.595
Standard Deviation ±4.881075ms ±0.085
Full results
Run Transfers Duration TPS
1 40 1.521765301s 26.285
2 40 1.522225705s 26.277
3 40 1.52171415s 26.286
4 40 1.518219838s 26.347
5 40 1.513157899s 26.435
6 40 1.523211357s 26.260
7 40 1.520445329s 26.308
8 40 1.514268249s 26.415
9 40 1.524181318s 26.244
10 40 1.522987981s 26.264
11 40 1.520644593s 26.305
12 40 1.519884936s 26.318
13 40 1.524812298s 26.233
14 40 1.504052573s 26.595
15 40 1.513375014s 26.431
16 40 1.513877496s 26.422
17 40 1.515424185s 26.395
18 40 1.516748695s 26.372
19 40 1.517188278s 26.365
20 40 1.517758415s 26.355

Compare the results above with those for the default branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant