Commit f047d8b
committed
Merge #6986: test: new commandline argument -tinyblk to use blk 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: 6b0bcfdfb07e711a939dacc5c068527647bf1e65c10d8cfe9231facab6072d7a080376d38906708225b8851930bace0b20d1741a3da3daf346e292d237a72387File tree
4 files changed
+29
-37
lines changed- src
- node
- test/functional/test_framework
4 files changed
+29
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
| 538 | + | |
538 | 539 | | |
539 | 540 | | |
540 | 541 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
593 | 595 | | |
594 | 596 | | |
595 | 597 | | |
596 | 598 | | |
597 | | - | |
| 599 | + | |
598 | 600 | | |
599 | 601 | | |
600 | 602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
| 58 | + | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
610 | | - | |
| 610 | + | |
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
648 | 634 | | |
649 | 635 | | |
650 | 636 | | |
| |||
1476 | 1462 | | |
1477 | 1463 | | |
1478 | 1464 | | |
1479 | | - | |
1480 | | - | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
| 1465 | + | |
1484 | 1466 | | |
1485 | 1467 | | |
1486 | 1468 | | |
| |||
1494 | 1476 | | |
1495 | 1477 | | |
1496 | 1478 | | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
1497 | 1486 | | |
1498 | 1487 | | |
1499 | 1488 | | |
| |||
1593 | 1582 | | |
1594 | 1583 | | |
1595 | 1584 | | |
1596 | | - | |
1597 | | - | |
1598 | | - | |
1599 | 1585 | | |
1600 | 1586 | | |
1601 | | - | |
| 1587 | + | |
1602 | 1588 | | |
1603 | 1589 | | |
1604 | 1590 | | |
| |||
1609 | 1595 | | |
1610 | 1596 | | |
1611 | 1597 | | |
1612 | | - | |
| 1598 | + | |
1613 | 1599 | | |
1614 | 1600 | | |
1615 | 1601 | | |
| |||
1628 | 1614 | | |
1629 | 1615 | | |
1630 | 1616 | | |
1631 | | - | |
| 1617 | + | |
1632 | 1618 | | |
1633 | 1619 | | |
1634 | 1620 | | |
| 1621 | + | |
1635 | 1622 | | |
1636 | 1623 | | |
1637 | 1624 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| 422 | + | |
| 423 | + | |
422 | 424 | | |
423 | 425 | | |
424 | 426 | | |
| |||
0 commit comments