Skip to content

refactor(data-space): reuse Bytes for Prove and Verify mode#759

Merged
vapourismo merged 1 commit intomainfrom
ole/push-pnnstpnxqvrq
Feb 5, 2026
Merged

refactor(data-space): reuse Bytes for Prove and Verify mode#759
vapourismo merged 1 commit intomainfrom
ole/push-pnnstpnxqvrq

Conversation

@vapourismo
Copy link
Copy Markdown
Collaborator

@vapourismo vapourismo commented Jan 28, 2026

Closes RV-897

What

Use the Bytes state component in DataSpace's Prove and Verify modal representation.

Why

In Prove and Verify mode, DataSpace's main complexity comes from handling the underlying byte array. This complexity can be replaced with the Bytes component, thereby deduplicating it.

How

Bytes::new now takes a length to make non-empty instantiation easier. This is used by the DataSpace component. The zero-length creation is available via Default.

Source allows distinction between borrowed and owned representation via Borrow. We make use of this when instantiating the Bytes component in DataSpace's start_proof implementation, as borrowing Bytes's Normal-mode representation isn't an option from a DataSpace<Normal>.

DataSpace::populate_pages_with_bytes uses the new Bytes::zero_init_range to achieve whole-page writes.

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.

@vapourismo vapourismo changed the base branch from main to ole/push-xzwyvtlwwvvn January 28, 2026 18:01
@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch from c97c2be to 6b75b4b Compare January 29, 2026 17:19
@vapourismo vapourismo force-pushed the ole/push-xzwyvtlwwvvn branch from 72c6c59 to 20836b3 Compare January 29, 2026 17:19
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 29, 2026

Codecov Report

❌ Patch coverage is 87.24832% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.98%. Comparing base (773c5d8) to head (fdb75d9).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
data/src/components/bytes.rs 84.07% 17 Missing and 1 partial ⚠️
data/src/components/data_space.rs 96.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #759      +/-   ##
==========================================
+ Coverage   90.80%   90.98%   +0.17%     
==========================================
  Files         111      111              
  Lines       20963    20878      -85     
  Branches    20963    20878      -85     
==========================================
- Hits        19036    18995      -41     
+ Misses       1534     1491      -43     
+ Partials      393      392       -1     

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

@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch from 6b75b4b to 7a8756b Compare January 29, 2026 17:54
@vapourismo vapourismo force-pushed the ole/push-xzwyvtlwwvvn branch from 20836b3 to 0d8e813 Compare January 29, 2026 17:54
@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch from 7a8756b to 008c5b6 Compare January 30, 2026 12:03
@vapourismo vapourismo force-pushed the ole/push-xzwyvtlwwvvn branch from 0d8e813 to b5bfe32 Compare January 30, 2026 12:03
@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch from 008c5b6 to b7c3e30 Compare January 30, 2026 14:47
@vapourismo vapourismo force-pushed the ole/push-xzwyvtlwwvvn branch from b5bfe32 to 3549ee5 Compare January 30, 2026 14:47
@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch 2 times, most recently from d999839 to cb30540 Compare January 30, 2026 15:55
@vapourismo vapourismo force-pushed the ole/push-xzwyvtlwwvvn branch from 145e361 to 533c402 Compare January 30, 2026 15:55
@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch from cb30540 to bccee93 Compare January 30, 2026 16:31
@vapourismo vapourismo force-pushed the ole/push-xzwyvtlwwvvn branch from 533c402 to 270957f Compare January 30, 2026 16:31
@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch from bccee93 to c31d3f0 Compare January 30, 2026 16:32
@vapourismo vapourismo force-pushed the ole/push-xzwyvtlwwvvn branch from 270957f to 1816d14 Compare January 30, 2026 16:32
@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch from c31d3f0 to ba361fa Compare February 2, 2026 11:04
@vapourismo vapourismo force-pushed the ole/push-xzwyvtlwwvvn branch 2 times, most recently from 9a3b501 to 35fcd7e Compare February 2, 2026 11:06
@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch from ba361fa to 55713d3 Compare February 2, 2026 11:06
@vapourismo vapourismo changed the base branch from ole/push-xzwyvtlwwvvn to ole/push-vwvlnprpnzlq February 2, 2026 12:57
@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch from 55713d3 to f2ed91e Compare February 2, 2026 14:25
@vapourismo vapourismo force-pushed the ole/push-vwvlnprpnzlq branch 3 times, most recently from 2b1e310 to 6b3fb0a Compare February 2, 2026 14:50
@vapourismo vapourismo force-pushed the ole/push-vwvlnprpnzlq branch from 6b3fb0a to 0f4c965 Compare February 2, 2026 15:46
@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch 2 times, most recently from b618c42 to 347edf5 Compare February 2, 2026 15:55
@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch 3 times, most recently from f1b00db to 29194dc Compare February 3, 2026 15:52
@vapourismo vapourismo marked this pull request as ready for review February 3, 2026 15:58
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 3, 2026

Benchmark results for revision d0a0c8a:

Metric Duration TPS
Mean 1.523528424s 26.256
Worst 1.562796712s 25.595
Best 1.514389278s 26.413
Standard Deviation ±9.527336ms ±0.161
Full results
Run Transfers Duration TPS
1 40 1.527056262s 26.194
2 40 1.562796712s 25.595
3 40 1.520560732s 26.306
4 40 1.524464869s 26.239
5 40 1.522572374s 26.271
6 40 1.525098335s 26.228
7 40 1.519685259s 26.321
8 40 1.520324673s 26.310
9 40 1.520658655s 26.304
10 40 1.5168443s 26.371
11 40 1.524345353s 26.241
12 40 1.522021293s 26.281
13 40 1.519867604s 26.318
14 40 1.521634895s 26.288
15 40 1.52252333s 26.272
16 40 1.514389278s 26.413
17 40 1.518431828s 26.343
18 40 1.517548662s 26.358
19 40 1.524602527s 26.236
20 40 1.525141538s 26.227

Compare the results above with those for the default branch.

@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch from 29194dc to a2c1ad1 Compare February 3, 2026 17:27
@vapourismo vapourismo force-pushed the ole/push-vwvlnprpnzlq branch from 0c21799 to 98b23c1 Compare February 3, 2026 17:27
@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch from a2c1ad1 to eab87fb Compare February 4, 2026 11:31
@vapourismo vapourismo force-pushed the ole/push-vwvlnprpnzlq branch from 98b23c1 to 4be6f32 Compare February 4, 2026 11:31
@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch from eab87fb to f3b47d3 Compare February 4, 2026 13:48
Base automatically changed from ole/push-vwvlnprpnzlq to main February 4, 2026 14:44
@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch from f3b47d3 to 7bd04a2 Compare February 4, 2026 14:49
@vapourismo vapourismo enabled auto-merge February 4, 2026 14:50
@vapourismo vapourismo force-pushed the ole/push-pnnstpnxqvrq branch from 7bd04a2 to fdb75d9 Compare February 4, 2026 19:35
Comment thread data/src/components/bytes.rs
@vapourismo vapourismo requested a review from NSant215 February 5, 2026 13:00
@vapourismo vapourismo added this pull request to the merge queue Feb 5, 2026
Merged via the queue into main with commit f7a5dda Feb 5, 2026
8 checks passed
@vapourismo vapourismo deleted the ole/push-pnnstpnxqvrq branch February 5, 2026 15:21
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