Skip to content

Commit

Permalink
Merge remote-tracking branch 'btc/master' into btc-master
Browse files Browse the repository at this point in the history
  • Loading branch information
mxaddict committed May 28, 2023
2 parents 03d181a + 7d33ae7 commit 4d1b8e4
Show file tree
Hide file tree
Showing 171 changed files with 3,880 additions and 1,559 deletions.
11 changes: 6 additions & 5 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ task:
docker_arguments:
CI_IMAGE_NAME_TAG: debian:bullseye
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
<< : *CREDITS_TEMPLATE
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
QEMU_USER_CMD: "" # Disable qemu and run the test natively
Expand All @@ -185,11 +186,11 @@ task:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV

task:
name: '32-bit + dash [CentOS 8]'
name: '32-bit + dash [CentOS 9]'
<< : *GLOBAL_TASK_TEMPLATE
container:
docker_arguments:
CI_IMAGE_NAME_TAG: quay.io/centos/centos:stream8
CI_IMAGE_NAME_TAG: quay.io/centos/centos:stream9
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"
# For faster CI feedback, immediately schedule one task that runs all tests
<< : *CREDITS_TEMPLATE
Expand All @@ -211,8 +212,8 @@ task:
name: '[TSan, depends] [lunar]'
<< : *GLOBAL_TASK_TEMPLATE
container:
cpu: 6 # Increase CPU and Memory to avoid timeout
memory: 24G
cpu: 4
memory: 16G # The default memory is too small, so double everything
docker_arguments:
CI_IMAGE_NAME_TAG: ubuntu:lunar
FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh"
Expand Down Expand Up @@ -266,7 +267,7 @@ task:
<< : *GLOBAL_TASK_TEMPLATE
container:
cpu: 4
memory: 16G # The default memory is sometimes just a bit too small, so double everything
memory: 16G # The default memory is too small, so double everything
docker_arguments:
CI_IMAGE_NAME_TAG: ubuntu:focal
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"
Expand Down
9 changes: 9 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,12 @@ fi
command -v autoreconf >/dev/null || \
(echo "configuration failed, please install autoconf first" && exit 1)
autoreconf --install --force --warnings=all

if expr "'$(build-aux/config.guess --timestamp)" \< "'$(depends/config.guess --timestamp)" > /dev/null; then
cp depends/config.guess build-aux
cp depends/config.guess src/secp256k1/build-aux
fi
if expr "'$(build-aux/config.sub --timestamp)" \< "'$(depends/config.sub --timestamp)" > /dev/null; then
cp depends/config.sub build-aux
cp depends/config.sub src/secp256k1/build-aux
fi
47 changes: 0 additions & 47 deletions build-aux/m4/l_filesystem.m4

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@SOURCE_FILES@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
<ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">
<Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project>
</ProjectReference>
<ProjectReference Include="..\libbitcoin_common\libbitcoin_common.vcxproj">
Expand Down
2 changes: 1 addition & 1 deletion build_msvc/bitcoin.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33213.308
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoinconsensus", "libbitcoinconsensus\libbitcoinconsensus.vcxproj", "{2B384FA8-9EE1-4544-93CB-0D733C25E8CE}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_consensus", "libbitcoin_consensus\libbitcoin_consensus.vcxproj", "{2B384FA8-9EE1-4544-93CB-0D733C25E8CE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "navcoind", "navcoind\navcoind.vcxproj", "{D4513DDF-6013-44DC-ADCC-12EAF6D1F038}"
EndProject
Expand Down
5 changes: 1 addition & 4 deletions build_msvc/bitcoin_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,12 @@
/* Define to 1 to enable SQLite wallet */
#define USE_SQLITE 1

/* Define to 1 to enable ZMQ functions */
/* Define this symbol to enable ZMQ functions */
#define ENABLE_ZMQ 1

/* define if external signer support is enabled (requires Boost::Process) */
#define ENABLE_EXTERNAL_SIGNER /**/

/* Define this symbol if the consensus lib has been built */
#define HAVE_CONSENSUS_LIB 1

/* Define to 1 if you have the declaration of `be16toh', and to 0 if you
don't. */
#define HAVE_DECL_BE16TOH 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@
<ClCompile Include="..\..\src\arith_uint256.cpp" />
<ClCompile Include="..\..\src\consensus\merkle.cpp" />
<ClCompile Include="..\..\src\consensus\tx_check.cpp" />
<ClCompile Include="..\..\src\crypto\aes.cpp" />
<ClCompile Include="..\..\src\crypto\chacha20.cpp" />
<ClCompile Include="..\..\src\crypto\hmac_sha256.cpp" />
<ClCompile Include="..\..\src\crypto\hmac_sha512.cpp" />
<ClCompile Include="..\..\src\crypto\ripemd160.cpp" />
<ClCompile Include="..\..\src\crypto\sha1.cpp" />
<ClCompile Include="..\..\src\crypto\sha256.cpp" />
<ClCompile Include="..\..\src\crypto\sha256_sse4.cpp" />
<ClCompile Include="..\..\src\crypto\sha512.cpp" />
<ClCompile Include="..\..\src\hash.cpp" />
<ClCompile Include="..\..\src\primitives\block.cpp" />
<ClCompile Include="..\..\src\primitives\transaction.cpp" />
Expand Down
1 change: 1 addition & 0 deletions build_msvc/libtest_util/libtest_util.vcxproj.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<ProjectReference Include="..\..\src\bls\mcl\src\proj\mcl.vcxproj">
<Project>{1DBB979A-C212-45CD-9563-446A96F87F71}</Project>
</ProjectReference>
<ClCompile Include="..\..\src\wallet\test\util.cpp" />
@SOURCE_FILES@
</ItemGroup>
<Import Project="$(SolutionDir)common.props" />
Expand Down
2 changes: 1 addition & 1 deletion build_msvc/navcoin-tx/navcoin-tx.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ClCompile Include="..\..\src\bitcoin-tx.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
<ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">
<Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project>
</ProjectReference>
<ProjectReference Include="..\libbitcoin_common\libbitcoin_common.vcxproj">
Expand Down
2 changes: 1 addition & 1 deletion build_msvc/navcoin-util/navcoin-util.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ClCompile Include="..\..\src\bitcoin-util.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
<ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">
<Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project>
</ProjectReference>
<ProjectReference Include="..\libbitcoin_common\libbitcoin_common.vcxproj">
Expand Down
2 changes: 1 addition & 1 deletion build_msvc/navcoin-wallet/navcoin-wallet.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
<ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">
<Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project>
</ProjectReference>
<ProjectReference Include="..\libbitcoin_common\libbitcoin_common.vcxproj">
Expand Down
2 changes: 1 addition & 1 deletion build_msvc/navcoind/navcoind.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
<ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">
<Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project>
</ProjectReference>
<ProjectReference Include="..\libbitcoin_common\libbitcoin_common.vcxproj">
Expand Down
2 changes: 1 addition & 1 deletion build_msvc/test_navcoin/test_navcoin.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<ProjectReference Include="..\libminisketch\libminisketch.vcxproj">
<Project>{542007e3-be0d-4b0d-a6b0-aa8813e2558d}</Project>
</ProjectReference>
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
<ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">
<Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project>
</ProjectReference>
<ProjectReference Include="..\libbitcoin_cli\libbitcoin_cli.vcxproj">
Expand Down
1 change: 0 additions & 1 deletion ci/test/00_setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export USE_BUSY_BOX=${USE_BUSY_BOX:-false}
export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-true}
export RUN_FUNCTIONAL_TESTS=${RUN_FUNCTIONAL_TESTS:-true}
export RUN_TIDY=${RUN_TIDY:-false}
export RUN_SECURITY_TESTS=${RUN_SECURITY_TESTS:-false}
# By how much to scale the test_runner timeouts (option --timeout-factor).
# This is needed because some ci machines have slow CPU or disk, so sanitizers
# might be slow or a reindex might be waiting on disk IO.
Expand Down
8 changes: 3 additions & 5 deletions ci/test/00_setup_env_i686_centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ export LC_ALL=C.UTF-8

export HOST=i686-pc-linux-gnu
export CONTAINER_NAME=ci_i686_centos
export CI_IMAGE_NAME_TAG="quay.io/centos/centos:stream8"
# Use minimum supported python3.8 and gcc-8, see doc/dependencies.md
export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python38 python38-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison"
export CI_IMAGE_NAME_TAG="quay.io/centos/centos:stream9"
export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python3 python3-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison util-linux"
export PIP_PACKAGES="pyzmq"
export GOAL="install"
export NO_WERROR=1 # GCC 8
export NO_WERROR=1 # Suppress error: #warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform [-Werror=cpp]
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports"
export CONFIG_SHELL="/bin/dash"
export TEST_RUNNER_ENV="LC_ALL=en_US.UTF-8"
4 changes: 2 additions & 2 deletions ci/test/00_setup_env_native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ export LC_ALL=C.UTF-8

export CONTAINER_NAME=ci_native
export CI_IMAGE_NAME_TAG="ubuntu:20.04"
# Use minimum supported python3.8 and gcc-8 (or best-effort gcc-9), see doc/dependencies.md
# Use minimum supported python3.8 and gcc-9, see doc/dependencies.md
export PACKAGES="gcc-9 g++-9 python3-zmq libdbus-1-dev libharfbuzz-dev"
export DEP_OPTS="NO_UPNP=1 NO_NATPMP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1 CC=gcc-9 CXX=g++-9"
export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
export RUN_UNIT_TESTS_SEQUENTIAL="true"
export RUN_UNIT_TESTS="false"
export GOAL="install"
export NO_WERROR=1
export NO_WERROR=1 # -Werror=maybe-uninitialized
export DOWNLOAD_PREVIOUS_RELEASES="true"
export BITCOIN_CONFIG="--enable-zmq --with-libs=no --enable-reduce-exports \
--enable-debug CFLAGS=\"-g0 -O2 -funsigned-char\" CXXFLAGS=\"-g0 -O2 -funsigned-char\""
9 changes: 4 additions & 5 deletions ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ export LC_ALL=C.UTF-8

export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
export CI_IMAGE_NAME_TAG="ubuntu:20.04"
# Use minimum supported python3.8 and clang-8, see doc/dependencies.md
export PACKAGES="python3-zmq clang-8 llvm-8 libc++abi-8-dev libc++-8-dev"
export DEP_OPTS="NO_WALLET=1 CC=clang-8 CXX='clang++-8 -stdlib=libc++'"
# Use minimum supported python3.8 and clang-10, see doc/dependencies.md
export PACKAGES="python3-zmq clang-10 llvm-10 libc++abi-10-dev libc++-10-dev"
export DEP_OPTS="NO_WALLET=1 CC=clang-10 CXX='clang++-10 -stdlib=libc++'"
export GOAL="install"
export NO_WERROR=1
export BITCOIN_CONFIG="--enable-reduce-exports CC=clang-8 CXX='clang++-8 -stdlib=libc++' --enable-experimental-util-chainstate --with-experimental-kernel-lib --enable-shared"
export BITCOIN_CONFIG="--enable-reduce-exports --enable-experimental-util-chainstate --with-experimental-kernel-lib --enable-shared"
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_native_tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8

export CI_IMAGE_NAME_TAG="ubuntu:lunar" # Version 23.04 will reach EOL in Jan 2024, and can be replaced by "ubuntu:24.04" (or anything else that ships the wanted clang version).
export CONTAINER_NAME=ci_native_tidy
export PACKAGES="clang-16 libclang-16-dev llvm-16-dev libomp-16-dev clang-tidy-16 bear cmake libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev libsqlite3-dev libdb++-dev"
export PACKAGES="clang-16 libclang-16-dev llvm-16-dev libomp-16-dev clang-tidy-16 jq bear cmake libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev libsqlite3-dev libdb++-dev"
export NO_DEPENDS=1
export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false
Expand Down
4 changes: 2 additions & 2 deletions ci/test/01_base_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ if [ -n "$DPKG_ADD_ARCH" ]; then
fi

if [[ $CI_IMAGE_NAME_TAG == *centos* ]]; then
${CI_RETRY_EXE} bash -c "dnf -y install epel-release"
${CI_RETRY_EXE} bash -c "dnf -y --allowerasing install $CI_BASE_PACKAGES $PACKAGES"
bash -c "dnf -y install epel-release"
bash -c "dnf -y --allowerasing install $CI_BASE_PACKAGES $PACKAGES"
elif [ "$CI_USE_APT_INSTALL" != "no" ]; then
if [[ -n "${APPEND_APT_SOURCES_LIST}" ]]; then
echo "${APPEND_APT_SOURCES_LIST}" >> /etc/apt/sources.list
Expand Down
36 changes: 0 additions & 36 deletions ci/test/04_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,39 +74,3 @@ CI_EXEC rsync --archive --stats --human-readable /ro_base/ "${BASE_ROOT_DIR}" ||
CI_EXEC git config --global --add safe.directory \"*\"

CI_EXEC mkdir -p "${BINS_SCRATCH_DIR}"

if [ "$CI_OS_NAME" == "macos" ]; then
top -l 1 -s 0 | awk ' /PhysMem/ {print}'
echo "Number of CPUs: $(sysctl -n hw.logicalcpu)"
else
CI_EXEC free -m -h
CI_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\)
CI_EXEC echo "$(lscpu | grep Endian)"
fi
CI_EXEC echo "Free disk space:"
CI_EXEC df -h

if [ "$RUN_FUZZ_TESTS" = "true" ]; then
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/
if [ ! -d "$DIR_FUZZ_IN" ]; then
CI_EXEC git clone --depth=1 https://github.com/navcoin/qa-assets "${DIR_QA_ASSETS}"
fi
elif [ "$RUN_UNIT_TESTS" = "true" ] || [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
export DIR_UNIT_TEST_DATA=${DIR_QA_ASSETS}/unit_test_data/
if [ ! -d "$DIR_UNIT_TEST_DATA" ]; then
CI_EXEC mkdir -p "$DIR_UNIT_TEST_DATA"
CI_EXEC curl --location --fail https://github.com/navcoin/qa-assets/raw/main/unit_test_data/script_assets_test.json -o "${DIR_UNIT_TEST_DATA}/script_assets_test.json"
fi
fi

CI_EXEC mkdir -p "${BASE_SCRATCH_DIR}/sanitizer-output/"

if [ "$USE_BUSY_BOX" = "true" ]; then
echo "Setup to use BusyBox utils"
# tar excluded for now because it requires passing in the exact archive type in ./depends (fixed in later BusyBox version)
# ar excluded for now because it does not recognize the -q option in ./depends (unknown if fixed)
# shellcheck disable=SC1010
CI_EXEC for util in \$\(busybox --list \| grep -v "^ar$" \| grep -v "^tar$" \)\; do ln -s \$\(command -v busybox\) "${BINS_SCRATCH_DIR}/\$util"\; done
# Print BusyBox version
CI_EXEC patch --help
fi
29 changes: 0 additions & 29 deletions ci/test/05_before_script.sh

This file was deleted.

Loading

0 comments on commit 4d1b8e4

Please sign in to comment.