-
Notifications
You must be signed in to change notification settings - Fork 1.2k
test: new commandline argument -tinyblk to use blk size just 64kb instead 16Mb #6986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
9391225 to
a4c1fd1
Compare
WalkthroughA new Sequence Diagram(s)sequenceDiagram
participant Init as init.cpp (arg parsing)
participant Storage as blockstorage.cpp (chunk selection)
participant Test as test_framework/util.py (test setup)
note over Init,Storage: Flag registration
Init->>Init: register -tinyblk (DEBUG_TEST)
note over Init,Storage: Runtime flag decision
Init->>Storage: process flags (-fastprune?, -tinyblk?)
alt -fastprune set
Storage->>Storage: blk_chunk = 16KB
else -tinyblk set
Storage->>Storage: blk_chunk = 64KB
Storage->>Storage: rev_chunk = 64KB
else
Storage->>Storage: blk_chunk = BLOCKFILE_CHUNK_SIZE
Storage->>Storage: rev_chunk = UNDOFILE_CHUNK_SIZE
end
note over Test: Test datadir/config flow
Test->>Test: dynamically_initialize_datadir(mnidx)
Test->>Test: write_config(datadir, tinyblk=1, ...)
Test->>Test: append_dip3_config(datadir)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…h dash.conf preparation
…tead 1Mb Benefits of using -tinyblk for functional tests are: - less IO operation during running functional tests makes them run a bit faster - datadirs consume less storage on CI, it will prevent failures with 'System.IO.IOException: No space left on device' - datadirs consume less storage locally, multiple failed runs with no cleaning up of tmp dirs less likely will cause exhaustion of disk space
a4c1fd1 to
375bf9d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/node/blockstorage.cpp (1)
628-628: Missing-tinyblkcheck in max file size logic.Line 628 determines when to roll over to a new block file, but it only checks for
-fastprune. When-tinyblkis set without-fastprune, files could grow up toMAX_BLOCKFILE_SIZEinstead of the intended 64 KB. This defeats the purpose of the-tinyblkflag, which is to keep files small for testing.Apply this diff to check for
-tinyblkas well:- while (m_blockfile_info[nFile].nSize + nAddSize >= (gArgs.GetBoolArg("-fastprune", false) ? 0x10000 /* 64kb */ : MAX_BLOCKFILE_SIZE)) { + while (m_blockfile_info[nFile].nSize + nAddSize >= (gArgs.GetBoolArg("-tinyblk", false) || gArgs.GetBoolArg("-fastprune", false) ? 0x10000 /* 64kb */ : MAX_BLOCKFILE_SIZE)) {
🧹 Nitpick comments (1)
src/init.cpp (1)
538-538: Consider enhancing the help text with the specific file size.The description "Use smaller block files for testing purposes" is generic. Consider specifying the actual size (64 KB) to help users understand the behavior without needing to examine the code.
Example:
- argsman.AddArg("-tinyblk", "Use smaller block files for testing purposes", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST); + argsman.AddArg("-tinyblk", "Use smaller block files (64 KB) for testing purposes", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
src/init.cpp(1 hunks)src/node/blockstorage.cpp(1 hunks)test/functional/test_framework/test_framework.py(6 hunks)test/functional/test_framework/util.py(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: kwvg
Repo: dashpay/dash PR: 6543
File: src/wallet/receive.cpp:240-251
Timestamp: 2025-02-06T14:34:30.466Z
Learning: Pull request #6543 is focused on move-only changes and refactoring, specifically backporting from Bitcoin. Behavior changes should be proposed in separate PRs.
Learnt from: kwvg
Repo: dashpay/dash PR: 6718
File: test/functional/test_framework/test_framework.py:2102-2102
Timestamp: 2025-06-09T16:43:20.996Z
Learning: In the test framework consolidation PR (#6718), user kwvg prefers to limit functional changes to those directly related to MasternodeInfo, avoiding scope creep even for minor improvements like error handling consistency.
📚 Learning: 2025-06-09T16:43:20.996Z
Learnt from: kwvg
Repo: dashpay/dash PR: 6718
File: test/functional/test_framework/test_framework.py:2102-2102
Timestamp: 2025-06-09T16:43:20.996Z
Learning: In the test framework consolidation PR (#6718), user kwvg prefers to limit functional changes to those directly related to MasternodeInfo, avoiding scope creep even for minor improvements like error handling consistency.
Applied to files:
test/functional/test_framework/test_framework.py
📚 Learning: 2025-08-10T13:52:46.289Z
Learnt from: kwvg
Repo: dashpay/dash PR: 6666
File: test/functional/rpc_netinfo.py:73-81
Timestamp: 2025-08-10T13:52:46.289Z
Learning: In the Bitcoin/Dash test framework, `self.node.extra_args` contains the original startup arguments for a TestNode and is not modified by `test.restart_node()`. Each restart with new `extra_args` doesn't update the stored `self.node.extra_args`, so copying from it always provides a clean slate without accumulated modifications from previous restarts.
Applied to files:
test/functional/test_framework/test_framework.py
🧬 Code graph analysis (2)
src/node/blockstorage.cpp (1)
src/flatfile.cpp (1)
FlatFileSeq(13-21)
test/functional/test_framework/test_framework.py (1)
test/functional/test_framework/util.py (3)
get_chain_folder(492-501)write_config(396-428)append_config(435-438)
🪛 Flake8 (7.3.0)
test/functional/test_framework/test_framework.py
[error] 628-628: continuation line under-indented for visual indent
(E128)
[error] 1480-1480: over-indented
(E117)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: mac-build / Build source
- GitHub Check: linux64_tsan-build / Build source
- GitHub Check: linux64_nowallet-build / Build source
- GitHub Check: arm-linux-build / Build source
- GitHub Check: linux64_sqlite-build / Build source
- GitHub Check: linux64-build / Build source
- GitHub Check: linux64_ubsan-build / Build source
- GitHub Check: linux64_fuzz-build / Build source
- GitHub Check: win64-build / Build source
- GitHub Check: Lint / Run linters
🔇 Additional comments (6)
test/functional/test_framework/util.py (1)
422-423: LGTM!The addition of
tinyblk=1to the test framework configuration is well-placed and clearly documented. This will help reduce I/O and disk usage during functional tests, directly supporting the performance improvements mentioned in the PR objectives.test/functional/test_framework/test_framework.py (5)
58-59: LGTM! Import additions support the config writing refactor.The addition of
get_chain_folderandwrite_configimports aligns with the refactoring goal to consolidate config writing logic and introduce thetinyblk=1setting.
1465-1465: LGTM! Config writing consolidation improves maintainability.Moving the DIP3 config writing to a dedicated method reduces code duplication and aligns with the PR's refactoring objectives.
1600-1600: LGTM! Caller correctly updated for new signature.The call to
dynamically_initialize_datadircorrectly uses the new signature with the masternode index parameter.
631-633: The directory creation is intentional and necessary.The verification confirms that
stderrandstdoutdirectories must exist before test nodes attempt to create temporary log files within them (test_node.py lines 231-235, 615-616). The same pattern appears in util.py lines 391-392, indicating this is an established practice. Theexist_ok=Trueflag ensures safety even if both util.py and test_framework.py functions are called.
610-610: All callers confirmed to be updated to the new signature.Verification complete:
- Only one caller exists at line 1600:
self.dynamically_initialize_datadir(mn_idx)— already using the new signature- No external test scripts call this method
- All references are internal to the test framework and properly updated
The signature change is safe and all callers have been updated accordingly.
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
|
Looks good! Pls apply coderabbitai's suggestion re indentation 3338a6f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
test/functional/test_framework/test_framework.py (1)
610-633: Use themnidxparameter consistently throughout the method.Line 612 computes the datadir path using
len(self.nodes)while Line 627 uses themnidxparameter. For consistency and clarity, Line 612 should usemnidxinstead:Apply this diff to use the parameter consistently:
def dynamically_initialize_datadir(self, mnidx): source_data_dir = get_datadir_path(self.options.tmpdir, 0) # use node0 as a source - new_data_dir = get_datadir_path(self.options.tmpdir, len(self.nodes)) + new_data_dir = get_datadir_path(self.options.tmpdir, mnidx)Note: The method now returns
new_data_dir, but this value is not used at the call site (Line 1598). While this doesn't cause issues currently, consider either using the return value or removing it if not needed.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
test/functional/test_framework/test_framework.py(8 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: kwvg
Repo: dashpay/dash PR: 6718
File: test/functional/test_framework/test_framework.py:2102-2102
Timestamp: 2025-06-09T16:43:20.996Z
Learning: In the test framework consolidation PR (#6718), user kwvg prefers to limit functional changes to those directly related to MasternodeInfo, avoiding scope creep even for minor improvements like error handling consistency.
Learnt from: UdjinM6
Repo: dashpay/dash PR: 6786
File: ci/test/04_install.sh:99-101
Timestamp: 2025-08-01T07:46:37.840Z
Learning: In backport PRs like #6786, UdjinM6 prefers to defer non-critical fixes (such as shell command expansion issues) to separate commits/PRs to maintain focus on the primary backport objectives, consistent with the project's pattern of avoiding scope creep.
📚 Learning: 2025-06-09T16:43:20.996Z
Learnt from: kwvg
Repo: dashpay/dash PR: 6718
File: test/functional/test_framework/test_framework.py:2102-2102
Timestamp: 2025-06-09T16:43:20.996Z
Learning: In the test framework consolidation PR (#6718), user kwvg prefers to limit functional changes to those directly related to MasternodeInfo, avoiding scope creep even for minor improvements like error handling consistency.
Applied to files:
test/functional/test_framework/test_framework.py
📚 Learning: 2025-06-16T17:59:55.669Z
Learnt from: kwvg
Repo: dashpay/dash PR: 6665
File: src/evo/deterministicmns.cpp:1284-1287
Timestamp: 2025-06-16T17:59:55.669Z
Learning: In Dash masternode ProRegTx validation, platform ports (platformHTTPPort and platformP2PPort) are mandatory and must be non-zero, while netInfo (ipAndPort) is optional. This means that even if an empty netInfo returns 0 from GetPrimary().GetPort(), it won't cause false positives in port duplication checks since platform ports cannot be 0.
Applied to files:
test/functional/test_framework/test_framework.py
🧬 Code graph analysis (1)
test/functional/test_framework/test_framework.py (1)
test/functional/test_framework/util.py (5)
get_chain_folder(492-501)write_config(396-428)append_config(435-438)softfork_active(526-528)p2p_port(359-361)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: win64-build / Build source
- GitHub Check: mac-build / Build source
- GitHub Check: arm-linux-build / Build source
- GitHub Check: linux64_tsan-build / Build source
- GitHub Check: linux64_nowallet-build / Build source
- GitHub Check: linux64_ubsan-build / Build source
- GitHub Check: linux64_sqlite-build / Build source
- GitHub Check: linux64-build / Build source
- GitHub Check: linux64_fuzz-build / Build source
- GitHub Check: Lint / Run linters
🔇 Additional comments (4)
test/functional/test_framework/test_framework.py (4)
58-59: LGTM! Imports support the refactoring.The new imports
get_chain_folderandwrite_configare correctly added and used in the refactored configuration logic.
1461-1468: LGTM! Proper use of centralized DIP-3 config.The refactoring correctly uses the new
append_dip3_confighelper to inject DIP-3 configuration for dynamically added nodes, eliminating code duplication.
1479-1484: LGTM! Good refactoring to centralize DIP-3 configuration.The new
append_dip3_configmethod eliminates code duplication by centralizing DIP-3 related configuration injection. The implementation is clean and the indentation is correct.
1617-1648: LGTM! Addresses prior review feedback.The
node_p2p_portcalculation has been moved intodynamically_prepare_masternode(Line 1621) as suggested by UdjinM6, simplifying the method signature and improving encapsulation.
UdjinM6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kwvg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK def5d0a
…k size just 64kb instead 16Mb def5d0a chore: fix indentation (UdjinM6) 7a93394 test: inline node_p2p_port to dynamically_prepare_masternode instead passing args (Konstantin Akimov) 37c6855 fix: priority -fastprune over -tinyblock (Konstantin Akimov) 375bf9d test: new commandline argument -tinyblk to use blk size just 64kb instead 1Mb (Konstantin Akimov) 99f8abf test: avoid copy-paste when update dip3 params in dash.conf (Konstantin Akimov) 2972e84 test: removed duplicated code from dynamically_initialize_datadir with dash.conf preparation (Konstantin Akimov) 521d92f tests: unify dash.conf for dynamically added masternodes and statically added (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented Even trivial functional tests that have only genesis blocks without any funds still creates 2 files 17 Mbs in total: 16Mb files for blk00000.dat and 1Mb for rev00000.dat for each node: ``` $ test/functional/rpc_help.py --nocleanup <succeed> $ find /tmp/dash_func_test_5coohz_8 -ls | grep -E '/rev|blk' 436679 1024 -rw------- 1 knst knst 1048576 Nov 17 02:08 /tmp/dash_func_test_5coohz_8/node0/regtest/blocks/rev00000.dat 436673 16384 -rw------- 1 knst knst 16777216 Nov 17 02:08 /tmp/dash_func_test_5coohz_8/node0/regtest/blocks/blk00000.dat ``` It doesn't look like a lot for a single test, but we have 300 functional tests, in average ~3 nodes -> more than 10Gb of mostly zeroes written on disk for each CI run. Files are not sparse and indeed takes IO and disk space. ## What was done? Introduced a new command line argument `-tinyblk` which reduce allocated space for empty blk files to 64kb only. It works similar as `-fastprune` but doesn't affect pruning settings; only block size. Also minor refactoring for functional tests to avoid copy-past code when writting dash.conf for case of statically and dynamically added new nodes; duplicated code is unified. ## How Has This Been Tested? CI succeed for this PR: https://github.com/dashpay/dash/actions/runs/19412323566/job/55536154684?pr=6986 While `develop` fails: https://github.com/dashpay/dash/actions/runs/19392476511 ``` Unhandled exception. System.IO.IOException: No space left on device : '/home/runner/actions-runner/cached/_diag/Worker_20251116-201117-utc.log' ``` Local run: ``` 1602527 64 -rw------- 1 knst knst 65536 Nov 17 04:12 /tmp/dash_func_test_bw8hmeiz/node0/regtest/blocks/blk00000.dat 1602533 64 -rw------- 1 knst knst 65536 Nov 17 04:12 /tmp/dash_func_test_bw8hmeiz/node0/regtest/blocks/rev00000.dat ``` 64kb only. Some other tests that have more blocks and transactions in blocks have increased data file correctly as expected, for example: ``` 1505724 320 -rw------- 1 knst knst 327680 Nov 17 04:05 ./feature_llmq_simplepose_268/node0/regtest/blocks/blk00000.dat ``` Local run with 30 parallel jobs (-j30) become ~10seconds faster (195s -> 180+); for 20 jobs - no difference as IO is no more limiting factor. ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [x] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone ACKs for top commit: UdjinM6: light ACK def5d0a kwvg: utACK def5d0a Tree-SHA512: 6b0bcfdfb07e711a939dacc5c068527647bf1e65c10d8cfe9231facab6072d7a080376d38906708225b8851930bace0b20d1741a3da3daf346e292d237a72387
736bb26 chore: bump manpages for 23.0.1 (pasta) d5c7d25 chore: bump nMinimumChainWork and defaultAssumeValid (pasta) 4f8aa71 chore: bump version to 23.0.1 (pasta) 0865b7c docs: add release notes for 23.0.1 (pasta) 2048b42 Merge #6986: test: new commandline argument -tinyblk to use blk size just 64kb instead 16Mb (pasta) 1a9b20c Merge #7013: fix: update BuildTestVectors call to adjust batch size based on output flag (pasta) 36e4679 Merge #7009: fix: include QDebug directly (pasta) 69d0c9c Merge #6999: feat: verify and repair evodb diffs automatically at node startup (pasta) ca16437 Merge #6996: perf: reduce cs_main lock scope in evodb verify/repair operations (pasta) 207526e Merge #6977: fix: bls benchmarks crash when ran independently (pasta) 226aaf4 Merge #6969: feat: add evodb verify and repair RPC commands (pasta) 92abe9b Merge #6964: perf: remove duplicated check of same key in the instant send database (pasta) 5a1ec4c Merge #6961: fix: correct BLS scheme setting in `MigrateLegacyDiffs()` when `nVersion` is present (pasta) bf653d3 Merge #6949: depends: Qt 5.15.18 (pasta) faf58cd merge bitcoin#30774: Qt 5.15.16 (Kittywhiskers Van Gogh) 6a995f5 Merge #6944: fix: HD chain encryption check ordering issue (pasta) Pull request description: ## Issue being fixed or feature implemented See commits; release v23.0.1 ## What was done? see commits ## How Has This Been Tested? ## Breaking Changes ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: kwvg: utACK 736bb26 Tree-SHA512: fe02c4c3e520b11af54d09c47bda94112313456f9f1cb6d14e78ef16704b2a8ec8feb80fa914c55e152db2bcac7f278291824aaa36c8079eb9e0c9bff9e554a4
fe1cff3 chore: bump release to 23.0.2 (pasta) a8f15c1 Merge #7032: fix: drop gsl usage from RebuildListFromBlock function wrapper (pasta) 736bb26 chore: bump manpages for 23.0.1 (pasta) d5c7d25 chore: bump nMinimumChainWork and defaultAssumeValid (pasta) 4f8aa71 chore: bump version to 23.0.1 (pasta) 0865b7c docs: add release notes for 23.0.1 (pasta) 2048b42 Merge #6986: test: new commandline argument -tinyblk to use blk size just 64kb instead 16Mb (pasta) 1a9b20c Merge #7013: fix: update BuildTestVectors call to adjust batch size based on output flag (pasta) 36e4679 Merge #7009: fix: include QDebug directly (pasta) 69d0c9c Merge #6999: feat: verify and repair evodb diffs automatically at node startup (pasta) ca16437 Merge #6996: perf: reduce cs_main lock scope in evodb verify/repair operations (pasta) 207526e Merge #6977: fix: bls benchmarks crash when ran independently (pasta) 226aaf4 Merge #6969: feat: add evodb verify and repair RPC commands (pasta) 92abe9b Merge #6964: perf: remove duplicated check of same key in the instant send database (pasta) 5a1ec4c Merge #6961: fix: correct BLS scheme setting in `MigrateLegacyDiffs()` when `nVersion` is present (pasta) bf653d3 Merge #6949: depends: Qt 5.15.18 (pasta) faf58cd merge bitcoin#30774: Qt 5.15.16 (Kittywhiskers Van Gogh) 6a995f5 Merge #6944: fix: HD chain encryption check ordering issue (pasta) 6fd7059 chore: mark v23 as release (pasta) ae08f53 docs: integrate 6946 release notes into final (pasta) 74a222d Merge #6946: feat: show seed on wallet creation (pasta) 877343a Merge #6943: fix: don't treat arrays/objects as string literals for composite methods (pasta) 00368fb Merge #6940: fix: reuse best clsig to avoid potential race condition (pasta) 8eceb98 Merge #6938: fix: logic error in `CheckDecryptionKey` (pasta) 3f30664 Merge #6929: fix: repair `makeseeds.py`, `getblockchaininfo[softforks]` help text, drop extra `generate`s from test, resolve macOS GID issue (pasta) 7ba4f1c Merge #6928: docs: update man pages for 23.0 (pasta) a6c1d6a Merge #6920: chore: update minimum chain work, tx stats, checkpoints, seeds and SECURITY.md for v23 (pasta) 84df1f0 Merge #6909: chore: Translations 2025-10 (pasta) a6449b1 Merge #6885: fix: improve governance/proposal dialog strings (pasta) ebf3a64 docs: typos (pasta) 4ad5533 docs: typos (pasta) f407453 doc: Replace Bitcoin Core PR references with Dash Core backport PRs (pasta) 78d0725 docs: add note on proto bump and platformban p2p (pasta) e0519c3 docs: fix whitespace errors (pasta) bc8db22 docs: minor improvements to release notes (pasta) c338511 docs: reorganize rpc updates to organize extended address changes (thephez) 700c46e style: make heading style consistent (thephez) bd636bd docs: add contributors (pasta) 6d29bc3 docs: revert changes deferred to v24 (pasta) 615f5ff docs: make the downgrade warning more confident (pasta) 567771a Apply suggestions from code review (PastaPastaPasta) 2b3211a docs: add link to 22.1.3 release notes (pasta) 548a38a docs: remove individual release notes files (pasta) e770c25 docs: add v23.0.0 release notes and archive v22.1.3 (pasta) Pull request description: ## Issue being fixed or feature implemented Includes changes from 23.0.0 release too because we never merged it back. ## What was done? ## How Has This Been Tested? ## Breaking Changes ## Checklist: - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: PastaPastaPasta: utACK 491db4a kwvg: utACK 491db4a Tree-SHA512: 61895cd1f9d01ac7be1d407afe1ddd24b98e8242cb03229ecd586a4d2d1c43dbc62c98da52a8c715b3a5943fb40e99b23251e691f778779af9d6da94392122a3
Issue being fixed or feature implemented
Even trivial functional tests that have only genesis blocks without any funds still creates 2 files 17 Mbs in total: 16Mb files for blk00000.dat and 1Mb for rev00000.dat for each node:
It doesn't look like a lot for a single test, but we have 300 functional tests, in average ~3 nodes -> more than 10Gb of mostly zeroes written on disk for each CI run. Files are not sparse and indeed takes IO and disk space.
What was done?
Introduced a new command line argument
-tinyblkwhich reduce allocated space for empty blk files to 64kb only.It works similar as
-fastprunebut doesn't affect pruning settings; only block size.Also minor refactoring for functional tests to avoid copy-past code when writting dash.conf for case of statically and dynamically added new nodes; duplicated code is unified.
How Has This Been Tested?
CI succeed for this PR: https://github.com/dashpay/dash/actions/runs/19412323566/job/55536154684?pr=6986
While
developfails: https://github.com/dashpay/dash/actions/runs/19392476511Local run:
64kb only.
Some other tests that have more blocks and transactions in blocks have increased data file correctly as expected, for example:
Local run with 30 parallel jobs (-j30) become ~10seconds faster (195s -> 180+); for 20 jobs - no difference as IO is no more limiting factor.
Breaking Changes
N/A
Checklist: