refactor: add in-memory chainstate backends to speed up tests - #7520
Draft
cylewitruk-stacks wants to merge 133 commits into
Draft
refactor: add in-memory chainstate backends to speed up tests#7520cylewitruk-stacks wants to merge 133 commits into
cylewitruk-stacks wants to merge 133 commits into
Conversation
…all-the-dbs # Conflicts: # stackslib/src/chainstate/stacks/db/blocks.rs
Contributor
|
@cylewitruk-stacks can you add a fix for |
Contributor
Author
@hstove-stacks Yup, the bots had already tackled that failure with the following explanation: The test was rewritten to remove fixed sleeps and wall-clock assumptions:
This makes the queue behavior deterministic and avoids failures caused by slower CI scheduling. Which I just pushed in b52a704 |
Coverage Report for CI Build 32702726478Coverage increased (+1.6%) to 88.213%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions7972 previously-covered lines in 121 files lost coverage.
Coverage Stats
💛 - Coveralls |
cylewitruk-stacks
force-pushed
the
testing/in-mem-for-all-the-dbs
branch
from
August 24, 2026 01:03
19bacd2 to
0ae9106
Compare
cylewitruk-stacks
force-pushed
the
testing/in-mem-for-all-the-dbs
branch
from
August 24, 2026 01:46
f99fe7b to
14a86ce
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.
Description
Refactor chainstate persistence behind pluggable storage backends and migrate the Stackslib test suite to in-memory storage where disk persistence is not under test.
This introduces:
ChainStatePersistenceand composable backends for the chainstate index, Clarity state, block store, and Nakamoto staging blocks.Production nodes continue to use the disk-backed implementation by default. The in-memory implementations are restricted to tests and builds using the
testingfeature.On a local M4 Mac, the full workspace test suite now completes in approximately 4m18s, down from roughly 15–18 minutes.
Applicable issues
Additional info (benefits, drawbacks, caveats)
Benefits:
Caveats:
Checklist
docs/property-testing.md)changelog.d/README.md). If this PR breaksanything for node operators or users, or requires them to manually do
anything (such as adjust a setting), use the breaking category.
rpc/openapi.yamlfor RPC endpoints,event-dispatcher.mdfor new events)clarity-benchmarkingrepo