Skip to content

backport: bitcoin#19585, #19590, #19605, #19613, #19620, #19655, #19660, #27629, bitcoin-core/gui#14, #34 #5827

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

Merged
merged 11 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 6 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,12 @@ after_success:
FILE_ENV="./ci/test/00_setup_env_arm.sh"
QEMU_USER_CMD=""

# s390 build was disabled temporarily because of disk space issues on the Travis VM
#
# - stage: test
# name: 'S390x [GOAL: install] [focal] [unit tests, functional tests]'
# arch: s390x # Can disable QEMU_USER_CMD and run the tests natively without qemu
# env: >-
# FILE_ENV="./ci/test/00_setup_env_s390x.sh"
# QEMU_USER_CMD=""
- stage: test
name: 'S390x [GOAL: install] [focal] [unit tests, functional tests]'
arch: s390x # Can disable QEMU_USER_CMD and run the tests natively without qemu
env: >-
FILE_ENV="./ci/test/00_setup_env_s390x.sh"
QEMU_USER_CMD=""

- stage: test
name: 'Win64 [GOAL: deploy] [unit tests, no gui, no functional tests]'
Expand Down
2 changes: 1 addition & 1 deletion contrib/devtools/optimize-pngs.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def content_hash(filename):
pngcrush = 'pngcrush'
git = 'git'
folders = [
"src/qt/res/movies",
"src/qt/res/animation",
"src/qt/res/icons",
"src/qt/res/images",
"share/pixmaps"
Expand Down
3 changes: 2 additions & 1 deletion doc/bips.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
BIPs that are implemented by Dash Core (up-to-date up to **v18.0**):
BIPs that are implemented by Bitcoin Core, some of them are relevant for Dash Core, some are just mentioned as a reference.
Specified versions, PRs are relevant to Bitcoin's core.

* [`BIP 9`](https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki): The changes allowing multiple soft-forks to be deployed in parallel have been implemented since **v0.12.1** ([PR #7575](https://github.com/bitcoin/bitcoin/pull/7575))
* [`BIP 11`](https://github.com/bitcoin/bips/blob/master/bip-0011.mediawiki): Multisig outputs are standard since **v0.6.0** ([PR #669](https://github.com/bitcoin/bitcoin/pull/669)).
Expand Down
14 changes: 7 additions & 7 deletions 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.2)
(updated for OpenBSD 6.7)

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

Expand All @@ -14,7 +14,7 @@ pkg_add git gmake libevent libtool
pkg_add qt5 # (optional for enabling the GUI)
pkg_add autoconf # (select highest version, e.g. 2.69)
pkg_add automake # (select highest version, e.g. 1.15)
pkg_add python # (select highest version, e.g. 3.6)
pkg_add python # (select highest version, e.g. 3.8)
pkg_add gmp
pkg_add boost

Expand All @@ -24,10 +24,10 @@ git clone https://github.com/dashpay/dash.git
See [dependencies.md](dependencies.md) for a complete overview.

**Important**: From OpenBSD 6.2 onwards a C++11-supporting clang compiler is
part of the base image, and while building it is necessary to make sure that this
compiler is used and not ancient g++ 4.2.1. This is done by appending
`CC=cc CXX=c++` to configuration commands. Mixing different compilers
within the same executable will result in linker errors.
part of the base image, and while building it is necessary to make sure that
this compiler is used and not ancient g++ 4.2.1. This is done by appending
`CC=cc CC_FOR_BUILD=cc CXX=c++` to configuration commands. Mixing different
compilers within the same executable will result in errors.

### Building BerkeleyDB

Expand Down Expand Up @@ -71,7 +71,7 @@ To configure with wallet:

To configure without wallet:
```bash
./configure --disable-wallet --with-gui=no CC=cc CXX=c++ MAKE=gmake
./configure --disable-wallet --with-gui=no CC=cc CC_FOR_BUILD=cc CXX=c++ MAKE=gmake
```

To configure with GUI:
Expand Down
6 changes: 3 additions & 3 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ RES_FONTS = \
qt/res/fonts/Montserrat/Montserrat-Thin.otf \
qt/res/fonts/Montserrat/Montserrat-ThinItalic.otf

RES_MOVIES = $(wildcard $(srcdir)/qt/res/movies/spinner-*.png)
RES_ANIMATION = $(wildcard $(srcdir)/qt/res/animation/spinner-*.png)

BITCOIN_RC = qt/res/dash-qt-res.rc

Expand All @@ -362,7 +362,7 @@ qt_libbitcoinqt_a_CXXFLAGS = $(AM_CXXFLAGS) $(QT_PIE_FLAGS)
qt_libbitcoinqt_a_OBJCXXFLAGS = $(AM_OBJCXXFLAGS) $(QT_PIE_FLAGS)

qt_libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
$(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(RES_ICONS) $(RES_IMAGES) $(RES_CSS) $(RES_FONTS) $(RES_MOVIES)
$(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(RES_ICONS) $(RES_IMAGES) $(RES_CSS) $(RES_FONTS) $(RES_ANIMATION)
if TARGET_DARWIN
qt_libbitcoinqt_a_SOURCES += $(BITCOIN_MM)
endif
Expand Down Expand Up @@ -435,7 +435,7 @@ $(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM)
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name dash_locale --format-version 1 $(@D)/temp_$(<F) > $@
@rm $(@D)/temp_$(<F)

$(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_CSS) $(RES_FONTS) $(RES_MOVIES)
$(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_CSS) $(RES_FONTS) $(RES_ANIMATION)
@test -f $(RCC)
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name dash --format-version 1 $< > $@

Expand Down
3 changes: 2 additions & 1 deletion src/consensus/validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ enum class TxValidationResult {
*/
// Only loose txn:
TX_RECENT_CONSENSUS_CHANGE,
TX_NOT_STANDARD, //!< didn't meet our local policy rules
TX_INPUTS_NOT_STANDARD, //!< inputs (covered by txid) failed policy rules
TX_NOT_STANDARD, //!< otherwise didn't meet our local policy rules
TX_MISSING_INPUTS, //!< transaction was missing some of its inputs
TX_PREMATURE_SPEND, //!< transaction spends a coinbase too early, or violates locktime/sequence locks
TX_BAD_SPECIAL, //!< special transaction violates some rules that are not enough for insta-ban
Expand Down
11 changes: 6 additions & 5 deletions src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ std::chrono::microseconds CalculateObjectGetDataTime(const CInv& inv, std::chron
}

// We delay processing announcements from inbound peers
if (inv.type == MSG_TX && !fMasternodeMode && use_inbound_delay) process_time += INBOUND_PEER_TX_DELAY;
if (inv.IsMsgTx() && !fMasternodeMode && use_inbound_delay) process_time += INBOUND_PEER_TX_DELAY;

return process_time;
}
Expand Down Expand Up @@ -1532,6 +1532,7 @@ bool PeerManagerImpl::MaybePunishNodeForTx(NodeId nodeid, const TxValidationStat
}
// Conflicting (but not necessarily invalid) data or different policy:
case TxValidationResult::TX_RECENT_CONSENSUS_CHANGE:
case TxValidationResult::TX_INPUTS_NOT_STANDARD:
case TxValidationResult::TX_NOT_STANDARD:
case TxValidationResult::TX_MISSING_INPUTS:
case TxValidationResult::TX_PREMATURE_SPEND:
Expand Down Expand Up @@ -1834,12 +1835,12 @@ bool PeerManagerImpl::AlreadyHave(const CInv& inv)
// masternode would not be able to exploit this to spam the network with specially
// crafted invalid DSTX-es and potentially cause high load cheaply, because
// corresponding checks in ProcessMessage won't let it to send DSTX-es too often.
bool fIgnoreRecentRejects = inv.type == MSG_DSTX ||
bool fIgnoreRecentRejects = inv.IsMsgDstx() ||
m_llmq_ctx->isman->IsWaitingForTx(inv.hash) ||
m_llmq_ctx->isman->IsLocked(inv.hash);

return (!fIgnoreRecentRejects && m_recent_rejects.contains(inv.hash)) ||
(inv.type == MSG_DSTX && static_cast<bool>(::dstxManager->GetDSTX(inv.hash))) ||
(inv.IsMsgDstx() && static_cast<bool>(::dstxManager->GetDSTX(inv.hash))) ||
m_mempool.exists(inv.hash) ||
(g_txindex != nullptr && g_txindex->HasTx(inv.hash));
}
Expand Down Expand Up @@ -2149,11 +2150,11 @@ void PeerManagerImpl::ProcessGetData(CNode& pfrom, Peer& peer, const std::atomic
}

bool push = false;
if (inv.type == MSG_TX || inv.type == MSG_DSTX) {
if (inv.IsGenTxMsg()) {
CTransactionRef tx = FindTxForGetData(&pfrom, inv.hash, mempool_req, longlived_mempool_time);
if (tx) {
CCoinJoinBroadcastTx dstx;
if (inv.type == MSG_DSTX) {
if (inv.IsMsgDstx()) {
dstx = ::dstxManager->GetDSTX(inv.hash);
}
if (dstx) {
Expand Down
7 changes: 7 additions & 0 deletions src/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,13 @@ class CInv
std::string GetCommand() const;
std::string ToString() const;

// Single-message helper methods
bool IsMsgTx() const { return type == MSG_TX; }
bool IsMsgDstx() const { return type == MSG_DSTX; }

// Combined-message helper methods
bool IsGenTxMsg() const { return type == MSG_TX || type == MSG_DSTX; }

private:
const char* GetCommandInternal() const;

Expand Down
2 changes: 1 addition & 1 deletion src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void BitcoinGUI::startSpinner()
static std::vector<std::unique_ptr<QPixmap>>::iterator itFrame;
while (vecFrames.size() < SPINNER_FRAMES) {
QString&& strFrame = QString("spinner-%1").arg(vecFrames.size(), 3, 10, QChar('0'));
QPixmap&& frame = getIcon(strFrame, GUIUtil::ThemedColor::ORANGE, MOVIES_PATH).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
QPixmap&& frame = getIcon(strFrame, GUIUtil::ThemedColor::ORANGE, ":animation/").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
itFrame = vecFrames.insert(vecFrames.end(), std::make_unique<QPixmap>(frame));
}
assert(vecFrames.size() == SPINNER_FRAMES);
Expand Down
Loading