diff -Nru bitcoin-0.20.1.knots20200815/.appveyor.yml bitcoin-0.21.0.knots20210130/.appveyor.yml --- bitcoin-0.20.1.knots20200815/.appveyor.yml 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/.appveyor.yml 2021-01-30 05:16:37.000000000 +0000 @@ -7,29 +7,24 @@ environment: PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%' PYTHONUTF8: 1 - QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip' - QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21' + QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/qt598x64_vs2019_v1681/qt598_x64_vs2019_1681.zip' + QT_DOWNLOAD_HASH: '00cf7327818c07d74e0b1a4464ffe987c2728b00d49d4bf333065892af0515c3' QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019' - VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed' - VCPKG_COMMIT_ID: 'ed0df8ecc4ed7e755ea03e18aaf285fd9b4b4a74' + VCPKG_TAG: '2020.11-1' install: # Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes. # - cmd: pip install zmq -# Powershell block below is to install the c++ dependencies via vcpkg. The pseudo code is: +# The powershell block below is to set up vcpkg to install the c++ dependencies. The pseudo code is: # a. Checkout the vcpkg source (including port files) for the specific checkout and build the vcpkg binary, -# b. Install the missing packages. +# b. Append a setting to the vcpkg cmake config file to only do release builds of dependencies (skipping deubg builds saves ~5 mins). +# Note originally this block also installed the dependencies using 'vcpkg install'. Dependencies are now installed +# as part of the msbuild command using vcpkg mainfests. - ps: | - $env:PACKAGES = Get-Content -Path build_msvc\vcpkg-packages.txt - Write-Host "vcpkg installing packages: $env:PACKAGES" cd c:\tools\vcpkg $env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead. - git pull origin master > $null - git -c advice.detachedHead=false checkout $env:VCPKG_COMMIT_ID + git -c advice.detachedHead=false checkout $env:VCPKG_TAG .\bootstrap-vcpkg.bat > $null Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)" - .\vcpkg install --triplet $env:PLATFORM-windows-static $env:PACKAGES.split() > $null - Write-Host "vcpkg packages installed successfully." - .\vcpkg integrate install cd "$env:APPVEYOR_BUILD_FOLDER" before_build: # Powershell block below is to download and extract the Qt static libraries. The pseudo code is: @@ -55,11 +50,14 @@ #- 7z a bitcoin-%APPVEYOR_BUILD_VERSION%.zip %APPVEYOR_BUILD_FOLDER%\build_msvc\%platform%\%configuration%\*.exe test_script: - cmd: src\test_bitcoin.exe -l test_suite -- cmd: src\bench_bitcoin.exe -evals=1 -scaling=0 > NUL +- cmd: src\bench_bitcoin.exe > NUL - ps: python test\util\bitcoin-util-test.py - cmd: python test\util\rpcauth-test.py # Fee estimation test failing on appveyor with: WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted. -- cmd: python test\functional\test_runner.py --ci --quiet --combinedlogslen=4000 --failfast --exclude feature_fee_estimation +# functional tests disabled for now. See +# https://github.com/bitcoin/bitcoin/pull/18626#issuecomment-613396202 +# https://github.com/bitcoin/bitcoin/issues/18623 +# - cmd: python test\functional\test_runner.py --ci --quiet --combinedlogslen=4000 --failfast --exclude feature_fee_estimation artifacts: #- path: bitcoin-%APPVEYOR_BUILD_VERSION%.zip deploy: off diff -Nru bitcoin-0.20.1.knots20200815/build-aux/m4/ax_boost_thread.m4 bitcoin-0.21.0.knots20210130/build-aux/m4/ax_boost_thread.m4 --- bitcoin-0.20.1.knots20200815/build-aux/m4/ax_boost_thread.m4 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build-aux/m4/ax_boost_thread.m4 2021-01-30 05:16:37.000000000 +0000 @@ -30,7 +30,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 32 +#serial 33 AC_DEFUN([AX_BOOST_THREAD], [ @@ -67,13 +67,24 @@ [AC_LANG_PUSH([C++]) CXXFLAGS_SAVE=$CXXFLAGS - if test "x$host_os" = "xsolaris" ; then - CXXFLAGS="-pthreads $CXXFLAGS" - elif test "x$host_os" = "xmingw32" ; then - CXXFLAGS="-mthreads $CXXFLAGS" - else - CXXFLAGS="-pthread $CXXFLAGS" - fi + case "x$host_os" in + xsolaris ) + CXXFLAGS="-pthreads $CXXFLAGS" + break; + ;; + xmingw32 ) + CXXFLAGS="-mthreads $CXXFLAGS" + break; + ;; + *android* ) + break; + ;; + * ) + CXXFLAGS="-pthread $CXXFLAGS" + break; + ;; + esac + AC_COMPILE_IFELSE([ AC_LANG_PROGRAM( [[@%:@include ]], @@ -84,13 +95,23 @@ AC_LANG_POP([C++]) ]) if test "x$ax_cv_boost_thread" = "xyes"; then - if test "x$host_os" = "xsolaris" ; then - BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS" - elif test "x$host_os" = "xmingw32" ; then - BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS" - else - BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS" - fi + case "x$host_os" in + xsolaris ) + BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS" + break; + ;; + xmingw32 ) + BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS" + break; + ;; + *android* ) + break; + ;; + * ) + BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS" + break; + ;; + esac AC_SUBST(BOOST_CPPFLAGS) @@ -148,6 +169,9 @@ xmingw32 ) break; ;; + *android* ) + break; + ;; * ) BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread" break; diff -Nru bitcoin-0.20.1.knots20200815/build-aux/m4/ax_cxx_compile_stdcxx.m4 bitcoin-0.21.0.knots20210130/build-aux/m4/ax_cxx_compile_stdcxx.m4 --- bitcoin-0.20.1.knots20200815/build-aux/m4/ax_cxx_compile_stdcxx.m4 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build-aux/m4/ax_cxx_compile_stdcxx.m4 2021-01-30 05:16:37.000000000 +0000 @@ -1,5 +1,5 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html +# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html # =========================================================================== # # SYNOPSIS @@ -33,21 +33,23 @@ # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov # Copyright (c) 2015 Paul Norman # Copyright (c) 2015 Moritz Klammler +# Copyright (c) 2016, 2018 Krzesimir Nowak +# Copyright (c) 2019 Enji Cooper # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 4 +#serial 11 dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro dnl (serial version number 13). AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl - m4_if([$1], [11], [], - [$1], [14], [], - [$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])], + m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"], + [$1], [14], [ax_cxx_compile_alternatives="14 1y"], + [$1], [17], [ax_cxx_compile_alternatives="17 1z"], [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl m4_if([$2], [], [], [$2], [ext], [], @@ -57,26 +59,13 @@ [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], [$3], [optional], [ax_cxx_compile_cxx$1_required=false], [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) - m4_if([$4], [], [ax_cxx_compile_cxx$1_try_default=true], - [$4], [default], [ax_cxx_compile_cxx$1_try_default=true], - [$4], [nodefault], [ax_cxx_compile_cxx$1_try_default=false], - [m4_fatal([invalid fourth argument `$4' to AX_CXX_COMPILE_STDCXX])]) AC_LANG_PUSH([C++])dnl ac_success=no - m4_if([$4], [nodefault], [], [dnl - AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, - ax_cv_cxx_compile_cxx$1, - [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [ax_cv_cxx_compile_cxx$1=yes], - [ax_cv_cxx_compile_cxx$1=no])]) - if test x$ax_cv_cxx_compile_cxx$1 = xyes; then - ac_success=yes - fi]) - m4_if([$2], [noext], [], [dnl if test x$ac_success = xno; then - for switch in -std=gnu++$1 -std=gnu++0x; do + for alternative in ${ax_cxx_compile_alternatives}; do + switch="-std=gnu++${alternative}" cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, $cachevar, @@ -102,22 +91,27 @@ dnl HP's aCC needs +std=c++11 according to: dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf dnl Cray's crayCC needs "-h std=c++11" - for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, - $cachevar, - [ac_save_CXX="$CXX" - CXX="$CXX $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXX="$ac_save_CXX"]) - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" + for alternative in ${ax_cxx_compile_alternatives}; do + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, + [ac_save_CXX="$CXX" + CXX="$CXX $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXX="$ac_save_CXX"]) + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi + ac_success=yes + break fi - ac_success=yes + done + if test x$ac_success = xyes; then break fi done @@ -154,6 +148,11 @@ _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 ) +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 +) dnl Tests for new features in C++11 @@ -191,11 +190,13 @@ struct Base { + virtual ~Base() {} virtual void f() {} }; struct Derived : public Base { + virtual ~Derived() override {} virtual void f() override {} }; @@ -524,7 +525,7 @@ } - namespace test_digit_seperators + namespace test_digit_separators { constexpr auto ten_million = 100'000'000; @@ -566,3 +567,385 @@ #endif // __cplusplus >= 201402L ]]) + + +dnl Tests for new features in C++17 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ + +// If the compiler admits that it is not ready for C++17, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201703L + +#error "This is not a C++17 compiler" + +#else + +#include +#include +#include + +namespace cxx17 +{ + + namespace test_constexpr_lambdas + { + + constexpr int foo = [](){return 42;}(); + + } + + namespace test::nested_namespace::definitions + { + + } + + namespace test_fold_expression + { + + template + int multiply(Args... args) + { + return (args * ... * 1); + } + + template + bool all(Args... args) + { + return (args && ...); + } + + } + + namespace test_extended_static_assert + { + + static_assert (true); + + } + + namespace test_auto_brace_init_list + { + + auto foo = {5}; + auto bar {5}; + + static_assert(std::is_same, decltype(foo)>::value); + static_assert(std::is_same::value); + } + + namespace test_typename_in_template_template_parameter + { + + template typename X> struct D; + + } + + namespace test_fallthrough_nodiscard_maybe_unused_attributes + { + + int f1() + { + return 42; + } + + [[nodiscard]] int f2() + { + [[maybe_unused]] auto unused = f1(); + + switch (f1()) + { + case 17: + f1(); + [[fallthrough]]; + case 42: + f1(); + } + return f1(); + } + + } + + namespace test_extended_aggregate_initialization + { + + struct base1 + { + int b1, b2 = 42; + }; + + struct base2 + { + base2() { + b3 = 42; + } + int b3; + }; + + struct derived : base1, base2 + { + int d; + }; + + derived d1 {{1, 2}, {}, 4}; // full initialization + derived d2 {{}, {}, 4}; // value-initialized bases + + } + + namespace test_general_range_based_for_loop + { + + struct iter + { + int i; + + int& operator* () + { + return i; + } + + const int& operator* () const + { + return i; + } + + iter& operator++() + { + ++i; + return *this; + } + }; + + struct sentinel + { + int i; + }; + + bool operator== (const iter& i, const sentinel& s) + { + return i.i == s.i; + } + + bool operator!= (const iter& i, const sentinel& s) + { + return !(i == s); + } + + struct range + { + iter begin() const + { + return {0}; + } + + sentinel end() const + { + return {5}; + } + }; + + void f() + { + range r {}; + + for (auto i : r) + { + [[maybe_unused]] auto v = i; + } + } + + } + + namespace test_lambda_capture_asterisk_this_by_value + { + + struct t + { + int i; + int foo() + { + return [*this]() + { + return i; + }(); + } + }; + + } + + namespace test_enum_class_construction + { + + enum class byte : unsigned char + {}; + + byte foo {42}; + + } + + namespace test_constexpr_if + { + + template + int f () + { + if constexpr(cond) + { + return 13; + } + else + { + return 42; + } + } + + } + + namespace test_selection_statement_with_initializer + { + + int f() + { + return 13; + } + + int f2() + { + if (auto i = f(); i > 0) + { + return 3; + } + + switch (auto i = f(); i + 4) + { + case 17: + return 2; + + default: + return 1; + } + } + + } + + namespace test_template_argument_deduction_for_class_templates + { + + template + struct pair + { + pair (T1 p1, T2 p2) + : m1 {p1}, + m2 {p2} + {} + + T1 m1; + T2 m2; + }; + + void f() + { + [[maybe_unused]] auto p = pair{13, 42u}; + } + + } + + namespace test_non_type_auto_template_parameters + { + + template + struct B + {}; + + B<5> b1; + B<'a'> b2; + + } + + namespace test_structured_bindings + { + + int arr[2] = { 1, 2 }; + std::pair pr = { 1, 2 }; + + auto f1() -> int(&)[2] + { + return arr; + } + + auto f2() -> std::pair& + { + return pr; + } + + struct S + { + int x1 : 2; + volatile double y1; + }; + + S f3() + { + return {}; + } + + auto [ x1, y1 ] = f1(); + auto& [ xr1, yr1 ] = f1(); + auto [ x2, y2 ] = f2(); + auto& [ xr2, yr2 ] = f2(); + const auto [ x3, y3 ] = f3(); + + } + + namespace test_exception_spec_type_system + { + + struct Good {}; + struct Bad {}; + + void g1() noexcept; + void g2(); + + template + Bad + f(T*, T*); + + template + Good + f(T1*, T2*); + + static_assert (std::is_same_v); + + } + + namespace test_inline_variables + { + + template void f(T) + {} + + template inline T g(T) + { + return T{}; + } + + template<> inline void f<>(int) + {} + + template<> int g<>(int) + { + return 5; + } + + } + +} // namespace cxx17 + +#endif // __cplusplus < 201703L + +]]) diff -Nru bitcoin-0.20.1.knots20200815/build-aux/m4/ax_pthread.m4 bitcoin-0.21.0.knots20210130/build-aux/m4/ax_pthread.m4 --- bitcoin-0.20.1.knots20200815/build-aux/m4/ax_pthread.m4 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build-aux/m4/ax_pthread.m4 2021-01-30 05:16:37.000000000 +0000 @@ -1,5 +1,5 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_pthread.html +# https://www.gnu.org/software/autoconf-archive/ax_pthread.html # =========================================================================== # # SYNOPSIS @@ -55,6 +55,7 @@ # # Copyright (c) 2008 Steven G. Johnson # Copyright (c) 2011 Daniel Richard G. +# Copyright (c) 2019 Marc Stevens # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -67,7 +68,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -82,7 +83,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 23 +#serial 27 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ @@ -123,10 +124,12 @@ # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. +# Create a list of thread flags to try. Items with a "," contain both +# C compiler flags (before ",") and linker flags (after ","). Other items +# starting with a "-" are C compiler flags, and remaining items are +# library names, except for "none" which indicates that we try without +# any flags at all, and "pthread-config" which is a program returning +# the flags for the Pth emulation library. ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" @@ -194,14 +197,47 @@ # that too in a future libc.) So we'll check first for the # standard Solaris way of linking pthreads (-mt -lpthread). - ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" + ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" ;; esac +# Are we compiling with Clang? + +AC_CACHE_CHECK([whether $CC is Clang], + [ax_cv_PTHREAD_CLANG], + [ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], + [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif + ], + [ax_cv_PTHREAD_CLANG=yes]) + fi + ]) +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" + + # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) +# Note that for GCC and Clang -pthread generally implies -lpthread, +# except when -nostdlib is passed. +# This is problematic using libtool to build C++ shared libraries with pthread: +# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 +# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 +# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 +# To solve this, first try -pthread together with -lpthread for GCC + AS_IF([test "x$GCC" = "xyes"], - [ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"]) + [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"]) + +# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first + +AS_IF([test "x$ax_pthread_clang" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread"]) + # The presence of a feature test macro requesting re-entrant function # definitions is, on some systems, a strong hint that pthreads support is @@ -224,25 +260,86 @@ [ax_pthread_check_cond=0], [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) -# Are we compiling with Clang? -AC_CACHE_CHECK([whether $CC is Clang], - [ax_cv_PTHREAD_CLANG], - [ax_cv_PTHREAD_CLANG=no - # Note that Autoconf sets GCC=yes for Clang as well as GCC - if test "x$GCC" = "xyes"; then - AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], - [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ -# if defined(__clang__) && defined(__llvm__) - AX_PTHREAD_CC_IS_CLANG -# endif - ], - [ax_cv_PTHREAD_CLANG=yes]) - fi - ]) -ax_pthread_clang="$ax_cv_PTHREAD_CLANG" +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do + + case $ax_pthread_try_flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + *,*) + PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` + PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` + AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) + PTHREAD_CFLAGS="$ax_pthread_try_flag" + ;; + + pthread-config) + AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) + AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) + PTHREAD_LIBS="-l$ax_pthread_try_flag" + ;; + esac + + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void *some_global = NULL; + static void routine(void *a) + { + /* To avoid any unused-parameter or + unused-but-set-parameter warning. */ + some_global = a; + } + static void *start_routine(void *a) { return a; }], + [pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */])], + [ax_pthread_ok=yes], + []) + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + AC_MSG_RESULT([$ax_pthread_ok]) + AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi -ax_pthread_clang_warning=no # Clang needs special handling, because older versions handle the -pthread # option in a rather... idiosyncratic way @@ -261,11 +358,6 @@ # -pthread does define _REENTRANT, and while the Darwin headers # ignore this macro, third-party headers might not.) - PTHREAD_CFLAGS="-pthread" - PTHREAD_LIBS= - - ax_pthread_ok=yes - # However, older versions of Clang make a point of warning the user # that, in an invocation where only linking and no compilation is # taking place, the -pthread option has no effect ("argument unused @@ -320,78 +412,7 @@ fi # $ax_pthread_clang = yes -if test "x$ax_pthread_ok" = "xno"; then -for ax_pthread_try_flag in $ax_pthread_flags; do - - case $ax_pthread_try_flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -mt,pthread) - AC_MSG_CHECKING([whether pthreads work with -mt -lpthread]) - PTHREAD_CFLAGS="-mt" - PTHREAD_LIBS="-lpthread" - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) - PTHREAD_CFLAGS="$ax_pthread_try_flag" - ;; - - pthread-config) - AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) - AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - *) - AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) - PTHREAD_LIBS="-l$ax_pthread_try_flag" - ;; - esac - - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include -# if $ax_pthread_check_cond -# error "$ax_pthread_check_macro must be defined" -# endif - static void routine(void *a) { a = 0; } - static void *start_routine(void *a) { return a; }], - [pthread_t th; pthread_attr_t attr; - pthread_create(&th, 0, start_routine, 0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0) /* ; */])], - [ax_pthread_ok=yes], - []) - - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" - - AC_MSG_RESULT([$ax_pthread_ok]) - AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi # Various other checks: if test "x$ax_pthread_ok" = "xyes"; then @@ -438,7 +459,8 @@ AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], [ax_cv_PTHREAD_PRIO_INHERIT], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[int i = PTHREAD_PRIO_INHERIT;]])], + [[int i = PTHREAD_PRIO_INHERIT; + return i;]])], [ax_cv_PTHREAD_PRIO_INHERIT=yes], [ax_cv_PTHREAD_PRIO_INHERIT=no]) ]) diff -Nru bitcoin-0.20.1.knots20200815/build-aux/m4/bitcoin_qt.m4 bitcoin-0.21.0.knots20210130/build-aux/m4/bitcoin_qt.m4 --- bitcoin-0.20.1.knots20200815/build-aux/m4/bitcoin_qt.m4 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build-aux/m4/bitcoin_qt.m4 2021-01-30 05:16:37.000000000 +0000 @@ -72,32 +72,33 @@ AC_ARG_WITH([qtdbus], [AS_HELP_STRING([--with-qtdbus], - [enable DBus support (default is yes if qt is enabled and QtDBus is found)])], + [enable DBus support (default is yes if qt is enabled and QtDBus is found, except on Android)])], [use_dbus=$withval], [use_dbus=auto]) + dnl Android doesn't support D-Bus and certainly doesn't use it for notifications + case $host in + *android*) + if test "x$use_dbus" != xyes; then + use_dbus=no + fi + ;; + esac + AC_SUBST(QT_TRANSLATION_DIR,$qt_translation_path) ]) -dnl Find the appropriate version of Qt libraries and includes. -dnl Inputs: $1: Whether or not pkg-config should be used. yes|no. Default: yes. -dnl Inputs: $2: If $1 is "yes" and --with-gui=auto, which qt version should be -dnl tried first. -dnl Outputs: See _BITCOIN_QT_FIND_LIBS_* +dnl Find Qt libraries and includes. +dnl +dnl BITCOIN_QT_CONFIGURE([MINIMUM-VERSION]) +dnl +dnl Outputs: See _BITCOIN_QT_FIND_LIBS dnl Outputs: Sets variables for all qt-related tools. dnl Outputs: bitcoin_enable_qt, bitcoin_enable_qt_dbus, bitcoin_enable_qt_test AC_DEFUN([BITCOIN_QT_CONFIGURE],[ - use_pkgconfig=$1 - - if test "x$use_pkgconfig" = x; then - use_pkgconfig=yes - fi - - if test "x$use_pkgconfig" = xyes; then - BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG]) - else - BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG]) - fi + qt_version=">= $1" + qt_lib_prefix="Qt5" + BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS]) dnl This is ugly and complicated. Yuck. Works as follows: dnl For Qt5, we can check a header to find out whether Qt is build @@ -117,8 +118,8 @@ _BITCOIN_QT_FIND_STATIC_PLUGINS AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static]) if test "x$TARGET_OS" != xandroid; then - _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)],[-lqminimal]) - AC_DEFINE(QT_QPA_PLATFORM_MINIMAL, 1, [Define this symbol if the minimal qt platform exists]) + _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)],[-lqminimal]) + AC_DEFINE(QT_QPA_PLATFORM_MINIMAL, 1, [Define this symbol if the minimal qt platform exists]) fi if test "x$TARGET_OS" = xwindows; then _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows]) @@ -139,7 +140,7 @@ CXXFLAGS=$TEMP_CXXFLAGS ]) - if test "x$use_pkgconfig$qt_bin_path" = xyes; then + if test "x$qt_bin_path" = x; then qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`" fi @@ -213,7 +214,7 @@ dnl enable qt support - AC_MSG_CHECKING(whether to build ]AC_PACKAGE_NAME[ GUI) + AC_MSG_CHECKING([whether to build ]AC_PACKAGE_NAME[ GUI]) BITCOIN_QT_CHECK([ bitcoin_enable_qt=yes bitcoin_enable_qt_test=yes @@ -234,11 +235,25 @@ bitcoin_enable_qt=no ]) if test x$bitcoin_enable_qt = xyes; then - AC_MSG_RESULT([$bitcoin_enable_qt ($QT_LIB_PREFIX)]) + AC_MSG_RESULT([$bitcoin_enable_qt ($qt_lib_prefix)]) else AC_MSG_RESULT([$bitcoin_enable_qt]) fi + AC_MSG_CHECKING([whether to build with QWinTaskbarProgress support]) + BITCOIN_QT_CHECK([ + if test "x$have_qt_winextras" != xyes; then + AC_MSG_RESULT([no, ${qt_lib_prefix}WinExtras $qt_version not found]) + elif test "x$have_dwmapi" != xyes; then + AC_MSG_RESULT([no, dwmapi missing]) + else + AC_MSG_RESULT([yes]) + QT_INCLUDES="$QT_INCLUDES $QT_WINEXTRAS_CFLAGS" + QT_LIBS="$QT_LIBS $QT_WINEXTRAS_LIBS" + AC_DEFINE(BITCOIN_QT_WIN_TASKBAR, 1, [Define this symbol if building with QWinTaskbarProgress]) + fi + ]) + AC_SUBST(QT_PIE_FLAGS) AC_SUBST(QT_INCLUDES) AC_SUBST(QT_LIBS) @@ -255,57 +270,15 @@ dnl configure.ac. dnl ---- -dnl Internal. Check included version of Qt against minimum specified in doc/dependencies.md -dnl Requires: INCLUDES must be populated as necessary. -dnl Output: bitcoin_cv_qt5=yes|no -AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[ - AC_CACHE_CHECK(for Qt 5, bitcoin_cv_qt5,[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #ifndef QT_VERSION - # include - #endif - ]], - [[ - #if QT_VERSION < 0x050501 - choke - #endif - ]])], - [bitcoin_cv_qt5=yes], - [bitcoin_cv_qt5=no]) -])]) - -dnl Internal. Check if the included version of Qt is greater than Qt58. -dnl Requires: INCLUDES must be populated as necessary. -dnl Output: bitcoin_cv_qt58=yes|no -AC_DEFUN([_BITCOIN_QT_CHECK_QT58],[ - AC_CACHE_CHECK(for > Qt 5.7, bitcoin_cv_qt58,[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #ifndef QT_VERSION - # include - #endif - ]], - [[ - #if QT_VERSION_MINOR < 8 - choke - #endif - ]])], - [bitcoin_cv_qt58=yes], - [bitcoin_cv_qt58=no]) -])]) - - dnl Internal. Check if the linked version of Qt was built as static libs. dnl Requires: Qt5. dnl Requires: INCLUDES and LIBS must be populated as necessary. dnl Output: bitcoin_cv_static_qt=yes|no -dnl Output: Defines QT_STATICPLUGIN if plugins are static. AC_DEFUN([_BITCOIN_QT_IS_STATIC],[ AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include - #ifndef QT_VERSION OR QT_VERSION_STR + #ifndef QT_VERSION # include #endif ]], @@ -317,9 +290,6 @@ [bitcoin_cv_static_qt=yes], [bitcoin_cv_static_qt=no]) ]) - if test "x$bitcoin_cv_static_qt" = xyes; then - AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol for static Qt plugins]) - fi ]) dnl Internal. Check if the link-requirements for static plugins are met. @@ -353,171 +323,59 @@ if test -d "$qt_plugin_path/platforms/android"; then QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms/android -lqtfreetype -lEGL" fi - if test "x$use_pkgconfig" = xyes; then - : dnl - m4_ifdef([PKG_CHECK_MODULES],[ - if test x$bitcoin_cv_qt58 = xno; then - PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"]) - else - PKG_CHECK_MODULES([QTFONTDATABASE], [Qt5FontDatabaseSupport], [QT_LIBS="-lQt5FontDatabaseSupport $QT_LIBS"]) - PKG_CHECK_MODULES([QTEVENTDISPATCHER], [Qt5EventDispatcherSupport], [QT_LIBS="-lQt5EventDispatcherSupport $QT_LIBS"]) - PKG_CHECK_MODULES([QTTHEME], [Qt5ThemeSupport], [QT_LIBS="-lQt5ThemeSupport $QT_LIBS"]) - PKG_CHECK_MODULES([QTDEVICEDISCOVERY], [Qt5DeviceDiscoverySupport], [QT_LIBS="-lQt5DeviceDiscoverySupport $QT_LIBS"]) - PKG_CHECK_MODULES([QTACCESSIBILITY], [Qt5AccessibilitySupport], [QT_LIBS="-lQt5AccessibilitySupport $QT_LIBS"]) - PKG_CHECK_MODULES([QTFB], [Qt5FbSupport], [QT_LIBS="-lQt5FbSupport $QT_LIBS"]) - fi - if test "x$TARGET_OS" = xlinux; then - PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"]) - elif test "x$TARGET_OS" = xdarwin; then - PKG_CHECK_MODULES([QTCLIPBOARD], [Qt5ClipboardSupport], [QT_LIBS="-lQt5ClipboardSupport $QT_LIBS"]) - PKG_CHECK_MODULES([QTGRAPHICS], [Qt5GraphicsSupport], [QT_LIBS="-lQt5GraphicsSupport $QT_LIBS"]) - PKG_CHECK_MODULES([QTCGL], [Qt5CglSupport], [QT_LIBS="-lQt5CglSupport $QT_LIBS"]) - fi - ]) - else - if test "x$TARGET_OS" = xwindows; then - AC_CACHE_CHECK(for Qt >= 5.6, bitcoin_cv_need_platformsupport,[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #ifndef QT_VERSION - # include - #endif - ]], - [[ - #if QT_VERSION < 0x050600 || QT_VERSION_MINOR < 6 - choke - #endif - ]])], - [bitcoin_cv_need_platformsupport=yes], - [bitcoin_cv_need_platformsupport=no]) - ]) - if test "x$bitcoin_cv_need_platformsupport" = xyes; then - if test x$bitcoin_cv_qt58 = xno; then - BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}PlatformSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXPlatformSupport not found))) - else - BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}FontDatabaseSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXFontDatabaseSupport not found))) - BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}EventDispatcherSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXEventDispatcherSupport not found))) - BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}ThemeSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXThemeSupport not found))) - BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}FbSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXFbSupport not found))) - BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}DeviceDiscoverySupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXDeviceDiscoverySupport not found))) - BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}AccessibilitySupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXAccessibilitySupport not found))) - BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}WinExtras],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXWinExtras not found))) - QT_LIBS="$QT_LIBS -lversion -ldwmapi -luxtheme" - fi - fi - fi - fi - fi + PKG_CHECK_MODULES([QTFONTDATABASE], [Qt5FontDatabaseSupport], [QT_LIBS="-lQt5FontDatabaseSupport $QT_LIBS"]) + PKG_CHECK_MODULES([QTEVENTDISPATCHER], [Qt5EventDispatcherSupport], [QT_LIBS="-lQt5EventDispatcherSupport $QT_LIBS"]) + PKG_CHECK_MODULES([QTTHEME], [Qt5ThemeSupport], [QT_LIBS="-lQt5ThemeSupport $QT_LIBS"]) + PKG_CHECK_MODULES([QTDEVICEDISCOVERY], [Qt5DeviceDiscoverySupport], [QT_LIBS="-lQt5DeviceDiscoverySupport $QT_LIBS"]) + PKG_CHECK_MODULES([QTACCESSIBILITY], [Qt5AccessibilitySupport], [QT_LIBS="-lQt5AccessibilitySupport $QT_LIBS"]) + PKG_CHECK_MODULES([QTFB], [Qt5FbSupport], [QT_LIBS="-lQt5FbSupport $QT_LIBS"]) + if test "x$TARGET_OS" = xlinux; then + PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"]) + elif test "x$TARGET_OS" = xdarwin; then + PKG_CHECK_MODULES([QTCLIPBOARD], [Qt5ClipboardSupport], [QT_LIBS="-lQt5ClipboardSupport $QT_LIBS"]) + PKG_CHECK_MODULES([QTGRAPHICS], [Qt5GraphicsSupport], [QT_LIBS="-lQt5GraphicsSupport $QT_LIBS"]) + PKG_CHECK_MODULES([QTCGL], [Qt5CglSupport], [QT_LIBS="-lQt5CglSupport $QT_LIBS"]) + fi + fi ]) dnl Internal. Find Qt libraries using pkg-config. -dnl Inputs: bitcoin_qt_want_version (from --with-gui=). The version to check -dnl first. -dnl Inputs: $1: If bitcoin_qt_want_version is "auto", check for this version -dnl first. dnl Outputs: All necessary QT_* variables are set. dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no. -AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[ - m4_ifdef([PKG_CHECK_MODULES],[ - QT_LIB_PREFIX=Qt5 - qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets" - BITCOIN_QT_CHECK([ - PKG_CHECK_MODULES([QT5], [$qt5_modules], [QT_INCLUDES="$QT5_CFLAGS"; QT_LIBS="$QT5_LIBS" have_qt=yes],[have_qt=no]) - - if test "x$have_qt" != xyes; then - have_qt=no - BITCOIN_QT_FAIL([Qt dependencies not found]) - fi - ]) - BITCOIN_QT_CHECK([ - PKG_CHECK_MODULES([QT_TEST], [${QT_LIB_PREFIX}Test], [QT_TEST_INCLUDES="$QT_TEST_CFLAGS"; have_qt_test=yes], [have_qt_test=no]) - if test "x$use_dbus" != xno; then - PKG_CHECK_MODULES([QT_DBUS], [${QT_LIB_PREFIX}DBus], [QT_DBUS_INCLUDES="$QT_DBUS_CFLAGS"; have_qt_dbus=yes], [have_qt_dbus=no]) - fi - ]) +AC_DEFUN([_BITCOIN_QT_FIND_LIBS],[ + BITCOIN_QT_CHECK([ + PKG_CHECK_MODULES([QT_CORE], [${qt_lib_prefix}Core $qt_version], [], + [BITCOIN_QT_FAIL([${qt_lib_prefix}Core $qt_version not found])]) ]) - true; dnl -]) - -dnl Internal. Find Qt libraries without using pkg-config. Version is deduced -dnl from the discovered headers. -dnl Inputs: bitcoin_qt_want_version (from --with-gui=). The version to use. -dnl If "auto", the version will be discovered by _BITCOIN_QT_CHECK_QT5. -dnl Outputs: All necessary QT_* variables are set. -dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no. -AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[ - TEMP_CPPFLAGS="$CPPFLAGS" - TEMP_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$PIC_FLAGS $CXXFLAGS" - TEMP_LIBS="$LIBS" BITCOIN_QT_CHECK([ - if test "x$qt_include_path" != x; then - QT_INCLUDES="-I$qt_include_path -I$qt_include_path/QtCore -I$qt_include_path/QtGui -I$qt_include_path/QtWidgets -I$qt_include_path/QtNetwork -I$qt_include_path/QtTest -I$qt_include_path/QtDBus" - if test "x$TARGET_OS" = xwindows; then - QT_INCLUDES="$QT_INCLUDES -I$qt_include_path/QtWinExtras" - fi - CPPFLAGS="$QT_INCLUDES $CPPFLAGS" - fi + PKG_CHECK_MODULES([QT_GUI], [${qt_lib_prefix}Gui $qt_version], [], + [BITCOIN_QT_FAIL([${qt_lib_prefix}Gui $qt_version not found])]) ]) - - BITCOIN_QT_CHECK([AC_CHECK_HEADER([QtPlugin],,BITCOIN_QT_FAIL(QtCore headers missing))]) - BITCOIN_QT_CHECK([AC_CHECK_HEADER([QApplication],, BITCOIN_QT_FAIL(QtGui headers missing))]) - BITCOIN_QT_CHECK([AC_CHECK_HEADER([QLocalSocket],, BITCOIN_QT_FAIL(QtNetwork headers missing))]) - BITCOIN_QT_CHECK([ - if test "x$bitcoin_qt_want_version" = xauto; then - _BITCOIN_QT_CHECK_QT5 - _BITCOIN_QT_CHECK_QT58 - fi - QT_LIB_PREFIX=Qt5 + PKG_CHECK_MODULES([QT_WIDGETS], [${qt_lib_prefix}Widgets $qt_version], [], + [BITCOIN_QT_FAIL([${qt_lib_prefix}Widgets $qt_version not found])]) ]) - BITCOIN_QT_CHECK([ - LIBS= - if test "x$qt_lib_path" != x; then - LIBS="$LIBS -L$qt_lib_path" - fi + PKG_CHECK_MODULES([QT_NETWORK], [${qt_lib_prefix}Network $qt_version], [], + [BITCOIN_QT_FAIL([${qt_lib_prefix}Network $qt_version not found])]) + ]) + QT_INCLUDES="$QT_CORE_CFLAGS $QT_GUI_CFLAGS $QT_WIDGETS_CFLAGS $QT_NETWORK_CFLAGS" + QT_LIBS="$QT_CORE_LIBS $QT_GUI_LIBS $QT_WIDGETS_LIBS $QT_NETWORK_LIBS" - if test "x$TARGET_OS" = xwindows; then - AC_CHECK_LIB([imm32], [main],, BITCOIN_QT_FAIL(libimm32 not found)) + BITCOIN_QT_CHECK([ + PKG_CHECK_MODULES([QT_TEST], [${qt_lib_prefix}Test $qt_version], [QT_TEST_INCLUDES="$QT_TEST_CFLAGS"; have_qt_test=yes], [have_qt_test=no]) + if test "x$use_dbus" != xno; then + PKG_CHECK_MODULES([QT_DBUS], [${qt_lib_prefix}DBus $qt_version], [QT_DBUS_INCLUDES="$QT_DBUS_CFLAGS"; have_qt_dbus=yes], [have_qt_dbus=no]) fi ]) - BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,AC_MSG_WARN([zlib not found. Assuming qt has it built-in]))) - if test x$bitcoin_cv_qt58 = xno; then - BITCOIN_QT_CHECK(AC_SEARCH_LIBS([png_error] ,[qtpng png],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in]))) - BITCOIN_QT_CHECK(AC_SEARCH_LIBS([pcre16_exec], [qtpcre pcre16],,AC_MSG_WARN([libpcre16 not found. Assuming qt has it built-in]))) - else - BITCOIN_QT_CHECK(AC_SEARCH_LIBS([png_error] ,[qtlibpng png],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in]))) - BITCOIN_QT_CHECK(AC_SEARCH_LIBS([pcre2_match_16], [qtpcre2 libqtpcre2],,AC_MSG_WARN([libqtpcre2 not found. Assuming qt has it built-in]))) - fi - BITCOIN_QT_CHECK(AC_SEARCH_LIBS([hb_ot_tags_from_script] ,[qtharfbuzzng qtharfbuzz harfbuzz],,AC_MSG_WARN([libharfbuzz not found. Assuming qt has it built-in or support is disabled]))) - BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core] ,[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Core not found))) - BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui] ,[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Gui not found))) - BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Network not found))) - BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Widgets],[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Widgets not found))) - QT_LIBS="$LIBS" - LIBS="$TEMP_LIBS" - BITCOIN_QT_CHECK([ - LIBS= - if test "x$qt_lib_path" != x; then - LIBS="-L$qt_lib_path" - fi - AC_CHECK_LIB([${QT_LIB_PREFIX}Test], [main],, have_qt_test=no) - AC_CHECK_HEADER([QTest],, have_qt_test=no) - QT_TEST_LIBS="$LIBS" - if test "x$use_dbus" != xno; then - LIBS= - if test "x$qt_lib_path" != x; then - LIBS="-L$qt_lib_path" - fi - AC_CHECK_LIB([${QT_LIB_PREFIX}DBus], [main],, have_qt_dbus=no) - AC_CHECK_HEADER([QtDBus],, have_qt_dbus=no) - QT_DBUS_LIBS="$LIBS" + if test "x$TARGET_OS" = xwindows; then + PKG_CHECK_MODULES([QT_WINEXTRAS], [${qt_lib_prefix}WinExtras $qt_version], [ + have_qt_winextras=yes + ],[ + have_qt_winextras=no + ]) fi ]) - CPPFLAGS="$TEMP_CPPFLAGS" - CXXFLAGS="$TEMP_CXXFLAGS" - LIBS="$TEMP_LIBS" ]) diff -Nru bitcoin-0.20.1.knots20200815/build_msvc/bitcoin_config.h bitcoin-0.21.0.knots20210130/build_msvc/bitcoin_config.h --- bitcoin-0.20.1.knots20200815/build_msvc/bitcoin_config.h 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build_msvc/bitcoin_config.h 2021-01-30 05:16:37.000000000 +0000 @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2019 The Bitcoin Core developers +// Copyright (c) 2018-2020 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -18,10 +18,10 @@ #define CLIENT_VERSION_MAJOR 0 /* Minor version */ -#define CLIENT_VERSION_MINOR 20 +#define CLIENT_VERSION_MINOR 21 /* Build revision */ -#define CLIENT_VERSION_REVISION 1 +#define CLIENT_VERSION_REVISION 0 /* Copyright holder(s) before %s replacement */ #define COPYRIGHT_HOLDERS "The %s developers" @@ -41,15 +41,15 @@ /* Define to 1 to enable ZMQ functions */ #define ENABLE_ZMQ 1 -/* parameter and return value type for __fdelt_chk */ -/* #undef FDELT_TYPE */ - /* define if the Boost library is available */ #define HAVE_BOOST /**/ /* define if the Boost::Filesystem library is available */ #define HAVE_BOOST_FILESYSTEM /**/ +/* define if the Boost::Process library is available */ +#define HAVE_BOOST_PROCESS /**/ + /* define if the Boost::System library is available */ #define HAVE_BOOST_SYSTEM /**/ @@ -140,18 +140,6 @@ don't. */ #define HAVE_DECL_STRNLEN 1 -/* Define to 1 if you have the declaration of `__builtin_clz', and to 0 if you - don't. */ -//#define HAVE_DECL___BUILTIN_CLZ 1 - -/* Define to 1 if you have the declaration of `__builtin_clzl', and to 0 if - you don't. */ -//#define HAVE_DECL___BUILTIN_CLZL 1 - -/* Define to 1 if you have the declaration of `__builtin_clzll', and to 0 if - you don't. */ -//#define HAVE_DECL___BUILTIN_CLZLL 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_DLFCN_H */ @@ -265,7 +253,7 @@ #define PACKAGE_NAME "Bitcoin Core" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Bitcoin Core 0.19.99" +#define PACKAGE_STRING "Bitcoin Core 0.21.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "bitcoin" @@ -274,7 +262,7 @@ #define PACKAGE_URL "https://bitcoincore.org/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.19.99" +#define PACKAGE_VERSION "0.21.0" /* Define to necessary symbol if this constant uses a non-standard name on your system. */ diff -Nru bitcoin-0.20.1.knots20200815/build_msvc/bitcoin-qt/bitcoin-qt.vcxproj bitcoin-0.21.0.knots20210130/build_msvc/bitcoin-qt/bitcoin-qt.vcxproj --- bitcoin-0.20.1.knots20200815/build_msvc/bitcoin-qt/bitcoin-qt.vcxproj 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build_msvc/bitcoin-qt/bitcoin-qt.vcxproj 2021-01-30 05:16:37.000000000 +0000 @@ -56,7 +56,7 @@ $(QtReleaseLibraries);%(AdditionalDependencies) - /ignore:4206 + /ignore:4206 /LTCG:OFF ..\..\src; diff -Nru bitcoin-0.20.1.knots20200815/build_msvc/common.init.vcxproj bitcoin-0.21.0.knots20210130/build_msvc/common.init.vcxproj --- bitcoin-0.20.1.knots20200815/build_msvc/common.init.vcxproj 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build_msvc/common.init.vcxproj 2021-01-30 05:16:37.000000000 +0000 @@ -4,11 +4,20 @@ 16.0 - x86-windows-static - x64-windows-static true + + true + true + true + true + true + $(Configuration) + x86-windows-static + x64-windows-static + + $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) @@ -36,66 +45,46 @@ - - true - false - true + + false + false v142 Unicode + No $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ $(Platform)\$(Configuration)\$(ProjectName)\ - - false - true - false + + + true + true v142 Unicode $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ $(Platform)\$(Configuration)\$(ProjectName)\ - - - MaxSpeed - true - true - true - MultiThreaded - - - true - true - - - - + Disabled - _DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - /bigobj %(AdditionalOptions) - - - - - - MaxSpeed + false true true true MultiThreaded + None - true - true + false + false + /LTCG:OFF - + Disabled + false _DEBUG;%(PreprocessorDefinitions) true MultiThreadedDebug @@ -107,15 +96,14 @@ Level3 NotUsing - /utf-8 %(AdditionalOptions) + /utf-8 /std:c++17 %(AdditionalOptions) 4018;4221;4244;4267;4334;4715;4805;4834 true - ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) ..\..\src;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories) Console - true Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) diff -Nru bitcoin-0.20.1.knots20200815/build_msvc/common.vcxproj bitcoin-0.21.0.knots20210130/build_msvc/common.vcxproj --- bitcoin-0.20.1.knots20200815/build_msvc/common.vcxproj 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build_msvc/common.vcxproj 2021-01-30 05:16:37.000000000 +0000 @@ -4,7 +4,7 @@ - + diff -Nru bitcoin-0.20.1.knots20200815/build_msvc/.gitignore bitcoin-0.21.0.knots20210130/build_msvc/.gitignore --- bitcoin-0.20.1.knots20200815/build_msvc/.gitignore 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build_msvc/.gitignore 2021-01-30 05:16:37.000000000 +0000 @@ -24,3 +24,4 @@ */Win32 libbitcoin_qt/QtGeneratedFiles/* test_bitcoin-qt/QtGeneratedFiles/* +vcpkg_installed \ No newline at end of file diff -Nru bitcoin-0.20.1.knots20200815/build_msvc/libbitcoin_util/libbitcoin_util.vcxproj.in bitcoin-0.21.0.knots20210130/build_msvc/libbitcoin_util/libbitcoin_util.vcxproj.in --- bitcoin-0.20.1.knots20200815/build_msvc/libbitcoin_util/libbitcoin_util.vcxproj.in 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build_msvc/libbitcoin_util/libbitcoin_util.vcxproj.in 2021-01-30 05:16:37.000000000 +0000 @@ -8,6 +8,7 @@ StaticLibrary + @SOURCE_FILES@ diff -Nru bitcoin-0.20.1.knots20200815/build_msvc/libsecp256k1/libsecp256k1.vcxproj bitcoin-0.21.0.knots20210130/build_msvc/libsecp256k1/libsecp256k1.vcxproj --- bitcoin-0.20.1.knots20200815/build_msvc/libsecp256k1/libsecp256k1.vcxproj 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build_msvc/libsecp256k1/libsecp256k1.vcxproj 2021-01-30 05:16:37.000000000 +0000 @@ -12,7 +12,7 @@ - ENABLE_MODULE_ECDH;ENABLE_MODULE_RECOVERY;%(PreprocessorDefinitions) + ENABLE_MODULE_ECDH;ENABLE_MODULE_RECOVERY;ENABLE_MODULE_EXTRAKEYS;ENABLE_MODULE_SCHNORRSIG;%(PreprocessorDefinitions) ..\..\src\secp256k1;%(AdditionalIncludeDirectories) diff -Nru bitcoin-0.20.1.knots20200815/build_msvc/libsecp256k1_config.h bitcoin-0.21.0.knots20210130/build_msvc/libsecp256k1_config.h --- bitcoin-0.20.1.knots20200815/build_msvc/libsecp256k1_config.h 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build_msvc/libsecp256k1_config.h 2021-01-30 05:16:37.000000000 +0000 @@ -26,4 +26,7 @@ #define USE_FIELD_10X26 1 #define USE_SCALAR_8X32 1 +#define ECMULT_GEN_PREC_BITS 4 +#define ECMULT_WINDOW_SIZE 15 + #endif /* BITCOIN_LIBSECP256K1_CONFIG_H */ diff -Nru bitcoin-0.20.1.knots20200815/build_msvc/README.md bitcoin-0.21.0.knots20210130/build_msvc/README.md --- bitcoin-0.20.1.knots20200815/build_msvc/README.md 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build_msvc/README.md 2021-01-30 05:16:37.000000000 +0000 @@ -3,7 +3,7 @@ Introduction --------------------- -Solution and project files to build the Bitcoin Core applications `msbuild` or Visual Studio can be found in the build_msvc directory. The build has been tested with Visual Studio 2017 and 2019. +Solution and project files to build the Bitcoin Core applications `msbuild` or Visual Studio can be found in the `build_msvc` directory. The build has been tested with Visual Studio 2017 and 2019. Building Knots with Visual Studio is NOT supported, and it is recommended to instead use the Linux based [cross-compiler build](https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md). @@ -12,10 +12,9 @@ The minimal steps required to build Bitcoin Core with the msbuild toolchain are below. More detailed instructions are contained in the following sections. ``` -vcpkg install --triplet x64-windows-static berkeleydb boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent[thread] zeromq double-conversion -vcpkg integrate install -py -3 build_msvc\msvc-autogen.py -msbuild /m build_msvc\bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build +cd build_msvc +py -3 msvc-autogen.py +msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build ``` Dependencies @@ -28,14 +27,7 @@ - Download the source code, build each dependency, add the required include paths, link libraries and binary tools to the Visual Studio project files. - Use [nuget](https://www.nuget.org/) packages with the understanding that any binary files have been compiled by an untrusted third party. -The [external dependencies](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md) required for building are: - -- Berkeley DB -- Boost -- DoubleConversion -- libevent -- Qt5 -- ZeroMQ +The [external dependencies](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md) required for building are listed in the `build_msvc/vcpkg.json` file. The `msbuild` project files are configured to automatically install the `vcpkg` dependencies. Qt --------------------- @@ -52,12 +44,6 @@ The instructions below use `vcpkg` to install the dependencies. - Install [`vcpkg`](https://github.com/Microsoft/vcpkg). -- Install the required packages (replace x64 with x86 as required). The list of required packages can be found in the `build_msvc\vcpkg-packages.txt` file. The PowerShell command below will work if run from the repository root directory and `vcpkg` is in the path. Alternatively the contents of the packages text file can be pasted in place of the `Get-Content` cmdlet. - -``` -PS >.\vcpkg install --triplet x64-windows-static $(Get-Content -Path build_msvc\vcpkg-packages.txt).split() -PS >.\vcpkg integrate install -``` - Use Python to generate `*.vcxproj` from Makefile @@ -65,7 +51,7 @@ PS >py -3 msvc-autogen.py ``` -- An optional step is to adjust the settings in the build_msvc directory and the common.init.vcxproj file. This project file contains settings that are common to all projects such as the runtime library version and target Windows SDK version. The Qt directories can also be set. +- An optional step is to adjust the settings in the `build_msvc` directory and the `common.init.vcxproj` file. This project file contains settings that are common to all projects such as the runtime library version and target Windows SDK version. The Qt directories can also be set. - To build from the command line with the Visual Studio 2017 toolchain use: @@ -79,7 +65,7 @@ msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build ``` -- Alternatively open the `build_msvc\bitcoin.sln` file in Visual Studio. +- Alternatively open the `build_msvc/bitcoin.sln` file in Visual Studio. AppVeyor --------------------- diff -Nru bitcoin-0.20.1.knots20200815/build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj bitcoin-0.21.0.knots20210130/build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj --- bitcoin-0.20.1.knots20200815/build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj 2021-01-30 05:16:37.000000000 +0000 @@ -73,7 +73,7 @@ $(QtLibraryDir)\Qt5Test.lib;$(QtReleaseLibraries);%(AdditionalDependencies) - /ignore:4206 + /ignore:4206 /LTCG:OFF @@ -83,7 +83,7 @@ $(QtDebugLibraries);%(AdditionalDependencies) - /ignore:4206 + /ignore:4206 diff -Nru bitcoin-0.20.1.knots20200815/build_msvc/testconsensus/testconsensus.cpp bitcoin-0.21.0.knots20210130/build_msvc/testconsensus/testconsensus.cpp --- bitcoin-0.20.1.knots20200815/build_msvc/testconsensus/testconsensus.cpp 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build_msvc/testconsensus/testconsensus.cpp 2021-01-30 05:16:37.000000000 +0000 @@ -1,4 +1,4 @@ -// Copyright (c) 2018 The Bitcoin Core developers +// Copyright (c) 2018-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff -Nru bitcoin-0.20.1.knots20200815/build_msvc/vcpkg.json bitcoin-0.21.0.knots20210130/build_msvc/vcpkg.json --- bitcoin-0.20.1.knots20200815/build_msvc/vcpkg.json 1970-01-01 00:00:00.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build_msvc/vcpkg.json 2021-01-30 05:16:37.000000000 +0000 @@ -0,0 +1,20 @@ +{ + "name": "bitcoin-core", + "version-string": "1", + "dependencies": [ + "berkeleydb", + "boost-filesystem", + "boost-multi-index", + "boost-process", + "boost-signals2", + "boost-test", + "boost-thread", + "sqlite3", + "double-conversion", + { + "name": "libevent", + "features": ["thread"] + }, + "zeromq" + ] +} diff -Nru bitcoin-0.20.1.knots20200815/build_msvc/vcpkg-packages.txt bitcoin-0.21.0.knots20210130/build_msvc/vcpkg-packages.txt --- bitcoin-0.20.1.knots20200815/build_msvc/vcpkg-packages.txt 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/build_msvc/vcpkg-packages.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -berkeleydb boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent[thread] zeromq double-conversion \ No newline at end of file diff -Nru bitcoin-0.20.1.knots20200815/ci/lint/04_install.sh bitcoin-0.21.0.knots20210130/ci/lint/04_install.sh --- bitcoin-0.20.1.knots20200815/ci/lint/04_install.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/lint/04_install.sh 2021-01-30 05:16:37.000000000 +0000 @@ -6,10 +6,15 @@ export LC_ALL=C -travis_retry pip3 install codespell==1.15.0 -travis_retry pip3 install flake8==3.7.8 +travis_retry sudo apt update && sudo apt install -y clang-format-9 +sudo update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-9 ) 100 +sudo update-alternatives --install /usr/bin/clang-format-diff clang-format-diff $(which clang-format-diff-9) 100 + +travis_retry pip3 install codespell==1.17.1 +travis_retry pip3 install flake8==3.8.3 travis_retry pip3 install yq +travis_retry pip3 install mypy==0.781 -SHELLCHECK_VERSION=v0.6.0 +SHELLCHECK_VERSION=v0.7.1 curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/ export PATH="/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}" diff -Nru bitcoin-0.20.1.knots20200815/ci/lint/06_script.sh bitcoin-0.21.0.knots20210130/ci/lint/06_script.sh --- bitcoin-0.20.1.knots20200815/ci/lint/06_script.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/lint/06_script.sh 2021-01-30 05:16:37.000000000 +0000 @@ -7,7 +7,11 @@ export LC_ALL=C if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then - test/lint/commit-script-check.sh $TRAVIS_COMMIT_RANGE + # TRAVIS_BRANCH will be present in a Travis environment. For builds triggered + # by a pull request this is the name of the branch targeted by the pull request. + # https://docs.travis-ci.com/user/environment-variables/ + COMMIT_RANGE="$TRAVIS_BRANCH..HEAD" + test/lint/commit-script-check.sh $COMMIT_RANGE fi test/lint/git-subtree-check.sh src/crypto/ctaes diff -Nru bitcoin-0.20.1.knots20200815/ci/README.md bitcoin-0.21.0.knots20210130/ci/README.md --- bitcoin-0.20.1.knots20200815/ci/README.md 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/README.md 2021-01-30 05:16:37.000000000 +0000 @@ -1,12 +1,8 @@ -## ci scripts +## CI Scripts This directory contains scripts for each build step in each build stage. -Currently three stages `lint`, `extended_lint` and `test` are defined. Each stage has its own lifecycle, similar to the -[Travis CI lifecycle](https://docs.travis-ci.com/user/job-lifecycle#the-job-lifecycle). Every script in here is named -and numbered according to which stage and lifecycle step it belongs to. - -### Running a stage locally +### Running a Stage Locally Be aware that the tests will be built and run in-place, so please run at your own risk. If the repository is not a fresh git clone, you might have to clean files from previous builds or test runs first. @@ -36,3 +32,34 @@ ``` FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh ``` + +### Configurations + +The test files (`FILE_ENV`) are constructed to test a wide range of +configurations, rather than a single pass/fail. This helps to catch build +failures and logic errors that present on platforms other than the ones the +author has tested. + +Some builders use the dependency-generator in `./depends`, rather than using +the system package manager to install build dependencies. This guarantees that +the tester is using the same versions as the release builds, which also use +`./depends`. + +If no `FILE_ENV` has been specified or values are left out, `00_setup_env.sh` +is used as the default configuration with fallback values. + +It is also possible to force a specific configuration without modifying the +file. For example, + +``` +MAKEJOBS="-j1" FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh +``` + +The files starting with `0n` (`n` greater than 0) are the scripts that are run +in order. + +### Cache + +In order to avoid rebuilding all dependencies for each build, the binaries are +cached and re-used when possible. Changes in the dependency-generator will +trigger cache-invalidation and rebuilds as necessary. diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_arm.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_arm.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_arm.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_arm.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -21,8 +21,8 @@ export DOCKER_NAME_TAG="debian:buster" export USE_BUSY_BOX=true export RUN_UNIT_TESTS=true -export RUN_FUNCTIONAL_TESTS=true +export RUN_FUNCTIONAL_TESTS=false export GOAL="install" # -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1" # This could be removed once the ABI change warning does not show up by default -export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CXXFLAGS=-Wno-psabi --enable-werror" +export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CXXFLAGS=-Wno-psabi --enable-werror --with-boost-process" diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_i686_centos.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_i686_centos.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_i686_centos.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_i686_centos.sh 2021-01-30 05:16:37.000000000 +0000 @@ -12,5 +12,5 @@ export DOCKER_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python3 python36-zmq which patch lbzip2 dash" DOCKER_PACKAGES+=" libicns-utils librsvg2-tools ImageMagick" export GOAL="install" -export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-reduce-exports" +export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-reduce-exports --with-boost-process" export CONFIG_SHELL="/bin/dash" diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_mac_host.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_mac_host.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_mac_host.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_mac_host.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -8,10 +8,11 @@ export HOST=x86_64-apple-darwin16 export PIP_PACKAGES="zmq" -export RUN_UNIT_TESTS=true -export RUN_FUNCTIONAL_TESTS=false export GOAL="install" -export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror --enable-suppress-external-warnings" -# Run without depends +export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --enable-werror --with-boost-process" +export CI_OS_NAME="macos" export NO_DEPENDS=1 export OSX_SDK="" +export CCACHE_SIZE=300M + +export RUN_SECURITY_TESTS="true" diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_mac.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_mac.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_mac.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_mac.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,16 +1,18 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_macos_cross +export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can cross-compile to macos (bionic is used in the gitian build as well) export HOST=x86_64-apple-darwin16 export PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python3-dev python3-setuptools" -export OSX_SDK=10.14 +export XCODE_VERSION=11.3.1 +export XCODE_BUILD_ID=11C505 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false export GOAL="deploy" -export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror --enable-suppress-external-warnings" +export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --enable-werror --with-boost-process" diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_asan.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_asan.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_asan.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_asan.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,14 +1,14 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_native_asan -export PACKAGES="clang-8 llvm-8 python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev" -# Use clang-8 instead of default clang (which is clang-6 on Bionic) to avoid spurious segfaults when running on ppc64le +export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev libsqlite3-dev" +export DOCKER_NAME_TAG=ubuntu:20.04 export NO_DEPENDS=1 export GOAL="install" -export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=address,integer,undefined CC=clang-8 CXX=clang++-8" +export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=address,integer,undefined CC=clang CXX=clang++ --with-boost-process" diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_fuzz.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_fuzz.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_fuzz.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_fuzz.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -14,4 +14,5 @@ export RUN_FUNCTIONAL_TESTS=false export RUN_FUZZ_TESTS=true export GOAL="install" -export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,address,undefined CC=clang CXX=clang++" +export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,address,undefined CC=clang CXX=clang++ --with-boost-process" +export CCACHE_SIZE=200M diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_fuzz_with_valgrind.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_fuzz_with_valgrind.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_fuzz_with_valgrind.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_fuzz_with_valgrind.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -16,3 +16,4 @@ export FUZZ_TESTS_CONFIG="--valgrind" export GOAL="install" export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang CXX=clang++" +export CCACHE_SIZE=200M diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_msan.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_msan.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_msan.sh 1970-01-01 00:00:00.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_msan.sh 2021-01-30 05:16:37.000000000 +0000 @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2020 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +export LC_ALL=C.UTF-8 + +export DOCKER_NAME_TAG="ubuntu:20.04" +LIBCXX_DIR="${BASE_ROOT_DIR}/ci/scratch/msan/build/" +export MSAN_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer -g -O1 -fno-optimize-sibling-calls" +LIBCXX_FLAGS="-nostdinc++ -stdlib=libc++ -L${LIBCXX_DIR}lib -lc++abi -I${LIBCXX_DIR}include -I${LIBCXX_DIR}include/c++/v1 -lpthread -Wl,-rpath,${LIBCXX_DIR}lib -Wno-unused-command-line-argument" +export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}" +export BDB_PREFIX="${BASE_ROOT_DIR}/db4" + +export CONTAINER_NAME="ci_native_msan" +export PACKAGES="clang-9 llvm-9 cmake" +export DEP_OPTS="NO_BDB=1 NO_QT=1 CC='clang' CXX='clang++' CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}' boost_cxxflags='-std=c++11 -fvisibility=hidden -fPIC ${MSAN_AND_LIBCXX_FLAGS}' zeromq_cxxflags='-std=c++11 ${MSAN_AND_LIBCXX_FLAGS}'" +export GOAL="install" +export BITCOIN_CONFIG="--enable-wallet --with-sanitizers=memory --with-asm=no --prefix=${BASE_ROOT_DIR}/depends/x86_64-pc-linux-gnu/ CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}' BDB_LIBS='-L${BDB_PREFIX}/lib -ldb_cxx-4.8' BDB_CFLAGS='-I${BDB_PREFIX}/include'" +export USE_MEMORY_SANITIZER="true" +export RUN_FUNCTIONAL_TESTS="false" +export CCACHE_SIZE=250M diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_multiprocess.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_multiprocess.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_multiprocess.sh 1970-01-01 00:00:00.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_multiprocess.sh 2021-01-30 05:16:37.000000000 +0000 @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2020 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +export LC_ALL=C.UTF-8 + +export CONTAINER_NAME=ci_native_multiprocess +export DOCKER_NAME_TAG=ubuntu:20.04 +export PACKAGES="cmake python3" +export DEP_OPTS="MULTIPROCESS=1" +export GOAL="install" +export BITCOIN_CONFIG="--with-boost-process" +export TEST_RUNNER_ENV="BITCOIND=bitcoin-node" diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_nowallet.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_nowallet.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_nowallet.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_nowallet.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,13 +1,14 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_native_nowallet -export PACKAGES="python3-zmq" +export DOCKER_NAME_TAG=ubuntu:16.04 # Use xenial to have one config run the tests in python3.5, see doc/dependencies.md +export PACKAGES="python3-zmq clang-3.8 llvm-3.8" # Use clang-3.8 to test C++11 compatibility, see doc/dependencies.md export DEP_OPTS="NO_WALLET=1" export GOAL="install" -export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports" +export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CC=clang-3.8 CXX=clang++-3.8 --with-boost-process" diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_qt5.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_qt5.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_qt5.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_qt5.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,17 +1,19 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_native_qt5 +export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can compile our c++17 and run our functional tests in python3 export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev" export DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1" -export TEST_RUNNER_EXTRA="--coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash +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_SECURITY_TESTS="true" export RUN_UNIT_TESTS_SEQUENTIAL="true" export RUN_UNIT_TESTS="false" export GOAL="install" -export TEST_PREVIOUS_RELEASES=true -export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --enable-debug CFLAGS=\"-g0 -O2 -funsigned-char\" CXXFLAGS=\"-g0 -O2 -funsigned-char\"" +export PREVIOUS_RELEASES_TO_DOWNLOAD="v0.15.2 v0.16.3 v0.17.2 v0.18.1 v0.19.1" +export BITCOIN_CONFIG="--enable-zmq --with-libs=no --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --enable-c++17 --enable-debug CFLAGS=\"-g0 -O2 -funsigned-char\" CXXFLAGS=\"-g0 -O2 -funsigned-char\" --with-boost-process" diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_tsan.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_tsan.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_tsan.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_tsan.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,18 +1,15 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_native_tsan -export DOCKER_NAME_TAG=ubuntu:16.04 -export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev" -export NO_DEPENDS=1 +export DOCKER_NAME_TAG=ubuntu:20.04 +export PACKAGES="clang llvm libc++abi-dev libc++-dev python3-zmq" +export DEP_OPTS="CC=clang CXX='clang++ -stdlib=libc++'" +export TEST_RUNNER_EXTRA="--exclude feature_block" # Low memory on Travis machines, exclude feature_block. export GOAL="install" -export BITCOIN_CONFIG="--enable-zmq --disable-wallet --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=thread --disable-hardening --disable-asm CC=clang CXX=clang++" - -# xenial comes with old clang versions that can not parse the sanitizer suppressions files -# Remove unparseable lines as a hacky workaround -sed -i '/^implicit-/d' "${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan" +export BITCOIN_CONFIG="--enable-zmq --with-gui=no CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' CXXFLAGS='-g' --with-sanitizers=thread CC=clang CXX='clang++ -stdlib=libc++' --with-boost-process" diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_valgrind.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_valgrind.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_native_valgrind.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_native_valgrind.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,13 +1,13 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_native_valgrind -export PACKAGES="valgrind clang llvm python3-zmq libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev" +export PACKAGES="valgrind clang llvm python3-zmq libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libsqlite3-dev" export USE_VALGRIND=1 export NO_DEPENDS=1 export TEST_RUNNER_EXTRA="--exclude rpc_bind" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547 diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_s390x.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_s390x.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_s390x.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_s390x.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -20,6 +20,7 @@ export CONTAINER_NAME=ci_s390x export DOCKER_NAME_TAG="debian:buster" export RUN_UNIT_TESTS=true +export TEST_RUNNER_ENV="LC_ALL=C" export RUN_FUNCTIONAL_TESTS=true export GOAL="install" -export BITCOIN_CONFIG="--enable-reduce-exports --with-incompatible-bdb" +export BITCOIN_CONFIG="--enable-reduce-exports --with-incompatible-bdb --with-boost-process" diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -8,7 +8,7 @@ # The root dir. # The ci system copies this folder. -# This is where the build is done (depends and dist). +# This is where the depends build is done. BASE_ROOT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../../ >/dev/null 2>&1 && pwd ) export BASE_ROOT_DIR @@ -24,17 +24,25 @@ export MAKEJOBS=${MAKEJOBS:--j4} # A folder for the ci system to put temporary files (ccache, datadirs for tests, ...) # This folder only exists on the ci host. -export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch/} +export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch} # What host to compile for. See also ./depends/README.md # Tests that need cross-compilation export the appropriate HOST. # Tests that run natively guess the host export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")} # Whether to prefer BusyBox over GNU utilities 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 TEST_PREVIOUS_RELEASES=${TEST_PREVIOUS_RELEASES:-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. +export TEST_RUNNER_TIMEOUT_FACTOR=${TEST_RUNNER_TIMEOUT_FACTOR:-40} +export TEST_RUNNER_ENV=${TEST_RUNNER_ENV:-} export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false} +export EXPECTED_TESTS_DURATION_IN_SECONDS=${EXPECTED_TESTS_DURATION_IN_SECONDS:-1000} + export CONTAINER_NAME=${CONTAINER_NAME:-ci_unnamed} export DOCKER_NAME_TAG=${DOCKER_NAME_TAG:-ubuntu:18.04} # Randomize test order. @@ -51,14 +59,15 @@ # The depends dir. # This folder exists on the ci host and ci guest. Changes are propagated back and forth. export DEPENDS_DIR=${DEPENDS_DIR:-$BASE_ROOT_DIR/depends} -# Folder where the build is done (bin and lib). +# Folder where the build result is put (bin and lib). export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out/$HOST} +# Folder where the build is done (dist and out-of-tree build). +export BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build} export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/releases/$HOST} export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks} -export WINEDEBUG=${WINEDEBUG:-fixme-all} export COMMON_PACKAGES="icnsutils librsvg2-bin imagemagick" export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps} export GOAL=${GOAL:-install} export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets} export PATH=${BASE_ROOT_DIR}/ci/retry:$PATH -export CI_RETRY_EXE=${CI_RETRY_EXE:retry} +export CI_RETRY_EXE=${CI_RETRY_EXE:-"retry --"} diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_win32.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_win32.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_win32.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_win32.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,15 +1,17 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 -export CONTAINER_NAME=ci_win64 +export CONTAINER_NAME=ci_win32 +export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can cross-compile to win64 (bionic is used in the gitian build as well) export HOST=i686-w64-mingw32 export DPKG_ADD_ARCH="i386" -export PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32" +export PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32 file" export RUN_FUNCTIONAL_TESTS=false +export RUN_SECURITY_TESTS="true" export GOAL="deploy" -export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests" +export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests --without-boost-process" diff -Nru bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_win64.sh bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_win64.sh --- bitcoin-0.20.1.knots20200815/ci/test/00_setup_env_win64.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/00_setup_env_win64.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,14 +1,16 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_win64 +export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can cross-compile to win64 (bionic is used in the gitian build as well) export HOST=x86_64-w64-mingw32 -export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64" +export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64 file" export RUN_FUNCTIONAL_TESTS=false +export RUN_SECURITY_TESTS="true" export GOAL="deploy" -export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests" +export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests --without-boost-process" diff -Nru bitcoin-0.20.1.knots20200815/ci/test/03_before_install.sh bitcoin-0.21.0.knots20210130/ci/test/03_before_install.sh --- bitcoin-0.20.1.knots20200815/ci/test/03_before_install.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/03_before_install.sh 2021-01-30 05:16:37.000000000 +0000 @@ -6,10 +6,6 @@ export LC_ALL=C.UTF-8 -# Add llvm-symbolizer directory to PATH. Needed to get symbolized stack traces from the sanitizers. -PATH=$PATH:/usr/lib/llvm-6.0/bin/ -export PATH - BEGIN_FOLD () { echo "" CURRENT_FOLD_NAME=$1 diff -Nru bitcoin-0.20.1.knots20200815/ci/test/04_install.sh bitcoin-0.21.0.knots20210130/ci/test/04_install.sh --- bitcoin-0.20.1.knots20200815/ci/test/04_install.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/04_install.sh 2021-01-30 05:16:37.000000000 +0000 @@ -13,23 +13,20 @@ export LC_ALL=C fi -if [ "$TRAVIS_OS_NAME" == "osx" ]; then - export PATH="/usr/local/opt/ccache/libexec:$PATH" - ${CI_RETRY_EXE} pip3 install $PIP_PACKAGES +if [ "$CI_OS_NAME" == "macos" ]; then + IN_GETOPT_BIN="/usr/local/opt/gnu-getopt/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES fi -mkdir -p "${BASE_SCRATCH_DIR}" +# Create folders that are mounted into the docker mkdir -p "${CCACHE_DIR}" mkdir -p "${PREVIOUS_RELEASES_DIR}" export ASAN_OPTIONS="detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1" export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/lsan" -export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:log_path=${BASE_SCRATCH_DIR}/sanitizer-output/tsan" +export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1:log_path=${BASE_SCRATCH_DIR}/sanitizer-output/tsan" export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1" -env | grep -E '^(BITCOIN_CONFIG|BASE_|QEMU_|CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|DEBIAN_FRONTEND|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS|TEST_PREVIOUS_RELEASES|PREVIOUS_RELEASES_DIR)' | tee /tmp/env -if [[ $HOST = *-mingw32 ]]; then - DOCKER_ADMIN="--cap-add SYS_ADMIN" -elif [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764) +env | grep -E '^(BITCOIN_CONFIG|BASE_|QEMU_|CCACHE_|LC_ALL|BOOST_TEST_RANDOM|DEBIAN_FRONTEND|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS|PREVIOUS_RELEASES_DIR)' | tee /tmp/env +if [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764) DOCKER_ADMIN="--cap-add SYS_PTRACE" fi @@ -48,17 +45,16 @@ --env-file /tmp/env \ --name $CONTAINER_NAME \ $DOCKER_NAME_TAG) - - DOCKER_EXEC () { - docker exec $DOCKER_ID bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $P_CI_DIR && $*" - } + export DOCKER_CI_CMD_PREFIX="docker exec $DOCKER_ID" else echo "Running on host system without docker wrapper" - DOCKER_EXEC () { - bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $P_CI_DIR && $*" - } fi +DOCKER_EXEC () { + $DOCKER_CI_CMD_PREFIX bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $P_CI_DIR && $*" +} +export -f DOCKER_EXEC + if [ -n "$DPKG_ADD_ARCH" ]; then DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH" fi @@ -71,26 +67,34 @@ ${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y $COMMON_PACKAGES $PACKAGES $DOCKER_PACKAGES fi -if [ "$TRAVIS_OS_NAME" == "osx" ]; then +if [ "$CI_OS_NAME" == "macos" ]; then top -l 1 -s 0 | awk ' /PhysMem/ {print}' echo "Number of CPUs: $(sysctl -n hw.logicalcpu)" else DOCKER_EXEC free -m -h DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\) DOCKER_EXEC echo $(lscpu | grep Endian) - DOCKER_EXEC echo "Free disk space:" - DOCKER_EXEC df -h fi +DOCKER_EXEC echo "Free disk space:" +DOCKER_EXEC df -h if [ ! -d ${DIR_QA_ASSETS} ]; then - if [ "$RUN_FUZZ_TESTS" = "true" ]; then - DOCKER_EXEC git clone https://github.com/bitcoin-core/qa-assets ${DIR_QA_ASSETS} - fi + DOCKER_EXEC git clone --depth=1 https://github.com/bitcoin-core/qa-assets ${DIR_QA_ASSETS} fi export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/ +export DIR_UNIT_TEST_DATA=${DIR_QA_ASSETS}/unit_test_data/ DOCKER_EXEC mkdir -p "${BASE_SCRATCH_DIR}/sanitizer-output/" +if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then + DOCKER_EXEC "update-alternatives --install /usr/bin/clang++ clang++ \$(which clang++-9) 100" + DOCKER_EXEC "update-alternatives --install /usr/bin/clang clang \$(which clang-9) 100" + DOCKER_EXEC "mkdir -p ${BASE_SCRATCH_DIR}/msan/build/" + DOCKER_EXEC "git clone --depth=1 https://github.com/llvm/llvm-project -b llvmorg-10.0.0 ${BASE_SCRATCH_DIR}/msan/llvm-project" + DOCKER_EXEC "cd ${BASE_SCRATCH_DIR}/msan/build/ && cmake -DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi' -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=Memory -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=X86 ../llvm-project/llvm/" + DOCKER_EXEC "cd ${BASE_SCRATCH_DIR}/msan/build/ && make $MAKEJOBS cxx" +fi + if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then echo "Create $BASE_ROOT_DIR" DOCKER_EXEC rsync -a /ro_base/ $BASE_ROOT_DIR diff -Nru bitcoin-0.20.1.knots20200815/ci/test/05_before_script.sh bitcoin-0.21.0.knots20210130/ci/test/05_before_script.sh --- bitcoin-0.20.1.knots20200815/ci/test/05_before_script.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/05_before_script.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,13 +1,13 @@ #!/usr/bin/env bash # -# Copyright (c) 2018-2019 The Bitcoin Core developers +# Copyright (c) 2018-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 # Make sure default datadir does not exist and is never read by creating a dummy file -if [ "$TRAVIS_OS_NAME" == "osx" ]; then +if [ "$CI_OS_NAME" == "macos" ]; then echo > $HOME/Library/Application\ Support/Bitcoin else DOCKER_EXEC echo \> \$HOME/.bitcoin @@ -15,11 +15,22 @@ DOCKER_EXEC mkdir -p ${DEPENDS_DIR}/SDKs ${DEPENDS_DIR}/sdk-sources -if [ -n "$OSX_SDK" ] && [ ! -f ${DEPENDS_DIR}/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then - curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o ${DEPENDS_DIR}/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz +OSX_SDK_BASENAME="Xcode-${XCODE_VERSION}-${XCODE_BUILD_ID}-extracted-SDK-with-libcxx-headers.tar.gz" +OSX_SDK_PATH="${DEPENDS_DIR}/sdk-sources/${OSX_SDK_BASENAME}" + +if [ -n "$XCODE_VERSION" ] && [ ! -f "$OSX_SDK_PATH" ]; then + curl --location --fail "${SDK_URL}/${OSX_SDK_BASENAME}" -o "$OSX_SDK_PATH" +fi + +if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then + # Use BDB compiled using install_db4.sh script to work around linking issue when using BDB + # from depends. See https://github.com/bitcoin/bitcoin/pull/18288#discussion_r433189350 for + # details. + DOCKER_EXEC "contrib/install_db4.sh \$(pwd) --enable-umrw CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'" fi -if [ -n "$OSX_SDK" ] && [ -f ${DEPENDS_DIR}/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then - DOCKER_EXEC tar -C ${DEPENDS_DIR}/SDKs -xf ${DEPENDS_DIR}/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz + +if [ -n "$XCODE_VERSION" ] && [ -f "$OSX_SDK_PATH" ]; then + DOCKER_EXEC tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH" fi if [[ $HOST = *-mingw32 ]]; then DOCKER_EXEC update-alternatives --set $HOST-g++ \$\(which $HOST-g++-posix\) @@ -35,8 +46,8 @@ fi DOCKER_EXEC $SHELL_OPTS make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS fi -if [ "$TEST_PREVIOUS_RELEASES" = "true" ]; then +if [ -n "$PREVIOUS_RELEASES_TO_DOWNLOAD" ]; then BEGIN_FOLD previous-versions - DOCKER_EXEC contrib/devtools/previous_release.sh -b -t "$PREVIOUS_RELEASES_DIR" v0.17.1 v0.18.1 v0.19.0.1 + DOCKER_EXEC test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" "${PREVIOUS_RELEASES_TO_DOWNLOAD}" END_FOLD fi diff -Nru bitcoin-0.20.1.knots20200815/ci/test/06_script_a.sh bitcoin-0.21.0.knots20210130/ci/test/06_script_a.sh --- bitcoin-0.20.1.knots20200815/ci/test/06_script_a.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/06_script_a.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,15 +1,13 @@ #!/usr/bin/env bash # -# Copyright (c) 2018-2019 The Bitcoin Core developers +# Copyright (c) 2018-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$DEPENDS_DIR/$HOST --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib" -if [ -z "$NO_DEPENDS" ]; then - DOCKER_EXEC ccache --max-size=$CCACHE_SIZE -fi +DOCKER_EXEC "ccache --zero-stats --max-size=$CCACHE_SIZE" BEGIN_FOLD autogen if [ -n "$CONFIG_SHELL" ]; then @@ -19,20 +17,18 @@ fi END_FOLD -DOCKER_EXEC mkdir -p build -export P_CI_DIR="$P_CI_DIR/build" +DOCKER_EXEC mkdir -p "${BASE_BUILD_DIR}" +export P_CI_DIR="${BASE_BUILD_DIR}" BEGIN_FOLD configure -DOCKER_EXEC ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (DOCKER_EXEC cat config.log) && false) +DOCKER_EXEC "${BASE_ROOT_DIR}/configure" --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (DOCKER_EXEC cat config.log) && false) END_FOLD BEGIN_FOLD distdir -# Create folder on host and docker, so that `cd` works -mkdir -p "bitcoin-$HOST" DOCKER_EXEC make distdir VERSION=$HOST END_FOLD -export P_CI_DIR="$P_CI_DIR/bitcoin-$HOST" +export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST" BEGIN_FOLD configure DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (DOCKER_EXEC cat config.log) && false) @@ -41,6 +37,20 @@ set -o errtrace trap 'DOCKER_EXEC "cat ${BASE_SCRATCH_DIR}/sanitizer-output/* 2> /dev/null"' ERR +if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then + # MemorySanitizer (MSAN) does not support tracking memory initialization done by + # using the Linux getrandom syscall. Avoid using getrandom by undefining + # HAVE_SYS_GETRANDOM. See https://github.com/google/sanitizers/issues/852 for + # details. + DOCKER_EXEC 'grep -v HAVE_SYS_GETRANDOM src/config/bitcoin-config.h > src/config/bitcoin-config.h.tmp && mv src/config/bitcoin-config.h.tmp src/config/bitcoin-config.h' +fi + BEGIN_FOLD build DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false ) END_FOLD + +BEGIN_FOLD cache_stats +DOCKER_EXEC "ccache --version | head -n 1 && ccache --show-stats" +DOCKER_EXEC du -sh "${DEPENDS_DIR}"/*/ +DOCKER_EXEC du -sh "${PREVIOUS_RELEASES_DIR}" +END_FOLD diff -Nru bitcoin-0.20.1.knots20200815/ci/test/06_script_b.sh bitcoin-0.21.0.knots20210130/ci/test/06_script_b.sh --- bitcoin-0.20.1.knots20200815/ci/test/06_script_b.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/06_script_b.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,11 +1,20 @@ #!/usr/bin/env bash # -# Copyright (c) 2018-2019 The Bitcoin Core developers +# Copyright (c) 2018-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 +if [[ $HOST = *-mingw32 ]]; then + BEGIN_FOLD wrap-wine + # Generate all binaries, so that they can be wrapped + DOCKER_EXEC make $MAKEJOBS -C src/secp256k1 VERBOSE=1 + DOCKER_EXEC make $MAKEJOBS -C src/univalue VERBOSE=1 + DOCKER_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-wine.sh" + END_FOLD +fi + if [ -n "$QEMU_USER_CMD" ]; then BEGIN_FOLD wrap-qemu # Generate all binaries, so that they can be wrapped @@ -21,28 +30,32 @@ END_FOLD fi -bash -c "${CI_WAIT}" & # Print dots in case the tests take a long time to run - if [ "$RUN_UNIT_TESTS" = "true" ]; then BEGIN_FOLD unit-tests - DOCKER_EXEC LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib make $MAKEJOBS check VERBOSE=1 + DOCKER_EXEC ${TEST_RUNNER_ENV} DIR_UNIT_TEST_DATA=${DIR_UNIT_TEST_DATA} LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib make $MAKEJOBS check VERBOSE=1 END_FOLD fi if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then BEGIN_FOLD unit-tests-seq - DOCKER_EXEC LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib "${BASE_ROOT_DIR}/build/bitcoin-*/src/test/test_bitcoin" --catch_system_errors=no -l test_suite + DOCKER_EXEC ${TEST_RUNNER_ENV} DIR_UNIT_TEST_DATA=${DIR_UNIT_TEST_DATA} LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib "${BASE_BUILD_DIR}/bitcoin-*/src/test/test_bitcoin*" --catch_system_errors=no -l test_suite END_FOLD fi if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then BEGIN_FOLD functional-tests - DOCKER_EXEC test/functional/test_runner.py --ci $MAKEJOBS --tmpdirprefix "${BASE_SCRATCH_DIR}/test_runner/" --ansi --combinedlogslen=4000 ${TEST_RUNNER_EXTRA} --quiet --failfast + DOCKER_EXEC LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib ${TEST_RUNNER_ENV} test/functional/test_runner.py --ci $MAKEJOBS --tmpdirprefix "${BASE_SCRATCH_DIR}/test_runner/" --ansi --combinedlogslen=4000 --timeout-factor=${TEST_RUNNER_TIMEOUT_FACTOR} ${TEST_RUNNER_EXTRA} --quiet --failfast + END_FOLD +fi + +if [ "$RUN_SECURITY_TESTS" = "true" ]; then + BEGIN_FOLD security-tests + DOCKER_EXEC make test-security-check END_FOLD fi if [ "$RUN_FUZZ_TESTS" = "true" ]; then BEGIN_FOLD fuzz-tests - DOCKER_EXEC test/fuzz/test_runner.py ${FUZZ_TESTS_CONFIG} -l DEBUG ${DIR_FUZZ_IN} + DOCKER_EXEC LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib test/fuzz/test_runner.py ${FUZZ_TESTS_CONFIG} $MAKEJOBS -l DEBUG ${DIR_FUZZ_IN} END_FOLD fi diff -Nru bitcoin-0.20.1.knots20200815/ci/test/wrap-qemu.sh bitcoin-0.21.0.knots20210130/ci/test/wrap-qemu.sh --- bitcoin-0.20.1.knots20200815/ci/test/wrap-qemu.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/wrap-qemu.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2018 The Bitcoin Core developers +# Copyright (c) 2018-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff -Nru bitcoin-0.20.1.knots20200815/ci/test/wrap-wine.sh bitcoin-0.21.0.knots20210130/ci/test/wrap-wine.sh --- bitcoin-0.20.1.knots20200815/ci/test/wrap-wine.sh 1970-01-01 00:00:00.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/ci/test/wrap-wine.sh 2021-01-30 05:16:37.000000000 +0000 @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2020 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +export LC_ALL=C.UTF-8 + +for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/univalue/{no_nul,test_json,unitester,object}}.exe; do + # shellcheck disable=SC2044 + for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name "$(basename $b_name)"); do + filetype="$(file -b "$b")" + if grep -q "Windows" <<<"${filetype}"; then + echo "Wrap $b ..." + mv "$b" "${b}_orig" + echo '#!/usr/bin/env bash' > "$b" + if grep -q "\b64\b" <<<"${filetype}"; then + echo "wine64 \"${b}_orig\" \"\$@\"" >> "$b" + else + echo "wine \"${b}_orig\" \"\$@\"" >> "$b" + fi + chmod +x "$b" + fi + done +done diff -Nru bitcoin-0.20.1.knots20200815/.cirrus.yml bitcoin-0.21.0.knots20210130/.cirrus.yml --- bitcoin-0.20.1.knots20200815/.cirrus.yml 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/.cirrus.yml 2021-01-30 05:16:37.000000000 +0000 @@ -1,23 +1,152 @@ -task: - name: "x86_64 Linux [GOAL: install] [bionic] [Using ./ci/ system]" - container: - image: ubuntu:18.04 - cpu: 8 - memory: 8G - timeout_in: 60m - env: - MAKEJOBS: "-j9" - DANGER_RUN_CI_ON_HOST: "1" - TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache - CCACHE_SIZE: "200M" - CCACHE_DIR: "/tmp/ccache_dir" +### Global defaults + +timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out +container: + # https://cirrus-ci.org/faq/#are-there-any-limits + # Each project has 16 CPU in total, assign 2 to each container, so that 8 tasks run in parallel + cpu: 2 + memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers + kvm: true # Use kvm to avoid spurious CI failures in the default virtualization cluster, see https://github.com/bitcoin/bitcoin/issues/20093 +env: + PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y" + MAKEJOBS: "-j4" + DANGER_RUN_CI_ON_HOST: "1" # Containers will be discarded after the run, so there is no risk that the ci scripts modify the system + TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache + CCACHE_SIZE: "200M" + CCACHE_DIR: "/tmp/ccache_dir" + +### Global task template + +# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks +global_task_template: &GLOBAL_TASK_TEMPLATE + skip: $CIRRUS_REPO_FULL_NAME == "bitcoin-core/gui" && $CIRRUS_PR == "" # No need to run on the read-only mirror, unless it is a PR. https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution ccache_cache: folder: "/tmp/ccache_dir" depends_built_cache: folder: "/tmp/cirrus-ci-build/depends/built" - install_script: - - apt-get update - - apt-get -y install git bash ccache - - ccache --max-size=${CCACHE_SIZE} + depends_sdk_cache: + folder: "/tmp/cirrus-ci-build/depends/sdk-sources" + depends_releases_cache: + folder: "/tmp/cirrus-ci-build/releases" + merge_base_script: + - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi + - bash -c "$PACKAGE_MANAGER_INSTALL git" + - git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH + - git config --global user.email "ci@ci.ci" + - git config --global user.name "ci" + - git merge FETCH_HEAD # Merge base to detect silent merge conflicts ci_script: - ./ci/test_run_all.sh + +#task: +# name: "Windows" +# windows_container: +# image: cirrusci/windowsservercore:2019 +# env: +# CIRRUS_SHELL: powershell +# PATH: 'C:\Python37;C:\Python37\Scripts;%PATH%' +# PYTHONUTF8: 1 +# QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip' +# QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21' +# QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019' +# VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed' +# VCPKG_COMMIT_ID: 'ed0df8ecc4ed7e755ea03e18aaf285fd9b4b4a74' +# install_script: +# - choco install python --version=3.7.7 -y + +task: + name: 'ARM [GOAL: install] [buster] [unit tests, no functional tests]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: debian:buster + env: + FILE_ENV: "./ci/test/00_setup_env_arm.sh" + +task: + name: 'Win32 [GOAL: deploy] [unit tests, no gui, no boost::process, no functional tests]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:bionic + env: + FILE_ENV: "./ci/test/00_setup_env_win32.sh" + +task: + name: 'Win64 [GOAL: deploy] [unit tests, no gui, no boost::process, no functional tests]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:bionic + env: + FILE_ENV: "./ci/test/00_setup_env_win64.sh" + +task: + name: 'x86_64 Linux [GOAL: install] [bionic] [C++17, previous releases, uses qt5 dev package and some depends packages] [unsigned char]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:bionic + env: + FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh" + +task: + name: 'x86_64 Linux [GOAL: install] [focal] [depends, sanitizers: thread (TSan), no gui]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:focal + cpu: 4 # Double CPU and Memory to avoid timeout + memory: 16G + env: + MAKEJOBS: "-j8" + FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh" + +task: + name: 'x86_64 Linux [GOAL: install] [focal] [depends, sanitizers: memory (MSan)]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:focal + env: + FILE_ENV: "./ci/test/00_setup_env_native_msan.sh" + +task: + name: 'x86_64 Linux [GOAL: install] [focal] [no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:focal + env: + FILE_ENV: "./ci/test/00_setup_env_native_asan.sh" + +task: + name: 'x86_64 Linux [GOAL: install] [focal] [no depends, only system libs, sanitizers: fuzzer,address,undefined]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:focal + env: + FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh" + +task: + name: 'x86_64 Linux [GOAL: install] [focal] [multiprocess]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:focal + env: + FILE_ENV: "./ci/test/00_setup_env_native_multiprocess.sh" + +task: + name: 'macOS 10.12 [GOAL: deploy] [no functional tests]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:bionic + env: + FILE_ENV: "./ci/test/00_setup_env_mac.sh" + +task: + name: 'macOS 10.14 native [GOAL: install] [GUI] [no depends]' + macos_brew_addon_script: + - brew install boost libevent berkeley-db4 qt miniupnpc ccache zeromq qrencode sqlite libtool automake pkg-config gnu-getopt imagemagick libicns librsvg + << : *GLOBAL_TASK_TEMPLATE + osx_instance: + # Use latest image, but hardcode version to avoid silent upgrades (and breaks) + image: catalina-xcode-12.1 # https://cirrus-ci.org/guide/macOS + env: + DANGER_RUN_CI_ON_HOST: "true" + CI_USE_APT_INSTALL: "no" + PACKAGE_MANAGER_INSTALL: "echo" # Nothing to do + FILE_ENV: "./ci/test/00_setup_env_mac_host.sh" diff -Nru bitcoin-0.20.1.knots20200815/CODEOWNERS bitcoin-0.21.0.knots20210130/CODEOWNERS --- bitcoin-0.20.1.knots20200815/CODEOWNERS 1970-01-01 00:00:00.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/CODEOWNERS 2021-01-30 05:16:37.000000000 +0000 @@ -0,0 +1,136 @@ +# ============================================================================== +# Bitcoin Core CODEOWNERS +# ============================================================================== + +# Configuration of code ownership and review approvals for the bitcoin/bitcoin +# repo. + +# Order is important; the last matching pattern takes the most precedence. +# More info on how this file works can be found at: +# https://help.github.com/articles/about-codeowners/ + +# This file is called CODEOWNERS because it is a magic file for GitHub to +# automatically suggest reviewers. In this project's case, the names below +# should be thought of as code reviewers rather than owners. Regular +# contributors are free to add their names to specific directories or files +# provided that they are willing to provide a review when automatically +# assigned. + +# Absence from this list should not be interpreted as a discouragement to +# review a pull request. Peer review is always welcome and is a critical +# component of the progress of the codebase. Information on peer review +# guidelines can be found in the CONTRIBUTING.md doc. + + +# Maintainers +# @laanwj +# @sipa +# @fanquake +# @jonasschnelli +# @marcofalke +# @meshcollider + +# Docs +/doc/*[a-zA-Z-].md @harding +/doc/Doxyfile.in @fanquake +/doc/REST-interface.md @jonasschnelli +/doc/benchmarking.md @ariard +/doc/bitcoin-conf.md @hebasto +/doc/build-freebsd.md @fanquake +/doc/build-netbsd.md @fanquake +/doc/build-openbsd.md @laanwj +/doc/build-osx.md @fanquake +/doc/build-unix.md @laanwj +/doc/build-windows.md @sipsorcery +/doc/dependencies.md @fanquake +/doc/developer-notes.md @laanwj +/doc/files.md @hebasto +/doc/gitian-building.md @laanwj +/doc/reduce-memory.md @fanquake +/doc/reduce-traffic.md @jonasschnelli +/doc/release-process.md @laanwj +/doc/translation_strings_policy.md @laanwj + +# Build aux +/build-aux/m4/bitcoin_qt.m4 @hebasto + +# MSVC build system +/build_msvc/ @sipsorcery + +# Settings +/src/util/settings.* @ryanofsky + +# Fuzzing +/src/test/fuzz/ @practicalswift +/doc/fuzzing.md @practicalswift + +# Test framework +/test/functional/mempool_updatefromblock.py @hebasto +/test/functional/feature_asmap.py @jonatack +/test/functional/interface_bitcoin_cli.py @jonatack +/test/functional/tool_wallet.py @jonatack + +# Translations +/src/util/translation.h @hebasto + +# Dev Tools +/contrib/devtools/security-check.py @fanquake +/contrib/devtools/test-security-check.py @fanquake +/contrib/devtools/symbol-check.py @fanquake + +# Gitian/Guix +/contrib/gitian-build.py @hebasto +/contrib/guix/ @dongcarl + +# Compatibility +/src/compat/glibc_* @fanquake + +# GUI +/src/qt/forms/ @hebasto + +# Wallet +/src/wallet/ @achow101 + +# CLI +/src/bitcoin-cli.cpp @jonatack + +# Coinstats +/src/node/coinstats.* @fjahr + +# Index +/src/index/ @fjahr + +# Descriptors +*descriptor* @achow101 @sipa + +# Interfaces +/src/interfaces/ @ryanofsky + +# DB +/src/txdb.* @jamesob +/src/dbwrapper.* @jamesob + +# Scripts/Linter +*.sh @practicalswift +/test/lint/ @practicalswift +/test/lint/lint-shell.sh @hebasto + +# Bech32 +/src/bech32.* @sipa +/src/bench/bech32.* @sipa + +# PSBT +/src/psbt* @achow101 +/src/node/psbt* @achow101 +/doc/psbt.md @achow101 + +# P2P +/src/net_processing.* @sipa +/src/protocol.* @sipa + +# Consensus +/src/coins.* @sipa @jamesob +/src/script/script.* @sipa +/src/script/interpreter.* @sipa +/src/validation.* @sipa +/src/consensus/ @sipa diff -Nru bitcoin-0.20.1.knots20200815/configure.ac bitcoin-0.21.0.knots20210130/configure.ac --- bitcoin-0.20.1.knots20200815/configure.ac 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/configure.ac 2021-01-30 05:16:37.000000000 +0000 @@ -1,11 +1,11 @@ AC_PREREQ([2.69]) define(_CLIENT_VERSION_MAJOR, 0) -define(_CLIENT_VERSION_MINOR, 20) -define(_CLIENT_VERSION_REVISION, 1) +define(_CLIENT_VERSION_MINOR, 21) +define(_CLIENT_VERSION_REVISION, 0) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_RC, 0) define(_CLIENT_VERSION_IS_RELEASE, true) -define(_COPYRIGHT_YEAR, 2020) +define(_COPYRIGHT_YEAR, 2021) define(_COPYRIGHT_HOLDERS,[The %s developers]) define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]]) AC_INIT([Bitcoin Knots],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_REVISION, m4_if(_CLIENT_VERSION_BUILD, [0], [], _CLIENT_VERSION_BUILD))m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC),[https://github.com/bitcoinknots/bitcoin/issues],[bitcoin],[http://bitcoinknots.org/]) @@ -14,6 +14,12 @@ AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([build-aux/m4]) +m4_ifndef([PKG_PROG_PKG_CONFIG], [AC_MSG_ERROR([PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh])]) +PKG_PROG_PKG_CONFIG +if test "x$PKG_CONFIG" = x; then + AC_MSG_ERROR([pkg-config not found]) +fi + BITCOIN_DAEMON_NAME=bitcoind BITCOIN_GUI_NAME=bitcoin-qt BITCOIN_CLI_NAME=bitcoin-cli @@ -61,8 +67,20 @@ lt_cv_deplibs_check_method="pass_all" ;; esac -dnl Require C++11 compiler (no GNU extensions) -AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory], [nodefault]) + +AC_ARG_ENABLE([c++17], + [AS_HELP_STRING([--enable-c++17], + [enable compilation in c++17 mode (disabled by default)])], + [use_cxx17=$enableval], + [use_cxx17=no]) + +dnl Require C++11 or C++17 compiler (no GNU extensions) +if test "x$use_cxx17" = xyes -o "x$enable_fuzz" = xyes ; then + AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory]) +else + AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory]) +fi + dnl Check if -latomic is required for CHECK_ATOMIC @@ -87,6 +105,7 @@ AC_PATH_TOOL(RANLIB, ranlib) AC_PATH_TOOL(STRIP, strip) AC_PATH_TOOL(GCOV, gcov) +AC_PATH_TOOL(LLVM_COV, llvm-cov) AC_PATH_PROG(LCOV, lcov) dnl Python 3.5 is specified in .python-version and should be used if available, see doc/dependencies.md AC_PATH_PROGS([PYTHON], [python3.5 python3.6 python3.7 python3.8 python3 python]) @@ -99,9 +118,6 @@ AC_PATH_TOOL(CPPFILT, c++filt) AC_PATH_TOOL(OBJCOPY, objcopy) AC_PATH_PROG(DOXYGEN, doxygen) -if test -z "$DOXYGEN"; then - AC_MSG_WARN([Doxygen not found]) -fi AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) AC_ARG_VAR(PYTHONPATH, Augments the default search path for python module files) @@ -112,6 +128,12 @@ [enable_wallet=$enableval], [enable_wallet=yes]) +AC_ARG_WITH([sqlite], + [AS_HELP_STRING([--with-sqlite=yes|no|auto], + [enable sqlite wallet support (default: auto, i.e., enabled if wallet is enabled and sqlite is found)])], + [use_sqlite=$withval], + [use_sqlite=auto]) + AC_ARG_WITH([miniupnpc], [AS_HELP_STRING([--with-miniupnpc], [enable UPNP (default is yes if libminiupnpc is found)])], @@ -230,15 +252,23 @@ [use_zmq=$enableval], [use_zmq=yes]) -AC_ARG_ENABLE([bip70], - [AS_HELP_STRING([--enable-bip70], - [BIP70 (payment protocol) support in the GUI (no longer supported)])], - [enable_bip70=$enableval], - [enable_bip70=no]) - -if test x$enable_bip70 != xno; then - AC_MSG_ERROR([BIP70 is no longer supported!]) -fi +AC_ARG_WITH([libmultiprocess], + [AS_HELP_STRING([--with-libmultiprocess=yes|no|auto], + [Build with libmultiprocess library. (default: auto, i.e. detect with pkg-config)])], + [with_libmultiprocess=$withval], + [with_libmultiprocess=auto]) + +AC_ARG_WITH([mpgen], + [AS_HELP_STRING([--with-mpgen=yes|no|auto|PREFIX], + [Build with libmultiprocess codegen tool. Useful to specify different libmultiprocess host system library and build system codegen tool prefixes when cross-compiling (default is host system libmultiprocess prefix)])], + [with_mpgen=$withval], + [with_mpgen=auto]) + +AC_ARG_ENABLE([multiprocess], + [AS_HELP_STRING([--enable-multiprocess], + [build multiprocess bitcoin-node, bitcoin-wallet, and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables. Requires libmultiprocess library. Experimental (default is no)])], + [enable_multiprocess=$enableval], + [enable_multiprocess=no]) AC_ARG_ENABLE(man, [AS_HELP_STRING([--disable-man], @@ -266,7 +296,7 @@ [enable_gprof=$enableval], [enable_gprof=no]) -dnl Pass compiler & liner flags that make builds deterministic +dnl Pass compiler & linker flags that make builds deterministic AC_ARG_ENABLE([determinism], [AS_HELP_STRING([--enable-determinism], [Enable compilation flags that make builds deterministic (default is no)])], @@ -281,8 +311,30 @@ [enable_werror=no]) AC_LANG_PUSH([C++]) + +dnl Check for a flag to turn compiler warnings into errors. This is helpful for checks which may +dnl appear to succeed because by default they merely emit warnings when they fail. +dnl +dnl Note that this is not necessarily a check to see if -Werror is supported, but rather to see if +dnl a compile with -Werror can succeed. This is important because the compiler may already be +dnl warning about something unrelated, for example about some path issue. If that is the case, +dnl -Werror cannot be used because all of those warnings would be turned into errors. AX_CHECK_COMPILE_FLAG([-Werror],[CXXFLAG_WERROR="-Werror"],[CXXFLAG_WERROR=""]) +dnl Check for a flag to turn linker warnings into errors. When flags are passed to linkers via the +dnl compiler driver using a -Wl,-foo flag, linker warnings may be swallowed rather than bubbling up. +dnl See note above, the same applies here as well. +dnl +dnl LDFLAG_WERROR Should only be used when testing -Wl,* +case $host in + *darwin*) + AX_CHECK_LINK_FLAG([-Wl,-fatal_warnings],[LDFLAG_WERROR="-Wl,-fatal_warnings"],[LDFLAG_WERROR=""]) + ;; + *) + AX_CHECK_LINK_FLAG([-Wl,--fatal-warnings],[LDFLAG_WERROR="-Wl,--fatal-warnings"],[LDFLAG_WERROR=""]) + ;; +esac + if test "x$enable_debug" = xyes; then dnl Clear default -g -O2 flags if test "x$CXXFLAGS_overridden" = xno; then @@ -336,26 +388,47 @@ if test "x$CXXFLAG_WERROR" = "x"; then AC_MSG_ERROR("enable-werror set but -Werror is not usable") fi + AX_CHECK_COMPILE_FLAG([-Werror=gnu],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=gnu"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Werror=vla],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=vla"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Werror=shadow-field],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=shadow-field"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Werror=switch],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=switch"],,[[$CXXFLAG_WERROR]]) - AX_CHECK_COMPILE_FLAG([-Werror=thread-safety-analysis],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=thread-safety-analysis"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Werror=thread-safety],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=thread-safety"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Werror=range-loop-analysis],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=range-loop-analysis"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Werror=unused-variable],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unused-variable"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Werror=date-time],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=date-time"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Werror=return-type],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=return-type"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Werror=conditional-uninitialized],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=conditional-uninitialized"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Werror=sign-compare],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=sign-compare"],,[[$CXXFLAG_WERROR]]) + dnl -Wsuggest-override is broken with GCC before 9.2 + dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78010 + AX_CHECK_COMPILE_FLAG([-Werror=suggest-override],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=suggest-override"],,[[$CXXFLAG_WERROR]], + [AC_LANG_SOURCE([[struct A { virtual void f(); }; struct B : A { void f() final; };]])]) + AX_CHECK_COMPILE_FLAG([-Werror=unreachable-code-loop-increment],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unreachable-code-loop-increment"],,[[$CXXFLAG_WERROR]]) fi if test "x$CXXFLAGS_overridden" = "xno"; then AX_CHECK_COMPILE_FLAG([-Wall],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wall"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wextra],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wextra"],,[[$CXXFLAG_WERROR]]) - AX_CHECK_COMPILE_FLAG([-Wformat],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wgnu],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wgnu"],,[[$CXXFLAG_WERROR]]) + dnl some compilers will ignore -Wformat-security without -Wformat, so just combine the two here. + AX_CHECK_COMPILE_FLAG([-Wformat -Wformat-security],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat -Wformat-security"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wvla],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wvla"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wshadow-field],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wshadow-field"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wswitch],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wswitch"],,[[$CXXFLAG_WERROR]]) - AX_CHECK_COMPILE_FLAG([-Wformat-security],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]]) - AX_CHECK_COMPILE_FLAG([-Wthread-safety-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety-analysis"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wthread-safety],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wrange-loop-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wrange-loop-analysis"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wredundant-decls],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wredundant-decls"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wunused-variable],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunused-variable"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wdate-time],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdate-time"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wconditional-uninitialized],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wconditional-uninitialized"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wsign-compare],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wsign-compare"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wduplicated-branches],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wduplicated-branches"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wduplicated-cond],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wduplicated-cond"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wlogical-op],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wlogical-op"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Woverloaded-virtual],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Woverloaded-virtual"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wsuggest-override],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wsuggest-override"],,[[$CXXFLAG_WERROR]], + [AC_LANG_SOURCE([[struct A { virtual void f(); }; struct B : A { void f() final; };]])]) + AX_CHECK_COMPILE_FLAG([-Wunreachable-code-loop-increment],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunreachable-code-loop-increment"],,[[$CXXFLAG_WERROR]]) dnl Some compilers (gcc) ignore unknown -Wno-* options, but warn about all dnl unknown options if any other warning is produced. Test the -Wfoo case, and @@ -365,8 +438,12 @@ AX_CHECK_COMPILE_FLAG([-Wunused-local-typedef],[NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-unused-local-typedef"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wdeprecated-register],[NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-deprecated-register"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough],[NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-implicit-fallthrough"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wdeprecated-copy],[NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-deprecated-copy"],,[[$CXXFLAG_WERROR]]) fi +dnl Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review. +AX_CHECK_COMPILE_FLAG([-fno-extended-identifiers],[[CXXFLAGS="$CXXFLAGS -fno-extended-identifiers"]],,[[$CXXFLAG_WERROR]]) + enable_sse42=no enable_sse41=no enable_avx2=no @@ -540,13 +617,8 @@ can_render_icons='(ImageMagick) convert' fi -use_pkgconfig=yes case $host in *mingw*) - - dnl pkgconfig does more harm than good with MinGW - use_pkgconfig=no - TARGET_OS=windows AC_CHECK_LIB([mingwthrd],[main],, AC_MSG_ERROR(libmingwthrd missing)) AC_CHECK_LIB([kernel32], [main],, AC_MSG_ERROR(libkernel32 missing)) @@ -563,7 +635,7 @@ AC_CHECK_LIB([ws2_32], [main],, AC_MSG_ERROR(libws2_32 missing)) AC_CHECK_LIB([shlwapi], [main],, AC_MSG_ERROR(libshlwapi missing)) AC_CHECK_LIB([iphlpapi], [main],, AC_MSG_ERROR(libiphlpapi missing)) - AC_CHECK_LIB([dwmapi], [main],, AC_MSG_ERROR(libdwmapi missing)) + AC_CHECK_LIB([dwmapi], [main],[have_dwmapi=yes],[have_dwmapi=no]) dnl -static is interpreted by libtool, where it has a different meaning. dnl In libtool-speak, it's -all-static. @@ -580,9 +652,6 @@ fi CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN" - if test "x$CXXFLAGS_overridden" = "xno"; then - CXXFLAGS="$CXXFLAGS -w" - fi case $host in i?86-*) WINDOWS_BITS=32 ;; x86_64-*) WINDOWS_BITS=64 ;; @@ -621,15 +690,19 @@ dnl It's safe to add these paths even if the functionality is disabled by dnl the user (--without-wallet or --without-gui for example). - bdb_prefix=$($BREW --prefix berkeley-db4 2>/dev/null) - qt5_prefix=$($BREW --prefix qt5 2>/dev/null) - if test x$bdb_prefix != x; then - CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include" - LIBS="$LIBS -L$bdb_prefix/lib" + if test "x$use_bdb" != xno && $BREW list --versions berkeley-db4 >/dev/null && test "x$BDB_CFLAGS" = "x" && test "x$BDB_LIBS" = "x"; then + bdb_prefix=$($BREW --prefix berkeley-db4 2>/dev/null) + dnl This must precede the call to BITCOIN_FIND_BDB48 below. + BDB_CFLAGS="-I$bdb_prefix/include" + BDB_LIBS="-L$bdb_prefix/lib -ldb_cxx-4.8" fi - if test x$qt5_prefix != x; then - PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH" - export PKG_CONFIG_PATH + + if test "x$use_sqlite" != xno && $BREW list --versions sqlite3 >/dev/null; then + export PKG_CONFIG_PATH="$($BREW --prefix sqlite3 2>/dev/null)/lib/pkgconfig:$PKG_CONFIG_PATH" + fi + + if $BREW list --versions qt5 >/dev/null; then + export PKG_CONFIG_PATH="$($BREW --prefix qt5 2>/dev/null)/lib/pkgconfig:$PKG_CONFIG_PATH" fi fi else @@ -638,6 +711,7 @@ BUILD_OS=darwin ;; *) + AC_PATH_TOOL([DSYMUTIL], [dsymutil], dsymutil) AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], install_name_tool) AC_PATH_TOOL([OTOOL], [otool], otool) AC_PATH_PROGS([GENISOIMAGE], [genisoimage mkisofs],genisoimage) @@ -652,7 +726,7 @@ esac fi - AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"]) + AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"],, [[$LDFLAG_WERROR]]) CPPFLAGS="$CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0" OBJCXXFLAGS="$CXXFLAGS" ;; @@ -667,16 +741,6 @@ AM_CONDITIONAL([CAN_RENDER_ICONS], [test x$can_render_icons = xyes]) -if test x$use_pkgconfig = xyes; then - m4_ifndef([PKG_PROG_PKG_CONFIG], [AC_MSG_ERROR(PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh.)]) - m4_ifdef([PKG_PROG_PKG_CONFIG], [ - PKG_PROG_PKG_CONFIG - if test x"$PKG_CONFIG" = "x"; then - AC_MSG_ERROR(pkg-config not found.) - fi - ]) -fi - if test x$use_extended_functional_tests != xno; then AC_SUBST(EXTENDED_FUNCTIONAL_TESTS, --extended) fi @@ -685,16 +749,37 @@ if test x$LCOV = x; then AC_MSG_ERROR("lcov testing requested but lcov not found") fi - if test x$GCOV = x; then - AC_MSG_ERROR("lcov testing requested but gcov not found") - fi if test x$PYTHON = x; then AC_MSG_ERROR("lcov testing requested but python not found") fi if test x$GENHTML = x; then AC_MSG_ERROR("lcov testing requested but genhtml not found") fi - LCOV="$LCOV --gcov-tool=$GCOV" + + AC_MSG_CHECKING([whether compiler is Clang]) + AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ + #if defined(__clang__) && defined(__llvm__) + // Compiler is Clang + #else + # error Compiler is not Clang + #endif + ]])],[ + AC_MSG_RESULT([yes]) + if test x$LLVM_COV = x; then + AC_MSG_ERROR([lcov testing requested but llvm-cov not found]) + fi + COV_TOOL="$LLVM_COV gcov" + ],[ + AC_MSG_RESULT([no]) + if test x$GCOV = x; then + AC_MSG_ERROR([lcov testing requested but gcov not found]) + fi + COV_TOOL="$GCOV" + ]) + AC_SUBST(COV_TOOL) + AC_SUBST(COV_TOOL_WRAPPER, "cov_tool_wrapper.sh") + LCOV="$LCOV --gcov-tool $(pwd)/$COV_TOOL_WRAPPER" + AX_CHECK_LINK_FLAG([[--coverage]], [LDFLAGS="$LDFLAGS --coverage"], [AC_MSG_ERROR("lcov testing requested but --coverage linker flag does not work")]) AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage"], @@ -739,20 +824,6 @@ AX_GCC_FUNC_ATTRIBUTE([weak_import]) if test x$use_glibc_compat != xno; then - - dnl __fdelt_chk's params and return type have changed from long unsigned int to long int. - dnl See which one is present here. - AC_MSG_CHECKING(__fdelt_chk type) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef _FORTIFY_SOURCE - #undef _FORTIFY_SOURCE - #endif - #define _FORTIFY_SOURCE 2 - #include - extern "C" long unsigned int __fdelt_warn(long unsigned int);]],[[]])], - [ fdelt_type="long unsigned int"], - [ fdelt_type="long int"]) - AC_MSG_RESULT($fdelt_type) - AC_DEFINE_UNQUOTED(FDELT_TYPE, $fdelt_type,[parameter and return value type for __fdelt_chk]) AX_CHECK_LINK_FLAG([[-Wl,--wrap=__divmoddi4]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=__divmoddi4"]) AX_CHECK_LINK_FLAG([[-Wl,--wrap=log2f]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log2f"]) case $host in @@ -795,6 +866,14 @@ AX_CHECK_COMPILE_FLAG([-Wstack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"]) AX_CHECK_COMPILE_FLAG([-fstack-protector-all],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"]) + AX_CHECK_COMPILE_FLAG([-fcf-protection=full],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fcf-protection=full"]) + + dnl stack-clash-protection does not work properly when building for Windows. + dnl We use the test case from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 + dnl to determine if it can be enabled. + AX_CHECK_COMPILE_FLAG([-fstack-clash-protection],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-clash-protection"],[],["-O0"], + [AC_LANG_SOURCE([[class D {public: unsigned char buf[32768];}; int main() {D d; return 0;}]])]) + dnl When enable_debug is yes, all optimizations are disabled. dnl However, FORTIFY_SOURCE requires that there is some level of optimization, otherwise it does nothing and just creates a compiler warning. dnl Since FORTIFY_SOURCE is a no-op without optimizations, do not enable it when enable_debug is yes. @@ -807,12 +886,12 @@ ]) fi - AX_CHECK_LINK_FLAG([[-Wl,--dynamicbase]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"]) - AX_CHECK_LINK_FLAG([[-Wl,--nxcompat]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"]) - AX_CHECK_LINK_FLAG([[-Wl,--high-entropy-va]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--high-entropy-va"]) - AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"]) - AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"]) - AX_CHECK_LINK_FLAG([[-Wl,-z,separate-code]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,separate-code"]) + AX_CHECK_LINK_FLAG([[-Wl,--dynamicbase]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"],, [[$LDFLAG_WERROR]]) + AX_CHECK_LINK_FLAG([[-Wl,--nxcompat]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"],, [[$LDFLAG_WERROR]]) + AX_CHECK_LINK_FLAG([[-Wl,--high-entropy-va]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--high-entropy-va"],, [[$LDFLAG_WERROR]]) + AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"],, [[$LDFLAG_WERROR]]) + AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"],, [[$LDFLAG_WERROR]]) + AX_CHECK_LINK_FLAG([[-Wl,-z,separate-code]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,separate-code"],, [[$LDFLAG_WERROR]]) AX_CHECK_LINK_FLAG([[-fPIE -pie]], [PIE_FLAGS="-fPIE"; HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"],, [[$CXXFLAG_WERROR]]) case $host in @@ -822,54 +901,23 @@ esac fi -dnl this flag screws up non-darwin gcc even when the check fails. special-case it. +dnl These flags are specific to ld64, and may cause issues with other linkers. +dnl For example: GNU ld will interpret -dead_strip as -de and then try and use +dnl "ad_strip" as the symbol for the entry point. if test x$TARGET_OS = xdarwin; then - AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"]) - AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"]) - AX_CHECK_LINK_FLAG([[-Wl,-bind_at_load]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-bind_at_load"]) + AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"],, [[$LDFLAG_WERROR]]) + AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"],, [[$LDFLAG_WERROR]]) + AX_CHECK_LINK_FLAG([[-Wl,-bind_at_load]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-bind_at_load"],, [[$LDFLAG_WERROR]]) fi if test x$enable_determinism = xyes; then if test x$TARGET_OS = xwindows; then - AX_CHECK_LINK_FLAG([[-Wl,--no-insert-timestamp]], [LDFLAGS="$LDFLAGS -Wl,--no-insert-timestamp"]) + AX_CHECK_LINK_FLAG([[-Wl,--no-insert-timestamp]], [LDFLAGS="$LDFLAGS -Wl,--no-insert-timestamp"],, [[$LDFLAG_WERROR]]) fi fi AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h]) -dnl FD_ZERO may be dependent on a declaration of memcpy, e.g. in SmartOS -dnl check that it fails to build without memcpy, then that it builds with -AC_MSG_CHECKING(FD_ZERO memcpy dependence) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #if HAVE_SYS_SELECT_H - #include - #endif - ]],[[ - #if HAVE_SYS_SELECT_H - fd_set fds; - FD_ZERO(&fds); - #endif - ]])], - [ AC_MSG_RESULT(no) ], - [ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #if HAVE_SYS_SELECT_H - #include - #endif - ]], [[ - #if HAVE_SYS_SELECT_H - fd_set fds; - FD_ZERO(&fds); - #endif - ]])], - [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CSTRING_DEPENDENT_FD_ZERO, 1, [Define this symbol if FD_ZERO is dependent of a memcpy declaration being available]) ], - [ AC_MSG_ERROR(failed with cstring include) ] - ) - ] -) - AC_CHECK_DECLS([getifaddrs, freeifaddrs],,, [#include #include ] @@ -907,8 +955,6 @@ [ AC_MSG_RESULT(no)] ) -AC_CHECK_FUNCS([fdatasync]) - dnl Check for malloc_info (for memory statistics information in getmemoryinfo) AC_MSG_CHECKING(for getmemoryinfo) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], @@ -925,6 +971,21 @@ [ AC_MSG_RESULT(no)] ) +AC_MSG_CHECKING(for compatible sysinfo call) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[ + struct sysinfo info; + int rv = sysinfo(&info); + unsigned long test = info.freeram + info.bufferram + info.mem_unit; + ]])], + [ + AC_MSG_RESULT(yes); + AC_DEFINE(HAVE_LINUX_SYSINFO, 1, [Define this symbol if you have a Linux-compatible sysinfo call]) + ],[ + AC_MSG_RESULT(no) + ] +) + dnl Check for posix_fallocate AC_MSG_CHECKING(for posix_fallocate) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ @@ -1021,6 +1082,9 @@ AC_MSG_RESULT($have_windows_ioprio) +dnl thread_local is currently disabled when building with glibc back compat. +dnl Our minimum supported glibc is 2.17, however support for thread_local +dnl did not arrive in glibc until 2.18. if test "x$use_thread_local" = xyes || { test "x$use_thread_local" = xauto && test "x$use_glibc_compat" = xno; }; then TEMP_LDFLAGS="$LDFLAGS" LDFLAGS="$TEMP_LDFLAGS $PTHREAD_CFLAGS" @@ -1132,13 +1196,13 @@ [ AC_MSG_RESULT(no)] ) -dnl LevelDB platform checks AC_MSG_CHECKING(for fdatasync) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ fdatasync(0); ]])], [ AC_MSG_RESULT(yes); HAVE_FDATASYNC=1 ], [ AC_MSG_RESULT(no); HAVE_FDATASYNC=0 ] ) +AC_DEFINE_UNQUOTED([HAVE_FDATASYNC], [$HAVE_FDATASYNC], [Define to 1 if fdatasync is available.]) AC_MSG_CHECKING(for F_FULLFSYNC) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], @@ -1183,18 +1247,20 @@ ]], [[ getauxval(AT_HWCAP); ]])], - [ AC_MSG_RESULT(yes); HAVE_STRONG_GETAUXVAL=1 ], + [ AC_MSG_RESULT(yes); HAVE_STRONG_GETAUXVAL=1; AC_DEFINE(HAVE_STRONG_GETAUXVAL, 1, [Define this symbol to build code that uses getauxval)]) ], [ AC_MSG_RESULT(no); HAVE_STRONG_GETAUXVAL=0 ] ) AC_MSG_CHECKING(for weak getauxval support in the compiler) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #ifdef __linux__ unsigned long getauxval(unsigned long type) __attribute__((weak)); #define AT_HWCAP 16 + #endif ]], [[ getauxval(AT_HWCAP); ]])], - [ AC_MSG_RESULT(yes); HAVE_WEAK_GETAUXVAL=1 ], + [ AC_MSG_RESULT(yes); HAVE_WEAK_GETAUXVAL=1; AC_DEFINE(HAVE_WEAK_GETAUXVAL, 1, [Define this symbol to build code that uses getauxval (weak linking)]) ], [ AC_MSG_RESULT(no); HAVE_WEAK_GETAUXVAL=0 ] ) @@ -1291,12 +1357,16 @@ AC_SUBST(LIBMEMENV) dnl SUPPRESSED_CPPFLAGS=SUPPRESS_WARNINGS([$SOME_CPPFLAGS]) -dnl Replace -I with -idirafter in $SOME_CPPFLAGS to suppress warnings from +dnl Replace -I with -isystem in $SOME_CPPFLAGS to suppress warnings from dnl headers from its include directories and return the result. -dnl See -idirafter documentation: +dnl See -isystem documentation: dnl https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html -dnl https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-idirafter-arg -AC_DEFUN([SUPPRESS_WARNINGS], [`echo $1 |sed -E -e 's/(^| )-I/\1-idirafter /g'`]) +dnl https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-isystem-directory +dnl Do not change "-I/usr/include" to "-isystem /usr/include" because that +dnl is not necessary (/usr/include is already a system directory) and because +dnl it would break GCC's #include_next. +AC_DEFUN([SUPPRESS_WARNINGS], + [$(echo $1 |${SED} -E -e 's/(^| )-I/\1-isystem /g' -e 's;-isystem /usr/include([/ ]|$);-I/usr/include\1;g')]) dnl enable-fuzz should disable all other targets if test "x$enable_fuzz" = "xyes"; then @@ -1314,11 +1384,25 @@ use_bench=no use_upnp=no use_zmq=no + + AC_MSG_CHECKING([whether main function is needed]) + AX_CHECK_LINK_FLAG( + [[-fsanitize=$use_sanitizers]], + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([yes]) + CPPFLAGS="$CPPFLAGS -DPROVIDE_MAIN_FUNCTION"], + [], + [AC_LANG_PROGRAM([[ + #include + #include + extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { return 0; } + /* unterminated comment to remove the main function ... + ]],[[]])]) else BITCOIN_QT_INIT dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus - BITCOIN_QT_CONFIGURE([$use_pkgconfig]) + BITCOIN_QT_CONFIGURE([5.5.1]) dnl Keep a copy of the original $QT_INCLUDES and use it when invoking qt's moc QT_INCLUDES_UNSUPPRESSED=$QT_INCLUDES @@ -1349,6 +1433,29 @@ if test x$enable_wallet != xno; then dnl Check for libdb_cxx only if wallet enabled BITCOIN_FIND_BDB48 + if test x$suppress_external_warnings != xno ; then + BDB_CPPFLAGS=SUPPRESS_WARNINGS($BDB_CPPFLAGS) + fi + + dnl Check for sqlite3 + if test "x$use_sqlite" != "xno"; then + PKG_CHECK_MODULES([SQLITE], [sqlite3 >= 3.7.17], [have_sqlite=yes], [have_sqlite=no]) + fi + AC_MSG_CHECKING([whether to build wallet with support for sqlite]) + if test "x$use_sqlite" = "xno"; then + use_sqlite=no + elif test "x$have_sqlite" = "xno"; then + if test "x$use_sqlite" = "xyes"; then + AC_MSG_ERROR([sqlite support requested but cannot be built. Use --without-sqlite]) + fi + use_sqlite=no + else + if test x$use_sqlite != xno; then + AC_DEFINE([USE_SQLITE],[1],[Define if sqlite support should be compiled in]) + use_sqlite=yes + fi + fi + AC_MSG_RESULT([$use_sqlite]) fi dnl Check for libminiupnpc (optional) @@ -1389,9 +1496,9 @@ if test x$use_boost = xyes; then dnl Minimum required Boost version -define(MINIMUM_REQUIRED_BOOST, 1.47.0) +define(MINIMUM_REQUIRED_BOOST, 1.58.0) -dnl Check for boost libs +dnl Check for Boost libs AX_BOOST_BASE([MINIMUM_REQUIRED_BOOST]) if test x$want_boost = xno; then AC_MSG_ERROR([[only libbitcoinconsensus can be built without boost]]) @@ -1410,30 +1517,12 @@ m4_pattern_allow(DBOOST_AC_USE_STD_ATOMIC) dnl otherwise it's treated like a macro BOOST_CPPFLAGS="-DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC $BOOST_CPPFLAGS" -if test x$use_reduce_exports = xyes; then - AC_MSG_CHECKING([for working boost reduced exports]) - TEMP_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS" - AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if BOOST_VERSION >= 104900 - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[ - AC_MSG_RESULT(yes) - ],[ - AC_MSG_ERROR([boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduce-exports.]) - ]) - CPPFLAGS="$TEMP_CPPFLAGS" -fi +BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIB" fi if test x$use_reduce_exports = xyes; then CXXFLAGS="$CXXFLAGS $RE_CXXFLAGS" - AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]], [RELDFLAGS="-Wl,--exclude-libs,ALL"]) + AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]], [RELDFLAGS="-Wl,--exclude-libs,ALL"],, [[$LDFLAG_WERROR]]) fi if test x$use_tests = xyes; then @@ -1442,7 +1531,6 @@ AC_MSG_ERROR(hexdump is required for tests) fi - if test x$use_boost = xyes; then AX_BOOST_UNIT_TEST_FRAMEWORK @@ -1468,161 +1556,112 @@ fi fi -if test x$use_boost = xyes; then - -BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIB" +dnl libevent check +if test x$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench != xnonononono; then + PKG_CHECK_MODULES([EVENT], [libevent >= 2.0.21], [use_libevent=yes], [AC_MSG_ERROR([libevent version 2.0.21 or greater not found.])]) + if test x$TARGET_OS != xwindows; then + PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads >= 2.0.21],, [AC_MSG_ERROR([libevent_pthreads version 2.0.21 or greater not found.])]) + fi +fi -dnl If boost (prior to 1.57) was built without c++11, it emulated scoped enums -dnl using c++98 constructs. Unfortunately, this implementation detail leaked into -dnl the abi. This was fixed in 1.57. - -dnl When building against that installed version using c++11, the headers pick up -dnl on the native c++11 scoped enum support and enable it, however it will fail to -dnl link. This can be worked around by disabling c++11 scoped enums if linking will -dnl fail. -dnl BOOST_NO_SCOPED_ENUMS was changed to BOOST_NO_CXX11_SCOPED_ENUMS in 1.51. - -TEMP_LIBS="$LIBS" -LIBS="$BOOST_LIBS $LIBS" -TEMP_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" -AC_MSG_CHECKING([for mismatched boost c++11 scoped enums]) -AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - #if !defined(BOOST_NO_SCOPED_ENUMS) && !defined(BOOST_NO_CXX11_SCOPED_ENUMS) && BOOST_VERSION < 105700 - #define BOOST_NO_SCOPED_ENUMS - #define BOOST_NO_CXX11_SCOPED_ENUMS - #define CHECK - #endif - #include - ]],[[ - #if defined(CHECK) - boost::filesystem::copy_file("foo", "bar"); - #else - choke; - #endif - ]])], - [AC_MSG_RESULT(mismatched); BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_SCOPED_ENUMS -DBOOST_NO_CXX11_SCOPED_ENUMS"], [AC_MSG_RESULT(ok)]) -LIBS="$TEMP_LIBS" -CPPFLAGS="$TEMP_CPPFLAGS" +dnl QR Code encoding library check +if test "x$use_qr" != xno; then + BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])]) fi -if test x$use_pkgconfig = xyes; then - : dnl - m4_ifdef( - [PKG_CHECK_MODULES], - [ - if test x$use_qr != xno; then - BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])]) - fi - if test x$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench != xnonononono; then - PKG_CHECK_MODULES([EVENT], [libevent >= 2.0.21],, [AC_MSG_ERROR(libevent version 2.0.21 or greater not found.)]) - if test x$TARGET_OS != xwindows; then - PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads >= 2.0.21],, [AC_MSG_ERROR(libevent_pthreads version 2.0.21 or greater not found.)]) - fi - fi +dnl ZMQ check - if test "x$use_zmq" = "xyes"; then - PKG_CHECK_MODULES([ZMQ],[libzmq >= 4], - [AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])], - [AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions]) - AC_MSG_WARN([libzmq version 4.x or greater not found, disabling]) - use_zmq=no]) - else - AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions]) - fi - ] - ) +if test "x$use_zmq" = xyes; then + PKG_CHECK_MODULES([ZMQ], [libzmq >= 4], + AC_DEFINE([ENABLE_ZMQ], [1], [Define to 1 to enable ZMQ functions]), + [AC_DEFINE([ENABLE_ZMQ], [0], [Define to 1 to enable ZMQ functions]) + AC_MSG_WARN([libzmq version 4.x or greater not found, disabling]) + use_zmq=no]) else + AC_DEFINE_UNQUOTED([ENABLE_ZMQ], [0], [Define to 1 to enable ZMQ functions]) +fi - if test x$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench != xnonononono; then - AC_CHECK_HEADER([event2/event.h],, AC_MSG_ERROR(libevent headers missing),) - AC_CHECK_LIB([event],[main],EVENT_LIBS=-levent,AC_MSG_ERROR(libevent missing)) - if test x$TARGET_OS != xwindows; then - AC_CHECK_LIB([event_pthreads],[main],EVENT_PTHREADS_LIBS=-levent_pthreads,AC_MSG_ERROR(libevent_pthreads missing)) - fi - fi - - if test "x$use_zmq" = "xyes"; then - AC_CHECK_HEADER([zmq.h], - [AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])], - [AC_MSG_WARN([zmq.h not found, disabling zmq support]) - use_zmq=no - AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])]) - AC_CHECK_LIB([zmq],[zmq_ctx_shutdown],ZMQ_LIBS=-lzmq, - [AC_MSG_WARN([libzmq >= 4.0 not found, disabling zmq support]) - use_zmq=no - AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])]) - else - AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions]) - fi - - if test "x$use_zmq" = "xyes"; then - dnl Assume libzmq was built for static linking - case $host in - *mingw*) - ZMQ_CFLAGS="$ZMQ_CFLAGS -DZMQ_STATIC" - ;; - esac - fi - - if test x$use_qr != xno; then - BITCOIN_QT_CHECK([AC_CHECK_LIB([qrencode], [main],[QR_LIBS=-lqrencode], [have_qrencode=no])]) - BITCOIN_QT_CHECK([AC_CHECK_HEADER([qrencode.h],, have_qrencode=no)]) - fi +if test "x$use_zmq" = xyes; then + dnl Assume libzmq was built for static linking + case $host in + *mingw*) + ZMQ_CFLAGS="$ZMQ_CFLAGS -DZMQ_STATIC" + ;; + esac fi dnl univalue check need_bundled_univalue=yes - if test x$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononononono; then need_bundled_univalue=no else - -if test x$system_univalue != xno ; then - found_univalue=no - if test x$use_pkgconfig = xyes; then - : #NOP - m4_ifdef( - [PKG_CHECK_MODULES], - [ - PKG_CHECK_MODULES([UNIVALUE],[libunivalue >= 1.0.4],[found_univalue=yes],[true]) - ] - ) - else - AC_CHECK_HEADER([univalue.h],[ - AC_CHECK_LIB([univalue], [main],[ - UNIVALUE_LIBS=-lunivalue - found_univalue=yes - ],[true]) - ],[true]) + if test x$system_univalue != xno; then + PKG_CHECK_MODULES([UNIVALUE], [libunivalue >= 1.0.4], [found_univalue=yes], [found_univalue=no]) + if test x$found_univalue = xyes; then + system_univalue=yes + need_bundled_univalue=no + elif test x$system_univalue = xyes; then + AC_MSG_ERROR([univalue not found]) + else + system_univalue=no + fi fi - if test x$found_univalue = xyes ; then - system_univalue=yes - need_bundled_univalue=no - elif test x$system_univalue = xyes ; then - AC_MSG_ERROR([univalue not found]) - else - system_univalue=no + if test x$need_bundled_univalue = xyes; then + UNIVALUE_CFLAGS='-I$(srcdir)/univalue/include' + UNIVALUE_LIBS='univalue/libunivalue.la' fi fi -if test x$need_bundled_univalue = xyes ; then - UNIVALUE_CFLAGS='-I$(srcdir)/univalue/include' - UNIVALUE_LIBS='univalue/libunivalue.la' -fi - -fi - AM_CONDITIONAL([EMBEDDED_UNIVALUE],[test x$need_bundled_univalue = xyes]) AC_SUBST(UNIVALUE_CFLAGS) AC_SUBST(UNIVALUE_LIBS) +dnl libmultiprocess library check + +libmultiprocess_found=no +if test "x$with_libmultiprocess" = xyes || test "x$with_libmultiprocess" = xauto; then + m4_ifdef([PKG_CHECK_MODULES], [PKG_CHECK_MODULES([LIBMULTIPROCESS], [libmultiprocess], [ + libmultiprocess_found=yes; + libmultiprocess_prefix=`$PKG_CONFIG --variable=prefix libmultiprocess`; + ], [true])]) +elif test "x$with_libmultiprocess" != xno; then + AC_MSG_ERROR([--with-libmultiprocess=$with_libmultiprocess value is not yes, auto, or no]) +fi +AC_SUBST(LIBMULTIPROCESS_CFLAGS) +AC_SUBST(LIBMULTIPROCESS_LIBS) + +dnl Enable multiprocess check + +if test "x$enable_multiprocess" = xyes; then + if test "x$libmultiprocess_found" != xyes; then + AC_MSG_ERROR([--enable-multiprocess=yes option specified but libmultiprocess library was not found. May need to install libmultiprocess library, or specify install path with PKG_CONFIG_PATH environment variable. Running 'pkg-config --debug libmultiprocess' may be helpful for debugging.]) + fi + build_multiprocess=yes +elif test "x$enable_multiprocess" = xauto; then + build_multiprocess=$libmultiprocess_found +else + build_multiprocess=no +fi + +AM_CONDITIONAL([BUILD_MULTIPROCESS],[test "x$build_multiprocess" = xyes]) +AM_CONDITIONAL([BUILD_BITCOIN_NODE], [test "x$build_multiprocess" = xyes]) +AM_CONDITIONAL([BUILD_BITCOIN_GUI], [test "x$build_multiprocess" = xyes]) + +dnl codegen tools check + +if test x$build_multiprocess != xno; then + if test "x$with_mpgen" = xyes || test "x$with_mpgen" = xauto; then + MPGEN_PREFIX="$libmultiprocess_prefix" + elif test "x$with_mpgen" != xno; then + MPGEN_PREFIX="$with_mpgen"; + fi + AC_SUBST(MPGEN_PREFIX) +fi + AC_MSG_CHECKING([whether to build bitcoind]) AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes]) AC_MSG_RESULT($build_bitcoind) @@ -1664,9 +1703,6 @@ fi AC_MSG_RESULT($use_ccache) fi -if test "x$use_ccache" = "xyes"; then - AX_CHECK_PREPROC_FLAG([-Qunused-arguments],[CPPFLAGS="-Qunused-arguments $CPPFLAGS"]) -fi dnl enable wallet AC_MSG_CHECKING([if wallet should be enabled]) @@ -1768,8 +1804,10 @@ AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin]) AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin]) +AM_CONDITIONAL([TARGET_LINUX], [test x$TARGET_OS = xlinux]) AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows]) AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes]) +AM_CONDITIONAL([USE_SQLITE], [test "x$use_sqlite" = "xyes"]) AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes]) AM_CONDITIONAL([ENABLE_FUZZ],[test x$enable_fuzz = xyes]) AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt = xyes]) @@ -1777,6 +1815,7 @@ AM_CONDITIONAL([ENABLE_BENCH],[test x$use_bench = xyes]) AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes]) AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes]) +AM_CONDITIONAL([USE_LIBEVENT],[test x$use_libevent = xyes]) AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes]) AM_CONDITIONAL([HAVE_IOPOLICY],[test x$have_iopolicy = xyes]) AM_CONDITIONAL([HAVE_IOPRIO_SYSCALL],[test x$have_ioprio_syscall = xyes]) @@ -1839,9 +1878,11 @@ AC_SUBST(ARM_CRC_CXXFLAGS) AC_SUBST(POWER8_CXXFLAGS) AC_SUBST(LIBTOOL_APP_LDFLAGS) +AC_SUBST(USE_SQLITE) AC_SUBST(USE_UPNP) AC_SUBST(USE_QRCODE) AC_SUBST(BOOST_LIBS) +AC_SUBST(SQLITE_LIBS) AC_SUBST(TESTDEFS) AC_SUBST(MINIUPNPC_CPPFLAGS) AC_SUBST(MINIUPNPC_LIBS) @@ -1860,6 +1901,8 @@ AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/config.ini]) AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh]) AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/Doxyfile])]) +AC_CONFIG_LINKS([contrib/devtools/security-check.py:contrib/devtools/security-check.py]) +AC_CONFIG_LINKS([contrib/devtools/test-security-check.py:contrib/devtools/test-security-check.py]) AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py]) AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py]) AC_CONFIG_LINKS([test/fuzz/test_runner.py:test/fuzz/test_runner.py]) @@ -1894,7 +1937,7 @@ fi if test x$system_libsecp256k1 = xno; then -ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --with-bignum=no --enable-module-recovery --disable-jni" +ac_configure_args="--with-bignum=no ${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --enable-module-schnorrsig --enable-experimental" AC_CONFIG_SUBDIRS([src/secp256k1]) fi @@ -1910,7 +1953,12 @@ echo echo "Options used to compile and link:" +echo " boost process = $ax_cv_boost_process" +echo " multiprocess = $build_multiprocess" echo " with wallet = $enable_wallet" +if test "x$enable_wallet" != "xno"; then + echo " with sqlite = $use_sqlite" +fi echo " with gui / qt = $bitcoin_enable_qt" if test x$bitcoin_enable_qt != xno; then echo " with qr = $use_qr" @@ -1932,10 +1980,10 @@ echo " build os = $build_os" echo echo " CC = $CC" -echo " CFLAGS = $CFLAGS" +echo " CFLAGS = $PTHREAD_CFLAGS $CFLAGS" echo " CPPFLAGS = $DEBUG_CPPFLAGS $HARDENED_CPPFLAGS $CPPFLAGS" echo " CXX = $CXX" echo " CXXFLAGS = $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOWARN_CXXFLAGS $ERROR_CXXFLAGS $GPROF_CXXFLAGS $CXXFLAGS" -echo " LDFLAGS = $PTHREAD_CFLAGS $HARDENED_LDFLAGS $GPROF_LDFLAGS $LDFLAGS" +echo " LDFLAGS = $PTHREAD_LIBS $HARDENED_LDFLAGS $GPROF_LDFLAGS $LDFLAGS" echo " ARFLAGS = $ARFLAGS" echo diff -Nru bitcoin-0.20.1.knots20200815/contrib/devtools/circular-dependencies.py bitcoin-0.21.0.knots20210130/contrib/devtools/circular-dependencies.py --- bitcoin-0.20.1.knots20200815/contrib/devtools/circular-dependencies.py 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/devtools/circular-dependencies.py 2021-01-30 05:16:37.000000000 +0000 @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2018 The Bitcoin Core developers +# Copyright (c) 2018-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff -Nru bitcoin-0.20.1.knots20200815/contrib/devtools/copyright_header.py bitcoin-0.21.0.knots20210130/contrib/devtools/copyright_header.py --- bitcoin-0.20.1.knots20200815/contrib/devtools/copyright_header.py 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/devtools/copyright_header.py 2021-01-30 05:16:37.000000000 +0000 @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2016-2019 The Bitcoin Core developers +# Copyright (c) 2016-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -22,6 +22,7 @@ 'src/reverse_iterator.h', 'src/test/fuzz/FuzzedDataProvider.h', 'src/tinyformat.h', + 'src/bench/nanobench.h', 'test/functional/test_framework/bignum.py', # python init: '*__init__.py', diff -Nru bitcoin-0.20.1.knots20200815/contrib/devtools/optimize-pngs.py bitcoin-0.21.0.knots20210130/contrib/devtools/optimize-pngs.py --- bitcoin-0.20.1.knots20200815/contrib/devtools/optimize-pngs.py 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/devtools/optimize-pngs.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2014-2018 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. -''' -Run this script every time you change one of the png files. Using pngcrush, it will optimize the png files, remove various color profiles, remove ancillary chunks (alla) and text chunks (text). -#pngcrush -brute -ow -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text -''' -import os -import sys -import subprocess -import hashlib -from PIL import Image # pip3 install Pillow - -def file_hash(filename): - '''Return hash of raw file contents''' - with open(filename, 'rb') as f: - return hashlib.sha256(f.read()).hexdigest() - -def content_hash(filename): - '''Return hash of RGBA contents of image''' - i = Image.open(filename) - i = i.convert('RGBA') - data = i.tobytes() - return hashlib.sha256(data).hexdigest() - -pngcrush = 'pngcrush' -git = 'git' -folders = ["src/qt/res/movies", "src/qt/res/icons", "share/pixmaps"] -basePath = subprocess.check_output([git, 'rev-parse', '--show-toplevel'], universal_newlines=True, encoding='utf8').rstrip('\n') -totalSaveBytes = 0 -noHashChange = True - -outputArray = [] -for folder in folders: - absFolder=os.path.join(basePath, folder) - for file in os.listdir(absFolder): - extension = os.path.splitext(file)[1] - if extension.lower() == '.png': - print("optimizing {}...".format(file), end =' ') - file_path = os.path.join(absFolder, file) - fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)} - fileMetaMap['contentHashPre'] = content_hash(file_path) - - try: - subprocess.call([pngcrush, "-brute", "-ow", "-rem", "gAMA", "-rem", "cHRM", "-rem", "iCCP", "-rem", "sRGB", "-rem", "alla", "-rem", "text", file_path], - stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) - except: - print("pngcrush is not installed, aborting...") - sys.exit(0) - - #verify - if "Not a PNG file" in subprocess.check_output([pngcrush, "-n", "-v", file_path], stderr=subprocess.STDOUT, universal_newlines=True, encoding='utf8'): - print("PNG file "+file+" is corrupted after crushing, check out pngcursh version") - sys.exit(1) - - fileMetaMap['sha256New'] = file_hash(file_path) - fileMetaMap['contentHashPost'] = content_hash(file_path) - - if fileMetaMap['contentHashPre'] != fileMetaMap['contentHashPost']: - print("Image contents of PNG file {} before and after crushing don't match".format(file)) - sys.exit(1) - - fileMetaMap['psize'] = os.path.getsize(file_path) - outputArray.append(fileMetaMap) - print("done") - -print("summary:\n+++++++++++++++++") -for fileDict in outputArray: - oldHash = fileDict['sha256Old'] - newHash = fileDict['sha256New'] - totalSaveBytes += fileDict['osize'] - fileDict['psize'] - noHashChange = noHashChange and (oldHash == newHash) - print(fileDict['file']+"\n size diff from: "+str(fileDict['osize'])+" to: "+str(fileDict['psize'])+"\n old sha256: "+oldHash+"\n new sha256: "+newHash+"\n") - -print("completed. Checksum stable: "+str(noHashChange)+". Total reduction: "+str(totalSaveBytes)+" bytes") diff -Nru bitcoin-0.20.1.knots20200815/contrib/devtools/previous_release.sh bitcoin-0.21.0.knots20210130/contrib/devtools/previous_release.sh --- bitcoin-0.20.1.knots20200815/contrib/devtools/previous_release.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/devtools/previous_release.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,152 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2018-2019 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. -# -# Build previous releases. - -export LC_ALL=C - -CONFIG_FLAGS="" -FUNCTIONAL_TESTS=0 -DELETE_EXISTING=0 -USE_DEPENDS=0 -DOWNLOAD_BINARY=0 -CONFIG_FLAGS="" -TARGET="releases" - -while getopts ":hfrdbt:" opt; do - case $opt in - h) - echo "Usage: .previous_release.sh [options] tag1 tag2" - echo " options:" - echo " -h Print this message" - echo " -f Configure for functional tests" - echo " -r Remove existing directory" - echo " -d Use depends" - echo " -b Download release binary" - echo " -t Target directory (default: releases)" - exit 0 - ;; - f) - FUNCTIONAL_TESTS=1 - CONFIG_FLAGS="$CONFIG_FLAGS --without-gui --disable-tests --disable-bench" - ;; - r) - DELETE_EXISTING=1 - ;; - d) - USE_DEPENDS=1 - ;; - b) - DOWNLOAD_BINARY=1 - ;; - t) - TARGET=$OPTARG - ;; - \?) - echo "Invalid option: -$OPTARG" >&2 - exit 1 - ;; - esac -done - -shift $((OPTIND-1)) - -if [ -z "$1" ]; then - echo "Specify release tag(s), e.g.: .previous_release v0.15.1" - exit 1 -fi - -if [ ! -d "$TARGET" ]; then - mkdir -p $TARGET -fi - -if [ "$DOWNLOAD_BINARY" -eq "1" ]; then - HOST="${HOST:-$(./depends/config.guess)}" - case "$HOST" in - x86_64-*-linux*) - PLATFORM=x86_64-linux-gnu - ;; - x86_64-apple-darwin*) - PLATFORM=osx64 - ;; - *) - echo "Not sure which binary to download for $HOST." - exit 1 - ;; - esac -fi - -echo "Releases directory: $TARGET" -pushd "$TARGET" || exit 1 -{ - for tag in "$@" - do - if [ "$DELETE_EXISTING" -eq "1" ]; then - if [ -d "$tag" ]; then - rm -r "$tag" - fi - fi - - if [ "$DOWNLOAD_BINARY" -eq "0" ]; then - - if [ ! -d "$tag" ]; then - if [ -z $(git tag -l "$tag") ]; then - echo "Tag $tag not found" - exit 1 - fi - - git clone https://github.com/bitcoin/bitcoin "$tag" - pushd "$tag" || exit 1 - { - git checkout "$tag" - if [ "$USE_DEPENDS" -eq "1" ]; then - pushd depends || exit 1 - { - if [ "$FUNCTIONAL_TESTS" -eq "1" ]; then - make NO_QT=1 - else - make - fi - HOST="${HOST:-$(./config.guess)}" - } - popd || exit 1 - CONFIG_FLAGS="--prefix=$PWD/depends/$HOST $CONFIG_FLAGS" - fi - ./autogen.sh - ./configure $CONFIG_FLAGS - make - # Move binaries, so they're in the same place as in the release download: - mkdir bin - mv src/bitcoind src/bitcoin-cli src/bitcoin-tx bin - if [ "$FUNCTIONAL_TESTS" -eq "0" ]; then - mv src/qt/bitcoin-qt bin - fi - } - popd || exit 1 - fi - else - if [ -d "$tag" ]; then - echo "Using cached $tag" - else - mkdir "$tag" - if [[ "$tag" =~ v(.*)(rc[0-9]+)$ ]]; then - BIN_PATH="bin/bitcoin-core-${BASH_REMATCH[1]}/test.${BASH_REMATCH[2]}" - else - BIN_PATH="bin/bitcoin-core-${tag:1}" - fi - URL="https://bitcoin.org/$BIN_PATH/bitcoin-${tag:1}-$PLATFORM.tar.gz" - echo "Fetching: $URL" - if ! curl -O -f $URL; then - echo "Download failed." - exit 1 - fi - tar -zxf "bitcoin-${tag:1}-$PLATFORM.tar.gz" -C "$tag" --strip-components=1 "bitcoin-${tag:1}" - rm "bitcoin-${tag:1}-$PLATFORM.tar.gz" - fi - fi - done -} -popd || exit 1 diff -Nru bitcoin-0.20.1.knots20200815/contrib/devtools/README.md bitcoin-0.21.0.knots20210130/contrib/devtools/README.md --- bitcoin-0.20.1.knots20200815/contrib/devtools/README.md 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/devtools/README.md 2021-01-30 05:16:37.000000000 +0000 @@ -89,12 +89,6 @@ BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh ``` -optimize-pngs.py -================ - -A script to optimize png files in the bitcoin -repository (requires pngcrush). - security-check.py and test-security-check.py ============================================ diff -Nru bitcoin-0.20.1.knots20200815/contrib/devtools/security-check.py bitcoin-0.21.0.knots20210130/contrib/devtools/security-check.py --- bitcoin-0.20.1.knots20200815/contrib/devtools/security-check.py 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/devtools/security-check.py 2021-01-30 05:16:37.000000000 +0000 @@ -11,34 +11,46 @@ import subprocess import sys import os +import re + +from typing import List, Optional READELF_CMD = os.getenv('READELF', '/usr/bin/readelf') OBJDUMP_CMD = os.getenv('OBJDUMP', '/usr/bin/objdump') OTOOL_CMD = os.getenv('OTOOL', '/usr/bin/otool') -NONFATAL = {} # checks which are non-fatal for now but only generate a warning -def check_ELF_PIE(executable): +def run_command(command) -> str: + p = subprocess.run(command, stdout=subprocess.PIPE, check=True, universal_newlines=True) + return p.stdout + +def get_ELF_header(executable): + stdout = run_command([READELF_CMD, '-h', '-W', executable]) + out = {} + for line in stdout.splitlines(): + m = re.match(r'^\s*([^:]+)\:\s*(.*?)(?:\s+\([^()]+\))?$', line) + if not m: + continue + key, val = m.groups() + out[key] = val + return out + +def check_ELF_PIE(executable) -> bool: ''' Check for position independent executable (PIE), allowing for address space randomization. ''' - p = subprocess.Popen([READELF_CMD, '-h', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) - (stdout, stderr) = p.communicate() - if p.returncode: - raise IOError('Error opening file') + stdout = run_command([READELF_CMD, '-h', '-W', executable]) ok = False for line in stdout.splitlines(): - line = line.split() - if len(line)>=2 and line[0] == 'Type:' and line[1] == 'DYN': + tokens = line.split() + if len(line)>=2 and tokens[0] == 'Type:' and tokens[1] == 'DYN': ok = True return ok def get_ELF_program_headers(executable): '''Return type and flags for ELF program headers''' - p = subprocess.Popen([READELF_CMD, '-l', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) - (stdout, stderr) = p.communicate() - if p.returncode: - raise IOError('Error opening file') + stdout = run_command([READELF_CMD, '-l', '-W', executable]) + in_headers = False headers = [] for line in stdout.splitlines(): @@ -62,7 +74,7 @@ splitline = [x.strip() for x in line.split()] flags = splitline[ofs_flags] # check for 'R', ' E' - if splitline[ofs_flags + 1] is 'E': + if splitline[ofs_flags + 1] == 'E': flags += ' E' headers.append((typ, flags, [])) count += 1 @@ -85,7 +97,7 @@ count += 1 return headers -def check_ELF_NX(executable): +def check_ELF_NX(executable) -> bool: ''' Check that no sections are writable and executable (including the stack) ''' @@ -98,7 +110,7 @@ have_wx = True return have_gnu_stack and not have_wx -def check_ELF_RELRO(executable): +def check_ELF_RELRO(executable) -> bool: ''' Check for read-only relocations. GNU_RELRO program header must exist @@ -107,7 +119,8 @@ have_gnu_relro = False for (typ, flags, _) in get_ELF_program_headers(executable): # Note: not checking flags == 'R': here as linkers set the permission differently - # This does not affect security: the permission flags of the GNU_RELRO program header are ignored, the PT_LOAD header determines the effective permissions. + # This does not affect security: the permission flags of the GNU_RELRO program + # header are ignored, the PT_LOAD header determines the effective permissions. # However, the dynamic linker need to write to this area so these are RW. # Glibc itself takes care of mprotecting this area R after relocations are finished. # See also https://marc.info/?l=binutils&m=1498883354122353 @@ -115,24 +128,20 @@ have_gnu_relro = True have_bindnow = False - p = subprocess.Popen([READELF_CMD, '-d', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) - (stdout, stderr) = p.communicate() - if p.returncode: - raise IOError('Error opening file') + stdout = run_command([READELF_CMD, '-d', '-W', executable]) + for line in stdout.splitlines(): tokens = line.split() if len(tokens)>1 and tokens[1] == '(BIND_NOW)' or (len(tokens)>2 and tokens[1] == '(FLAGS)' and 'BIND_NOW' in tokens[2:]): have_bindnow = True return have_gnu_relro and have_bindnow -def check_ELF_Canary(executable): +def check_ELF_Canary(executable) -> bool: ''' Check for use of stack canary ''' - p = subprocess.Popen([READELF_CMD, '--dyn-syms', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) - (stdout, stderr) = p.communicate() - if p.returncode: - raise IOError('Error opening file') + stdout = run_command([READELF_CMD, '--dyn-syms', '-W', executable]) + ok = False for line in stdout.splitlines(): if '__stack_chk_fail' in line: @@ -148,6 +157,7 @@ EXPECTED_FLAGS = { # Read + execute '.init': 'R E', + '.plt': 'R E', '.plt.got': 'R E', '.plt.sec': 'R E', '.text': 'R E', @@ -178,6 +188,9 @@ '.data': 'RW', '.bss': 'RW', } + if get_ELF_header(executable).get('Machine') == 'PowerPC64': + # .plt is RW on ppc64 even with separate-code + EXPECTED_FLAGS['.plt'] = 'RW' # For all LOAD program headers get mapping to the list of sections, # and for each section, remember the flags of the associated program header. flags_per_section = {} @@ -194,21 +207,23 @@ return False return True -def get_PE_dll_characteristics(executable): +def get_PE_dll_characteristics(executable) -> int: + '''Get PE DllCharacteristics bits''' + return get_PE_dll_arch_and_characteristics(executable)[1] + +def get_PE_dll_arch_and_characteristics(executable): ''' Get PE DllCharacteristics bits. Returns a tuple (arch,bits) where arch is 'i386:x86-64' or 'i386' and bits is the DllCharacteristics value. ''' - p = subprocess.Popen([OBJDUMP_CMD, '-x', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) - (stdout, stderr) = p.communicate() - if p.returncode: - raise IOError('Error opening file') + stdout = run_command([OBJDUMP_CMD, '-x', executable]) + arch = '' bits = 0 for line in stdout.splitlines(): tokens = line.split() - if len(tokens)>=2 and tokens[0] == 'architecture:': + if len(tokens) >= 2 and tokens[0] == 'architecture:': arch = tokens[1].rstrip(',') if len(tokens)>=2 and tokens[0] == 'DllCharacteristics': bits = int(tokens[1],16) @@ -218,17 +233,17 @@ IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE = 0x0040 IMAGE_DLL_CHARACTERISTICS_NX_COMPAT = 0x0100 -def check_PE_DYNAMIC_BASE(executable): +def check_PE_DYNAMIC_BASE(executable) -> bool: '''PIE: DllCharacteristics bit 0x40 signifies dynamicbase (ASLR)''' - (arch,bits) = get_PE_dll_characteristics(executable) - reqbits = IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE - return (bits & reqbits) == reqbits + bits = get_PE_dll_characteristics(executable) + return (bits & IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE) == IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE -# On 64 bit, must support high-entropy 64-bit address space layout randomization in addition to DYNAMIC_BASE -# to have secure ASLR. -def check_PE_HIGH_ENTROPY_VA(executable): +# (64-bit only:) +# Must support high-entropy 64-bit address space layout randomization +# in addition to DYNAMIC_BASE to have secure ASLR. +def check_PE_HIGH_ENTROPY_VA(executable) -> bool: '''PIE: DllCharacteristics bit 0x20 signifies high-entropy ASLR''' - (arch,bits) = get_PE_dll_characteristics(executable) + (arch,bits) = get_PE_dll_arch_and_characteristics(executable) if arch == 'i386:x86-64': reqbits = IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA else: # Unnecessary on 32-bit @@ -236,16 +251,22 @@ reqbits = 0 return (bits & reqbits) == reqbits -def check_PE_NX(executable): +def check_PE_RELOC_SECTION(executable) -> bool: + '''Check for a reloc section. This is required for functional ASLR.''' + stdout = run_command([OBJDUMP_CMD, '-h', executable]) + + for line in stdout.splitlines(): + if '.reloc' in line: + return True + return False + +def check_PE_NX(executable) -> bool: '''NX: DllCharacteristics bit 0x100 signifies nxcompat (DEP)''' - (arch,bits) = get_PE_dll_characteristics(executable) + bits = get_PE_dll_characteristics(executable) return (bits & IMAGE_DLL_CHARACTERISTICS_NX_COMPAT) == IMAGE_DLL_CHARACTERISTICS_NX_COMPAT -def get_MACHO_executable_flags(executable): - p = subprocess.Popen([OTOOL_CMD, '-vh', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) - (stdout, stderr) = p.communicate() - if p.returncode: - raise IOError('Error opening file') +def get_MACHO_executable_flags(executable) -> List[str]: + stdout = run_command([OTOOL_CMD, '-vh', executable]) flags = [] for line in stdout.splitlines(): @@ -289,10 +310,7 @@ Check for no lazy bindings. We don't use or check for MH_BINDATLOAD. See #18295. ''' - p = subprocess.Popen([OTOOL_CMD, '-l', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) - (stdout, stderr) = p.communicate() - if p.returncode: - raise IOError('Error opening file') + stdout = run_command([OTOOL_CMD, '-l', executable]) for line in stdout.splitlines(): tokens = line.split() @@ -301,6 +319,18 @@ return False return True +def check_MACHO_Canary(executable) -> bool: + ''' + Check for use of stack canary + ''' + stdout = run_command([OTOOL_CMD, '-Iv', executable]) + + ok = False + for line in stdout.splitlines(): + if '___stack_chk_fail' in line: + ok = True + return ok + CHECKS = { 'ELF': [ ('PIE', check_ELF_PIE), @@ -312,17 +342,19 @@ 'PE': [ ('DYNAMIC_BASE', check_PE_DYNAMIC_BASE), ('HIGH_ENTROPY_VA', check_PE_HIGH_ENTROPY_VA), - ('NX', check_PE_NX) + ('NX', check_PE_NX), + ('RELOC_SECTION', check_PE_RELOC_SECTION) ], 'MACHO': [ ('PIE', check_MACHO_PIE), ('NOUNDEFS', check_MACHO_NOUNDEFS), ('NX', check_MACHO_NX), - ('LAZY_BINDINGS', check_MACHO_LAZY_BINDINGS) + ('LAZY_BINDINGS', check_MACHO_LAZY_BINDINGS), + ('Canary', check_MACHO_Canary) ] } -def identify_executable(executable): +def identify_executable(executable) -> Optional[str]: with open(filename, 'rb') as f: magic = f.read(4) if magic.startswith(b'MZ'): @@ -344,18 +376,12 @@ continue failed = [] - warning = [] for (name, func) in CHECKS[etype]: if not func(filename): - if name in NONFATAL: - warning.append(name) - else: - failed.append(name) + failed.append(name) if failed: print('%s: failed %s' % (filename, ' '.join(failed))) retval = 1 - if warning: - print('%s: warning %s' % (filename, ' '.join(warning))) except IOError: print('%s: cannot open' % filename) retval = 1 diff -Nru bitcoin-0.20.1.knots20200815/contrib/devtools/test_deterministic_coverage.sh bitcoin-0.21.0.knots20210130/contrib/devtools/test_deterministic_coverage.sh --- bitcoin-0.20.1.knots20200815/contrib/devtools/test_deterministic_coverage.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/devtools/test_deterministic_coverage.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # @@ -16,7 +16,6 @@ NON_DETERMINISTIC_TESTS=( "blockfilter_index_tests/blockfilter_index_initial_sync" # src/checkqueue.h: In CCheckQueue::Loop(): while (queue.empty()) { ... } "coinselector_tests/knapsack_solver_test" # coinselector_tests.cpp: if (equal_sets(setCoinsRet, setCoinsRet2)) - "denialofservice_tests/DoS_mapOrphans" # denialofservice_tests.cpp: it = mapOrphanTransactions.lower_bound(InsecureRand256()); "fs_tests/fsbridge_fstream" # deterministic test failure? "miner_tests/CreateNewBlock_validity" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) "scheduler_tests/manythreads" # scheduler.cpp: CScheduler::serviceQueue() diff -Nru bitcoin-0.20.1.knots20200815/contrib/devtools/test-security-check.py bitcoin-0.21.0.knots20210130/contrib/devtools/test-security-check.py --- bitcoin-0.20.1.knots20200815/contrib/devtools/test-security-check.py 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/devtools/test-security-check.py 2021-01-30 05:16:37.000000000 +0000 @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2015-2019 The Bitcoin Core developers +# Copyright (c) 2015-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' @@ -20,15 +20,12 @@ ''') def call_security_check(cc, source, executable, options): - subprocess.check_call([cc,source,'-o',executable] + options) - p = subprocess.Popen(['./security-check.py',executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) - (stdout, stderr) = p.communicate() - return (p.returncode, stdout.rstrip()) + subprocess.run([cc,source,'-o',executable] + options, check=True) + p = subprocess.run(['./contrib/devtools/security-check.py',executable], stdout=subprocess.PIPE, universal_newlines=True) + return (p.returncode, p.stdout.rstrip()) class TestSecurityChecks(unittest.TestCase): def test_ELF(self): - import traceback - traceback.print_backtrace() source = 'test1.c' executable = 'test1' cc = 'gcc' @@ -53,25 +50,30 @@ cc = 'i686-w64-mingw32-gcc' write_testcode(source) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--no-nxcompat','-Wl,--no-dynamicbase']), - (1, executable+': failed DYNAMIC_BASE NX')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--no-dynamicbase']), - (1, executable+': failed DYNAMIC_BASE')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase']), - (0, '')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--no-nxcompat','-Wl,--no-dynamicbase','-no-pie','-fno-PIE']), + (1, executable+': failed DYNAMIC_BASE NX RELOC_SECTION')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--no-dynamicbase','-no-pie','-fno-PIE']), + (1, executable+': failed DYNAMIC_BASE RELOC_SECTION')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-no-pie','-fno-PIE']), + (1, executable+': failed RELOC_SECTION')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-pie','-fPIE']), + (0, '')) + def test_PE(self): source = 'test1.c' executable = 'test1.exe' cc = 'x86_64-w64-mingw32-gcc' write_testcode(source) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--no-nxcompat','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va']), - (1, executable+': failed DYNAMIC_BASE HIGH_ENTROPY_VA NX')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va']), - (1, executable+': failed DYNAMIC_BASE HIGH_ENTROPY_VA')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-Wl,--no-high-entropy-va']), - (1, executable+': failed HIGH_ENTROPY_VA')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-Wl,--high-entropy-va']), + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--no-nxcompat','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va','-no-pie','-fno-PIE']), + (1, executable+': failed DYNAMIC_BASE HIGH_ENTROPY_VA NX RELOC_SECTION')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va','-no-pie','-fno-PIE']), + (1, executable+': failed DYNAMIC_BASE HIGH_ENTROPY_VA RELOC_SECTION')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-Wl,--no-high-entropy-va','-no-pie','-fno-PIE']), + (1, executable+': failed HIGH_ENTROPY_VA RELOC_SECTION')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-Wl,--high-entropy-va','-no-pie','-fno-PIE']), + (1, executable+': failed RELOC_SECTION')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-Wl,--high-entropy-va','-pie','-fPIE']), (0, '')) def test_MACHO(self): @@ -80,13 +82,17 @@ cc = 'clang' write_testcode(source) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace', '-Wl,-allow_stack_execute']), - (1, executable+': failed PIE NOUNDEFS NX')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace']), - (1, executable+': failed PIE NOUNDEFS')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie']), + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector']), + (1, executable+': failed PIE NOUNDEFS NX LAZY_BINDINGS Canary')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fstack-protector-all']), + (1, executable+': failed PIE NOUNDEFS NX LAZY_BINDINGS')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-fstack-protector-all']), + (1, executable+': failed PIE NOUNDEFS LAZY_BINDINGS')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all']), + (1, executable+': failed PIE LAZY_BINDINGS')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all']), (1, executable+': failed PIE')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie']), + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-Wl,-bind_at_load','-fstack-protector-all']), (0, '')) if __name__ == '__main__': diff -Nru bitcoin-0.20.1.knots20200815/contrib/filter-lcov.py bitcoin-0.21.0.knots20210130/contrib/filter-lcov.py --- bitcoin-0.20.1.knots20200815/contrib/filter-lcov.py 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/filter-lcov.py 2021-01-30 05:16:37.000000000 +0000 @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2017-2018 The Bitcoin Core developers +# Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff -Nru bitcoin-0.20.1.knots20200815/contrib/gitian-build.py bitcoin-0.21.0.knots20210130/contrib/gitian-build.py --- bitcoin-0.20.1.knots20200815/contrib/gitian-build.py 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/gitian-build.py 2021-01-30 05:16:37.000000000 +0000 @@ -209,7 +209,7 @@ args.macos = 'm' in args.os # Disable for MacOS if no SDK found - if args.macos and not os.path.isfile('gitian-builder/inputs/MacOSX10.14.sdk.tar.gz'): + if args.macos and not os.path.isfile('gitian-builder/inputs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz'): print('Cannot build for MacOS, SDK does not exist. Will build for other OSes') args.macos = False diff -Nru bitcoin-0.20.1.knots20200815/contrib/gitian-descriptors/gitian-linux.yml bitcoin-0.21.0.knots20210130/contrib/gitian-descriptors/gitian-linux.yml --- bitcoin-0.20.1.knots20200815/contrib/gitian-descriptors/gitian-linux.yml 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/gitian-descriptors/gitian-linux.yml 2021-01-30 05:16:37.000000000 +0000 @@ -1,5 +1,5 @@ --- -name: "bitcoin-core-linux-0.20" +name: "bitcoin-core-linux-0.21" enable_cache: true distro: "ubuntu" suites: @@ -7,40 +7,41 @@ architectures: - "amd64" packages: +# Common dependencies. +- "autoconf" +- "automake" +- "binutils" +- "bsdmainutils" +- "ca-certificates" - "curl" -- "g++-aarch64-linux-gnu" -- "g++-8-aarch64-linux-gnu" -- "gcc-8-aarch64-linux-gnu" -- "binutils-aarch64-linux-gnu" -- "g++-arm-linux-gnueabihf" -- "g++-8-arm-linux-gnueabihf" -- "gcc-8-arm-linux-gnueabihf" -- "binutils-arm-linux-gnueabihf" -- "g++-8-powerpc64-linux-gnu" -- "gcc-8-powerpc64-linux-gnu" -- "binutils-powerpc64-linux-gnu" -- "g++-8-powerpc64le-linux-gnu" -- "gcc-8-powerpc64le-linux-gnu" -- "binutils-powerpc64le-linux-gnu" -- "g++-riscv64-linux-gnu" -- "g++-8-riscv64-linux-gnu" -- "gcc-8-riscv64-linux-gnu" -- "binutils-riscv64-linux-gnu" -- "g++-8-multilib" -- "gcc-8-multilib" -- "binutils-gold" +- "faketime" - "git" - "icnsutils" - "imagemagick" - "librsvg2-bin" -- "pkg-config" -- "autoconf" - "libtool" -- "automake" -- "faketime" -- "bsdmainutils" -- "ca-certificates" +- "patch" +- "pkg-config" - "python3" +# Cross compilation HOSTS: +# - i686-pc-linux-gnu +- "gcc-8-multilib" +- "g++-8-multilib" +# - arm-linux-gnueabihf +- "binutils-arm-linux-gnueabihf" +- "g++-8-arm-linux-gnueabihf" +# - aarch64-linux-gnu +- "binutils-aarch64-linux-gnu" +- "g++-8-aarch64-linux-gnu" +# - powerpc64-linux-gnu +- "binutils-powerpc64-linux-gnu" +- "g++-8-powerpc64-linux-gnu" +# - powerpc64le-linux-gnu +- "binutils-powerpc64le-linux-gnu" +- "g++-8-powerpc64le-linux-gnu" +# - riscv64-linux-gnu +- "binutils-riscv64-linux-gnu" +- "g++-8-riscv64-linux-gnu" remotes: - "url": "https://github.com/bitcoin/bitcoin.git" "dir": "bitcoin" @@ -164,6 +165,7 @@ # Create the release tarball using (arbitrarily) the first host mkdir -p "$(dirname "$GIT_ARCHIVE")" CONFIG_SITE="${BASEPREFIX}/${HOSTS/ */}/share/config.site" \ + REFERENCE_DATETIME="${REFERENCE_DATETIME}" \ contrib/gitian-descriptors/make_release_tarball "${GIT_ARCHIVE}" ORIGPATH="$PATH" @@ -174,7 +176,7 @@ cd distsrc-${i} INSTALLPATH="${PWD}/installed/${DISTNAME}" mkdir -p ${INSTALLPATH} - tar --strip-components=1 -xf $GIT_ARCHIVE + tar --strip-components=1 -xf "${GIT_ARCHIVE}" CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}" make ${MAKEOPTS} diff -Nru bitcoin-0.20.1.knots20200815/contrib/gitian-descriptors/gitian-osx-signer.yml bitcoin-0.21.0.knots20210130/contrib/gitian-descriptors/gitian-osx-signer.yml --- bitcoin-0.20.1.knots20200815/contrib/gitian-descriptors/gitian-osx-signer.yml 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/gitian-descriptors/gitian-osx-signer.yml 2021-01-30 05:16:37.000000000 +0000 @@ -26,7 +26,7 @@ echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${prog} echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog} - echo "\$REAL \$@" >> $WRAP_DIR/${prog} + echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${prog} chmod +x ${WRAP_DIR}/${prog} done diff -Nru bitcoin-0.20.1.knots20200815/contrib/gitian-descriptors/gitian-osx.yml bitcoin-0.21.0.knots20210130/contrib/gitian-descriptors/gitian-osx.yml --- bitcoin-0.20.1.knots20200815/contrib/gitian-descriptors/gitian-osx.yml 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/gitian-descriptors/gitian-osx.yml 2021-01-30 05:16:37.000000000 +0000 @@ -1,5 +1,5 @@ --- -name: "bitcoin-core-osx-0.20" +name: "bitcoin-core-osx-0.21" enable_cache: true distro: "ubuntu" suites: @@ -33,7 +33,7 @@ - "url": "https://github.com/bitcoin/bitcoin.git" "dir": "bitcoin" files: -- "MacOSX10.14.sdk.tar.gz" +- "Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz" script: | set -e -o pipefail @@ -63,7 +63,7 @@ echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog} - echo "\$REAL \$@" >> $WRAP_DIR/${prog} + echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${prog} chmod +x ${WRAP_DIR}/${prog} done } @@ -75,7 +75,7 @@ echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${i}-${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog} - echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog} + echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${i}-${prog} chmod +x ${WRAP_DIR}/${i}-${prog} done done @@ -91,7 +91,7 @@ BASEPREFIX="${PWD}/depends" mkdir -p ${BASEPREFIX}/SDKs - tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.14.sdk.tar.gz + tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz # Build dependencies for each host for i in $HOSTS; do @@ -113,6 +113,7 @@ # Create the release tarball using (arbitrarily) the first host mkdir -p "$(dirname "$GIT_ARCHIVE")" CONFIG_SITE="${BASEPREFIX}/${HOSTS/ */}/share/config.site" \ + REFERENCE_DATETIME="${REFERENCE_DATETIME}" \ contrib/gitian-descriptors/make_release_tarball "${GIT_ARCHIVE}" ORIGPATH="$PATH" @@ -123,7 +124,7 @@ cd distsrc-${i} INSTALLPATH="${PWD}/installed/${DISTNAME}" mkdir -p ${INSTALLPATH} - tar --strip-components=1 -xf $GIT_ARCHIVE + tar --strip-components=1 -xf "${GIT_ARCHIVE}" CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} make ${MAKEOPTS} diff -Nru bitcoin-0.20.1.knots20200815/contrib/gitian-descriptors/gitian-win.yml bitcoin-0.21.0.knots20210130/contrib/gitian-descriptors/gitian-win.yml --- bitcoin-0.20.1.knots20200815/contrib/gitian-descriptors/gitian-win.yml 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/gitian-descriptors/gitian-win.yml 2021-01-30 05:16:37.000000000 +0000 @@ -1,5 +1,5 @@ --- -name: "bitcoin-core-win-0.20" +name: "bitcoin-core-win-0.21" enable_cache: true distro: "ubuntu" suites: @@ -59,7 +59,7 @@ echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog} - echo "\$REAL \$@" >> $WRAP_DIR/${prog} + echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${prog} chmod +x ${WRAP_DIR}/${prog} done } @@ -71,7 +71,7 @@ echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${i}-${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog} - echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog} + echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${i}-${prog} chmod +x ${WRAP_DIR}/${i}-${prog} done done @@ -85,7 +85,7 @@ echo "REAL=\`which -a ${i}-${prog}-posix | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${i}-${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog} - echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog} + echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${i}-${prog} chmod +x ${WRAP_DIR}/${i}-${prog} done done @@ -121,6 +121,7 @@ # Create the release tarball using (arbitrarily) the first host mkdir -p "$(dirname "$GIT_ARCHIVE")" CONFIG_SITE="${BASEPREFIX}/${HOSTS/ */}/share/config.site" \ + REFERENCE_DATETIME="${REFERENCE_DATETIME}" \ contrib/gitian-descriptors/make_release_tarball "${GIT_ARCHIVE}" ORIGPATH="$PATH" @@ -136,15 +137,14 @@ cd distsrc-${i} INSTALLPATH="${PWD}/installed/${DISTNAME}" mkdir -p ${INSTALLPATH} - tar --strip-components=1 -xf $GIT_ARCHIVE + tar --strip-components=1 -xf "${GIT_ARCHIVE}" CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}" make ${MAKEOPTS} make ${MAKEOPTS} -C src check-security make ${MAKEOPTS} -C src check-symbols - make deploy + make deploy BITCOIN_WIN_INSTALLER="${OUTDIR}/${DISTNAME}-${bin_name}-setup-unsigned.exe" make install DESTDIR=${INSTALLPATH} - cp -f ./bitcoin-*-"${bin_name}"-setup-unsigned.exe ${OUTDIR}/${DISTNAME}-"${bin_name}"-setup-unsigned.exe cd installed mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/ find . -name "lib*.la" -delete diff -Nru bitcoin-0.20.1.knots20200815/contrib/gitian-keys/keys.txt bitcoin-0.21.0.knots20210130/contrib/gitian-keys/keys.txt --- bitcoin-0.20.1.knots20200815/contrib/gitian-keys/keys.txt 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/gitian-keys/keys.txt 2021-01-30 05:16:37.000000000 +0000 @@ -13,6 +13,7 @@ 01CDF4627A3B88AAE4A571C87588242FBE38D3A8 Gavin Andresen D1DBF2C4B96F2DEBF4C16654410108112E7EA81F Hennadii Stepanov (hebasto) D3CC177286005BB8FF673294C5242A1AB3936517 jl2012 +82921A4B88FD454B7EB8CE3C796C4109063D4EAF Jon Atack 32EE5C4C3FA15CCADB46ABE529D4BCB6416F53EC Jonas Schnelli 4B4E840451149DD7FB0D633477DFAB5C3108B9A8 Jorge Timon C42AFF7C61B3E44A1454CD3557AF762DB3353322 Karl-Johan Alm (kallewoof) @@ -29,6 +30,7 @@ 133EAC179436F14A5CF1B794860FEB804E669320 Pieter Wuille A8FC55F3B04BA3146F3492E79303B33A305224CB Sebastian Kung (TheCharlatan) ED9BDF7AD6A55E232E84524257FF9BDBCC301009 Sjors Provoost +9EDAFF80E080659604F4A76B2EBB056FD847F8A7 Stephan Oeste (Emzy) AEC1884398647C47413C1C3FB1179EB7347DC10D Warren Togami 79D00BAC68B56D422F945A8F8E3A8F3247DBCBBF Willy Ko 71A3B16735405025D447E8F274810B012346C9A6 Wladimir J. van der Laan diff -Nru bitcoin-0.20.1.knots20200815/contrib/guix/guix-build.sh bitcoin-0.21.0.knots20210130/contrib/guix/guix-build.sh --- bitcoin-0.20.1.knots20200815/contrib/guix/guix-build.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/guix/guix-build.sh 2021-01-30 05:16:37.000000000 +0000 @@ -13,33 +13,107 @@ # Determine the reference time used for determinism (overridable by environment) SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git log --format=%at -1)}" +# Execute "$@" in a pinned, possibly older version of Guix, for reproducibility +# across time. time-machine() { guix time-machine --url=https://github.com/dongcarl/guix.git \ - --commit=b3a7c72c8b2425f8ddb0fc6e3b1caeed40f86dee \ + --commit=b066c25026f21fb57677aa34692a5034338e7ee3 \ -- "$@" } -# Deterministically build Bitcoin Core for HOSTs (overriable by environment) -for host in ${HOSTS=x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu}; do +# Function to be called when building for host ${1} and the user interrupts the +# build +int_trap() { +cat << EOF +** INT received while building ${1}, you may want to clean up the relevant + output, deploy, and distsrc-* directories before rebuilding + +Hint: To blow everything away, you may want to use: + + $ git clean -xdff --exclude='/depends/SDKs/*' + +Specifically, this will remove all files without an entry in the index, +excluding the SDK directory. Practically speaking, this means that all ignored +and untracked files and directories will be wiped, allowing you to start anew. +EOF +} + +# Deterministically build Bitcoin Core for HOSTs (overridable by environment) +# shellcheck disable=SC2153 +for host in ${HOSTS=x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu x86_64-w64-mingw32}; do # Display proper warning when the user interrupts the build - trap 'echo "** INT received while building ${host}, you may want to clean up the relevant output and distsrc-* directories before rebuilding"' INT + trap 'int_trap ${host}' INT + + ( + # Required for 'contrib/guix/manifest.scm' to output the right manifest + # for the particular $HOST we're building for + export HOST="$host" - # Run the build script 'contrib/guix/libexec/build.sh' in the build - # container specified by 'contrib/guix/manifest.scm' - # shellcheck disable=SC2086 - time-machine environment --manifest="${PWD}/contrib/guix/manifest.scm" \ - --container \ - --pure \ - --no-cwd \ - --share="$PWD"=/bitcoin \ - ${SOURCES_PATH:+--share="$SOURCES_PATH"} \ - ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \ - -- env HOST="$host" \ - MAX_JOBS="$MAX_JOBS" \ - SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \ - ${V:+V=1} \ - ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} \ - bash -c "cd /bitcoin && bash contrib/guix/libexec/build.sh" + # Run the build script 'contrib/guix/libexec/build.sh' in the build + # container specified by 'contrib/guix/manifest.scm'. + # + # Explanation of `guix environment` flags: + # + # --container run command within an isolated container + # + # Running in an isolated container minimizes build-time differences + # between machines and improves reproducibility + # + # --pure unset existing environment variables + # + # Same rationale as --container + # + # --no-cwd do not share current working directory with an + # isolated container + # + # When --container is specified, the default behavior is to share + # the current working directory with the isolated container at the + # same exact path (e.g. mapping '/home/satoshi/bitcoin/' to + # '/home/satoshi/bitcoin/'). This means that the $PWD inside the + # container becomes a source of irreproducibility. --no-cwd disables + # this behaviour. + # + # --share=SPEC for containers, share writable host file system + # according to SPEC + # + # --share="$PWD"=/bitcoin + # + # maps our current working directory to /bitcoin + # inside the isolated container, which we later cd + # into. + # + # While we don't want to map our current working directory to the + # same exact path (as this introduces irreproducibility), we do want + # it to be at a _fixed_ path _somewhere_ inside the isolated + # container so that we have something to build. '/bitcoin' was + # chosen arbitrarily. + # + # ${SOURCES_PATH:+--share="$SOURCES_PATH"} + # + # make the downloaded depends sources path available + # inside the isolated container + # + # The isolated container has no network access as it's in a + # different network namespace from the main machine, so we have to + # make the downloaded depends sources available to it. The sources + # should have been downloaded prior to this invocation. + # + # shellcheck disable=SC2086 + time-machine environment --manifest="${PWD}/contrib/guix/manifest.scm" \ + --container \ + --pure \ + --no-cwd \ + --share="$PWD"=/bitcoin \ + --expose="$(git rev-parse --git-common-dir)" \ + ${SOURCES_PATH:+--share="$SOURCES_PATH"} \ + ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \ + -- env HOST="$host" \ + MAX_JOBS="$MAX_JOBS" \ + SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \ + ${V:+V=1} \ + ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} \ + bash -c "cd /bitcoin && bash contrib/guix/libexec/build.sh" + ) done diff -Nru bitcoin-0.20.1.knots20200815/contrib/guix/libexec/build.sh bitcoin-0.21.0.knots20210130/contrib/guix/libexec/build.sh --- bitcoin-0.20.1.knots20200815/contrib/guix/libexec/build.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/guix/libexec/build.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,6 +1,15 @@ #!/usr/bin/env bash export LC_ALL=C set -e -o pipefail +export TZ=UTC + +if [ -n "$V" ]; then + # Print both unexpanded (-v) and expanded (-x) forms of commands as they are + # read from this file. + set -vx + # Set VERBOSE for CMake-based builds + export VERBOSE="$V" +fi # Check that environment variables assumed to be set by the environment are set echo "Building for platform triple ${HOST:?not set} with reference timestamp ${SOURCE_DATE_EPOCH:?not set}..." @@ -36,23 +45,41 @@ --expression='s|"[[:space:]]*$||' } -# Determine output paths to use in CROSS_* environment variables -CROSS_GLIBC="$(store_path glibc-cross-${HOST})" -CROSS_GLIBC_STATIC="$(store_path glibc-cross-${HOST} static)" -CROSS_KERNEL="$(store_path linux-libre-headers-cross-${HOST})" -CROSS_GCC="$(store_path gcc-cross-${HOST})" -CROSS_GCC_LIBS=( "${CROSS_GCC}/lib/gcc/${HOST}"/* ) # This expands to an array of directories... -CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one) - # Set environment variables to point Guix's cross-toolchain to the right # includes/libs for $HOST -# -# NOTE: CROSS_C_INCLUDE_PATH is missing ${CROSS_GCC_LIB}/include-fixed, because -# the limits.h in it is missing a '#include_next ' -# -export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GLIBC}/include:${CROSS_KERNEL}/include" -export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}" -export CROSS_LIBRARY_PATH="${CROSS_GCC}/lib:${CROSS_GCC}/${HOST}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib:${CROSS_GLIBC_STATIC}/lib" +case "$HOST" in + *mingw*) + # Determine output paths to use in CROSS_* environment variables + CROSS_GLIBC="$(store_path "mingw-w64-x86_64-winpthreads")" + CROSS_GCC="$(store_path "gcc-cross-${HOST}")" + CROSS_GCC_LIBS=( "${CROSS_GCC}/lib/gcc/${HOST}"/* ) # This expands to an array of directories... + CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one) + + NATIVE_GCC="$(store_path gcc-glibc-2.27-toolchain)" + export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC}/lib64" + export CPATH="${NATIVE_GCC}/include" + + export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include" + export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}" + export CROSS_LIBRARY_PATH="${CROSS_GCC}/lib:${CROSS_GCC}/${HOST}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib" + ;; + *linux*) + CROSS_GLIBC="$(store_path "glibc-cross-${HOST}")" + CROSS_GLIBC_STATIC="$(store_path "glibc-cross-${HOST}" static)" + CROSS_KERNEL="$(store_path "linux-libre-headers-cross-${HOST}")" + CROSS_GCC="$(store_path "gcc-cross-${HOST}")" + CROSS_GCC_LIBS=( "${CROSS_GCC}/lib/gcc/${HOST}"/* ) # This expands to an array of directories... + CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one) + + # NOTE: CROSS_C_INCLUDE_PATH is missing ${CROSS_GCC_LIB}/include-fixed, because + # the limits.h in it is missing a '#include_next ' + export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GLIBC}/include:${CROSS_KERNEL}/include" + export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}" + export CROSS_LIBRARY_PATH="${CROSS_GCC}/lib:${CROSS_GCC}/${HOST}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib:${CROSS_GLIBC_STATIC}/lib" + ;; + *) + exit 1 ;; +esac # Sanity check CROSS_*_PATH directories IFS=':' read -ra PATHS <<< "${CROSS_C_INCLUDE_PATH}:${CROSS_CPLUS_INCLUDE_PATH}:${CROSS_LIBRARY_PATH}" @@ -74,16 +101,20 @@ [ -e /usr/bin/env ] || ln -s --no-dereference "$(command -v env)" /usr/bin/env # Determine the correct value for -Wl,--dynamic-linker for the current $HOST -glibc_dynamic_linker=$( - case "$HOST" in - i686-linux-gnu) echo /lib/ld-linux.so.2 ;; - x86_64-linux-gnu) echo /lib64/ld-linux-x86-64.so.2 ;; - arm-linux-gnueabihf) echo /lib/ld-linux-armhf.so.3 ;; - aarch64-linux-gnu) echo /lib/ld-linux-aarch64.so.1 ;; - riscv64-linux-gnu) echo /lib/ld-linux-riscv64-lp64d.so.1 ;; - *) exit 1 ;; - esac -) +case "$HOST" in + *linux*) + glibc_dynamic_linker=$( + case "$HOST" in + i686-linux-gnu) echo /lib/ld-linux.so.2 ;; + x86_64-linux-gnu) echo /lib64/ld-linux-x86-64.so.2 ;; + arm-linux-gnueabihf) echo /lib/ld-linux-armhf.so.3 ;; + aarch64-linux-gnu) echo /lib/ld-linux-aarch64.so.1 ;; + riscv64-linux-gnu) echo /lib/ld-linux-riscv64-lp64d.so.1 ;; + *) exit 1 ;; + esac + ) + ;; +esac # Environment variables for determinism export QT_RCC_TEST=1 @@ -118,29 +149,44 @@ # Source Tarball Building # ########################### -# Create the source tarball and move it to "${OUTDIR}/src" if not already there -if [ -z "$(find "${OUTDIR}/src" -name 'bitcoin-*.tar.gz')" ]; then - ./autogen.sh - env CONFIG_SITE="${BASEPREFIX}/${HOST}/share/config.site" ./configure --prefix=/ - make dist GZIP_ENV='-9n' ${V:+V=1} - mkdir -p "${OUTDIR}/src" - mv "$(find "${PWD}" -name 'bitcoin-*.tar.gz')" "${OUTDIR}/src/" +# Define DISTNAME variable. +# shellcheck source=contrib/gitian-descriptors/assign_DISTNAME +source contrib/gitian-descriptors/assign_DISTNAME + +GIT_ARCHIVE="${OUTDIR}/src/${DISTNAME}.tar.gz" + +# Create the source tarball if not already there +if [ ! -e "$GIT_ARCHIVE" ]; then + mkdir -p "$(dirname "$GIT_ARCHIVE")" + CONFIG_SITE="${BASEPREFIX}/${HOST}/share/config.site" \ + contrib/gitian-descriptors/make_release_tarball "${GIT_ARCHIVE}" fi -# Determine the full path to our source tarball -SOURCEDIST="$(find "${OUTDIR}/src" -name 'bitcoin-*.tar.gz')" -# Determine our distribution name (e.g. bitcoin-0.18.0) -DISTNAME="$(basename "$SOURCEDIST" '.tar.gz')" - ########################### # Binary Tarball Building # ########################### -# Similar flags to Gitian -CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests" -HOST_CFLAGS="-O2 -g -ffile-prefix-map=${PWD}=." -HOST_CXXFLAGS="-O2 -g -ffile-prefix-map=${PWD}=." -HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$glibc_dynamic_linker -static-libstdc++" +# CONFIGFLAGS +CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests" +case "$HOST" in + *linux*) CONFIGFLAGS+=" --enable-glibc-back-compat" ;; +esac + +# CFLAGS +HOST_CFLAGS="-O2 -g" +case "$HOST" in + *linux*) HOST_CFLAGS+=" -ffile-prefix-map=${PWD}=." ;; + *mingw*) HOST_CFLAGS+=" -fno-ident" ;; +esac + +# CXXFLAGS +HOST_CXXFLAGS="$HOST_CFLAGS" + +# LDFLAGS +case "$HOST" in + *linux*) HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$glibc_dynamic_linker -static-libstdc++ -Wl,-O2" ;; + *mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;; +esac # Make $HOST-specific native binaries from depends available in $PATH export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}" @@ -148,7 +194,7 @@ cd "$DISTSRC" # Extract the source tarball - tar --strip-components=1 -xf "${SOURCEDIST}" + tar --strip-components=1 -xf "${GIT_ARCHIVE}" # Configure this DISTSRC for $HOST # shellcheck disable=SC2086 @@ -160,7 +206,7 @@ ${CONFIGFLAGS} \ CFLAGS="${HOST_CFLAGS}" \ CXXFLAGS="${HOST_CXXFLAGS}" \ - LDFLAGS="${HOST_LDFLAGS}" + ${HOST_LDFLAGS:+LDFLAGS="${HOST_LDFLAGS}"} sed -i.old 's/-lstdc++ //g' config.status libtool src/univalue/config.status src/univalue/libtool @@ -169,9 +215,21 @@ # Perform basic ELF security checks on a series of executables. make -C src --jobs=1 check-security ${V:+V=1} - # Check that executables only contain allowed gcc, glibc and libstdc++ - # version symbols for Linux distro back-compatibility. - make -C src --jobs=1 check-symbols ${V:+V=1} + + case "$HOST" in + *linux*|*mingw*) + # Check that executables only contain allowed gcc, glibc and libstdc++ + # version symbols for Linux distro back-compatibility. + make -C src --jobs=1 check-symbols ${V:+V=1} + ;; + esac + + # Make the os-specific installers + case "$HOST" in + *mingw*) + make deploy ${V:+V=1} BITCOIN_WIN_INSTALLER="${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe" + ;; + esac # Setup the directory where our Bitcoin Core build for HOST will be # installed. This directory will also later serve as the input for our @@ -180,9 +238,16 @@ mkdir -p "${INSTALLPATH}" # Install built Bitcoin Core to $INSTALLPATH make install DESTDIR="${INSTALLPATH}" ${V:+V=1} + ( cd installed + case "$HOST" in + *mingw*) + mv --target-directory="$DISTNAME"/lib/ "$DISTNAME"/bin/*.dll + ;; + esac + # Prune libtool and object archives find . -name "lib*.la" -delete find . -name "lib*.a" -delete @@ -196,19 +261,60 @@ find "${DISTNAME}/lib" -type f -print0 } | xargs -0 -n1 -P"$MAX_JOBS" -I{} "${DISTSRC}/contrib/devtools/split-debug.sh" {} {} {}.dbg - cp "${DISTSRC}/doc/README.md" "${DISTNAME}/" + case "$HOST" in + *mingw*) + cp "${DISTSRC}/doc/README_windows.txt" "${DISTNAME}/readme.txt" + ;; + *linux*) + cp "${DISTSRC}/README.md" "${DISTNAME}/" + ;; + esac # Finally, deterministically produce {non-,}debug binary tarballs ready # for release - find "${DISTNAME}" -not -name "*.dbg" -print0 \ - | sort --zero-terminated \ - | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ - | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \ - || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 ) - find "${DISTNAME}" -name "*.dbg" -print0 \ - | sort --zero-terminated \ - | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ - | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" \ - || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" && exit 1 ) + case "$HOST" in + *mingw*) + find "${DISTNAME}" -not -name "*.dbg" -print0 \ + | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" + find "${DISTNAME}" -not -name "*.dbg" \ + | sort \ + | zip -X@ "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}.zip" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}.zip" && exit 1 ) + find "${DISTNAME}" -name "*.dbg" -print0 \ + | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" + find "${DISTNAME}" -name "*.dbg" \ + | sort \ + | zip -X@ "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}-debug.zip" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}-debug.zip" && exit 1 ) + ;; + *linux*) + find "${DISTNAME}" -not -name "*.dbg" -print0 \ + | sort --zero-terminated \ + | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ + | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 ) + find "${DISTNAME}" -name "*.dbg" -print0 \ + | sort --zero-terminated \ + | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ + | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" && exit 1 ) + ;; + esac ) ) + +case "$HOST" in + *mingw*) + cp -rf --target-directory=. contrib/windeploy + ( + cd ./windeploy + mkdir unsigned + cp --target-directory=unsigned/ "${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe" + find . -print0 \ + | sort --zero-terminated \ + | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ + | gzip -9n > "${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz" && exit 1 ) + ) + ;; +esac diff -Nru bitcoin-0.20.1.knots20200815/contrib/guix/manifest.scm bitcoin-0.21.0.knots20210130/contrib/guix/manifest.scm --- bitcoin-0.20.1.knots20200815/contrib/guix/manifest.scm 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/guix/manifest.scm 2021-01-30 05:16:37.000000000 +0000 @@ -10,17 +10,35 @@ (gnu packages file) (gnu packages gawk) (gnu packages gcc) + (gnu packages installers) (gnu packages linux) + (gnu packages mingw) (gnu packages perl) (gnu packages pkg-config) (gnu packages python) (gnu packages shells) + (gnu packages version-control) + (guix build-system gnu) (guix build-system trivial) (guix gexp) (guix packages) (guix profiles) (guix utils)) +(define (make-ssp-fixed-gcc xgcc) + "Given a XGCC package, return a modified package that uses the SSP function +from glibc instead of from libssp.so. Our `symbol-check' script will complain if +we link against libssp.so, and thus will ensure that this works properly. + +Taken from: +http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html" + (package + (inherit xgcc) + (arguments + (substitute-keyword-arguments (package-arguments xgcc) + ((#:make-flags flags) + `(cons "gcc_cv_libc_provides_ssp=yes" ,flags)))))) + (define (make-gcc-rpath-link xgcc) "Given a XGCC package, return a modified package that replace each instance of -rpath in the default system spec that's inserted by Guix with -rpath-link" @@ -102,45 +120,79 @@ base-libc base-gcc)) +(define (make-gcc-with-pthreads gcc) + (package-with-extra-configure-variable gcc "--enable-threads" "posix")) + +(define (make-mingw-pthreads-cross-toolchain target) + "Create a cross-compilation toolchain package for TARGET" + (let* ((xbinutils (cross-binutils target)) + (pthreads-xlibc mingw-w64-x86_64-winpthreads) + (pthreads-xgcc (make-gcc-with-pthreads + (cross-gcc target + #:xgcc (make-ssp-fixed-gcc gcc-9) + #:xbinutils xbinutils + #:libc pthreads-xlibc)))) + ;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and + ;; XGCC + (package + (name (string-append target "-posix-toolchain")) + (version (package-version pthreads-xgcc)) + (source #f) + (build-system trivial-build-system) + (arguments '(#:builder (begin (mkdir %output) #t))) + (propagated-inputs + `(("binutils" ,xbinutils) + ("libc" ,pthreads-xlibc) + ("gcc" ,pthreads-xgcc))) + (synopsis (string-append "Complete GCC tool chain for " target)) + (description (string-append "This package provides a complete GCC tool +chain for " target " development.")) + (home-page (package-home-page pthreads-xgcc)) + (license (package-license pthreads-xgcc))))) + + (packages->manifest - (list ;; The Basics - bash-minimal - which - coreutils - util-linux - ;; File(system) inspection - file - grep - diffutils - findutils - ;; File transformation - patch - gawk - sed - ;; Compression and archiving - tar - bzip2 - gzip - xz - zlib - ;; Build tools - gnu-make - libtool - autoconf - automake - pkg-config - ;; Scripting - perl - python-3.7 - ;; Native gcc 9 toolchain targeting glibc 2.27 - (make-gcc-toolchain gcc-9 glibc-2.27) - ;; Cross gcc 9 toolchains targeting glibc 2.27 - (make-bitcoin-cross-toolchain "i686-linux-gnu") - (make-bitcoin-cross-toolchain "x86_64-linux-gnu") - (make-bitcoin-cross-toolchain "aarch64-linux-gnu") - (make-bitcoin-cross-toolchain "arm-linux-gnueabihf") - ;; The glibc 2.27 for riscv64 needs gcc 7 to successfully build (see: - ;; https://www.gnu.org/software/gcc/gcc-7/changes.html#riscv). The final - ;; toolchain is still a gcc 9 toolchain targeting glibc 2.27. - (make-bitcoin-cross-toolchain "riscv64-linux-gnu" - #:base-gcc-for-libc gcc-7))) + (append + (list ;; The Basics + bash-minimal + which + coreutils + util-linux + ;; File(system) inspection + file + grep + diffutils + findutils + ;; File transformation + patch + gawk + sed + ;; Compression and archiving + tar + bzip2 + gzip + xz + zlib + ;; Build tools + gnu-make + libtool + autoconf + automake + pkg-config + ;; Scripting + perl + python-3.7 + ;; Git + git + ;; Native gcc 9 toolchain targeting glibc 2.27 + (make-gcc-toolchain gcc-9 glibc-2.27)) + (let ((target (getenv "HOST"))) + (cond ((string-suffix? "-mingw32" target) + ;; Windows + (list zip (make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32") nsis-x86_64)) + ((string-contains target "riscv64-linux-") + (list (make-bitcoin-cross-toolchain "riscv64-linux-gnu" + #:base-gcc-for-libc gcc-7))) + ((string-contains target "-linux-") + (list (make-bitcoin-cross-toolchain target))) + (else '()))))) diff -Nru bitcoin-0.20.1.knots20200815/contrib/guix/README.md bitcoin-0.21.0.knots20210130/contrib/guix/README.md --- bitcoin-0.20.1.knots20200815/contrib/guix/README.md 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/guix/README.md 2021-01-30 05:16:37.000000000 +0000 @@ -13,7 +13,6 @@ Conservatively, a x86_64 machine with: -- 2 or more logical cores - 4GB of free disk space on the partition that /gnu/store will reside in - 24GB of free disk space on the partition that the Bitcoin Core git repository resides in @@ -143,6 +142,11 @@ If non-empty, will pass `V=1` to all `make` invocations, making `make` output verbose. + Note that any given value is ignored. The variable is only checked for + emptiness. More concretely, this means that `V=` (setting `V` to the empty + string) is interpreted the same way as not setting `V` at all, and that `V=0` + has the same effect as `V=1`. + * _**ADDITIONAL_GUIX_ENVIRONMENT_FLAGS**_ Additional flags to be passed to `guix environment`. For a fully-bootstrapped @@ -220,8 +224,6 @@ [guix/env-setup]: https://www.gnu.org/software/guix/manual/en/html_node/Build-Environment-Setup.html [guix/substitutes]: https://www.gnu.org/software/guix/manual/en/html_node/Substitutes.html [guix/substitute-server-auth]: https://www.gnu.org/software/guix/manual/en/html_node/Substitute-Server-Authorization.html -[guix/inferiors]: https://www.gnu.org/software/guix/manual/en/html_node/Inferiors.html -[guix/channels]: https://www.gnu.org/software/guix/manual/en/html_node/Channels.html [guix/time-machine]: https://guix.gnu.org/manual/en/html_node/Invoking-guix-time_002dmachine.html [debian/guix-package]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850644 diff -Nru bitcoin-0.20.1.knots20200815/contrib/linearize/example-linearize.cfg bitcoin-0.21.0.knots20210130/contrib/linearize/example-linearize.cfg --- bitcoin-0.20.1.knots20200815/contrib/linearize/example-linearize.cfg 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/linearize/example-linearize.cfg 2021-01-30 05:16:37.000000000 +0000 @@ -13,6 +13,9 @@ #regtest default #port=18443 +#signet default +#port=38332 + # bootstrap.dat hashlist settings (linearize-hashes) max_height=313000 @@ -33,6 +36,11 @@ #genesis=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206 #input=/home/example/.bitcoin/regtest/blocks +# signet +#netmagic=0a03cf40 +#genesis=00000008819873e925422c1ff0f99f7cc9bbb232af63a077a480a3633bee1ef6 +#input=/home/example/.bitcoin/signet/blocks + # "output" option causes blockchain files to be written to the given location, # with "output_file" ignored. If not used, "output_file" is used instead. # output=/home/example/blockchain_directory diff -Nru bitcoin-0.20.1.knots20200815/contrib/linearize/linearize-data.py bitcoin-0.21.0.knots20210130/contrib/linearize/linearize-data.py --- bitcoin-0.20.1.knots20200815/contrib/linearize/linearize-data.py 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/linearize/linearize-data.py 2021-01-30 05:16:37.000000000 +0000 @@ -2,7 +2,7 @@ # # linearize-data.py: Construct a linear, no-fork version of the chain. # -# Copyright (c) 2013-2019 The Bitcoin Core developers +# Copyright (c) 2013-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # diff -Nru bitcoin-0.20.1.knots20200815/contrib/macdeploy/extract-osx-sdk.sh bitcoin-0.21.0.knots20210130/contrib/macdeploy/extract-osx-sdk.sh --- bitcoin-0.20.1.knots20200815/contrib/macdeploy/extract-osx-sdk.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/macdeploy/extract-osx-sdk.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2016-2019 The Bitcoin Core developers +# Copyright (c) 2016-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff -Nru bitcoin-0.20.1.knots20200815/contrib/macdeploy/gen-sdk bitcoin-0.21.0.knots20210130/contrib/macdeploy/gen-sdk --- bitcoin-0.20.1.knots20200815/contrib/macdeploy/gen-sdk 1970-01-01 00:00:00.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/macdeploy/gen-sdk 2021-01-30 05:16:37.000000000 +0000 @@ -0,0 +1,94 @@ +#!/usr/bin/env python3 +import argparse +import plistlib +import pathlib +import sys +import tarfile +import gzip +import os +import contextlib + +@contextlib.contextmanager +def cd(path): + """Context manager that restores PWD even if an exception was raised.""" + old_pwd = os.getcwd() + os.chdir(str(path)) + try: + yield + finally: + os.chdir(old_pwd) + +def run(): + parser = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.RawTextHelpFormatter) + + parser.add_argument('xcode_app', metavar='XCODEAPP', nargs=1) + parser.add_argument("-o", metavar='OUTSDKTGZ', nargs=1, dest='out_sdktgz', required=False) + + args = parser.parse_args() + + xcode_app = pathlib.Path(args.xcode_app[0]).resolve() + assert xcode_app.is_dir(), "The supplied Xcode.app path '{}' either does not exist or is not a directory".format(xcode_app) + + xcode_app_plist = xcode_app.joinpath("Contents/version.plist") + with xcode_app_plist.open('rb') as fp: + pl = plistlib.load(fp) + xcode_version = pl['CFBundleShortVersionString'] + xcode_build_id = pl['ProductBuildVersion'] + print("Found Xcode (version: {xcode_version}, build id: {xcode_build_id})".format(xcode_version=xcode_version, xcode_build_id=xcode_build_id)) + + sdk_dir = xcode_app.joinpath("Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk") + sdk_plist = sdk_dir.joinpath("System/Library/CoreServices/SystemVersion.plist") + with sdk_plist.open('rb') as fp: + pl = plistlib.load(fp) + sdk_version = pl['ProductVersion'] + sdk_build_id = pl['ProductBuildVersion'] + print("Found MacOSX SDK (version: {sdk_version}, build id: {sdk_build_id})".format(sdk_version=sdk_version, sdk_build_id=sdk_build_id)) + + out_name = "Xcode-{xcode_version}-{xcode_build_id}-extracted-SDK-with-libcxx-headers".format(xcode_version=xcode_version, xcode_build_id=xcode_build_id) + + xcode_libcxx_dir = xcode_app.joinpath("Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1") + assert xcode_libcxx_dir.is_dir() + + if args.out_sdktgz: + out_sdktgz_path = pathlib.Path(args.out_sdktgz_path) + else: + # Construct our own out_sdktgz if not specified on the command line + out_sdktgz_path = pathlib.Path("./{}.tar.gz".format(out_name)) + + def tarfp_add_with_base_change(tarfp, dir_to_add, alt_base_dir): + """Add all files in dir_to_add to tarfp, but prepent MEMBERPREFIX to the files' + names + + e.g. if the only file under /root/bazdir is /root/bazdir/qux, invoking: + + tarfp_add_with_base_change(tarfp, "foo/bar", "/root/bazdir") + + would result in the following members being added to tarfp: + + foo/bar/ -> corresponding to /root/bazdir + foo/bar/qux -> corresponding to /root/bazdir/qux + + """ + def change_tarinfo_base(tarinfo): + if tarinfo.name and tarinfo.name.startswith("./"): + tarinfo.name = str(pathlib.Path(alt_base_dir, tarinfo.name)) + if tarinfo.linkname and tarinfo.linkname.startswith("./"): + tarinfo.linkname = str(pathlib.Path(alt_base_dir, tarinfo.linkname)) + return tarinfo + with cd(dir_to_add): + tarfp.add(".", recursive=True, filter=change_tarinfo_base) + + print("Creating output .tar.gz file...") + with out_sdktgz_path.open("wb") as fp: + with gzip.GzipFile(fileobj=fp, compresslevel=9, mtime=0) as gzf: + with tarfile.open(mode="w", fileobj=gzf) as tarfp: + print("Adding MacOSX SDK {} files...".format(sdk_version)) + tarfp_add_with_base_change(tarfp, sdk_dir, out_name) + print("Adding libc++ headers...") + tarfp_add_with_base_change(tarfp, xcode_libcxx_dir, "{}/usr/include/c++/v1".format(out_name)) + print("Done! Find the resulting gzipped tarball at:") + print(out_sdktgz_path.resolve()) + +if __name__ == '__main__': + run() diff -Nru bitcoin-0.20.1.knots20200815/contrib/macdeploy/macdeployqtplus bitcoin-0.21.0.knots20210130/contrib/macdeploy/macdeployqtplus --- bitcoin-0.20.1.knots20200815/contrib/macdeploy/macdeployqtplus 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/macdeploy/macdeployqtplus 2021-01-30 05:16:37.000000000 +0000 @@ -586,7 +586,8 @@ sys.exit(1) try: - fancy = plistlib.readPlist(p) + with open(p, 'rb') as fp: + fancy = plistlib.load(fp, fmt=plistlib.FMT_XML) except: if verbose >= 1: sys.stderr.write("Error: Could not parse fancy disk image plist at \"{}\"\n".format(p)) diff -Nru bitcoin-0.20.1.knots20200815/contrib/macdeploy/README.md bitcoin-0.21.0.knots20210130/contrib/macdeploy/README.md --- bitcoin-0.20.1.knots20200815/contrib/macdeploy/README.md 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/macdeploy/README.md 2021-01-30 05:16:37.000000000 +0000 @@ -14,55 +14,44 @@ ## SDK Extraction -Our current macOS SDK (`macOSX10.14.sdk`) can be extracted from -[Xcode_10.2.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_10.2.1/Xcode_10.2.1.xip). +### Step 1: Obtaining `Xcode.app` + +Our current macOS SDK +(`Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz`) can be +extracted from +[Xcode_11.3.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_11.3.1/Xcode_11.3.1.xip). An Apple ID is needed to download this. -`Xcode.app` is packaged in a `.xip` archive. -This makes the SDK less-trivial to extract on non-macOS machines. -One approach (tested on Debian Buster) is outlined below: +After Xcode version 7.x, Apple started shipping the `Xcode.app` in a `.xip` +archive. This makes the SDK less-trivial to extract on non-macOS machines. One +approach (tested on Debian Buster) is outlined below: ```bash - -apt install clang cpio git liblzma-dev libxml2-dev libssl-dev make - -git clone https://github.com/tpoechtrager/xar -pushd xar/xar -./configure -make -make install -popd - -git clone https://github.com/NiklasRosenstein/pbzx -pushd pbzx -clang -llzma -lxar pbzx.c -o pbzx -Wl,-rpath=/usr/local/lib -popd - -xar -xf Xcode_10.2.1.xip -C . - -./pbzx/pbzx -n Content | cpio -i - -find Xcode.app -type d -name MacOSX.sdk -exec sh -c 'tar --transform="s/MacOSX.sdk/MacOSX10.14.sdk/" -c -C$(dirname {}) MacOSX.sdk/ | gzip -9n > MacOSX10.14.sdk.tar.gz' \; +# Install/clone tools needed for extracting Xcode.app +apt install cpio +git clone https://github.com/bitcoin-core/apple-sdk-tools.git + +# Unpack Xcode_11.3.1.xip and place the resulting Xcode.app in your current +# working directory +python3 apple-sdk-tools/extract_xcode.py -f Xcode_11.3.1.xip | cpio -d -i ``` -on macOS the process is more straightforward: +On macOS the process is more straightforward: ```bash -xip -x Xcode_10.2.1.xip -tar -s "/MacOSX.sdk/MacOSX10.14.sdk/" -C Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.14.sdk.tar.gz MacOSX.sdk +xip -x Xcode_11.3.1.xip ``` -Our previously used macOS SDK (`MacOSX10.11.sdk`) can be extracted from -[Xcode 7.3.1 dmg](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/Xcode_7.3.1/Xcode_7.3.1.dmg). -The script [`extract-osx-sdk.sh`](./extract-osx-sdk.sh) automates this. First -ensure the DMG file is in the current directory, and then run the script. You -may wish to delete the `intermediate 5.hfs` file and `MacOSX10.11.sdk` (the -directory) when you've confirmed the extraction succeeded. +### Step 2: Generating `Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz` from `Xcode.app` + +To generate `Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz`, run +the script [`gen-sdk`](./gen-sdk) with the path to `Xcode.app` (extracted in the +previous stage) as the first argument. ```bash -apt-get install p7zip-full sleuthkit -contrib/macdeploy/extract-osx-sdk.sh -rm -rf 5.hfs MacOSX10.11.sdk +# Generate a Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz from +# the supplied Xcode.app +./contrib/macdeploy/gen-sdk '/path/to/Xcode.app' ``` ## Deterministic macOS DMG Notes @@ -91,13 +80,13 @@ To complicate things further, all builds must target an Apple SDK. These SDKs are free to download, but not redistributable. To obtain it, register for an Apple Developer Account, -then download [Xcode 10.2.1](https://download.developer.apple.com/Developer_Tools/Xcode_10.2.1/Xcode_10.2.1.xip). +then download [Xcode_11.3.1](https://download.developer.apple.com/Developer_Tools/Xcode_11.3.1/Xcode_11.3.1.xip). This file is many gigabytes in size, but most (but not all) of what we need is contained only in a single directory: ```bash -Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk +Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk ``` See the SDK Extraction notes above for how to obtain it. diff -Nru bitcoin-0.20.1.knots20200815/contrib/seeds/.gitignore bitcoin-0.21.0.knots20210130/contrib/seeds/.gitignore --- bitcoin-0.20.1.knots20200815/contrib/seeds/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/seeds/.gitignore 2021-01-30 05:16:37.000000000 +0000 @@ -0,0 +1 @@ +seeds_main.txt diff -Nru bitcoin-0.20.1.knots20200815/contrib/seeds/makeseeds.py bitcoin-0.21.0.knots20210130/contrib/seeds/makeseeds.py --- bitcoin-0.20.1.knots20200815/contrib/seeds/makeseeds.py 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/seeds/makeseeds.py 2021-01-30 05:16:37.000000000 +0000 @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2013-2019 The Bitcoin Core developers +# Copyright (c) 2013-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # @@ -34,7 +34,8 @@ r"0.17.(0|0.1|1|2|99)|" r"0.18.(0|1|99)|" r"0.19.(0|1|99)|" - r"0.20.99" + r"0.20.(0|1|99)|" + r"0.21.99" r")") def parseline(line): diff -Nru bitcoin-0.20.1.knots20200815/contrib/seeds/nodes_main.txt bitcoin-0.21.0.knots20210130/contrib/seeds/nodes_main.txt --- bitcoin-0.20.1.knots20200815/contrib/seeds/nodes_main.txt 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/seeds/nodes_main.txt 2021-01-30 05:16:37.000000000 +0000 @@ -1,747 +1,1164 @@ 2.39.173.126:8333 -2.57.38.133:8333 -2.92.39.39:15426 -2.230.146.163:8333 -5.2.74.175:8333 -5.8.18.29:8333 -5.39.222.39:8333 +3.14.168.201:48333 +4.36.112.44:8333 +5.8.18.31:8333 +5.14.200.167:8333 +5.56.20.2:8333 +5.102.146.99:8333 5.103.137.146:9333 5.128.87.126:8333 -5.149.250.76:8333 -5.182.39.200:8333 +5.133.65.82:8333 5.187.55.242:8333 5.188.62.24:8333 5.188.62.33:8333 -5.188.187.130:8333 -5.189.153.179:8333 -5.198.20.227:8333 5.199.133.193:8333 -5.254.82.130:8333 -13.237.147.15:8333 +8.38.89.152:8333 +13.231.20.249:8333 18.27.79.17:8333 20.184.15.116:8433 -23.17.160.159:8333 +23.28.205.97:8333 +23.106.252.230:8333 +23.175.0.202:8333 23.175.0.212:8333 +23.241.250.252:8333 23.245.24.154:8333 -24.76.122.108:8333 -24.96.73.156:8333 -24.96.125.57:8333 -24.155.196.27:8333 -24.203.88.167:8333 -24.233.245.188:8333 -24.246.31.205:8333 -31.6.98.94:8333 -31.14.201.156:8333 -31.25.241.224:8335 -31.43.140.190:8333 +24.86.184.66:8333 +24.116.246.9:8333 +24.141.34.166:8333 +24.155.196.246:8333 +24.157.130.222:8333 +24.188.176.255:8333 +24.237.70.53:8333 +27.124.4.67:8333 +31.17.70.80:8333 +31.21.8.32:8333 +31.45.118.10:8333 +31.132.17.56:8333 31.134.121.223:8333 -31.173.48.61:8333 -34.203.169.172:8333 -35.178.31.4:8333 -35.185.172.62:8333 -35.206.171.89:8333 -35.208.87.203:8333 -37.61.219.34:8333 -37.143.210.19:8333 -37.143.211.83:8333 -37.235.128.11:8333 -37.252.190.88:8333 -38.102.134.85:8333 -39.109.0.150:8333 -42.200.72.205:8333 -43.229.132.102:8333 +32.214.183.114:8333 +35.137.236.32:8333 +35.185.145.105:8333 +35.209.51.212:8333 +35.245.175.76:8333 +37.116.95.41:8333 +37.143.9.107:8333 +37.143.116.43:8333 +37.191.244.149:8333 +37.211.78.253:8333 +37.221.209.222:24333 +37.228.92.110:8333 +43.225.62.107:8333 +43.225.157.152:8333 45.36.184.6:8333 -45.58.49.35:8333 -45.76.18.47:8333 -45.115.239.108:8333 -46.23.87.218:8333 +45.48.168.16:8333 +45.85.85.8:8333 +45.85.85.9:8333 +45.129.180.214:8333 +45.149.78.128:8333 +45.151.125.218:8333 +45.154.255.46:8333 +45.155.157.239:8333 46.28.132.34:8333 +46.28.204.21:8333 46.32.50.98:8333 -46.36.97.10:8333 -46.38.237.108:8333 -46.39.129.82:8333 -46.160.195.121:8333 +46.59.13.35:8333 +46.128.40.173:8333 +46.128.140.193:8333 +46.146.248.89:8333 46.166.162.45:20001 -46.188.30.118:8333 +46.188.15.6:8333 +46.229.165.142:8333 46.229.238.187:8333 +46.249.83.82:8333 46.254.217.169:8333 -47.52.114.198:8885 -47.88.84.126:8333 -47.108.29.152:8333 -47.108.30.165:8333 +47.74.191.34:8333 +47.115.53.163:8333 +47.187.26.135:8333 47.222.103.234:8333 -49.245.50.224:8333 -50.53.250.162:8333 -50.225.198.67:6000 +47.253.5.99:8333 +49.232.82.76:8333 +49.247.215.43:8333 +50.2.13.166:8333 +50.34.39.72:8333 +50.45.232.189:8333 +50.68.104.92:8333 +51.68.36.57:8333 51.154.60.34:8333 -54.242.17.7:8333 -58.146.222.198:8333 +52.169.238.66:8333 +54.197.30.223:8333 +54.227.66.57:8333 58.158.0.86:8333 -59.149.205.197:8333 -60.251.129.61:8336 -61.155.5.4:8333 -62.45.4.139:8333 -62.97.244.242:8333 -62.109.18.23:8333 -62.133.194.156:8333 -62.138.0.217:8333 +58.171.135.242:8333 +58.229.208.158:8333 +60.244.109.19:8333 +62.38.75.208:8333 +62.74.143.11:8333 +62.80.227.49:8333 62.152.58.16:9421 -63.143.34.98:8333 -63.211.111.122:8333 -63.224.249.240:8333 -64.182.119.36:8333 -64.229.105.111:8333 -65.27.104.112:8333 -65.183.76.73:8333 -66.151.242.154:8335 -66.206.13.70:8333 +62.210.167.199:8333 +62.234.188.160:8333 +62.251.54.163:8333 +63.227.116.162:8333 +65.19.155.82:8333 +65.95.49.102:8333 +66.18.172.21:8333 66.240.237.155:8333 -66.240.237.172:8333 -67.205.140.145:8333 67.210.228.203:8333 -67.221.193.55:8333 -67.222.131.151:8333 -68.110.90.111:8333 -68.142.33.36:8333 -68.199.157.183:8333 -68.202.128.19:8333 -68.206.21.144:8333 69.30.215.42:8333 -69.55.234.74:8333 -69.59.18.22:8333 -69.145.122.160:8333 -69.175.49.230:8333 -70.64.48.41:8333 -71.33.232.126:8333 -71.73.18.32:8333 -71.146.114.111:8333 +69.59.18.206:8333 +69.64.33.71:8333 +69.119.193.9:8333 +69.209.23.72:8333 +70.123.125.237:8333 +70.185.56.136:8333 +71.38.90.235:8333 +72.12.73.70:8333 72.53.134.182:8333 -73.126.97.99:8333 -74.83.126.150:8333 -74.84.128.158:9333 -74.98.242.97:8333 +72.225.7.80:8333 +72.234.182.39:8333 +72.250.184.57:8333 +73.83.103.79:8333 74.118.137.119:8333 +74.133.100.74:8333 +74.215.219.214:8333 74.220.255.190:8333 -75.45.51.41:8333 75.158.39.231:8333 -76.11.17.187:8333 -76.84.79.211:8333 -76.167.179.75:8333 -77.53.158.137:8333 -77.119.229.106:8333 +77.53.53.196:8333 +77.70.16.245:8333 +77.105.87.97:8333 +77.120.113.69:8433 77.120.122.22:8433 -77.120.122.114:8433 -77.163.136.136:8333 -77.220.140.74:8333 +77.166.83.167:8333 77.247.178.130:8333 -78.128.62.52:8333 -78.128.79.22:8333 +78.27.139.13:8333 +78.63.28.146:8333 +78.83.103.4:8333 78.141.123.99:8333 -78.143.214.223:8333 -78.159.99.85:8333 79.77.33.131:8333 -79.120.70.47:8333 -79.142.129.218:8333 -79.175.125.210:8333 -80.47.156.43:8333 +79.77.133.30:8333 +79.101.1.25:8333 +79.117.192.229:8333 +79.133.228.55:8333 +79.146.21.163:8333 80.89.203.172:8001 80.93.213.246:8333 -80.111.142.213:8333 -80.147.82.165:8333 -80.211.191.11:8333 -80.211.245.151:8333 +80.192.98.110:8334 80.229.28.60:8333 -80.229.168.1:8333 +80.232.247.210:8333 +80.242.39.76:8333 80.253.94.252:8333 -81.4.102.69:8333 +81.0.198.25:8333 81.7.13.84:8333 -81.10.205.21:8333 81.117.225.245:8333 -81.177.157.81:39993 -81.235.185.150:8333 +81.135.137.225:8333 +81.171.22.143:8333 +81.191.233.134:8333 +81.232.78.75:8333 +81.242.91.23:8333 82.29.58.109:8333 -82.117.166.77:8333 -82.118.20.37:8333 -82.146.50.143:8333 -82.146.153.130:8333 +82.136.99.22:8333 82.149.97.25:17567 -82.169.130.61:8333 -82.181.179.230:8333 -82.181.218.229:8333 +82.165.19.48:8333 82.194.153.233:8333 -82.195.237.253:8333 -82.197.218.97:8333 +82.197.215.125:8333 82.199.102.10:8333 -82.199.102.133:8333 -82.202.197.224:8333 -82.217.245.7:8333 -82.221.111.136:8333 -83.89.27.50:8333 -83.89.250.69:8333 -83.167.27.4:8333 -83.208.254.182:8333 +82.200.205.30:8333 +82.202.68.231:8333 +82.221.128.31:8333 +82.228.6.131:8333 +83.85.139.94:8333 +83.99.245.20:8333 +83.137.41.10:8333 +83.174.209.87:8333 83.217.8.31:44420 -83.221.211.116:8335 -83.243.59.41:8333 -83.251.241.0:8333 84.38.3.249:8333 -84.40.94.170:8333 +84.38.185.122:8333 +84.92.92.247:8333 84.192.16.234:8333 -84.209.9.23:8333 -84.234.96.115:8333 -84.248.14.210:8333 -85.119.83.25:8333 -85.144.119.222:8333 -85.145.238.93:8333 +84.194.158.124:8333 +84.212.145.24:8333 +84.212.244.95:8333 +84.216.51.36:8333 +84.255.249.163:8333 +85.25.255.147:8333 +85.70.156.209:8333 +85.145.142.46:8333 +85.170.233.95:8333 85.184.138.108:8333 85.190.0.5:8333 -85.202.11.119:8333 -85.204.96.207:8333 -85.208.69.13:8333 -85.214.90.161:8333 -85.240.233.220:8333 +85.191.200.51:8333 +85.192.191.6:18500 +85.194.238.131:8333 +85.195.54.110:8333 +85.214.161.252:8333 +85.214.185.51:8333 85.241.106.203:8333 -86.15.38.61:8333 -86.76.7.132:8333 +85.246.168.252:8333 +86.56.238.247:8333 +87.61.90.230:8333 87.79.68.86:8333 87.79.94.221:8333 -87.118.116.237:8333 87.120.8.5:20008 -87.222.22.255:8333 -87.233.181.146:8333 87.246.46.132:8333 -87.249.207.89:8333 -88.86.116.140:8333 -88.86.116.142:8333 -88.88.13.249:8333 +87.247.111.222:8333 +88.84.222.252:8333 +88.86.243.241:8333 +88.87.93.52:1691 +88.119.197.200:8333 +88.129.253.94:8333 88.147.244.250:8333 -88.150.230.95:8333 -88.202.202.221:8333 88.208.3.195:8333 88.212.44.33:8333 -89.25.80.42:8333 -89.28.117.31:8333 +88.214.57.95:8333 89.106.199.38:8333 -89.142.75.60:8333 +89.108.126.228:8333 +89.115.120.43:8333 +89.133.68.65:8333 89.190.19.162:8333 -89.212.9.96:8333 -89.212.75.6:8333 -89.248.250.12:8333 -90.94.83.26:8333 +89.248.172.10:8333 +90.146.153.21:8333 90.182.165.18:8333 -91.185.198.234:8333 +91.106.188.229:8333 91.193.237.116:8333 91.204.99.178:8333 91.204.149.5:8333 -91.210.24.30:8333 -91.211.88.33:8333 -91.216.149.28:8333 -91.222.128.59:8333 -92.18.180.225:8333 -92.53.89.123:8333 -92.240.69.195:8333 +91.214.70.63:8333 +91.228.152.236:8333 +92.12.154.115:8333 92.249.143.44:8333 -92.255.176.109:8333 -93.57.81.162:8333 -93.90.193.195:8330 -93.90.207.46:8333 -93.115.26.186:20004 -93.115.240.26:8333 +93.12.66.98:8333 +93.46.54.4:8333 +93.115.20.130:8333 93.123.180.164:8333 -93.175.204.121:8333 -93.180.178.213:8333 +93.189.145.169:8333 +93.241.228.102:8333 94.19.7.55:8333 +94.19.128.204:8333 94.52.112.227:8333 -94.53.2.181:8333 -94.72.143.26:8333 -94.103.120.173:8333 -94.237.64.138:8333 -94.237.80.207:8333 -94.242.255.31:8333 -95.24.48.84:15426 -95.42.2.113:8333 +94.154.96.130:8333 +94.156.174.201:8333 +94.158.246.183:8333 +94.177.171.73:8333 +94.199.178.233:8100 +94.237.125.30:8333 +94.247.134.77:8333 +95.48.228.45:8333 95.69.249.63:8333 -95.79.35.133:8333 +95.82.146.70:8333 +95.83.73.31:8333 +95.84.164.43:8333 95.87.226.56:8333 -95.90.3.210:8333 95.110.234.93:8333 -95.156.252.34:8333 -95.211.189.3:8333 -95.217.9.207:8333 -96.9.80.109:8333 -96.245.218.247:8333 -97.104.206.3:8333 -98.29.195.204:8333 -99.231.196.126:8333 -101.100.174.24:8333 +95.163.71.126:8333 +95.164.65.194:8333 +95.174.66.211:8333 +95.211.174.137:8333 +95.216.11.156:8433 +96.47.114.108:8333 +97.84.232.105:8333 +97.99.205.241:8333 +98.25.193.114:8333 +99.115.25.13:8333 +101.32.19.184:8333 101.100.174.240:8333 +102.132.245.16:8333 103.14.244.190:8333 -103.37.205.47:8333 -103.60.109.184:20008 +103.76.48.5:8333 103.84.84.250:8335 -103.85.190.218:20000 -103.99.168.100:8333 -103.99.168.130:8333 -103.214.146.86:8333 +103.99.168.150:8333 +103.109.101.216:8333 +103.122.247.102:8333 +103.129.13.45:8333 +103.198.192.14:20008 +103.224.119.99:8333 +103.231.191.7:8333 +103.235.230.196:8333 104.171.242.155:8333 -104.199.184.15:8333 -104.244.223.151:8333 -105.29.76.194:8333 -107.150.45.18:8333 -107.180.77.21:8333 -108.58.252.82:8333 +104.238.220.199:8333 +106.163.158.127:8333 +107.150.41.179:8333 +107.159.93.103:8333 108.183.77.12:8333 -109.72.83.127:8333 +109.9.175.65:8333 109.99.63.159:8333 -109.109.36.19:8333 109.110.81.90:8333 -109.173.112.224:8333 -109.202.107.125:8333 -109.205.109.56:8333 -109.236.84.141:8333 -109.238.81.82:8333 +109.123.213.130:8333 +109.134.232.81:8333 +109.169.20.168:8333 +109.199.241.148:8333 +109.229.210.6:8333 +109.236.105.40:8333 109.248.206.13:8333 -111.40.4.103:8333 -111.90.140.217:8333 -111.90.158.212:8333 -112.213.103.98:8333 +111.42.74.65:8333 +111.90.140.179:8333 +112.215.205.236:8333 113.52.135.125:8333 +114.23.246.137:8333 115.47.141.250:8885 115.70.110.4:8333 -116.87.15.244:8333 +116.34.189.55:8333 +118.103.126.140:28333 +118.189.187.219:8333 +119.3.208.236:8333 +119.8.47.225:8333 119.17.151.61:8333 -119.171.134.87:8333 -121.18.238.39:8333 -121.78.223.186:8333 -121.98.205.102:8333 +120.25.24.30:8333 +120.241.34.10:8333 +121.98.205.100:8333 122.112.148.153:8339 122.116.42.140:8333 -124.160.119.93:8333 +124.217.235.180:8333 125.236.215.133:8333 129.13.189.212:8333 -129.97.243.18:8333 130.185.77.105:8333 -131.114.10.233:8333 -131.188.40.34:8333 -132.249.239.163:8333 -134.19.186.195:8333 -134.249.187.97:8333 -136.144.215.219:8333 +131.188.40.191:8333 +131.193.220.15:8333 +135.23.124.239:8333 +136.33.185.32:8333 +136.56.170.96:8333 137.226.34.46:8333 +138.229.26.42:8333 139.9.249.234:8333 141.101.8.36:8333 -143.89.121.207:8333 143.176.224.104:8333 +144.2.69.224:8333 144.34.161.65:18333 -147.253.70.208:8333 -148.66.50.82:8335 -153.92.127.216:8333 -153.120.115.15:8333 -154.52.98.2:8444 -155.4.116.169:8333 +144.91.116.44:8333 +144.137.29.181:8333 +148.66.50.50:8335 +148.72.150.231:8333 +148.170.212.44:8333 +149.167.99.190:8333 +154.92.16.191:8333 +154.221.27.21:8333 156.19.19.90:8333 -156.34.178.138:8333 -157.13.61.66:8333 -157.13.61.67:8333 +156.241.5.190:8333 +157.13.61.76:8333 +157.13.61.80:8333 +157.230.166.98:14391 +158.75.203.2:8333 +158.181.125.150:8333 158.181.226.33:8333 159.100.242.254:8333 159.100.248.234:8333 -159.253.98.209:8333 +159.138.87.18:8333 160.16.0.30:8333 -160.20.145.62:8333 +162.0.227.54:8333 +162.0.227.56:8333 162.62.18.226:8333 -162.62.26.218:8333 -162.209.88.174:8333 +162.209.1.233:8333 +162.243.175.86:8333 162.244.80.208:8333 +162.250.188.87:8333 +162.250.189.53:8333 163.158.202.112:8333 -163.172.181.191:8333 -166.62.100.55:8333 -167.114.35.12:8333 -168.62.167.209:8200 -168.235.74.110:8333 -168.235.90.188:8333 -170.249.37.243:8333 -172.99.120.113:8333 -173.21.218.95:8333 -173.51.177.2:8333 -173.95.72.234:8333 +163.158.243.230:8333 +165.73.62.31:8333 +166.62.82.103:32771 +166.70.94.106:8333 +167.86.90.239:8333 +169.44.34.203:8333 +172.93.101.73:8333 +172.105.7.47:8333 +173.23.103.30:8000 +173.53.79.6:8333 +173.70.12.86:8333 +173.89.28.137:8333 +173.176.184.54:8333 173.208.128.10:8333 -173.209.44.34:8333 -173.231.57.194:8333 +173.254.204.69:8333 173.255.204.124:8333 -174.65.135.60:8333 174.94.155.224:8333 -174.115.120.186:8333 -176.53.160.170:8333 -176.85.188.213:8333 +174.114.102.41:8333 +174.114.124.12:8333 +176.10.227.59:8333 +176.31.224.214:8333 +176.74.136.237:8333 176.99.2.207:8333 -176.121.14.157:8333 -176.122.157.173:8333 -176.126.85.34:8333 -176.198.120.197:8334 -178.61.141.198:8333 -178.119.183.34:8333 -178.234.29.184:8333 +176.106.191.2:8333 +176.160.228.9:8333 +176.191.182.3:8333 +176.212.185.153:8333 +176.241.137.183:8333 +177.38.215.73:8333 +178.16.222.146:8333 +178.132.2.246:8333 +178.143.191.171:8333 +178.148.172.209:8333 +178.148.226.180:8333 +178.150.96.46:8333 +178.182.227.50:8333 +178.236.137.63:8333 178.255.42.126:8333 -179.48.251.41:8333 -180.150.73.100:8333 -181.47.220.242:8333 -181.170.139.47:8333 +180.150.52.37:8333 +181.39.32.99:8333 +181.48.77.26:8333 +181.52.223.52:8333 +181.238.51.152:8333 +183.88.223.208:8333 183.110.220.210:30301 -183.230.93.139:8333 -184.95.58.164:8663 +184.95.58.166:8336 184.164.147.82:41333 -185.15.92.18:20993 -185.25.60.199:8333 -185.52.3.185:8333 -185.61.138.4:8333 +184.171.208.109:8333 +185.25.48.39:8333 +185.25.48.184:8333 185.64.116.15:8333 -185.83.110.53:8333 -185.83.214.123:8333 +185.80.219.132:8333 +185.85.3.140:8333 185.95.219.53:8333 -185.96.94.24:8333 -185.102.71.6:8333 -185.138.35.183:8333 -185.140.252.253:8333 -185.143.145.113:8333 +185.108.244.41:8333 +185.134.233.121:8333 +185.145.128.21:8333 185.148.3.227:8333 -185.157.160.220:8333 -185.163.44.44:8333 -185.176.221.32:8333 +185.153.196.240:8333 +185.158.114.184:8333 +185.165.168.196:8333 +185.181.230.74:8333 +185.185.26.141:8111 185.186.208.162:8333 -185.198.58.47:8333 -185.198.59.183:8333 -185.215.224.22:8333 -185.232.28.254:8333 -185.239.236.116:8333 +185.189.132.178:57780 +185.211.59.50:8333 +185.233.148.146:8333 +185.238.129.113:8333 +185.249.199.106:8333 185.251.161.54:8333 +187.189.153.136:8333 +188.37.24.190:8333 188.42.40.234:18333 -188.65.212.138:8333 -188.65.212.157:8333 +188.61.46.36:8333 188.68.45.143:8333 188.127.229.105:8333 -188.131.177.130:8333 +188.134.6.84:8333 188.134.8.36:8333 -188.134.88.5:8333 -188.138.17.92:8333 -188.150.157.11:8333 -188.208.111.62:8333 -188.231.177.149:8333 -190.2.145.177:8333 -190.104.249.44:8333 +188.214.129.65:20012 +188.230.168.114:8333 +189.34.14.93:8333 +189.207.46.32:8333 +190.211.204.68:8333 191.209.21.188:8333 192.3.11.20:8333 -192.3.11.24:8333 -192.34.56.59:8333 +192.3.185.210:8333 192.65.170.15:8333 192.65.170.50:8333 192.146.137.18:8333 -192.166.47.32:8333 -192.169.94.29:8333 +192.157.202.178:8333 192.227.80.83:8333 -192.254.65.126:8333 193.10.203.23:8334 -193.29.57.4:8333 +193.25.6.206:8333 +193.42.110.30:8333 193.58.196.212:8333 -193.59.41.11:8333 -193.84.116.22:8333 -193.108.131.43:8333 -193.148.71.10:8333 -193.169.244.190:8333 +193.106.28.8:8333 +193.189.190.123:8333 193.194.163.35:8333 193.194.163.53:8333 -194.5.159.197:8333 194.14.246.205:8333 -194.135.92.96:8333 +194.36.91.253:8333 +194.126.113.135:8333 194.135.135.69:8333 -194.158.92.150:8333 -194.187.251.163:31239 +195.56.63.4:8333 195.56.63.5:8333 -195.56.63.10:8333 195.67.139.54:8333 -195.95.225.17:8333 195.135.194.8:8333 -195.154.113.90:8333 -195.206.20.114:8333 +195.202.169.149:8333 195.206.105.42:8333 195.209.249.164:8333 -195.224.116.20:8333 198.1.231.6:8333 -198.251.83.19:8333 -199.48.83.58:8333 -199.96.50.211:8333 -199.188.204.25:8333 -199.192.20.201:8333 -200.76.194.7:8333 -200.87.116.213:8333 -202.28.194.82:8333 +198.200.43.215:8333 +199.182.184.204:8333 +199.247.7.208:8333 +199.247.249.188:8333 +200.7.252.118:8333 +200.20.186.254:8333 +200.83.166.136:8333 202.55.87.45:8333 +202.79.167.65:8333 +202.108.211.135:8333 +202.169.102.73:8333 203.130.48.117:8885 203.132.95.10:8333 -204.14.245.180:8333 -204.152.203.98:8333 -205.209.162.98:8333 -206.221.178.149:8333 +203.151.166.123:8333 +204.93.113.108:8333 +204.111.241.195:8333 +206.124.149.66:8333 +207.115.102.98:8333 +207.229.46.150:8333 +208.76.252.198:8333 +208.100.13.56:8333 +208.100.178.175:8333 208.110.99.105:8333 +209.6.210.179:8333 209.133.220.74:8333 -209.151.237.71:8333 -211.149.170.31:8333 -212.51.132.226:8333 -212.241.70.213:8333 -213.21.15.22:8333 -213.136.83.8:8333 -213.227.152.108:8333 -213.254.23.116:8333 -216.108.236.180:8333 -216.194.165.98:8333 +209.141.57.57:8333 +211.27.147.67:8333 +212.34.225.118:8333 +212.89.173.216:8333 +212.99.226.36:9020 +212.237.96.98:8333 +213.89.131.53:8333 +216.38.129.164:8333 +216.134.165.55:8333 +216.146.251.8:8333 +216.189.190.95:8333 +216.226.128.189:8333 216.236.164.82:8333 -217.16.185.165:8333 -217.21.24.146:8333 +217.19.216.210:8333 217.26.32.10:8333 217.64.47.138:8333 217.64.133.220:8333 217.92.55.246:8333 -217.172.244.9:8333 -218.75.140.45:8333 -219.75.122.47:8333 -220.233.138.130:8333 -221.130.29.230:18421 -222.122.49.40:8333 -222.186.169.1:8333 -222.222.43.29:8333 +218.31.113.245:8333 +218.255.242.114:8333 +220.133.39.61:8333 223.16.30.175:8333 +[2001:19f0:6001:306f:ec4:7aff:fe8f:66ec]:8333 [2001:1bc0:cc::a001]:8333 [2001:1c02:2f18:d00:b62e:99ff:fe49:d492]:8333 -[2001:250:200:7:d6a9:fcf4:e78d:2d82]:8333 -[2001:41c9:1:424::231]:8333 -[2001:41d0:1004:19b4::]:8333 -[2001:44b8:4195:1801:5c73:5d67:d2a6:9910]:8333 -[2001:470:88ff:2e::1]:8333 +[2001:4100:0:64::93]:8333 +[2001:4100:0:64:dcaf:afff:fe00:6707]:8333 [2001:470:a:c13::2]:8333 -[2001:4800:7821:101:be76:4eff:fe04:9f50]:8333 -[2001:4801:7819:74:b745:b9d5:ff10:aaec]:8333 -[2001:48d0:1:2163:0:ff:febe:5a80]:8333 +[2001:4801:7819:74:b745:b9d5:ff10:a61a]:8333 [2001:4ba0:fffa:5d::93]:8333 +[2001:610:1908:ff01:f816:3eff:fe33:2e32]:8333 [2001:638:a000:4140::ffff:191]:8333 +[2001:648:2800:131:4b1f:f6fc:20f7:f99f]:8333 [2001:678:7dc:8::2]:8333 -[2001:678:ec:1:250:56ff:fea7:47e9]:8333 -[2001:67c:10ec:2a49:8000::1082]:8333 +[2001:678:cc8::1:10:88]:20008 +[2001:67c:1220:80c::93e5:dd2]:8333 +[2001:67c:1220:80c:e5dc:ad0c:9289:c28f]:8333 [2001:67c:16dc:1201:5054:ff:fe17:4dac]:8333 -[2001:67c:21ec:1000::a]:8333 +[2001:67c:2354:2::22]:8333 [2001:67c:26b4:12:7ae3:b5ff:fe04:6f9c]:8333 -[2001:67c:2db8:6::45]:8333 -[2001:700:300:1513:29c7:2430:190e:ab59]:8333 +[2001:67c:2f0::20:fa]:8333 [2001:718:801:311:5054:ff:fe19:c483]:8333 -[2001:818:e245:f800:4df:2bdf:ecf5:eb60]:8333 +[2001:8d8:87c:7c00::99:3c1]:8333 [2001:8f1:1404:3700:8e49:715a:2e09:b634]:9444 -[2001:ba8:1f1:f069::2]:8333 -[2001:bb8:4008:20:648c:5eff:fe74:ce4]:8333 -[2001:da8:d800:821:a7d5:f5a7:530d:b71e]:8333 +[2001:b07:5d29:99a5:194b:3874:d65e:a90d]:8333 +[2001:ba8:1f1:f0fe::2]:8333 +[2001:bc8:1200:0:dac4:97ff:fe2a:3554]:20008 +[2001:da8:100d:22:10fa:d85f:10f2:21fd]:8333 +[2001:da8:8001:7a39:f035:7d:b99f:eb79]:8333 [2001:e42:103:100::30]:8333 -[2001:e68:7400:2:6854:419e:221c:82f3]:8333 -[2002:b610:1ca3::b610:1ca3]:8333 -[2002:b6ff:3dca::b6ff:3dca]:28364 -[2400:2651:42e0:3300:40b4:576d:d14c:65d4]:8333 +[2400:2412:103:c900:825:8f20:eaff:65c2]:8333 [2400:4052:e20:4f00:69fe:bb33:7b1c:a1ca]:8333 -[2401:2500:203:184::15]:8333 +[2401:1800:7800:105:be76:4eff:fe1c:b35]:8333 [2401:3900:2:1::2]:8333 -[2401:a400:3200:5600:14ee:f361:4bdc:1f7c]:8333 +[2401:b140::44:150]:8333 [2401:d002:4402:0:8f28:591a:6ea0:c683]:8333 -[2402:cb40:1000:504::dead]:8333 +[2403:6200:8821:3d68:195b:87e9:6819:d5c8]:8333 +[2405:6580:2140:3a00:c28c:983:364b:5d70]:8333 +[2405:9800:b911:a18a:58eb:cd3c:9d82:ea4a]:8333 [2405:aa00:2::40]:8333 [2409:10:ca20:1df0:224:e8ff:fe1f:60d9]:8333 -[2409:8a15:4a1a:2830:7285:c2ff:fe70:60a4]:8333 -[2409:8a1e:6938:d2c0:2e0:70ff:fe86:cb59]:8333 -[2409:8a28:421:2580:2e0:70ff:fe8b:13e]:8333 -[2409:8a28:421:2770:2e0:70ff:fe87:fecb]:8333 +[2409:8a1e:a9af:3660:1c5a:5b6b:8a2d:9848]:8333 +[2409:8a1e:a9af:3660:404:39ba:88f2:e8df]:8333 +[240b:10:9141:400:49b4:3a2e:1e5:84c]:8333 +[240d:1a:759:6000:a7b1:451a:8874:e1ac]:8333 [240d:1a:759:6000:ddab:3141:4da0:8878]:8333 -[2600:3c01::f03c:91ff:fecd:1b95]:8333 -[2600:6c40:7980:27:20a:f7ff:fe69:f4d5]:8333 -[2602:ffc5::ffc5:b844]:8333 -[2604:2d80:c808:857b:8d6:9e1c:7131:4bea]:8333 +[2600:8805:2400:14e:12dd:b1ff:fef2:3013]:8333 +[2601:602:8d80:b63:dc3e:24ff:fe92:5eb]:8333 +[2602:ffb6:4:2798:f816:3eff:fe2f:5441]:8333 +[2602:ffb6:4:739e:f816:3eff:fe00:c2b3]:8333 +[2602:ffb8::208:72:57:200]:8333 +[2604:1380:4111:9300::1]:8333 [2604:4300:a:2e:21b:21ff:fe11:392]:8333 +[2604:4500::2e06]:8112 +[2604:5500:706a:4000:fc79:b9bb:1d7:c325]:8333 [2604:5500:c134:4000::3fc]:32797 -[2604:5500:c2a3:7b00:cc6:373b:44a8:caa4]:8333 -[2604:6000:6e85:4a01:a82d:f9ff:fef5:28b9]:8333 -[2604:7780:303:80::80]:8333 +[2604:6800:5e11:162:5c8f:d2ff:fe26:146f]:8333 [2605:4d00::50]:8333 -[2605:9880:0:777:225:90ff:fefc:8958]:8333 +[2605:6400:20:13bf:df1d:181c:83bb:22e8]:8333 [2605:ae00:203::203]:8333 [2605:c000:2a0a:1::102]:8333 -[2605:e000:1127:8fc:ec63:a191:32c2:633c]:8333 -[2605:e200:d202:300:20c:29ff:fef1:85ec]:8333 -[2605:f700:100:400::131:5b54]:8333 -[2606:c680:0:b:3830:34ff:fe66:6663]:8333 -[2607:4480:2:1:38:102:69:70]:8333 -[2607:9280:b:73b:250:56ff:fe21:9c2f]:8333 -[2607:f128:40:1703::2]:8333 -[2607:f188:0:4:eef4:bbff:fecc:6668]:8333 -[2607:f2c0:e1e2:11:1044:9b7a:b81e:1d74]:8333 +[2607:f2c0:f00e:300::54]:8333 +[2607:f2f8:ad40:bc1::1]:8333 [2607:f470:8:1048:ae1f:6bff:fe70:7240]:8333 +[2607:ff28:800f:97:225:90ff:fe75:1110]:8333 [2620:11c:5001:1118:d267:e5ff:fee9:e673]:8333 -[2620:6e:a000:1:42:42:42:42]:8333 -[2804:14d:baa7:9674:21e:67ff:fea8:d799]:8333 -[2804:14d:baa7:9674:3615:9eff:fe23:d610]:8333 -[2804:39e8:ff85:a600:7285:c2ff:feae:9925]:8333 -[2804:d41:aa01:1600:5a2d:3b27:3b83:2b45]:8333 -[2a00:12d8:7001:1:46e7:6915:75be:92f9]:8333 +[2620:6e:a000:2001::6]:8333 +[2804:14d:4c93:9809:9769:da80:1832:3480]:8333 +[2a00:1328:e101:c00::163]:8333 [2a00:1398:4:2a03:215:5dff:fed6:1033]:8333 +[2a00:13a0:3015:1:85:14:79:26]:8333 [2a00:1630:14::101]:8333 [2a00:1768:2001:27::ef6a]:8333 [2a00:1828:a004:2::666]:8333 -[2a00:1838:36:142::ec73]:8333 +[2a00:1838:36:17::38cb]:8333 [2a00:1838:36:7d::d3c6]:8333 -[2a00:1f40:2::1126]:8333 -[2a00:23a8:41d0:5800:20c:29ff:fe0d:6a75]:8333 -[2a00:23c5:fd01:9f00:6317:7c02:788f:88ea]:8333 -[2a00:6020:13c2:3800:be6a:a1c8:c9e7:65ec]:8333 -[2a00:63c2:8:88::2]:8333 -[2a00:7143:3::227]:8333 -[2a00:7b80:452:2000::138]:8333 +[2a00:1c10:2:709:58f7:e0ff:fe24:a0ba]:22220 +[2a00:1c10:2:709::217]:22220 +[2a00:1f40:5001:100::31]:8333 +[2a00:6020:1395:1400:baf7:2d43:60b3:198b]:8333 +[2a00:7c80:0:10b::3faf]:8333 [2a00:8a60:e012:a00::21]:8333 +[2a00:ab00:603:84::3]:8333 +[2a00:bbe0:cc:0:62a4:4cff:fe23:7510]:8333 [2a00:ca8:a1f:3025:f949:e442:c940:13e8]:8333 -[2a00:d70:0:15:f816:3eff:fe73:d819]:8333 -[2a00:d880:5:331::3978]:8333 -[2a01:238:420f:9200:fa5a:1a4b:1e6a:fadf]:8333 +[2a00:d2a0:a:3d00:1cdf:38bb:a7d6:c251]:8333 +[2a00:d880:11::20e]:8333 +[2a00:ec0:7207:9100:5f8f:25dd:2574:3982]:8333 +[2a00:f820:433::36]:8333 +[2a01:138:a017:b018::42]:8333 [2a01:430:17:1::ffff:1153]:8333 -[2a01:488:66:1000:53a9:1573:0:1]:8333 -[2a01:4f8:120:80cc::2]:8433 -[2a01:5f0:beef:5:0:3:0:1]:52101 -[2a01:79c:cebc:a630:9dd8:ef55:8374:92a1]:8333 -[2a01:7a0:2:137a::11]:8333 +[2a01:490:16:301::2]:8333 +[2a01:4b00:807c:1b00:cda1:c6a:2bad:2418]:8333 +[2a01:4b00:80e7:5405::1]:8333 +[2a01:4f8:192:4212::2]:8433 [2a01:7a0:2:137c::3]:8333 -[2a01:7c8:aab6:db:5054:ff:feca:cfc8]:8333 -[2a01:8b81:6403:4700::1]:8333 -[2a01:cb00:7cd:b000:fa1f:bd1:fe0:62a6]:8333 -[2a01:cb00:d3d:7700:227:eff:fe28:c565]:8333 +[2a01:7a7:2:1467:ec4:7aff:fee2:5690]:8333 +[2a01:7c8:d002:10f:5054:ff:fe5c:dac7]:8333 +[2a01:7c8:d002:318:5054:ff:febe:cbb1]:8333 +[2a01:8740:1:ffc5::8c6a]:8333 +[2a01:cb00:f98:ca00:5054:ff:fed4:763d]:8333 +[2a01:cb14:cf6:bc00:21e5:f12e:32c8:145]:8333 +[2a01:d0:0:1c::245]:8333 [2a01:d0:bef2::12]:8333 -[2a01:d0:f34f:1:1f67:e250:6aeb:b9c4]:8333 -[2a01:e34:ee6b:2ab0:88c2:1c12:f4eb:c26c]:8333 -[2a01:e35:2fba:2e90:1:0:b:1]:8333 -[2a02:1205:505d:eb50:beae:c5ff:fe42:a973]:8333 -[2a02:120b:2c3f:a90:10dd:31ff:fe42:5079]:8333 -[2a02:130:300:1520:1::2]:8333 -[2a02:13b8:4000:1000:216:e6ff:fe92:8619]:8333 +[2a01:e35:2e40:6830:211:32ff:fea6:de3d]:8333 +[2a02:1205:c6aa:60c0:70d8:aaee:a82d:993c]:8333 +[2a02:169:502::614]:8333 [2a02:180:1:1::5b8f:538c]:8333 -[2a02:2168:8062:db00:96de:80ff:fea3:fd00]:8333 -[2a02:2770:5:0:21a:4aff:fe44:8370]:8333 -[2a02:2788:864:fb3:5b8a:c8f7:9fff:ae2d]:8333 -[2a02:2f0d:607:bc00:5e9a:d8ff:fe57:8bc5]:8333 -[2a02:348:9a:83b1::1]:8333 +[2a02:348:62:5ef7::1]:8333 [2a02:390:9000:0:218:7dff:fe10:be33]:8333 -[2a02:4780:8:6:2:354e:1256:7a04]:8333 -[2a02:578:4f07:24:76ad:cef7:93c1:b9b9]:8333 -[2a02:6d40:30f6:e901:89b8:bb58:25a:6050]:8333 -[2a02:750:7:c11:5054:ff:fe43:eb81]:8333 [2a02:7aa0:1619::adc:8de0]:8333 -[2a02:7b40:4f62:19ae::1]:8333 -[2a02:8108:95bf:eae3:211:32ff:fe8e:b5b8]:8333 -[2a02:e00:fff0:23f::1]:8333 -[2a02:e00:fff0:23f::a]:8333 -[2a03:1b20:1:f410:40::3e]:16463 +[2a02:7b40:b0df:8925::1]:8333 +[2a02:7b40:b905:37db::1]:8333 +[2a02:810d:8cbf:f3a8:96c6:91ff:fe17:ae1d]:8333 +[2a02:8389:1c0:9680:201:2eff:fe82:b3cc]:8333 +[2a02:a454:a516:1:517:928:7e0d:957c]:8333 +[2a02:af8:fab0:804:151:236:34:161]:8333 +[2a02:af8:fab0:808:85:234:145:132]:8333 +[2a02:e00:fff0:1e2::a]:8333 +[2a03:2260:3006:d:d307:5d1d:32ca:1fe8]:8333 [2a03:6000:870:0:46:23:87:218]:8333 [2a03:9da0:f6:1::2]:8333 +[2a03:c980:db:47::]:8333 [2a03:e2c0:1ce::2]:8333 -[2a04:2180:0:2::f2]:8333 -[2a04:2180:1:c:f000::15]:8333 -[2a04:52c0:101:97f::dcbe]:8333 +[2a04:3544:1000:1510:706c:abff:fe6c:501c]:8333 +[2a04:52c0:101:383::2a87]:8333 +[2a04:52c0:101:3fb::4c27]:8333 [2a04:ee41:83:50df:d908:f71d:2a86:b337]:8333 -[2a05:1700::100]:8333 -[2a05:fc87:4::2]:8333 -[2a05:fc87:4::7]:8333 -[2a07:5741:0:69d::1]:8333 -[2a07:5741:0:7cd::1]:8333 -[2a07:7200:ffff:c53f::e1:17]:8333 +[2a05:6d40:b94e:d100:225:90ff:fe0d:cfc2]:8333 +[2a05:e5c0:0:100:250:56ff:feb9:d6cb]:8333 +[2a05:fc87:1:6::2]:8333 +[2a05:fc87:4::8]:8333 +[2a07:5741:0:115d::1]:8333 +[2a07:a880:4601:1062:b4b4:bd2a:39d4:7acf]:51401 +[2a07:abc4::1:946]:8333 [2a07:b400:1:34c::2:1002]:8333 +[2a0a:8c41::b4]:8333 +[2a0a:c801:1:7::183]:8333 [2a0b:ae40:3:4a0a::15]:8333 -[2a0e:b780::55d1:f05b]:8333 +[2a0f:df00:0:254::46]:8333 +[2c0f:f598:5:1:1001::1]:8333 [2c0f:fce8:0:400:b7c::1]:8333 -2empatdfea6vwete.onion:8333 -34aqcwnnuiqh234f.onion:8333 -3gxqibajrtysyp5o.onion:8333 -3sami4tg4yhctjyc.onion:8333 -3w77hrilg6q64opl.onion:8333 -46xh2sbjsjiyl4fu.onion:8333 -4ee44qsamrjpywju.onion:8333 -4haplrtkprjqhm2j.onion:8333 -4u3y3zf2emynt6ui.onion:8333 -57dytizbai7o4kq7.onion:8333 -5guaeulc7xm4g2mm.onion:8334 -5mtvd4dk62ccdk4v.onion:8333 -5pmjz6mmikyabaw5.onion:8333 -6eurcxoqsa4qpiqq.onion:8333 -6ivvkeseojsmpby4.onion:8333 -6tlha6njtcuwpfa3.onion:8333 -6ymgbvnn6d5nfmv4.onion:8333 -72y2n5rary4mywkz.onion:8333 -7b75ub5dapphemit.onion:8333 -7xaqpr7exrtlnjbb.onion:8333 -a64haiqsl76l25gv.onion:8333 -ab7ftdfw6qhdx3re.onion:8333 -aiupgbtdqpmwfpuz.onion:8333 -akeg56rzkg7rsyyg.onion:8333 -akinbo7tlegsnsxn.onion:8333 -anem5aq4cr2zl7tz.onion:8333 -at3w5qisczgguije.onion:8333 -auo4zjsp44vydv6c.onion:8333 -bowg4prf63givea4.onion:8333 -cjuek22p4vv4hzbu.onion:8333 -cklaa2xdawrb75fg.onion:8333 -coxiru76nnfw3vdj.onion:8333 -cwq2fuc54mlp3ojc.onion:8333 -dganr7dffsacayml.onion:8333 -djbsspmvlc6ijiis.onion:8333 -dmfwov5ycnpvulij.onion:8333 -dp2ekfbxubpdfrt4.onion:8333 -dw2ufbybrgtzssts.onion:4333 -edkmfeaapvavhtku.onion:8333 -ejdoey3uay3cz7bs.onion:8333 -eladlvwflaahxomr.onion:8333 -ffhx6ttq7ejbodua.onion:8333 -hbnnzteon75un65y.onion:8333 -hcyxhownxdv7yybw.onion:8333 -hdfcxll2tqs2l4jc.onion:8333 -hdld2bxyvzy45ds4.onion:8333 -hlnnhn2xj2qffqjs.onion:8333 -hnqwmqikfmnkpdja.onion:8333 -hvmjovdasoin43wn.onion:8333 -hwzcbnenp6dsp6ow.onion:8333 -i5ellwzndjuke242.onion:8333 -iapvpwzs4gpbl6fk.onion:8885 -if7fsvgyqwowxkcn.onion:8333 -ilukzjazxlxrbuwy.onion:8333 -kswfyurnglm65u7b.onion:8333 -ldu2hbiorkvdymja.onion:8333 -lvvgedppmpigudhz.onion:8333 -mk3bnep5ubou7i44.onion:8333 -muhp42ytbwi6qf62.onion:8333 -n5khsbd6whw7ooip.onion:8333 -ndmbrjcvu2s6jcom.onion:8333 -nf4iypnyjwfpcjm7.onion:8333 -nkdw6ywzt3dqwxuf.onion:8333 -o4sl5na6jeqgi3l6.onion:8333 -opencubebqqx3buj.onion:8333 -ovbkvgdllk3xxeah.onion:8333 -pg2jeh62fkq3byps.onion:8333 -pkcgxf23ws3lwqvq.onion:8333 -qdtau72ifwauot6b.onion:8333 -qidnrqy2ozz3nzqq.onion:8333 -readybit5veyche6.onion:8333 -s2epxac7ovy36ruj.onion:8333 -satofxsc3xjadxsm.onion:8333 -sv5oitfnsmfoc3wu.onion:8333 -uftbw4zi5wlzcwho.onion:8333 -uz3pvdhie3372vxw.onion:8333 -v2x7gpj3shxfnl25.onion:8333 -vov46htt6gyixdmb.onion:8333 -wg3b3qxcwcrraq2o.onion:8333 -wgeecjm4w4ko66f7.onion:8333 -wmxc6ask4a5xyaxh.onion:8333 -wqrafn4zal3bbbhr.onion:8333 -xhi5x5qc44elydk4.onion:8333 -xk6bjlmgvwojvozj.onion:8333 -xmgr7fsmp7bgburk.onion:8333 -xocvz3dzyu2kzu6f.onion:8333 -xv7pt6etwxiygss6.onion:8444 -yumx7asj7feoozic.onion:8333 -zmaddsqelw2oywfb.onion:8444 +226eupdnaouu4h2v.onion:8333 +22h7b6f3caabqqsu.onion:8333 +23wdfqkzttmenvki.onion:8333 +23yi3frxymtwdgre.onion:8333 +2ajon3moyf4i2hbb.onion:8333 +2bfmlpk55hffpl6e.onion:8333 +2ckmbf6sglwydeth.onion:8333 +2hkusi5gcaautwqf.onion:8333 +2ivhmlbxbgnkcykl.onion:8333 +2mmxouhv6nebowkq.onion:8333 +2qsnv6exnuuiar7z.onion:8333 +2qudbhlnvqpli3sz.onion:8333 +2ujxdfovfyjpmdto.onion:8333 +2xdgeufrek3eumkw.onion:8333 +2xdzsruhsej4tsiw.onion:8333 +34ran2woq4easmss.onion:8333 +36q7khhej2lxd3wf.onion:8333 +373wjdspuo52utzq.onion:8333 +376klet5xqbrg2jv.onion:8333 +37kwd7fxop766l5k.onion:8333 +3e5t7hq4alt5tovx.onion:8333 +3gbxhebfhouuwgc3.onion:8333 +3hgbjze2nbwyuewf.onion:8333 +3iuuvrd2waha2cxo.onion:8333 +3jtxujdaiwh6iltu.onion:8333 +3l5eq2du7mvscj4a.onion:8333 +3nofngnqlqeehn7o.onion:8333 +3r44ddzjitznyahw.onion:8333 +3vtbuwmton7vq5qz.onion:8333 +46ohzttz4peki43g.onion:8333 +47fl3ivl4v56jstr.onion:8333 +47i6qrl2ijqcwlg6.onion:8333 +47uupgzcnrwahoto.onion:8333 +4c5cki37evofds6d.onion:8333 +4eq36jrx7xuytfpc.onion:8333 +4ewkdxvcg57adrni.onion:8333 +4flvgibnm2nld3na.onion:8333 +4iaontym47imawe4.onion:8333 +4jxz37oou5ag763c.onion:8333 +4mnkvj6ha73eqnbk.onion:8333 +4nnuyxm5k5tlyjq3.onion:8333 +4nz2yg4cnote3ej7.onion:8333 +4pozwh6564ygzddk.onion:8333 +4qgfb56rvpbmesx7.onion:8333 +4rsax23taqzwmimj.onion:8333 +4u5j5ay6rasowt4m.onion:8333 +4vorvtoyegh4zbvr.onion:8333 +52s4j5pldwlpzhtw.onion:8333 +5abpiiqfvekoejro.onion:8333 +5aydzxx6jyoz3nez.onion:8333 +5cxzdsrtok5dgo4a.onion:8333 +5eduikpudie3jyrf.onion:8333 +5epeafkmya4fv5d5.onion:8333 +5fyxlztic3t6notz.onion:8333 +5hd6eyew5ybnq6gb.onion:8333 +5jyfzhwksb6urrp2.onion:8333 +5nooqgct567ig57v.onion:8333 +5nsfm4nqqzzprjrp.onion:8333 +5oqstxspzhlgjef6.onion:8333 +5pzzmd4tfonrqzb2.onion:8333 +5sckmx4yucbnp4io.onion:8333 +5ue7worzbn6hon3e.onion:8333 +5wxhx2tozpovf6z3.onion:8333 +5xk3yun36e32e34i.onion:8333 +5zght2g7vcsapi65.onion:8333 +62dcdpvdolfzkdzl.onion:8333 +63bko2mhixnn2b7d.onion:8333 +67hjvfv6wictalm5.onion:8333 +6g6ko4klkf5atldi.onion:8333 +6k5zreexw4cadxi5.onion:8333 +6kf5ayhlpenywgas.onion:8333 +6maigxjvcet4pite.onion:8333 +6ressv4dvplb5ihh.onion:8333 +6rjex6gyuaui3c5e.onion:8333 +6skgnf43pphdvjua.onion:8333 +6stxaoduwisg5sqh.onion:8333 +6xqy4ts6bo6u5dgm.onion:8333 +7avnl3dqpgu23jva.onion:8333 +7ff4wk266no23txn.onion:8333 +7hipbuzfdcyzqkkg.onion:8333 +7sjmlzrthjlpfydk.onion:8333 +7tut3zt2akwrmw6x.onion:8333 +7uhsjzj6nx3dfnxt.onion:8333 +7wm4wso3wvatxnbt.onion:8333 +7ykmzuybwd2ptzg4.onion:8333 +a27bvhina4y23jxo.onion:8333 +a53vtdm7uiet5vdl.onion:8333 +a56572xjuofnt2dp.onion:8333 +abp25knifdsnc2rv.onion:8333 +aefx7ubzpal7clak.onion:8333 +ai5r2diozoe7rrdz.onion:8333 +aipupphit3enggpj.onion:8333 +algpjjygd3gtnmpp.onion:8333 +alihua7rhyc452hr.onion:8333 +am3gyyfynxzwyxhx.onion:8333 +ankozzfhl2r3uc6u.onion:8333 +at3twjlbtc2lqnq5.onion:8333 +avqobl72pmc64dyi.onion:8333 +awmdz2fs3b5h5ut5.onion:8333 +ayywpiy77butdjrj.onion:8333 +b2i3pj7c24cvprs7.onion:8333 +b4ilebyxcu6nttio.onion:8333 +b4vvkbqipcmkwp4v.onion:8333 +bddfqxps5ibd3ftw.onion:8333 +be5bgcpo4ooux5qy.onion:8333 +bgla4m6zetvtv7ls.onion:8333 +bh32gzw3nyckzqut.onion:8333 +bho4kodpehn7xr3x.onion:8333 +bitcoin4rlfa4wqx.onion:8333 +biw7s6jf6r2mf3cu.onion:8333 +bk7yp6epnmcllq72.onion:8333 +blcktrgve5vetjsk.onion:8333 +blwbp7gfdffdsx4g.onion:8333 +bnxn6qqc55gvn5op.onion:8333 +bp7o22lvcjawelvv.onion:8333 +bqqyqucgj4tchn64.onion:8333 +bvdzmutcqf7gzzn5.onion:8333 +c36zmegjkinftmtf.onion:8333 +c4fn62gnltlgrptv.onion:8333 +caael5yedviooqzk.onion:8333 +caq54ablfbrnumdd.onion:8333 +cernrmrk5zomzozn.onion:8333 +chri6itgjaagof4t.onion:8333 +cncwik3tnd2ejm5z.onion:8333 +cuyjqoziemcmwaxl.onion:8333 +cx7qa2gpqyp7pld5.onion:8333 +czp7wgaus4gvio72.onion:8333 +d2fn54rfyjdangi4.onion:8333 +d2sk45u6ca64yeqh.onion:8333 +d3aowmngvktsziae.onion:8333 +d5iu4aiz3y2kgcgj.onion:8333 +d6zbw2sxnxgj5sv3.onion:8333 +db5rd5e46t7mgini.onion:8333 +dci2gulorl44yj55.onion:8333 +ddpth2mwt3rsvoog.onion:8333 +dfrwza7fcecknnms.onion:8333 +djwhjfj4rh3oz3yj.onion:8333 +dkk5mmpe5jtjodk5.onion:8333 +doj3zgmsbzurmqgp.onion:8333 +dpce4f3rcqddzbx5.onion:8333 +drwo3vnxch5ozfbo.onion:8333 +duikkidxip3lyexn.onion:8333 +duqdliptc22i6hf5.onion:8333 +duyp4coh5d7nh3ud.onion:8333 +duz5two3z7c55lxj.onion:8333 +dvu6dlar6ezc6xen.onion:8333 +dy6zqs46ycleayyp.onion:8333 +dz2ydmj3yqrcm4r7.onion:8333 +e2b2a5suvdawzxud.onion:8333 +e33h57j2ewkkqsn5.onion:8333 +e5kjiay7pzj5qpzv.onion:8333 +e7iko42d2wzcmvy4.onion:8333 +ea6boh4kotq56ws5.onion:8333 +efdx6gc4s5ezyqeg.onion:8333 +efrpuuic6ukeyqcs.onion:8333 +egruc3bi3itru6gq.onion:8333 +erc6tjs2ucyadl23.onion:8333 +eue2n5sk5tktg5bv.onion:8333 +ezkr7stq4w7ohjrt.onion:8333 +f3nyyjba6kpxznhk.onion:8333 +faq73vj4pcs73thu.onion:8333 +fdvtlj3pscbxuh75.onion:8333 +fgdpxov4nzxvhcpv.onion:8333 +fisqq6vzk3m6t225.onion:8333 +fkgp3qwegacrd2bj.onion:8333 +fo3tdfwx27takqq5.onion:8333 +fqkxtchwypispkpv.onion:8333 +fqunuhlwvd7rq6d5.onion:8333 +frwt5mscpyhiuwpe.onion:8333 +fta4gfjiuv6f2le2.onion:8333 +fuoy2ipuqrqwe5cf.onion:8333 +fz6nsij6jiyuwlsc.onion:8333 +g3vlnaaaog5sgui5.onion:8333 +g44i6jwsutkwmspz.onion:8333 +g55t65d5ckjixcnw.onion:8333 +gajd6eyrl2qwkfmg.onion:8333 +gblue3hr53p4grx7.onion:8333 +gbpro5tzduiuff4v.onion:8333 +gc4l3tql32qhfgmi.onion:8333 +gcnlorvtpycuajc6.onion:8333 +gdsib2nk2eeoidgc.onion:8333 +ge5gm7c6w7yahpz7.onion:8333 +gegcteeep4cwftl5.onion:8333 +gfoyraudgv5qjdku.onion:8333 +ggpbuypmxgi26lc6.onion:8333 +ghqivye7cfckisnt.onion:8333 +girakxomne5fby64.onion:8333 +glz5gfk33tuug5ne.onion:8333 +gplatxoyg5nxl5rj.onion:8333 +gripl5xjwy2dcr6c.onion:8333 +gthhzlmqci22nxru.onion:8333 +gto2d64swosfmk6c.onion:8333 +guaciney52mgcbp2.onion:8333 +gwktgrmtwk6nv5sc.onion:8333 +gwoxnokdcwc7hy4p.onion:8333 +h333f4qnwe7mrymn.onion:8333 +h6a32n4blbwwyn4d.onion:8333 +hafwtrbooszoembm.onion:8333 +hbwhgsb3eeinnr6t.onion:8333 +hcv6foxh5mk7fhb5.onion:8333 +hd6hktcl6wamzlzm.onion:8333 +hda6msa4v4rt77gx.onion:8333 +hdgnxkuqsd6wjwwx.onion:8333 +hgh3azn3eesddvcg.onion:8333 +hhyxu6bwkjefejoz.onion:8333 +hizn6rmofsg3upmn.onion:8333 +hjqxxsy2osemfvev.onion:8333 +hkbp7mbgw6klls4s.onion:8333 +hlojuwiwbkoj4kdz.onion:8333 +hlzxsjr7ob3qzzqq.onion:8333 +hniuzplezebyhv7a.onion:8333 +hondewkj4s4rdcwf.onion:8333 +hql5nv6vhceid3bn.onion:8333 +hspjo7mqrre5gyxr.onion:8333 +hu64s2mdr3x7yxka.onion:8333 +hvwvq2swkqw3qvyo.onion:8333 +hwo2biyndrrvpl6f.onion:8333 +hzxj3dth3y2xt45o.onion:8333 +i3ufxuw3t7cxfdpq.onion:8333 +ia3n3q5u45gvpx7a.onion:8333 +icfgs3fctckd4yeo.onion:8333 +icpz6thqvdjcwlvb.onion:8333 +if32zo5u4mhdunfd.onion:8333 +ig4lguql6vxkbmmr.onion:8333 +ihhcr7fhczqdac4y.onion:8333 +ijm2tyxob7vkvazz.onion:8333 +ip3puuqghumfz5ww.onion:8333 +iq3ket72f3y2frpg.onion:8333 +iqagt5co4dt7h6hf.onion:8333 +iugw42ih6hprqr26.onion:8333 +ivf774v4t7k63i6d.onion:8333 +ivfacdf7cig2z2y2.onion:8333 +ivsxdwku5og2zj4l.onion:8333 +ixwgrhaklvu4g6o7.onion:8333 +iz56moo6mkp3g7xo.onion:8333 +j2cp5muw5j3lumcx.onion:8333 +j2lrkrwugldwewws.onion:8333 +j2qtmkd2dablssz4.onion:8333 +j5e2yuan57v2h5el.onion:8333 +j5jfrdthqt5g25xz.onion:8333 +j5lk2uv2bspfqxfk.onion:8333 +janvvzsmzcsj3fil.onion:8333 +jenn2tmyl3xxarmq.onion:8333 +jfoe5f2sczojfp32.onion:8333 +jgcgi6k2pxooi5q3.onion:8333 +jhana24s3dzkitzp.onion:8333 +jitgulb24mvfqrdg.onion:8333 +jjuvwbjfzljmn7t3.onion:8333 +jlcfomgr5xfexaif.onion:8333 +jlehs6ybb26qlnna.onion:8333 +jljzz4tmbqrxq3q5.onion:8333 +joc4oqceedkg77vf.onion:8333 +jr5y6njubcbv6g37.onion:8333 +jroaos6la4vieho4.onion:8333 +jsmphgkay7iihbkr.onion:8333 +jtksnokusbzms7wl.onion:8333 +ju5duo3r6p6diznc.onion:8333 +jw6zymxcnebahuuj.onion:8333 +jxalvhf7w7wevqzw.onion:8333 +jyzhe3ig44ickysb.onion:8333 +jze6ukn4idrh44eo.onion:8333 +k4glotlxnmttb6ct.onion:8333 +k7uy3iwmvguzygd2.onion:8333 +kl23ofag3ukb6hxl.onion:8333 +kokt2qr6d4pmyb2d.onion:8333 +kpalu3h5ydkoaivs.onion:8333 +krdpbdvtqw5c5lee.onion:8333 +kriw6kzjzarzgb3g.onion:8333 +krp2thcmwrpsoue6.onion:8333 +kvyvdwjwtae5mo77.onion:8333 +kyrxri5rbr6ipurs.onion:8333 +kz3oxg7745dxt62q.onion:8333 +l3w5fcki2wbro2qb.onion:8333 +l44bisuxhh7reb5q.onion:8333 +l565g523emjebusj.onion:8333 +l6w5kdeigwsgnf5t.onion:8333 +l7a4emryfxkjgmmb.onion:8333 +l7sloscjqqbifcsw.onion:8333 +laafjqvtog7djfl2.onion:8333 +lah676kxbgbgw3u2.onion:8333 +lbq2a7pnpmviw2qo.onion:8333 +lc4wnpql27vymi35.onion:8333 +ldoffbfpk3j6c7y7.onion:8333 +lehpmglkivobq2qo.onion:8333 +lgewpjz7ie7daqqr.onion:8333 +lgkvbvro67jomosw.onion:8333 +liw5z4ngic6b7vnv.onion:8333 +ljs7gwrmmza6q6ga.onion:8333 +lmvax3e6awaxvhqi.onion:8333 +lrz77dwf7yq4cgnt.onion:8333 +lva54pnbq2nsmjyr.onion:8333 +lxc2uphxyyxflhnf.onion:8333 +lyjybdr4hmj3bqab.onion:8333 +lz2zlnmyynwtgwf2.onion:8333 +m6hcnpikimyh37yp.onion:8333 +md635omjnrgheed3.onion:8333 +mdb3oupwf4f2qyjb.onion:8333 +me6d4esx7ohdnxne.onion:8333 +mecfkik5ci47wckj.onion:8333 +mfrvevn7w6rwsp4r.onion:8333 +mimuutlew5srtduk.onion:8333 +mnysk3izxvra3huv.onion:8333 +mqu6gqtrhm6xzwwh.onion:8333 +mwuc6vom4ngijtb3.onion:8333 +mxdtrjhe2yfsx3pg.onion:8333 +n4ibet4piscv22nj.onion:8333 +n6d46vbzx43bevlb.onion:8333 +n6t6kfgzlvozxhfm.onion:8333 +n7rrochwerf2qxze.onion:8333 +ncsdiqmnxhnnjbsz.onion:8333 +nitxw3ilffngpumv.onion:8333 +njlsvubildehluwr.onion:8333 +njslfsivyyhixbsp.onion:8333 +nkf5e6b7pl4jfd4a.onion:8333 +nkppsb3t3ducje6m.onion:8333 +nlfwyqksmeqe45zz.onion:8333 +nlyjmpcmpaz5b4aa.onion:8333 +nnmv7z65k65mcesr.onion:8333 +nrrfwdmrm3imuebn.onion:8333 +nrrmkgmulpgsbwlt.onion:8333 +nw4h7leckut7eapv.onion:8333 +nwky3wd3ihoidvb5.onion:8333 +ny4kkemmmqv4lptm.onion:8333 +o25wkcw7eorg2toi.onion:8333 +o2gumvbkw6pm45cf.onion:8333 +o4yjshdwlbshylqw.onion:8333 +ofx4qgw6lppnvtgv.onion:8333 +oketipl4gndqcaus.onion:8333 +oq5q4qrqijr2kpun.onion:8333 +oqw3mfoiobqcklxh.onion:8333 +orsy2v63ecrmdj55.onion:8333 +ot4tzmznyimmlszk.onion:8333 +owk6c2jfthwkyahe.onion:8333 +oy7ss3hm2okx4tun.onion:8333 +p2pc6wbaepvdi6ce.onion:8333 +p2x24gdhasmgcl5j.onion:8333 +p6couujr2ndhllv3.onion:8333 +pa7dw5bln5lqmu53.onion:8333 +pasmchtoooj2kchd.onion:8333 +pdapkkhk6pbcy2tj.onion:8333 +peh5ajouuw6mw4sr.onion:8333 +pkuuc5pwl5xygwhr.onion:8333 +pq4wjl7vg7tsfycc.onion:8333 +ptbwqhusps5qieql.onion:8333 +ptwpbwyj5lnyew2f.onion:8333 +pu7w3jfyrzp7sxsi.onion:8333 +pwylbyvfuc62hhvx.onion:8333 +q2fhnnyt5b2ayvce.onion:8333 +q3i3apuionbazmfe.onion:8333 +qd6fcpu3pvbf2y3x.onion:8333 +qfewv3y7a3p4i3bd.onion:8333 +qhytdttflhbc4rsh.onion:8333 +qkn35rb3x2gxbwq4.onion:8333 +qlvlexs7pwac2f4b.onion:8333 +qogcqirtuta6rlxg.onion:8333 +qrzqfxkhrmu5v5ro.onion:8333 +qsyjasq46b2syiys.onion:8333 +quu4b2zjbnr2ue4y.onion:8333 +quycfj2wenz6bfyd.onion:8333 +qvdy3cmocnlv5v7c.onion:8333 +qvwhpqygan2xky5h.onion:8333 +qyutwc26ullujafb.onion:8333 +r45qg2d6iwfdhqwl.onion:8333 +r4xudr6u4r5nyga4.onion:8333 +r6apa5ssujxbwd34.onion:8333 +r6z2gcsu37k3gaah.onion:8333 +rbrjgfcca6v5b7yo.onion:8333 +rcifxibawqt6rxzz.onion:8333 +rdo3xctk3zkzjvln.onion:8333 +rdvlepy6ghgpapzo.onion:8333 +recs3a27chv2lg65.onion:8333 +rfmbiy5vztvn6hyn.onion:8333 +rli5lbje4k77inzw.onion:8333 +roqwnmepcj453vfh.onion:8333 +rpbnx54qniivrmh3.onion:8333 +rsvvogqdlijp77hv.onion:8333 +rwm5d4hg3hc77kdt.onion:8333 +s3yelkvc5f5xeysw.onion:8333 +s6rx52hitmpp4lge.onion:8333 +sa6m3rvycipgemky.onion:8333 +savebeesmkivmfbo.onion:8333 +sbyjr5npk2mlmfw7.onion:8333 +serwj42jme5xhhmw.onion:8333 +sg4vmubv3djrzvuh.onion:8333 +shsgksluz6jkgp6g.onion:8333 +sjyzmwwu6diiit3r.onion:8333 +sk3en3reudg3sdg5.onion:8333 +skoifp4oj7l4osu5.onion:8333 +sle2caplkln33e7y.onion:8333 +smdd7q7gonajdmjq.onion:8333 +spmhuxjb2cd7leun.onion:8333 +srkgyv5edn2pa7il.onion:8333 +sslnjjhnmwllysv4.onion:8333 +su66ygras6rkdtnl.onion:8333 +sundvmbjrtgdfahx.onion:8333 +svd65k5jpal2p3lt.onion:8333 +svua5hiqluw7o2sw.onion:8333 +sxqjubmum4rmfgpu.onion:8333 +t245vi742ti3tnka.onion:8333 +t4fbovvgzpnimd2p.onion:8333 +t4l4wv3erkhpde2p.onion:8333 +t5qchwbr6u5v2agk.onion:8333 +t7jlaj6ggyx7s5vy.onion:8333 +ta6sjeqyb27f4n4a.onion:8333 +tav7utpw4pfy7j6k.onion:8333 +taxg5z2sxfm5c4d6.onion:8333 +tekwvnbodbzrlufs.onion:8333 +tg4uwrjmtr2jlbjy.onion:8333 +th4cjvffjtw6vomu.onion:8333 +th6fxymtwnfifqeu.onion:8333 +thtchhl25u26nglq.onion:8333 +tiiah7csuoklcvi6.onion:8333 +tk63x5fk3337z3ud.onion:8333 +tkgootat6cqn7vyy.onion:8333 +tnj565wwqz5wpjvs.onion:8333 +ts6qx37mmpu6nj5y.onion:8333 +ttjisvxydgbtp56f.onion:8333 +twn54v7ra2xjgd55.onion:8333 +txem5meug24g2ezd.onion:8333 +tyiunn36lmfcq5lr.onion:8333 +tyv56xs6g6ndzqux.onion:8333 +u47f3hxwq65sgs4o.onion:8333 +u4r7fnholrdwwlni.onion:8333 +u556ofb3myarafwn.onion:8333 +u5q3gbz4qpz4wvlr.onion:8333 +uakly3ydrevvpxwi.onion:8333 +ug6hapi4qtekzc7v.onion:8333 +ui553qotd6ron3rf.onion:8333 +uir7f3wltoka6bbb.onion:8333 +ukrjjhwodl44wmof.onion:8333 +ul5gm2ixy7kqdfwg.onion:8333 +undd7rsj4pen3wo4.onion:8333 +uorwpzfehtykrg43.onion:8333 +uovsp2yltnaojq6l.onion:8333 +usazmdcs32ny24dy.onion:8333 +usazs7glm7geyxkl.onion:8333 +uss2kedg7qkwgdr5.onion:8333 +utgyrvw75wv2nymi.onion:8333 +uzwacms7kyzhehbl.onion:8333 +v2kdcetvslmdfcwr.onion:8333 +v5lhnzzv6nngfg5d.onion:8333 +vc44gb4veppobrt3.onion:8333 +vfwyhju43wxhzvux.onion:8333 +vgujufk53lqyolio.onion:8333 +vheejqq2v5dkb4xr.onion:8333 +vj64edev4jnqfdsb.onion:8333 +vmai5uigezr2khkj.onion:8333 +vmuykd7sxbmi7w57.onion:8333 +vomeacttinx3mpml.onion:8333 +vpow2xofg3fwzsdq.onion:8333 +vsawli4l5ifxdzaw.onion:8333 +vunubqkfms7sifok.onion:8333 +vuombnevwul4bqsb.onion:8333 +vxcpvdng65aefz6t.onion:8333 +vyxoizdzavp3obau.onion:8333 +wbeon2ci7lfio6ay.onion:8333 +wbwevew62mgsrrdz.onion:8333 +wfaydlg6zyfzjcu5.onion:8333 +wfz56s5lyn5dysez.onion:8333 +wg3mq4ugyy2gx32b.onion:8333 +whky54bctkf2n4p3.onion:8333 +whmjanqoyzizzc4t.onion:8333 +wlhou2wxgqyi3x3f.onion:8333 +wlvkfrplfiioz22o.onion:8333 +x3ngb3va7dovuenw.onion:8333 +x57x62bmmnylvo7r.onion:8333 +xgvm57mhgv564dka.onion:8333 +xhs3glfwnwiumivn.onion:8333 +xje5fwvyfdue2u6k.onion:8333 +xlgubgyly2blvsg5.onion:8333 +xnlu3tvakngy7tkp.onion:8333 +xo5marilhuyo7but.onion:8333 +xsaaxihdygnwxrix.onion:8333 +xu5mlugdsmzfkvzh.onion:8333 +xvrxqcptqvieedb2.onion:8333 +xwzhrrygftq3q4w4.onion:8333 +y4swmsaxdcos2bnu.onion:8333 +y5tl4lqi365pplud.onion:8333 +y5wzeqyaets5na6t.onion:8333 +y73qk2mzkjkhoky7.onion:8333 +y7oz3ydnvib4xhbb.onion:8333 +yah7qgfqqrteoche.onion:8333 +yba4brm555denlt7.onion:8333 +ygeqkg4inplsace3.onion:8333 +yjhnfu75lazbi34h.onion:8333 +yjw7kqapxx5vggoj.onion:8333 +ym7inmovbrna4gco.onion:8333 +yq5cusnuokscy64z.onion:8333 +yrcaioqrqrdwokqt.onion:8333 +yrcr7pgjuazad254.onion:8333 +yrksvon3tmvoohdv.onion:8333 +ytpus4vx5w7j6wp2.onion:8333 +ytqcigk2hhdl45ho.onion:8333 +yxojl3xmjus3dik2.onion:8333 +yzdqdsqx4fdung6w.onion:8333 +z33nukt7ngik3cpe.onion:8333 +z3ywbadw46ndnxgh.onion:8333 +z6mbqq7llxlrn4kq.onion:8333 +zb3lrcksn4rzhzje.onion:8333 +ze7odp7pzarjplsr.onion:8333 +zgbmhtbja4fy2373.onion:8333 +zh7hvalcgvjpoaqm.onion:8333 +ziztvxehmj5mehpg.onion:8333 +zjii3yecdrmq73y3.onion:8333 +zkrwmgjuvsza6ye2.onion:8333 +zoz2aopwi3wfuqwg.onion:8333 +ztdcfnh46773bivu.onion:8333 +zuxhc6d3nwpgc4af.onion:8333 +zuytrfevzjcpizli.onion:8333 +zvq6dpt3i2ofdp3g.onion:8333 +zwwm6ga7u2hqe2sd.onion:8333 +zyqb4lenfspntj5m.onion:8333 diff -Nru bitcoin-0.20.1.knots20200815/contrib/testgen/base58.py bitcoin-0.21.0.knots20210130/contrib/testgen/base58.py --- bitcoin-0.20.1.knots20200815/contrib/testgen/base58.py 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/testgen/base58.py 2021-01-30 05:16:37.000000000 +0000 @@ -107,7 +107,7 @@ if __name__ == '__main__': # Test case (from http://gitorious.org/bitcoin/python-base58.git) - assert get_bcaddress_version('15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC') is 0 + assert get_bcaddress_version('15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC') == 0 _ohai = 'o hai'.encode('ascii') _tmp = b58encode(_ohai) assert _tmp == 'DYB3oMS' diff -Nru bitcoin-0.20.1.knots20200815/contrib/testgen/gen_key_io_test_vectors.py bitcoin-0.21.0.knots20210130/contrib/testgen/gen_key_io_test_vectors.py --- bitcoin-0.20.1.knots20200815/contrib/testgen/gen_key_io_test_vectors.py 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/testgen/gen_key_io_test_vectors.py 2021-01-30 05:16:37.000000000 +0000 @@ -15,8 +15,7 @@ from itertools import islice from base58 import b58encode_chk, b58decode_chk, b58chars import random -from binascii import b2a_hex -from segwit_addr import bech32_encode, decode, convertbits, CHARSET +from segwit_addr import bech32_encode, decode_segwit_address, convertbits, CHARSET # key types PUBKEY_ADDRESS = 0 @@ -109,7 +108,7 @@ def is_valid_bech32(v): '''Check vector v for bech32 validity''' for hrp in ['bc', 'tb', 'bcrt']: - if decode(hrp, v) != (None, None): + if decode_segwit_address(hrp, v) != (None, None): return True return False @@ -141,9 +140,7 @@ rv, payload = valid_vector_generator(template) assert is_valid(rv) metadata = {x: y for x, y in zip(metadata_keys,template[3]) if y is not None} - hexrepr = b2a_hex(payload) - if isinstance(hexrepr, bytes): - hexrepr = hexrepr.decode('utf8') + hexrepr = payload.hex() yield (rv, hexrepr, metadata) def gen_invalid_base58_vector(template): diff -Nru bitcoin-0.20.1.knots20200815/contrib/testgen/README.md bitcoin-0.21.0.knots20210130/contrib/testgen/README.md --- bitcoin-0.20.1.knots20200815/contrib/testgen/README.md 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/testgen/README.md 2021-01-30 05:16:37.000000000 +0000 @@ -4,5 +4,5 @@ Usage: - PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py valid 50 > ../../src/test/data/key_io_keys_valid.json - PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py invalid 50 > ../../src/test/data/key_io_keys_invalid.json + PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py valid 50 > ../../src/test/data/key_io_valid.json + PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py invalid 50 > ../../src/test/data/key_io_invalid.json diff -Nru bitcoin-0.20.1.knots20200815/contrib/valgrind.supp bitcoin-0.21.0.knots20210130/contrib/valgrind.supp --- bitcoin-0.20.1.knots20200815/contrib/valgrind.supp 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/valgrind.supp 2021-01-30 05:16:37.000000000 +0000 @@ -1,7 +1,5 @@ -# Valgrind suppressions file for Bitcoin. -# -# Includes known Valgrind warnings in our dependencies that cannot be fixed -# in-tree. +# This valgrind suppressions file includes known Valgrind warnings in our +# dependencies that cannot be fixed in-tree. # # Example use: # $ valgrind --suppressions=contrib/valgrind.supp src/test/test_bitcoin @@ -14,6 +12,9 @@ # --error-limit=no src/test/test_bitcoin # # Note that suppressions may depend on OS and/or library versions. +# Tested on: +# * aarch64 (Ubuntu 20.04 system libs, without gui) +# * x86_64 (Ubuntu 18.04 system libs, without gui) { Suppress libstdc++ warning - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65434 Memcheck:Leak @@ -47,8 +48,7 @@ Suppress libdb warning Memcheck:Param pwrite64(buf) - fun:pwrite - fun:__os_io + ... obj:*/libdb_cxx-*.so } { @@ -123,7 +123,6 @@ Memcheck:Cond ... fun:_ZN5boost10filesystem6detail11unique_pathERKNS0_4pathEPNS_6system10error_codeE - fun:unique_path } { Suppress boost warning @@ -184,16 +183,3 @@ ... fun:_ZN5BCLog6Logger12StartLoggingEv } -{ - Suppress BCLog::Logger::StartLogging() still reachable memory warning - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc - ... - fun:_ZN5BCLog6Logger12StartLoggingEv -} -{ - Suppress rest_blockhash_by_height Conditional jump or move depends on uninitialised value(s) - Memcheck:Cond - fun:_ZL24rest_blockhash_by_heightP11HTTPRequestRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE -} diff -Nru bitcoin-0.20.1.knots20200815/contrib/verify-commits/pre-push-hook.sh bitcoin-0.21.0.knots20210130/contrib/verify-commits/pre-push-hook.sh --- bitcoin-0.20.1.knots20200815/contrib/verify-commits/pre-push-hook.sh 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/verify-commits/pre-push-hook.sh 2021-01-30 05:16:37.000000000 +0000 @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2014-2019 The Bitcoin Core developers +# Copyright (c) 2014-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff -Nru bitcoin-0.20.1.knots20200815/contrib/zmq/zmq_sub.py bitcoin-0.21.0.knots20210130/contrib/zmq/zmq_sub.py --- bitcoin-0.20.1.knots20200815/contrib/zmq/zmq_sub.py 2020-08-15 06:18:02.000000000 +0000 +++ bitcoin-0.21.0.knots20210130/contrib/zmq/zmq_sub.py 2021-01-30 05:16:37.000000000 +0000 @@ -11,7 +11,8 @@ -zmqpubrawtx=tcp://127.0.0.1:28332 \ -zmqpubrawblock=tcp://127.0.0.1:28332 \ -zmqpubhashtx=tcp://127.0.0.1:28332 \ - -zmqpubhashblock=tcp://127.0.0.1:28332 + -zmqpubhashblock=tcp://127.0.0.1:28332 \ + -zmqpubsequence=tcp://127.0.0.1:28332 We use the asyncio library here. `self.handle()` installs itself as a future at the end of the function. Since it never returns with the event @@ -47,16 +48,14 @@ self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashtx") self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawblock") self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawtx") + self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "sequence") self.zmqSubSocket.connect("tcp://127.0.0.1:%i" % port) async def handle(self) : - msg = await self.zmqSubSocket.recv_multipart() - topic = msg[0] - body = msg[1] + topic, body, seq = await self.zmqSubSocket.recv_multipart() sequence = "Unknown" - if len(msg[-1]) == 4: - msgSequence = struct.unpack('