Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
c060a2a
Merge bitcoin/bitcoin#27689: doc: remove mention of glibc 2.10+
DashCoreAutoGuix Aug 21, 2025
56686df
Merge bitcoin/bitcoin#27949: http: update libevent workaround to corr…
DashCoreAutoGuix Aug 21, 2025
5030a4d
Merge bitcoin/bitcoin#27947: MaybePunishNodeForTx: Remove unused mess…
DashCoreAutoGuix Aug 21, 2025
8b77a80
Merge bitcoin/bitcoin#27530: Remove now-unnecessary poll, fcntl inclu…
DashCoreAutoGuix Aug 21, 2025
23c0ea2
Merge bitcoin/bitcoin#28011: test: Rename EncodeDecimal to serializat…
DashCoreAutoGuix Aug 21, 2025
0a4441e
Merge bitcoin-core/gui#719: Remove confusing "Dust" label from coinco…
DashCoreAutoGuix Aug 21, 2025
d6a4ff5
Merge bitcoin/bitcoin#28040: wallet: sqlite: don't include sqlite fil…
DashCoreAutoGuix Aug 21, 2025
92742d8
Merge bitcoin/bitcoin#27928: test: Add more tests for the BIP21 imple…
DashCoreAutoGuix Aug 21, 2025
cbd2802
Merge bitcoin/bitcoin#29237: depends: Allow PATH with spaces in direc…
DashCoreAutoGuix Aug 21, 2025
e26ae22
Merge bitcoin/bitcoin#29235: doc: refer to "Node relay options" in po…
DashCoreAutoGuix Aug 21, 2025
6640a79
Merge bitcoin/bitcoin#29243: wallet: Reset chain notifications handle…
DashCoreAutoGuix Aug 21, 2025
7bb828b
Merge bitcoin/bitcoin#29456: docs: ci multi-arch requires qemu
DashCoreAutoGuix Aug 21, 2025
33a294a
Merge bitcoin/bitcoin#29469: doc: document preference for list-initia…
DashCoreAutoGuix Aug 21, 2025
265eebd
Merge bitcoin/bitcoin#29470: test: Add option to skip python unit tests
DashCoreAutoGuix Aug 21, 2025
479c23b
Merge bitcoin/bitcoin#29481: doc: Update OpenBSD build docs for 7.4
DashCoreAutoGuix Aug 21, 2025
4ffee8c
Merge bitcoin/bitcoin#28014: ci: re-enable gui tests for s390x
DashCoreAutoGuix Aug 21, 2025
1c8c746
test: remove unused EncodeDecimal from test framework util
PastaPastaPasta Aug 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ testing compared to other parts of the codebase. If you want to keep the work tr
system in a virtual machine with a Linux operating system of your choice.

To allow for a wide range of tested environments, but also ensure reproducibility to some extent, the test stage
requires `docker` to be installed. To install all requirements on Ubuntu, run
requires `docker` to be installed. To run on different architectures than the host `qemu` is also required. To install all requirements on Ubuntu, run

```
sudo apt install docker.io bash
sudo apt install docker.io bash qemu-user-static
```

To run the default test stage,
Expand Down
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_s390x.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ export RUN_UNIT_TESTS=true
export TEST_RUNNER_EXTRA="--exclude rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
export RUN_FUNCTIONAL_TESTS=true
export GOAL="install"
export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests --with-boost-process" # GUI tests disabled for now, see https://github.com/bitcoin/bitcoin/issues/23730
export BITCOIN_CONFIG="--enable-reduce-exports --with-boost-process"
6 changes: 3 additions & 3 deletions depends/funcs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ $(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
$(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
$(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=/
$(1)_config_env+=CMAKE_MODULE_PATH=$($($(1)_type)_prefix)/lib/cmake
$(1)_config_env+=PATH=$(build_prefix)/bin:$(PATH)
$(1)_build_env+=PATH=$(build_prefix)/bin:$(PATH)
$(1)_stage_env+=PATH=$(build_prefix)/bin:$(PATH)
$(1)_config_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_build_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_stage_env+=PATH="$(build_prefix)/bin:$(PATH)"

# Setting a --build type that differs from --host will explicitly enable
# cross-compilation mode. Note that --build defaults to the output of
Expand Down
4 changes: 3 additions & 1 deletion doc/build-openbsd.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OpenBSD build guide
======================
(updated for OpenBSD 6.7)
**Updated for OpenBSD [7.4](https://www.openbsd.org/74.html)**

This guide describes how to build dashd, dash-qt, and command-line utilities on OpenBSD.

Expand Down Expand Up @@ -40,6 +40,8 @@ from ports, for the same reason as boost above (g++/libstd++ incompatibility).
If you have to build it yourself, you can use [the installation script included
in contrib/](/contrib/install_db4.sh) like so:

Refer to [depends/README.md](/depends/README.md) for detailed instructions.

```bash
./contrib/install_db4.sh `pwd` CC=cc CXX=c++
```
Expand Down
6 changes: 4 additions & 2 deletions doc/developer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ code.
- `nullptr` is preferred over `NULL` or `(void*)0`.
- `static_assert` is preferred over `assert` where possible. Generally; compile-time checking is preferred over run-time checking.
- Align pointers and references to the left i.e. use `type& var` and not `type &var`.
- Prefer [`list initialization ({})`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-list) where possible.
For example `int x{0};` instead of `int x = 0;` or `int x(0);`

For function calls a namespace should be specified explicitly, unless such functions have been declared within it.
Otherwise, [argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl), also known as ADL, could be
Expand All @@ -135,7 +137,7 @@ int main()

Block style example:
```c++
int g_count = 0;
int g_count{0};

namespace foo {
class Class
Expand All @@ -147,7 +149,7 @@ public:
{
// Comment summarising what this section of code does
for (int i = 0; i < n; ++i) {
int total_sum = 0;
int total_sum{0};
// When something fails, return early
if (!Something()) return false;
...
Expand Down
4 changes: 2 additions & 2 deletions doc/policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

**Policy** (Mempool or Transaction Relay Policy) is the node's set of validation rules, in addition
to consensus, enforced for unconfirmed transactions before submitting them to the mempool. These
rules are local to the node and configurable (e.g. `-minrelaytxfee`, `-limitancestorsize`,
`-incrementalRelayFee`). Policy may include restrictions on the transaction itself, the transaction
rules are local to the node and configurable, see "Node relay options" when running `-help`.
Policy may include restrictions on the transaction itself, the transaction
in relation to the current chain tip, and the transaction in relation to the node's mempool
contents. Policy is *not* applied to transactions in blocks.

Expand Down
2 changes: 1 addition & 1 deletion doc/reduce-memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ threads take up 8MiB for the thread stack on a 64-bit system, and 4MiB in a

## Linux specific

By default, glibc's implementation of `malloc` may use more than one arena. This is known to cause excessive memory usage in some scenarios. To avoid this, make a script that sets `MALLOC_ARENA_MAX` before starting dashd:
By default, glibc will create up to two heap arenas per core. This is known to cause excessive memory usage in some scenarios. To avoid this make a script that sets `MALLOC_ARENA_MAX` before starting dashd:

```bash
#!/usr/bin/env bash
Expand Down
8 changes: 5 additions & 3 deletions src/httpserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,10 @@ std::string RequestMethodString(HTTPRequest::RequestMethod m)
/** HTTP request callback */
static void http_request_cb(struct evhttp_request* req, void* arg)
{
// Disable reading to work around a libevent bug, fixed in 2.2.0.
if (event_get_version_number() >= 0x02010600 && event_get_version_number() < 0x02020001) {
// Disable reading to work around a libevent bug, fixed in 2.1.9
// See https://github.com/libevent/libevent/commit/5ff8eb26371c4dc56f384b2de35bea2d87814779
// and https://github.com/bitcoin/bitcoin/pull/11593.
if (event_get_version_number() >= 0x02010600 && event_get_version_number() < 0x02010900) {
evhttp_connection* conn = evhttp_request_get_connection(req);
if (conn) {
bufferevent* bev = evhttp_connection_get_bufferevent(conn);
Expand Down Expand Up @@ -616,7 +618,7 @@ void HTTPRequest::WriteReply(int nStatus, const std::string& strReply)
evhttp_send_reply(req_copy, nStatus, nullptr, nullptr);
// Re-enable reading from the socket. This is the second part of the libevent
// workaround above.
if (event_get_version_number() >= 0x02010600 && event_get_version_number() < 0x02020001) {
if (event_get_version_number() >= 0x02010600 && event_get_version_number() < 0x02010900) {
evhttp_connection* conn = evhttp_request_get_connection(req_copy);
if (conn) {
bufferevent* bev = evhttp_connection_get_bufferevent(conn);
Expand Down
2 changes: 0 additions & 2 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@

#ifdef WIN32
#include <string.h>
#else
#include <fcntl.h>
#endif

#if HAVE_DECL_GETIFADDRS && HAVE_DECL_FREEIFADDRS
Expand Down
9 changes: 3 additions & 6 deletions src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ class PeerManagerImpl final : public PeerManager
*
* Changes here may need to be reflected in TxRelayMayResultInDisconnect().
*/
bool MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state, const std::string& message = "")
bool MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state)
EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex);

/** Maybe disconnect a peer and discourage future connections from its address.
Expand Down Expand Up @@ -1872,15 +1872,15 @@ bool PeerManagerImpl::MaybePunishNodeForBlock(NodeId nodeid, const BlockValidati
return false;
}

bool PeerManagerImpl::MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state, const std::string& message) {
bool PeerManagerImpl::MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state) {
switch (state.GetResult()) {
case TxValidationResult::TX_RESULT_UNSET:
break;
// The node is providing invalid data:
case TxValidationResult::TX_CONSENSUS:
{
LOCK(cs_main);
Misbehaving(nodeid, 100, message);
Misbehaving(nodeid, 100);
return true;
}
// Conflicting (but not necessarily invalid) data or different policy:
Expand All @@ -1897,9 +1897,6 @@ bool PeerManagerImpl::MaybePunishNodeForTx(NodeId nodeid, const TxValidationStat
case TxValidationResult::TX_CONFLICT_LOCK:
break;
}
if (message != "") {
LogPrint(BCLog::NET, "peer=%d: %s\n", nodeid, message);
}
return false;
}

Expand Down
8 changes: 0 additions & 8 deletions src/netbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@
#include <sys/un.h>
#endif

#ifndef WIN32
#include <fcntl.h>
#endif

#ifdef USE_POLL
#include <poll.h>
#endif

// Settings
static Mutex g_proxyinfo_mutex;
static Proxy proxyInfo[NET_MAX] GUARDED_BY(g_proxyinfo_mutex);
Expand Down
35 changes: 2 additions & 33 deletions src/qt/coincontroldialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ CoinControlDialog::CoinControlDialog(CCoinControl& coin_control, WalletModel* _m
GUIUtil::setFont({ui->labelCoinControlQuantityText,
ui->labelCoinControlBytesText,
ui->labelCoinControlAmountText,
ui->labelCoinControlLowOutputText,
ui->labelCoinControlFeeText,
ui->labelCoinControlAfterFeeText,
ui->labelCoinControlChangeText
Expand All @@ -82,23 +81,20 @@ CoinControlDialog::CoinControlDialog(CCoinControl& coin_control, WalletModel* _m
QAction *clipboardFeeAction = new QAction(tr("Copy fee"), this);
QAction *clipboardAfterFeeAction = new QAction(tr("Copy after fee"), this);
QAction *clipboardBytesAction = new QAction(tr("Copy bytes"), this);
QAction *clipboardLowOutputAction = new QAction(tr("Copy dust"), this);
QAction *clipboardChangeAction = new QAction(tr("Copy change"), this);

connect(clipboardQuantityAction, &QAction::triggered, this, &CoinControlDialog::clipboardQuantity);
connect(clipboardAmountAction, &QAction::triggered, this, &CoinControlDialog::clipboardAmount);
connect(clipboardFeeAction, &QAction::triggered, this, &CoinControlDialog::clipboardFee);
connect(clipboardAfterFeeAction, &QAction::triggered, this, &CoinControlDialog::clipboardAfterFee);
connect(clipboardBytesAction, &QAction::triggered, this, &CoinControlDialog::clipboardBytes);
connect(clipboardLowOutputAction, &QAction::triggered, this, &CoinControlDialog::clipboardLowOutput);
connect(clipboardChangeAction, &QAction::triggered, this, &CoinControlDialog::clipboardChange);

ui->labelCoinControlQuantity->addAction(clipboardQuantityAction);
ui->labelCoinControlAmount->addAction(clipboardAmountAction);
ui->labelCoinControlFee->addAction(clipboardFeeAction);
ui->labelCoinControlAfterFee->addAction(clipboardAfterFeeAction);
ui->labelCoinControlBytes->addAction(clipboardBytesAction);
ui->labelCoinControlLowOutput->addAction(clipboardLowOutputAction);
ui->labelCoinControlChange->addAction(clipboardChangeAction);

// toggle tree/list mode
Expand Down Expand Up @@ -349,12 +345,6 @@ void CoinControlDialog::clipboardBytes()
GUIUtil::setClipboard(ui->labelCoinControlBytes->text().replace(ASYMP_UTF8, ""));
}

// copy label "Dust" to clipboard
void CoinControlDialog::clipboardLowOutput()
{
GUIUtil::setClipboard(ui->labelCoinControlLowOutput->text());
}

// copy label "Change" to clipboard
void CoinControlDialog::clipboardChange()
{
Expand Down Expand Up @@ -452,17 +442,8 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *

// nPayAmount
CAmount nPayAmount = 0;
bool fDust = false;
for (const CAmount &amount : CoinControlDialog::payAmounts)
{
for (const CAmount &amount : CoinControlDialog::payAmounts) {
nPayAmount += amount;

if (amount > 0)
{
// Assumes a p2pkh script size
CTxOut txout(amount, CScript() << std::vector<unsigned char>(24, 0));
fDust |= IsDust(txout, model->node().getDustRelayFee());
}
}

CAmount nAmount = 0;
Expand Down Expand Up @@ -573,12 +554,9 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
QLabel *l3 = dialog->findChild<QLabel *>("labelCoinControlFee");
QLabel *l4 = dialog->findChild<QLabel *>("labelCoinControlAfterFee");
QLabel *l5 = dialog->findChild<QLabel *>("labelCoinControlBytes");
QLabel *l7 = dialog->findChild<QLabel *>("labelCoinControlLowOutput");
QLabel *l8 = dialog->findChild<QLabel *>("labelCoinControlChange");

// enable/disable "dust" and "change"
dialog->findChild<QLabel *>("labelCoinControlLowOutputText")->setEnabled(nPayAmount > 0);
dialog->findChild<QLabel *>("labelCoinControlLowOutput") ->setEnabled(nPayAmount > 0);
// enable/disable "change"
dialog->findChild<QLabel *>("labelCoinControlChangeText") ->setEnabled(nPayAmount > 0);
dialog->findChild<QLabel *>("labelCoinControlChange") ->setEnabled(nPayAmount > 0);

Expand All @@ -588,7 +566,6 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
l3->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nPayFee)); // Fee
l4->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAfterFee)); // After Fee
l5->setText(((nBytes > 0) ? ASYMP_UTF8 : "") + QString::number(nBytes)); // Bytes
l7->setText(fDust ? tr("yes") : tr("no")); // Dust
l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); // Change
if (nPayFee > 0)
{
Expand All @@ -598,25 +575,17 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
l8->setText(ASYMP_UTF8 + l8->text());
}

// turn label red when dust
l7->setStyleSheet((fDust) ? GUIUtil::getThemedStyleQString(GUIUtil::ThemedStyle::TS_ERROR) : "");

// tool tips
QString toolTipDust = tr("This label turns red if any recipient receives an amount smaller than the current dust threshold.");

// how many satoshis the estimated fee can vary per byte we guess wrong
double dFeeVary = (nBytes != 0) ? (double)nPayFee / nBytes : 0;

QString toolTip4 = tr("Can vary +/- %1 duff(s) per input.").arg(dFeeVary);

l3->setToolTip(toolTip4);
l4->setToolTip(toolTip4);
l7->setToolTip(toolTipDust);
l8->setToolTip(toolTip4);
dialog->findChild<QLabel *>("labelCoinControlFeeText") ->setToolTip(l3->toolTip());
dialog->findChild<QLabel *>("labelCoinControlAfterFeeText") ->setToolTip(l4->toolTip());
dialog->findChild<QLabel *>("labelCoinControlBytesText") ->setToolTip(l5->toolTip());
dialog->findChild<QLabel *>("labelCoinControlLowOutputText")->setToolTip(l7->toolTip());
dialog->findChild<QLabel *>("labelCoinControlChangeText") ->setToolTip(l8->toolTip());

// Insufficient funds
Expand Down
1 change: 0 additions & 1 deletion src/qt/coincontroldialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ private Q_SLOTS:
void clipboardFee();
void clipboardAfterFee();
void clipboardBytes();
void clipboardLowOutput();
void clipboardChange();
void radioTreeMode(bool);
void radioListMode(bool);
Expand Down
35 changes: 6 additions & 29 deletions src/qt/forms/coincontroldialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
</property>
<item>
<layout class="QFormLayout" name="formLayoutCoinControl1">
<property name="labelAlignment">
<set>Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="horizontalSpacing">
<number>10</number>
</property>
Expand Down Expand Up @@ -121,35 +124,6 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelCoinControlLowOutputText">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Dust:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="labelCoinControlLowOutput">
<property name="enabled">
<bool>false</bool>
</property>
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="contextMenuPolicy">
<enum>Qt::ActionsContextMenu</enum>
</property>
<property name="text">
<string notr="true">no</string>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
Expand Down Expand Up @@ -193,6 +167,9 @@
</item>
<item>
<layout class="QFormLayout" name="formLayoutCoinControl4">
<property name="labelAlignment">
<set>Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="horizontalSpacing">
<number>10</number>
</property>
Expand Down
Loading
Loading