Skip to content

Commit b564a33

Browse files
Merge #7214: backport: cherry-pick #7208, #7209, #7211, #7221, and #7222 into v23.1.x
da16809 docs: add #7221 and #7222 to v23.1.2 release notes (PastaClaw) 8a93926 Merge #7222: fix: properly skip evodb repair on reindex (pasta) b74b549 Merge #7221: refactor: rename bitcoin-util manpage and test references to dash-util (pasta) 81464ac Merge #7211: fix: qt info tab layout (pasta) 7c27c2f Merge #7209: fix: serialize TrySignChainTip to prevent concurrent signing race (pasta) 81d5eb2 Merge #7208: fix: skip collecting block txids during IBD to prevent unbounded memory growth (pasta) Pull request description: ## Backport Cherry-picks of #7208, #7209, #7211, #7221, and #7222 into `v23.1.x` for v23.1.2. ### Included - #7208 — `fix: skip collecting block txids during IBD to prevent unbounded memory growth` - #7209 — `fix: serialize TrySignChainTip to prevent concurrent signing race` - #7211 — `fix: qt info tab layout` - #7221 — `refactor: rename bitcoin-util manpage and test references to dash-util` - #7222 — `fix: properly skip evodb repair on reindex` ACKs for top commit: UdjinM6: utACK da16809 Tree-SHA512: bbe74a62fd34bdcaece22100050072706774854db47d61af644700ca063e2a3cdfd474fa451681861bf1a6e91436ebd3715838640fc992fbba7c2b57b4f02760
2 parents 366090d + da16809 commit b564a33

13 files changed

Lines changed: 170 additions & 133 deletions

File tree

doc/man/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if BUILD_BITCOIN_TX
1717
endif
1818

1919
if BUILD_BITCOIN_UTIL
20-
dist_man1_MANS+=bitcoin-util.1
20+
dist_man1_MANS+=dash-util.1
2121
endif
2222

2323
if ENABLE_WALLET

doc/man/bitcoin-util.1

Lines changed: 0 additions & 5 deletions
This file was deleted.

doc/man/dash-util.1

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
2+
.TH DASH-UTIL "1" "March 2026" "dash-util v23.1.2" "User Commands"
3+
.SH NAME
4+
dash-util \- manual page for dash-util v23.1.2
5+
.SH SYNOPSIS
6+
.B dash-util
7+
[\fI\,options\/\fR] [\fI\,commands\/\fR] \fI\,Do stuff\/\fR
8+
.SH DESCRIPTION
9+
Dash Core dash\-util utility version v23.1.2
10+
.SH OPTIONS
11+
.HP
12+
\-?
13+
.IP
14+
Print this help message and exit
15+
.HP
16+
\fB\-version\fR
17+
.IP
18+
Print version and exit
19+
.PP
20+
Chain selection options:
21+
.HP
22+
\fB\-chain=\fR<chain>
23+
.IP
24+
Use the chain <chain> (default: main). Allowed values: main, test,
25+
devnet, regtest
26+
.HP
27+
\fB\-devnet=\fR<name>
28+
.IP
29+
Use devnet chain with provided name
30+
.HP
31+
\fB\-testnet\fR
32+
.IP
33+
Use the test chain. Equivalent to \fB\-chain\fR=\fI\,test\/\fR
34+
.PP
35+
Commands:
36+
.IP
37+
grind
38+
.IP
39+
Perform proof of work on hex header string
40+
.SH COPYRIGHT
41+
Copyright (C) 2014-2026 The Dash Core developers
42+
Copyright (C) 2009-2026 The Bitcoin Core developers
43+
44+
Please contribute if you find Dash Core useful. Visit <https://dash.org/> for
45+
further information about the software.
46+
The source code is available from <https://github.com/dashpay/dash>.
47+
48+
This is experimental software.
49+
Distributed under the MIT software license, see the accompanying file COPYING
50+
or <https://opensource.org/licenses/MIT>

doc/release-notes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ require a reindex.
4444
- Fixed quorum labels not being correctly reseated when new quorum types are inserted (dash#7191).
4545
- Skip collecting block txids during IBD to prevent unbounded memory growth in `ChainLockSigner` (dash#7208).
4646
- Serialize `TrySignChainTip` to prevent concurrent signing races that could split signing shares across different block hashes (dash#7209).
47+
- Properly skip evodb repair when reindexing to prevent unnecessary repair attempts (dash#7222).
48+
49+
## Miscellaneous
50+
51+
- Renamed `bitcoin-util` manpage and test references to `dash-util` (dash#7221).
4752

4853
## Interfaces
4954

src/chainlock/signing.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ void ChainLockSigner::UpdatedBlockTip(const CBlockIndex* pindexNew, const CBlock
7575

7676
void ChainLockSigner::TrySignChainTip()
7777
{
78+
TRY_LOCK(cs_try_sign, locked);
79+
if (!locked) {
80+
return;
81+
}
82+
7883
if (!m_mn_sync.IsBlockchainSynced()) {
7984
return;
8085
}
@@ -182,6 +187,10 @@ void ChainLockSigner::BlockDisconnected(const std::shared_ptr<const CBlock>& blo
182187

183188
void ChainLockSigner::BlockConnected(const std::shared_ptr<const CBlock>& block, const CBlockIndex* pindex)
184189
{
190+
if (!m_mn_sync.IsBlockchainSynced()) {
191+
return;
192+
}
193+
185194
// We need this information later when we try to sign a new tip, so that we can determine if all included TXs are safe.
186195
const uint256& hash = pindex->GetBlockHash();
187196

src/chainlock/signing.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class ChainLockSigner final : public llmq::CRecoveredSigsListener, public CValid
4444
using BlockTxs = std::unordered_map<uint256, std::shared_ptr<Uint256HashSet>, BlockHasher>;
4545

4646
private:
47+
mutable Mutex cs_try_sign;
4748
mutable Mutex cs_signer;
4849

4950
std::unique_ptr<CScheduler> m_scheduler;
@@ -77,15 +78,15 @@ class ChainLockSigner final : public llmq::CRecoveredSigsListener, public CValid
7778
void BlockDisconnected(const std::shared_ptr<const CBlock>& block, const CBlockIndex* pindex) override
7879
EXCLUSIVE_LOCKS_REQUIRED(!cs_signer);
7980
void UpdatedBlockTip(const CBlockIndex* pindexNew, const CBlockIndex* pindexFork, bool fInitialDownload) override
80-
EXCLUSIVE_LOCKS_REQUIRED(!cs_signer);
81+
EXCLUSIVE_LOCKS_REQUIRED(!cs_try_sign, !cs_signer);
8182

8283
[[nodiscard]] MessageProcessingResult HandleNewRecoveredSig(const llmq::CRecoveredSig& recoveredSig) override
8384
EXCLUSIVE_LOCKS_REQUIRED(!cs_signer);
8485

8586
void Cleanup() EXCLUSIVE_LOCKS_REQUIRED(!cs_signer);
8687

8788
private:
88-
void TrySignChainTip() EXCLUSIVE_LOCKS_REQUIRED(!cs_signer);
89+
void TrySignChainTip() EXCLUSIVE_LOCKS_REQUIRED(!cs_try_sign, !cs_signer);
8990

9091
[[nodiscard]] BlockTxs::mapped_type GetBlockTxs(const uint256& blockHash)
9192
EXCLUSIVE_LOCKS_REQUIRED(!cs_signer);

src/init.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2411,6 +2411,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
24112411
}
24122412

24132413
chainman.m_load_block = std::thread(&util::TraceThread, "loadblk", [=, &args, &chainman, &node] {
2414+
// ThreadImport can switch fReindex from true to false, fetch its original state here to use later
2415+
bool skip_evodb_repair_on_reindex = fReindex || fReindexChainState;
24142416
ThreadImport(chainman, vImportFiles, args);
24152417

24162418
// force UpdatedBlockTip to initialize nCachedBlockHeight for DS, MN payments and budgets
@@ -2432,7 +2434,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
24322434
LogPrintf("Filling coin cache with masternode UTXOs: done in %dms\n", Ticks<std::chrono::milliseconds>(SteadyClock::now() - start));
24332435
}
24342436

2435-
if (fReindex || fReindexChainState) {
2437+
if (skip_evodb_repair_on_reindex) {
24362438
LogPrintf("Skipping evodb repair during reindex\n");
24372439
node.dmnman->CompleteRepair(); // Mark as repaired since we're rebuilding fresh
24382440
} else if (node.dmnman->IsRepaired() && !args.GetBoolArg("-forceevodbrepair", false)) {

src/qt/forms/networkwidget.ui

Lines changed: 89 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,95 @@
269269
</property>
270270
</widget>
271271
</item>
272+
<item row="13" column="0">
273+
<widget class="QLabel" name="labelChainLocks">
274+
<property name="text">
275+
<string>ChainLocks</string>
276+
</property>
277+
</widget>
278+
</item>
279+
<item row="14" column="0">
280+
<widget class="QLabel" name="bestClHeightLabel">
281+
<property name="text">
282+
<string>Current block height</string>
283+
</property>
284+
</widget>
285+
</item>
286+
<item row="14" column="1">
287+
<widget class="QLabel" name="bestClHeight">
288+
<property name="cursor">
289+
<cursorShape>IBeamCursor</cursorShape>
290+
</property>
291+
<property name="text">
292+
<string>N/A</string>
293+
</property>
294+
<property name="textFormat">
295+
<enum>Qt::PlainText</enum>
296+
</property>
297+
<property name="textInteractionFlags">
298+
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
299+
</property>
300+
</widget>
301+
</item>
302+
<item row="15" column="0">
303+
<widget class="QLabel" name="bestClTimeLabel">
304+
<property name="text">
305+
<string>Last block time</string>
306+
</property>
307+
</widget>
308+
</item>
309+
<item row="15" column="1">
310+
<widget class="QLabel" name="bestClTime">
311+
<property name="cursor">
312+
<cursorShape>IBeamCursor</cursorShape>
313+
</property>
314+
<property name="text">
315+
<string>N/A</string>
316+
</property>
317+
<property name="textFormat">
318+
<enum>Qt::PlainText</enum>
319+
</property>
320+
<property name="textInteractionFlags">
321+
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
322+
</property>
323+
</widget>
324+
</item>
325+
<item row="16" column="0">
326+
<widget class="QLabel" name="bestClHashLabel">
327+
<property name="text">
328+
<string>Last block hash</string>
329+
</property>
330+
</widget>
331+
</item>
332+
<item row="16" column="1">
333+
<widget class="QLabel" name="bestClHash">
334+
<property name="cursor">
335+
<cursorShape>IBeamCursor</cursorShape>
336+
</property>
337+
<property name="text">
338+
<string>N/A</string>
339+
</property>
340+
<property name="textFormat">
341+
<enum>Qt::PlainText</enum>
342+
</property>
343+
<property name="textInteractionFlags">
344+
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
345+
</property>
346+
</widget>
347+
</item>
348+
<item row="17" column="0">
349+
<spacer name="leftVerticalSpacer">
350+
<property name="orientation">
351+
<enum>Qt::Vertical</enum>
352+
</property>
353+
<property name="sizeHint" stdset="0">
354+
<size>
355+
<width>20</width>
356+
<height>40</height>
357+
</size>
358+
</property>
359+
</spacer>
360+
</item>
272361
</layout>
273362
</item>
274363
<item>
@@ -300,102 +389,6 @@
300389
</item>
301390
</layout>
302391
</item>
303-
<item>
304-
<layout class="QGridLayout" name="bottomGridLayout" columnstretch="0,1">
305-
<property name="horizontalSpacing">
306-
<number>12</number>
307-
</property>
308-
<item row="0" column="0">
309-
<widget class="QLabel" name="labelChainLocks">
310-
<property name="text">
311-
<string>ChainLocks</string>
312-
</property>
313-
</widget>
314-
</item>
315-
<item row="1" column="0">
316-
<widget class="QLabel" name="bestClHeightLabel">
317-
<property name="text">
318-
<string>Current block height</string>
319-
</property>
320-
</widget>
321-
</item>
322-
<item row="1" column="1">
323-
<widget class="QLabel" name="bestClHeight">
324-
<property name="cursor">
325-
<cursorShape>IBeamCursor</cursorShape>
326-
</property>
327-
<property name="text">
328-
<string>N/A</string>
329-
</property>
330-
<property name="textFormat">
331-
<enum>Qt::PlainText</enum>
332-
</property>
333-
<property name="textInteractionFlags">
334-
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
335-
</property>
336-
</widget>
337-
</item>
338-
<item row="2" column="0">
339-
<widget class="QLabel" name="bestClTimeLabel">
340-
<property name="text">
341-
<string>Last block time</string>
342-
</property>
343-
</widget>
344-
</item>
345-
<item row="2" column="1">
346-
<widget class="QLabel" name="bestClTime">
347-
<property name="cursor">
348-
<cursorShape>IBeamCursor</cursorShape>
349-
</property>
350-
<property name="text">
351-
<string>N/A</string>
352-
</property>
353-
<property name="textFormat">
354-
<enum>Qt::PlainText</enum>
355-
</property>
356-
<property name="textInteractionFlags">
357-
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
358-
</property>
359-
</widget>
360-
</item>
361-
<item row="3" column="0">
362-
<widget class="QLabel" name="bestClHashLabel">
363-
<property name="text">
364-
<string>Last block hash</string>
365-
</property>
366-
</widget>
367-
</item>
368-
<item row="3" column="1">
369-
<widget class="QLabel" name="bestClHash">
370-
<property name="cursor">
371-
<cursorShape>IBeamCursor</cursorShape>
372-
</property>
373-
<property name="text">
374-
<string>N/A</string>
375-
</property>
376-
<property name="textFormat">
377-
<enum>Qt::PlainText</enum>
378-
</property>
379-
<property name="textInteractionFlags">
380-
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
381-
</property>
382-
</widget>
383-
</item>
384-
</layout>
385-
</item>
386-
<item>
387-
<spacer name="verticalSpacer">
388-
<property name="orientation">
389-
<enum>Qt::Vertical</enum>
390-
</property>
391-
<property name="sizeHint" stdset="0">
392-
<size>
393-
<width>20</width>
394-
<height>40</height>
395-
</size>
396-
</property>
397-
</spacer>
398-
</item>
399392
</layout>
400393
</widget>
401394
<resources/>

src/qt/forms/proposalinfo.ui

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
</sizepolicy>
2121
</property>
2222
<layout class="QGridLayout" name="gridLayoutGovernance" columnstretch="0,1,0">
23+
<property name="leftMargin"><number>0</number></property>
24+
<property name="topMargin"><number>0</number></property>
25+
<property name="rightMargin"><number>0</number></property>
26+
<property name="bottomMargin"><number>0</number></property>
2327
<property name="horizontalSpacing">
2428
<number>12</number>
2529
</property>

src/qt/networkwidget.cpp

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ NetworkWidget::NetworkWidget(QWidget* parent) :
4545
ui->labelQuorums},
4646
{GUIUtil::FontWeight::Bold, 16});
4747

48-
for (auto* element : {ui->labelChainLocks, ui->labelInstantSend, ui->labelMasternodes}) {
48+
for (auto* element : {ui->labelInstantSend, ui->labelMasternodes, ui->labelChainLocks}) {
4949
element->setContentsMargins(0, 10, 0, 0);
5050
}
5151
}
@@ -55,25 +55,6 @@ NetworkWidget::~NetworkWidget()
5555
delete ui;
5656
}
5757

58-
void NetworkWidget::showEvent(QShowEvent* event)
59-
{
60-
QWidget::showEvent(event);
61-
62-
// Sync bottom grid label column width with left grid (deferred to showEvent
63-
// so CSS styling and font metrics are fully resolved)
64-
int maxLabelWidth{0};
65-
for (int row = 0; row < ui->leftGridLayout->rowCount(); ++row) {
66-
if (auto* item = ui->leftGridLayout->itemAtPosition(row, 0)) {
67-
if (auto* widget = item->widget()) {
68-
maxLabelWidth = std::max(maxLabelWidth, widget->sizeHint().width());
69-
}
70-
}
71-
}
72-
if (maxLabelWidth > 0) {
73-
ui->bottomGridLayout->setColumnMinimumWidth(0, maxLabelWidth);
74-
}
75-
}
76-
7758
void NetworkWidget::setClientModel(ClientModel* model)
7859
{
7960
clientModel = model;

0 commit comments

Comments
 (0)