Skip to content

refactor(storage): split block storage#836

Merged
0xdeafbeef merged 8 commits intomasterfrom
cas
Aug 15, 2025
Merged

refactor(storage): split block storage#836
0xdeafbeef merged 8 commits intomasterfrom
cas

Conversation

@0xdeafbeef
Copy link
Copy Markdown
Member

Pull Request Checklist

NODE CONFIGURATION MODEL CHANGES

BlockStorageConfig:

archive_chunk_size removed because we don't split archives.
split_block_tasks removed

Not sure if we should set block chunk size in a rpc config, or simply set it as max size which can be sent via tokio-codec.

COMPATIBILITY

Affected features:

Archive contents is byte by byte compatible with prev version, same with archive ids.

No migrations from previous version are provided, so this update should be done via resync.
Old rocks-db tables and migrations were removed to clean up the code.

SPECIAL DEPLOYMENT ACTIONS

Resync nodes one by one.

PERFORMANCE IMPACT

cpu

-18% irq cpu usage.
image
-44% io wait
image
-35% kernel space cpu usage
image
-15% user-space cpu usage
image

io

-80% io pressure, -65% io utilisation
image

-30% write traffic
image

-25% iops
image

-25% load avg
image

vm

-30% - 50%
page faults

image

metrics comparison:
metrics.html.zip

Manual Tests

pkill -9 of validator, was stable af. Re-syncs also worked flawlessly.

todo

  • [] compare node metrics with 10m state + 10k transfers for 2 hours

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 21, 2025

🧪 Network Tests

To run network tests for this PR, use:

gh workflow run network-tests.yml -f pr_number=836

Available test options:

  • Run all tests: gh workflow run network-tests.yml -f pr_number=836
  • Run specific test: gh workflow run network-tests.yml -f pr_number=836 -f test_selection=ping-pong

Test types: destroyable, ping-pong, one-to-many-internal-messages, fq-deploy, nft-index, persistent-sync

Results will be posted as workflow runs in the Actions tab.

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 21, 2025

Codecov Report

❌ Patch coverage is 71.76382% with 373 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.62%. Comparing base (323470e) to head (00b16d7).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
core/src/storage/block/blobs/mod.rs 66.92% 141 Missing and 72 partials ⚠️
core/src/storage/block/blobs/task.rs 78.26% 14 Missing and 21 partials ⚠️
core/src/storage/block/blobs/util.rs 76.19% 18 Missing and 12 partials ⚠️
core/src/storage/block/mod.rs 70.83% 19 Missing and 9 partials ⚠️
core/src/blockchain_rpc/service.rs 20.00% 23 Missing and 1 partial ⚠️
core/src/storage/block/blobs/writer.rs 64.70% 3 Missing and 9 partials ⚠️
util/src/compression.rs 78.94% 11 Missing and 1 partial ⚠️
core/src/storage/block/package_entry.rs 93.65% 1 Missing and 7 partials ⚠️
control/src/server.rs 0.00% 5 Missing ⚠️
core/src/storage/persistent_state/tests.rs 33.33% 0 Missing and 2 partials ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #836      +/-   ##
==========================================
+ Coverage   46.15%   46.62%   +0.47%     
==========================================
  Files         320      324       +4     
  Lines       57442    57698     +256     
  Branches    57442    57698     +256     
==========================================
+ Hits        26510    26902     +392     
+ Misses      29565    29362     -203     
- Partials     1367     1434      +67     

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

@0xdeafbeef 0xdeafbeef requested review from Rexagon and pashinov and removed request for pashinov July 22, 2025 09:47
@0xdeafbeef 0xdeafbeef marked this pull request as ready for review July 22, 2025 11:57
@0xdeafbeef
Copy link
Copy Markdown
Member Author

10m state + 10k tps, new version time diff don't degrade
image
https://grafana.broxus.com/goto/h9Zmz9UNR?orgId=1 (2 nodes lost sync because of block size protection, i'll fix it in the next commit)

@0xdeafbeef 0xdeafbeef force-pushed the cas branch 2 times, most recently from 559520d to 1c8100a Compare July 22, 2025 17:52
@0xdeafbeef
Copy link
Copy Markdown
Member Author

10m state + 10k tps, new version time diff don't degrade image grafana.broxus.com/goto/h9Zmz9UNR?orgId=1 (2 nodes lost sync because of block size protection, i'll fix it in the next commit)

with fix it handled 8 hours of 25k tps test

image
[2025-07-22T23:55:45Z INFO  nekroddos::util] Sent: 514609042 transactions in 20584 seconds

@0xdeafbeef
Copy link
Copy Markdown
Member Author

@pashinov PTAL

@0xdeafbeef 0xdeafbeef force-pushed the cas branch 2 times, most recently from 994e71f to 7d6da6a Compare August 15, 2025 10:55
We only move code here, no logic changes(yet).
@0xdeafbeef 0xdeafbeef force-pushed the cas branch 2 times, most recently from f7e1b20 to c5891c1 Compare August 15, 2025 11:06
@0xdeafbeef 0xdeafbeef added this pull request to the merge queue Aug 15, 2025
Merged via the queue into master with commit 7c38023 Aug 15, 2025
18 checks passed
@0xdeafbeef 0xdeafbeef deleted the cas branch August 15, 2025 11:44
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