Counters + Nursery#1081
Open
0xdeafbeef wants to merge 14 commits into
Open
Conversation
c42b3e2 to
5632ced
Compare
86fd664 to
1caad61
Compare
🧪 Network TestsTo run network tests for this PR, use: gh workflow run network-tests.yml -f pr_number=1081Available test options:
Test types: Results will be posted as workflow runs in the Actions tab. |
|
❌ Python formatting check failed in CI. Please run |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1081 +/- ##
==========================================
+ Coverage 58.97% 60.13% +1.16%
==========================================
Files 459 473 +14
Lines 76888 80100 +3212
Branches 76888 80100 +3212
==========================================
+ Hits 45342 48166 +2824
- Misses 29434 29607 +173
- Partials 2112 2327 +215 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9954586 to
26f600d
Compare
1f234ca to
65303c6
Compare
2950b8b to
675bdcf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
NODE CONFIGURATION MODEL CHANGES
[Yes]
Added
storage.cell_storage_threads.Default:
4.Rationale: cell store/remove now uses a dedicated worker pool for parallel traversal without occupying generic rayon/global worker capacity.
Changed defaults for
storage.states_gc:interval:60s->1srandom_offset:true->falseRationale: under high load, delayed states GC lets many short-lived counters accumulate. Running GC ASAP keeps counter storage closer to the real live set.
Old configs remain valid because the new field has a serde/default value and existing
states_gcconfigs still deserialize.BLOCKCHAIN CONFIGURATION MODEL CHANGES
[None]
COMPATIBILITY
Affected features:
[State]
cells_v3_migration_resumes_after_deleted_boundary_key.[Storage. States]
[Persistent State]
raw_state_store_allows_existing_snapshot.SPECIAL DEPLOYMENT ACTIONS
[Not Required]
Normal update is enough. 100M state migrates in 12m.
Note: downgrade after opening/migrating the cells DB is not supported.
PERFORMANCE IMPACT
[Expected impact]
Expected changes:
rc = 1counters are implicit and states GC runs more frequently by default.New metrics/dashboards include:
Manual devnet runs showed nursery saving a large share of short-lived cells before promotion; latest observed dashboard was roughly 30% written / 70% saved on the tested validator run. (which means at least x5 * 0.7 write traffic saved due to compactions).
Write amplification now is close to 1 for workloads operating with temporary state.
Tps for 10kk deploy:
TESTS
Unit Tests
[Covered by:]
storage::db::migrations::tests::cells_v3_migration_resumes_after_deleted_boundary_keystorage::shard_state::store_state_raw::test::raw_state_store_allows_existing_snapshotstorage::shard_state::cell_storage::tests::nursery_replays_insert_after_reopenstorage::shard_state::cell_storage::tests::nursery_replays_remove_after_reopenstorage::shard_state::cell_storage::tests::nursery_replays_promotion_after_reopenNetwork Tests
[Covered by:]
Devnet9 load testing.
Manual Tests
Deploy 100m accounts now completes in 3 hours. Could run even faster if we bump size of the raw cache.
30k tps on 10m state.
Notes/Additional Comments:
This PR changes node-local storage internals only. It does not change blockchain data structures, block formats, proofs, queue format, mempool API, or consensus rules.