Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/dashpay/dash into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
PastaPastaPasta committed Dec 5, 2024
2 parents 9fd4a4b + 1e55310 commit 73ff658
Show file tree
Hide file tree
Showing 58 changed files with 863 additions and 574 deletions.
2 changes: 1 addition & 1 deletion ci/dash/build_src.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if [ "$CHECK_DOC" = 1 ]; then
# TODO: Check docs (re-enable after all Bitcoin PRs have been merged and docs fully fixed)
#test/lint/check-doc.py
# Run all linters
test/lint/lint-all.sh
test/lint/all-lint.py
fi

ccache --zero-stats --max-size=$CCACHE_SIZE
Expand Down
2 changes: 1 addition & 1 deletion ci/lint/06_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test/lint/git-subtree-check.sh src/minisketch
test/lint/git-subtree-check.sh src/univalue
test/lint/git-subtree-check.sh src/leveldb
test/lint/check-doc.py
test/lint/lint-all.sh
test/lint/all-lint.py

if [ "$CIRRUS_REPO_FULL_NAME" = "dashpay/dash" ] && [ -n "$CIRRUS_CRON" ]; then
git log --merges --before="2 days ago" -1 --format='%H' > ./contrib/verify-commits/trusted-sha512-root-commit
Expand Down
4 changes: 2 additions & 2 deletions contrib/guix/libexec/prelude.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
export LC_ALL=C
set -e -o pipefail

# shellcheck source=../../shell/realpath.bash
# shellcheck source=contrib/shell/realpath.bash
source contrib/shell/realpath.bash

# shellcheck source=../../shell/git-utils.bash
# shellcheck source=contrib/shell/git-utils.bash
source contrib/shell/git-utils.bash

################
Expand Down
2 changes: 1 addition & 1 deletion src/banman.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ class BanMan
CRollingBloomFilter m_discouraged GUARDED_BY(m_cs_banned) {50000, 0.000001};
};

#endif
#endif // BITCOIN_BANMAN_H
2 changes: 1 addition & 1 deletion src/batchedlogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ class CBatchedLogger
void Flush();
};

#endif//BITCOIN_BATCHEDLOGGER_H
#endif // BITCOIN_BATCHEDLOGGER_H
2 changes: 1 addition & 1 deletion src/coinjoin/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ constexpr int CalculateAmountPriority(CAmount nInputAmount)

} // namespace CoinJoin

#endif
#endif // BITCOIN_COINJOIN_COMMON_H
2 changes: 1 addition & 1 deletion src/consensus/amount.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ static constexpr CAmount COIN = 100000000;
static constexpr CAmount MAX_MONEY = 21000000 * COIN;
inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }

#endif // BITCOIN_CONSENSUS_AMOUNT_H
#endif // BITCOIN_CONSENSUS_AMOUNT_H
2 changes: 1 addition & 1 deletion src/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ T* GetContext(const CoreContext& context) noexcept
: nullptr;
}

#endif // BITCOIN_CONTEXT_VARIANT_H
#endif // BITCOIN_CONTEXT_H
4 changes: 2 additions & 2 deletions src/dashbls/.github/workflows/build-binds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
golang: [ '1.17' ]
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
golang: [ '1.22' ]
python: ['3.9', '3.10', '3.11', '3.12']

steps:
- name: Checkout code
Expand Down
135 changes: 83 additions & 52 deletions src/dashbls/configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AC_PREREQ([2.60])
AC_INIT([libdashbls],[1.3.3])
AC_INIT([libdashbls],[1.3.4])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([build-aux/m4])

Expand Down Expand Up @@ -100,7 +100,7 @@ dnl warning about something unrelated, for example about some path issue. If tha
dnl -Werror cannot be used because all of those warnings would be turned into errors.
AX_CHECK_COMPILE_FLAG([-Werror], [FLAG_WERROR="-Werror"], [FLAG_WERROR=""])

if [[[ "$use_debug" == "yes" || "$use_optimizations" == "no" ]]]; then
if test x"$use_debug" = x"yes" -o x"$use_optimizations" = x"no"; then
dnl Clear default -g -O2 flags
if test x"$CFLAGS_overridden" = x"no"; then
CFLAGS=""
Expand All @@ -112,7 +112,7 @@ if [[[ "$use_debug" == "yes" || "$use_optimizations" == "no" ]]]; then
dnl Disable optimizations
AX_CHECK_COMPILE_FLAG([-O0], [[DEBUG_FLAGS="$DEBUG_FLAGS -O0"]], [], [[$FLAG_WERROR]])

if [[[ "$use_debug" == "yes" ]]]; then
if test x"$use_debug" = x"yes"; then
dnl Prefer -g3, fall back to -g if that is unavailable.
AX_CHECK_COMPILE_FLAG(
[-g3],
Expand Down Expand Up @@ -220,7 +220,11 @@ case $host in
GMP_LDFLAGS="-L$gmp_prefix/lib"
fi
fi
;;
;;
*freebsd*)
GMP_CPPFLAGS="-I/usr/local/include"
GMP_LDFLAGS="-L/usr/local/lib"
;;
esac

if test x"$want_backend" = x"auto"; then
Expand Down Expand Up @@ -432,44 +436,74 @@ fi

use_pkgconfig=yes

if [[[ "$host_cpu" == x86_64 && "$use_optimizations" == "yes" ]]]; then
dnl Support for AMD64 (also known as x86_64 on some platforms) processors
CPU_ARCH="x64"
AC_DEFINE([ARCH], [X64], [Architecture.])
AC_DEFINE([WSIZE], [64], [Size of word in this architecture.])
elif [[[ "$host_cpu" == aarch* && "$use_optimizations" == "yes" ]]]; then
dnl Support for 64-bit ARM processors
dnl Relic doesn't support aarch64 yet, set CPU_ARCH to none and ARCH to RELIC_NONE.
CPU_ARCH="none"
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
AC_DEFINE([WSIZE], [64], [Size of word in this architecture.])
elif [[[ "$host_cpu" == i?86 && "$use_optimizations" == "yes" ]]]; then
dnl Support for Intel x86 processors
CPU_ARCH="x86"
AC_DEFINE([ARCH], [X86], [Architecture.])
AC_DEFINE([WSIZE], [32], [Size of word in this architecture.])
elif [[[ "$host_cpu" == arm* && "$use_optimizations" == "yes" ]]]; then
dnl Support for 32-bit native ARM processors
CPU_ARCH="arm"
AC_DEFINE([ARCH], [ARM], [Architecture.])
AC_DEFINE([WSIZE], [32], [Size of word in this architecture.])
elif [[[ "$host_cpu" == *64* ]]]; then
dnl Support for an undefined 64-bit architecture
CPU_ARCH="none"
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
AC_DEFINE([WSIZE], [64], [Size of word in this architecture.])
elif [[[ "$host_cpu" == *32* || "$host_cpu" == arm* || "$host_cpu" == i?86 ]]]; then
dnl Support for an undefined 32-bit architecture
CPU_ARCH="none"
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
AC_DEFINE([WSIZE], [32], [Size of word in this architecture.])
if test x"$use_optimizations" = x"yes"; then
case $host_cpu in
amd64 | x86_64)
dnl Support for AMD64 (also known as x86_64 on some platforms) processors
CPU_ARCH="x64"
AC_DEFINE([ARCH], [X64], [Architecture.])
AC_DEFINE([WSIZE], [64], [Size of word in this architecture.])
;;
aarch*)
dnl Support for 64-bit ARM processors
dnl Relic does not support aarch64 yet, set CPU_ARCH to none and ARCH to RELIC_NONE.
CPU_ARCH="none"
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
AC_DEFINE([WSIZE], [64], [Size of word in this architecture.])
;;
i?86)
dnl Support for Intel x86 processors
CPU_ARCH="x86"
AC_DEFINE([ARCH], [X86], [Architecture.])
AC_DEFINE([WSIZE], [32], [Size of word in this architecture.])
;;
arm*)
dnl Support for 32-bit native ARM processors
CPU_ARCH="arm"
AC_DEFINE([ARCH], [ARM], [Architecture.])
AC_DEFINE([WSIZE], [32], [Size of word in this architecture.])
;;
*64*)
dnl Support for an undefined 64-bit architecture
CPU_ARCH="none"
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
AC_DEFINE([WSIZE], [64], [Size of word in this architecture.])
;;
*32*)
dnl Support for an undefined 32-bit architecture
CPU_ARCH="none"
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
AC_DEFINE([WSIZE], [32], [Size of word in this architecture.])
;;
*)
AC_MSG_ERROR([Unable to determine host architecture, may not be supported!])
;;
esac
else
AC_MSG_ERROR([Unable to determine host architecture, may not be supported!])
case $host_cpu in
*64*)
dnl Support for an undefined 64-bit architecture
CPU_ARCH="none"
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
AC_DEFINE([WSIZE], [64], [Size of word in this architecture.])
;;
*32* | arm* | i?86)
dnl Support for an undefined 32-bit architecture
CPU_ARCH="none"
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
AC_DEFINE([WSIZE], [32], [Size of word in this architecture.])
;;
*)
AC_MSG_ERROR([Unable to determine host architecture, may not be supported!])
;;
esac
fi

case $host in
*darwin*)
AC_DEFINE([OPSYS], [MACOSX], [Detected operation system.])
TARGET_OS=darwin

AC_PATH_PROG([BREW],brew,)
if test x$BREW = x; then
AC_PATH_PROG([PORT],port,)
Expand All @@ -482,8 +516,10 @@ case $host in
fi
;;
*mingw*)
use_pkgconfig=no
AC_DEFINE([OPSYS], [WINDOWS], [Detected operation system.])
TARGET_OS=windows

use_pkgconfig=no
LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -all-static"

dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against.
Expand All @@ -496,16 +532,21 @@ case $host in
;;
*linux*)
AC_DEFINE([OPSYS], [LINUX], [Detected operation system.])
TARGET_OS=linux

RELIC_CPPFLAGS="-D_GNU_SOURCE"
;;
*android*)
AC_DEFINE([OPSYS], [DROID], [Detected operation system.])
TARGET_OS=android
;;
*freebsd*)
AC_DEFINE([OPSYS], [FREEBSD], [Detected operation system.])
TARGET_OS=freebsd
;;
*netbsd*)
AC_DEFINE([OPSYS], [NETBSD], [Detected operation system.])
TARGET_OS=netbsd
;;
*)
AC_DEFINE([OPSYS], [RELIC_NONE], [Detected operation system.])
Expand Down Expand Up @@ -555,7 +596,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])],
CFLAGS="$saved_CFLAGS"
])

if [[[ "$CFLAGS_overridden" == "no" && "$CXXFLAGS_overridden" == "no" ]]]; then
if test x"$CFLAGS_overridden" = x"no" -a x"$CXXFLAGS_overridden" = x"no"; then
dnl Enable warnings
AX_CHECK_COMPILE_FLAG([-Wall],[WARN_FLAGS="$WARN_FLAGS -Wall"], [], [[$FLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Wcast-align],[WARN_FLAGS="$WARN_FLAGS -Wcast-align"], [], [[$FLAG_WERROR]])
Expand Down Expand Up @@ -743,7 +784,6 @@ CORE_CPPFLAGS="$CORE_CPPFLAGS -DHAVE_BUILD_INFO"

case $host in
*mingw*)
TARGET_OS=windows
AC_CHECK_LIB([user32], [main], [], [AC_MSG_ERROR([libuser32 missing])])
AC_CHECK_LIB([shell32], [SHGetSpecialFolderPathW], [], [AC_MSG_ERROR([libshell32 missing])])
AC_CHECK_LIB([advapi32], [CryptAcquireContextW], [], [AC_MSG_ERROR([libadvapi32 missing])])
Expand Down Expand Up @@ -771,15 +811,10 @@ case $host in
AX_CHECK_LINK_FLAG([-Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1"], [], [])
;;
*darwin*)
TARGET_OS=darwin

AX_CHECK_LINK_FLAG([-Wl,-headerpad_max_install_names], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-headerpad_max_install_names"], [], [])
CORE_CPPFLAGS="$CORE_CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0"
OBJCXXFLAGS="$CXXFLAGS"
;;
*linux*)
TARGET_OS=linux
;;
esac

dnl These flags are specific to ld64, and may cause issues with other linkers.
Expand All @@ -799,19 +834,15 @@ AC_LANG_POP([C])
AC_MSG_CHECKING([whether to build runtest])
if test x$use_tests = xyes; then
AC_MSG_RESULT([yes])
BUILD_TEST="yes"
else
AC_MSG_RESULT([no])
BUILD_TEST=""
fi

AC_MSG_CHECKING([whether to build runbench])
if test x$use_bench = xyes; then
AC_MSG_RESULT([yes])
BUILD_BENCH="yes"
else
AC_MSG_RESULT([no])
BUILD_BENCH=""
fi

AM_CONDITIONAL([TARGET_DARWIN], [test "$TARGET_OS" = "darwin"])
Expand All @@ -836,8 +867,8 @@ AM_CONDITIONAL(WITH_MPC, test 1 -eq 1)
AM_CONDITIONAL(WITH_DV, test 1 -eq 1)
AM_CONDITIONAL(WITH_FBX, test 1 -eq 1)

AM_CONDITIONAL([USE_TESTS], [test x$BUILD_TEST = xyes])
AM_CONDITIONAL([USE_BENCH], [test x$BUILD_BENCH = xyes])
AM_CONDITIONAL([USE_TESTS], [test x"$use_tests" = x"yes"])
AM_CONDITIONAL([USE_BENCH], [test x"$use_bench" = x"yes"])
AM_CONDITIONAL([HARDEN], [test "$use_hardening" = "yes"])
AM_CONDITIONAL([OPTIMIZE], [test "$use_optimizations" = "yes"])

Expand Down Expand Up @@ -874,8 +905,8 @@ echo
echo "Options used to compile and link:"
echo " target os = $TARGET_OS"
echo " backend = $want_backend"
echo " build bench = $BUILD_BENCH"
echo " build test = $BUILD_TEST"
echo " build bench = $use_tests"
echo " build test = $use_bench"
echo " use debug = $use_debug"
echo " use hardening = $use_hardening"
echo " use optimizations = $use_optimizations"
Expand Down
2 changes: 1 addition & 1 deletion src/evo/creditpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ std::optional<CCreditPoolDiff> GetCreditPoolDiffForBlock(CCreditPoolManager& cpo
const CBlock& block, const CBlockIndex* pindexPrev, const Consensus::Params& consensusParams,
const CAmount blockSubsidy, BlockValidationState& state);

#endif
#endif // BITCOIN_EVO_CREDITPOOL_H
2 changes: 1 addition & 1 deletion src/evo/dmnstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,4 +377,4 @@ class CDeterministicMNStateDiff
};


#endif //BITCOIN_EVO_DMNSTATE_H
#endif // BITCOIN_EVO_DMNSTATE_H
4 changes: 2 additions & 2 deletions src/governance/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ class Object
}
}
};

} // namespace Governance
#endif

#endif // BITCOIN_GOVERNANCE_COMMON_H
2 changes: 1 addition & 1 deletion src/httprpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ void InterruptREST();
*/
void StopREST();

#endif
#endif // BITCOIN_HTTPRPC_H
2 changes: 1 addition & 1 deletion src/i2p.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 +286,4 @@ class Session
} // namespace sam
} // namespace i2p

#endif /* BITCOIN_I2P_H */
#endif // BITCOIN_I2P_H
6 changes: 3 additions & 3 deletions src/llmq/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ LLMQContext::LLMQContext(ChainstateManager& chainman, CConnman& connman, CDeterm
isman{[&]() -> llmq::CInstantSendManager* const {
assert(llmq::quorumInstantSendManager == nullptr);
llmq::quorumInstantSendManager = std::make_unique<llmq::CInstantSendManager>(*llmq::chainLocksHandler,
chainman.ActiveChainstate(),
connman, *qman, *sigman, *shareman,
sporkman, mempool, mn_sync, peerman,
chainman.ActiveChainstate(), *qman,
*sigman, *shareman, sporkman,
mempool, mn_sync, peerman,
is_masternode, unit_tests, wipe);
return llmq::quorumInstantSendManager.get();
}()},
Expand Down
Loading

0 comments on commit 73ff658

Please sign in to comment.