Skip to content

Commit 9a35783

Browse files
Merge dashpay#6780: backport: batch jul 24 2025
49a05e4 Merge bitcoin#26194: rpc, wallet: use the same `next_index` key in `listdescriptors` and `importdescriptors` (PastaBot) 669b60e Merge bitcoin#27073: Convert ArgsManager::GetDataDir to a read-only function (PastaBot) 425ed5e Merge bitcoin#27124: docs: add ramdisk guide for running tests on OSX (PastaBot) c07cb09 Merge bitcoin#27271: RPC: Fix fund transaction crash when at 0-value, 0-fee (PastaBot) 4818e39 Merge bitcoin#26119: doc: Move -permitbaremultisig to the relay help category (PastaPastaPasta) 2fcb230 Merge bitcoin#27068: wallet: SecureString to allow null characters (PastaBot) 7c07a80 Merge bitcoin#22151: build: Follow Transifex docs to prepare XLIFF source (PastaBot) fff6c95 Merge bitcoin#24359: doc: Fix typos (PastaBot) f7ddd56 Merge bitcoin#24282: docs: Move explanation of hardened key syntax closer to KEY section (PastaBot) 8300adb Merge bitcoin#24330: doc: release-process: Specify remote name in "git fetch" (PastaBot) 379f039 Merge bitcoin#25158: rpc, wallet: add abandoned field for all categories of transaction in ListTransaction (PastaBot) 77db9c8 Merge bitcoin#26507: test: remove unused vars in `feature_block` (PastaBot) 5351b8b Merge bitcoin#26924: refactor: Add missing includes to fix gcc-13 compile error (PastaBot) d2f9d42 Merge bitcoin#26794: test: test banlist database recreation (PastaBot) Pull request description: ## Issue being fixed or feature implemented Batch of backports by @DashCoreAutoGuix ## What was done? ## 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)_ Top commit has no ACKs. Tree-SHA512: 7935d4dd9c2c37780c6057d264608f0f994b3ff61c58bd59f9644463eb94be4873b5b7a537956805ab504e7658f5d6d2cfc88e71e9545aeb75faf995e3b83559
2 parents 3b3169d + 49a05e4 commit 9a35783

28 files changed

+238
-87
lines changed

doc/descriptors.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ Descriptors consist of several types of expressions. The top level expression is
7373
- Followed by zero or more `/NUM` unhardened and `/NUM'` hardened BIP32 derivation steps.
7474
- Optionally followed by a single `/*` or `/*'` final step to denote all (direct) unhardened or hardened children.
7575
- The usage of hardened derivation steps requires providing the private key.
76-
- Anywhere a `'` suffix is permitted to denote hardened derivation, the suffix `h` can be used instead.
76+
77+
(Anywhere a `'` suffix is permitted to denote hardened derivation, the suffix `h` can be used instead.)
7778

7879
`ADDR` expressions are any type of supported address:
7980
- P2PKH addresses (base58, of the form `X...`). Note that P2PKH addresses in descriptors cannot be used for P2PK outputs (use the `pk` function instead).

doc/release-note-26194.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Add `next_index` in `listdescriptors` RPC
2+
-----------------
3+
4+
- Added a new `next_index` field in the response in `listdescriptors` to have the same format as `importdescriptors`

doc/release-notes-25158.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
RPC Wallet
2+
----------
3+
4+
- The `gettransaction`, `listtransactions`, `listsinceblock` RPCs now return
5+
the `abandoned` field for all transactions. Previously, the "abandoned" field
6+
was only returned for sent transactions. (#25158)

doc/release-notes-27068.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Wallet
2+
------
3+
4+
- Wallet passphrases may now contain null characters.
5+
Prior to this change, only characters up to the first
6+
null character were recognized and accepted. (#27068)

doc/release-process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Checkout the Dash Core version you'd like to build:
7171
pushd ./dash
7272
export SIGNER='(your builder key, ie udjinm6, pasta, etc)'
7373
export VERSION='(new version, e.g. 20.0.0)'
74-
git fetch "v${VERSION}"
74+
git fetch origin "v${VERSION}"
7575
git checkout "v${VERSION}"
7676
popd
7777
```

src/Makefile.qt.include

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,15 @@ $(srcdir)/qt/dashstrings.cpp: FORCE
437437
@test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
438438
$(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) COPYRIGHT_HOLDERS="$(COPYRIGHT_HOLDERS)" $(PYTHON) ../share/qt/extract_strings_qt.py $(libbitcoin_node_a_SOURCES) $(libbitcoin_wallet_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_zmq_a_SOURCES) $(libbitcoin_consensus_a_SOURCES) $(libbitcoin_util_a_SOURCES)
439439

440+
# The resulted dash_en.xlf source file should follow Transifex requirements.
441+
# See: https://docs.transifex.com/formats/xliff#how-to-distinguish-between-a-source-file-and-a-translation-file
440442
translate: $(srcdir)/qt/dashstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_BASE_CPP) qt/bitcoin.cpp $(BITCOIN_QT_WINDOWS_CPP) $(BITCOIN_QT_WALLET_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
441443
@test -n $(LUPDATE) || echo "lupdate is required for updating translations"
442444
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) -no-obsolete -I $(srcdir) -locations relative $^ -ts $(srcdir)/qt/locale/dash_en.ts
443445
@test -n $(LCONVERT) || echo "lconvert is required for updating translations"
444-
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LCONVERT) -o $(srcdir)/qt/locale/dash_en.xlf -i $(srcdir)/qt/locale/dash_en.ts
446+
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LCONVERT) -drop-translations -o $(srcdir)/qt/locale/dash_en.xlf -i $(srcdir)/qt/locale/dash_en.ts
447+
@$(SED) -i.old -e 's|source-language="en" target-language="en"|source-language="en"|' -e '/<target xml:space="preserve"><\/target>/d' $(srcdir)/qt/locale/dash_en.xlf
448+
@rm -f $(srcdir)/qt/locale/dash_en.xlf.old
445449

446450
$(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM)
447451
@test -f $(RCC)

src/crypto/sha256_arm_shani.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void Transform(uint32_t* s, const unsigned char* chunk, size_t blocks)
6262
MSG3 = vreinterpretq_u32_u8(vrev32q_u8(vld1q_u8(chunk + 48)));
6363
chunk += 64;
6464

65-
// Original implemenation preloaded message and constant addition which was 1-3% slower.
65+
// Original implementation preloaded message and constant addition which was 1-3% slower.
6666
// Now included as first step in quad round code saving one Q Neon register
6767
// "TMP0 = vaddq_u32(MSG0, vld1q_u32(&K[0]));"
6868

src/init.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,6 @@ void SetupServerArgs(ArgsManager& argsman)
591591
argsman.AddArg("-peerbloomfilters", strprintf("Support filtering of blocks and transaction with bloom filters (default: %u)", DEFAULT_PEERBLOOMFILTERS), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
592592
argsman.AddArg("-txreconciliation", strprintf("Enable transaction reconciliations per BIP 330 (default: %d)", DEFAULT_TXRECONCILIATION_ENABLE), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CONNECTION);
593593
argsman.AddArg("-peertimeout=<n>", strprintf("Specify a p2p connection timeout delay in seconds. After connecting to a peer, wait this amount of time before considering disconnection based on inactivity (minimum: 1, default: %d)", DEFAULT_PEER_CONNECT_TIMEOUT), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
594-
argsman.AddArg("-permitbaremultisig", strprintf("Relay non-P2SH multisig (default: %u)", DEFAULT_PERMIT_BAREMULTISIG), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
595594
// TODO: remove the sentence "Nodes not using ... incoming connections." once the changes from
596595
// https://github.com/bitcoin/bitcoin/pull/23542 have become widespread.
597596
argsman.AddArg("-port=<port>", strprintf("Listen for connections on <port>. Nodes not using the default ports (default: %u, testnet: %u, regtest: %u) are unlikely to get incoming connections. Not relevant for I2P (see doc/i2p.md).", defaultChainParams->GetDefaultPort(), testnetChainParams->GetDefaultPort(), regtestChainParams->GetDefaultPort()), ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::CONNECTION);
@@ -746,6 +745,8 @@ void SetupServerArgs(ArgsManager& argsman)
746745
argsman.AddArg("-bytespersigop", strprintf("Equivalent bytes per sigop in transactions for relay and mining (default: %u)", DEFAULT_BYTES_PER_SIGOP), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY);
747746
argsman.AddArg("-datacarrier", strprintf("Relay and mine data carrier transactions (default: %u)", DEFAULT_ACCEPT_DATACARRIER), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY);
748747
argsman.AddArg("-datacarriersize", strprintf("Maximum size of data in data carrier transactions we relay and mine (default: %u)", MAX_OP_RETURN_RELAY), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY);
748+
argsman.AddArg("-permitbaremultisig", strprintf("Relay non-P2SH multisig (default: %u)", DEFAULT_PERMIT_BAREMULTISIG), ArgsManager::ALLOW_ANY,
749+
OptionsCategory::NODE_RELAY);
749750
argsman.AddArg("-minrelaytxfee=<amt>", strprintf("Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s)",
750751
CURRENCY_UNIT, FormatMoney(DEFAULT_MIN_RELAY_TX_FEE)), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY);
751752
argsman.AddArg("-whitelistforcerelay", strprintf("Add 'forcerelay' permission to whitelisted inbound peers with default permissions. This will relay transactions even if the transactions were already in the mempool. (default: %d)", DEFAULT_WHITELISTFORCERELAY), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY);

src/qt/askpassphrasedialog.cpp

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,10 @@ void AskPassphraseDialog::accept()
106106
oldpass.reserve(MAX_PASSPHRASE_SIZE);
107107
newpass1.reserve(MAX_PASSPHRASE_SIZE);
108108
newpass2.reserve(MAX_PASSPHRASE_SIZE);
109-
// TODO: get rid of this .c_str() by implementing SecureString::operator=(std::string)
110-
// Alternately, find a way to make this input mlock()'d to begin with.
111-
oldpass.assign(ui->passEdit1->text().toStdString().c_str());
112-
newpass1.assign(ui->passEdit2->text().toStdString().c_str());
113-
newpass2.assign(ui->passEdit3->text().toStdString().c_str());
109+
110+
oldpass.assign(std::string_view{ui->passEdit1->text().toStdString()});
111+
newpass1.assign(std::string_view{ui->passEdit2->text().toStdString()});
112+
newpass2.assign(std::string_view{ui->passEdit3->text().toStdString()});
114113

115114
secureClearPassFields();
116115

@@ -185,8 +184,19 @@ void AskPassphraseDialog::accept()
185184
try {
186185
if(!model->setWalletLocked(false, oldpass, mode == UnlockMixing))
187186
{
188-
QMessageBox::critical(this, tr("Wallet unlock failed"),
189-
tr("The passphrase entered for the wallet decryption was incorrect."));
187+
// Check if the passphrase has a null character (see #27067 for details)
188+
if (oldpass.find('\0') == std::string::npos) {
189+
QMessageBox::critical(this, tr("Wallet unlock failed"),
190+
tr("The passphrase entered for the wallet decryption was incorrect."));
191+
} else {
192+
QMessageBox::critical(this, tr("Wallet unlock failed"),
193+
tr("The passphrase entered for the wallet decryption is incorrect. "
194+
"It contains a null character (ie - a zero byte). "
195+
"If the passphrase was set with a version of this software prior to 23.0, "
196+
"please try again with only the characters up to — but not including — "
197+
"the first null character. If this is successful, please set a new "
198+
"passphrase to avoid this issue in the future."));
199+
}
190200
}
191201
else
192202
{
@@ -207,8 +217,18 @@ void AskPassphraseDialog::accept()
207217
}
208218
else
209219
{
210-
QMessageBox::critical(this, tr("Wallet encryption failed"),
211-
tr("The passphrase entered for the wallet decryption was incorrect."));
220+
// Check if the old passphrase had a null character (see #27067 for details)
221+
if (oldpass.find('\0') == std::string::npos) {
222+
QMessageBox::critical(this, tr("Passphrase change failed"),
223+
tr("The passphrase entered for the wallet decryption was incorrect."));
224+
} else {
225+
QMessageBox::critical(this, tr("Passphrase change failed"),
226+
tr("The old passphrase entered for the wallet decryption is incorrect. "
227+
"It contains a null character (ie - a zero byte). "
228+
"If the passphrase was set with a version of this software prior to 23.0, "
229+
"please try again with only the characters up to — but not including — "
230+
"the first null character."));
231+
}
212232
}
213233
}
214234
else

src/qt/bitcoin.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans
171171

172172
static bool InitSettings()
173173
{
174+
gArgs.EnsureDataDir();
174175
if (!gArgs.GetSettingsPath()) {
175176
return true; // Do nothing if settings file disabled.
176177
}

0 commit comments

Comments
 (0)