From 44743d86c18e7f799ba2ac642f0cedfb6fb56e5e Mon Sep 17 00:00:00 2001 From: sucildoss Date: Fri, 31 Oct 2025 18:00:20 +0530 Subject: [PATCH 01/52] feat: updating coordinate v29 to live --- .cirrus.yml | 379 +- .editorconfig | 12 +- .gitattributes | 1 + .gitignore | 157 +- .python-version | 2 +- .style.yapf | 2 +- .vscode/c_cpp_properties.json | 19 - .vscode/settings.json | 50 +- CMakeLists.txt | 714 + CMakePresets.json | 88 + CONTRIBUTING.md | 28 +- COPYING | 4 +- Dockerfile | 41 - INSTALL.md | 2 +- Makefile.am | 347 - README.md | 13 +- SECURITY.md | 2 +- Testing/Temporary/CTestCostData.txt | 1 + Testing/Temporary/LastTest.log | 3 + autogen.sh | 29 - build-aux/m4/ax_boost_base.m4 | 256 - build-aux/m4/ax_check_compile_flag.m4 | 53 - build-aux/m4/ax_check_link_flag.m4 | 53 - build-aux/m4/ax_check_preproc_flag.m4 | 53 - build-aux/m4/ax_cxx_compile_stdcxx.m4 | 1005 -- build-aux/m4/ax_pthread.m4 | 522 - build-aux/m4/bitcoin_find_bdb48.m4 | 97 - build-aux/m4/bitcoin_qt.m4 | 397 - build-aux/m4/bitcoin_runtime_lib.m4 | 42 - build-aux/m4/bitcoin_subdir_to_include.m4 | 18 - build-aux/m4/l_atomic.m4 | 58 - build-aux/m4/l_socket.m4 | 36 - build_msvc/.gitignore | 30 - build_msvc/README.md | 90 - .../bench_bitcoin/bench_bitcoin.vcxproj.in | 62 - build_msvc/bitcoin.sln | 162 - build_msvc/bitcoin_config.h.in | 152 - build_msvc/common.init.vcxproj.in | 106 - build_msvc/common.qt.init.vcxproj | 16 - build_msvc/common.vcxproj | 12 - .../coordinate-cli/coordinate-cli.vcxproj | 34 - .../coordinate-qt/coordinate-qt.vcxproj | 85 - .../coordinate-tx/coordinate-tx.vcxproj | 37 - .../coordinate-util/coordinate-util.vcxproj | 37 - .../coordinate-wallet.vcxproj | 46 - build_msvc/coordinated/coordinated.vcxproj | 88 - .../libbitcoin_common.vcxproj.in | 17 - .../libbitcoin_consensus.vcxproj | 28 - .../libbitcoin_crypto.vcxproj.in | 16 - .../libbitcoin_node.vcxproj.in | 19 - .../libbitcoin_zmq/libbitcoin_zmq.vcxproj.in | 16 - .../libcoordinate_cli.vcxproj.in | 16 - .../libcoordinate_qt/libcoordinate_qt.vcxproj | 224 - .../libcoordinate_util.vcxproj.in | 16 - .../libcoordinate_wallet.vcxproj.in | 19 - .../libcoordinate_wallet_tool.vcxproj.in | 16 - build_msvc/libleveldb/libleveldb.vcxproj | 61 - .../libminisketch/libminisketch.vcxproj | 38 - build_msvc/libsecp256k1/libsecp256k1.vcxproj | 26 - .../libtest_util/libtest_util.vcxproj.in | 17 - build_msvc/libunivalue/libunivalue.vcxproj | 19 - build_msvc/msbuild/tasks/hexdump.targets | 53 - .../msbuild/tasks/replaceinfile.targets | 35 - build_msvc/msvc-autogen.py | 116 - build_msvc/test_bitcoin/test_bitcoin.vcxproj | 77 - .../test_coordinate-qt.vcxproj | 131 - build_msvc/vcpkg.json | 24 - ci/README.md | 8 +- ci/lint/{04_install.sh => 01_install.sh} | 28 +- ci/lint/06_script.sh | 31 +- ci/lint/container-entrypoint.sh | 2 +- ci/lint_imagefile | 5 +- ci/lint_run.sh | 12 + ci/lint_run_all.sh | 12 +- ci/test/00_setup_env.sh | 14 +- ci/test/00_setup_env_android.sh | 25 - ci/test/00_setup_env_arm.sh | 8 +- ci/test/00_setup_env_i686_centos.sh | 17 - ci/test/00_setup_env_i686_multiprocess.sh | 18 +- ...p_env_mac.sh => 00_setup_env_mac_cross.sh} | 13 +- ci/test/00_setup_env_mac_native.sh | 13 +- ci/test/00_setup_env_mac_native_fuzz.sh | 17 + ci/test/00_setup_env_native_asan.sh | 26 +- ci/test/00_setup_env_native_centos.sh | 20 + ci/test/00_setup_env_native_fuzz.sh | 18 +- ci/test/00_setup_env_native_fuzz_with_msan.sh | 24 +- .../00_setup_env_native_fuzz_with_valgrind.sh | 13 +- ci/test/00_setup_env_native_msan.sh | 25 +- ...up_env_native_nowallet_libbitcoinkernel.sh | 10 +- .../00_setup_env_native_previous_releases.sh | 28 + ci/test/00_setup_env_native_qt5.sh | 21 - ci/test/00_setup_env_native_tidy.sh | 17 +- ci/test/00_setup_env_native_tsan.sh | 14 +- ci/test/00_setup_env_native_valgrind.sh | 13 +- ci/test/00_setup_env_s390x.sh | 7 +- ci/test/00_setup_env_win64.sh | 13 +- ci/test/01_base_install.sh | 99 +- ci/test/02_run_container.sh | 110 +- ci/test/{06_script_b.sh => 03_test_script.sh} | 148 +- ci/test/GetCMakeLogFiles.cmake | 11 + ci/test/wrap-valgrind.sh | 4 +- ci/test/wrap-wine.sh | 20 - cmake/bitcoin-build-config.h.in | 115 + cmake/ccache.cmake | 30 + cmake/crc32c.cmake | 115 + cmake/introspection.cmake | 213 + cmake/leveldb.cmake | 103 + cmake/libmultiprocess.cmake | 38 + cmake/minisketch.cmake | 89 + cmake/module/AddBoostIfNeeded.cmake | 80 + cmake/module/AddWindowsResources.cmake | 24 + cmake/module/CheckLinkerSupportsPIE.cmake | 27 + .../module/CheckSourceCompilesWithFlags.cmake | 34 + cmake/module/FindLibevent.cmake | 86 + cmake/module/FindQRencode.cmake | 71 + cmake/module/FindQt.cmake | 45 + cmake/module/FindUSDT.cmake | 67 + cmake/module/FindZeroMQ.cmake | 41 + cmake/module/FlagsSummary.cmake | 74 + cmake/module/GenerateSetupNsi.cmake | 19 + cmake/module/GetTargetInterface.cmake | 53 + cmake/module/InstallBinaryComponent.cmake | 26 + cmake/module/Maintenance.cmake | 144 + cmake/module/ProcessConfigurations.cmake | 166 + cmake/module/TargetDataSources.cmake | 55 + .../module/TestAppendRequiredLibraries.cmake | 95 + cmake/module/TryAppendCXXFlags.cmake | 126 + cmake/module/TryAppendLinkerFlag.cmake | 83 + cmake/module/WarnAboutGlobalProperties.cmake | 36 + cmake/script/Coverage.cmake | 89 + cmake/script/CoverageFuzz.cmake | 53 + cmake/script/CoverageInclude.cmake.in | 59 + cmake/script/GenerateBuildInfo.cmake | 113 + cmake/script/GenerateHeaderFromJson.cmake | 22 + cmake/script/GenerateHeaderFromRaw.cmake | 23 + cmake/script/cov_tool_wrapper.sh.in | 5 + cmake/script/macos_zip.sh | 12 + cmake/windows-app.manifest.in | 15 + configure.ac | 2018 --- contrib/README.md | 10 +- contrib/asmap/README.md | 83 + contrib/asmap/asmap-tool.py | 197 + contrib/{seeds => asmap}/asmap.py | 87 +- .../{coordinate-cli.bash => bitcoin-cli.bash} | 31 +- .../{coordinate-tx.bash => bitcoin-tx.bash} | 18 +- .../bash/{coordinated.bash => bitcoind.bash} | 14 +- .../{coordinate-cli.fish => bitcoin-cli.fish} | 38 +- .../{coordinate-qt.fish => bitcoin-qt.fish} | 8 +- .../{coordinate-tx.fish => bitcoin-tx.fish} | 18 +- ...coordinate-util.fish => bitcoin-util.fish} | 18 +- ...dinate-wallet.fish => bitcoin-wallet.fish} | 20 +- .../fish/{coordinated.fish => bitcoind.fish} | 14 +- contrib/debian/copyright | 13 +- contrib/devtools/README.md | 91 +- contrib/devtools/bitcoin-tidy/CMakeLists.txt | 23 +- .../bitcoin-tidy/{README => README.md} | 0 .../devtools/bitcoin-tidy/bitcoin-tidy.cpp | 4 +- .../bitcoin-tidy/example_logprintf.cpp | 108 - .../example_nontrivial-threadlocal.cpp | 2 + contrib/devtools/bitcoin-tidy/logprintf.cpp | 60 - .../bitcoin-tidy/nontrivial-threadlocal.cpp | 44 + .../{logprintf.h => nontrivial-threadlocal.h} | 12 +- contrib/devtools/check-deps.sh | 197 + contrib/devtools/circular-dependencies.py | 5 +- contrib/devtools/clang-format-diff.py | 314 +- contrib/devtools/copyright_header.py | 3 - .../deterministic-fuzz-coverage/Cargo.lock | 7 + .../deterministic-fuzz-coverage/Cargo.toml | 6 + .../deterministic-fuzz-coverage/src/main.rs | 281 + .../Cargo.lock | 7 + .../Cargo.toml | 6 + .../src/main.rs | 149 + contrib/devtools/gen-bitcoin-conf.sh | 28 +- contrib/devtools/gen-manpages.py | 43 +- contrib/devtools/headerssync-params.py | 4 +- contrib/devtools/iwyu/bitcoin.core.imp | 6 +- contrib/devtools/split-debug.sh | 10 - contrib/devtools/test-security-check.py | 153 - contrib/devtools/test-symbol-check.py | 179 - .../devtools/test_deterministic_coverage.sh | 151 - contrib/devtools/test_utxo_snapshots.sh | 209 - contrib/devtools/utils.py | 3 +- contrib/devtools/utxo_snapshot.sh | 44 - contrib/guix/INSTALL.md | 207 +- contrib/guix/README.md | 29 +- contrib/guix/guix-build | 17 +- contrib/guix/guix-codesign | 34 +- contrib/guix/libexec/build.sh | 173 +- contrib/guix/libexec/codesign.sh | 64 +- contrib/guix/libexec/prelude.bash | 24 +- contrib/guix/manifest.scm | 287 +- .../patches/binutils-unaligned-default.patch | 22 + .../guix/patches/gcc-remap-guix-store.patch | 15 +- contrib/guix/patches/glibc-2.27-fcommon.patch | 34 - .../guix/patches/glibc-2.27-no-librt.patch | 53 - .../patches/glibc-2.27-powerpc-ldbrx.patch | 245 - ...as_include-to-include-asm-syscalls.h.patch | 78 - ...x-prefix.patch => glibc-guix-prefix.patch} | 8 +- contrib/guix/patches/lief-scikit-0-9.patch | 21 + contrib/guix/patches/vmov-alignment.patch | 268 - .../winpthreads-remap-guix-store.patch | 17 + contrib/{devtools => guix}/security-check.py | 151 +- contrib/{devtools => guix}/symbol-check.py | 164 +- contrib/init/README.md | 12 +- .../init/{coordinated.conf => bitcoind.conf} | 44 +- contrib/init/bitcoind.init | 67 + contrib/init/bitcoind.openrc | 93 + contrib/init/bitcoind.openrcconf | 33 + .../{coordinated.service => bitcoind.service} | 19 +- contrib/init/coordinated.init | 67 - contrib/init/coordinated.openrc | 93 - contrib/init/coordinated.openrcconf | 33 - contrib/init/org.bitcoin.bitcoind.plist | 14 + contrib/linearize/README.md | 4 +- contrib/linearize/example-linearize.cfg | 2 +- contrib/linearize/linearize-data.py | 28 +- contrib/macdeploy/README.md | 84 +- contrib/macdeploy/detached-sig-create.sh | 51 +- contrib/macdeploy/gen-sdk | 22 +- contrib/macdeploy/macdeployqtplus | 59 +- .../message-capture/message-capture-docs.md | 2 +- .../message-capture/message-capture-parser.py | 6 +- contrib/qos/README.md | 2 +- contrib/seeds/.gitignore | 3 + contrib/seeds/README.md | 21 +- contrib/seeds/generate-seeds.py | 27 +- contrib/seeds/makeseeds.py | 86 +- contrib/seeds/nodes_main.txt | 2795 ++-- contrib/seeds/nodes_main_manual.txt | 95 - contrib/seeds/nodes_signet.txt | 140 + contrib/seeds/nodes_test.txt | 288 +- contrib/seeds/nodes_testnet4.txt | 151 + contrib/signet/README.md | 14 +- contrib/signet/getcoins.py | 20 +- contrib/signet/miner | 441 +- contrib/testgen/gen_key_io_test_vectors.py | 66 +- contrib/tracing/README.md | 39 +- contrib/tracing/connectblock_benchmark.bt | 20 +- contrib/tracing/log_p2p_connections.bt | 51 + contrib/tracing/log_p2p_traffic.bt | 4 +- contrib/tracing/log_raw_p2p_msgs.py | 57 +- contrib/tracing/log_utxocache_flush.py | 19 +- contrib/tracing/log_utxos.bt | 12 +- contrib/tracing/mempool_monitor.py | 51 +- contrib/tracing/p2p_monitor.py | 60 +- contrib/utxo-tools/utxo_to_sqlite.py | 195 + contrib/valgrind.supp | 43 +- contrib/verify-binaries/README.md | 10 +- contrib/verify-binaries/test.py | 15 + contrib/verify-binaries/verify.py | 52 +- contrib/windeploy/detached-sig-create.sh | 26 +- contrib/windeploy/win-codesign.cert | 44 +- contrib/zmq/zmq_sub.py | 2 +- depends/.gitignore | 2 +- depends/Makefile | 143 +- depends/README.md | 197 +- depends/builders/darwin.mk | 13 +- depends/builders/default.mk | 4 +- depends/builders/freebsd.mk | 6 +- depends/builders/openbsd.mk | 8 +- depends/config.guess | 71 +- depends/config.site.in | 159 - depends/config.sub | 935 +- depends/description.md | 7 +- depends/funcs.mk | 95 +- depends/gen_id | 33 +- depends/hosts/android.mk | 20 - depends/hosts/darwin.mk | 95 +- depends/hosts/default.mk | 8 +- depends/hosts/freebsd.mk | 14 +- depends/hosts/linux.mk | 21 +- depends/hosts/mingw32.mk | 17 +- depends/hosts/netbsd.mk | 14 +- depends/hosts/openbsd.mk | 14 +- depends/packages.md | 30 +- depends/packages/bdb.mk | 39 - depends/packages/boost.mk | 31 +- depends/packages/capnp.mk | 17 +- depends/packages/expat.mk | 19 +- depends/packages/fontconfig.mk | 6 +- depends/packages/freetype.mk | 18 +- depends/packages/libXau.mk | 5 +- depends/packages/libevent.mk | 36 +- depends/packages/libmultiprocess.mk | 28 - depends/packages/libnatpmp.mk | 22 - depends/packages/libxcb_util.mk | 5 +- depends/packages/libxcb_util_cursor.mk | 31 + depends/packages/libxcb_util_image.mk | 4 +- depends/packages/libxcb_util_keysyms.mk | 4 +- depends/packages/libxcb_util_render.mk | 4 +- depends/packages/libxcb_util_wm.mk | 4 +- depends/packages/miniupnpc.mk | 30 - depends/packages/native_capnp.mk | 16 +- depends/packages/native_cctools.mk | 39 - depends/packages/native_clang.mk | 24 - depends/packages/native_libmultiprocess.mk | 5 +- depends/packages/native_libtapi.mk | 22 - depends/packages/native_qt.mk | 156 + depends/packages/packages.mk | 25 +- depends/packages/qrencode.mk | 20 +- depends/packages/qt.mk | 359 +- depends/packages/qt_details.mk | 26 + depends/packages/sqlite.mk | 21 +- depends/packages/systemtap.mk | 3 +- depends/packages/xproto.mk | 8 +- depends/packages/zeromq.mk | 49 +- depends/patches/bdb/clang_cxx_11.patch | 147 - .../patches/boost/skip_compiled_targets.patch | 136 + depends/patches/expat/cmake_minimum.patch | 13 + depends/patches/freetype/cmake_minimum.patch | 13 + depends/patches/libevent/cmake_fixups.patch | 13 + depends/patches/libevent/netbsd_fixup.patch | 23 + depends/patches/libevent/winver_fixup.patch | 122 + .../patches/miniupnpc/dont_leak_info.patch | 32 - .../miniupnpc/respect_mingw_cflags.patch | 23 - .../patches/native_libtapi/disable_zlib.patch | 17 - depends/patches/qrencode/cmake_fixups.patch | 23 + depends/patches/qt/dont_hardcode_pwd.patch | 46 +- depends/patches/qt/duplicate_lcqpafonts.patch | 104 - .../qt/fast_fixed_dtoa_no_optimize.patch | 20 - depends/patches/qt/fix-macos-linker.patch | 55 - .../patches/qt/fix_android_jni_static.patch | 18 - depends/patches/qt/fix_qt_pkgconfig.patch | 11 - depends/patches/qt/guix_cross_lib_path.patch | 17 - depends/patches/qt/mac-qmake.conf | 22 - depends/patches/qt/memory_resource.patch | 33 - depends/patches/qt/no-xlib.patch | 61 - depends/patches/qt/qt.pro | 16 - .../qt/qtbase-moc-ignore-gcc-macro.patch | 2 +- .../qt/qtbase_avoid_native_float16.patch | 37 + depends/patches/qt/qtbase_avoid_qmain.patch | 21 + .../patches/qt/qtbase_platformsupport.patch | 34 + depends/patches/qt/qtbase_plugins_cocoa.patch | 21 + depends/patches/qt/qtbase_skip_tools.patch | 61 + .../qt/qttools_skip_dependencies.patch | 36 + depends/patches/qt/qttools_src.pro | 6 - .../patches/qt/rcc_hardcode_timestamp.patch | 4 +- depends/patches/qt/use_android_ndk23.patch | 13 - depends/patches/qt/windows_lto.patch | 31 - .../systemtap/fix_variadic_warning.patch | 16 - depends/patches/zeromq/builtin_sha1.patch | 17 + .../patches/zeromq/cacheline_undefined.patch | 15 + depends/patches/zeromq/cmake_minimum.patch | 18 + depends/patches/zeromq/fix_have_windows.patch | 54 + .../patches/zeromq/macos_mktemp_check.patch | 16 + .../patches/zeromq/netbsd_kevent_void.patch | 57 - depends/patches/zeromq/no_librt.patch | 54 + .../zeromq/openbsd_kqueue_headers.patch | 24 + .../patches/zeromq/remove_libstd_link.patch | 25 - depends/toolchain.cmake.in | 175 + doc/.gitignore | 1 - doc/CMakeLists.txt | 25 + doc/Doxyfile.in | 4 +- doc/JSON-RPC-interface.md | 38 +- doc/README.md | 16 +- doc/README_windows.txt | 2 +- doc/REST-interface.md | 13 +- doc/assumeutxo.md | 85 + doc/benchmarking.md | 44 +- doc/bips.md | 10 +- doc/bitcoin-conf.md | 26 +- doc/build-android.md | 25 - doc/build-freebsd.md | 82 +- doc/build-netbsd.md | 59 +- doc/build-openbsd.md | 78 +- doc/build-osx.md | 122 +- doc/build-unix.md | 175 +- doc/build-windows-msvc.md | 105 + doc/build-windows.md | 68 +- doc/cjdns.md | 10 +- doc/dependencies.md | 76 +- doc/descriptors.md | 63 +- doc/design/assumeutxo.md | 65 +- doc/design/libraries.md | 98 +- doc/design/multiprocess.md | 289 +- doc/developer-notes.md | 612 +- doc/dnsseed-policy.md | 2 +- doc/external-signer.md | 19 +- doc/files.md | 50 +- doc/fuzzing.md | 286 +- doc/i2p.md | 16 +- doc/init.md | 78 +- doc/man/Makefile.am | 27 - doc/man/bitcoin-cli.1 | 5 + doc/man/bitcoin-qt.1 | 5 + doc/man/bitcoin-tx.1 | 5 + doc/man/bitcoin-util.1 | 5 + doc/man/bitcoin-wallet.1 | 5 + doc/man/bitcoind.1 | 5 + doc/man/coordinate-cli.1 | 181 - doc/man/coordinate-qt.1 | 822 -- doc/man/coordinate-tx.1 | 145 - doc/man/coordinate-util.1 | 65 - doc/man/coordinate-wallet.1 | 121 - doc/man/coordinated.1 | 800 -- doc/managing-wallets.md | 53 +- doc/multiprocess.md | 51 + doc/multisig-tutorial.md | 62 +- doc/offline-signing-tutorial.md | 258 + doc/p2p-bad-ports.md | 5 + doc/policy/README.md | 4 +- doc/policy/mempool-replacements.md | 12 +- doc/policy/packages.md | 44 +- doc/productivity.md | 117 +- doc/psbt.md | 55 +- doc/reduce-memory.md | 12 +- doc/reduce-traffic.md | 10 +- doc/release-30635.md | 5 + doc/release-notes-27826.md | 4 + doc/release-notes-31278.md | 3 + doc/release-notes-31375.md | 11 + doc/release-notes-31385.md | 14 + doc/release-notes-31603.md | 6 + doc/release-notes-31829.md | 11 + doc/release-notes-31953.md | 9 + doc/release-notes-32406.md | 3 + doc/release-notes-32425.md | 14 + doc/release-notes-32459.md | 3 + doc/release-notes-32500.md | 3 + doc/release-notes-32521.md | 9 + doc/release-notes-32530.md | 4 + doc/release-notes-32540.md | 5 + doc/release-notes-32604.md | 10 + doc/release-notes-32618.md | 7 + doc/release-notes-32845.md | 9 + doc/release-notes-32944-28710-32438-31250.md | 12 + doc/release-notes-33004.md | 6 + doc/release-notes-empty-template.md | 99 + doc/release-notes/release-notes-0.10.0.md | 32 +- doc/release-notes/release-notes-0.10.1.md | 4 +- doc/release-notes/release-notes-0.10.2.md | 4 +- doc/release-notes/release-notes-0.10.3.md | 4 +- doc/release-notes/release-notes-0.10.4.md | 8 +- doc/release-notes/release-notes-0.11.0.md | 12 +- doc/release-notes/release-notes-0.11.1.md | 4 +- doc/release-notes/release-notes-0.11.2.md | 8 +- doc/release-notes/release-notes-0.12.0.md | 28 +- doc/release-notes/release-notes-0.12.1.md | 4 +- doc/release-notes/release-notes-0.13.0.md | 22 +- doc/release-notes/release-notes-0.13.1.md | 8 +- doc/release-notes/release-notes-0.13.2.md | 4 +- doc/release-notes/release-notes-0.14.0.md | 30 +- doc/release-notes/release-notes-0.14.1.md | 4 +- doc/release-notes/release-notes-0.14.2.md | 2 +- doc/release-notes/release-notes-0.14.3.md | 4 +- doc/release-notes/release-notes-0.15.0.1.md | 4 +- doc/release-notes/release-notes-0.15.0.md | 36 +- doc/release-notes/release-notes-0.15.1.md | 14 +- doc/release-notes/release-notes-0.15.2.md | 8 +- doc/release-notes/release-notes-0.16.0.md | 20 +- doc/release-notes/release-notes-0.16.1.md | 8 +- doc/release-notes/release-notes-0.16.2.md | 4 +- doc/release-notes/release-notes-0.16.3.md | 4 +- doc/release-notes/release-notes-0.17.0.md | 32 +- doc/release-notes/release-notes-0.17.1.md | 6 +- doc/release-notes/release-notes-0.18.0.md | 38 +- doc/release-notes/release-notes-0.18.1.md | 4 +- doc/release-notes/release-notes-0.19.0.1.md | 24 +- doc/release-notes/release-notes-0.19.1.md | 6 +- doc/release-notes/release-notes-0.20.0.md | 24 +- doc/release-notes/release-notes-0.20.1.md | 4 +- doc/release-notes/release-notes-0.20.2.md | 4 +- doc/release-notes/release-notes-0.21.0.md | 30 +- doc/release-notes/release-notes-0.21.1.md | 4 +- doc/release-notes/release-notes-0.21.2.md | 4 +- doc/release-notes/release-notes-0.3.21.md | 4 +- doc/release-notes/release-notes-0.3.24.md | 2 +- doc/release-notes/release-notes-0.4.1.md | 4 +- doc/release-notes/release-notes-0.4.3.md | 6 +- doc/release-notes/release-notes-0.4.4.md | 6 +- doc/release-notes/release-notes-0.4.6.md | 20 +- doc/release-notes/release-notes-0.5.0.md | 8 +- doc/release-notes/release-notes-0.5.1.md | 4 +- doc/release-notes/release-notes-0.5.2.md | 2 +- doc/release-notes/release-notes-0.5.3.md | 12 +- doc/release-notes/release-notes-0.5.4.md | 8 +- doc/release-notes/release-notes-0.5.5.md | 20 +- doc/release-notes/release-notes-0.6.0.md | 16 +- doc/release-notes/release-notes-0.6.3.md | 4 +- doc/release-notes/release-notes-0.7.0.md | 16 +- doc/release-notes/release-notes-0.7.1.md | 8 +- doc/release-notes/release-notes-0.7.2.md | 4 +- doc/release-notes/release-notes-0.8.0.md | 4 +- doc/release-notes/release-notes-0.8.1.md | 4 +- doc/release-notes/release-notes-0.8.2.md | 10 +- doc/release-notes/release-notes-0.8.3.md | 2 +- doc/release-notes/release-notes-0.8.4.md | 6 +- doc/release-notes/release-notes-0.8.5.md | 4 +- doc/release-notes/release-notes-0.8.6.md | 6 +- doc/release-notes/release-notes-0.9.0.md | 22 +- doc/release-notes/release-notes-0.9.1.md | 6 +- doc/release-notes/release-notes-0.9.2.1.md | 4 +- doc/release-notes/release-notes-0.9.2.md | 4 +- doc/release-notes/release-notes-0.9.3.md | 4 +- doc/release-notes/release-notes-0.9.4.md | 4 +- doc/release-notes/release-notes-0.9.5.md | 4 +- doc/release-notes/release-notes-22.0.md | 36 +- doc/release-notes/release-notes-22.1.md | 4 +- doc/release-notes/release-notes-23.0.md | 6 +- doc/release-notes/release-notes-23.1.md | 4 +- doc/release-notes/release-notes-23.2.md | 4 +- doc/release-notes/release-notes-24.0.1.md | 6 +- doc/release-notes/release-notes-24.1.md | 4 +- doc/release-notes/release-notes-24.2.md | 4 +- doc/release-notes/release-notes-25.0.md | 12 +- doc/release-notes/release-notes-25.1.md | 4 +- doc/release-notes/release-notes-25.2.md | 74 + .../release-notes-26.0.md} | 34 +- doc/release-notes/release-notes-26.1.md | 106 + doc/release-notes/release-notes-26.2.md | 94 + doc/release-notes/release-notes-27.0.md | 217 + doc/release-notes/release-notes-27.1.md | 114 + doc/release-notes/release-notes-27.2.md | 92 + doc/release-notes/release-notes-28.0.md | 371 + doc/release-notes/release-notes-28.1.md | 107 + doc/release-notes/release-notes-28.2.md | 83 + doc/release-notes/release-notes-29.0.md | 261 + doc/release-process.md | 119 +- doc/shared-libraries.md | 77 - doc/tor.md | 108 +- doc/tracing.md | 184 +- doc/translation_process.md | 26 +- doc/translation_strings_policy.md | 14 +- doc/zmq.md | 94 +- generate_blockfilters.py | 140 + libbitcoinconsensus.pc.in | 10 - libbitcoinkernel.pc.in | 11 + share/examples/bitcoin.conf | 689 +- share/genbuild.sh | 49 - share/qt/Info.plist.in | 8 +- share/qt/extract_strings_qt.py | 2 +- share/rpcauth/README.md | 1 + share/rpcauth/rpcauth.py | 12 +- share/setup.nsi.in | 46 +- src/.bear-tidy-config | 21 - src/.clang-format | 4 +- src/.clang-tidy | 15 +- src/CMakeLists.txt | 525 + src/Makefile.am | 1204 -- src/Makefile.bench.include | 104 - src/Makefile.crc32c.include | 81 - src/Makefile.leveldb.include | 153 - src/Makefile.minisketch.include | 43 - src/Makefile.qt.include | 423 - src/Makefile.qt_locale.include | 123 - src/Makefile.qttest.include | 74 - src/Makefile.test.include | 427 - src/Makefile.test_fuzz.include | 24 - src/Makefile.test_util.include | 55 - src/Makefile.univalue.include | 6 - src/addrdb.cpp | 62 +- src/addresstype.cpp | 24 + src/addresstype.h | 26 +- src/addrman.cpp | 144 +- src/addrman.h | 17 +- src/addrman_impl.h | 42 +- src/arith_uint256.cpp | 29 +- src/arith_uint256.h | 26 +- src/auxpow.cpp | 62 +- src/auxpow.h | 37 +- src/banman.cpp | 51 +- src/banman.h | 48 +- src/base58.cpp | 16 +- src/base58.h | 6 +- src/bech32.cpp | 77 +- src/bech32.h | 19 +- src/bench/.gitignore | 1 - src/bench/CMakeLists.txt | 88 + src/bench/addrman.cpp | 8 +- src/bench/base58.cpp | 5 +- src/bench/bech32.cpp | 9 +- src/bench/bench.cpp | 38 +- src/bench/bench.h | 6 +- src/bench/bench_bitcoin.cpp | 24 +- src/bench/bip324_ecdh.cpp | 8 +- src/bench/block_assemble.cpp | 25 +- src/bench/ccoins_caching.cpp | 8 +- src/bench/chacha20.cpp | 5 + src/bench/checkblock.cpp | 21 +- src/bench/checkblockindex.cpp | 22 + src/bench/checkqueue.cpp | 27 +- src/bench/cluster_linearize.cpp | 419 + src/bench/coin_selection.cpp | 23 +- src/bench/connectblock.cpp | 131 + src/bench/crypto_hash.cpp | 49 +- src/bench/data.cpp | 14 - src/bench/data.h | 19 - src/bench/descriptors.cpp | 15 +- src/bench/disconnected_transactions.cpp | 15 +- src/bench/duplicate_inputs.cpp | 17 +- src/bench/ellswift.cpp | 17 +- src/bench/examples.cpp | 4 +- src/bench/gcs_filter.cpp | 5 + src/bench/hashpadding.cpp | 2 +- src/bench/index_blockfilter.cpp | 59 + src/bench/load_external.cpp | 26 +- src/bench/lockedpool.cpp | 3 +- src/bench/logging.cpp | 66 +- src/bench/mempool_ephemeral_spends.cpp | 87 + src/bench/mempool_eviction.cpp | 14 +- src/bench/mempool_stress.cpp | 18 +- src/bench/merkle_root.cpp | 3 +- src/bench/nanobench.h | 98 +- src/bench/{xor.cpp => obfuscation.cpp} | 13 +- src/bench/parse_hex.cpp | 37 + src/bench/peer_eviction.cpp | 5 +- src/bench/poly1305.cpp | 5 +- src/bench/pool.cpp | 4 + src/bench/prevector.cpp | 53 +- src/bench/random.cpp | 105 + src/bench/readwriteblock.cpp | 70 + src/bench/rollingbloom.cpp | 2 + src/bench/rpc_blockchain.cpp | 47 +- src/bench/rpc_mempool.cpp | 14 +- src/bench/sign_transaction.cpp | 106 + src/bench/streams_findbyte.cpp | 14 +- src/bench/strencodings.cpp | 5 +- src/bench/txgraph.cpp | 126 + src/bench/txorphanage.cpp | 268 + src/bench/verify_script.cpp | 28 +- src/bench/wallet_balance.cpp | 19 +- src/bench/wallet_create.cpp | 66 + src/bench/wallet_create_tx.cpp | 53 +- src/bench/wallet_ismine.cpp | 72 + src/bench/wallet_loading.cpp | 36 +- src/bench/wallet_migration.cpp | 78 + src/bip324.cpp | 16 +- src/bip324.h | 16 +- src/bitcoin-chainstate.cpp | 116 +- ...rdinate-util-res.rc => bitcoin-cli-res.rc} | 14 +- src/{coordinate-cli.cpp => bitcoin-cli.cpp} | 286 +- ...oordinate-wallet-res.rc => bitcoin-res.rc} | 14 +- ...coordinate-tx-res.rc => bitcoin-tx-res.rc} | 14 +- src/{coordinate-tx.cpp => bitcoin-tx.cpp} | 116 +- ...coordinated-res.rc => bitcoin-util-res.rc} | 14 +- src/{coordinate-util.cpp => bitcoin-util.cpp} | 18 +- src/bitcoin-wallet-res.rc | 33 + ...ordinate-wallet.cpp => bitcoin-wallet.cpp} | 42 +- src/bitcoin.cpp | 204 + ...{coordinate-cli-res.rc => bitcoind-res.rc} | 14 +- src/{coordinated.cpp => bitcoind.cpp} | 54 +- src/blockencodings.cpp | 53 +- src/blockencodings.h | 34 +- src/blockfilter.cpp | 15 +- src/chain.cpp | 14 +- src/chain.h | 89 +- src/chainparams.cpp | 32 +- src/chainparamsbase.cpp | 21 +- src/chainparamsbase.h | 12 +- src/chainparamsseeds.h | 981 +- src/checkqueue.h | 125 +- src/clientversion.cpp | 48 +- src/clientversion.h | 25 +- src/cluster_linearize.h | 1397 ++ src/coins.cpp | 241 +- src/coins.h | 213 +- src/common/args.cpp | 95 +- src/common/args.h | 29 +- src/common/bloom.cpp | 20 +- src/common/bloom.h | 12 +- src/common/config.cpp | 33 +- src/common/init.cpp | 49 +- src/common/messages.cpp | 171 + src/common/messages.h | 40 + src/common/netif.cpp | 350 + src/common/netif.h | 19 + src/common/pcp.cpp | 524 + src/common/pcp.h | 68 + src/common/run_command.cpp | 29 +- src/common/settings.cpp | 17 +- .../message.cpp => common/signmessage.cpp} | 2 +- src/{util/message.h => common/signmessage.h} | 6 +- src/common/system.cpp | 9 +- src/common/system.h | 14 +- src/common/types.h | 28 + src/common/url.cpp | 35 +- src/common/url.h | 9 +- src/compat/assumptions.h | 14 - src/compat/byteswap.h | 66 +- src/compat/compat.h | 12 +- src/compat/endian.h | 241 +- src/compressor.h | 14 +- src/config/.empty | 0 src/consensus/consensus.h | 13 +- src/consensus/merkle.cpp | 165 +- src/consensus/merkle.h | 44 + src/consensus/params.h | 38 +- src/consensus/tx_check.cpp | 10 +- src/consensus/tx_verify.cpp | 46 +- src/consensus/tx_verify.h | 6 +- src/consensus/validation.h | 31 +- src/coordinate-tx | Bin 2531488 -> 0 bytes src/coordinate-util | Bin 386480 -> 0 bytes src/coordinate-wallet | Bin 4075136 -> 0 bytes src/{ => coordinate}/anduro_deposit.cpp | 25 +- src/{ => coordinate}/anduro_deposit.h | 2 +- src/{ => coordinate}/anduro_validator.cpp | 3 +- src/{ => coordinate}/anduro_validator.h | 1 - src/coordinate/coordinate_assets.cpp | 52 + src/coordinate/coordinate_assets.h | 37 +- src/coordinate/coordinate_mempool_entry.cpp | 49 +- src/coordinate/coordinate_mempool_entry.h | 12 +- src/coordinate/coordinate_pegin.cpp | 34 +- src/coordinate/coordinate_preconf.cpp | 50 +- src/coordinate/signed_block.cpp | 2 +- src/core_io.h | 14 +- src/core_read.cpp | 32 +- src/core_write.cpp | 50 +- src/crc32c/src/crc32c_arm64.cc | 32 +- src/crypto/CMakeLists.txt | 60 + src/crypto/aes.cpp | 4 +- src/crypto/chacha20.cpp | 55 +- src/crypto/chacha20.h | 24 +- src/crypto/chacha20poly1305.cpp | 43 +- src/crypto/chacha20poly1305.h | 28 +- src/crypto/common.h | 96 +- src/crypto/hex_base.cpp | 67 + src/crypto/hex_base.h | 23 + src/crypto/hkdf_sha256_32.cpp | 6 +- src/crypto/hkdf_sha256_32.h | 4 +- src/crypto/hmac_sha256.cpp | 4 +- src/crypto/hmac_sha256.h | 4 +- src/crypto/hmac_sha512.cpp | 4 +- src/crypto/hmac_sha512.h | 4 +- src/crypto/muhash.cpp | 429 +- src/crypto/muhash.h | 29 +- src/crypto/poly1305.cpp | 4 +- src/crypto/poly1305.h | 12 +- src/crypto/ripemd160.cpp | 4 +- src/crypto/ripemd160.h | 4 +- src/crypto/sha1.cpp | 4 +- src/crypto/sha1.h | 4 +- src/crypto/sha256.cpp | 33 +- src/crypto/sha256.h | 4 +- src/crypto/sha256_avx2.cpp | 4 +- src/crypto/sha256_sse4.cpp | 15 +- src/crypto/sha256_sse41.cpp | 4 +- src/crypto/sha256_x86_shani.cpp | 6 +- src/crypto/sha3.cpp | 82 +- src/crypto/sha3.h | 10 +- src/crypto/sha512.cpp | 4 +- src/crypto/sha512.h | 4 +- src/crypto/siphash.cpp | 18 +- src/crypto/siphash.h | 6 +- src/cuckoocache.h | 18 +- src/dbwrapper.cpp | 112 +- src/dbwrapper.h | 46 +- src/deploymentinfo.cpp | 14 +- src/deploymentinfo.h | 5 +- src/deploymentstatus.cpp | 2 +- src/deploymentstatus.h | 2 +- src/dummywallet.cpp | 5 +- src/external_signer.cpp | 17 +- src/flatfile.cpp | 39 +- src/flatfile.h | 8 +- src/hash.cpp | 16 +- src/hash.h | 39 +- src/headerssync.cpp | 38 +- src/headerssync.h | 8 +- src/httprpc.cpp | 224 +- src/httpserver.cpp | 100 +- src/httpserver.h | 33 +- src/i2p.cpp | 58 +- src/i2p.h | 17 +- src/index/base.cpp | 192 +- src/index/base.h | 36 +- src/index/blockfilterindex.cpp | 189 +- src/index/blockfilterindex.h | 13 +- src/index/coinstatsindex.cpp | 148 +- src/index/coinstatsindex.h | 8 +- src/index/disktxpos.h | 2 +- src/index/txindex.cpp | 19 +- src/init.cpp | 1386 +- src/init.h | 17 +- src/init/bitcoin-gui.cpp | 9 +- src/init/bitcoin-node.cpp | 6 +- .../{coordinate-qt.cpp => bitcoin-qt.cpp} | 6 +- ...ordinate-wallet.cpp => bitcoin-wallet.cpp} | 0 src/init/{coordinated.cpp => bitcoind.cpp} | 12 +- src/init/common.cpp | 69 +- src/init/common.h | 2 +- src/interfaces/chain.h | 87 +- src/interfaces/echo.h | 2 +- src/interfaces/handler.h | 2 +- src/interfaces/init.h | 5 +- src/interfaces/ipc.h | 16 + src/interfaces/mining.h | 142 + src/interfaces/node.h | 50 +- src/interfaces/types.h | 20 + src/interfaces/wallet.h | 65 +- src/ipc/CMakeLists.txt | 23 + src/ipc/capnp/.gitignore | 2 - src/ipc/capnp/common-types.h | 132 + src/ipc/capnp/common.capnp | 16 + src/ipc/capnp/echo-types.h | 12 + src/ipc/capnp/echo.capnp | 2 +- src/ipc/capnp/init-types.h | 1 + src/ipc/capnp/init.capnp | 3 + src/ipc/capnp/mining-types.h | 20 + src/ipc/capnp/mining.capnp | 52 + src/ipc/capnp/mining.cpp | 11 + src/ipc/capnp/protocol.cpp | 21 +- src/ipc/interfaces.cpp | 36 +- src/ipc/libmultiprocess/.clang-tidy | 41 + src/ipc/libmultiprocess/CMakeLists.txt | 178 + src/ipc/libmultiprocess/COPYING | 22 + src/ipc/libmultiprocess/README.md | 8 + src/ipc/libmultiprocess/cmake/Config.cmake.in | 33 + .../cmake/TargetCapnpSources.cmake | 113 + .../libmultiprocess/cmake/compat_config.cmake | 59 + .../libmultiprocess/cmake/compat_find.cmake | 20 + .../cmake/pthread_checks.cmake | 41 + src/ipc/libmultiprocess/doc/design.md | 44 + src/ipc/libmultiprocess/doc/install.md | 52 + src/ipc/libmultiprocess/doc/usage.md | 24 + .../libmultiprocess/example/CMakeLists.txt | 29 + .../libmultiprocess/example/calculator.capnp | 16 + .../libmultiprocess/example/calculator.cpp | 58 + src/ipc/libmultiprocess/example/calculator.h | 17 + src/ipc/libmultiprocess/example/example.cpp | 72 + src/ipc/libmultiprocess/example/init.capnp | 22 + src/ipc/libmultiprocess/example/init.h | 20 + src/ipc/libmultiprocess/example/printer.capnp | 16 + src/ipc/libmultiprocess/example/printer.cpp | 51 + src/ipc/libmultiprocess/example/printer.h | 17 + src/ipc/libmultiprocess/example/types.h | 14 + .../libmultiprocess/include/mp/config.h.in | 16 + src/ipc/libmultiprocess/include/mp/proxy-io.h | 644 + .../libmultiprocess/include/mp/proxy-types.h | 732 + .../libmultiprocess/include/mp/proxy.capnp | 65 + src/ipc/libmultiprocess/include/mp/proxy.h | 310 + .../libmultiprocess/include/mp/type-char.h | 36 + .../libmultiprocess/include/mp/type-chrono.h | 34 + .../libmultiprocess/include/mp/type-context.h | 173 + .../libmultiprocess/include/mp/type-data.h | 46 + .../libmultiprocess/include/mp/type-decay.h | 38 + .../include/mp/type-exception.h | 22 + .../include/mp/type-function.h | 67 + .../include/mp/type-interface.h | 112 + src/ipc/libmultiprocess/include/mp/type-map.h | 52 + .../libmultiprocess/include/mp/type-message.h | 64 + .../libmultiprocess/include/mp/type-number.h | 87 + .../include/mp/type-optional.h | 48 + .../libmultiprocess/include/mp/type-pair.h | 50 + .../libmultiprocess/include/mp/type-pointer.h | 113 + src/ipc/libmultiprocess/include/mp/type-set.h | 48 + .../libmultiprocess/include/mp/type-string.h | 34 + .../libmultiprocess/include/mp/type-struct.h | 85 + .../include/mp/type-threadmap.h | 41 + .../libmultiprocess/include/mp/type-tuple.h | 45 + .../libmultiprocess/include/mp/type-vector.h | 71 + .../libmultiprocess/include/mp/type-void.h | 23 + src/ipc/libmultiprocess/include/mp/util.h | 220 + src/ipc/libmultiprocess/include/mpgen.mk | 4 + .../pkgconfig/libmultiprocess.pc.in | 12 + src/ipc/libmultiprocess/src/mp/gen.cpp | 678 + src/ipc/libmultiprocess/src/mp/proxy.cpp | 399 + src/ipc/libmultiprocess/src/mp/util.cpp | 154 + src/ipc/libmultiprocess/test/CMakeLists.txt | 39 + .../libmultiprocess/test/mp/test/foo-types.h | 83 + .../libmultiprocess/test/mp/test/foo.capnp | 67 + src/ipc/libmultiprocess/test/mp/test/foo.h | 84 + src/ipc/libmultiprocess/test/mp/test/test.cpp | 141 + src/ipc/process.cpp | 102 +- src/ipc/process.h | 10 + src/ipc/protocol.h | 28 +- src/kernel/CMakeLists.txt | 154 + src/kernel/bitcoinkernel.cpp | 3 +- src/kernel/blockmanager_opts.h | 5 + src/kernel/caches.h | 50 + src/kernel/chainparams.cpp | 437 +- src/kernel/chainparams.h | 27 +- src/kernel/chainstatemanager_opts.h | 13 +- src/kernel/checks.cpp | 11 +- src/kernel/coinstats.cpp | 19 +- src/kernel/coinstats.h | 1 + src/kernel/context.cpp | 24 +- src/kernel/context.h | 20 - src/kernel/disconnected_transactions.cpp | 90 + src/kernel/disconnected_transactions.h | 85 +- src/kernel/mempool_entry.h | 87 +- src/kernel/mempool_options.h | 13 +- src/kernel/notifications_interface.h | 17 +- src/kernel/validation_cache_sizes.h | 20 - src/kernel/warning.h | 14 + src/key.cpp | 117 +- src/key.h | 128 +- src/key_io.cpp | 47 +- src/key_io.h | 1 + src/leveldb/CMakeLists.txt | 3 - src/leveldb/db/c.cc | 6 +- src/leveldb/db/db_test.cc | 16 +- src/leveldb/db/log_test.cc | 2 +- src/leveldb/include/leveldb/slice.h | 3 + src/leveldb/include/leveldb/status.h | 4 + src/leveldb/port/port_config.h.in | 6 - src/leveldb/port/port_example.h | 4 - src/leveldb/port/port_stdcxx.h | 2 - src/leveldb/table/table_test.cc | 2 +- src/leveldb/util/cache.cc | 4 +- src/leveldb/util/coding.h | 50 +- src/leveldb/util/env_posix.cc | 11 +- src/leveldb/util/env_windows.cc | 11 +- src/leveldb/util/hash.cc | 2 +- src/leveldb/util/no_destructor.h | 12 +- src/logging.cpp | 460 +- src/logging.h | 313 +- src/logging/timer.h | 10 +- src/mapport.cpp | 337 +- src/mapport.h | 12 +- src/memusage.h | 19 +- src/merkleblock.cpp | 35 +- src/merkleblock.h | 12 +- src/minisketch/README.md | 4 +- src/minisketch/ci/cirrus.sh | 8 +- src/minisketch/ci/linux-debian.Dockerfile | 6 +- src/minisketch/configure.ac | 9 +- src/minisketch/include/minisketch.h | 10 +- src/minisketch/src/false_positives.h | 4 +- src/minisketch/src/int_utils.h | 38 +- src/minisketch/src/minisketch.cpp | 2 +- src/minisketch/src/sketch.h | 2 +- src/minisketch/src/sketch_impl.h | 11 +- src/minisketch/src/test.cpp | 2 +- src/musig.cpp | 53 + src/musig.h | 26 + src/net.cpp | 1094 +- src/net.h | 254 +- src/net_permissions.cpp | 35 +- src/net_permissions.h | 14 +- src/net_processing.cpp | 2095 ++- src/net_processing.h | 85 +- src/net_types.cpp | 6 +- src/net_types.h | 2 +- src/netaddress.cpp | 52 +- src/netaddress.h | 64 +- src/netbase.cpp | 523 +- src/netbase.h | 119 +- src/netgroup.cpp | 21 + src/netgroup.h | 10 + src/netmessagemaker.h | 21 +- src/node/abort.cpp | 16 +- src/node/abort.h | 9 +- src/node/blockmanager_args.cpp | 4 + src/node/blockstorage.cpp | 774 +- src/node/blockstorage.h | 138 +- src/node/caches.cpp | 59 +- src/node/caches.h | 22 +- src/node/chainstate.cpp | 109 +- src/node/chainstate.h | 15 +- src/node/chainstatemanager_args.cpp | 46 +- src/node/chainstatemanager_args.h | 3 + src/node/coin.cpp | 9 +- src/node/connection_types.h | 6 +- src/node/context.cpp | 4 + src/node/context.h | 26 +- src/node/interface_ui.cpp | 6 +- src/node/interface_ui.h | 5 +- src/node/interfaces.cpp | 291 +- src/node/kernel_notifications.cpp | 64 +- src/node/kernel_notifications.h | 36 +- src/node/mempool_args.cpp | 38 +- src/{kernel => node}/mempool_persist.cpp | 105 +- src/{kernel => node}/mempool_persist.h | 10 +- src/node/miner.cpp | 294 +- src/node/miner.h | 95 +- src/node/mini_miner.cpp | 105 +- src/node/mini_miner.h | 80 +- src/node/minisketchwrapper.cpp | 2 +- src/node/peerman_args.cpp | 8 +- src/node/peerman_args.h | 4 + src/{version.h => node/protocol_version.h} | 11 +- src/node/psbt.cpp | 4 +- src/node/timeoffsets.cpp | 66 + src/node/timeoffsets.h | 49 + src/node/transaction.cpp | 43 +- src/node/transaction.h | 8 +- src/node/txdownloadman.h | 177 + src/node/txdownloadman_impl.cpp | 583 + src/node/txdownloadman_impl.h | 204 + src/node/txorphanage.cpp | 783 ++ src/node/txorphanage.h | 151 + src/node/txreconciliation.cpp | 2 +- src/node/types.h | 102 + src/node/utxo_snapshot.cpp | 6 +- src/node/utxo_snapshot.h | 63 +- src/node/validation_cache_args.cpp | 34 - src/node/validation_cache_args.h | 17 - src/node/warnings.cpp | 67 + src/node/warnings.h | 90 + src/noui.cpp | 15 +- src/noui.h | 4 +- src/outputtype.cpp | 46 +- src/outputtype.h | 14 +- src/policy/ephemeral_policy.cpp | 95 + src/policy/ephemeral_policy.h | 58 + src/policy/feerate.h | 7 +- src/policy/fees.cpp | 166 +- src/policy/fees.h | 31 +- src/policy/packages.cpp | 121 +- src/policy/packages.h | 31 +- src/policy/policy.cpp | 212 +- src/policy/policy.h | 47 +- src/policy/rbf.cpp | 30 +- src/policy/rbf.h | 18 +- src/policy/truc_policy.cpp | 243 + src/policy/truc_policy.h | 94 + src/pow.cpp | 40 +- src/pow.h | 17 +- src/prevector.h | 106 +- src/primitives/bitcoin/block.cpp | 2 +- src/primitives/bitcoin/block.h | 7 +- src/primitives/bitcoin/transaction.cpp | 62 +- src/primitives/bitcoin/transaction.h | 174 +- src/primitives/block.cpp | 1 - src/primitives/block.h | 39 +- src/primitives/pureheader.cpp | 3 +- src/primitives/transaction.cpp | 53 +- src/primitives/transaction.h | 136 +- src/protocol.cpp | 136 +- src/protocol.h | 196 +- src/psbt.cpp | 128 +- src/psbt.h | 253 +- src/pubkey.cpp | 50 +- src/pubkey.h | 32 +- src/qt/CMakeLists.txt | 363 + src/qt/Makefile | 11 - src/qt/README.md | 14 +- src/qt/addressbookpage.cpp | 12 - src/qt/addressbookpage.h | 6 +- src/qt/addresstablemodel.cpp | 11 +- src/qt/addresstablemodel.h | 6 +- src/qt/android/.gitignore | 7 - src/qt/android/AndroidManifest.xml | 39 - src/qt/android/build.gradle | 52 - src/qt/android/gradle.properties | 4 - src/qt/android/res/drawable-hdpi/bitcoin.png | Bin 4536 -> 0 bytes src/qt/android/res/drawable-ldpi/bitcoin.png | Bin 1697 -> 0 bytes src/qt/android/res/drawable-mdpi/bitcoin.png | Bin 2558 -> 0 bytes src/qt/android/res/drawable-xhdpi/bitcoin.png | Bin 6832 -> 0 bytes .../android/res/drawable-xxhdpi/bitcoin.png | Bin 11479 -> 0 bytes .../android/res/drawable-xxxhdpi/bitcoin.png | Bin 17034 -> 0 bytes src/qt/android/res/values/libs.xml | 14 - .../org/bitcoincore/qt/BitcoinQtActivity.java | 23 - src/qt/askpassphrasedialog.cpp | 47 +- src/qt/askpassphrasedialog.h | 7 +- src/qt/bantablemodel.cpp | 4 +- src/qt/bantablemodel.h | 6 +- src/qt/bitcoin.cpp | 108 +- src/qt/bitcoin.h | 14 +- src/qt/bitcoin_locale.qrc | 13 +- src/qt/bitcoinaddressvalidator.h | 6 +- src/qt/bitcoinamountfield.h | 6 +- src/qt/bitcoingui.cpp | 83 +- src/qt/bitcoingui.h | 12 +- src/qt/bitcoinstrings.cpp | 103 +- src/qt/bitcoinunits.cpp | 4 +- src/qt/bitcoinunits.h | 6 +- src/qt/clientmodel.cpp | 58 +- src/qt/clientmodel.h | 22 +- src/qt/coincontroldialog.cpp | 30 +- src/qt/coincontroldialog.h | 6 +- src/qt/coincontroltreewidget.h | 6 +- src/qt/createwalletdialog.cpp | 4 +- src/qt/createwalletdialog.h | 6 +- src/qt/csvmodelwriter.h | 6 +- src/qt/editaddressdialog.h | 6 +- src/qt/forms/addressbookpage.ui | 2 +- src/qt/forms/debugwindow.ui | 206 +- src/qt/forms/optionsdialog.ui | 137 +- src/qt/forms/overviewpage.ui | 135 +- src/qt/forms/signverifymessagedialog.ui | 4 +- src/qt/freespacechecker.cpp | 58 + src/qt/freespacechecker.h | 50 + src/qt/guiconstants.h | 21 +- src/qt/guiutil.cpp | 122 +- src/qt/guiutil.h | 35 +- src/qt/initexecutor.h | 6 +- src/qt/intro.cpp | 113 +- src/qt/intro.h | 17 +- src/qt/locale/bitcoin_af.ts | 748 - src/qt/locale/bitcoin_am.ts | 219 +- src/qt/locale/bitcoin_ar.ts | 3912 +----- src/qt/locale/bitcoin_ast_ES.ts | 913 ++ src/qt/locale/bitcoin_ay.ts | 272 + src/qt/locale/bitcoin_az.ts | 128 +- src/qt/locale/bitcoin_az@latin.ts | 87 +- src/qt/locale/bitcoin_be.ts | 20 +- src/qt/locale/bitcoin_bg.ts | 154 +- src/qt/locale/bitcoin_bn.ts | 277 +- src/qt/locale/bitcoin_br.ts | 722 +- src/qt/locale/bitcoin_bs.ts | 37 +- src/qt/locale/bitcoin_ca.ts | 509 +- src/qt/locale/bitcoin_cmn.ts | 1297 +- src/qt/locale/bitcoin_cs.ts | 128 +- src/qt/locale/bitcoin_cy.ts | 957 +- src/qt/locale/bitcoin_da.ts | 132 +- src/qt/locale/bitcoin_de.ts | 659 +- src/qt/locale/bitcoin_de_AT.ts | 4841 +------ src/qt/locale/bitcoin_de_CH.ts | 464 +- src/qt/locale/bitcoin_el.ts | 526 +- src/qt/locale/bitcoin_en.ts | 805 +- src/qt/locale/bitcoin_en.xlf | 4161 +++--- src/qt/locale/bitcoin_eo.ts | 108 +- src/qt/locale/bitcoin_es.ts | 1676 ++- src/qt/locale/bitcoin_es_CL.ts | 503 +- src/qt/locale/bitcoin_es_CO.ts | 802 +- src/qt/locale/bitcoin_es_DO.ts | 1773 ++- src/qt/locale/bitcoin_es_MX.ts | 348 - src/qt/locale/bitcoin_es_SV.ts | 2207 ++- src/qt/locale/bitcoin_es_VE.ts | 1830 ++- src/qt/locale/bitcoin_et.ts | 18 +- src/qt/locale/bitcoin_eu.ts | 89 +- src/qt/locale/bitcoin_fa.ts | 3294 +---- src/qt/locale/bitcoin_fi.ts | 696 +- src/qt/locale/bitcoin_fil.ts | 98 +- src/qt/locale/bitcoin_fo.ts | 107 +- src/qt/locale/bitcoin_fr.ts | 1201 +- src/qt/locale/bitcoin_fr_CM.ts | 595 +- src/qt/locale/bitcoin_fr_LU.ts | 595 +- src/qt/locale/bitcoin_ga.ts | 1874 ++- src/qt/locale/bitcoin_ga_IE.ts | 1895 ++- src/qt/locale/bitcoin_gl.ts | 110 +- src/qt/locale/bitcoin_gl_ES.ts | 97 +- src/qt/locale/bitcoin_gu.ts | 2935 +++- src/qt/locale/bitcoin_hak.ts | 1299 +- src/qt/locale/bitcoin_he.ts | 123 +- src/qt/locale/bitcoin_hi.ts | 245 +- src/qt/locale/bitcoin_hr.ts | 126 +- src/qt/locale/bitcoin_hu.ts | 488 +- src/qt/locale/bitcoin_id.ts | 581 +- src/qt/locale/bitcoin_is.ts | 431 +- src/qt/locale/bitcoin_it.ts | 546 +- src/qt/locale/bitcoin_ja.ts | 518 +- src/qt/locale/bitcoin_ka.ts | 56 +- src/qt/locale/bitcoin_kk.ts | 10 +- src/qt/locale/bitcoin_kk@latin.ts | 10 +- src/qt/locale/bitcoin_km.ts | 176 +- src/qt/locale/bitcoin_kn.ts | 587 +- src/qt/locale/bitcoin_ko.ts | 321 +- src/qt/locale/bitcoin_ku.ts | 22 +- src/qt/locale/bitcoin_ku_IQ.ts | 20 +- src/qt/locale/bitcoin_la.ts | 985 +- src/qt/locale/bitcoin_lb.ts | 84 +- src/qt/locale/bitcoin_lt.ts | 78 +- src/qt/locale/bitcoin_lv.ts | 12 +- src/qt/locale/bitcoin_mi.ts | 724 + src/qt/locale/bitcoin_mk.ts | 808 +- src/qt/locale/bitcoin_ml.ts | 275 +- src/qt/locale/bitcoin_mn.ts | 28 +- src/qt/locale/bitcoin_ms.ts | 227 +- src/qt/locale/bitcoin_mt.ts | 21 +- src/qt/locale/bitcoin_my.ts | 31 + src/qt/locale/bitcoin_nb.ts | 146 +- src/qt/locale/bitcoin_ne.ts | 163 +- src/qt/locale/bitcoin_nl.ts | 285 +- src/qt/locale/bitcoin_no.ts | 1212 +- src/qt/locale/bitcoin_or.ts | 370 + src/qt/locale/bitcoin_pam.ts | 49 +- src/qt/locale/bitcoin_pl.ts | 699 +- src/qt/locale/bitcoin_ps.ts | 1893 +++ src/qt/locale/bitcoin_pt.ts | 1646 ++- src/qt/locale/bitcoin_pt_BR.ts | 563 +- src/qt/locale/bitcoin_ro.ts | 407 +- src/qt/locale/bitcoin_ru.ts | 2984 +--- src/qt/locale/bitcoin_sa.ts | 297 + src/qt/locale/bitcoin_sd.ts | 281 + src/qt/locale/bitcoin_si.ts | 36 +- src/qt/locale/bitcoin_sk.ts | 794 +- src/qt/locale/bitcoin_sl.ts | 298 +- src/qt/locale/bitcoin_sm.ts | 2154 +++ src/qt/locale/bitcoin_sn.ts | 4 + src/qt/locale/bitcoin_so.ts | 44 + src/qt/locale/bitcoin_sr.ts | 227 +- src/qt/locale/bitcoin_sr@ijekavianlatin.ts | 233 +- src/qt/locale/bitcoin_sr@latin.ts | 231 +- src/qt/locale/bitcoin_sv.ts | 308 +- src/qt/locale/bitcoin_sw.ts | 703 +- src/qt/locale/bitcoin_szl.ts | 33 +- src/qt/locale/bitcoin_ta.ts | 108 +- src/qt/locale/bitcoin_te.ts | 79 +- src/qt/locale/bitcoin_th.ts | 742 +- src/qt/locale/bitcoin_tk.ts | 72 +- src/qt/locale/bitcoin_tl.ts | 41 +- src/qt/locale/bitcoin_tn.ts | 412 + src/qt/locale/bitcoin_tr.ts | 481 +- src/qt/locale/bitcoin_ug.ts | 16 + src/qt/locale/bitcoin_uk.ts | 473 +- src/qt/locale/bitcoin_ur.ts | 181 +- src/qt/locale/bitcoin_uz.ts | 159 +- src/qt/locale/bitcoin_uz@Cyrl.ts | 107 +- src/qt/locale/bitcoin_uz@Latn.ts | 159 +- src/qt/locale/bitcoin_ve.ts | 713 + src/qt/locale/bitcoin_vi.ts | 131 +- src/qt/locale/bitcoin_yi.ts | 1194 ++ src/qt/locale/bitcoin_yue.ts | 1327 +- src/qt/locale/bitcoin_zh-Hans.ts | 357 +- src/qt/locale/bitcoin_zh-Hant.ts | 1299 +- src/qt/locale/bitcoin_zh.ts | 3478 ++++- src/qt/locale/bitcoin_zh_CN.ts | 363 +- src/qt/locale/bitcoin_zh_HK.ts | 1251 +- src/qt/locale/bitcoin_zh_TW.ts | 957 +- src/qt/macdockiconhandler.h | 6 +- src/qt/macnotificationhandler.h | 6 +- src/qt/macnotificationhandler.mm | 2 +- src/qt/macos_appnap.h | 6 +- src/qt/macos_appnap.mm | 2 +- src/qt/main.cpp | 6 +- src/qt/modaloverlay.cpp | 14 +- src/qt/modaloverlay.h | 6 +- src/qt/networkstyle.cpp | 1 + src/qt/networkstyle.h | 6 +- src/qt/notificator.cpp | 15 +- src/qt/notificator.h | 10 +- src/qt/openuridialog.h | 6 +- src/qt/optionsdialog.cpp | 140 +- src/qt/optionsdialog.h | 6 +- src/qt/optionsmodel.cpp | 136 +- src/qt/optionsmodel.h | 34 +- src/qt/overviewpage.cpp | 73 +- src/qt/overviewpage.h | 9 +- src/qt/paymentserver.cpp | 6 +- src/qt/paymentserver.h | 12 +- src/qt/peertablemodel.h | 10 +- src/qt/peertablesortproxy.h | 6 +- src/qt/platformstyle.h | 6 +- src/qt/psbtoperationsdialog.cpp | 37 +- src/qt/psbtoperationsdialog.h | 9 +- src/qt/qrimagewidget.cpp | 10 +- src/qt/qrimagewidget.h | 6 +- src/qt/qvalidatedlineedit.h | 6 +- src/qt/qvaluecombobox.h | 6 +- src/qt/receivecoinsdialog.h | 6 +- src/qt/receiverequestdialog.cpp | 4 +- src/qt/receiverequestdialog.h | 6 +- src/qt/recentrequeststablemodel.cpp | 2 + src/qt/recentrequeststablemodel.h | 6 +- ...coordinate-qt-res.rc => bitcoin-qt-res.rc} | 12 +- src/qt/res/icons/bitcoin.png | Bin 222709 -> 312944 bytes src/qt/res/icons/bitcoin_signet.ico | Bin 0 -> 44428 bytes src/qt/rpcconsole.cpp | 121 +- src/qt/rpcconsole.h | 22 +- src/qt/sendcoinsdialog.cpp | 69 +- src/qt/sendcoinsdialog.h | 13 +- src/qt/sendcoinsentry.cpp | 4 - src/qt/sendcoinsentry.h | 6 +- src/qt/sendcoinsrecipient.h | 10 +- src/qt/signverifymessagedialog.cpp | 14 +- src/qt/signverifymessagedialog.h | 6 +- src/qt/splashscreen.cpp | 6 +- src/qt/splashscreen.h | 6 +- src/qt/test/CMakeLists.txt | 48 + src/qt/test/Makefile | 6 - src/qt/test/addressbooktests.cpp | 16 +- src/qt/test/addressbooktests.h | 6 +- src/qt/test/apptests.cpp | 9 +- src/qt/test/apptests.h | 6 +- src/qt/test/optiontests.cpp | 22 +- src/qt/test/optiontests.h | 6 +- src/qt/test/rpcnestedtests.cpp | 22 +- src/qt/test/rpcnestedtests.h | 6 +- src/qt/test/test_main.cpp | 74 +- src/qt/test/uritests.h | 6 +- src/qt/test/util.h | 6 +- src/qt/test/wallettests.cpp | 82 +- src/qt/test/wallettests.h | 6 +- src/qt/trafficgraphwidget.h | 6 +- src/qt/transactiondesc.cpp | 26 +- src/qt/transactiondesc.h | 8 +- src/qt/transactiondescdialog.h | 6 +- src/qt/transactionfilterproxy.cpp | 12 - src/qt/transactionfilterproxy.h | 15 +- src/qt/transactionoverviewwidget.h | 6 +- src/qt/transactionrecord.cpp | 17 +- src/qt/transactionrecord.h | 16 +- src/qt/transactiontablemodel.cpp | 55 +- src/qt/transactiontablemodel.h | 20 +- src/qt/transactionview.cpp | 70 +- src/qt/transactionview.h | 15 +- src/qt/utilitydialog.cpp | 18 +- src/qt/utilitydialog.h | 6 +- src/qt/walletcontroller.cpp | 60 +- src/qt/walletcontroller.h | 15 +- src/qt/walletframe.h | 6 +- src/qt/walletmodel.cpp | 88 +- src/qt/walletmodel.h | 22 +- src/qt/walletmodeltransaction.cpp | 4 - src/qt/walletmodeltransaction.h | 6 +- src/qt/walletview.cpp | 4 +- src/qt/walletview.h | 6 +- src/qt/winshutdownmonitor.cpp | 5 +- src/qt/winshutdownmonitor.h | 16 +- src/random.cpp | 223 +- src/random.h | 498 +- src/randomenv.cpp | 84 +- src/rest.cpp | 313 +- src/reverse_iterator.h | 39 - src/rpc/auxpow_miner.cpp | 100 +- src/rpc/auxpow_miner.h | 20 +- src/rpc/blockchain.cpp | 1510 +- src/rpc/blockchain.h | 23 +- src/rpc/client.cpp | 38 +- src/rpc/coordinaterpc.cpp | 111 +- src/rpc/external_signer.cpp | 8 +- src/rpc/fees.cpp | 51 +- src/rpc/mempool.cpp | 562 +- src/rpc/mining.cpp | 683 +- src/rpc/net.cpp | 214 +- src/rpc/node.cpp | 55 +- src/rpc/output_script.cpp | 161 +- src/rpc/preconf_mempool.cpp | 43 +- src/rpc/protocol.h | 6 +- src/rpc/rawtransaction.cpp | 469 +- src/rpc/rawtransaction.h | 18 + src/rpc/rawtransaction_util.cpp | 62 +- src/rpc/rawtransaction_util.h | 15 +- src/rpc/register.h | 3 + src/rpc/request.cpp | 128 +- src/rpc/request.h | 37 +- src/rpc/server.cpp | 170 +- src/rpc/server.h | 58 +- src/rpc/server_util.cpp | 42 + src/rpc/server_util.h | 10 + src/rpc/signmessage.cpp | 13 +- src/rpc/txoutproof.cpp | 122 +- src/rpc/util.cpp | 254 +- src/rpc/util.h | 117 +- src/scheduler.cpp | 16 +- src/scheduler.h | 15 +- src/script/bitcoinconsensus.cpp | 161 - src/script/bitcoinconsensus.h | 96 - src/script/descriptor.cpp | 1418 +- src/script/descriptor.h | 11 +- src/script/interpreter.cpp | 544 +- src/script/interpreter.h | 47 +- src/script/miniscript.cpp | 79 +- src/script/miniscript.h | 204 +- .../spanparsing.cpp => script/parsing.cpp} | 18 +- src/script/parsing.h | 40 + src/script/script.cpp | 31 +- src/script/script.h | 103 +- src/script/script_error.cpp | 8 + src/script/script_error.h | 8 + src/script/sigcache.cpp | 135 +- src/script/sigcache.h | 55 +- src/script/sign.cpp | 37 +- src/script/sign.h | 23 +- src/script/signingprovider.cpp | 30 +- src/script/signingprovider.h | 13 +- src/script/solver.cpp | 33 +- src/script/solver.h | 8 +- .../install-homebrew-valgrind/action.yml | 2 +- .../.github/actions/print-logs/action.yml | 34 + .../actions/run-in-docker-action/action.yml | 11 +- src/secp256k1/.github/workflows/ci.yml | 545 +- src/secp256k1/.gitignore | 6 + src/secp256k1/CHANGELOG.md | 92 +- src/secp256k1/CMakeLists.txt | 213 +- src/secp256k1/CMakePresets.json | 1 - src/secp256k1/CONTRIBUTING.md | 109 + src/secp256k1/Makefile.am | 46 +- src/secp256k1/README.md | 105 +- src/secp256k1/build-aux/m4/bitcoin_secp.m4 | 16 + src/secp256k1/ci/ci.sh | 43 +- src/secp256k1/ci/linux-debian.Dockerfile | 16 +- src/secp256k1/cmake/CheckArm32Assembly.cmake | 4 +- .../cmake/CheckMemorySanitizer.cmake | 18 + .../cmake/GeneratePkgConfigFile.cmake | 8 + src/secp256k1/configure.ac | 151 +- src/secp256k1/contrib/lax_der_parsing.h | 4 +- src/secp256k1/doc/musig.md | 54 + src/secp256k1/doc/release-process.md | 72 +- src/secp256k1/examples/CMakeLists.txt | 17 +- src/secp256k1/examples/ecdh.c | 29 +- src/secp256k1/examples/ecdsa.c | 33 +- src/secp256k1/examples/ellswift.c | 122 + src/secp256k1/examples/musig.c | 261 + src/secp256k1/examples/schnorr.c | 40 +- src/secp256k1/include/secp256k1.h | 236 +- src/secp256k1/include/secp256k1_ecdh.h | 2 +- src/secp256k1/include/secp256k1_ellswift.h | 6 +- src/secp256k1/include/secp256k1_extrakeys.h | 31 +- src/secp256k1/include/secp256k1_musig.h | 588 + .../include/secp256k1_preallocated.h | 14 +- src/secp256k1/include/secp256k1_recovery.h | 24 +- src/secp256k1/include/secp256k1_schnorrsig.h | 6 +- src/secp256k1/src/CMakeLists.txt | 132 +- src/secp256k1/src/asm/field_10x26_arm.s | 1 + src/secp256k1/src/assumptions.h | 100 +- src/secp256k1/src/bench.c | 27 +- src/secp256k1/src/bench.h | 2 +- src/secp256k1/src/bench_ecmult.c | 40 +- src/secp256k1/src/bench_internal.c | 62 +- src/secp256k1/src/checkmem.h | 7 + src/secp256k1/src/ctime_tests.c | 62 +- src/secp256k1/src/ecdsa_impl.h | 7 +- src/secp256k1/src/eckey_impl.h | 3 + src/secp256k1/src/ecmult_const_impl.h | 387 +- src/secp256k1/src/ecmult_gen.h | 121 +- src/secp256k1/src/ecmult_gen_compute_table.h | 4 +- .../src/ecmult_gen_compute_table_impl.h | 134 +- src/secp256k1/src/ecmult_gen_impl.h | 317 +- src/secp256k1/src/ecmult_impl.h | 30 +- src/secp256k1/src/field.h | 16 +- src/secp256k1/src/field_10x26_impl.h | 11 - src/secp256k1/src/field_5x52_asm_impl.h | 504 - src/secp256k1/src/field_5x52_impl.h | 11 - src/secp256k1/src/field_5x52_int128_impl.h | 13 +- src/secp256k1/src/field_impl.h | 167 +- src/secp256k1/src/group.h | 30 +- src/secp256k1/src/group_impl.h | 296 +- src/secp256k1/src/hash.h | 3 + src/secp256k1/src/hash_impl.h | 19 +- src/secp256k1/src/hsort.h | 33 + src/secp256k1/src/hsort_impl.h | 125 + src/secp256k1/src/modinv32_impl.h | 43 +- src/secp256k1/src/modinv64_impl.h | 54 +- .../src/modules/ecdh/Makefile.am.include | 1 + src/secp256k1/src/modules/ecdh/main_impl.h | 7 +- src/secp256k1/src/modules/ecdh/tests_impl.h | 72 +- .../src/modules/ellswift/main_impl.h | 25 +- .../modules/ellswift/tests_exhaustive_impl.h | 2 +- .../src/modules/ellswift/tests_impl.h | 58 +- .../src/modules/extrakeys/tests_impl.h | 203 +- .../src/modules/musig/Makefile.am.include | 8 + src/secp256k1/src/modules/musig/keyagg.h | 32 + src/secp256k1/src/modules/musig/keyagg_impl.h | 291 + src/secp256k1/src/modules/musig/main_impl.h | 12 + src/secp256k1/src/modules/musig/session.h | 24 + .../src/modules/musig/session_impl.h | 824 ++ src/secp256k1/src/modules/musig/tests_impl.h | 1142 ++ src/secp256k1/src/modules/musig/vectors.h | 346 + .../src/modules/recovery/tests_impl.h | 77 +- .../src/modules/schnorrsig/main_impl.h | 8 +- .../schnorrsig/tests_exhaustive_impl.h | 6 +- .../src/modules/schnorrsig/tests_impl.h | 127 +- src/secp256k1/src/precompute_ecmult.c | 5 +- src/secp256k1/src/precompute_ecmult_gen.c | 82 +- src/secp256k1/src/precomputed_ecmult.h | 6 +- src/secp256k1/src/precomputed_ecmult_gen.c | 11501 +++------------- src/secp256k1/src/precomputed_ecmult_gen.h | 6 +- src/secp256k1/src/scalar.h | 16 +- src/secp256k1/src/scalar_4x64_impl.h | 218 +- src/secp256k1/src/scalar_8x32_impl.h | 174 +- src/secp256k1/src/scalar_impl.h | 28 +- src/secp256k1/src/scalar_low.h | 11 +- src/secp256k1/src/scalar_low_impl.h | 118 +- src/secp256k1/src/scratch.h | 2 + src/secp256k1/src/secp256k1.c | 94 +- src/secp256k1/src/testrand.h | 22 +- src/secp256k1/src/testrand_impl.h | 44 +- src/secp256k1/src/tests.c | 1577 ++- src/secp256k1/src/tests_exhaustive.c | 93 +- src/secp256k1/src/testutil.h | 148 + src/secp256k1/src/util.h | 102 +- src/secp256k1/src/util_local_visibility.h | 12 + .../src/wycheproof/WYCHEPROOF_COPYING | 17 +- .../src/wycheproof/ecdh_secp256k1_test.h | 2008 +++ .../src/wycheproof/ecdh_secp256k1_test.json | 8444 ++++++++++++ .../ecdsa_secp256k1_sha256_bitcoin_test.h | 2 +- .../ecdsa_secp256k1_sha256_bitcoin_test.json | 4 +- src/secp256k1/tools/check-abi.sh | 74 + src/secp256k1/tools/symbol-check.py | 72 + .../tools/test_vectors_musig2_generate.py | 656 + .../tools/tests_wycheproof_generate_ecdh.py | 166 + ....py => tests_wycheproof_generate_ecdsa.py} | 10 +- src/secp256k1/tools/wycheproof_utils.py | 12 + src/semaphore_grant.h | 93 + src/serialize.h | 395 +- src/shutdown.cpp | 44 - src/shutdown.h | 25 - src/signet.cpp | 27 +- src/span.h | 239 +- src/streams.cpp | 105 +- src/streams.h | 378 +- src/support/allocators/secure.h | 4 +- src/support/cleanse.cpp | 8 +- src/support/lockedpool.cpp | 17 +- src/support/lockedpool.h | 2 +- src/sync.cpp | 16 +- src/sync.h | 151 +- src/test/CMakeLists.txt | 222 + src/test/Makefile | 6 - src/test/README.md | 108 +- src/test/addrman_tests.cpp | 113 +- src/test/amount_tests.cpp | 26 + src/test/argsman_tests.cpp | 75 +- src/test/arith_uint256_tests.cpp | 100 +- src/test/asset_transaction_tests.cpp | 329 + src/test/auxpow_tests.cpp | 263 +- src/test/base32_tests.cpp | 29 +- src/test/base58_tests.cpp | 23 +- src/test/base64_tests.cpp | 25 +- src/test/bip324_tests.cpp | 578 +- src/test/blockchain_tests.cpp | 82 +- src/test/blockencodings_tests.cpp | 193 +- src/test/blockfilter_index_tests.cpp | 170 +- src/test/blockfilter_tests.cpp | 26 +- src/test/blockmanager_tests.cpp | 75 +- src/test/bloom_tests.cpp | 564 +- src/test/bswap_tests.cpp | 6 +- src/test/chainstate_write_tests.cpp | 45 + src/test/checkqueue_tests.cpp | 128 +- src/test/cluster_linearize_tests.cpp | 177 + src/test/coins_tests.cpp | 835 +- src/test/coinscachepair_tests.cpp | 198 + src/test/coinstatsindex_tests.cpp | 10 +- src/test/common_url_tests.cpp | 75 + src/test/compress_tests.cpp | 46 +- src/test/crypto_tests.cpp | 130 +- src/test/cuckoocache_tests.cpp | 55 +- src/test/data/base58_encode_decode.json | 9 +- src/test/data/blockfilters.json | 11 +- src/test/data/key_io_invalid.json | 222 +- src/test/data/key_io_valid.json | 1219 +- src/test/data/script_tests.json | 58 + src/test/data/sighash.json | 501 - src/test/data/tx_invalid.json | 2 +- src/test/data/tx_valid.json | 6 +- src/test/dbwrapper_tests.cpp | 119 +- src/test/denialofservice_tests.cpp | 142 +- src/test/descriptor_tests.cpp | 769 +- src/test/disconnected_transactions.cpp | 93 + src/test/feefrac_tests.cpp | 155 + src/test/flatfile_tests.cpp | 6 +- src/test/fs_tests.cpp | 33 +- src/test/fuzz/CMakeLists.txt | 154 + src/test/fuzz/FuzzedDataProvider.h | 13 +- src/test/fuzz/addition_overflow.cpp | 10 +- src/test/fuzz/addrman.cpp | 188 +- src/test/fuzz/asmap_direct.cpp | 4 +- src/test/fuzz/autofile.cpp | 25 +- src/test/fuzz/banman.cpp | 33 +- src/test/fuzz/base_encode_decode.cpp | 92 +- src/test/fuzz/bech32.cpp | 66 +- src/test/fuzz/bip324.cpp | 27 +- src/test/fuzz/bitdeque.cpp | 32 +- src/test/fuzz/bitset.cpp | 316 + src/test/fuzz/block.cpp | 8 +- src/test/fuzz/block_header.cpp | 2 +- src/test/fuzz/block_index.cpp | 133 + src/test/fuzz/blockfilter.cpp | 2 + src/test/fuzz/bloom_filter.cpp | 12 +- src/test/fuzz/buffered_file.cpp | 22 +- src/test/fuzz/chain.cpp | 14 +- src/test/fuzz/checkqueue.cpp | 15 +- src/test/fuzz/cluster_linearize.cpp | 1446 ++ src/test/fuzz/coins_view.cpp | 114 +- src/test/fuzz/coinscache_sim.cpp | 79 +- src/test/fuzz/connman.cpp | 51 +- src/test/fuzz/crypto.cpp | 8 +- src/test/fuzz/crypto_chacha20.cpp | 39 +- src/test/fuzz/crypto_chacha20poly1305.cpp | 200 + src/test/fuzz/crypto_common.cpp | 4 + src/test/fuzz/cuckoocache.cpp | 4 +- src/test/fuzz/descriptor_parse.cpp | 146 +- src/test/fuzz/deserialize.cpp | 38 +- src/test/fuzz/feefrac.cpp | 233 + src/test/fuzz/feeratediagram.cpp | 133 + src/test/fuzz/fees.cpp | 4 +- src/test/fuzz/float.cpp | 8 +- src/test/fuzz/fuzz.cpp | 72 +- src/test/fuzz/fuzz.h | 14 +- src/test/fuzz/golomb_rice.cpp | 14 +- src/test/fuzz/headerssync.cpp | 7 +- src/test/fuzz/hex.cpp | 25 +- src/test/fuzz/http_request.cpp | 4 +- src/test/fuzz/i2p.cpp | 64 + src/test/fuzz/integer.cpp | 19 +- src/test/fuzz/key.cpp | 31 +- src/test/fuzz/key_io.cpp | 2 +- src/test/fuzz/kitchen_sink.cpp | 13 +- src/test/fuzz/load_external_block_file.cpp | 6 +- src/test/fuzz/locale.cpp | 24 +- src/test/fuzz/merkle.cpp | 92 + src/test/fuzz/merkleblock.cpp | 6 +- src/test/fuzz/message.cpp | 8 +- src/test/fuzz/mini_miner.cpp | 47 +- src/test/fuzz/miniscript.cpp | 25 +- src/test/fuzz/minisketch.cpp | 26 +- src/test/fuzz/muhash.cpp | 180 +- src/test/fuzz/multiplication_overflow.cpp | 6 +- src/test/fuzz/net.cpp | 51 +- src/test/fuzz/net_permissions.cpp | 6 +- src/test/fuzz/netaddress.cpp | 20 +- src/test/fuzz/netbase_dns_lookup.cpp | 5 +- src/test/fuzz/overflow.cpp | 50 + src/test/fuzz/p2p_handshake.cpp | 108 + src/test/fuzz/p2p_headers_presync.cpp | 250 + src/test/fuzz/p2p_transport_serialization.cpp | 50 +- src/test/fuzz/package_eval.cpp | 358 +- src/{wallet => }/test/fuzz/parse_iso8601.cpp | 15 +- src/test/fuzz/parse_numbers.cpp | 56 +- src/test/fuzz/parse_univalue.cpp | 4 +- src/test/fuzz/partially_downloaded_block.cpp | 68 +- src/test/fuzz/pcp.cpp | 80 + src/test/fuzz/policy_estimator.cpp | 73 +- src/test/fuzz/policy_estimator_io.cpp | 11 +- src/test/fuzz/poolresource.cpp | 49 +- src/test/fuzz/pow.cpp | 2 +- src/test/fuzz/prevector.cpp | 47 +- src/test/fuzz/primitives_transaction.cpp | 4 +- src/test/fuzz/process_message.cpp | 87 +- src/test/fuzz/process_messages.cpp | 83 +- src/test/fuzz/protocol.cpp | 2 +- src/test/fuzz/psbt.cpp | 8 +- src/test/fuzz/random.cpp | 1 - src/test/fuzz/rbf.cpp | 183 +- src/test/fuzz/rolling_bloom_filter.cpp | 2 + src/test/fuzz/rpc.cpp | 67 +- src/test/fuzz/script.cpp | 22 +- .../fuzz/script_assets_test_minimizer.cpp | 12 +- src/test/fuzz/script_bitcoin_consensus.cpp | 50 - src/test/fuzz/script_flags.cpp | 23 +- src/test/fuzz/script_format.cpp | 4 +- src/test/fuzz/script_interpreter.cpp | 14 +- .../{spanparsing.cpp => script_parsing.cpp} | 21 +- src/test/fuzz/script_sigcache.cpp | 23 +- src/test/fuzz/script_sign.cpp | 36 +- .../secp256k1_ec_seckey_import_export_der.cpp | 2 +- ...ecp256k1_ecdsa_signature_parse_der_lax.cpp | 5 +- src/test/fuzz/signature_checker.cpp | 4 +- src/test/fuzz/signet.cpp | 2 +- src/test/fuzz/socks5.cpp | 14 +- src/test/fuzz/span.cpp | 10 +- src/test/fuzz/string.cpp | 18 +- src/test/fuzz/strprintf.cpp | 49 +- src/test/fuzz/system.cpp | 18 +- src/test/fuzz/timedata.cpp | 31 - src/test/fuzz/timeoffsets.cpp | 30 + src/test/fuzz/transaction.cpp | 21 +- src/test/fuzz/tx_in.cpp | 1 - src/test/fuzz/tx_out.cpp | 1 - src/test/fuzz/tx_pool.cpp | 125 +- src/test/fuzz/txdownloadman.cpp | 444 + src/test/fuzz/txgraph.cpp | 1252 ++ src/test/fuzz/txorphan.cpp | 776 +- src/test/fuzz/txrequest.cpp | 23 +- src/test/fuzz/util.cpp | 43 +- src/test/fuzz/util.h | 56 +- src/test/fuzz/util/CMakeLists.txt | 24 + src/test/fuzz/util/check_globals.cpp | 57 + src/test/fuzz/util/check_globals.h | 22 + src/test/fuzz/util/descriptor.cpp | 145 + src/test/fuzz/util/descriptor.h | 79 + src/test/fuzz/util/mempool.cpp | 6 +- src/test/fuzz/util/mempool.h | 4 +- src/test/fuzz/util/net.cpp | 187 +- src/test/fuzz/util/net.h | 134 +- src/test/fuzz/util/wallet.h | 80 + src/test/fuzz/utxo_snapshot.cpp | 186 +- src/test/fuzz/utxo_total_supply.cpp | 23 +- src/test/fuzz/validation_load_mempool.cpp | 15 +- src/test/fuzz/vecdeque.cpp | 491 + src/test/fuzz/versionbits.cpp | 161 +- src/test/getarg_tests.cpp | 38 +- src/test/hash_tests.cpp | 18 +- src/test/i2p_tests.cpp | 30 +- src/test/interfaces_tests.cpp | 123 +- src/test/ipc_test.capnp | 23 + src/test/ipc_test.cpp | 180 + src/test/ipc_test.h | 30 + src/test/ipc_test_types.h | 12 + src/test/ipc_tests.cpp | 42 + src/test/key_io_tests.cpp | 32 +- src/test/key_tests.cpp | 110 +- src/test/logging_tests.cpp | 264 +- src/test/main.cpp | 7 + src/test/mempool_tests.cpp | 158 +- src/test/merkle_tests.cpp | 128 +- src/test/merkleblock_tests.cpp | 75 +- src/test/miner_tests.cpp | 421 +- src/test/miniminer_tests.cpp | 274 +- src/test/miniscript_tests.cpp | 96 +- src/test/minisketch_tests.cpp | 10 +- src/test/multisig_tests.cpp | 3 +- src/test/net_peer_connection_tests.cpp | 86 + src/test/net_peer_eviction_tests.cpp | 4 +- src/test/net_tests.cpp | 543 +- src/test/netbase_tests.cpp | 209 +- src/test/node_warnings_tests.cpp | 52 + src/test/orphanage_tests.cpp | 822 +- src/test/pcp_tests.cpp | 699 + src/test/peerman_tests.cpp | 76 + src/test/pmt_tests.cpp | 21 +- src/test/policyestimator_tests.cpp | 105 +- src/test/pool_tests.cpp | 12 +- src/test/pow_tests.cpp | 71 +- src/test/preconf_transaction_tests.cpp | 189 + src/test/prevector_tests.cpp | 183 +- src/test/raii_event_tests.cpp | 8 - src/test/random_tests.cpp | 151 +- src/test/rbf_tests.cpp | 391 +- src/test/result_tests.cpp | 5 +- src/test/reverselock_tests.cpp | 12 +- src/test/rpc_tests.cpp | 92 +- src/test/sanity_tests.cpp | 2 - src/test/scheduler_tests.cpp | 10 +- src/test/script_assets_tests.cpp | 205 + src/test/script_p2sh_tests.cpp | 29 +- src/test/script_standard_tests.cpp | 101 +- src/test/script_tests.cpp | 1246 +- src/test/scriptnum10.h | 6 +- src/test/scriptnum_tests.cpp | 6 +- src/test/serfloat_tests.cpp | 118 +- src/test/serialize_tests.cpp | 225 +- src/test/settings_tests.cpp | 6 +- src/test/sighash_tests.cpp | 45 +- src/test/sigopcount_tests.cpp | 15 +- src/test/skiplist_tests.cpp | 10 +- src/test/span_tests.cpp | 62 + src/test/streams_tests.cpp | 374 +- src/test/system_tests.cpp | 49 +- src/test/test_slh_dsa_keygen.cpp | 205 + src/test/testnet4_miner_tests.cpp | 75 + src/test/timedata_tests.cpp | 105 - src/test/timeoffsets_tests.cpp | 72 + src/test/transaction_tests.cpp | 447 +- src/test/translation_tests.cpp | 19 +- src/test/txdownload_tests.cpp | 172 + src/test/txgraph_tests.cpp | 294 + src/test/txindex_tests.cpp | 8 +- src/test/txpackage_tests.cpp | 843 +- src/test/txreconciliation_tests.cpp | 2 +- src/test/txrequest_tests.cpp | 187 +- src/test/txvalidation_tests.cpp | 524 +- src/test/txvalidationcache_tests.cpp | 533 +- src/test/uint256_tests.cpp | 377 +- src/test/util/CMakeLists.txt | 30 + src/test/util/blockfilter.cpp | 4 +- src/test/util/chainstate.h | 36 +- src/test/util/cluster_linearize.h | 422 + src/test/util/coins.cpp | 11 +- src/test/util/coins.h | 3 +- src/test/util/coverage.cpp | 22 + src/test/util/coverage.h | 10 + src/test/util/index.cpp | 22 - src/test/util/index.h | 13 - src/test/util/json.cpp | 8 +- src/test/util/json.h | 8 +- src/test/util/logging.h | 4 +- src/test/util/mining.cpp | 39 +- src/test/util/mining.h | 12 +- src/test/util/net.cpp | 339 +- src/test/util/net.h | 305 +- src/test/util/random.cpp | 53 +- src/test/util/random.h | 73 +- src/test/util/script.h | 12 + src/test/util/setup_common.cpp | 426 +- src/test/util/setup_common.h | 170 +- src/test/util/time.cpp | 5 + src/test/util/time.h | 23 + src/test/util/transaction_utils.cpp | 54 +- src/test/util/transaction_utils.h | 24 + src/test/util/txmempool.cpp | 184 +- src/test/util/txmempool.h | 31 + src/test/util/validation.cpp | 9 + src/test/util/validation.h | 2 + src/test/util/xoroshiro128plusplus.h | 71 - src/test/util_string_tests.cpp | 149 + src/test/util_tests.cpp | 648 +- src/test/util_threadnames_tests.cpp | 11 +- src/test/util_trace_tests.cpp | 58 + src/test/validation_block_tests.cpp | 161 +- src/test/validation_chainstate_tests.cpp | 9 +- .../validation_chainstatemanager_tests.cpp | 743 +- src/test/validation_flush_tests.cpp | 19 +- src/test/validation_tests.cpp | 34 +- src/test/validationinterface_tests.cpp | 31 +- src/test/versionbits_tests.cpp | 454 +- src/test/xoroshiro128plusplus_tests.cpp | 29 - src/threadsafety.h | 22 +- src/timedata.cpp | 121 - src/timedata.h | 86 - src/tinyformat.h | 40 +- src/torcontrol.cpp | 87 +- src/torcontrol.h | 3 +- src/txdb.cpp | 61 +- src/txdb.h | 34 +- src/txgraph.cpp | 2946 ++++ src/txgraph.h | 255 + src/txmempool.cpp | 517 +- src/txmempool.h | 347 +- src/txorphanage.cpp | 243 - src/txorphanage.h | 105 - src/txrequest.cpp | 98 +- src/txrequest.h | 35 +- src/uint256.cpp | 38 - src/uint256.h | 130 +- src/undo.h | 1 - src/univalue/.gitignore | 32 - src/univalue/CMakeLists.txt | 97 + src/univalue/include/univalue.h | 5 +- src/univalue/include/univalue_escapes.h | 5 + src/univalue/lib/.gitignore | 2 - src/univalue/lib/univalue.cpp | 7 + src/univalue/lib/univalue_write.cpp | 3 + src/univalue/sources.mk | 86 - src/univalue/test/.gitignore | 7 - src/univalue/test/fail18.json | 2 +- src/univalue/test/object.cpp | 16 +- src/univalue/test/pass2.json | 2 +- src/univalue/test/test_json.cpp | 5 + src/univalue/test/unitester.cpp | 246 +- src/util/CMakeLists.txt | 48 + src/util/any.h | 6 +- src/util/asmap.cpp | 14 +- src/util/asmap.h | 6 +- src/util/batchpriority.h | 6 +- src/util/bip32.cpp | 11 +- src/util/bip32.h | 6 +- src/util/bitdeque.h | 15 +- src/util/bitset.h | 527 + src/util/byte_units.h | 22 + src/util/bytevectorhash.cpp | 4 +- src/util/bytevectorhash.h | 6 +- src/util/chaintype.cpp | 4 + src/util/chaintype.h | 7 +- src/util/check.cpp | 8 +- src/util/check.h | 85 +- src/util/epochguard.h | 6 +- src/util/error.cpp | 67 - src/util/error.h | 49 - src/util/exception.h | 6 +- src/util/exec.cpp | 75 + src/util/exec.h | 23 + src/util/fastrange.h | 6 +- src/util/feefrac.cpp | 73 + src/util/feefrac.h | 258 + src/util/fees.cpp | 67 - src/util/fees.h | 18 - src/util/fs.cpp | 21 +- src/util/fs.h | 46 +- src/util/fs_helpers.cpp | 112 +- src/util/fs_helpers.h | 30 +- src/util/getuniquepath.cpp | 14 - src/util/getuniquepath.h | 19 - src/util/golombrice.h | 6 +- src/util/hash_type.h | 6 +- src/util/hasher.cpp | 16 +- src/util/hasher.h | 15 +- src/util/insert.h | 6 +- src/util/macros.h | 6 +- src/util/moneystr.cpp | 3 + src/util/moneystr.h | 6 +- src/util/obfuscation.h | 115 + src/util/overflow.h | 44 +- src/util/overloaded.h | 10 +- src/util/rbf.h | 6 +- src/util/readwritefile.h | 6 +- src/util/result.h | 18 +- src/util/serfloat.h | 6 +- src/util/signalinterrupt.cpp | 15 +- src/util/signalinterrupt.h | 12 +- src/util/sock.cpp | 11 +- src/util/sock.h | 17 +- src/util/spanparsing.h | 79 - src/util/strencodings.cpp | 137 +- src/util/strencodings.h | 155 +- src/util/string.cpp | 2 + src/util/string.h | 153 +- src/util/subprocess.h | 1503 ++ src/util/syserror.cpp | 4 +- src/util/syserror.h | 6 +- src/util/task_runner.h | 52 + src/util/thread.cpp | 4 +- src/util/thread.h | 6 +- src/util/threadinterrupt.h | 6 +- src/util/threadnames.cpp | 46 +- src/util/threadnames.h | 12 +- src/util/time.cpp | 153 +- src/util/time.h | 41 +- src/util/tokenpipe.cpp | 8 +- src/util/tokenpipe.h | 6 +- src/util/trace.h | 80 +- src/util/transaction_identifier.h | 106 + src/util/translation.h | 75 +- src/util/types.h | 7 +- src/util/ui_change_type.h | 6 +- src/util/vecdeque.h | 317 + src/util/vector.h | 10 +- src/validation.cpp | 3252 +++-- src/validation.h | 317 +- src/validationinterface.cpp | 121 +- src/validationinterface.h | 146 +- src/versionbits.cpp | 202 +- src/versionbits.h | 95 +- src/versionbits_impl.h | 85 + src/wallet/CMakeLists.txt | 47 + src/wallet/bdb.cpp | 953 -- src/wallet/bdb.h | 221 - src/wallet/coincontrol.cpp | 127 +- src/wallet/coincontrol.h | 111 +- src/wallet/coinselection.cpp | 466 +- src/wallet/coinselection.h | 88 +- src/wallet/context.h | 8 +- src/wallet/crypter.cpp | 66 +- src/wallet/crypter.h | 33 +- src/wallet/db.cpp | 67 +- src/wallet/db.h | 70 +- src/wallet/dump.cpp | 67 +- src/wallet/dump.h | 11 +- .../external_signer_scriptpubkeyman.cpp | 57 +- src/wallet/external_signer_scriptpubkeyman.h | 21 +- src/wallet/feebumper.cpp | 84 +- src/wallet/feebumper.h | 14 +- src/wallet/fees.h | 6 +- src/wallet/init.cpp | 42 +- src/wallet/interfaces.cpp | 115 +- src/wallet/load.cpp | 57 +- src/wallet/load.h | 15 +- src/wallet/migrate.cpp | 789 ++ src/wallet/migrate.h | 110 + src/wallet/receive.cpp | 133 +- src/wallet/receive.h | 16 +- src/wallet/rpc/addresses.cpp | 220 +- src/wallet/rpc/auxpow.cpp | 84 +- src/wallet/rpc/backup.cpp | 1639 +-- src/wallet/rpc/coins.cpp | 132 +- src/wallet/rpc/encrypt.cpp | 50 +- src/wallet/rpc/signmessage.cpp | 7 +- src/wallet/rpc/spend.cpp | 884 +- src/wallet/rpc/transactions.cpp | 168 +- src/wallet/rpc/util.cpp | 85 +- src/wallet/rpc/util.h | 17 +- src/wallet/rpc/wallet.cpp | 577 +- src/wallet/rpc/wallet.h | 10 +- src/wallet/salvage.cpp | 220 - src/wallet/salvage.h | 19 - src/wallet/scriptpubkeyman.cpp | 1848 +-- src/wallet/scriptpubkeyman.h | 434 +- src/wallet/spend.cpp | 611 +- src/wallet/spend.h | 31 +- src/wallet/sqlite.cpp | 107 +- src/wallet/sqlite.h | 83 +- src/wallet/test/CMakeLists.txt | 28 + src/wallet/test/coinselection_tests.cpp | 229 + src/wallet/test/coinselector_tests.cpp | 534 +- src/wallet/test/db_tests.cpp | 256 +- src/wallet/test/feebumper_tests.cpp | 10 +- src/wallet/test/fuzz/CMakeLists.txt | 15 + src/wallet/test/fuzz/coincontrol.cpp | 7 +- src/wallet/test/fuzz/coinselection.cpp | 261 +- src/wallet/test/fuzz/crypter.cpp | 88 + src/wallet/test/fuzz/fees.cpp | 21 +- src/wallet/test/fuzz/notifications.cpp | 185 - src/wallet/test/fuzz/scriptpubkeyman.cpp | 209 + src/wallet/test/fuzz/spend.cpp | 104 + src/wallet/test/fuzz/wallet_bdb_parser.cpp | 89 + src/wallet/test/group_outputs_tests.cpp | 2 +- src/wallet/test/init_test_fixture.h | 6 +- src/wallet/test/ismine_tests.cpp | 453 +- src/wallet/test/psbt_wallet_tests.cpp | 54 +- src/wallet/test/rpc_util_tests.cpp | 24 - src/wallet/test/scriptpubkeyman_tests.cpp | 43 +- src/wallet/test/spend_tests.cpp | 11 +- src/wallet/test/util.cpp | 44 +- src/wallet/test/util.h | 42 +- src/wallet/test/wallet_crypto_tests.cpp | 113 +- src/wallet/test/wallet_rpc_tests.cpp | 41 + src/wallet/test/wallet_test_fixture.h | 6 +- src/wallet/test/wallet_tests.cpp | 552 +- src/wallet/test/walletdb_tests.cpp | 32 +- src/wallet/test/walletload_tests.cpp | 132 +- src/wallet/transaction.cpp | 35 +- src/wallet/transaction.h | 130 +- src/wallet/types.h | 23 +- src/wallet/wallet.cpp | 2078 +-- src/wallet/wallet.h | 243 +- src/wallet/walletdb.cpp | 486 +- src/wallet/walletdb.h | 88 +- src/wallet/wallettool.cpp | 85 +- src/wallet/wallettool.h | 6 +- src/wallet/walletutil.cpp | 56 + src/wallet/walletutil.h | 22 +- src/walletinitinterface.h | 8 +- src/warnings.cpp | 60 - src/warnings.h | 23 - src/zmq/CMakeLists.txt | 21 + src/zmq/zmqnotificationinterface.cpp | 33 +- src/zmq/zmqnotificationinterface.h | 10 +- src/zmq/zmqpublishnotifier.cpp | 36 +- src/zmq/zmqpublishnotifier.h | 6 +- src/zmq/zmqrpc.cpp | 7 +- src/zmq/zmqutil.cpp | 2 +- src/zmq/zmqutil.h | 3 + test/CMakeLists.txt | 48 + test/README.md | 116 +- test/config.ini | 11 + test/config.ini.in | 20 +- test/functional/.gitignore | 1 - test/functional/README.md | 15 +- test/functional/combine_logs.py | 20 +- test/functional/create_cache.py | 3 +- test/functional/data/README.md | 42 + test/functional/data/blockheader_testnet3.hex | 548 - test/functional/data/invalid_txs.py | 61 +- test/functional/data/mainnet_alt.json | 4036 ++++++ test/functional/data/rpc_psbt.json | 60 +- .../data/util/bitcoin-util-test.json} | 323 +- .../data/util}/blanktxv1.hex | 0 .../data/util}/blanktxv1.json | 0 .../data/util}/blanktxv2.hex | 0 .../data/util}/blanktxv2.json | 0 .../data/util}/tt-delin1-out.hex | 0 .../data/util}/tt-delin1-out.json | 0 .../data/util}/tt-delout1-out.hex | 0 .../data/util}/tt-delout1-out.json | 0 .../data/util}/tt-locktime317000-out.hex | 0 .../data/util}/tt-locktime317000-out.json | 0 .../data/util}/tx394b54bb.hex | 0 .../data/util}/txcreate1.hex | 0 .../data/util}/txcreate1.json | 0 .../data/util}/txcreate2.hex | 0 .../data/util}/txcreate2.json | 0 .../data/util}/txcreatedata1.hex | 0 .../data/util}/txcreatedata1.json | 0 .../data/util}/txcreatedata2.hex | 0 .../data/util}/txcreatedata2.json | 0 .../data/util}/txcreatedata_seq0.hex | 0 .../data/util}/txcreatedata_seq0.json | 0 .../data/util}/txcreatedata_seq1.hex | 0 .../data/util}/txcreatedata_seq1.json | 0 .../data/util}/txcreatemultisig1.hex | 0 .../data/util}/txcreatemultisig1.json | 0 .../data/util}/txcreatemultisig2.hex | 0 .../data/util}/txcreatemultisig2.json | 0 .../data/util}/txcreatemultisig3.hex | 0 .../data/util}/txcreatemultisig3.json | 0 .../data/util}/txcreatemultisig4.hex | 0 .../data/util}/txcreatemultisig4.json | 0 .../data/util}/txcreatemultisig5.json | 0 .../data/util}/txcreateoutpubkey1.hex | 0 .../data/util}/txcreateoutpubkey1.json | 0 .../data/util}/txcreateoutpubkey2.hex | 0 .../data/util}/txcreateoutpubkey2.json | 0 .../data/util}/txcreateoutpubkey3.hex | 0 .../data/util}/txcreateoutpubkey3.json | 0 .../data/util}/txcreatescript1.hex | 0 .../data/util}/txcreatescript1.json | 0 .../data/util}/txcreatescript2.hex | 0 .../data/util}/txcreatescript2.json | 0 .../data/util}/txcreatescript3.hex | 0 .../data/util}/txcreatescript3.json | 0 .../data/util}/txcreatescript4.hex | 0 .../data/util}/txcreatescript4.json | 0 .../data/util}/txcreatescript5.hex | 0 .../data/util}/txcreatescript6.hex | 0 .../data/util}/txcreatesignsegwit1.hex | 0 .../data/util}/txcreatesignv1.hex | 0 .../data/util}/txcreatesignv1.json | 0 .../data/util}/txcreatesignv2.hex | 0 test/functional/data/util/txreplace1.hex | 1 + .../data/util/txreplacenoinputs.hex | 1 + .../data/util/txreplaceomittedn.hex | 1 + .../data/util/txreplacesingleinput.hex | 1 + test/functional/example_test.py | 14 +- test/functional/feature_abortnode.py | 8 +- test/functional/feature_addrman.py | 27 +- test/functional/feature_anchors.py | 6 +- test/functional/feature_asmap.py | 75 +- test/functional/feature_assumeutxo.py | 620 +- test/functional/feature_assumevalid.py | 25 +- test/functional/feature_bind_extra.py | 39 +- test/functional/feature_bind_port_discover.py | 9 +- .../feature_bind_port_externalip.py | 2 +- test/functional/feature_bip68_sequence.py | 78 +- test/functional/feature_block.py | 187 +- test/functional/feature_blocksdir.py | 2 +- test/functional/feature_blocksxor.py | 67 + test/functional/feature_cltv.py | 28 +- test/functional/feature_coinstatsindex.py | 18 +- test/functional/feature_config_args.py | 173 +- test/functional/feature_csv_activation.py | 26 +- test/functional/feature_dbcrash.py | 15 +- test/functional/feature_dersig.py | 29 +- test/functional/feature_dirsymlinks.py | 2 +- test/functional/feature_discover.py | 2 +- test/functional/feature_fastprune.py | 2 +- test/functional/feature_fee_estimation.py | 97 +- test/functional/feature_filelock.py | 50 +- .../feature_framework_miniwallet.py | 68 + .../feature_framework_startup_failures.py | 168 + .../feature_framework_unit_tests.py | 53 + test/functional/feature_help.py | 4 +- test/functional/feature_includeconf.py | 2 +- test/functional/feature_index_prune.py | 63 +- test/functional/feature_init.py | 210 +- test/functional/feature_loadblock.py | 6 +- test/functional/feature_logging.py | 17 +- test/functional/feature_maxtipage.py | 6 +- test/functional/feature_maxuploadtarget.py | 66 +- test/functional/feature_minchainwork.py | 27 +- test/functional/feature_notifications.py | 23 +- test/functional/feature_nulldummy.py | 10 +- test/functional/feature_port.py | 60 + .../feature_posix_fs_permissions.py | 2 +- .../feature_presegwit_node_upgrade.py | 2 +- test/functional/feature_proxy.py | 152 +- test/functional/feature_pruning.py | 31 +- test/functional/feature_rbf.py | 227 +- test/functional/feature_reindex.py | 41 +- test/functional/feature_reindex_init.py | 34 + test/functional/feature_reindex_readonly.py | 13 +- .../feature_remove_pruned_files_on_startup.py | 60 +- test/functional/feature_segwit.py | 332 +- test/functional/feature_settings.py | 32 +- test/functional/feature_shutdown.py | 4 +- test/functional/feature_signet.py | 58 +- test/functional/feature_startupnotify.py | 2 +- test/functional/feature_taproot.py | 346 +- .../feature_txindex_compatibility.py | 66 - test/functional/feature_uacomment.py | 2 +- .../functional/feature_unsupported_utxo_db.py | 2 +- test/functional/feature_utxo_set_hash.py | 14 +- .../functional/feature_versionbits_warning.py | 16 +- ...dinate_cli.py => interface_bitcoin_cli.py} | 94 +- test/functional/interface_http.py | 136 +- test/functional/interface_rest.py | 51 +- test/functional/interface_rpc.py | 218 +- .../interface_usdt_coinselection.py | 61 +- test/functional/interface_usdt_mempool.py | 77 +- test/functional/interface_usdt_net.py | 397 +- test/functional/interface_usdt_utxocache.py | 69 +- test/functional/interface_usdt_validation.py | 34 +- test/functional/interface_zmq.py | 61 +- test/functional/mempool_accept.py | 209 +- test/functional/mempool_accept_wtxid.py | 67 +- test/functional/mempool_compatibility.py | 7 +- test/functional/mempool_datacarrier.py | 68 +- test/functional/mempool_dust.py | 35 +- test/functional/mempool_ephemeral_dust.py | 452 + test/functional/mempool_expiry.py | 7 +- test/functional/mempool_limit.py | 239 +- test/functional/mempool_package_limits.py | 24 +- test/functional/mempool_package_onemore.py | 24 +- test/functional/mempool_package_rbf.py | 591 + test/functional/mempool_packages.py | 33 +- test/functional/mempool_persist.py | 17 +- test/functional/mempool_reorg.py | 12 +- test/functional/mempool_resurrect.py | 2 +- test/functional/mempool_sigoplimit.py | 74 +- test/functional/mempool_spend_coinbase.py | 2 +- test/functional/mempool_truc.py | 620 + test/functional/mempool_unbroadcast.py | 17 +- test/functional/mempool_updatefromblock.py | 150 +- test/functional/mining_basic.py | 418 +- .../mining_getblocktemplate_longpoll.py | 2 +- test/functional/mining_mainnet.py | 106 + .../mining_prioritisetransaction.py | 34 +- .../mining_template_verification.py | 301 + test/functional/mocks/no_signer.py | 29 + test/functional/mocks/signer.py | 31 +- test/functional/p2p_1p1c_network.py | 160 + test/functional/p2p_add_connections.py | 30 +- test/functional/p2p_addr_relay.py | 15 +- test/functional/p2p_addrfetch.py | 4 +- test/functional/p2p_addrv2_relay.py | 25 +- test/functional/p2p_block_sync.py | 4 +- test/functional/p2p_blockfilters.py | 13 +- test/functional/p2p_blocksonly.py | 12 +- test/functional/p2p_compactblocks.py | 210 +- .../p2p_compactblocks_blocksonly.py | 24 +- test/functional/p2p_compactblocks_hb.py | 15 +- test/functional/p2p_disconnect_ban.py | 23 +- test/functional/p2p_dns_seeds.py | 15 +- test/functional/p2p_dos_header_tree.py | 88 - test/functional/p2p_eviction.py | 8 +- test/functional/p2p_feefilter.py | 8 +- test/functional/p2p_filter.py | 28 +- test/functional/p2p_fingerprint.py | 12 +- test/functional/p2p_getaddr_caching.py | 15 +- test/functional/p2p_getdata.py | 5 +- test/functional/p2p_handshake.py | 101 + .../p2p_headers_sync_with_minchainwork.py | 14 +- test/functional/p2p_i2p_ports.py | 20 +- test/functional/p2p_i2p_sessions.py | 2 +- test/functional/p2p_ibd_stalling.py | 23 +- test/functional/p2p_ibd_txrelay.py | 6 +- test/functional/p2p_initial_headers_sync.py | 137 +- test/functional/p2p_invalid_block.py | 20 +- test/functional/p2p_invalid_locator.py | 6 +- test/functional/p2p_invalid_messages.py | 74 +- test/functional/p2p_invalid_tx.py | 52 +- test/functional/p2p_leak.py | 12 +- test/functional/p2p_leak_tx.py | 6 +- test/functional/p2p_message_capture.py | 2 +- test/functional/p2p_mutated_blocks.py | 115 + test/functional/p2p_net_deadlock.py | 6 +- test/functional/p2p_nobloomfilter_messages.py | 4 +- test/functional/p2p_node_network_limited.py | 93 +- test/functional/p2p_opportunistic_1p1c.py | 644 + test/functional/p2p_orphan_handling.py | 519 +- test/functional/p2p_outbound_eviction.py | 256 + test/functional/p2p_permissions.py | 29 +- test/functional/p2p_ping.py | 21 +- test/functional/p2p_seednode.py | 60 + test/functional/p2p_segwit.py | 311 +- test/functional/p2p_sendheaders.py | 128 +- test/functional/p2p_sendtxrcncl.py | 47 +- test/functional/p2p_timeouts.py | 32 +- test/functional/p2p_tx_download.py | 250 +- test/functional/p2p_tx_privacy.py | 6 +- test/functional/p2p_unrequested_blocks.py | 82 +- test/functional/p2p_v2_encrypted.py | 134 + test/functional/p2p_v2_misbehaving.py | 189 + test/functional/p2p_v2_transport.py | 34 +- test/functional/rpc_bind.py | 53 +- test/functional/rpc_blockchain.py | 208 +- test/functional/rpc_createmultisig.py | 262 +- test/functional/rpc_decodescript.py | 12 +- test/functional/rpc_deprecated.py | 35 +- test/functional/rpc_deriveaddresses.py | 7 +- test/functional/rpc_dumptxoutset.py | 39 +- test/functional/rpc_estimatefee.py | 20 +- test/functional/rpc_generate.py | 22 +- test/functional/rpc_getblockfilter.py | 2 +- test/functional/rpc_getblockfrompeer.py | 13 +- test/functional/rpc_getblockstats.py | 25 +- test/functional/rpc_getchaintips.py | 73 +- test/functional/rpc_getdescriptoractivity.py | 242 + test/functional/rpc_getdescriptorinfo.py | 27 +- test/functional/rpc_help.py | 10 +- .../functional/rpc_invalid_address_message.py | 21 +- test/functional/rpc_invalidateblock.py | 56 +- test/functional/rpc_mempool_info.py | 2 +- test/functional/rpc_misc.py | 3 +- test/functional/rpc_named_arguments.py | 2 +- test/functional/rpc_net.py | 324 +- test/functional/rpc_orphans.py | 157 + test/functional/rpc_p2qrh.py | 225 + test/functional/rpc_packages.py | 231 +- test/functional/rpc_preciousblock.py | 6 +- test/functional/rpc_psbt.py | 447 +- test/functional/rpc_rawtransaction.py | 166 +- test/functional/rpc_scanblocks.py | 2 +- test/functional/rpc_scantxoutset.py | 13 +- test/functional/rpc_setban.py | 21 +- test/functional/rpc_signer.py | 12 +- test/functional/rpc_signmessagewithprivkey.py | 2 +- .../rpc_signrawtransactionwithkey.py | 57 +- test/functional/rpc_txoutproof.py | 8 +- test/functional/rpc_uptime.py | 4 +- test/functional/rpc_users.py | 100 +- test/functional/rpc_validateaddress.py | 7 +- test/functional/rpc_whitelist.py | 78 +- test/functional/test-shell.md | 59 +- test/functional/test_framework/address.py | 23 +- test/functional/test_framework/authproxy.py | 73 +- test/functional/test_framework/bdb.py | 151 - .../test_framework/bip340_test_vectors.csv | 4 + test/functional/test_framework/blockfilter.py | 4 +- test/functional/test_framework/blocktools.py | 67 +- test/functional/test_framework/compressor.py | 58 + test/functional/test_framework/coverage.py | 2 +- .../test_framework/crypto/bip324_cipher.py | 203 + .../test_framework/crypto/chacha20.py | 162 + .../test_framework/{ => crypto}/ellswift.py | 2 +- .../ellswift_decode_test_vectors.csv | 0 test/functional/test_framework/crypto/hkdf.py | 33 + .../test_framework/crypto/muhash.py | 55 + .../test_framework/crypto/poly1305.py | 104 + .../test_framework/{ => crypto}/ripemd160.py | 0 .../test_framework/{ => crypto}/secp256k1.py | 11 +- .../test_framework/{ => crypto}/siphash.py | 0 .../xswiftec_inv_test_vectors.csv | 0 test/functional/test_framework/key.py | 14 +- .../functional/test_framework/mempool_util.py | 127 + test/functional/test_framework/messages.py | 741 +- test/functional/test_framework/muhash.py | 110 - test/functional/test_framework/netutil.py | 31 +- test/functional/test_framework/p2p.py | 378 +- test/functional/test_framework/psbt.py | 7 + test/functional/test_framework/script.py | 96 +- test/functional/test_framework/script_util.py | 88 +- test/functional/test_framework/segwit_addr.py | 9 +- test/functional/test_framework/socks5.py | 74 +- .../test_framework/test_framework.py | 496 +- test/functional/test_framework/test_node.py | 449 +- test/functional/test_framework/test_shell.py | 18 +- test/functional/test_framework/util.py | 166 +- test/functional/test_framework/v2_p2p.py | 283 + test/functional/test_framework/wallet.py | 92 +- test/functional/test_framework/wallet_util.py | 58 + test/functional/test_runner.py | 402 +- test/functional/tool_bitcoin_chainstate.py | 49 + .../tool_rpcauth.py} | 42 +- test/functional/tool_signet_miner.py | 126 +- test/functional/tool_utils.py | 133 + test/functional/tool_utxo_to_sqlite.py | 117 + test/functional/tool_wallet.py | 204 +- test/functional/wallet_abandonconflict.py | 18 +- test/functional/wallet_address_types.py | 51 +- test/functional/wallet_assumeutxo.py | 234 + .../wallet_avoid_mixing_output_types.py | 11 +- test/functional/wallet_avoidreuse.py | 56 +- test/functional/wallet_backup.py | 67 +- .../wallet_backwards_compatibility.py | 354 +- test/functional/wallet_balance.py | 115 +- test/functional/wallet_basic.py | 218 +- test/functional/wallet_blank.py | 109 +- test/functional/wallet_bumpfee.py | 80 +- test/functional/wallet_change_address.py | 5 +- test/functional/wallet_coinbase_category.py | 5 +- test/functional/wallet_conflicts.py | 304 +- test/functional/wallet_create_tx.py | 29 +- test/functional/wallet_createwallet.py | 105 +- .../wallet_createwalletdescriptor.py | 120 + test/functional/wallet_crosschain.py | 35 +- test/functional/wallet_descriptor.py | 131 +- test/functional/wallet_disable.py | 2 +- test/functional/wallet_dump.py | 226 - test/functional/wallet_encryption.py | 86 +- test/functional/wallet_fallbackfee.py | 5 +- test/functional/wallet_fast_rescan.py | 18 +- test/functional/wallet_fundrawtransaction.py | 205 +- test/functional/wallet_gethdkeys.py | 183 + test/functional/wallet_groups.py | 13 +- test/functional/wallet_hd.py | 173 +- test/functional/wallet_implicitsegwit.py | 68 - test/functional/wallet_import_rescan.py | 296 - test/functional/wallet_import_with_label.py | 128 - test/functional/wallet_importdescriptors.py | 120 +- test/functional/wallet_importmulti.py | 901 -- test/functional/wallet_importprunedfunds.py | 34 +- test/functional/wallet_inactive_hdchains.py | 149 - test/functional/wallet_keypool.py | 170 +- test/functional/wallet_keypool_topup.py | 42 +- test/functional/wallet_labels.py | 97 +- test/functional/wallet_listdescriptors.py | 22 +- test/functional/wallet_listreceivedby.py | 13 +- test/functional/wallet_listsinceblock.py | 43 +- test/functional/wallet_listtransactions.py | 58 +- test/functional/wallet_migration.py | 1032 +- test/functional/wallet_miniscript.py | 16 +- ...cript_decaying_multisig_descriptor_psbt.py | 132 + .../wallet_multisig_descriptor_psbt.py | 39 +- test/functional/wallet_multiwallet.py | 89 +- test/functional/wallet_orphanedreward.py | 5 +- test/functional/wallet_pruning.py | 158 - test/functional/wallet_reindex.py | 94 + test/functional/wallet_reorgsrestore.py | 133 +- test/functional/wallet_rescan_unconfirmed.py | 79 + .../wallet_resendwallettransactions.py | 5 +- test/functional/wallet_send.py | 214 +- test/functional/wallet_sendall.py | 105 +- test/functional/wallet_sendmany.py | 49 + test/functional/wallet_signer.py | 123 +- .../wallet_signmessagewithaddress.py | 5 +- .../wallet_signrawtransactionwithwallet.py | 26 +- test/functional/wallet_simulaterawtx.py | 8 +- test/functional/wallet_spend_unconfirmed.py | 5 +- test/functional/wallet_startup.py | 8 +- test/functional/wallet_taproot.py | 21 +- test/functional/wallet_timelock.py | 5 +- .../wallet_transactiontime_rescan.py | 89 +- test/functional/wallet_txn_clone.py | 26 +- test/functional/wallet_txn_doublespend.py | 32 +- test/functional/wallet_upgradewallet.py | 363 - test/functional/wallet_watchonly.py | 114 - test/fuzz/test_runner.py | 103 +- test/get_previous_releases.py | 395 +- test/lint/README.md | 75 +- test/lint/all-lint.py | 23 - test/lint/check-doc.py | 2 +- test/lint/commit-script-check.sh | 19 +- test/lint/lint-assertions.py | 52 - test/lint/lint-circular-dependencies.py | 2 +- test/lint/lint-files.py | 11 +- test/lint/lint-format-strings.py | 100 - test/lint/lint-git-commit-check.py | 65 - test/lint/lint-include-guards.py | 15 +- test/lint/lint-includes.py | 17 +- test/lint/lint-locale-dependence.py | 25 +- .../lint-python-mutable-default-parameters.py | 72 - test/lint/lint-python.py | 96 +- test/lint/lint-qt-translation.py | 23 + test/lint/lint-spelling.py | 5 +- test/lint/lint-tests.py | 6 +- test/lint/lint-whitespace.py | 136 - test/lint/lint_ignore_dirs.py | 12 + test/lint/run-lint-format-strings.py | 305 - test/lint/spelling.ignore-words.txt | 18 +- test/lint/test_runner/Cargo.lock | 7 + test/lint/test_runner/Cargo.toml | 12 + test/lint/test_runner/src/main.rs | 789 ++ test/sanitizer_suppressions/lsan | 4 +- test/sanitizer_suppressions/tsan | 18 +- test/sanitizer_suppressions/ubsan | 52 +- test/util/test_runner.py | 183 - vcpkg.json | 61 + 2391 files changed, 197026 insertions(+), 117534 deletions(-) create mode 100644 .gitattributes delete mode 100644 .vscode/c_cpp_properties.json create mode 100644 CMakeLists.txt create mode 100644 CMakePresets.json delete mode 100644 Dockerfile delete mode 100644 Makefile.am create mode 100644 Testing/Temporary/CTestCostData.txt create mode 100644 Testing/Temporary/LastTest.log delete mode 100755 autogen.sh delete mode 100644 build-aux/m4/ax_boost_base.m4 delete mode 100644 build-aux/m4/ax_check_compile_flag.m4 delete mode 100644 build-aux/m4/ax_check_link_flag.m4 delete mode 100644 build-aux/m4/ax_check_preproc_flag.m4 delete mode 100644 build-aux/m4/ax_cxx_compile_stdcxx.m4 delete mode 100644 build-aux/m4/ax_pthread.m4 delete mode 100644 build-aux/m4/bitcoin_find_bdb48.m4 delete mode 100644 build-aux/m4/bitcoin_qt.m4 delete mode 100644 build-aux/m4/bitcoin_runtime_lib.m4 delete mode 100644 build-aux/m4/bitcoin_subdir_to_include.m4 delete mode 100644 build-aux/m4/l_atomic.m4 delete mode 100644 build-aux/m4/l_socket.m4 delete mode 100644 build_msvc/.gitignore delete mode 100644 build_msvc/README.md delete mode 100644 build_msvc/bench_bitcoin/bench_bitcoin.vcxproj.in delete mode 100644 build_msvc/bitcoin.sln delete mode 100644 build_msvc/bitcoin_config.h.in delete mode 100644 build_msvc/common.init.vcxproj.in delete mode 100644 build_msvc/common.qt.init.vcxproj delete mode 100644 build_msvc/common.vcxproj delete mode 100644 build_msvc/coordinate-cli/coordinate-cli.vcxproj delete mode 100644 build_msvc/coordinate-qt/coordinate-qt.vcxproj delete mode 100644 build_msvc/coordinate-tx/coordinate-tx.vcxproj delete mode 100644 build_msvc/coordinate-util/coordinate-util.vcxproj delete mode 100644 build_msvc/coordinate-wallet/coordinate-wallet.vcxproj delete mode 100644 build_msvc/coordinated/coordinated.vcxproj delete mode 100644 build_msvc/libbitcoin_common/libbitcoin_common.vcxproj.in delete mode 100644 build_msvc/libbitcoin_consensus/libbitcoin_consensus.vcxproj delete mode 100644 build_msvc/libbitcoin_crypto/libbitcoin_crypto.vcxproj.in delete mode 100644 build_msvc/libbitcoin_node/libbitcoin_node.vcxproj.in delete mode 100644 build_msvc/libbitcoin_zmq/libbitcoin_zmq.vcxproj.in delete mode 100644 build_msvc/libcoordinate_cli/libcoordinate_cli.vcxproj.in delete mode 100644 build_msvc/libcoordinate_qt/libcoordinate_qt.vcxproj delete mode 100644 build_msvc/libcoordinate_util/libcoordinate_util.vcxproj.in delete mode 100644 build_msvc/libcoordinate_wallet/libcoordinate_wallet.vcxproj.in delete mode 100644 build_msvc/libcoordinate_wallet_tool/libcoordinate_wallet_tool.vcxproj.in delete mode 100644 build_msvc/libleveldb/libleveldb.vcxproj delete mode 100644 build_msvc/libminisketch/libminisketch.vcxproj delete mode 100644 build_msvc/libsecp256k1/libsecp256k1.vcxproj delete mode 100644 build_msvc/libtest_util/libtest_util.vcxproj.in delete mode 100644 build_msvc/libunivalue/libunivalue.vcxproj delete mode 100644 build_msvc/msbuild/tasks/hexdump.targets delete mode 100644 build_msvc/msbuild/tasks/replaceinfile.targets delete mode 100755 build_msvc/msvc-autogen.py delete mode 100644 build_msvc/test_bitcoin/test_bitcoin.vcxproj delete mode 100644 build_msvc/test_coordinate-qt/test_coordinate-qt.vcxproj delete mode 100644 build_msvc/vcpkg.json rename ci/lint/{04_install.sh => 01_install.sh} (66%) create mode 100755 ci/lint_run.sh delete mode 100755 ci/test/00_setup_env_android.sh delete mode 100755 ci/test/00_setup_env_i686_centos.sh rename ci/test/{00_setup_env_mac.sh => 00_setup_env_mac_cross.sh} (56%) create mode 100755 ci/test/00_setup_env_mac_native_fuzz.sh create mode 100755 ci/test/00_setup_env_native_centos.sh create mode 100755 ci/test/00_setup_env_native_previous_releases.sh delete mode 100755 ci/test/00_setup_env_native_qt5.sh rename ci/test/{06_script_b.sh => 03_test_script.sh} (54%) create mode 100644 ci/test/GetCMakeLogFiles.cmake delete mode 100755 ci/test/wrap-wine.sh create mode 100644 cmake/bitcoin-build-config.h.in create mode 100644 cmake/ccache.cmake create mode 100644 cmake/crc32c.cmake create mode 100644 cmake/introspection.cmake create mode 100644 cmake/leveldb.cmake create mode 100644 cmake/libmultiprocess.cmake create mode 100644 cmake/minisketch.cmake create mode 100644 cmake/module/AddBoostIfNeeded.cmake create mode 100644 cmake/module/AddWindowsResources.cmake create mode 100644 cmake/module/CheckLinkerSupportsPIE.cmake create mode 100644 cmake/module/CheckSourceCompilesWithFlags.cmake create mode 100644 cmake/module/FindLibevent.cmake create mode 100644 cmake/module/FindQRencode.cmake create mode 100644 cmake/module/FindQt.cmake create mode 100644 cmake/module/FindUSDT.cmake create mode 100644 cmake/module/FindZeroMQ.cmake create mode 100644 cmake/module/FlagsSummary.cmake create mode 100644 cmake/module/GenerateSetupNsi.cmake create mode 100644 cmake/module/GetTargetInterface.cmake create mode 100644 cmake/module/InstallBinaryComponent.cmake create mode 100644 cmake/module/Maintenance.cmake create mode 100644 cmake/module/ProcessConfigurations.cmake create mode 100644 cmake/module/TargetDataSources.cmake create mode 100644 cmake/module/TestAppendRequiredLibraries.cmake create mode 100644 cmake/module/TryAppendCXXFlags.cmake create mode 100644 cmake/module/TryAppendLinkerFlag.cmake create mode 100644 cmake/module/WarnAboutGlobalProperties.cmake create mode 100644 cmake/script/Coverage.cmake create mode 100644 cmake/script/CoverageFuzz.cmake create mode 100644 cmake/script/CoverageInclude.cmake.in create mode 100644 cmake/script/GenerateBuildInfo.cmake create mode 100644 cmake/script/GenerateHeaderFromJson.cmake create mode 100644 cmake/script/GenerateHeaderFromRaw.cmake create mode 100644 cmake/script/cov_tool_wrapper.sh.in create mode 100755 cmake/script/macos_zip.sh create mode 100644 cmake/windows-app.manifest.in delete mode 100644 configure.ac create mode 100644 contrib/asmap/README.md create mode 100755 contrib/asmap/asmap-tool.py rename contrib/{seeds => asmap}/asmap.py (93%) rename contrib/completions/bash/{coordinate-cli.bash => bitcoin-cli.bash} (81%) rename contrib/completions/bash/{coordinate-tx.bash => bitcoin-tx.bash} (73%) rename contrib/completions/bash/{coordinated.bash => bitcoind.bash} (78%) rename contrib/completions/fish/{coordinate-cli.fish => bitcoin-cli.fish} (64%) rename contrib/completions/fish/{coordinate-qt.fish => bitcoin-qt.fish} (88%) rename contrib/completions/fish/{coordinate-tx.fish => bitcoin-tx.fish} (77%) rename contrib/completions/fish/{coordinate-util.fish => bitcoin-util.fish} (58%) rename contrib/completions/fish/{coordinate-wallet.fish => bitcoin-wallet.fish} (56%) rename contrib/completions/fish/{coordinated.fish => bitcoind.fish} (75%) rename contrib/devtools/bitcoin-tidy/{README => README.md} (100%) delete mode 100644 contrib/devtools/bitcoin-tidy/example_logprintf.cpp create mode 100644 contrib/devtools/bitcoin-tidy/example_nontrivial-threadlocal.cpp delete mode 100644 contrib/devtools/bitcoin-tidy/logprintf.cpp create mode 100644 contrib/devtools/bitcoin-tidy/nontrivial-threadlocal.cpp rename contrib/devtools/bitcoin-tidy/{logprintf.h => nontrivial-threadlocal.h} (64%) create mode 100755 contrib/devtools/check-deps.sh create mode 100644 contrib/devtools/deterministic-fuzz-coverage/Cargo.lock create mode 100644 contrib/devtools/deterministic-fuzz-coverage/Cargo.toml create mode 100644 contrib/devtools/deterministic-fuzz-coverage/src/main.rs create mode 100644 contrib/devtools/deterministic-unittest-coverage/Cargo.lock create mode 100644 contrib/devtools/deterministic-unittest-coverage/Cargo.toml create mode 100644 contrib/devtools/deterministic-unittest-coverage/src/main.rs mode change 100644 => 100755 contrib/devtools/headerssync-params.py delete mode 100755 contrib/devtools/split-debug.sh delete mode 100755 contrib/devtools/test-security-check.py delete mode 100755 contrib/devtools/test-symbol-check.py delete mode 100755 contrib/devtools/test_deterministic_coverage.sh delete mode 100755 contrib/devtools/test_utxo_snapshots.sh delete mode 100755 contrib/devtools/utxo_snapshot.sh create mode 100644 contrib/guix/patches/binutils-unaligned-default.patch delete mode 100644 contrib/guix/patches/glibc-2.27-fcommon.patch delete mode 100644 contrib/guix/patches/glibc-2.27-no-librt.patch delete mode 100644 contrib/guix/patches/glibc-2.27-powerpc-ldbrx.patch delete mode 100644 contrib/guix/patches/glibc-2.27-riscv64-Use-__has_include-to-include-asm-syscalls.h.patch rename contrib/guix/patches/{glibc-2.27-guix-prefix.patch => glibc-guix-prefix.patch} (78%) create mode 100644 contrib/guix/patches/lief-scikit-0-9.patch delete mode 100644 contrib/guix/patches/vmov-alignment.patch create mode 100644 contrib/guix/patches/winpthreads-remap-guix-store.patch rename contrib/{devtools => guix}/security-check.py (64%) rename contrib/{devtools => guix}/symbol-check.py (63%) rename contrib/init/{coordinated.conf => bitcoind.conf} (51%) create mode 100644 contrib/init/bitcoind.init create mode 100644 contrib/init/bitcoind.openrc create mode 100644 contrib/init/bitcoind.openrcconf rename contrib/init/{coordinated.service => bitcoind.service} (84%) delete mode 100644 contrib/init/coordinated.init delete mode 100644 contrib/init/coordinated.openrc delete mode 100644 contrib/init/coordinated.openrcconf create mode 100644 contrib/init/org.bitcoin.bitcoind.plist delete mode 100644 contrib/seeds/nodes_main_manual.txt create mode 100644 contrib/seeds/nodes_signet.txt create mode 100644 contrib/seeds/nodes_testnet4.txt create mode 100755 contrib/tracing/log_p2p_connections.bt create mode 100755 contrib/utxo-tools/utxo_to_sqlite.py delete mode 100644 depends/config.site.in delete mode 100644 depends/hosts/android.mk delete mode 100644 depends/packages/bdb.mk delete mode 100644 depends/packages/libmultiprocess.mk delete mode 100644 depends/packages/libnatpmp.mk create mode 100644 depends/packages/libxcb_util_cursor.mk delete mode 100644 depends/packages/miniupnpc.mk delete mode 100644 depends/packages/native_cctools.mk delete mode 100644 depends/packages/native_clang.mk delete mode 100644 depends/packages/native_libtapi.mk create mode 100644 depends/packages/native_qt.mk create mode 100644 depends/packages/qt_details.mk delete mode 100644 depends/patches/bdb/clang_cxx_11.patch create mode 100644 depends/patches/boost/skip_compiled_targets.patch create mode 100644 depends/patches/expat/cmake_minimum.patch create mode 100644 depends/patches/freetype/cmake_minimum.patch create mode 100644 depends/patches/libevent/cmake_fixups.patch create mode 100644 depends/patches/libevent/netbsd_fixup.patch create mode 100644 depends/patches/libevent/winver_fixup.patch delete mode 100644 depends/patches/miniupnpc/dont_leak_info.patch delete mode 100644 depends/patches/miniupnpc/respect_mingw_cflags.patch delete mode 100644 depends/patches/native_libtapi/disable_zlib.patch create mode 100644 depends/patches/qrencode/cmake_fixups.patch delete mode 100644 depends/patches/qt/duplicate_lcqpafonts.patch delete mode 100644 depends/patches/qt/fast_fixed_dtoa_no_optimize.patch delete mode 100644 depends/patches/qt/fix-macos-linker.patch delete mode 100644 depends/patches/qt/fix_android_jni_static.patch delete mode 100644 depends/patches/qt/fix_qt_pkgconfig.patch delete mode 100644 depends/patches/qt/guix_cross_lib_path.patch delete mode 100644 depends/patches/qt/mac-qmake.conf delete mode 100644 depends/patches/qt/no-xlib.patch delete mode 100644 depends/patches/qt/qt.pro create mode 100644 depends/patches/qt/qtbase_avoid_native_float16.patch create mode 100644 depends/patches/qt/qtbase_avoid_qmain.patch create mode 100644 depends/patches/qt/qtbase_platformsupport.patch create mode 100644 depends/patches/qt/qtbase_plugins_cocoa.patch create mode 100644 depends/patches/qt/qtbase_skip_tools.patch create mode 100644 depends/patches/qt/qttools_skip_dependencies.patch delete mode 100644 depends/patches/qt/qttools_src.pro delete mode 100644 depends/patches/qt/use_android_ndk23.patch delete mode 100644 depends/patches/qt/windows_lto.patch delete mode 100644 depends/patches/systemtap/fix_variadic_warning.patch create mode 100644 depends/patches/zeromq/builtin_sha1.patch create mode 100644 depends/patches/zeromq/cacheline_undefined.patch create mode 100644 depends/patches/zeromq/cmake_minimum.patch create mode 100644 depends/patches/zeromq/fix_have_windows.patch create mode 100644 depends/patches/zeromq/macos_mktemp_check.patch delete mode 100644 depends/patches/zeromq/netbsd_kevent_void.patch create mode 100644 depends/patches/zeromq/no_librt.patch create mode 100644 depends/patches/zeromq/openbsd_kqueue_headers.patch delete mode 100644 depends/patches/zeromq/remove_libstd_link.patch create mode 100644 depends/toolchain.cmake.in delete mode 100644 doc/.gitignore create mode 100644 doc/CMakeLists.txt create mode 100644 doc/assumeutxo.md delete mode 100644 doc/build-android.md create mode 100644 doc/build-windows-msvc.md delete mode 100644 doc/man/Makefile.am create mode 100644 doc/man/bitcoin-cli.1 create mode 100644 doc/man/bitcoin-qt.1 create mode 100644 doc/man/bitcoin-tx.1 create mode 100644 doc/man/bitcoin-util.1 create mode 100644 doc/man/bitcoin-wallet.1 create mode 100644 doc/man/bitcoind.1 delete mode 100644 doc/man/coordinate-cli.1 delete mode 100644 doc/man/coordinate-qt.1 delete mode 100644 doc/man/coordinate-tx.1 delete mode 100644 doc/man/coordinate-util.1 delete mode 100644 doc/man/coordinate-wallet.1 delete mode 100644 doc/man/coordinated.1 create mode 100644 doc/multiprocess.md create mode 100644 doc/offline-signing-tutorial.md create mode 100644 doc/release-30635.md create mode 100644 doc/release-notes-27826.md create mode 100644 doc/release-notes-31278.md create mode 100644 doc/release-notes-31375.md create mode 100644 doc/release-notes-31385.md create mode 100644 doc/release-notes-31603.md create mode 100644 doc/release-notes-31829.md create mode 100644 doc/release-notes-31953.md create mode 100644 doc/release-notes-32406.md create mode 100644 doc/release-notes-32425.md create mode 100644 doc/release-notes-32459.md create mode 100644 doc/release-notes-32500.md create mode 100644 doc/release-notes-32521.md create mode 100644 doc/release-notes-32530.md create mode 100644 doc/release-notes-32540.md create mode 100644 doc/release-notes-32604.md create mode 100644 doc/release-notes-32618.md create mode 100644 doc/release-notes-32845.md create mode 100644 doc/release-notes-32944-28710-32438-31250.md create mode 100644 doc/release-notes-33004.md create mode 100644 doc/release-notes-empty-template.md create mode 100644 doc/release-notes/release-notes-25.2.md rename doc/{release-notes.md => release-notes/release-notes-26.0.md} (90%) create mode 100644 doc/release-notes/release-notes-26.1.md create mode 100644 doc/release-notes/release-notes-26.2.md create mode 100644 doc/release-notes/release-notes-27.0.md create mode 100644 doc/release-notes/release-notes-27.1.md create mode 100644 doc/release-notes/release-notes-27.2.md create mode 100644 doc/release-notes/release-notes-28.0.md create mode 100644 doc/release-notes/release-notes-28.1.md create mode 100644 doc/release-notes/release-notes-28.2.md create mode 100644 doc/release-notes/release-notes-29.0.md delete mode 100644 doc/shared-libraries.md create mode 100644 generate_blockfilters.py delete mode 100644 libbitcoinconsensus.pc.in create mode 100644 libbitcoinkernel.pc.in delete mode 100755 share/genbuild.sh delete mode 100644 src/.bear-tidy-config create mode 100644 src/CMakeLists.txt delete mode 100644 src/Makefile.am delete mode 100644 src/Makefile.bench.include delete mode 100644 src/Makefile.crc32c.include delete mode 100644 src/Makefile.leveldb.include delete mode 100644 src/Makefile.minisketch.include delete mode 100644 src/Makefile.qt.include delete mode 100644 src/Makefile.qt_locale.include delete mode 100644 src/Makefile.qttest.include delete mode 100644 src/Makefile.test.include delete mode 100644 src/Makefile.test_fuzz.include delete mode 100644 src/Makefile.test_util.include delete mode 100644 src/Makefile.univalue.include delete mode 100644 src/bench/.gitignore create mode 100644 src/bench/CMakeLists.txt create mode 100644 src/bench/checkblockindex.cpp create mode 100644 src/bench/cluster_linearize.cpp create mode 100644 src/bench/connectblock.cpp delete mode 100644 src/bench/data.cpp delete mode 100644 src/bench/data.h create mode 100644 src/bench/index_blockfilter.cpp create mode 100644 src/bench/mempool_ephemeral_spends.cpp rename src/bench/{xor.cpp => obfuscation.cpp} (53%) create mode 100644 src/bench/parse_hex.cpp create mode 100644 src/bench/random.cpp create mode 100644 src/bench/readwriteblock.cpp create mode 100644 src/bench/sign_transaction.cpp create mode 100644 src/bench/txgraph.cpp create mode 100644 src/bench/txorphanage.cpp create mode 100644 src/bench/wallet_create.cpp create mode 100644 src/bench/wallet_ismine.cpp create mode 100644 src/bench/wallet_migration.cpp rename src/{coordinate-util-res.rc => bitcoin-cli-res.rc} (67%) rename src/{coordinate-cli.cpp => bitcoin-cli.cpp} (81%) rename src/{coordinate-wallet-res.rc => bitcoin-res.rc} (67%) rename src/{coordinate-tx-res.rc => bitcoin-tx-res.rc} (67%) rename src/{coordinate-tx.cpp => bitcoin-tx.cpp} (91%) rename src/{coordinated-res.rc => bitcoin-util-res.rc} (68%) rename src/{coordinate-util.cpp => bitcoin-util.cpp} (88%) create mode 100644 src/bitcoin-wallet-res.rc rename src/{coordinate-wallet.cpp => bitcoin-wallet.cpp} (70%) create mode 100644 src/bitcoin.cpp rename src/{coordinate-cli-res.rc => bitcoind-res.rc} (68%) rename src/{coordinated.cpp => bitcoind.cpp} (81%) create mode 100644 src/cluster_linearize.h create mode 100644 src/common/messages.cpp create mode 100644 src/common/messages.h create mode 100644 src/common/netif.cpp create mode 100644 src/common/netif.h create mode 100644 src/common/pcp.cpp create mode 100644 src/common/pcp.h rename src/{util/message.cpp => common/signmessage.cpp} (98%) rename src/{util/message.h => common/signmessage.h} (95%) create mode 100644 src/common/types.h delete mode 100644 src/config/.empty delete mode 100755 src/coordinate-tx delete mode 100755 src/coordinate-util delete mode 100755 src/coordinate-wallet rename src/{ => coordinate}/anduro_deposit.cpp (89%) rename src/{ => coordinate}/anduro_deposit.h (99%) rename src/{ => coordinate}/anduro_validator.cpp (98%) rename src/{ => coordinate}/anduro_validator.h (97%) create mode 100644 src/crypto/CMakeLists.txt create mode 100644 src/crypto/hex_base.cpp create mode 100644 src/crypto/hex_base.h rename src/init/{coordinate-qt.cpp => bitcoin-qt.cpp} (87%) rename src/init/{coordinate-wallet.cpp => bitcoin-wallet.cpp} (100%) rename src/init/{coordinated.cpp => bitcoind.cpp} (78%) create mode 100644 src/interfaces/mining.h create mode 100644 src/interfaces/types.h create mode 100644 src/ipc/CMakeLists.txt delete mode 100644 src/ipc/capnp/.gitignore create mode 100644 src/ipc/capnp/common-types.h create mode 100644 src/ipc/capnp/common.capnp create mode 100644 src/ipc/capnp/echo-types.h create mode 100644 src/ipc/capnp/mining-types.h create mode 100644 src/ipc/capnp/mining.capnp create mode 100644 src/ipc/capnp/mining.cpp create mode 100644 src/ipc/libmultiprocess/.clang-tidy create mode 100644 src/ipc/libmultiprocess/CMakeLists.txt create mode 100644 src/ipc/libmultiprocess/COPYING create mode 100644 src/ipc/libmultiprocess/README.md create mode 100644 src/ipc/libmultiprocess/cmake/Config.cmake.in create mode 100644 src/ipc/libmultiprocess/cmake/TargetCapnpSources.cmake create mode 100644 src/ipc/libmultiprocess/cmake/compat_config.cmake create mode 100644 src/ipc/libmultiprocess/cmake/compat_find.cmake create mode 100644 src/ipc/libmultiprocess/cmake/pthread_checks.cmake create mode 100644 src/ipc/libmultiprocess/doc/design.md create mode 100644 src/ipc/libmultiprocess/doc/install.md create mode 100644 src/ipc/libmultiprocess/doc/usage.md create mode 100644 src/ipc/libmultiprocess/example/CMakeLists.txt create mode 100644 src/ipc/libmultiprocess/example/calculator.capnp create mode 100644 src/ipc/libmultiprocess/example/calculator.cpp create mode 100644 src/ipc/libmultiprocess/example/calculator.h create mode 100644 src/ipc/libmultiprocess/example/example.cpp create mode 100644 src/ipc/libmultiprocess/example/init.capnp create mode 100644 src/ipc/libmultiprocess/example/init.h create mode 100644 src/ipc/libmultiprocess/example/printer.capnp create mode 100644 src/ipc/libmultiprocess/example/printer.cpp create mode 100644 src/ipc/libmultiprocess/example/printer.h create mode 100644 src/ipc/libmultiprocess/example/types.h create mode 100644 src/ipc/libmultiprocess/include/mp/config.h.in create mode 100644 src/ipc/libmultiprocess/include/mp/proxy-io.h create mode 100644 src/ipc/libmultiprocess/include/mp/proxy-types.h create mode 100644 src/ipc/libmultiprocess/include/mp/proxy.capnp create mode 100644 src/ipc/libmultiprocess/include/mp/proxy.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-char.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-chrono.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-context.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-data.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-decay.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-exception.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-function.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-interface.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-map.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-message.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-number.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-optional.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-pair.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-pointer.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-set.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-string.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-struct.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-threadmap.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-tuple.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-vector.h create mode 100644 src/ipc/libmultiprocess/include/mp/type-void.h create mode 100644 src/ipc/libmultiprocess/include/mp/util.h create mode 100644 src/ipc/libmultiprocess/include/mpgen.mk create mode 100644 src/ipc/libmultiprocess/pkgconfig/libmultiprocess.pc.in create mode 100644 src/ipc/libmultiprocess/src/mp/gen.cpp create mode 100644 src/ipc/libmultiprocess/src/mp/proxy.cpp create mode 100644 src/ipc/libmultiprocess/src/mp/util.cpp create mode 100644 src/ipc/libmultiprocess/test/CMakeLists.txt create mode 100644 src/ipc/libmultiprocess/test/mp/test/foo-types.h create mode 100644 src/ipc/libmultiprocess/test/mp/test/foo.capnp create mode 100644 src/ipc/libmultiprocess/test/mp/test/foo.h create mode 100644 src/ipc/libmultiprocess/test/mp/test/test.cpp create mode 100644 src/kernel/CMakeLists.txt create mode 100644 src/kernel/caches.h create mode 100644 src/kernel/disconnected_transactions.cpp delete mode 100644 src/kernel/validation_cache_sizes.h create mode 100644 src/kernel/warning.h create mode 100644 src/musig.cpp create mode 100644 src/musig.h rename src/{kernel => node}/mempool_persist.cpp (58%) rename src/{kernel => node}/mempool_persist.h (85%) rename src/{version.h => node/protocol_version.h} (83%) create mode 100644 src/node/timeoffsets.cpp create mode 100644 src/node/timeoffsets.h create mode 100644 src/node/txdownloadman.h create mode 100644 src/node/txdownloadman_impl.cpp create mode 100644 src/node/txdownloadman_impl.h create mode 100644 src/node/txorphanage.cpp create mode 100644 src/node/txorphanage.h create mode 100644 src/node/types.h delete mode 100644 src/node/validation_cache_args.cpp delete mode 100644 src/node/validation_cache_args.h create mode 100644 src/node/warnings.cpp create mode 100644 src/node/warnings.h create mode 100644 src/policy/ephemeral_policy.cpp create mode 100644 src/policy/ephemeral_policy.h create mode 100644 src/policy/truc_policy.cpp create mode 100644 src/policy/truc_policy.h create mode 100644 src/qt/CMakeLists.txt delete mode 100644 src/qt/Makefile delete mode 100644 src/qt/android/.gitignore delete mode 100644 src/qt/android/AndroidManifest.xml delete mode 100644 src/qt/android/build.gradle delete mode 100644 src/qt/android/gradle.properties delete mode 100644 src/qt/android/res/drawable-hdpi/bitcoin.png delete mode 100644 src/qt/android/res/drawable-ldpi/bitcoin.png delete mode 100644 src/qt/android/res/drawable-mdpi/bitcoin.png delete mode 100644 src/qt/android/res/drawable-xhdpi/bitcoin.png delete mode 100644 src/qt/android/res/drawable-xxhdpi/bitcoin.png delete mode 100644 src/qt/android/res/drawable-xxxhdpi/bitcoin.png delete mode 100644 src/qt/android/res/values/libs.xml delete mode 100644 src/qt/android/src/org/bitcoincore/qt/BitcoinQtActivity.java create mode 100644 src/qt/freespacechecker.cpp create mode 100644 src/qt/freespacechecker.h delete mode 100644 src/qt/locale/bitcoin_af.ts create mode 100644 src/qt/locale/bitcoin_ast_ES.ts create mode 100644 src/qt/locale/bitcoin_ay.ts delete mode 100644 src/qt/locale/bitcoin_es_MX.ts create mode 100644 src/qt/locale/bitcoin_mi.ts create mode 100644 src/qt/locale/bitcoin_or.ts create mode 100644 src/qt/locale/bitcoin_ps.ts create mode 100644 src/qt/locale/bitcoin_sa.ts create mode 100644 src/qt/locale/bitcoin_sd.ts create mode 100644 src/qt/locale/bitcoin_sm.ts create mode 100644 src/qt/locale/bitcoin_tn.ts create mode 100644 src/qt/locale/bitcoin_ve.ts create mode 100644 src/qt/locale/bitcoin_yi.ts rename src/qt/res/{coordinate-qt-res.rc => bitcoin-qt-res.rc} (76%) create mode 100644 src/qt/res/icons/bitcoin_signet.ico create mode 100644 src/qt/test/CMakeLists.txt delete mode 100644 src/qt/test/Makefile delete mode 100644 src/reverse_iterator.h create mode 100644 src/rpc/rawtransaction.h delete mode 100644 src/script/bitcoinconsensus.cpp delete mode 100644 src/script/bitcoinconsensus.h rename src/{util/spanparsing.cpp => script/parsing.cpp} (71%) create mode 100644 src/script/parsing.h create mode 100644 src/secp256k1/.github/actions/print-logs/action.yml create mode 100644 src/secp256k1/CONTRIBUTING.md create mode 100644 src/secp256k1/cmake/CheckMemorySanitizer.cmake create mode 100644 src/secp256k1/cmake/GeneratePkgConfigFile.cmake create mode 100644 src/secp256k1/doc/musig.md create mode 100644 src/secp256k1/examples/ellswift.c create mode 100644 src/secp256k1/examples/musig.c create mode 100644 src/secp256k1/include/secp256k1_musig.h delete mode 100644 src/secp256k1/src/field_5x52_asm_impl.h create mode 100644 src/secp256k1/src/hsort.h create mode 100644 src/secp256k1/src/hsort_impl.h create mode 100644 src/secp256k1/src/modules/musig/Makefile.am.include create mode 100644 src/secp256k1/src/modules/musig/keyagg.h create mode 100644 src/secp256k1/src/modules/musig/keyagg_impl.h create mode 100644 src/secp256k1/src/modules/musig/main_impl.h create mode 100644 src/secp256k1/src/modules/musig/session.h create mode 100644 src/secp256k1/src/modules/musig/session_impl.h create mode 100644 src/secp256k1/src/modules/musig/tests_impl.h create mode 100644 src/secp256k1/src/modules/musig/vectors.h create mode 100644 src/secp256k1/src/testutil.h create mode 100644 src/secp256k1/src/util_local_visibility.h create mode 100644 src/secp256k1/src/wycheproof/ecdh_secp256k1_test.h create mode 100644 src/secp256k1/src/wycheproof/ecdh_secp256k1_test.json create mode 100755 src/secp256k1/tools/check-abi.sh create mode 100755 src/secp256k1/tools/symbol-check.py create mode 100755 src/secp256k1/tools/test_vectors_musig2_generate.py create mode 100755 src/secp256k1/tools/tests_wycheproof_generate_ecdh.py rename src/secp256k1/tools/{tests_wycheproof_generate.py => tests_wycheproof_generate_ecdsa.py} (95%) create mode 100644 src/secp256k1/tools/wycheproof_utils.py create mode 100644 src/semaphore_grant.h delete mode 100644 src/shutdown.cpp delete mode 100644 src/shutdown.h create mode 100644 src/test/CMakeLists.txt delete mode 100644 src/test/Makefile create mode 100644 src/test/asset_transaction_tests.cpp create mode 100644 src/test/chainstate_write_tests.cpp create mode 100644 src/test/cluster_linearize_tests.cpp create mode 100644 src/test/coinscachepair_tests.cpp create mode 100644 src/test/common_url_tests.cpp create mode 100644 src/test/disconnected_transactions.cpp create mode 100644 src/test/feefrac_tests.cpp create mode 100644 src/test/fuzz/CMakeLists.txt create mode 100644 src/test/fuzz/bitset.cpp create mode 100644 src/test/fuzz/block_index.cpp create mode 100644 src/test/fuzz/cluster_linearize.cpp create mode 100644 src/test/fuzz/crypto_chacha20poly1305.cpp create mode 100644 src/test/fuzz/feefrac.cpp create mode 100644 src/test/fuzz/feeratediagram.cpp create mode 100644 src/test/fuzz/i2p.cpp create mode 100644 src/test/fuzz/merkle.cpp create mode 100644 src/test/fuzz/overflow.cpp create mode 100644 src/test/fuzz/p2p_handshake.cpp create mode 100644 src/test/fuzz/p2p_headers_presync.cpp rename src/{wallet => }/test/fuzz/parse_iso8601.cpp (60%) create mode 100644 src/test/fuzz/pcp.cpp delete mode 100644 src/test/fuzz/script_bitcoin_consensus.cpp rename src/test/fuzz/{spanparsing.cpp => script_parsing.cpp} (61%) delete mode 100644 src/test/fuzz/timedata.cpp create mode 100644 src/test/fuzz/timeoffsets.cpp create mode 100644 src/test/fuzz/txdownloadman.cpp create mode 100644 src/test/fuzz/txgraph.cpp create mode 100644 src/test/fuzz/util/CMakeLists.txt create mode 100644 src/test/fuzz/util/check_globals.cpp create mode 100644 src/test/fuzz/util/check_globals.h create mode 100644 src/test/fuzz/util/descriptor.cpp create mode 100644 src/test/fuzz/util/descriptor.h create mode 100644 src/test/fuzz/util/wallet.h create mode 100644 src/test/fuzz/vecdeque.cpp create mode 100644 src/test/ipc_test.capnp create mode 100644 src/test/ipc_test.cpp create mode 100644 src/test/ipc_test.h create mode 100644 src/test/ipc_test_types.h create mode 100644 src/test/ipc_tests.cpp create mode 100644 src/test/net_peer_connection_tests.cpp create mode 100644 src/test/node_warnings_tests.cpp create mode 100644 src/test/pcp_tests.cpp create mode 100644 src/test/peerman_tests.cpp create mode 100644 src/test/preconf_transaction_tests.cpp create mode 100644 src/test/script_assets_tests.cpp create mode 100644 src/test/span_tests.cpp create mode 100644 src/test/test_slh_dsa_keygen.cpp create mode 100644 src/test/testnet4_miner_tests.cpp delete mode 100644 src/test/timedata_tests.cpp create mode 100644 src/test/timeoffsets_tests.cpp create mode 100644 src/test/txdownload_tests.cpp create mode 100644 src/test/txgraph_tests.cpp create mode 100644 src/test/util/CMakeLists.txt create mode 100644 src/test/util/cluster_linearize.h create mode 100644 src/test/util/coverage.cpp create mode 100644 src/test/util/coverage.h delete mode 100644 src/test/util/index.cpp delete mode 100644 src/test/util/index.h create mode 100644 src/test/util/time.cpp create mode 100644 src/test/util/time.h delete mode 100644 src/test/util/xoroshiro128plusplus.h create mode 100644 src/test/util_string_tests.cpp create mode 100644 src/test/util_trace_tests.cpp delete mode 100644 src/test/xoroshiro128plusplus_tests.cpp delete mode 100644 src/timedata.cpp delete mode 100644 src/timedata.h create mode 100644 src/txgraph.cpp create mode 100644 src/txgraph.h delete mode 100644 src/txorphanage.cpp delete mode 100644 src/txorphanage.h delete mode 100644 src/univalue/.gitignore create mode 100644 src/univalue/CMakeLists.txt delete mode 100644 src/univalue/lib/.gitignore delete mode 100644 src/univalue/sources.mk delete mode 100644 src/univalue/test/.gitignore create mode 100644 src/util/CMakeLists.txt create mode 100644 src/util/bitset.h create mode 100644 src/util/byte_units.h delete mode 100644 src/util/error.cpp delete mode 100644 src/util/error.h create mode 100644 src/util/exec.cpp create mode 100644 src/util/exec.h create mode 100644 src/util/feefrac.cpp create mode 100644 src/util/feefrac.h delete mode 100644 src/util/fees.cpp delete mode 100644 src/util/fees.h delete mode 100644 src/util/getuniquepath.cpp delete mode 100644 src/util/getuniquepath.h create mode 100644 src/util/obfuscation.h delete mode 100644 src/util/spanparsing.h create mode 100644 src/util/subprocess.h create mode 100644 src/util/task_runner.h create mode 100644 src/util/transaction_identifier.h create mode 100644 src/util/vecdeque.h create mode 100644 src/versionbits_impl.h create mode 100644 src/wallet/CMakeLists.txt delete mode 100644 src/wallet/bdb.cpp delete mode 100644 src/wallet/bdb.h create mode 100644 src/wallet/migrate.cpp create mode 100644 src/wallet/migrate.h delete mode 100644 src/wallet/salvage.cpp delete mode 100644 src/wallet/salvage.h create mode 100644 src/wallet/test/CMakeLists.txt create mode 100644 src/wallet/test/coinselection_tests.cpp create mode 100644 src/wallet/test/fuzz/CMakeLists.txt create mode 100644 src/wallet/test/fuzz/crypter.cpp delete mode 100644 src/wallet/test/fuzz/notifications.cpp create mode 100644 src/wallet/test/fuzz/scriptpubkeyman.cpp create mode 100644 src/wallet/test/fuzz/spend.cpp create mode 100644 src/wallet/test/fuzz/wallet_bdb_parser.cpp delete mode 100644 src/wallet/test/rpc_util_tests.cpp create mode 100644 src/wallet/test/wallet_rpc_tests.cpp delete mode 100644 src/warnings.cpp delete mode 100644 src/warnings.h create mode 100644 src/zmq/CMakeLists.txt create mode 100644 test/CMakeLists.txt create mode 100644 test/config.ini create mode 100644 test/functional/data/README.md delete mode 100644 test/functional/data/blockheader_testnet3.hex create mode 100644 test/functional/data/mainnet_alt.json rename test/{util/data/coordinate-util-test.json => functional/data/util/bitcoin-util-test.json} (76%) rename test/{util/data => functional/data/util}/blanktxv1.hex (100%) rename test/{util/data => functional/data/util}/blanktxv1.json (100%) rename test/{util/data => functional/data/util}/blanktxv2.hex (100%) rename test/{util/data => functional/data/util}/blanktxv2.json (100%) rename test/{util/data => functional/data/util}/tt-delin1-out.hex (100%) rename test/{util/data => functional/data/util}/tt-delin1-out.json (100%) rename test/{util/data => functional/data/util}/tt-delout1-out.hex (100%) rename test/{util/data => functional/data/util}/tt-delout1-out.json (100%) rename test/{util/data => functional/data/util}/tt-locktime317000-out.hex (100%) rename test/{util/data => functional/data/util}/tt-locktime317000-out.json (100%) rename test/{util/data => functional/data/util}/tx394b54bb.hex (100%) rename test/{util/data => functional/data/util}/txcreate1.hex (100%) rename test/{util/data => functional/data/util}/txcreate1.json (100%) rename test/{util/data => functional/data/util}/txcreate2.hex (100%) rename test/{util/data => functional/data/util}/txcreate2.json (100%) rename test/{util/data => functional/data/util}/txcreatedata1.hex (100%) rename test/{util/data => functional/data/util}/txcreatedata1.json (100%) rename test/{util/data => functional/data/util}/txcreatedata2.hex (100%) rename test/{util/data => functional/data/util}/txcreatedata2.json (100%) rename test/{util/data => functional/data/util}/txcreatedata_seq0.hex (100%) rename test/{util/data => functional/data/util}/txcreatedata_seq0.json (100%) rename test/{util/data => functional/data/util}/txcreatedata_seq1.hex (100%) rename test/{util/data => functional/data/util}/txcreatedata_seq1.json (100%) rename test/{util/data => functional/data/util}/txcreatemultisig1.hex (100%) rename test/{util/data => functional/data/util}/txcreatemultisig1.json (100%) rename test/{util/data => functional/data/util}/txcreatemultisig2.hex (100%) rename test/{util/data => functional/data/util}/txcreatemultisig2.json (100%) rename test/{util/data => functional/data/util}/txcreatemultisig3.hex (100%) rename test/{util/data => functional/data/util}/txcreatemultisig3.json (100%) rename test/{util/data => functional/data/util}/txcreatemultisig4.hex (100%) rename test/{util/data => functional/data/util}/txcreatemultisig4.json (100%) rename test/{util/data => functional/data/util}/txcreatemultisig5.json (100%) rename test/{util/data => functional/data/util}/txcreateoutpubkey1.hex (100%) rename test/{util/data => functional/data/util}/txcreateoutpubkey1.json (100%) rename test/{util/data => functional/data/util}/txcreateoutpubkey2.hex (100%) rename test/{util/data => functional/data/util}/txcreateoutpubkey2.json (100%) rename test/{util/data => functional/data/util}/txcreateoutpubkey3.hex (100%) rename test/{util/data => functional/data/util}/txcreateoutpubkey3.json (100%) rename test/{util/data => functional/data/util}/txcreatescript1.hex (100%) rename test/{util/data => functional/data/util}/txcreatescript1.json (100%) rename test/{util/data => functional/data/util}/txcreatescript2.hex (100%) rename test/{util/data => functional/data/util}/txcreatescript2.json (100%) rename test/{util/data => functional/data/util}/txcreatescript3.hex (100%) rename test/{util/data => functional/data/util}/txcreatescript3.json (100%) rename test/{util/data => functional/data/util}/txcreatescript4.hex (100%) rename test/{util/data => functional/data/util}/txcreatescript4.json (100%) rename test/{util/data => functional/data/util}/txcreatescript5.hex (100%) rename test/{util/data => functional/data/util}/txcreatescript6.hex (100%) rename test/{util/data => functional/data/util}/txcreatesignsegwit1.hex (100%) rename test/{util/data => functional/data/util}/txcreatesignv1.hex (100%) rename test/{util/data => functional/data/util}/txcreatesignv1.json (100%) rename test/{util/data => functional/data/util}/txcreatesignv2.hex (100%) create mode 100644 test/functional/data/util/txreplace1.hex create mode 100644 test/functional/data/util/txreplacenoinputs.hex create mode 100644 test/functional/data/util/txreplaceomittedn.hex create mode 100644 test/functional/data/util/txreplacesingleinput.hex create mode 100755 test/functional/feature_blocksxor.py create mode 100755 test/functional/feature_framework_miniwallet.py create mode 100755 test/functional/feature_framework_startup_failures.py create mode 100755 test/functional/feature_framework_unit_tests.py create mode 100755 test/functional/feature_port.py create mode 100755 test/functional/feature_reindex_init.py delete mode 100755 test/functional/feature_txindex_compatibility.py rename test/functional/{interface_coordinate_cli.py => interface_bitcoin_cli.py} (77%) create mode 100755 test/functional/mempool_ephemeral_dust.py create mode 100755 test/functional/mempool_package_rbf.py create mode 100755 test/functional/mempool_truc.py create mode 100755 test/functional/mining_mainnet.py create mode 100755 test/functional/mining_template_verification.py create mode 100755 test/functional/mocks/no_signer.py create mode 100755 test/functional/p2p_1p1c_network.py delete mode 100755 test/functional/p2p_dos_header_tree.py create mode 100755 test/functional/p2p_handshake.py create mode 100755 test/functional/p2p_mutated_blocks.py create mode 100755 test/functional/p2p_opportunistic_1p1c.py create mode 100755 test/functional/p2p_outbound_eviction.py create mode 100755 test/functional/p2p_seednode.py create mode 100755 test/functional/p2p_v2_encrypted.py create mode 100755 test/functional/p2p_v2_misbehaving.py create mode 100755 test/functional/rpc_getdescriptoractivity.py create mode 100755 test/functional/rpc_orphans.py create mode 100644 test/functional/rpc_p2qrh.py delete mode 100644 test/functional/test_framework/bdb.py create mode 100644 test/functional/test_framework/compressor.py create mode 100644 test/functional/test_framework/crypto/bip324_cipher.py create mode 100644 test/functional/test_framework/crypto/chacha20.py rename test/functional/test_framework/{ => crypto}/ellswift.py (99%) rename test/functional/test_framework/{ => crypto}/ellswift_decode_test_vectors.csv (100%) create mode 100644 test/functional/test_framework/crypto/hkdf.py create mode 100644 test/functional/test_framework/crypto/muhash.py create mode 100644 test/functional/test_framework/crypto/poly1305.py rename test/functional/test_framework/{ => crypto}/ripemd160.py (100%) rename test/functional/test_framework/{ => crypto}/secp256k1.py (96%) rename test/functional/test_framework/{ => crypto}/siphash.py (100%) rename test/functional/test_framework/{ => crypto}/xswiftec_inv_test_vectors.csv (100%) create mode 100644 test/functional/test_framework/mempool_util.py delete mode 100644 test/functional/test_framework/muhash.py create mode 100644 test/functional/test_framework/v2_p2p.py create mode 100755 test/functional/tool_bitcoin_chainstate.py rename test/{util/rpcauth-test.py => functional/tool_rpcauth.py} (55%) create mode 100755 test/functional/tool_utils.py create mode 100755 test/functional/tool_utxo_to_sqlite.py create mode 100755 test/functional/wallet_assumeutxo.py create mode 100755 test/functional/wallet_createwalletdescriptor.py delete mode 100755 test/functional/wallet_dump.py create mode 100755 test/functional/wallet_gethdkeys.py delete mode 100755 test/functional/wallet_implicitsegwit.py delete mode 100755 test/functional/wallet_import_rescan.py delete mode 100755 test/functional/wallet_import_with_label.py delete mode 100755 test/functional/wallet_importmulti.py delete mode 100755 test/functional/wallet_inactive_hdchains.py create mode 100755 test/functional/wallet_miniscript_decaying_multisig_descriptor_psbt.py delete mode 100755 test/functional/wallet_pruning.py create mode 100755 test/functional/wallet_reindex.py create mode 100755 test/functional/wallet_rescan_unconfirmed.py create mode 100755 test/functional/wallet_sendmany.py delete mode 100755 test/functional/wallet_upgradewallet.py delete mode 100755 test/functional/wallet_watchonly.py delete mode 100755 test/lint/all-lint.py delete mode 100755 test/lint/lint-assertions.py delete mode 100755 test/lint/lint-format-strings.py delete mode 100755 test/lint/lint-git-commit-check.py delete mode 100755 test/lint/lint-python-mutable-default-parameters.py create mode 100755 test/lint/lint-qt-translation.py delete mode 100755 test/lint/lint-whitespace.py create mode 100644 test/lint/lint_ignore_dirs.py delete mode 100755 test/lint/run-lint-format-strings.py create mode 100644 test/lint/test_runner/Cargo.lock create mode 100644 test/lint/test_runner/Cargo.toml create mode 100644 test/lint/test_runner/src/main.rs delete mode 100755 test/util/test_runner.py create mode 100644 vcpkg.json diff --git a/.cirrus.yml b/.cirrus.yml index 4e919594..0d45f8e1 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,62 +1,90 @@ env: # Global defaults - PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y" + CIRRUS_CLONE_DEPTH: 1 + CIRRUS_LOG_TIMESTAMP: true MAKEJOBS: "-j10" 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 - CI_FAILFAST_TEST_LEAVE_DANGLING: "1" # Cirrus CI does not care about dangling process and setting this variable avoids killing the CI script itself on error - CCACHE_SIZE: "200M" - CCACHE_DIR: "/tmp/ccache_dir" - CCACHE_NOHASHDIR: "1" # Debug info might contain a stale path if the build dir changes, but this is fine - -cirrus_ephemeral_worker_template_env: &CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - 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 - -persistent_worker_template_env: &PERSISTENT_WORKER_TEMPLATE_ENV - RESTART_CI_DOCKER_BEFORE_RUN: "1" - -persistent_worker_template: &PERSISTENT_WORKER_TEMPLATE - persistent_worker: {} # https://cirrus-ci.org/guide/persistent-workers/ + CI_FAILFAST_TEST_LEAVE_DANGLING: "1" # Cirrus CI does not care about dangling processes and setting this variable avoids killing the CI script itself on error + +# A self-hosted machine(s) can be used via Cirrus CI. It can be configured with +# multiple users to run tasks in parallel. No sudo permission is required. +# +# https://cirrus-ci.org/guide/persistent-workers/ +# +# Generally, a persistent worker must run Ubuntu 23.04+ or Debian 12+. +# +# The following specific types should exist, with the following requirements: +# - small: For an x86_64 machine, with at least 2 vCPUs and 8 GB of memory. +# - medium: For an x86_64 machine, with at least 4 vCPUs and 16 GB of memory. +# - arm64: For an aarch64 machine, with at least 2 vCPUs and 8 GB of memory. +# +# CI jobs for the latter configuration can be run on x86_64 hardware +# by installing qemu-user-static, which works out of the box with +# podman or docker. Background: https://stackoverflow.com/a/72890225/313633 +# +# The above machine types are matched to each task by their label. Refer to the +# Cirrus CI docs for more details. +# +# When a contributor maintains a fork of the repo, any pull request they make +# to their own fork, or to the main repository, will trigger two CI runs: +# one for the branch push and one for the pull request. +# This can be avoided by setting SKIP_BRANCH_PUSH=true as a custom env variable +# in Cirrus repository settings, accessible from +# https://cirrus-ci.com/github/my-organization/my-repository +# +# On machines that are persisted between CI jobs, RESTART_CI_DOCKER_BEFORE_RUN=1 +# ensures that previous containers and artifacts are cleared before each run. +# This requires installing Podman instead of Docker. +# +# Futhermore: +# - podman-docker-4.1+ is required due to the bugfix in 4.1 +# (https://github.com/bitcoin/bitcoin/pull/21652#issuecomment-1657098200) +# - The ./ci/ dependencies (with cirrus-cli) should be installed. One-liner example +# for a single user setup with sudo permission: +# +# ``` +# apt update && apt install git screen python3 bash podman-docker uidmap slirp4netns curl -y && curl -L -o cirrus "https://github.com/cirruslabs/cirrus-cli/releases/latest/download/cirrus-linux-$(dpkg --print-architecture)" && mv cirrus /usr/local/bin/cirrus && chmod +x /usr/local/bin/cirrus +# ``` +# +# - There are no strict requirements on the hardware. Having fewer CPU threads +# than recommended merely causes the CI script to run slower. +# To avoid rare and intermittent OOM due to short memory usage spikes, +# it is recommended to add (and persist) swap: +# +# ``` +# fallocate -l 16G /swapfile_ci && chmod 600 /swapfile_ci && mkswap /swapfile_ci && swapon /swapfile_ci && ( echo '/swapfile_ci none swap sw 0 0' | tee -a /etc/fstab ) +# ``` +# +# - To register the persistent worker, open a `screen` session and run: +# +# ``` +# RESTART_CI_DOCKER_BEFORE_RUN=1 screen cirrus worker run --labels type=todo_fill_in_type --token todo_fill_in_token +# ``` # https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks filter_template: &FILTER_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 + # Allow forks to specify SKIP_BRANCH_PUSH=true and skip CI runs when a branch is pushed, + # but still run CI when a PR is created. + # https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution + skip: $SKIP_BRANCH_PUSH == "true" && $CIRRUS_PR == "" stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks base_template: &BASE_TEMPLATE << : *FILTER_TEMPLATE merge_base_script: - # Unconditionally install git (used in fingerprint_script). - - bash -c "$PACKAGE_MANAGER_INSTALL git" + # Require git (used in fingerprint_script). + - git --version || ( apt-get update && apt-get install -y git ) - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi - - git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge" + - git fetch --depth=1 $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge" - git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts # Also, the merge commit is used to lint COMMIT_RANGE="HEAD~..HEAD" main_template: &MAIN_TEMPLATE timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out - ccache_cache: - folder: "/tmp/ccache_dir" ci_script: - ./ci/test_run_all.sh global_task_template: &GLOBAL_TASK_TEMPLATE << : *BASE_TEMPLATE - 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 - greedy: true - memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers - depends_built_cache: - folder: "depends/built" - fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-list -1 HEAD ./depends) - << : *MAIN_TEMPLATE - -macos_native_task_template: &MACOS_NATIVE_TASK_TEMPLATE - << : *BASE_TEMPLATE - check_clang_script: - - clang --version - brew_install_script: - - brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt << : *MAIN_TEMPLATE compute_credits_template: &CREDITS_TEMPLATE @@ -65,282 +93,107 @@ compute_credits_template: &CREDITS_TEMPLATE use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'bitcoin/bitcoin' && $CIRRUS_PR != "" task: - name: 'lint [jammy]' + name: 'lint' << : *BASE_TEMPLATE container: - image: ubuntu:jammy + dockerfile: ci/lint_imagefile cpu: 1 memory: 1G # For faster CI feedback, immediately schedule the linters << : *CREDITS_TEMPLATE - python_cache: - folder: "/tmp/python" - fingerprint_script: cat .python-version /etc/os-release + unshallow_script: + - git fetch --unshallow --no-tags lint_script: - - ./ci/lint_run_all.sh - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV + - ./ci/lint_run.sh task: - name: 'tidy [jammy]' + name: 'tidy' << : *GLOBAL_TASK_TEMPLATE - container: - image: ubuntu:jammy - cpu: 2 - memory: 5G - # For faster CI feedback, immediately schedule the linters - << : *CREDITS_TEMPLATE + persistent_worker: + labels: + type: medium env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV FILE_ENV: "./ci/test/00_setup_env_native_tidy.sh" task: - name: "Win64 native [vs2022]" - << : *FILTER_TEMPLATE - windows_container: - cpu: 6 - memory: 12G - image: cirrusci/windowsservercore:visualstudio2022 - timeout_in: 120m - env: - PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin;%PATH%' - PYTHONUTF8: 1 - CI_VCPKG_TAG: '2023.01.09' - VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads' - VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives' - CCACHE_DIR: 'C:\Users\ContainerAdministrator\AppData\Local\ccache' - WRAPPED_CL: 'C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\ci\test\wrapped-cl.bat' - QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.5/single/qt-everywhere-opensource-src-5.15.5.zip' - QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.5.zip' - QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.5' - QTBASEDIR: 'C:\Qt_static' - x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"' - QT_CONFIGURE_COMMAND: '..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml' - IgnoreWarnIntDirInTempDetected: 'true' - merge_script: - - PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL pull/$env:CIRRUS_PR/merge; git reset --hard FETCH_HEAD; } - msvc_qt_built_cache: - folder: "%QTBASEDIR%" - reupload_on_changes: false - fingerprint_script: - - echo %QT_DOWNLOAD_URL% %QT_CONFIGURE_COMMAND% - - msbuild -version - populate_script: - - curl -L -o C:\jom.zip http://download.qt.io/official_releases/jom/jom.zip - - mkdir C:\jom - - tar -xf C:\jom.zip -C C:\jom - - curl -L -o %QT_LOCAL_PATH% %QT_DOWNLOAD_URL% - - tar -xf %QT_LOCAL_PATH% -C C:\ - - '%x64_NATIVE_TOOLS%' - - cd %QT_SOURCE_DIR% - - mkdir build - - cd build - - '%QT_CONFIGURE_COMMAND% -prefix %QTBASEDIR%' - - jom - - jom install - vcpkg_tools_cache: - folder: '%VCPKG_DOWNLOADS%\tools' - reupload_on_changes: false - fingerprint_script: - - echo %CI_VCPKG_TAG% - - msbuild -version - vcpkg_binary_cache: - folder: '%VCPKG_DEFAULT_BINARY_CACHE%' - reupload_on_changes: true - fingerprint_script: - - echo %CI_VCPKG_TAG% - - type build_msvc\vcpkg.json - - msbuild -version - populate_script: - - mkdir %VCPKG_DEFAULT_BINARY_CACHE% - ccache_cache: - folder: '%CCACHE_DIR%' - install_tools_script: - - choco install --yes --no-progress ccache --version=4.7.4 - - choco install --yes --no-progress python3 --version=3.9.6 - - pip install zmq - - ccache --version - - python -VV - install_vcpkg_script: - - cd .. - - git clone --quiet https://github.com/microsoft/vcpkg.git - - cd vcpkg - - git -c advice.detachedHead=false checkout %CI_VCPKG_TAG% - - .\bootstrap-vcpkg -disableMetrics - - echo set(VCPKG_BUILD_TYPE release) >> triplets\x64-windows-static.cmake - - .\vcpkg integrate install - - .\vcpkg version - build_script: - - '%x64_NATIVE_TOOLS%' - - cd %CIRRUS_WORKING_DIR% - - ccache --zero-stats --max-size=%CCACHE_SIZE% - - python build_msvc\msvc-autogen.py - - msbuild build_msvc\bitcoin.sln -property:CLToolExe=%WRAPPED_CL%;UseMultiToolTask=true;Configuration=Release -maxCpuCount -verbosity:minimal -noLogo - - ccache --show-stats - check_script: - - src\test_bitcoin.exe -l test_suite - - src\bench_bitcoin.exe --sanity-check - - python test\util\test_runner.py - - python test\util\rpcauth-test.py - functional_tests_script: - # Increase the dynamic port range to the maximum allowed value to mitigate "OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted". - # See: https://learn.microsoft.com/en-us/biztalk/technical-guides/settings-that-can-be-modified-to-improve-network-performance - - netsh int ipv4 set dynamicport tcp start=1025 num=64511 - - netsh int ipv6 set dynamicport tcp start=1025 num=64511 - # Exclude feature_dbcrash for now due to timeout - - python test\functional\test_runner.py --nocleanup --ci --quiet --combinedlogslen=99999999 --jobs=6 --timeout-factor=8 --extended --exclude feature_dbcrash - -task: - name: 'ARM [unit tests, no functional tests] [bullseye]' + name: 'ARM, unit tests, no functional tests' << : *GLOBAL_TASK_TEMPLATE - arm_container: - image: debian:bullseye - cpu: 2 - memory: 8G + persistent_worker: + labels: + type: arm64 # Use arm64 worker to sidestep qemu and avoid a slow CI: https://github.com/bitcoin/bitcoin/pull/28087#issuecomment-1649399453 env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV FILE_ENV: "./ci/test/00_setup_env_arm.sh" - QEMU_USER_CMD: "" # Disable qemu and run the test natively task: - name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [jammy]' + name: 'CentOS, depends, gui' << : *GLOBAL_TASK_TEMPLATE - container: - image: ubuntu:jammy - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_win64.sh" - -task: - name: '32-bit + dash [gui] [CentOS 8]' - << : *GLOBAL_TASK_TEMPLATE - container: - image: quay.io/centos/centos:stream8 - # For faster CI feedback, immediately schedule one task that runs all tests - << : *CREDITS_TEMPLATE + persistent_worker: + labels: + type: small env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - PACKAGE_MANAGER_INSTALL: "yum install -y" - FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh" + FILE_ENV: "./ci/test/00_setup_env_native_centos.sh" task: - name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [buster]' - previous_releases_cache: - folder: "releases" + name: 'previous releases, depends DEBUG' << : *GLOBAL_TASK_TEMPLATE - << : *PERSISTENT_WORKER_TEMPLATE + persistent_worker: + labels: + type: small env: - << : *PERSISTENT_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh" + FILE_ENV: "./ci/test/00_setup_env_native_previous_releases.sh" task: - name: '[TSan, depends, gui] [jammy]' + name: 'TSan, depends, no gui' << : *GLOBAL_TASK_TEMPLATE - container: - image: ubuntu:jammy - cpu: 6 # Increase CPU and Memory to avoid timeout - memory: 24G + persistent_worker: + labels: + type: medium env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh" task: - name: '[MSan, depends] [focal]' + name: 'MSan, depends' << : *GLOBAL_TASK_TEMPLATE - container: - image: ubuntu:focal + persistent_worker: + labels: + type: small + timeout_in: 300m # Use longer timeout for the *rare* case where a full build (llvm + msan + depends + ...) needs to be done. env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV FILE_ENV: "./ci/test/00_setup_env_native_msan.sh" - MAKEJOBS: "-j4" # Avoid excessive memory use due to MSan task: - name: '[ASan + LSan + UBSan + integer, no depends, USDT] [jammy]' + name: 'fuzzer,address,undefined,integer, no depends' << : *GLOBAL_TASK_TEMPLATE - # We can't use a 'container' for the USDT interface tests as the CirrusCI - # containers don't have privileges to hook into coordinated. CirrusCI uses - # Google Compute Engine instances: https://cirrus-ci.org/guide/custom-vms/ - # Images can be found here: https://cloud.google.com/compute/docs/images/os-details - compute_engine_instance: - image_project: ubuntu-os-cloud - image: family/ubuntu-2204-lts # when upgrading, check if we can drop "ADD_UNTRUSTED_BPFCC_PPA" - cpu: 4 - memory: 12G + persistent_worker: + labels: + type: medium + timeout_in: 240m # larger timeout, due to the high CPU demand env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - HOME: /root/ # Only needed for compute_engine_instance - FILE_ENV: "./ci/test/00_setup_env_native_asan.sh" - MAKEJOBS: "-j4" # Avoid excessive memory use - -task: - name: '[fuzzer,address,undefined,integer, no depends] [jammy]' - << : *GLOBAL_TASK_TEMPLATE - container: - image: ubuntu:jammy - cpu: 4 # Increase CPU and memory to avoid timeout - memory: 16G - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh" task: - name: '[multiprocess, i686, DEBUG] [focal]' + name: 'multiprocess, i686, DEBUG' << : *GLOBAL_TASK_TEMPLATE - container: - image: ubuntu:focal - cpu: 4 - memory: 16G # The default memory is sometimes just a bit too small, so double everything + persistent_worker: + labels: + type: medium env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh" task: - name: '[no wallet, libbitcoinkernel] [buster]' + name: 'no wallet, libbitcoinkernel' << : *GLOBAL_TASK_TEMPLATE - container: - image: debian:buster + persistent_worker: + labels: + type: small env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh" task: - name: 'macOS 10.15 [gui, no tests] [focal]' - << : *BASE_TEMPLATE - macos_sdk_cache: - folder: "depends/SDKs/$MACOS_SDK" - fingerprint_key: "$MACOS_SDK" - << : *MAIN_TEMPLATE - container: - image: ubuntu:focal - env: - MACOS_SDK: "Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers" - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_mac.sh" - -task: - name: 'macOS 13 native arm64 [gui, sqlite only] [no depends]' - macos_instance: - # Use latest image, but hardcode version to avoid silent upgrades (and breaks) - image: ghcr.io/cirruslabs/macos-ventura-xcode:14.1 # https://cirrus-ci.org/guide/macOS - << : *MACOS_NATIVE_TASK_TEMPLATE - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - CI_USE_APT_INSTALL: "no" - PACKAGE_MANAGER_INSTALL: "echo" # Nothing to do - FILE_ENV: "./ci/test/00_setup_env_mac_native_arm64.sh" - -task: - name: 'ARM64 Android APK [focal]' - << : *BASE_TEMPLATE - android_sdk_cache: - folder: "depends/SDKs/android" - fingerprint_key: "ANDROID_API_LEVEL=28 ANDROID_BUILD_TOOLS_VERSION=28.0.3 ANDROID_NDK_VERSION=23.2.8568313" - depends_sources_cache: - folder: "depends/sources" - fingerprint_script: git rev-list -1 HEAD ./depends - << : *MAIN_TEMPLATE - container: - image: ubuntu:focal + name: 'macOS-cross, gui, no tests' + << : *GLOBAL_TASK_TEMPLATE + persistent_worker: + labels: + type: small env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_android.sh" + FILE_ENV: "./ci/test/00_setup_env_mac_cross.sh" diff --git a/.editorconfig b/.editorconfig index ae7e92d1..c5f3028c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,17 +10,17 @@ insert_final_newline = true trim_trailing_whitespace = true # Source code files -[*.{h,cpp,py,sh}] +[*.{h,cpp,rs,py,sh}] indent_size = 4 -# .cirrus.yml, .fuzzbuzz.yml, etc. +# .cirrus.yml, etc. [*.yml] indent_size = 2 -# Makefiles -[{*.am,Makefile.*.include}] +# Makefiles (only relevant for depends build) +[Makefile] indent_style = tab -# Autoconf scripts -[configure.ac] +# CMake files +[{CMakeLists.txt,*.cmake,*.cmake.in}] indent_size = 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..c9cf4a7d --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +src/clientversion.cpp export-subst diff --git a/.gitignore b/.gitignore index 28697f2f..0de5f9ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,159 +1,30 @@ -# Coordinate Specific -*.Po -*.Plo +# Patterns that are specific to a text editor, IDE, operating system, or user +# environment are not added here. They should be added to your local gitignore +# file instead: +# https://docs.github.com/en/get-started/git-basics/ignoring-files#configuring-ignored-files-for-all-repositories-on-your-computer -*.tar.gz +# Build subdirectories. +/*build* +!/build-aux +!/build_msvc -*.exe -*.pdb -src/bitcoin -src/coordinated -src/coordinate-cli -src/coordinate-tx -src/coordinate-util -src/coordinate-wallet -src/bitcoin-gui -src/bitcoin-node -src/bitcoin-tx -src/bitcoin-util -src/bitcoin-chainstate -src/bitcoin-wallet -src/test/fuzz/fuzz -src/test/test_bitcoin -src/qt/test/test_coordinate-qt - -# autoreconf -Makefile.in -aclocal.m4 -autom4te.cache/ -build-aux/config.guess -build-aux/config.sub -build-aux/depcomp -build-aux/install-sh -build-aux/ltmain.sh -build-aux/m4/libtool.m4 -build-aux/m4/lt~obsolete.m4 -build-aux/m4/ltoptions.m4 -build-aux/m4/ltsugar.m4 -build-aux/m4/ltversion.m4 -build-aux/missing -build-aux/compile -build-aux/test-driver -config.cache -config.log -config.status -configure -libtool -src/config/bitcoin-config.h -src/config/bitcoin-config.h.in -src/config/stamp-h1 -src/obj -share/setup.nsi -share/qt/Info.plist - -src/qt/*.moc -src/qt/moc_*.cpp -src/qt/forms/ui_*.h - -src/qt/test/moc*.cpp - -src/qt/coordinate-qt.config -src/qt/coordinate-qt.creator -src/qt/coordinate-qt.creator.user -src/qt/coordinate-qt.files -src/qt/coordinate-qt.includes - -.deps -.dirstamp -.libs -.*.swp -*~ -*.bak -*.rej -*.orig *.pyc -*.o -*.o-* -*.a -*.pb.cc -*.pb.h -*.dat - -*.log -*.trs -*.zip - -*.json.h -*.raw.h # Only ignore unexpected patches *.patch !contrib/guix/patches/*.patch !depends/patches/**/*.patch -#libtool object files -*.lo -*.la - -# Compilation and Qt preprocessor part -*.qm -Makefile -!depends/Makefile -src/qt/coordinate-qt -Bitcoin-Qt.app - -# Qt Creator -Makefile.am.user - -# Unit-tests -Makefile.test -coordinate-qt_test - -# Resources cpp -qrc_*.cpp - -# Mac specific -.DS_Store -build +/CMakeUserPresets.json # Previous releases -releases - -#lcov -*.gcno -*.gcda -/*.info -test_bitcoin.coverage/ -total.coverage/ -fuzz.coverage/ -coverage_percent.txt -/cov_tool_wrapper.sh -qa-assets/ - -#build tests -linux-coverage-build -linux-build -win32-build -test/config.ini -test/cache/* -test/.mypy_cache/ - -!src/leveldb*/Makefile +/releases -/doc/doxygen/ - -libbitcoinconsensus.pc -contrib/devtools/split-debug.sh - -# Output from running db4 installation -db4/ - -# clang-check -*.plist - -osx_volname -dist/ +# cargo default target dir +target/ /guix-build-* /ci/scratch/ + +libbitcoinpqc \ No newline at end of file diff --git a/.python-version b/.python-version index 36f601f1..1445aee8 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.7.16 +3.10.14 diff --git a/.style.yapf b/.style.yapf index 69d8c6ae..350ac638 100644 --- a/.style.yapf +++ b/.style.yapf @@ -107,7 +107,7 @@ each_dict_entry_on_separate_line=True i18n_comment= # The i18n function call names. The presence of this function stops -# reformattting on that line, because the string it has cannot be moved +# reformatting on that line, because the string it has cannot be moved # away from the i18n comment. i18n_function_call= diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json deleted file mode 100644 index 834113c8..00000000 --- a/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "configurations": [ - { - "name": "Mac", - "includePath": [ - "${workspaceFolder}/**" - ], - "defines": [], - "macFrameworkPath": [ - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks" - ], - "compilerPath": "/usr/bin/clang", - "cStandard": "c17", - "cppStandard": "c++17", - "intelliSenseMode": "macos-clang-arm64" - } - ], - "version": 4 -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 8c69eb11..878d39db 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,38 +1,24 @@ { "files.associations": { "__bit_reference": "cpp", - "__bits": "cpp", - "__config": "cpp", - "__debug": "cpp", - "__errc": "cpp", "__hash_table": "cpp", "__locale": "cpp", - "__mutex_base": "cpp", "__node_handle": "cpp", - "__nullptr": "cpp", "__split_buffer": "cpp", - "__string": "cpp", - "__threading_support": "cpp", "__tree": "cpp", - "__tuple": "cpp", + "__verbose_abort": "cpp", "any": "cpp", "array": "cpp", - "atomic": "cpp", - "bit": "cpp", "bitset": "cpp", "cctype": "cpp", "charconv": "cpp", - "chrono": "cpp", "clocale": "cpp", "cmath": "cpp", "codecvt": "cpp", - "compare": "cpp", "complex": "cpp", - "concepts": "cpp", "condition_variable": "cpp", "csignal": "cpp", "cstdarg": "cpp", - "cstddef": "cpp", "cstdint": "cpp", "cstdio": "cpp", "cstdlib": "cpp", @@ -41,7 +27,9 @@ "cwchar": "cpp", "cwctype": "cpp", "deque": "cpp", - "exception": "cpp", + "execution": "cpp", + "memory": "cpp", + "forward_list": "cpp", "fstream": "cpp", "future": "cpp", "initializer_list": "cpp", @@ -54,46 +42,32 @@ "list": "cpp", "locale": "cpp", "map": "cpp", - "memory": "cpp", "mutex": "cpp", "new": "cpp", - "numeric": "cpp", "optional": "cpp", - "ostream": "cpp", + "print": "cpp", "queue": "cpp", - "random": "cpp", "ratio": "cpp", "regex": "cpp", + "semaphore": "cpp", "set": "cpp", + "shared_mutex": "cpp", + "source_location": "cpp", + "span": "cpp", "sstream": "cpp", "stack": "cpp", "stdexcept": "cpp", "streambuf": "cpp", "string": "cpp", "string_view": "cpp", - "system_error": "cpp", - "tuple": "cpp", - "type_traits": "cpp", "typeindex": "cpp", "typeinfo": "cpp", "unordered_map": "cpp", "unordered_set": "cpp", "variant": "cpp", "vector": "cpp", - "__functional_base": "cpp", "algorithm": "cpp", - "functional": "cpp", - "iterator": "cpp", - "utility": "cpp", - "__verbose_abort": "cpp", - "shared_mutex": "cpp", - "thread": "cpp", - "filesystem": "cpp", - "examples_util.h": "c", - "execution": "cpp", - "forward_list": "cpp", - "print": "cpp" - }, - "cmake.sourceDirectory": "/Users/jk/MIKE/maranodegit/src/crc32c", - "C_Cpp.errorSquiggles": "disabled" + "__config": "cpp", + "atomic": "cpp" + } } \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..42552b96 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,714 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +# Ubuntu 22.04 LTS Jammy Jellyfish, https://wiki.ubuntu.com/Releases, EOSS in June 2027: +# - CMake 3.22.1, https://packages.ubuntu.com/jammy/cmake +# +# Centos Stream 9, https://www.centos.org/cl-vs-cs/#end-of-life, EOL in May 2027: +# - CMake 3.26.5, https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/ +cmake_minimum_required(VERSION 3.22) + +if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) + message(FATAL_ERROR "In-source builds are not allowed.") +endif() + +if(POLICY CMP0171) + # `codegen` is a reserved target name. + # See: https://cmake.org/cmake/help/latest/policy/CMP0171.html + cmake_policy(SET CMP0171 NEW) +endif() + +# When adjusting CMake flag variables, we must not override those explicitly +# set by the user. These are a subset of the CACHE_VARIABLES property. +get_directory_property(precious_variables CACHE_VARIABLES) + +#============================= +# Project / Package metadata +#============================= +set(CLIENT_NAME "Bitcoin Core") +set(CLIENT_VERSION_MAJOR 29) +set(CLIENT_VERSION_MINOR 99) +set(CLIENT_VERSION_BUILD 0) +set(CLIENT_VERSION_RC 0) +set(CLIENT_VERSION_IS_RELEASE "false") +set(COPYRIGHT_YEAR "2025") + +# During the enabling of the CXX and CXXOBJ languages, we modify +# CMake's compiler/linker invocation strings by appending the content +# of the user-defined `APPEND_*` variables, which allows overriding +# any flag. We also ensure that the APPEND_* flags are considered +# during CMake's tests, which use the `try_compile()` command. +# +# CMake's docs state that the `CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` +# variable "is meant to be set by CMake's platform information modules +# for the current toolchain, or by a toolchain file." We do our best +# to set it before the `project()` command. +set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES + CMAKE_CXX_COMPILE_OBJECT + CMAKE_OBJCXX_COMPILE_OBJECT + CMAKE_CXX_LINK_EXECUTABLE +) + +project(BitcoinCore + VERSION ${CLIENT_VERSION_MAJOR}.${CLIENT_VERSION_MINOR}.${CLIENT_VERSION_BUILD} + DESCRIPTION "Bitcoin client software" + HOMEPAGE_URL "https://bitcoincore.org/" + LANGUAGES NONE +) + +set(CLIENT_VERSION_STRING ${PROJECT_VERSION}) +if(CLIENT_VERSION_RC GREATER 0) + string(APPEND CLIENT_VERSION_STRING "rc${CLIENT_VERSION_RC}") +endif() + +set(COPYRIGHT_HOLDERS "The %s developers") +set(COPYRIGHT_HOLDERS_FINAL "The ${CLIENT_NAME} developers") +set(CLIENT_BUGREPORT "https://github.com/bitcoin/bitcoin/issues") + +#============================= +# Language setup +#============================= +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_HOST_APPLE) + # We do not use the install_name_tool when cross-compiling for macOS. + # So disable this tool check in further enable_language() commands. + set(CMAKE_PLATFORM_HAS_INSTALLNAME FALSE) +endif() +enable_language(CXX) +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/module) +include(ProcessConfigurations) + +# Flatten static lib dependencies. +# Without this, if libfoo.a depends on libbar.a, libfoo's objects can't begin +# to be compiled until libbar.a has been created. +if (NOT DEFINED CMAKE_OPTIMIZE_DEPENDENCIES) + set(CMAKE_OPTIMIZE_DEPENDENCIES TRUE) +endif() + +#============================= +# Configurable options +#============================= +include(CMakeDependentOption) +# When adding a new option, end the with a full stop for consistency. +option(BUILD_BITCOIN_BIN "Build bitcoin executable." ON) +option(BUILD_DAEMON "Build bitcoind executable." ON) +option(BUILD_GUI "Build bitcoin-qt executable." OFF) +option(BUILD_CLI "Build bitcoin-cli executable." ON) + +option(BUILD_TESTS "Build test_bitcoin and other unit test executables." ON) +option(BUILD_TX "Build bitcoin-tx executable." ${BUILD_TESTS}) +option(BUILD_UTIL "Build bitcoin-util executable." ${BUILD_TESTS}) + +option(BUILD_UTIL_CHAINSTATE "Build experimental bitcoin-chainstate executable." OFF) +option(BUILD_KERNEL_LIB "Build experimental bitcoinkernel library." ${BUILD_UTIL_CHAINSTATE}) + +option(ENABLE_WALLET "Enable wallet." ON) +if(ENABLE_WALLET) + if(VCPKG_TARGET_TRIPLET) + # Use of the `unofficial::` namespace is a vcpkg package manager convention. + find_package(unofficial-sqlite3 CONFIG REQUIRED) + else() + find_package(SQLite3 3.7.17 REQUIRED) + endif() +endif() +cmake_dependent_option(BUILD_WALLET_TOOL "Build bitcoin-wallet tool." ${BUILD_TESTS} "ENABLE_WALLET" OFF) + +option(REDUCE_EXPORTS "Attempt to reduce exported symbols in the resulting executables." OFF) +option(WERROR "Treat compiler warnings as errors." OFF) +option(WITH_CCACHE "Attempt to use ccache for compiling." ON) + +option(WITH_ZMQ "Enable ZMQ notifications." OFF) +if(WITH_ZMQ) + find_package(ZeroMQ 4.0.0 MODULE REQUIRED) +endif() + +option(WITH_USDT "Enable tracepoints for Userspace, Statically Defined Tracing." OFF) +if(WITH_USDT) + find_package(USDT MODULE REQUIRED) +endif() + +option(ENABLE_EXTERNAL_SIGNER "Enable external signer support." ON) + +cmake_dependent_option(WITH_QRENCODE "Enable QR code support." ON "BUILD_GUI" OFF) +if(WITH_QRENCODE) + find_package(QRencode MODULE REQUIRED) + set(USE_QRCODE TRUE) +endif() + +cmake_dependent_option(WITH_DBUS "Enable DBus support." ON "NOT CMAKE_SYSTEM_NAME MATCHES \"(Windows|Darwin)\" AND BUILD_GUI" OFF) + +option(ENABLE_IPC "Build multiprocess bitcoin-node and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables. Requires libmultiprocess library. Experimental." OFF) +cmake_dependent_option(WITH_EXTERNAL_LIBMULTIPROCESS "Build with external libmultiprocess library instead of with local git subtree when ENABLE_IPC is enabled. This is not normally recommended, but can be useful for developing libmultiprocess itself." OFF "ENABLE_IPC" OFF) +if(ENABLE_IPC AND WITH_EXTERNAL_LIBMULTIPROCESS) + find_package(Libmultiprocess REQUIRED COMPONENTS Lib) + find_package(LibmultiprocessNative REQUIRED COMPONENTS Bin + NAMES Libmultiprocess + ) +endif() + +cmake_dependent_option(BUILD_GUI_TESTS "Build test_bitcoin-qt executable." ON "BUILD_GUI;BUILD_TESTS" OFF) +if(BUILD_GUI) + set(qt_components Core Gui Widgets LinguistTools) + if(ENABLE_WALLET) + list(APPEND qt_components Network) + endif() + if(WITH_DBUS) + list(APPEND qt_components DBus) + set(USE_DBUS TRUE) + endif() + if(BUILD_GUI_TESTS) + list(APPEND qt_components Test) + endif() + find_package(Qt 6.2 MODULE REQUIRED + COMPONENTS ${qt_components} + ) + unset(qt_components) +endif() + +option(BUILD_BENCH "Build bench_bitcoin executable." OFF) +option(BUILD_FUZZ_BINARY "Build fuzz binary." OFF) +option(BUILD_FOR_FUZZING "Build for fuzzing. Enabling this will disable all other targets and override BUILD_FUZZ_BINARY." OFF) + +option(INSTALL_MAN "Install man pages." ON) + +set(APPEND_CPPFLAGS "" CACHE STRING "Preprocessor flags that are appended to the command line after all other flags added by the build system. This variable is intended for debugging and special builds.") +set(APPEND_CFLAGS "" CACHE STRING "C compiler flags that are appended to the command line after all other flags added by the build system. This variable is intended for debugging and special builds.") +set(APPEND_CXXFLAGS "" CACHE STRING "(Objective) C++ compiler flags that are appended to the command line after all other flags added by the build system. This variable is intended for debugging and special builds.") +set(APPEND_LDFLAGS "" CACHE STRING "Linker flags that are appended to the command line after all other flags added by the build system. This variable is intended for debugging and special builds.") +# Appending to this low-level rule variables is the only way to +# guarantee that the flags appear at the end of the command line. +string(APPEND CMAKE_CXX_COMPILE_OBJECT " ${APPEND_CPPFLAGS} ${APPEND_CXXFLAGS}") +string(APPEND CMAKE_CXX_CREATE_SHARED_LIBRARY " ${APPEND_LDFLAGS}") +string(APPEND CMAKE_CXX_LINK_EXECUTABLE " ${APPEND_LDFLAGS}") + +set(configure_warnings) + +include(CheckLinkerSupportsPIE) +check_linker_supports_pie(configure_warnings) + +# The core_interface library aims to encapsulate common build flags. +# It is a usage requirement for all targets except for secp256k1, which +# gets its flags by other means. +add_library(core_interface INTERFACE) +add_library(core_interface_relwithdebinfo INTERFACE) +add_library(core_interface_debug INTERFACE) +target_link_libraries(core_interface INTERFACE + $<$:core_interface_relwithdebinfo> + $<$:core_interface_debug> +) + +if(BUILD_FOR_FUZZING) + message(WARNING "BUILD_FOR_FUZZING=ON will disable all other targets and force BUILD_FUZZ_BINARY=ON.") + set(BUILD_BITCOIN_BIN OFF) + set(BUILD_DAEMON OFF) + set(BUILD_CLI OFF) + set(BUILD_TX OFF) + set(BUILD_UTIL OFF) + set(BUILD_UTIL_CHAINSTATE OFF) + set(BUILD_KERNEL_LIB OFF) + set(BUILD_WALLET_TOOL OFF) + set(BUILD_GUI OFF) + set(ENABLE_EXTERNAL_SIGNER OFF) + set(WITH_ZMQ OFF) + set(BUILD_TESTS OFF) + set(BUILD_GUI_TESTS OFF) + set(BUILD_BENCH OFF) + set(BUILD_FUZZ_BINARY ON) + + target_compile_definitions(core_interface INTERFACE + FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + ) +endif() + +include(TryAppendCXXFlags) +include(TryAppendLinkerFlag) + +# Redefine/adjust per-configuration flags. +target_compile_definitions(core_interface_debug INTERFACE + DEBUG + DEBUG_LOCKORDER + DEBUG_LOCKCONTENTION + RPC_DOC_CHECK + ABORT_ON_FAILED_ASSUME +) + +if(WIN32) + #[=[ + This build system supports two ways to build binaries for Windows. + + 1. Building on Windows using MSVC. + Implementation notes: + - /DWIN32 and /D_WINDOWS definitions are included into the CMAKE_CXX_FLAGS_INIT + and CMAKE_CXX_FLAGS_INIT variables by default. + - A run-time library is selected using the CMAKE_MSVC_RUNTIME_LIBRARY variable. + - MSVC-specific options, for example, /Zc:__cplusplus, are additionally required. + + 2. Cross-compiling using MinGW. + Implementation notes: + - WIN32 and _WINDOWS definitions must be provided explicitly. + - A run-time library must be specified explicitly using _MT definition. + ]=] + + target_compile_definitions(core_interface INTERFACE + _WIN32_WINNT=0x0A00 + _WIN32_IE=0x0A00 + WIN32_LEAN_AND_MEAN + NOMINMAX + ) + + if(MSVC) + if(VCPKG_TARGET_TRIPLET MATCHES "-static") + set(msvc_library_linkage "") + else() + set(msvc_library_linkage "DLL") + endif() + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>${msvc_library_linkage}") + unset(msvc_library_linkage) + + target_compile_definitions(core_interface INTERFACE + _UNICODE;UNICODE + ) + target_compile_options(core_interface INTERFACE + /utf-8 + /Zc:preprocessor + /Zc:__cplusplus + /sdl + ) + target_link_options(core_interface INTERFACE + # We embed our own manifests. + /MANIFEST:NO + ) + # Improve parallelism in MSBuild. + # See: https://devblogs.microsoft.com/cppblog/improved-parallelism-in-msbuild/. + list(APPEND CMAKE_VS_GLOBALS "UseMultiToolTask=true") + endif() + + if(MINGW) + target_compile_definitions(core_interface INTERFACE + WIN32 + _WINDOWS + _MT + ) + # Avoid the use of aligned vector instructions when building for Windows. + # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412. + try_append_cxx_flags("-Wa,-muse-unaligned-vector-move" TARGET core_interface SKIP_LINK) + try_append_linker_flag("-static" TARGET core_interface) + # We support Windows 10+, however it's not possible to set these values accordingly, + # due to a bug in mingw-w64. See https://sourceforge.net/p/mingw-w64/bugs/968/. + # As a best effort, target Windows 8. + try_append_linker_flag("-Wl,--major-subsystem-version,6" TARGET core_interface) + try_append_linker_flag("-Wl,--minor-subsystem-version,2" TARGET core_interface) + endif() + + # Workaround producing large object files, which cannot be handled by the assembler. + # More likely to happen with no, or lower levels of optimisation. + # See discussion in https://github.com/bitcoin/bitcoin/issues/28109. + if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + try_append_cxx_flags("/bigobj" TARGET core_interface_debug SKIP_LINK) + else() + try_append_cxx_flags("-Wa,-mbig-obj" TARGET core_interface_debug SKIP_LINK) + endif() +endif() + +# Use 64-bit off_t on 32-bit Linux. +if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SIZEOF_VOID_P EQUAL 4) + # Ensure 64-bit offsets are used for filesystem accesses for 32-bit compilation. + target_compile_definitions(core_interface INTERFACE + _FILE_OFFSET_BITS=64 + ) +endif() + +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + target_compile_definitions(core_interface INTERFACE OBJC_OLD_DISPATCH_PROTOTYPES=0) + # These flags are specific to ld64, and may cause issues with other linkers. + # For example: GNU ld will interpret -dead_strip as -de and then try and use + # "ad_strip" as the symbol for the entry point. + try_append_linker_flag("-Wl,-dead_strip" TARGET core_interface) + try_append_linker_flag("-Wl,-dead_strip_dylibs" TARGET core_interface) + if(CMAKE_HOST_APPLE) + try_append_linker_flag("-Wl,-headerpad_max_install_names" TARGET core_interface) + endif() +endif() + +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_package(Threads REQUIRED) +target_link_libraries(core_interface INTERFACE + Threads::Threads +) + +# Define sanitize_interface with -fsanitize flags intended to apply to all +# libraries and executables. +add_library(sanitize_interface INTERFACE) +target_link_libraries(core_interface INTERFACE sanitize_interface) +if(SANITIZERS) + # Transform list of sanitizers into -fsanitize flags, replacing "fuzzer" with + # "fuzzer-no-link" in sanitize_interface flags, and moving "fuzzer" to + # fuzzer_interface flags. If -DSANITIZERS=fuzzer is specified, the fuzz test + # binary should be built with -fsanitize=fuzzer (so it can use libFuzzer's + # main function), but libraries should be built with -fsanitize=fuzzer-no-link + # (so they can be linked into other executables that have their own main + # functions). + string(REGEX REPLACE "(^|,)fuzzer($|,)" "\\1fuzzer-no-link\\2" sanitize_opts "${SANITIZERS}") + set(fuzz_flag "") + if(NOT sanitize_opts STREQUAL SANITIZERS) + set(fuzz_flag "-fsanitize=fuzzer") + endif() + + # First check if the compiler accepts flags. If an incompatible pair like + # -fsanitize=address,thread is used here, this check will fail. This will also + # fail if a bad argument is passed, e.g. -fsanitize=undfeined + try_append_cxx_flags("-fsanitize=${sanitize_opts}" TARGET sanitize_interface + RESULT_VAR cxx_supports_sanitizers + SKIP_LINK + ) + if(NOT cxx_supports_sanitizers) + message(FATAL_ERROR "Compiler did not accept requested flags.") + endif() + + # Some compilers (e.g. GCC) require additional libraries like libasan, + # libtsan, libubsan, etc. Make sure linking still works with the sanitize + # flag. This is a separate check so we can give a better error message when + # the sanitize flags are supported by the compiler but the actual sanitizer + # libs are missing. + try_append_linker_flag("-fsanitize=${sanitize_opts}" VAR SANITIZER_LDFLAGS + SOURCE " + #include + #include + extern \"C\" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; } + int main() { return 0; } + " + RESULT_VAR linker_supports_sanitizers + NO_CACHE_IF_FAILED + ) + if(NOT linker_supports_sanitizers) + message(FATAL_ERROR "Linker did not accept requested flags, you are missing required libraries.") + endif() +endif() +target_link_options(sanitize_interface INTERFACE ${SANITIZER_LDFLAGS}) + +# Define fuzzer_interface with flags intended to apply to the fuzz test binary, +# and perform a test compilation to determine correct value of +# FUZZ_BINARY_LINKS_WITHOUT_MAIN_FUNCTION. +if(BUILD_FUZZ_BINARY) + include(CheckSourceCompilesWithFlags) + check_cxx_source_compiles_with_flags(" + #include + #include + extern \"C\" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; } + // No main() function. + " FUZZ_BINARY_LINKS_WITHOUT_MAIN_FUNCTION + LDFLAGS ${SANITIZER_LDFLAGS} ${fuzz_flag} + LINK_LIBRARIES ${FUZZ_LIBS} + ) + add_library(fuzzer_interface INTERFACE) + target_link_options(fuzzer_interface INTERFACE ${fuzz_flag}) + target_link_libraries(fuzzer_interface INTERFACE ${FUZZ_LIBS}) +endif() + +include(AddBoostIfNeeded) +add_boost_if_needed() + +if(BUILD_DAEMON OR BUILD_GUI OR BUILD_CLI OR BUILD_TESTS OR BUILD_BENCH OR BUILD_FUZZ_BINARY) + find_package(Libevent 2.1.8 MODULE REQUIRED) +endif() + +include(cmake/introspection.cmake) + +include(cmake/ccache.cmake) + +add_library(warn_interface INTERFACE) +target_link_libraries(core_interface INTERFACE warn_interface) +if(MSVC) + try_append_cxx_flags("/W3" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("/wd4018" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("/wd4146" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("/wd4244" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("/wd4267" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("/wd4715" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("/wd4805" TARGET warn_interface SKIP_LINK) + target_compile_definitions(warn_interface INTERFACE + _CRT_SECURE_NO_WARNINGS + _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING + ) +else() + try_append_cxx_flags("-Wall" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wextra" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wgnu" TARGET warn_interface SKIP_LINK) + # Some compilers will ignore -Wformat-security without -Wformat, so just combine the two here. + try_append_cxx_flags("-Wformat -Wformat-security" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wvla" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wshadow-field" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wthread-safety" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wthread-safety-pointer" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wloop-analysis" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wredundant-decls" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wunused-member-function" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wdate-time" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wconditional-uninitialized" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wduplicated-branches" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wduplicated-cond" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wlogical-op" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Woverloaded-virtual" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wsuggest-override" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wimplicit-fallthrough" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wunreachable-code" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wdocumentation" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wself-assign" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wbidi-chars=any" TARGET warn_interface SKIP_LINK) + try_append_cxx_flags("-Wundef" TARGET warn_interface SKIP_LINK) + + # Some compilers (gcc) ignore unknown -Wno-* options, but warn about all + # unknown options if any other warning is produced. Test the -Wfoo case, and + # set the -Wno-foo case if it works. + try_append_cxx_flags("-Wunused-parameter" TARGET warn_interface SKIP_LINK + IF_CHECK_PASSED "-Wno-unused-parameter" + ) +endif() + +configure_file(cmake/script/Coverage.cmake Coverage.cmake USE_SOURCE_PERMISSIONS COPYONLY) +configure_file(cmake/script/CoverageFuzz.cmake CoverageFuzz.cmake USE_SOURCE_PERMISSIONS COPYONLY) +configure_file(cmake/script/CoverageInclude.cmake.in CoverageInclude.cmake USE_SOURCE_PERMISSIONS @ONLY) +configure_file(cmake/script/cov_tool_wrapper.sh.in cov_tool_wrapper.sh.in USE_SOURCE_PERMISSIONS COPYONLY) +configure_file(contrib/filter-lcov.py filter-lcov.py USE_SOURCE_PERMISSIONS COPYONLY) + +# Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review. +try_append_cxx_flags("-fno-extended-identifiers" TARGET core_interface SKIP_LINK) + +# Avoiding the `-ffile-prefix-map` compiler option because it implies +# `-fcoverage-prefix-map` on Clang or `-fprofile-prefix-map` on GCC, +# which can cause issues with coverage builds, particularly when using +# Clang in the OSS-Fuzz environment due to its use of other options +# and a third party script, or with GCC. +try_append_cxx_flags("-fdebug-prefix-map=A=B" TARGET core_interface SKIP_LINK + IF_CHECK_PASSED "-fdebug-prefix-map=${PROJECT_SOURCE_DIR}/src=." +) +try_append_cxx_flags("-fmacro-prefix-map=A=B" TARGET core_interface SKIP_LINK + IF_CHECK_PASSED "-fmacro-prefix-map=${PROJECT_SOURCE_DIR}/src=." +) + +# Currently all versions of gcc are subject to a class of bugs, see the +# gccbug_90348 test case (only reproduces on GCC 11 and earlier) and +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111843. To work around that, set +# -fstack-reuse=none for all gcc builds. (Only gcc understands this flag). +try_append_cxx_flags("-fstack-reuse=none" TARGET core_interface) + +if(MSVC) + try_append_linker_flag("/DYNAMICBASE" TARGET core_interface) + try_append_linker_flag("/HIGHENTROPYVA" TARGET core_interface) + try_append_linker_flag("/NXCOMPAT" TARGET core_interface) +else() + + # _FORTIFY_SOURCE requires that there is some level of optimization, + # otherwise it does nothing and just creates a compiler warning. + try_append_cxx_flags("-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3" + RESULT_VAR cxx_supports_fortify_source + SOURCE "int main() { + # if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0 + #error + #endif + }" + ) + if(cxx_supports_fortify_source) + target_compile_options(core_interface INTERFACE + -U_FORTIFY_SOURCE + -D_FORTIFY_SOURCE=3 + ) + endif() + unset(cxx_supports_fortify_source) + + try_append_cxx_flags("-Wstack-protector" TARGET core_interface SKIP_LINK) + try_append_cxx_flags("-fstack-protector-all" TARGET core_interface) + try_append_cxx_flags("-fcf-protection=full" TARGET core_interface) + + if(MINGW) + # stack-clash-protection is a no-op for Windows. + # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 for more details. + else() + try_append_cxx_flags("-fstack-clash-protection" TARGET core_interface) + endif() + + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + try_append_cxx_flags("-mbranch-protection=bti" TARGET core_interface SKIP_LINK) + else() + try_append_cxx_flags("-mbranch-protection=standard" TARGET core_interface SKIP_LINK) + endif() + endif() + + try_append_linker_flag("-Wl,--enable-reloc-section" TARGET core_interface) + try_append_linker_flag("-Wl,--dynamicbase" TARGET core_interface) + try_append_linker_flag("-Wl,--nxcompat" TARGET core_interface) + try_append_linker_flag("-Wl,--high-entropy-va" TARGET core_interface) + try_append_linker_flag("-Wl,-z,relro" TARGET core_interface) + try_append_linker_flag("-Wl,-z,now" TARGET core_interface) + # TODO: This can be dropped once Bitcoin Core no longer supports + # NetBSD 10.0 or if upstream fix is backported. + # NetBSD's dynamic linker ld.elf_so < 11.0 supports exactly 2 + # `PT_LOAD` segments and binaries linked with `-z separate-code` + # have 4 `PT_LOAD` segments. + # Relevant discussions: + # - https://github.com/bitcoin/bitcoin/pull/28724#issuecomment-2589347934 + # - https://mail-index.netbsd.org/tech-userlevel/2023/01/05/msg013666.html + if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD" AND CMAKE_SYSTEM_VERSION VERSION_LESS 11.0) + try_append_linker_flag("-Wl,-z,noseparate-code" TARGET core_interface) + else() + try_append_linker_flag("-Wl,-z,separate-code" TARGET core_interface) + endif() + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + try_append_linker_flag("-Wl,-fixup_chains" TARGET core_interface) + endif() +endif() + +if(REDUCE_EXPORTS) + set(CMAKE_CXX_VISIBILITY_PRESET hidden) + try_append_linker_flag("-Wl,--exclude-libs,ALL" TARGET core_interface) + try_append_linker_flag("-Wl,-no_exported_symbols" VAR CMAKE_EXE_LINKER_FLAGS) +endif() + +if(WERROR) + if(MSVC) + set(werror_flag "/WX") + else() + set(werror_flag "-Werror") + endif() + try_append_cxx_flags(${werror_flag} TARGET core_interface SKIP_LINK RESULT_VAR compiler_supports_werror) + if(NOT compiler_supports_werror) + message(FATAL_ERROR "WERROR set but ${werror_flag} is not usable.") + endif() + unset(werror_flag) +endif() + +# Prefer Unix-style package components over frameworks on macOS. +# This improves compatibility with Python version managers. +set(Python3_FIND_FRAMEWORK LAST CACHE STRING "") +# Search for generic names before more specialized ones. This +# improves compatibility with Python version managers that use shims. +set(Python3_FIND_UNVERSIONED_NAMES FIRST CACHE STRING "") +mark_as_advanced(Python3_FIND_FRAMEWORK Python3_FIND_UNVERSIONED_NAMES) +find_package(Python3 3.10 COMPONENTS Interpreter) +if(NOT TARGET Python3::Interpreter) + list(APPEND configure_warnings + "Minimum required Python not found." + ) +endif() + +target_compile_definitions(core_interface INTERFACE ${DEPENDS_COMPILE_DEFINITIONS}) +target_compile_definitions(core_interface_relwithdebinfo INTERFACE ${DEPENDS_COMPILE_DEFINITIONS_RELWITHDEBINFO}) +target_compile_definitions(core_interface_debug INTERFACE ${DEPENDS_COMPILE_DEFINITIONS_DEBUG}) + +# If the {CXX,LD}FLAGS environment variables are defined during building depends +# and configuring this build system, their content might be duplicated. +if(DEFINED ENV{CXXFLAGS}) + deduplicate_flags(CMAKE_CXX_FLAGS) +endif() +if(DEFINED ENV{LDFLAGS}) + deduplicate_flags(CMAKE_EXE_LINKER_FLAGS) +endif() + +if(BUILD_TESTS) + enable_testing() +endif() + +if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.29) + # have "make test" depend on "make all" + set(CMAKE_SKIP_TEST_ALL_DEPENDENCY FALSE) +endif() + +# TODO: The `CMAKE_SKIP_BUILD_RPATH` variable setting can be deleted +# in the future after reordering Guix script commands to +# perform binary checks after the installation step. +# Relevant discussions: +# - https://github.com/hebasto/bitcoin/pull/236#issuecomment-2183120953 +# - https://github.com/bitcoin/bitcoin/pull/30312#issuecomment-2191235833 +# NetBSD always requires runtime paths to be set for executables. +if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD") + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +else() + set(CMAKE_SKIP_BUILD_RPATH TRUE) + set(CMAKE_SKIP_INSTALL_RPATH TRUE) +endif() +add_subdirectory(test) +add_subdirectory(doc) + +add_subdirectory(src) + +include(Maintenance) +setup_split_debug_script() +add_maintenance_targets() +add_windows_deploy_target() +add_macos_deploy_target() + +message("\n") +message("Configure summary") +message("=================") +message("Executables:") +message(" bitcoin ............................. ${BUILD_BITCOIN_BIN}") +message(" bitcoind ............................ ${BUILD_DAEMON}") +if(BUILD_DAEMON AND ENABLE_IPC) + set(bitcoin_daemon_status ON) +else() + set(bitcoin_daemon_status OFF) +endif() +message(" bitcoin-node (multiprocess) ......... ${bitcoin_daemon_status}") +message(" bitcoin-qt (GUI) .................... ${BUILD_GUI}") +if(BUILD_GUI AND ENABLE_IPC) + set(bitcoin_gui_status ON) +else() + set(bitcoin_gui_status OFF) +endif() +message(" bitcoin-gui (GUI, multiprocess) ..... ${bitcoin_gui_status}") +message(" bitcoin-cli ......................... ${BUILD_CLI}") +message(" bitcoin-tx .......................... ${BUILD_TX}") +message(" bitcoin-util ........................ ${BUILD_UTIL}") +message(" bitcoin-wallet ...................... ${BUILD_WALLET_TOOL}") +message(" bitcoin-chainstate (experimental) ... ${BUILD_UTIL_CHAINSTATE}") +message(" libbitcoinkernel (experimental) ..... ${BUILD_KERNEL_LIB}") +message("Optional features:") +message(" wallet support ...................... ${ENABLE_WALLET}") +message(" external signer ..................... ${ENABLE_EXTERNAL_SIGNER}") +message(" ZeroMQ .............................. ${WITH_ZMQ}") +if(ENABLE_IPC) + if (WITH_EXTERNAL_LIBMULTIPROCESS) + set(ipc_status "ON (with external libmultiprocess)") + else() + set(ipc_status ON) + endif() +else() + set(ipc_status OFF) +endif() +message(" IPC ................................. ${ipc_status}") +message(" USDT tracing ........................ ${WITH_USDT}") +message(" QR code (GUI) ....................... ${WITH_QRENCODE}") +message(" DBus (GUI) .......................... ${WITH_DBUS}") +message("Tests:") +message(" test_bitcoin ........................ ${BUILD_TESTS}") +message(" test_bitcoin-qt ..................... ${BUILD_GUI_TESTS}") +message(" bench_bitcoin ....................... ${BUILD_BENCH}") +message(" fuzz binary ......................... ${BUILD_FUZZ_BINARY}") +message("") +if(CMAKE_CROSSCOMPILING) + set(cross_status "TRUE, for ${CMAKE_SYSTEM_NAME}, ${CMAKE_SYSTEM_PROCESSOR}") +else() + set(cross_status "FALSE") +endif() +message("Cross compiling ....................... ${cross_status}") +message("C++ compiler .......................... ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}, ${CMAKE_CXX_COMPILER}") +include(FlagsSummary) +flags_summary() +message("Treat compiler warnings as errors ..... ${WERROR}") +message("Use ccache for compiling .............. ${WITH_CCACHE}") +message("\n") +if(configure_warnings) + message(" ******\n") + foreach(warning IN LISTS configure_warnings) + message(WARNING "${warning}") + endforeach() + message(" ******\n") +endif() + +# We want all build properties to be encapsulated properly. +include(WarnAboutGlobalProperties) diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 00000000..d478af3e --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,88 @@ +{ + "version": 3, + "configurePresets": [ + { + "name": "vs2022", + "displayName": "Build using 'Visual Studio 17 2022' generator and 'x64-windows' triplet", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + }, + "generator": "Visual Studio 17 2022", + "architecture": "x64", + "toolchainFile": "$env{VCPKG_ROOT}\\scripts\\buildsystems\\vcpkg.cmake", + "cacheVariables": { + "VCPKG_TARGET_TRIPLET": "x64-windows", + "BUILD_GUI": "ON" + } + }, + { + "name": "vs2022-static", + "displayName": "Build using 'Visual Studio 17 2022' generator and 'x64-windows-static' triplet", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + }, + "generator": "Visual Studio 17 2022", + "architecture": "x64", + "toolchainFile": "$env{VCPKG_ROOT}\\scripts\\buildsystems\\vcpkg.cmake", + "cacheVariables": { + "VCPKG_TARGET_TRIPLET": "x64-windows-static", + "BUILD_GUI": "ON" + } + }, + { + "name": "libfuzzer", + "displayName": "Build for fuzzing with libfuzzer, and sanitizers enabled", + "binaryDir": "${sourceDir}/build_fuzz", + "cacheVariables": { + "BUILD_FOR_FUZZING": "ON", + "CMAKE_C_COMPILER": "clang", + "CMAKE_C_FLAGS": "-ftrivial-auto-var-init=pattern", + "CMAKE_CXX_COMPILER": "clang++", + "CMAKE_CXX_FLAGS": "-ftrivial-auto-var-init=pattern", + "SANITIZERS": "undefined,address,fuzzer" + } + }, + { + "name": "libfuzzer-nosan", + "displayName": "Build for fuzzing with libfuzzer, and sanitizers disabled", + "binaryDir": "${sourceDir}/build_fuzz_nosan", + "cacheVariables": { + "BUILD_FOR_FUZZING": "ON", + "CMAKE_C_COMPILER": "clang", + "CMAKE_CXX_COMPILER": "clang++", + "SANITIZERS": "fuzzer" + } + }, + { + "name": "dev-mode", + "displayName": "Developer mode, with all features/dependencies enabled", + "binaryDir": "${sourceDir}/build_dev_mode", + "errors": {"dev": true}, + "cacheVariables": { + "BUILD_BENCH": "ON", + "BUILD_CLI": "ON", + "BUILD_DAEMON": "ON", + "BUILD_FUZZ_BINARY": "ON", + "BUILD_GUI": "ON", + "BUILD_GUI_TESTS": "ON", + "BUILD_KERNEL_LIB": "ON", + "BUILD_SHARED_LIBS": "ON", + "BUILD_TESTS": "ON", + "BUILD_TX": "ON", + "BUILD_UTIL": "ON", + "BUILD_UTIL_CHAINSTATE": "ON", + "BUILD_WALLET_TOOL": "ON", + "ENABLE_EXTERNAL_SIGNER": "ON", + "ENABLE_WALLET": "ON", + "ENABLE_IPC": "ON", + "WITH_QRENCODE": "ON", + "WITH_USDT": "ON", + "WITH_ZMQ": "ON" + } + } + ] +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 409503eb..7f42f0be 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,8 +36,7 @@ list or changes that are Some of them might no longer be applicable. So if you are interested, but unsure, you might want to leave a comment on the issue first. -You may also participate in the weekly -[Bitcoin Core PR Review Club](https://bitcoincore.reviews/) meeting. +You may also participate in the [Bitcoin Core PR Review Club](https://bitcoincore.reviews/). ### Good First Issue Label @@ -66,9 +65,10 @@ Discussion about codebase improvements happens in GitHub issues and pull requests. The developer -[mailing list](https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev) +[mailing list](https://groups.google.com/g/bitcoindev) should be used to discuss complicated or controversial consensus or P2P protocol changes before working on a patch set. +Archives can be found on [https://gnusha.org/pi/bitcoindev/](https://gnusha.org/pi/bitcoindev/). Contributor Workflow @@ -80,7 +80,7 @@ facilitates social contribution, easy testing and peer review. To contribute a patch, the workflow is as follows: - 1. Fork repository ([only for the first time](https://docs.github.com/en/get-started/quickstart/fork-a-repo)) + 1. Fork repository ([only for the first time](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)) 1. Create topic branch 1. Commit patches @@ -115,13 +115,14 @@ fixes or code moves with actual code changes. Make sure each individual commit is hygienic: that it builds successfully on its own without warnings, errors, regressions, or test failures. +This means tests must be updated in the same commit that changes the behavior. Commit messages should be verbose by default consisting of a short subject line (50 chars max), a blank line and detailed explanatory text as separate paragraph(s), unless the title alone is self-explanatory (like "Correct typo in init.cpp") in which case a single title line is sufficient. Commit messages should be helpful to people reading your code in the future, so explain the reasoning for -your decisions. Further explanation [here](https://chris.beams.io/posts/git-commit/). +your decisions. Further explanation [here](https://cbea.ms/git-commit/). If a particular commit references another issue, please add the reference. For example: `refs #1234` or `fixes #4321`. Using the `fixes` or `closes` keywords @@ -142,17 +143,17 @@ the pull request affects. Valid areas as: - `consensus` for changes to consensus critical code - `doc` for changes to the documentation - - `qt` or `gui` for changes to coordinate-qt + - `qt` or `gui` for changes to bitcoin-qt - `log` for changes to log messages - `mining` for changes to the mining code - `net` or `p2p` for changes to the peer-to-peer network code - `refactor` for structural changes that do not change behavior - `rpc`, `rest` or `zmq` for changes to the RPC, REST or ZMQ APIs - - `script` for changes to the scripts and tools + - `contrib` or `cli` for changes to the scripts and tools - `test`, `qa` or `ci` for changes to the unit tests, QA tests or CI code - `util` or `lib` for changes to the utils or libraries - `wallet` for changes to the wallet code - - `build` for changes to the GNU Autotools or MSVC builds + - `build` for changes to CMake - `guix` for changes to the GUIX reproducible builds Examples: @@ -182,7 +183,7 @@ for more information on helping with translations. ### Work in Progress Changes and Requests for Comments If a pull request is not to be considered for merging (yet), please -prefix the title with [WIP] or use [Tasks Lists](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#task-lists) +prefix the title with [WIP] or use [Tasks Lists](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#task-lists) in the body of the pull request to indicate tasks are pending. ### Address Feedback @@ -401,7 +402,7 @@ about: - It may be because your code is too complex for all but a few people, and those people may not have realized your pull request even exists. A great way to find people who are qualified and care about the code you are touching is the - [Git Blame feature](https://docs.github.com/en/github/managing-files-in-a-repository/managing-files-on-github/tracking-changes-in-a-file). Simply + [Git Blame feature](https://docs.github.com/en/repositories/working-with-files/using-files/viewing-and-understanding-files). Simply look up who last modified the code you are changing and see if you can find them and give them a nudge. Don't be incessant about the nudging, though. - Finally, if all else fails, ask on IRC or elsewhere for someone to give your pull request @@ -417,11 +418,8 @@ Backporting Security and bug fixes can be backported from `master` to release branches. -If the backport is non-trivial, it may be appropriate to open an -additional PR to backport the change, but only after the original PR -has been merged. -Otherwise, backports will be done in batches and -the maintainers will use the proper `Needs backport (...)` labels +Maintainers will do backports in batches and +use the proper `Needs backport (...)` labels when needed (the original author does not need to worry about it). A backport should contain the following metadata in the commit body: diff --git a/COPYING b/COPYING index 2f7add71..23dc5e90 100644 --- a/COPYING +++ b/COPYING @@ -1,7 +1,7 @@ The MIT License (MIT) -Copyright (c) 2009-2023 The Bitcoin Core developers -Copyright (c) 2009-2023 Bitcoin Developers +Copyright (c) 2009-2025 The Bitcoin Core developers +Copyright (c) 2009-2025 Bitcoin Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 83d9ce53..00000000 --- a/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ - # Update new packages - FROM ubuntu:22.04 - - LABEL maintainer="dev@mara.tech" - LABEL version="0.1" - LABEL description="Docker file for coordinate" - - ARG DEBIAN_FRONTEND=noninteractive - - RUN apt-get update --fix-missing - RUN apt-get install -y \ - build-essential \ - libtool \ - autotools-dev \ - automake \ - pkg-config \ - bsdmainutils \ - python3 \ - libevent-dev \ - libboost-dev \ - libsqlite3-dev \ - libminiupnpc-dev \ - libnatpmp-dev \ - libzmq3-dev \ - systemtap-sdt-dev \ - curl - - - #Setup base directory - RUN mkdir -p /opt/coordinate - WORKDIR /opt/coordinate - - COPY ./src/coordinated ./coordinated - RUN chmod +x ./coordinated - - COPY ./src/coordinate-cli ./coordinate-cli - RUN chmod +x ./coordinate-cli - - ENTRYPOINT ["./coordinated"] - - CMD [] diff --git a/INSTALL.md b/INSTALL.md index 4cead030..013a099c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1 +1 @@ -See [doc/build-\*.md](/doc) \ No newline at end of file +See [doc/build-\*.md](/doc) diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index be14eff5..00000000 --- a/Makefile.am +++ /dev/null @@ -1,347 +0,0 @@ -# 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. - -# Pattern rule to print variables, e.g. make print-top_srcdir -print-%: FORCE - @echo '$*'='$($*)' - -ACLOCAL_AMFLAGS = -I build-aux/m4 -SUBDIRS = src -if ENABLE_MAN -SUBDIRS += doc/man -endif -.PHONY: deploy FORCE -.INTERMEDIATE: $(COVERAGE_INFO) - -export PYTHONPATH - -if BUILD_BITCOIN_LIBS -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libbitcoinconsensus.pc -endif - -COORDINATED_BIN=$(top_builddir)/src/$(BITCOIN_DAEMON_NAME)$(EXEEXT) -COORDINATE_QT_BIN=$(top_builddir)/src/qt/$(BITCOIN_GUI_NAME)$(EXEEXT) -BITCOIN_TEST_BIN=$(top_builddir)/src/test/$(BITCOIN_TEST_NAME)$(EXEEXT) -COORDINATE_CLI_BIN=$(top_builddir)/src/$(COORDINATE_CLI_NAME)$(EXEEXT) -COORDINATE_TX_BIN=$(top_builddir)/src/$(COORDINATE_TX_NAME)$(EXEEXT) -COORDINATE_UTIL_BIN=$(top_builddir)/src/$(COORDINATE_UTIL_NAME)$(EXEEXT) -COORDINATE_WALLET_BIN=$(top_builddir)/src/$(COORDINATE_WALLET_TOOL_NAME)$(EXEEXT) -BITCOIN_NODE_BIN=$(top_builddir)/src/$(BITCOIN_MP_NODE_NAME)$(EXEEXT) -BITCOIN_GUI_BIN=$(top_builddir)/src/$(BITCOIN_MP_GUI_NAME)$(EXEEXT) -BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win64-setup$(EXEEXT) - -empty := -space := $(empty) $(empty) - -OSX_APP=Coordinate-Qt.app -OSX_VOLNAME = $(subst $(space),-,$(PACKAGE_NAME)) -OSX_ZIP = $(OSX_VOLNAME).zip -OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus -OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns -OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed - -DIST_CONTRIB = \ - $(top_srcdir)/test/sanitizer_suppressions/lsan \ - $(top_srcdir)/test/sanitizer_suppressions/tsan \ - $(top_srcdir)/test/sanitizer_suppressions/ubsan \ - $(top_srcdir)/contrib/linearize/linearize-data.py \ - $(top_srcdir)/contrib/linearize/linearize-hashes.py \ - $(top_srcdir)/contrib/signet/miner - -DIST_SHARE = \ - $(top_srcdir)/share/genbuild.sh \ - $(top_srcdir)/share/rpcauth - -BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \ - $(top_srcdir)/contrib/devtools/security-check.py \ - $(top_srcdir)/contrib/devtools/utils.py - -WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \ - $(top_srcdir)/share/pixmaps/nsis-header.bmp \ - $(top_srcdir)/share/pixmaps/nsis-wizard.bmp \ - $(top_srcdir)/doc/README_windows.txt - -OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_INSTALLER_ICONS) \ - $(top_srcdir)/contrib/macdeploy/detached-sig-create.sh - -COVERAGE_INFO = $(COV_TOOL_WRAPPER) baseline.info \ - test_bitcoin_filtered.info total_coverage.info \ - baseline_filtered.info functional_test.info functional_test_filtered.info \ - test_bitcoin_coverage.info test_bitcoin.info fuzz.info fuzz_filtered.info fuzz_coverage.info - -dist-hook: - -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf - - -if TARGET_WINDOWS -$(BITCOIN_WIN_INSTALLER): all-recursive - $(MKDIR_P) $(top_builddir)/release - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(COORDINATED_BIN) $(top_builddir)/release - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(COORDINATE_QT_BIN) $(top_builddir)/release - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_TEST_BIN) $(top_builddir)/release - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(COORDINATE_CLI_BIN) $(top_builddir)/release - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(COORDINATE_TX_BIN) $(top_builddir)/release - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(COORDINATE_WALLET_BIN) $(top_builddir)/release - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(COORDINATE_UTIL_BIN) $(top_builddir)/release - @test -f $(MAKENSIS) && echo 'OutFile "$@"' | cat $(top_builddir)/share/setup.nsi - | $(MAKENSIS) -V2 - || \ - echo error: could not build $@ - @echo built $@ - -deploy: $(BITCOIN_WIN_INSTALLER) -endif - -if TARGET_DARWIN -$(OSX_APP)/Contents/PkgInfo: - $(MKDIR_P) $(@D) - @echo "APPL????" > $@ - -$(OSX_APP)/Contents/Resources/empty.lproj: - $(MKDIR_P) $(@D) - @touch $@ - -$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST) - $(MKDIR_P) $(@D) - $(INSTALL_DATA) $< $@ - -$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS) - $(MKDIR_P) $(@D) - $(INSTALL_DATA) $< $@ - -$(OSX_APP)/Contents/MacOS/Coordinate-Qt: all-recursive - $(MKDIR_P) $(@D) - STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(COORDINATE_QT_BIN) $@ - -$(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings: - $(MKDIR_P) $(@D) - echo '{ CFBundleDisplayName = "$(PACKAGE_NAME)"; CFBundleName = "$(PACKAGE_NAME)"; }' > $@ - -OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \ - $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \ - $(OSX_APP)/Contents/MacOS/Coordinate-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings - -osx_volname: - echo $(OSX_VOLNAME) >$@ - -if BUILD_DARWIN -$(OSX_ZIP): $(OSX_APP_BUILT) $(OSX_PACKAGING) - $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR) -zip - -deploydir: $(OSX_ZIP) -else !BUILD_DARWIN -APP_DIST_DIR=$(top_builddir)/dist - -$(OSX_ZIP): deploydir - if [ -n "$(SOURCE_DATE_EPOCH)" ]; then find $(APP_DIST_DIR) -exec touch -d @$(SOURCE_DATE_EPOCH) {} +; fi - cd $(APP_DIST_DIR) && find . | sort | $(ZIP) -X@ $@ - -$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Coordinate-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING) - INSTALL_NAME_TOOL=$(INSTALL_NAME_TOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR) - -deploydir: $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Coordinate-Qt -endif !BUILD_DARWIN - -deploy: $(OSX_ZIP) -endif - -$(COORDINATE_QT_BIN): FORCE - $(MAKE) -C src qt/$(@F) - -$(COORDINATED_BIN): FORCE - $(MAKE) -C src $(@F) - -$(COORDINATE_CLI_BIN): FORCE - $(MAKE) -C src $(@F) - -$(COORDINATE_TX_BIN): FORCE - $(MAKE) -C src $(@F) - -$(COORDINATE_UTIL_BIN): FORCE - $(MAKE) -C src $(@F) - -$(COORDINATE_WALLET_BIN): FORCE - $(MAKE) -C src $(@F) - -$(BITCOIN_NODE_BIN): FORCE - $(MAKE) -C src $(@F) - -$(BITCOIN_GUI_BIN): FORCE - $(MAKE) -C src $(@F) - -if USE_LCOV -LCOV_FILTER_PATTERN = \ - -p "/usr/local/" \ - -p "/usr/include/" \ - -p "/usr/lib/" \ - -p "/usr/lib64/" \ - -p "src/leveldb/" \ - -p "src/crc32c/" \ - -p "src/bench/" \ - -p "src/crypto/ctaes" \ - -p "src/minisketch" \ - -p "src/secp256k1" \ - -p "depends" - -DIR_FUZZ_SEED_CORPUS ?= qa-assets/fuzz_seed_corpus - -$(COV_TOOL_WRAPPER): - @echo 'exec $(COV_TOOL) "$$@"' > $(COV_TOOL_WRAPPER) - @chmod +x $(COV_TOOL_WRAPPER) - -baseline.info: $(COV_TOOL_WRAPPER) - $(LCOV) -c -i -d $(abs_builddir)/src -o $@ - -baseline_filtered.info: baseline.info - $(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@ - $(LCOV) -a $@ $(LCOV_OPTS) -o $@ - -fuzz.info: baseline_filtered.info - @TIMEOUT=15 test/fuzz/test_runner.py $(DIR_FUZZ_SEED_CORPUS) -l DEBUG - $(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src --t fuzz-tests -o $@ - $(LCOV) -z $(LCOV_OPTS) -d $(abs_builddir)/src - -fuzz_filtered.info: fuzz.info - $(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@ - $(LCOV) -a $@ $(LCOV_OPTS) -o $@ - -test_bitcoin.info: baseline_filtered.info - $(MAKE) -C src/ check - $(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src -t test_bitcoin -o $@ - $(LCOV) -z $(LCOV_OPTS) -d $(abs_builddir)/src - -test_bitcoin_filtered.info: test_bitcoin.info - $(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@ - $(LCOV) -a $@ $(LCOV_OPTS) -o $@ - -functional_test.info: test_bitcoin_filtered.info - @TIMEOUT=15 test/functional/test_runner.py $(EXTENDED_FUNCTIONAL_TESTS) - $(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src --t functional-tests -o $@ - $(LCOV) -z $(LCOV_OPTS) -d $(abs_builddir)/src - -functional_test_filtered.info: functional_test.info - $(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@ - $(LCOV) -a $@ $(LCOV_OPTS) -o $@ - -fuzz_coverage.info: fuzz_filtered.info - $(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a fuzz_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt - -test_bitcoin_coverage.info: baseline_filtered.info test_bitcoin_filtered.info - $(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_bitcoin_filtered.info -o $@ - -total_coverage.info: test_bitcoin_filtered.info functional_test_filtered.info - $(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_bitcoin_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt - -fuzz.coverage/.dirstamp: fuzz_coverage.info - $(GENHTML) -s $(LCOV_OPTS) $< -o $(@D) - @touch $@ - -test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info - $(GENHTML) -s $(LCOV_OPTS) $< -o $(@D) - @touch $@ - -total.coverage/.dirstamp: total_coverage.info - $(GENHTML) -s $(LCOV_OPTS) $< -o $(@D) - @touch $@ - -cov_fuzz: fuzz.coverage/.dirstamp - -cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp - -endif - -dist_noinst_SCRIPTS = autogen.sh - -EXTRA_DIST = $(DIST_SHARE) $(DIST_CONTRIB) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS) - -EXTRA_DIST += \ - test/functional \ - test/fuzz - -EXTRA_DIST += \ - test/util/test_runner.py \ - test/util/data/coordinate-util-test.json \ - test/util/data/blanktxv1.hex \ - test/util/data/blanktxv1.json \ - test/util/data/blanktxv2.hex \ - test/util/data/blanktxv2.json \ - test/util/data/tt-delin1-out.hex \ - test/util/data/tt-delin1-out.json \ - test/util/data/tt-delout1-out.hex \ - test/util/data/tt-delout1-out.json \ - test/util/data/tt-locktime317000-out.hex \ - test/util/data/tt-locktime317000-out.json \ - test/util/data/tx394b54bb.hex \ - test/util/data/txcreate1.hex \ - test/util/data/txcreate1.json \ - test/util/data/txcreate2.hex \ - test/util/data/txcreate2.json \ - test/util/data/txcreatedata1.hex \ - test/util/data/txcreatedata1.json \ - test/util/data/txcreatedata2.hex \ - test/util/data/txcreatedata2.json \ - test/util/data/txcreatedata_seq0.hex \ - test/util/data/txcreatedata_seq0.json \ - test/util/data/txcreatedata_seq1.hex \ - test/util/data/txcreatedata_seq1.json \ - test/util/data/txcreatemultisig1.hex \ - test/util/data/txcreatemultisig1.json \ - test/util/data/txcreatemultisig2.hex \ - test/util/data/txcreatemultisig2.json \ - test/util/data/txcreatemultisig4.hex \ - test/util/data/txcreatemultisig4.json \ - test/util/data/txcreatemultisig5.json \ - test/util/data/txcreateoutpubkey1.hex \ - test/util/data/txcreateoutpubkey1.json \ - test/util/data/txcreateoutpubkey3.hex \ - test/util/data/txcreateoutpubkey3.json \ - test/util/data/txcreatescript1.hex \ - test/util/data/txcreatescript1.json \ - test/util/data/txcreatescript2.hex \ - test/util/data/txcreatescript2.json \ - test/util/data/txcreatescript4.hex \ - test/util/data/txcreatescript4.json \ - test/util/data/txcreatescript5.hex \ - test/util/data/txcreatescript6.hex \ - test/util/data/txcreatesignsegwit1.hex \ - test/util/data/txcreatesignv1.hex \ - test/util/data/txcreatesignv1.json \ - test/util/data/txcreatesignv2.hex \ - test/util/rpcauth-test.py - -CLEANFILES = $(OSX_ZIP) $(BITCOIN_WIN_INSTALLER) - -DISTCHECK_CONFIGURE_FLAGS = --enable-man - -doc/doxygen/.stamp: doc/Doxyfile FORCE - $(MKDIR_P) $(@D) - $(DOXYGEN) $^ - $(AM_V_at) touch $@ - -if HAVE_DOXYGEN -docs: doc/doxygen/.stamp -else -docs: - @echo "error: doxygen not found" -endif - -clean-docs: - rm -rf doc/doxygen - -clean-local: clean-docs - rm -rf coverage_percent.txt test_bitcoin.coverage/ total.coverage/ fuzz.coverage/ test/tmp/ cache/ $(OSX_APP) - rm -rf test/functional/__pycache__ test/functional/test_framework/__pycache__ test/cache share/rpcauth/__pycache__ - rm -rf osx_volname dist/ - -test-security-check: -if TARGET_DARWIN - $(AM_V_at) CC='$(CC)' CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_MACHO - $(AM_V_at) CC='$(CC)' CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-symbol-check.py TestSymbolChecks.test_MACHO -endif -if TARGET_WINDOWS - $(AM_V_at) CC='$(CC)' CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_PE - $(AM_V_at) CC='$(CC)' CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-symbol-check.py TestSymbolChecks.test_PE -endif -if TARGET_LINUX - $(AM_V_at) CC='$(CC)' CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_ELF - $(AM_V_at) CC='$(CC)' CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(PYTHON) $(top_srcdir)/contrib/devtools/test-symbol-check.py TestSymbolChecks.test_ELF -endif diff --git a/README.md b/README.md index 2eab2315..cfabb7f6 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ License ------- Bitcoin Core is released under the terms of the MIT license. See [COPYING](COPYING) for more -information or see https://opensource.org/licenses/MIT. +information or see https://opensource.org/license/MIT. Development Process ------------------- @@ -48,15 +48,16 @@ lots of money. Developers are strongly encouraged to write [unit tests](src/test/README.md) for new code, and to submit new unit tests for old code. Unit tests can be compiled and run -(assuming they weren't disabled in configure) with: `make check`. Further details on running +(assuming they weren't disabled during the generation of the build system) with: `ctest`. Further details on running and extending unit tests can be found in [/src/test/README.md](/src/test/README.md). There are also [regression and integration tests](/test), written in Python. -These tests can be run (if the [test dependencies](/test) are installed) with: `test/functional/test_runner.py` +These tests can be run (if the [test dependencies](/test) are installed) with: `build/test/functional/test_runner.py` +(assuming `build` is your build directory). -The CI (Continuous Integration) systems make sure that every pull request is built for Windows, Linux, and macOS, -and that unit/sanity tests are run automatically. +The CI (Continuous Integration) systems make sure that every pull request is tested on Windows, Linux, and macOS. +The CI must pass on all commits before merge to avoid unrelated CI failures on new pull requests. ### Manual Quality Assurance (QA) Testing @@ -69,7 +70,7 @@ Translations ------------ Changes to translations as well as new translations can be submitted to -[Bitcoin Core's Transifex page](https://www.transifex.com/bitcoin/bitcoin/). +[Bitcoin Core's Transifex page](https://explore.transifex.com/bitcoin/bitcoin/). Translations are periodically pulled from Transifex and merged into the git repository. See the [translation process](doc/translation_process.md) for details on how this works. diff --git a/SECURITY.md b/SECURITY.md index c0660e70..fd4c61d1 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -15,6 +15,6 @@ The following keys may be used to communicate sensitive information to developer |------|-------------| | Pieter Wuille | 133E AC17 9436 F14A 5CF1 B794 860F EB80 4E66 9320 | | Michael Ford | E777 299F C265 DD04 7930 70EB 944D 35F9 AC3D B76A | -| Andrew Chow | 1528 1230 0785 C964 44D3 334D 1756 5732 E08E 5E41 | +| Ava Chow | 1528 1230 0785 C964 44D3 334D 1756 5732 E08E 5E41 | You can import a key by running the following command with that individual’s fingerprint: `gpg --keyserver hkps://keys.openpgp.org --recv-keys ""` Ensure that you put quotes around fingerprints containing spaces. diff --git a/Testing/Temporary/CTestCostData.txt b/Testing/Temporary/CTestCostData.txt new file mode 100644 index 00000000..ed97d539 --- /dev/null +++ b/Testing/Temporary/CTestCostData.txt @@ -0,0 +1 @@ +--- diff --git a/Testing/Temporary/LastTest.log b/Testing/Temporary/LastTest.log new file mode 100644 index 00000000..a3b39373 --- /dev/null +++ b/Testing/Temporary/LastTest.log @@ -0,0 +1,3 @@ +Start testing: Sep 09 16:59 IST +---------------------------------------------------------- +End testing: Sep 09 16:59 IST diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 69c892ff..00000000 --- a/autogen.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# Copyright (c) 2013-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. - -export LC_ALL=C -set -e -srcdir="$(dirname "$0")" -cd "$srcdir" -if [ -z "${LIBTOOLIZE}" ] && GLIBTOOLIZE="$(command -v glibtoolize)"; then - LIBTOOLIZE="${GLIBTOOLIZE}" - export LIBTOOLIZE -fi -command -v autoreconf >/dev/null || \ - (echo "configuration failed, please install autoconf first" && exit 1) -autoreconf --install --force --warnings=all - -if expr "'$(build-aux/config.guess --timestamp)" \< "'$(depends/config.guess --timestamp)" > /dev/null; then - chmod ug+w build-aux/config.guess - chmod ug+w src/secp256k1/build-aux/config.guess - cp depends/config.guess build-aux - cp depends/config.guess src/secp256k1/build-aux -fi -if expr "'$(build-aux/config.sub --timestamp)" \< "'$(depends/config.sub --timestamp)" > /dev/null; then - chmod ug+w build-aux/config.sub - chmod ug+w src/secp256k1/build-aux/config.sub - cp depends/config.sub build-aux - cp depends/config.sub src/secp256k1/build-aux -fi diff --git a/build-aux/m4/ax_boost_base.m4 b/build-aux/m4/ax_boost_base.m4 deleted file mode 100644 index f6620882..00000000 --- a/build-aux/m4/ax_boost_base.m4 +++ /dev/null @@ -1,256 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_boost_base.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# DESCRIPTION -# -# Test for the Boost C++ headers of a particular version (or newer) -# -# If no path to the installed boost library is given the macro searchs -# under /usr, /usr/local, /opt, /opt/local and /opt/homebrew and evaluates -# the $BOOST_ROOT environment variable. Further documentation is available -# at . -# -# This macro calls: -# -# AC_SUBST(BOOST_CPPFLAGS) -# -# And sets: -# -# HAVE_BOOST -# -# Note that this macro has been modified compared to upstream. -# -# LICENSE -# -# Copyright (c) 2008 Thomas Porschberg -# Copyright (c) 2009 Peter Adolphs -# -# 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 51 - -# example boost program (need to pass version) -m4_define([_AX_BOOST_BASE_PROGRAM], - [AC_LANG_PROGRAM([[ -#include -]],[[ -(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))])); -]])]) - -AC_DEFUN([AX_BOOST_BASE], -[ -AC_ARG_WITH([boost], - [AS_HELP_STRING([--with-boost@<:@=ARG@:>@], - [use Boost library from a standard location (ARG=yes), - from the specified location (ARG=), - or disable it (ARG=no) - @<:@ARG=yes@:>@ ])], - [ - AS_CASE([$withval], - [no],[want_boost="no";_AX_BOOST_BASE_boost_path=""], - [yes],[want_boost="yes";_AX_BOOST_BASE_boost_path=""], - [want_boost="yes";_AX_BOOST_BASE_boost_path="$withval"]) - ], - [want_boost="yes"]) - -BOOST_CPPFLAGS="" -AS_IF([test "x$want_boost" = "xyes"], - [_AX_BOOST_BASE_RUNDETECT([$1],[$2],[$3])]) -AC_SUBST(BOOST_CPPFLAGS) -]) - - -# convert a version string in $2 to numeric and affect to polymorphic var $1 -AC_DEFUN([_AX_BOOST_BASE_TONUMERICVERSION],[ - AS_IF([test "x$2" = "x"],[_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"],[_AX_BOOST_BASE_TONUMERICVERSION_req="$2"]) - _AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\.[[0-9]]*\)'` - _AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\)'` - AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"], - [AC_MSG_ERROR([You should at least specify libboost major version])]) - _AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.\([[0-9]]*\)'` - AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"], - [_AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"]) - _AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - AS_IF([test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"], - [_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"]) - _AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor` - AS_VAR_SET($1,$_AX_BOOST_BASE_TONUMERICVERSION_RET) -]) - -dnl Run the detection of boost should be run only if $want_boost -AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[ - _AX_BOOST_BASE_TONUMERICVERSION(WANT_BOOST_VERSION,[$1]) - succeeded=no - - - AC_REQUIRE([AC_CANONICAL_HOST]) - dnl On 64-bit systems check for system libraries in both lib64 and lib. - dnl The former is specified by FHS, but e.g. Debian does not adhere to - dnl this (as it rises problems for generic multi-arch support). - dnl The last entry in the list is chosen by default when no libraries - dnl are found, e.g. when only header-only libraries are installed! - AS_CASE([${host_cpu}], - [x86_64],[libsubdirs="lib64 libx32 lib lib64"], - [mips*64*],[libsubdirs="lib64 lib32 lib lib64"], - [ppc64|powerpc64|s390x|sparc64|aarch64|ppc64le|powerpc64le|riscv64|e2k],[libsubdirs="lib64 lib lib64"], - [libsubdirs="lib"] - ) - - dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give - dnl them priority over the other paths since, if libs are found there, they - dnl are almost assuredly the ones desired. - AS_CASE([${host_cpu}], - [i?86],[multiarch_libsubdir="lib/i386-${host_os}"], - [armv7l],[multiarch_libsubdir="lib/arm-${host_os}"], - [multiarch_libsubdir="lib/${host_cpu}-${host_os}"] - ) - - dnl first we check the system location for boost libraries - dnl this location is chosen if boost libraries are installed with the --layout=system option - dnl or if you install boost with RPM - AS_IF([test "x$_AX_BOOST_BASE_boost_path" != "x"],[ - AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) includes in "$_AX_BOOST_BASE_boost_path/include"]) - AS_IF([test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"],[ - AC_MSG_RESULT([yes]) - BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include" - for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do - AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) lib path in "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"]) - AS_IF([test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ],[ - AC_MSG_RESULT([yes]) - break; - ], - [AC_MSG_RESULT([no])]) - done],[ - AC_MSG_RESULT([no])]) - ],[ - if test X"$cross_compiling" = Xyes; then - search_libsubdirs=$multiarch_libsubdir - else - search_libsubdirs="$multiarch_libsubdir $libsubdirs" - fi - for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local /opt/homebrew ; do - if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then - for libsubdir in $search_libsubdirs ; do - if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi - done - BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include" - break; - fi - done - ]) - - AC_MSG_CHECKING([for Boost headers >= $1 ($WANT_BOOST_VERSION)]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - AC_REQUIRE([AC_PROG_CXX]) - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[ - AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ],[ - ]) - AC_LANG_POP([C++]) - - - - dnl if we found no boost with system layout we search for boost libraries - dnl built and installed without the --layout=system option or for a staged(not installed) version - if test "x$succeeded" != "xyes" ; then - CPPFLAGS="$CPPFLAGS_SAVED" - BOOST_CPPFLAGS= - - _version=0 - if test -n "$_AX_BOOST_BASE_boost_path" ; then - if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then - for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "x$V_CHECK" = "x1" ; then - _version=$_version_tmp - fi - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include/boost-$VERSION_UNDERSCORE" - done - dnl if nothing found search for layout used in Windows distributions - if test -z "$BOOST_CPPFLAGS"; then - if test -d "$_AX_BOOST_BASE_boost_path/boost" && test -r "$_AX_BOOST_BASE_boost_path/boost"; then - BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path" - fi - fi - fi - else - if test "x$cross_compiling" != "xyes" ; then - for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local /opt/homebrew ; do - if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path" ; then - for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "x$V_CHECK" = "x1" ; then - _version=$_version_tmp - best_path=$_AX_BOOST_BASE_boost_path - fi - done - fi - done - - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" - fi - - if test -n "$BOOST_ROOT" ; then - for libsubdir in $libsubdirs ; do - if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi - done - if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then - version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` - stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` - stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'` - V_CHECK=`expr $stage_version_shorten \>\= $_version` - if test "x$V_CHECK" = "x1" ; then - AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) - BOOST_CPPFLAGS="-I$BOOST_ROOT" - fi - fi - fi - fi - - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[ - AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ],[ - ]) - AC_LANG_POP([C++]) - fi - - if test "x$succeeded" != "xyes" ; then - if test "x$_version" = "x0" ; then - AC_MSG_NOTICE([[We could not detect the boost libraries (version $1 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.]]) - else - AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).]) - fi - # execute ACTION-IF-NOT-FOUND (if present): - ifelse([$3], , :, [$3]) - else - AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available]) - # execute ACTION-IF-FOUND (if present): - ifelse([$2], , :, [$2]) - fi - - CPPFLAGS="$CPPFLAGS_SAVED" -]) diff --git a/build-aux/m4/ax_check_compile_flag.m4 b/build-aux/m4/ax_check_compile_flag.m4 deleted file mode 100644 index bd753b34..00000000 --- a/build-aux/m4/ax_check_compile_flag.m4 +++ /dev/null @@ -1,53 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the current language's compiler -# or gives an error. (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_COMPILE_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# 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 6 - -AC_DEFUN([AX_CHECK_COMPILE_FLAG], -[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl -AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ - ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS - _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" - AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) -AS_VAR_IF(CACHEVAR,yes, - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_COMPILE_FLAGS diff --git a/build-aux/m4/ax_check_link_flag.m4 b/build-aux/m4/ax_check_link_flag.m4 deleted file mode 100644 index 03a30ce4..00000000 --- a/build-aux/m4/ax_check_link_flag.m4 +++ /dev/null @@ -1,53 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the linker or gives an error. -# (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the linker's default flags -# when the check is done. The check is thus made with the flags: "LDFLAGS -# EXTRA-FLAGS FLAG". This can for example be used to force the linker to -# issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_LINK_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# 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 6 - -AC_DEFUN([AX_CHECK_LINK_FLAG], -[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl -AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS $4 $1" - AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - LDFLAGS=$ax_check_save_flags]) -AS_VAR_IF(CACHEVAR,yes, - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_LINK_FLAGS diff --git a/build-aux/m4/ax_check_preproc_flag.m4 b/build-aux/m4/ax_check_preproc_flag.m4 deleted file mode 100644 index e43560fb..00000000 --- a/build-aux/m4/ax_check_preproc_flag.m4 +++ /dev/null @@ -1,53 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_preproc_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_PREPROC_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the current language's -# preprocessor or gives an error. (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the preprocessor's default -# flags when the check is done. The check is thus made with the flags: -# "CPPFLAGS EXTRA-FLAGS FLAG". This can for example be used to force the -# preprocessor to issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_PREPROC_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{COMPILE,LINK}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# 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 6 - -AC_DEFUN([AX_CHECK_PREPROC_FLAG], -[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]cppflags_$4_$1])dnl -AC_CACHE_CHECK([whether _AC_LANG preprocessor accepts $1], CACHEVAR, [ - ax_check_save_flags=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $4 $1" - AC_PREPROC_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - CPPFLAGS=$ax_check_save_flags]) -AS_VAR_IF(CACHEVAR,yes, - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_PREPROC_FLAGS diff --git a/build-aux/m4/ax_cxx_compile_stdcxx.m4 b/build-aux/m4/ax_cxx_compile_stdcxx.m4 deleted file mode 100644 index 51a35054..00000000 --- a/build-aux/m4/ax_cxx_compile_stdcxx.m4 +++ /dev/null @@ -1,1005 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) -# -# DESCRIPTION -# -# Check for baseline language coverage in the compiler for the specified -# version of the C++ standard. If necessary, add switches to CXX and -# CXXCPP to enable support. VERSION may be '11', '14', '17', or '20' for -# the respective C++ standard version. -# -# The second argument, if specified, indicates whether you insist on an -# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. -# -std=c++11). If neither is specified, you get whatever works, with -# preference for no added switch, and then for an extended mode. -# -# The third argument, if specified 'mandatory' or if left unspecified, -# indicates that baseline support for the specified C++ standard is -# required and that the macro should error out if no mode with that -# support is found. If specified 'optional', then configuration proceeds -# regardless, after defining HAVE_CXX${VERSION} if and only if a -# supporting mode is found. -# -# LICENSE -# -# Copyright (c) 2008 Benjamin Kosnik -# Copyright (c) 2012 Zack Weinberg -# Copyright (c) 2013 Roy Stogner -# 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 -# Copyright (c) 2020 Jason Merrill -# Copyright (c) 2021 Jörn Heusipp -# -# 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 14 - -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], [ax_cxx_compile_alternatives="11 0x"], - [$1], [14], [ax_cxx_compile_alternatives="14 1y"], - [$1], [17], [ax_cxx_compile_alternatives="17 1z"], - [$1], [20], [ax_cxx_compile_alternatives="20"], - [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl - m4_if([$2], [], [], - [$2], [ext], [], - [$2], [noext], [], - [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl - m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true], - [$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])]) - AC_LANG_PUSH([C++])dnl - ac_success=no - - m4_if([$2], [], [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 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, - [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 - done - fi]) - - m4_if([$2], [ext], [], [dnl - if test x$ac_success = xno; then - 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 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 - done - if test x$ac_success = xyes; then - break - fi - done - fi]) - AC_LANG_POP([C++]) - if test x$ax_cxx_compile_cxx$1_required = xtrue; then - if test x$ac_success = xno; then - AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.]) - fi - fi - if test x$ac_success = xno; then - HAVE_CXX$1=0 - AC_MSG_NOTICE([No compiler with C++$1 support was found]) - else - HAVE_CXX$1=1 - AC_DEFINE(HAVE_CXX$1,1, - [define if the compiler supports basic C++$1 syntax]) - fi - AC_SUBST(HAVE_CXX$1) -]) - - -dnl Test body for checking C++11 support - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 -) - -dnl Test body for checking C++14 support - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 -) - -dnl Test body for checking C++17 support - -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 Test body for checking C++20 support - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_20 -) - - -dnl Tests for new features in C++11 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ - -// If the compiler admits that it is not ready for C++11, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201103L - -#error "This is not a C++11 compiler" - -#else - -namespace cxx11 -{ - - namespace test_static_assert - { - - template - struct check - { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); - }; - - } - - namespace test_final_override - { - - struct Base - { - virtual ~Base() {} - virtual void f() {} - }; - - struct Derived : public Base - { - virtual ~Derived() override {} - virtual void f() override {} - }; - - } - - namespace test_double_right_angle_brackets - { - - template < typename T > - struct check {}; - - typedef check single_type; - typedef check> double_type; - typedef check>> triple_type; - typedef check>>> quadruple_type; - - } - - namespace test_decltype - { - - int - f() - { - int a = 1; - decltype(a) b = 2; - return a + b; - } - - } - - namespace test_type_deduction - { - - template < typename T1, typename T2 > - struct is_same - { - static const bool value = false; - }; - - template < typename T > - struct is_same - { - static const bool value = true; - }; - - template < typename T1, typename T2 > - auto - add(T1 a1, T2 a2) -> decltype(a1 + a2) - { - return a1 + a2; - } - - int - test(const int c, volatile int v) - { - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == false, ""); - auto ac = c; - auto av = v; - auto sumi = ac + av + 'x'; - auto sumf = ac + av + 1.0; - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == true, ""); - return (sumf > 0.0) ? sumi : add(c, v); - } - - } - - namespace test_noexcept - { - - int f() { return 0; } - int g() noexcept { return 0; } - - static_assert(noexcept(f()) == false, ""); - static_assert(noexcept(g()) == true, ""); - - } - - namespace test_constexpr - { - - template < typename CharT > - unsigned long constexpr - strlen_c_r(const CharT *const s, const unsigned long acc) noexcept - { - return *s ? strlen_c_r(s + 1, acc + 1) : acc; - } - - template < typename CharT > - unsigned long constexpr - strlen_c(const CharT *const s) noexcept - { - return strlen_c_r(s, 0UL); - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("1") == 1UL, ""); - static_assert(strlen_c("example") == 7UL, ""); - static_assert(strlen_c("another\0example") == 7UL, ""); - - } - - namespace test_rvalue_references - { - - template < int N > - struct answer - { - static constexpr int value = N; - }; - - answer<1> f(int&) { return answer<1>(); } - answer<2> f(const int&) { return answer<2>(); } - answer<3> f(int&&) { return answer<3>(); } - - void - test() - { - int i = 0; - const int c = 0; - static_assert(decltype(f(i))::value == 1, ""); - static_assert(decltype(f(c))::value == 2, ""); - static_assert(decltype(f(0))::value == 3, ""); - } - - } - - namespace test_uniform_initialization - { - - struct test - { - static const int zero {}; - static const int one {1}; - }; - - static_assert(test::zero == 0, ""); - static_assert(test::one == 1, ""); - - } - - namespace test_lambdas - { - - void - test1() - { - auto lambda1 = [](){}; - auto lambda2 = lambda1; - lambda1(); - lambda2(); - } - - int - test2() - { - auto a = [](int i, int j){ return i + j; }(1, 2); - auto b = []() -> int { return '0'; }(); - auto c = [=](){ return a + b; }(); - auto d = [&](){ return c; }(); - auto e = [a, &b](int x) mutable { - const auto identity = [](int y){ return y; }; - for (auto i = 0; i < a; ++i) - a += b--; - return x + identity(a + b); - }(0); - return a + b + c + d + e; - } - - int - test3() - { - const auto nullary = [](){ return 0; }; - const auto unary = [](int x){ return x; }; - using nullary_t = decltype(nullary); - using unary_t = decltype(unary); - const auto higher1st = [](nullary_t f){ return f(); }; - const auto higher2nd = [unary](nullary_t f1){ - return [unary, f1](unary_t f2){ return f2(unary(f1())); }; - }; - return higher1st(nullary) + higher2nd(nullary)(unary); - } - - } - - namespace test_variadic_templates - { - - template - struct sum; - - template - struct sum - { - static constexpr auto value = N0 + sum::value; - }; - - template <> - struct sum<> - { - static constexpr auto value = 0; - }; - - static_assert(sum<>::value == 0, ""); - static_assert(sum<1>::value == 1, ""); - static_assert(sum<23>::value == 23, ""); - static_assert(sum<1, 2>::value == 3, ""); - static_assert(sum<5, 5, 11>::value == 21, ""); - static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); - - } - - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function - // because of this. - namespace test_template_alias_sfinae - { - - struct foo {}; - - template - using member = typename T::member_type; - - template - void func(...) {} - - template - void func(member*) {} - - void test(); - - void test() { func(0); } - - } - -} // namespace cxx11 - -#endif // __cplusplus >= 201103L - -]]) - - -dnl Tests for new features in C++14 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ - -// If the compiler admits that it is not ready for C++14, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201402L - -#error "This is not a C++14 compiler" - -#else - -namespace cxx14 -{ - - namespace test_polymorphic_lambdas - { - - int - test() - { - const auto lambda = [](auto&&... args){ - const auto istiny = [](auto x){ - return (sizeof(x) == 1UL) ? 1 : 0; - }; - const int aretiny[] = { istiny(args)... }; - return aretiny[0]; - }; - return lambda(1, 1L, 1.0f, '1'); - } - - } - - namespace test_binary_literals - { - - constexpr auto ivii = 0b0000000000101010; - static_assert(ivii == 42, "wrong value"); - - } - - namespace test_generalized_constexpr - { - - template < typename CharT > - constexpr unsigned long - strlen_c(const CharT *const s) noexcept - { - auto length = 0UL; - for (auto p = s; *p; ++p) - ++length; - return length; - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("x") == 1UL, ""); - static_assert(strlen_c("test") == 4UL, ""); - static_assert(strlen_c("another\0test") == 7UL, ""); - - } - - namespace test_lambda_init_capture - { - - int - test() - { - auto x = 0; - const auto lambda1 = [a = x](int b){ return a + b; }; - const auto lambda2 = [a = lambda1(x)](){ return a; }; - return lambda2(); - } - - } - - namespace test_digit_separators - { - - constexpr auto ten_million = 100'000'000; - static_assert(ten_million == 100000000, ""); - - } - - namespace test_return_type_deduction - { - - auto f(int& x) { return x; } - decltype(auto) g(int& x) { return x; } - - template < typename T1, typename T2 > - struct is_same - { - static constexpr auto value = false; - }; - - template < typename T > - struct is_same - { - static constexpr auto value = true; - }; - - int - test() - { - auto x = 0; - static_assert(is_same::value, ""); - static_assert(is_same::value, ""); - return x; - } - - } - -} // namespace cxx14 - -#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 - -]]) - - -dnl Tests for new features in C++20 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[ - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 202002L - -#error "This is not a C++20 compiler" - -#else - -#include - -namespace cxx20 -{ - -// As C++20 supports feature test macros in the standard, there is no -// immediate need to actually test for feature availability on the -// Autoconf side. - -} // namespace cxx20 - -#endif // __cplusplus < 202002L - -]]) diff --git a/build-aux/m4/ax_pthread.m4 b/build-aux/m4/ax_pthread.m4 deleted file mode 100644 index 9f35d139..00000000 --- a/build-aux/m4/ax_pthread.m4 +++ /dev/null @@ -1,522 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_pthread.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -# -# DESCRIPTION -# -# This macro figures out how to build C programs using POSIX threads. It -# sets the PTHREAD_LIBS output variable to the threads library and linker -# flags, and the PTHREAD_CFLAGS output variable to any special C compiler -# flags that are needed. (The user can also force certain compiler -# flags/libs to be tested by setting these environment variables.) -# -# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is -# needed for multi-threaded programs (defaults to the value of CC -# respectively CXX otherwise). (This is necessary on e.g. AIX to use the -# special cc_r/CC_r compiler alias.) -# -# NOTE: You are assumed to not only compile your program with these flags, -# but also to link with them as well. For example, you might link with -# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -# -# If you are only building threaded programs, you may wish to use these -# variables in your default LIBS, CFLAGS, and CC: -# -# LIBS="$PTHREAD_LIBS $LIBS" -# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" -# CC="$PTHREAD_CC" -# CXX="$PTHREAD_CXX" -# -# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to -# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -# -# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the -# PTHREAD_PRIO_INHERIT symbol is defined when compiling with -# PTHREAD_CFLAGS. -# -# ACTION-IF-FOUND is a list of shell commands to run if a threads library -# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it -# is not found. If ACTION-IF-FOUND is not specified, the default action -# will define HAVE_PTHREAD. -# -# Please let the authors know if this macro fails on any platform, or if -# you have any other suggestions or comments. This macro was based on work -# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help -# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by -# Alejandro Forero Cuervo to the autoconf macro repository. We are also -# grateful for the helpful feedback of numerous users. -# -# Updated for Autoconf 2.68 by Daniel Richard G. -# -# LICENSE -# -# 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 -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# 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 -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 31 - -AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) -AC_DEFUN([AX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([AC_PROG_CC]) -AC_REQUIRE([AC_PROG_SED]) -AC_LANG_PUSH([C]) -ax_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on Tru64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then - ax_pthread_save_CC="$CC" - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) - AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"]) - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) - AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) - AC_MSG_RESULT([$ax_pthread_ok]) - if test "x$ax_pthread_ok" = "xno"; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - CC="$ax_pthread_save_CC" - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (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 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" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 -# (Note: HP C rejects this with "bad form for `-t' option") -# -pthreads: Solaris/gcc (Note: HP C also rejects) -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads and -# -D_REENTRANT too), HP C (must be checked before -lpthread, which -# is present but should not be used directly; and before -mthreads, -# because the compiler interprets this as "-mt" + "-hreads") -# -mthreads: Mingw32/gcc, Lynx/gcc -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case $host_os in - - freebsd*) - - # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) - # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) - - ax_pthread_flags="-kthread lthread $ax_pthread_flags" - ;; - - hpux*) - - # From the cc(1) man page: "[-mt] Sets various -D flags to enable - # multi-threading and also sets -lpthread." - - ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" - ;; - - openedition*) - - # IBM z/OS requires a feature-test macro to be defined in order to - # enable POSIX threads at all, so give the user a hint if this is - # not set. (We don't define these ourselves, as they can affect - # other portions of the system API in unpredictable ways.) - - AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], - [ -# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) - AX_PTHREAD_ZOS_MISSING -# endif - ], - [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) - ;; - - solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (N.B.: The stubs are missing - # pthread_cleanup_push, or rather a function called by this macro, - # so we could check for that, but who knows whether they'll stub - # 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,-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,-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 -# correctly enabled - -case $host_os in - darwin* | hpux* | linux* | osf* | solaris*) - ax_pthread_check_macro="_REENTRANT" - ;; - - aix*) - ax_pthread_check_macro="_THREAD_SAFE" - ;; - - *) - ax_pthread_check_macro="--" - ;; -esac -AS_IF([test "x$ax_pthread_check_macro" = "x--"], - [ax_pthread_check_cond=0], - [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) - - -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 - - -# Clang needs special handling, because older versions handle the -pthread -# option in a rather... idiosyncratic way - -if test "x$ax_pthread_clang" = "xyes"; then - - # Clang takes -pthread; it has never supported any other flag - - # (Note 1: This will need to be revisited if a system that Clang - # supports has POSIX threads in a separate library. This tends not - # to be the way of modern systems, but it's conceivable.) - - # (Note 2: On some systems, notably Darwin, -pthread is not needed - # to get POSIX threads support; the API is always present and - # active. We could reasonably leave PTHREAD_CFLAGS empty. But - # -pthread does define _REENTRANT, and while the Darwin headers - # ignore this macro, third-party headers might not.) - - # 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 - # during compilation"). They expect -pthread to be passed in only - # when source code is being compiled. - # - # Problem is, this is at odds with the way Automake and most other - # C build frameworks function, which is that the same flags used in - # compilation (CFLAGS) are also used in linking. Many systems - # supported by AX_PTHREAD require exactly this for POSIX threads - # support, and in fact it is often not straightforward to specify a - # flag that is used only in the compilation phase and not in - # linking. Such a scenario is extremely rare in practice. - # - # Even though use of the -pthread flag in linking would only print - # a warning, this can be a nuisance for well-run software projects - # that build with -Werror. So if the active version of Clang has - # this misfeature, we search for an option to squash it. - - AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], - [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], - [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown - # Create an alternate version of $ac_link that compiles and - # links in two steps (.c -> .o, .o -> exe) instead of one - # (.c -> exe), because the warning occurs only in the second - # step - ax_pthread_save_ac_link="$ac_link" - ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' - ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"` - ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" - ax_pthread_save_CFLAGS="$CFLAGS" - for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do - AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) - CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" - ac_link="$ax_pthread_save_ac_link" - AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], - [ac_link="$ax_pthread_2step_ac_link" - AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], - [break]) - ]) - done - ac_link="$ax_pthread_save_ac_link" - CFLAGS="$ax_pthread_save_CFLAGS" - AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) - ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" - ]) - - case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in - no | unknown) ;; - *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; - esac - -fi # $ax_pthread_clang = yes - - - -# Various other checks: -if test "x$ax_pthread_ok" = "xyes"; then - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_CACHE_CHECK([for joinable pthread attribute], - [ax_cv_PTHREAD_JOINABLE_ATTR], - [ax_cv_PTHREAD_JOINABLE_ATTR=unknown - for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], - [int attr = $ax_pthread_attr; return attr /* ; */])], - [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], - []) - done - ]) - AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ - test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ - test "x$ax_pthread_joinable_attr_defined" != "xyes"], - [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], - [$ax_cv_PTHREAD_JOINABLE_ATTR], - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - ax_pthread_joinable_attr_defined=yes - ]) - - AC_CACHE_CHECK([whether more special flags are required for pthreads], - [ax_cv_PTHREAD_SPECIAL_FLAGS], - [ax_cv_PTHREAD_SPECIAL_FLAGS=no - case $host_os in - solaris*) - ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" - ;; - esac - ]) - AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ - test "x$ax_pthread_special_flags_added" != "xyes"], - [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" - ax_pthread_special_flags_added=yes]) - - AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], - [ax_cv_PTHREAD_PRIO_INHERIT], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[int i = PTHREAD_PRIO_INHERIT; - return i;]])], - [ax_cv_PTHREAD_PRIO_INHERIT=yes], - [ax_cv_PTHREAD_PRIO_INHERIT=no]) - ]) - AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ - test "x$ax_pthread_prio_inherit_defined" != "xyes"], - [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) - ax_pthread_prio_inherit_defined=yes - ]) - - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" - - # More AIX lossage: compile with *_r variant - if test "x$GCC" != "xyes"; then - case $host_os in - aix*) - AS_CASE(["x/$CC"], - [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], - [#handle absolute path differently from PATH based program lookup - AS_CASE(["x$CC"], - [x/*], - [ - AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"]) - AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])]) - ], - [ - AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC]) - AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])]) - ] - ) - ]) - ;; - esac - fi -fi - -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" -test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX" - -AC_SUBST([PTHREAD_LIBS]) -AC_SUBST([PTHREAD_CFLAGS]) -AC_SUBST([PTHREAD_CC]) -AC_SUBST([PTHREAD_CXX]) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test "x$ax_pthread_ok" = "xyes"; then - ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) - : -else - ax_pthread_ok=no - $2 -fi -AC_LANG_POP -])dnl AX_PTHREAD diff --git a/build-aux/m4/bitcoin_find_bdb48.m4 b/build-aux/m4/bitcoin_find_bdb48.m4 deleted file mode 100644 index 3ef7fab5..00000000 --- a/build-aux/m4/bitcoin_find_bdb48.m4 +++ /dev/null @@ -1,97 +0,0 @@ -dnl Copyright (c) 2013-2015 The Bitcoin Core developers -dnl Distributed under the MIT software license, see the accompanying -dnl file COPYING or http://www.opensource.org/licenses/mit-license.php. - -AC_DEFUN([BITCOIN_FIND_BDB48],[ - AC_ARG_VAR([BDB_CFLAGS], [C compiler flags for BerkeleyDB, bypasses autodetection]) - AC_ARG_VAR([BDB_LIBS], [Linker flags for BerkeleyDB, bypasses autodetection]) - - if test "$use_bdb" = "no"; then - use_bdb=no - elif test "$BDB_CFLAGS" = ""; then - AC_MSG_CHECKING([for Berkeley DB C++ headers]) - BDB_CPPFLAGS= - bdbpath=X - bdb48path=X - bdbdirlist= - for _vn in 4.8 48 4 5 5.3 ''; do - for _pfx in b lib ''; do - bdbdirlist="$bdbdirlist ${_pfx}db${_vn}" - done - done - for searchpath in $bdbdirlist ''; do - test -n "${searchpath}" && searchpath="${searchpath}/" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include <${searchpath}db_cxx.h> - ]],[[ - #if !((DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 8) || DB_VERSION_MAJOR > 4) - #error "failed to find bdb 4.8+" - #endif - ]])],[ - if test "$bdbpath" = "X"; then - bdbpath="${searchpath}" - fi - ],[ - continue - ]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include <${searchpath}db_cxx.h> - ]],[[ - #if !(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8) - #error "failed to find bdb 4.8" - #endif - ]])],[ - bdb48path="${searchpath}" - break - ],[]) - done - if test "$bdbpath" = "X"; then - use_bdb=no - AC_MSG_RESULT([no]) - AC_MSG_WARN([libdb_cxx headers missing]) - AC_MSG_WARN(AC_PACKAGE_NAME[ requires this library for BDB (legacy) wallet support]) - AC_MSG_WARN([Passing --without-bdb will suppress this warning]) - elif test "$bdb48path" = "X"; then - BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx) - AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[ - AC_MSG_WARN([Found Berkeley DB other than 4.8]) - AC_MSG_WARN([BDB (legacy) wallets opened by this build will not be portable!]) - use_bdb=yes - ],[ - AC_MSG_WARN([Found Berkeley DB other than 4.8]) - AC_MSG_WARN([BDB (legacy) wallets opened by this build would not be portable!]) - AC_MSG_WARN([If this is intended, pass --with-incompatible-bdb]) - AC_MSG_WARN([Passing --without-bdb will suppress this warning]) - use_bdb=no - ]) - else - BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb48path}],db_cxx) - bdbpath="${bdb48path}" - use_bdb=yes - fi - else - BDB_CPPFLAGS=${BDB_CFLAGS} - fi - AC_SUBST(BDB_CPPFLAGS) - - if test "$use_bdb" = "no"; then - use_bdb=no - elif test "$BDB_LIBS" = ""; then - # TODO: Ideally this could find the library version and make sure it matches the headers being used - for searchlib in db_cxx-4.8 db_cxx db4_cxx; do - AC_CHECK_LIB([$searchlib],[main],[ - BDB_LIBS="-l${searchlib}" - break - ]) - done - if test "$BDB_LIBS" = ""; then - AC_MSG_WARN([libdb_cxx headers missing]) - AC_MSG_WARN(AC_PACKAGE_NAME[ requires this library for BDB (legacy) wallet support]) - AC_MSG_WARN([Passing --without-bdb will suppress this warning]) - fi - fi - if test "$use_bdb" != "no"; then - AC_DEFINE([USE_BDB], [1], [Define if BDB support should be compiled in]) - use_bdb=yes - fi -]) diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4 deleted file mode 100644 index 2538c920..00000000 --- a/build-aux/m4/bitcoin_qt.m4 +++ /dev/null @@ -1,397 +0,0 @@ -dnl Copyright (c) 2013-2016 The Bitcoin Core developers -dnl Distributed under the MIT software license, see the accompanying -dnl file COPYING or http://www.opensource.org/licenses/mit-license.php. - -dnl Helper for cases where a qt dependency is not met. -dnl Output: If qt version is auto, set bitcoin_enable_qt to false. Else, exit. -AC_DEFUN([COORDINATE_QT_FAIL],[ - if test "$coordinate_qt_want_version" = "auto" && test "$coordinate_qt_force" != "yes"; then - if test "$bitcoin_enable_qt" != "no"; then - AC_MSG_WARN([$1; coordinate-qt frontend will not be built]) - fi - bitcoin_enable_qt=no - bitcoin_enable_qt_test=no - else - AC_MSG_ERROR([$1]) - fi -]) - -AC_DEFUN([COORDINATE_QT_CHECK],[ - if test "$bitcoin_enable_qt" != "no" && test "$coordinate_qt_want_version" != "no"; then - true - $1 - else - true - $2 - fi -]) - -dnl COORDINATE_QT_PATH_PROGS([FOO], [foo foo2], [/path/to/search/first], [continue if missing]) -dnl Helper for finding the path of programs needed for Qt. -dnl Inputs: $1: Variable to be set -dnl Inputs: $2: List of programs to search for -dnl Inputs: $3: Look for $2 here before $PATH -dnl Inputs: $4: If "yes", don't fail if $2 is not found. -dnl Output: $1 is set to the path of $2 if found. $2 are searched in order. -AC_DEFUN([COORDINATE_QT_PATH_PROGS],[ - COORDINATE_QT_CHECK([ - if test "$3" != ""; then - AC_PATH_PROGS([$1], [$2], [], [$3]) - else - AC_PATH_PROGS([$1], [$2]) - fi - if test "$$1" = "" && test "$4" != "yes"; then - COORDINATE_QT_FAIL([$1 not found]) - fi - ]) -]) - -dnl Initialize qt input. -dnl This must be called before any other COORDINATE_QT* macros to ensure that -dnl input variables are set correctly. -dnl CAUTION: Do not use this inside of a conditional. -AC_DEFUN([COORDINATE_QT_INIT],[ - dnl enable qt support - AC_ARG_WITH([gui], - [AS_HELP_STRING([--with-gui@<:@=no|qt5|auto@:>@], - [build coordinate-qt GUI (default=auto)])], - [ - coordinate_qt_want_version=$withval - if test "$coordinate_qt_want_version" = "yes"; then - coordinate_qt_force=yes - coordinate_qt_want_version=auto - fi - ], - [coordinate_qt_want_version=auto]) - - AS_IF([test "$with_gui" = "qt5_debug"], - [AS_CASE([$host], - [*darwin*], [qt_lib_suffix=_debug], - [qt_lib_suffix= ]); coordinate_qt_want_version=qt5], - [qt_lib_suffix= ]) - - AS_CASE([$host], [*android*], [qt_lib_suffix=_$ANDROID_ARCH]) - - AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], []) - AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], []) - AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], []) - AC_ARG_WITH([qt-translationdir],[AS_HELP_STRING([--with-qt-translationdir=PLUGIN_DIR],[specify qt translation path (overridden by pkgconfig)])], [qt_translation_path=$withval], []) - AC_ARG_WITH([qt-bindir],[AS_HELP_STRING([--with-qt-bindir=BIN_DIR],[specify qt bin path])], [qt_bin_path=$withval], []) - - AC_ARG_WITH([qtdbus], - [AS_HELP_STRING([--with-qtdbus], - [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 "$use_dbus" != "yes"; then - use_dbus=no - fi - ;; - esac - - AC_SUBST(QT_TRANSLATION_DIR,$qt_translation_path) -]) - -dnl Find Qt libraries and includes. -dnl -dnl COORDINATE_QT_CONFIGURE([MINIMUM-VERSION]) -dnl -dnl Outputs: See _COORDINATE_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([COORDINATE_QT_CONFIGURE],[ - qt_version=">= $1" - qt_lib_prefix="Qt5" - COORDINATE_QT_CHECK([_COORDINATE_QT_FIND_LIBS]) - - dnl This is ugly and complicated. Yuck. Works as follows: - dnl We check a header to find out whether Qt is built statically. - dnl When Qt is built statically, some plugins must be linked into - dnl the final binary as well. _COORDINATE_QT_CHECK_STATIC_PLUGIN does - dnl a quick link-check and appends the results to QT_LIBS. - COORDINATE_QT_CHECK([ - TEMP_CPPFLAGS=$CPPFLAGS - TEMP_CXXFLAGS=$CXXFLAGS - CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS" - CXXFLAGS="$PIC_FLAGS $CORE_CXXFLAGS $CXXFLAGS" - _COORDINATE_QT_IS_STATIC - if test "$bitcoin_cv_static_qt" = "yes"; then - _COORDINATE_QT_CHECK_STATIC_LIBS - - if test "$qt_plugin_path" != ""; then - if test -d "$qt_plugin_path/platforms"; then - QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms" - fi - if test -d "$qt_plugin_path/styles"; then - QT_LIBS="$QT_LIBS -L$qt_plugin_path/styles" - fi - if test -d "$qt_plugin_path/accessible"; then - QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible" - fi - if test -d "$qt_plugin_path/platforms/android"; then - QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms/android -lqtfreetype -lEGL" - fi - fi - - AC_DEFINE([QT_STATICPLUGIN], [1], [Define this symbol if qt plugins are static]) - if test "$TARGET_OS" != "android"; then - _COORDINATE_QT_CHECK_STATIC_PLUGIN([QMinimalIntegrationPlugin], [-lqminimal]) - AC_DEFINE([QT_QPA_PLATFORM_MINIMAL], [1], [Define this symbol if the minimal qt platform exists]) - fi - if test "$TARGET_OS" = "windows"; then - dnl Linking against wtsapi32 is required. See #17749 and - dnl https://bugreports.qt.io/browse/QTBUG-27097. - AX_CHECK_LINK_FLAG([-lwtsapi32], [QT_LIBS="$QT_LIBS -lwtsapi32"], [AC_MSG_ERROR([could not link against -lwtsapi32])]) - _COORDINATE_QT_CHECK_STATIC_PLUGIN([QWindowsIntegrationPlugin], [-lqwindows]) - _COORDINATE_QT_CHECK_STATIC_PLUGIN([QWindowsVistaStylePlugin], [-lqwindowsvistastyle]) - AC_DEFINE([QT_QPA_PLATFORM_WINDOWS], [1], [Define this symbol if the qt platform is windows]) - elif test "$TARGET_OS" = "linux"; then - _COORDINATE_QT_CHECK_STATIC_PLUGIN([QXcbIntegrationPlugin], [-lqxcb]) - AC_DEFINE([QT_QPA_PLATFORM_XCB], [1], [Define this symbol if the qt platform is xcb]) - elif test "$TARGET_OS" = "darwin"; then - AX_CHECK_LINK_FLAG([-framework Carbon], [QT_LIBS="$QT_LIBS -framework Carbon"], [AC_MSG_ERROR(could not link against Carbon framework)]) - AX_CHECK_LINK_FLAG([-framework IOSurface], [QT_LIBS="$QT_LIBS -framework IOSurface"], [AC_MSG_ERROR(could not link against IOSurface framework)]) - AX_CHECK_LINK_FLAG([-framework Metal], [QT_LIBS="$QT_LIBS -framework Metal"], [AC_MSG_ERROR(could not link against Metal framework)]) - AX_CHECK_LINK_FLAG([-framework QuartzCore], [QT_LIBS="$QT_LIBS -framework QuartzCore"], [AC_MSG_ERROR(could not link against QuartzCore framework)]) - _COORDINATE_QT_CHECK_STATIC_PLUGIN([QCocoaIntegrationPlugin], [-lqcocoa]) - _COORDINATE_QT_CHECK_STATIC_PLUGIN([QMacStylePlugin], [-lqmacstyle]) - AC_DEFINE([QT_QPA_PLATFORM_COCOA], [1], [Define this symbol if the qt platform is cocoa]) - elif test "$TARGET_OS" = "android"; then - QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lplugins_platforms_qtforandroid${qt_lib_suffix} -ljnigraphics -landroid -lqtfreetype${qt_lib_suffix} $QT_LIBS" - AC_DEFINE([QT_QPA_PLATFORM_ANDROID], [1], [Define this symbol if the qt platform is android]) - fi - fi - CPPFLAGS=$TEMP_CPPFLAGS - CXXFLAGS=$TEMP_CXXFLAGS - ]) - - if test "$qt_bin_path" = ""; then - qt_bin_path="`$PKG_CONFIG --variable=host_bins ${qt_lib_prefix}Core 2>/dev/null`" - fi - - if test "$use_hardening" != "no"; then - COORDINATE_QT_CHECK([ - AC_MSG_CHECKING([whether -fPIE can be used with this Qt config]) - TEMP_CPPFLAGS=$CPPFLAGS - TEMP_CXXFLAGS=$CXXFLAGS - CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS" - CXXFLAGS="$PIE_FLAGS $CORE_CXXFLAGS $CXXFLAGS" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #ifndef QT_VERSION - # include - #endif - ]], - [[ - #if defined(QT_REDUCE_RELOCATIONS) - choke - #endif - ]])], - [ AC_MSG_RESULT([yes]); QT_PIE_FLAGS=$PIE_FLAGS ], - [ AC_MSG_RESULT([no]); QT_PIE_FLAGS=$PIC_FLAGS] - ) - CPPFLAGS=$TEMP_CPPFLAGS - CXXFLAGS=$TEMP_CXXFLAGS - ]) - else - COORDINATE_QT_CHECK([ - AC_MSG_CHECKING([whether -fPIC is needed with this Qt config]) - TEMP_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #ifndef QT_VERSION - # include - #endif - ]], - [[ - #if defined(QT_REDUCE_RELOCATIONS) - choke - #endif - ]])], - [ AC_MSG_RESULT([no])], - [ AC_MSG_RESULT([yes]); QT_PIE_FLAGS=$PIC_FLAGS] - ) - CPPFLAGS=$TEMP_CPPFLAGS - ]) - fi - - COORDINATE_QT_PATH_PROGS([MOC], [moc-qt5 moc5 moc], $qt_bin_path) - COORDINATE_QT_PATH_PROGS([UIC], [uic-qt5 uic5 uic], $qt_bin_path) - COORDINATE_QT_PATH_PROGS([RCC], [rcc-qt5 rcc5 rcc], $qt_bin_path) - COORDINATE_QT_PATH_PROGS([LRELEASE], [lrelease-qt5 lrelease5 lrelease], $qt_bin_path) - COORDINATE_QT_PATH_PROGS([LUPDATE], [lupdate-qt5 lupdate5 lupdate],$qt_bin_path, yes) - COORDINATE_QT_PATH_PROGS([LCONVERT], [lconvert-qt5 lconvert5 lconvert], $qt_bin_path, yes) - - MOC_DEFS='-DHAVE_CONFIG_H -I$(srcdir)' - case $host in - *darwin*) - COORDINATE_QT_CHECK([ - MOC_DEFS="${MOC_DEFS} -DQ_OS_MAC" - base_frameworks="-framework Foundation -framework AppKit" - AX_CHECK_LINK_FLAG([$base_frameworks], [QT_LIBS="$QT_LIBS $base_frameworks"], [AC_MSG_ERROR(could not find base frameworks)]) - ]) - ;; - *mingw*) - COORDINATE_QT_CHECK([ - AX_CHECK_LINK_FLAG([-mwindows], [QT_LDFLAGS="$QT_LDFLAGS -mwindows"], [AC_MSG_WARN([-mwindows linker support not detected])]) - ]) - esac - - - dnl enable qt support - AC_MSG_CHECKING([whether to build ]AC_PACKAGE_NAME[ GUI]) - COORDINATE_QT_CHECK([ - bitcoin_enable_qt=yes - bitcoin_enable_qt_test=yes - if test "$have_qt_test" = "no"; then - bitcoin_enable_qt_test=no - fi - bitcoin_enable_qt_dbus=no - if test "$use_dbus" != "no" && test "$have_qt_dbus" = "yes"; then - bitcoin_enable_qt_dbus=yes - fi - if test "$use_dbus" = "yes" && test "$have_qt_dbus" = "no"; then - AC_MSG_ERROR([libQtDBus not found. Install libQtDBus or remove --with-qtdbus.]) - fi - if test "$LUPDATE" = ""; then - AC_MSG_WARN([lupdate tool is required to update Qt translations.]) - fi - if test "$LCONVERT" = ""; then - AC_MSG_WARN([lconvert tool is required to update Qt translations.]) - fi - ],[ - bitcoin_enable_qt=no - ]) - if test $bitcoin_enable_qt = "yes"; then - AC_MSG_RESULT([$bitcoin_enable_qt ($qt_lib_prefix)]) - else - AC_MSG_RESULT([$bitcoin_enable_qt]) - fi - - AC_SUBST(QT_PIE_FLAGS) - AC_SUBST(QT_INCLUDES) - AC_SUBST(QT_LIBS) - AC_SUBST(QT_LDFLAGS) - AC_SUBST(QT_DBUS_INCLUDES) - AC_SUBST(QT_TEST_INCLUDES) - AC_SUBST(QT_SELECT, qt5) - AC_SUBST(MOC_DEFS) -]) - -dnl All macros below are internal and should _not_ be used from configure.ac. - -dnl Internal. Check if the linked version of Qt was built statically. -dnl -dnl _COORDINATE_QT_IS_STATIC -dnl --------------------- -dnl -dnl Requires: INCLUDES and LIBS must be populated as necessary. -dnl Output: bitcoin_cv_static_qt=yes|no -AC_DEFUN([_COORDINATE_QT_IS_STATIC],[ - AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #ifndef QT_VERSION - # include - #endif - ]], - [[ - #if !defined(QT_STATIC) - choke - #endif - ]])], - [bitcoin_cv_static_qt=yes], - [bitcoin_cv_static_qt=no]) - ]) -]) - -dnl Internal. Check if the link-requirements for a static plugin are met. -dnl -dnl _COORDINATE_QT_CHECK_STATIC_PLUGIN(PLUGIN, LIBRARIES) -dnl -------------------------------------------------- -dnl -dnl Requires: INCLUDES and LIBS must be populated as necessary. -dnl Inputs: $1: A static plugin name. -dnl Inputs: $2: The libraries that resolve $1. -dnl Output: QT_LIBS is prepended or configure exits. -AC_DEFUN([_COORDINATE_QT_CHECK_STATIC_PLUGIN], [ - AC_MSG_CHECKING([for $1 ($2)]) - CHECK_STATIC_PLUGINS_TEMP_LIBS="$LIBS" - LIBS="$2${qt_lib_suffix} $QT_LIBS $LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #include - Q_IMPORT_PLUGIN($1) - ]])], - [AC_MSG_RESULT([yes]); QT_LIBS="$2${qt_lib_suffix} $QT_LIBS"], - [AC_MSG_RESULT([no]); COORDINATE_QT_FAIL([$1 not found.])]) - LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS" -]) - -dnl Internal. Check Qt static libs with PKG_CHECK_MODULES. -dnl -dnl _COORDINATE_QT_CHECK_STATIC_LIBS -dnl ----------------------------- -dnl -dnl Outputs: QT_LIBS is prepended. -AC_DEFUN([_COORDINATE_QT_CHECK_STATIC_LIBS], [ - PKG_CHECK_MODULES([QT_ACCESSIBILITY], [${qt_lib_prefix}AccessibilitySupport${qt_lib_suffix}], [QT_LIBS="$QT_ACCESSIBILITY_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_DEVICEDISCOVERY], [${qt_lib_prefix}DeviceDiscoverySupport${qt_lib_suffix}], [QT_LIBS="$QT_DEVICEDISCOVERY_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_EDID], [${qt_lib_prefix}EdidSupport${qt_lib_suffix}], [QT_LIBS="$QT_EDID_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_EVENTDISPATCHER], [${qt_lib_prefix}EventDispatcherSupport${qt_lib_suffix}], [QT_LIBS="$QT_EVENTDISPATCHER_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_FB], [${qt_lib_prefix}FbSupport${qt_lib_suffix}], [QT_LIBS="$QT_FB_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_FONTDATABASE], [${qt_lib_prefix}FontDatabaseSupport${qt_lib_suffix}], [QT_LIBS="$QT_FONTDATABASE_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_THEME], [${qt_lib_prefix}ThemeSupport${qt_lib_suffix}], [QT_LIBS="$QT_THEME_LIBS $QT_LIBS"]) - if test "$TARGET_OS" = "linux"; then - PKG_CHECK_MODULES([QT_INPUT], [${qt_lib_prefix}InputSupport], [QT_LIBS="$QT_INPUT_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_XCBQPA], [${qt_lib_prefix}XcbQpa], [QT_LIBS="$QT_XCBQPA_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_XKBCOMMON], [${qt_lib_prefix}XkbCommonSupport], [QT_LIBS="$QT_XKBCOMMON_LIBS $QT_LIBS"]) - elif test "$TARGET_OS" = "darwin"; then - PKG_CHECK_MODULES([QT_CLIPBOARD], [${qt_lib_prefix}ClipboardSupport${qt_lib_suffix}], [QT_LIBS="$QT_CLIPBOARD_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_GRAPHICS], [${qt_lib_prefix}GraphicsSupport${qt_lib_suffix}], [QT_LIBS="$QT_GRAPHICS_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"]) - elif test "$TARGET_OS" = "windows"; then - PKG_CHECK_MODULES([QT_WINDOWSUIAUTOMATION], [${qt_lib_prefix}WindowsUIAutomationSupport${qt_lib_suffix}], [QT_LIBS="$QT_WINDOWSUIAUTOMATION_LIBS $QT_LIBS"]) - elif test "$TARGET_OS" = "android"; then - PKG_CHECK_MODULES([QT_EGL], [${qt_lib_prefix}EglSupport${qt_lib_suffix}], [QT_LIBS="$QT_EGL_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"]) - fi -]) - -dnl Internal. Find Qt libraries using pkg-config. -dnl -dnl _COORDINATE_QT_FIND_LIBS -dnl --------------------- -dnl -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([_COORDINATE_QT_FIND_LIBS],[ - COORDINATE_QT_CHECK([ - PKG_CHECK_MODULES([QT_CORE], [${qt_lib_prefix}Core${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_CORE_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_CORE_LIBS $QT_LIBS"], - [COORDINATE_QT_FAIL([${qt_lib_prefix}Core${qt_lib_suffix} $qt_version not found])]) - ]) - COORDINATE_QT_CHECK([ - PKG_CHECK_MODULES([QT_GUI], [${qt_lib_prefix}Gui${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_GUI_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_GUI_LIBS $QT_LIBS"], - [COORDINATE_QT_FAIL([${qt_lib_prefix}Gui${qt_lib_suffix} $qt_version not found])]) - ]) - COORDINATE_QT_CHECK([ - PKG_CHECK_MODULES([QT_WIDGETS], [${qt_lib_prefix}Widgets${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_WIDGETS_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_WIDGETS_LIBS $QT_LIBS"], - [COORDINATE_QT_FAIL([${qt_lib_prefix}Widgets${qt_lib_suffix} $qt_version not found])]) - ]) - COORDINATE_QT_CHECK([ - PKG_CHECK_MODULES([QT_NETWORK], [${qt_lib_prefix}Network${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_NETWORK_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_NETWORK_LIBS $QT_LIBS"], - [COORDINATE_QT_FAIL([${qt_lib_prefix}Network${qt_lib_suffix} $qt_version not found])]) - ]) - - COORDINATE_QT_CHECK([ - PKG_CHECK_MODULES([QT_TEST], [${qt_lib_prefix}Test${qt_lib_suffix} $qt_version], [QT_TEST_INCLUDES="$QT_TEST_CFLAGS"; have_qt_test=yes], [have_qt_test=no]) - if test "$use_dbus" != "no"; 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 - ]) -]) diff --git a/build-aux/m4/bitcoin_runtime_lib.m4 b/build-aux/m4/bitcoin_runtime_lib.m4 deleted file mode 100644 index 1a6922de..00000000 --- a/build-aux/m4/bitcoin_runtime_lib.m4 +++ /dev/null @@ -1,42 +0,0 @@ -# On some platforms clang builtin implementations -# require compiler-rt as a runtime library to use. -# -# See: -# - https://bugs.llvm.org/show_bug.cgi?id=28629 - -m4_define([_CHECK_RUNTIME_testbody], [[ - bool f(long long x, long long y, long long* p) - { - return __builtin_mul_overflow(x, y, p); - } - int main() { return 0; } -]]) - -AC_DEFUN([CHECK_RUNTIME_LIB], [ - - AC_LANG_PUSH([C++]) - - AC_MSG_CHECKING([for __builtin_mul_overflow]) - AC_LINK_IFELSE( - [AC_LANG_SOURCE([_CHECK_RUNTIME_testbody])], - [ - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_BUILTIN_MUL_OVERFLOW], [1], [Define if you have a working __builtin_mul_overflow]) - ], - [ - ax_check_save_flags="$LDFLAGS" - LDFLAGS="$LDFLAGS --rtlib=compiler-rt -lgcc_s" - AC_LINK_IFELSE( - [AC_LANG_SOURCE([_CHECK_RUNTIME_testbody])], - [ - AC_MSG_RESULT([yes, with additional linker flags]) - RUNTIME_LDFLAGS="--rtlib=compiler-rt -lgcc_s" - AC_DEFINE([HAVE_BUILTIN_MUL_OVERFLOW], [1], [Define if you have a working __builtin_mul_overflow]) - ], - [AC_MSG_RESULT([no])]) - LDFLAGS="$ax_check_save_flags" - ]) - - AC_LANG_POP - AC_SUBST([RUNTIME_LDFLAGS]) -]) diff --git a/build-aux/m4/bitcoin_subdir_to_include.m4 b/build-aux/m4/bitcoin_subdir_to_include.m4 deleted file mode 100644 index 736270af..00000000 --- a/build-aux/m4/bitcoin_subdir_to_include.m4 +++ /dev/null @@ -1,18 +0,0 @@ -dnl Copyright (c) 2013-2014 The Bitcoin Core developers -dnl Distributed under the MIT software license, see the accompanying -dnl file COPYING or http://www.opensource.org/licenses/mit-license.php. - -dnl BITCOIN_SUBDIR_TO_INCLUDE([CPPFLAGS-VARIABLE-NAME],[SUBDIRECTORY-NAME],[HEADER-FILE]) -dnl SUBDIRECTORY-NAME must end with a path separator -AC_DEFUN([BITCOIN_SUBDIR_TO_INCLUDE],[ - if test "$2" = ""; then - AC_MSG_RESULT([default]) - else - echo "#include <$2$3.h>" >conftest.cpp - newinclpath=`${CXXCPP} ${CPPFLAGS} -M conftest.cpp 2>/dev/null | [ tr -d '\\n\\r\\\\' | sed -e 's/^.*[[:space:]:]\(\/[^[:space:]]*\)]$3[\.h[[:space:]].*$/\1/' -e t -e d`] - AC_MSG_RESULT([${newinclpath}]) - if test "${newinclpath}" != ""; then - eval "$1=\"\$$1\"' -I${newinclpath}'" - fi - fi -]) diff --git a/build-aux/m4/l_atomic.m4 b/build-aux/m4/l_atomic.m4 deleted file mode 100644 index 602b57fe..00000000 --- a/build-aux/m4/l_atomic.m4 +++ /dev/null @@ -1,58 +0,0 @@ -dnl Copyright (c) 2015 Tim Kosse -dnl Copying and distribution of this file, with or without modification, are -dnl permitted in any medium without royalty provided the copyright notice -dnl and this notice are preserved. This file is offered as-is, without any -dnl warranty. - -# Some versions of gcc/libstdc++ require linking with -latomic if -# using the C++ atomic library. -# -# Sourced from http://bugs.debian.org/797228 - -m4_define([_CHECK_ATOMIC_testbody], [[ - #include - #include - #include - - using namespace std::chrono_literals; - - int main() { - std::atomic lock{true}; - lock.exchange(false); - - std::atomic t{0s}; - t.store(2s); - - std::atomic a{}; - - int64_t v = 5; - int64_t r = a.fetch_add(v); - return static_cast(r); - } -]]) - -AC_DEFUN([CHECK_ATOMIC], [ - - AC_LANG_PUSH(C++) - TEMP_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" - - AC_MSG_CHECKING([whether std::atomic can be used without link library]) - - AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - LIBS="$LIBS -latomic" - AC_MSG_CHECKING([whether std::atomic needs -latomic]) - AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - AC_MSG_FAILURE([cannot figure out how to use std::atomic]) - ]) - ]) - - CXXFLAGS="$TEMP_CXXFLAGS" - AC_LANG_POP -]) diff --git a/build-aux/m4/l_socket.m4 b/build-aux/m4/l_socket.m4 deleted file mode 100644 index 38923a98..00000000 --- a/build-aux/m4/l_socket.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# Illumos/SmartOS requires linking with -lsocket if -# using getifaddrs & freeifaddrs - -m4_define([_CHECK_SOCKET_testbody], [[ - #include - #include - - int main() { - struct ifaddrs *ifaddr; - getifaddrs(&ifaddr); - freeifaddrs(ifaddr); - } -]]) - -AC_DEFUN([CHECK_SOCKET], [ - - AC_LANG_PUSH(C++) - - AC_MSG_CHECKING([whether ifaddrs funcs can be used without link library]) - - AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_SOCKET_testbody])],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - LIBS="$LIBS -lsocket" - AC_MSG_CHECKING([whether getifaddrs needs -lsocket]) - AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_SOCKET_testbody])],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - AC_MSG_FAILURE([cannot figure out how to use getifaddrs]) - ]) - ]) - - AC_LANG_POP -]) diff --git a/build_msvc/.gitignore b/build_msvc/.gitignore deleted file mode 100644 index 89afacdf..00000000 --- a/build_msvc/.gitignore +++ /dev/null @@ -1,30 +0,0 @@ -# Build directories -Debug/* -Release/* -.vs -packages/* -*/Obj -*/Debug -*/Release -*/x64 -*.vcxproj.user - -# .vcxproj files that are auto-generated by the msvc-autogen.py script. -libcoordinate_cli/libcoordinate_cli.vcxproj -libbitcoin_common/libbitcoin_common.vcxproj -libbitcoin_crypto/libbitcoin_crypto.vcxproj -libbitcoin_node/libbitcoin_node.vcxproj -libcoordinate_util/libcoordinate_util.vcxproj -libcoordinate_wallet_tool/libcoordinate_wallet_tool.vcxproj -libcoordinate_wallet/libcoordinate_wallet.vcxproj -libbitcoin_zmq/libbitcoin_zmq.vcxproj -bench_bitcoin/bench_bitcoin.vcxproj -libtest_util/libtest_util.vcxproj - -/bitcoin_config.h -/common.init.vcxproj - -*/Win32 -libcoordinate_qt/QtGeneratedFiles/* -test_coordinate-qt/QtGeneratedFiles/* -vcpkg_installed \ No newline at end of file diff --git a/build_msvc/README.md b/build_msvc/README.md deleted file mode 100644 index 9bc2b67b..00000000 --- a/build_msvc/README.md +++ /dev/null @@ -1,90 +0,0 @@ -Building Bitcoin Core with Visual Studio -======================================== - -Introduction ---------------------- -Visual Studio 2022 is minimum required to build Bitcoin Core. - -Solution and project files to build with `msbuild` or Visual Studio can be found in the `build_msvc` directory. - -To build Bitcoin Core from the command-line, it is sufficient to only install the [Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/) component. - -The "Desktop development with C++" workload must be installed as well. - -Building with Visual Studio is an alternative to the Linux based [cross-compiler build](../doc/build-windows.md). - - -Prerequisites ---------------------- -To build [dependencies](../doc/dependencies.md) (except for [Qt](#qt)), -the default approach is to use the [vcpkg](https://vcpkg.io) package manager from Microsoft: - -1. [Install](https://vcpkg.io/en/getting-started.html) vcpkg. - -2. By default, vcpkg makes both `release` and `debug` builds for each package. -To save build time and disk space, one could skip `debug` builds (example uses PowerShell): -```powershell - -Add-Content -Path "vcpkg\triplets\x64-windows-static.cmake" -Value "set(VCPKG_BUILD_TYPE release)" -``` - -Qt ---------------------- -To build Bitcoin Core with the GUI, a static build of Qt is required. - -1. Download a single ZIP archive of Qt source code from https://download.qt.io/official_releases/qt/ (e.g., [`qt-everywhere-opensource-src-5.15.10.zip`](https://download.qt.io/official_releases/qt/5.15/5.15.10/single/qt-everywhere-opensource-src-5.15.10.zip)), and expand it into a dedicated folder. The following instructions assume that this folder is `C:\dev\qt-source`. - -2. Open "x64 Native Tools Command Prompt for VS 2022", and input the following commands: -```cmd -cd C:\dev\qt-source -mkdir build -cd build -..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix C:\Qt_static -nmake -nmake install -``` - -One could speed up building with [`jom`](https://wiki.qt.io/Jom), a replacement for `nmake` which makes use of all CPU cores. - -To build Bitcoin Core without Qt, unload or disable the `coordinate-qt`, `libcoordinate_qt` and `test_coordinate-qt` projects. - - -Building ---------------------- -1. Use Python to generate `*.vcxproj` for the Visual Studio 2022 toolchain from Makefile: - -```cmd -python build_msvc\msvc-autogen.py -``` - -2. 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 specify a non-default path to a static Qt package directory, use the `QTBASEDIR` environment variable. - -3. To build from the command-line with the Visual Studio toolchain use: - -```cmd -msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -``` - -Alternatively, open the `build_msvc/bitcoin.sln` file in Visual Studio. - -Security ---------------------- -[Base address randomization](https://learn.microsoft.com/en-us/cpp/build/reference/dynamicbase-use-address-space-layout-randomization) is used to make Bitcoin Core more secure. When building Bitcoin using the `build_msvc` process base address randomization can be disabled by editing `common.init.vcproj` to change `RandomizedBaseAddress` from `true` to `false` and then rebuilding the project. - -To check if `coordinated` has `RandomizedBaseAddress` enabled or disabled run - -``` -.\dumpbin.exe /headers src/coordinated.exe -``` - -If is it enabled then in the output `Dynamic base` will be listed in the `DLL characteristics` under `OPTIONAL HEADER VALUES` as shown below - -``` - 8160 DLL characteristics - High Entropy Virtual Addresses - Dynamic base - NX compatible - Terminal Server Aware -``` - -This may not disable all stack randomization as versions of windows employ additional stack randomization protections. These protections must be turned off in the OS configuration. diff --git a/build_msvc/bench_bitcoin/bench_bitcoin.vcxproj.in b/build_msvc/bench_bitcoin/bench_bitcoin.vcxproj.in deleted file mode 100644 index 66837b60..00000000 --- a/build_msvc/bench_bitcoin/bench_bitcoin.vcxproj.in +++ /dev/null @@ -1,62 +0,0 @@ - - - - - {1125654E-E1B2-4431-8B5C-62EA9A2FEECB} - - - Application - $(SolutionDir)$(Platform)\$(Configuration)\ - - -@SOURCE_FILES@ - - - - {2b384fa8-9ee1-4544-93cb-0d733c25e8ce} - - - {7c87e378-df58-482e-aa2f-1bc129bc19ce} - - - {6190199c-6cf4-4dad-bfbd-93fa72a760c1} - - - {460fee33-1fe1-483f-b3bf-931ff8e969a5} - - - {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754} - - - {93b86837-b543-48a5-a89b-7c87abb77df2} - - - {792d487f-f14c-49fc-a9de-3fc150f31c3f} - - - {5724ba7d-a09a-4ba8-800b-c4c1561b3d69} - - - {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6} - - - {18430fef-6b61-4c53-b396-718e02850f1b} - - - {1e065f03-3566-47d0-8fa9-daa72b084e7d} - - - - - There was an error executing the raw bench header generation task. - - - - - - - - - - - \ No newline at end of file diff --git a/build_msvc/bitcoin.sln b/build_msvc/bitcoin.sln deleted file mode 100644 index 7049a4ec..00000000 --- a/build_msvc/bitcoin.sln +++ /dev/null @@ -1,162 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28803.452 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_consensus", "libbitcoin_consensus\libbitcoin_consensus.vcxproj", "{2B384FA8-9EE1-4544-93CB-0D733C25E8CE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coordinated", "coordinated\coordinated.vcxproj", "{D4513DDF-6013-44DC-ADCC-12EAF6D1F038}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcoordinate_util", "libcoordinate_util\libcoordinate_util.vcxproj", "{B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_common", "libbitcoin_common\libbitcoin_common.vcxproj", "{7C87E378-DF58-482E-AA2F-1BC129BC19CE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_crypto", "libbitcoin_crypto\libbitcoin_crypto.vcxproj", "{6190199C-6CF4-4DAD-BFBD-93FA72A760C1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_node", "libbitcoin_node\libbitcoin_node.vcxproj", "{460FEE33-1FE1-483F-B3BF-931FF8E969A5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunivalue", "libunivalue\libunivalue.vcxproj", "{5724BA7D-A09A-4BA8-800B-C4C1561B3D69}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcoordinate_wallet", "libcoordinate_wallet\libcoordinate_wallet.vcxproj", "{93B86837-B543-48A5-A89B-7C87ABB77DF2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_zmq", "libbitcoin_zmq\libbitcoin_zmq.vcxproj", "{792D487F-F14C-49FC-A9DE-3FC150F31C3F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_bitcoin", "test_bitcoin\test_bitcoin.vcxproj", "{A56B73DB-D46D-4882-8374-1FE3FFA08F07}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcoordinate_cli", "libcoordinate_cli\libcoordinate_cli.vcxproj", "{0667528C-D734-4009-ADF9-C0D6C4A5A5A6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coordinate-cli", "coordinate-cli\coordinate-cli.vcxproj", "{0B2D7431-F876-4A58-87BF-F748338CD3BF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bench_bitcoin", "bench_bitcoin\bench_bitcoin.vcxproj", "{1125654E-E1B2-4431-8B5C-62EA9A2FEECB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coordinate-tx", "coordinate-tx\coordinate-tx.vcxproj", "{D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coordinate-util", "coordinate-util\coordinate-util.vcxproj", "{57A04EC9-542A-4E40-83D0-AC3BE1F36805}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coordinate-wallet", "coordinate-wallet\coordinate-wallet.vcxproj", "{84DE8790-EDE3-4483-81AC-C32F15E861F4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcoordinate_wallet_tool", "libcoordinate_wallet_tool\libcoordinate_wallet_tool.vcxproj", "{F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsecp256k1", "libsecp256k1\libsecp256k1.vcxproj", "{BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libleveldb", "libleveldb\libleveldb.vcxproj", "{18430FEF-6B61-4C53-B396-718E02850F1B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcoordinate_qt", "libcoordinate_qt\libcoordinate_qt.vcxproj", "{2B4ABFF8-D1FD-4845-88C9-1F3C0A6512BF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coordinate-qt", "coordinate-qt\coordinate-qt.vcxproj", "{7E99172D-7FF2-4CB6-B736-AC9B76ED412A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtest_util", "libtest_util\libtest_util.vcxproj", "{868474FD-35F6-4400-8EED-30A33E7521D4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_coordinate-qt", "test_coordinate-qt\test_coordinate-qt.vcxproj", "{51201D5E-D939-4854-AE9D-008F03FF518E}" -EndProject -Project("{542007E3-BE0D-4B0D-A6B0-AA8813E2558D}") = "libminisketch", "libminisketch\libminisketch.vcxproj", "{542007E3-BE0D-4B0D-A6B0-AA8813E2558D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Debug|x64.ActiveCfg = Debug|x64 - {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Debug|x64.Build.0 = Debug|x64 - {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Release|x64.ActiveCfg = Release|x64 - {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Release|x64.Build.0 = Release|x64 - {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Debug|x64.ActiveCfg = Debug|x64 - {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Debug|x64.Build.0 = Debug|x64 - {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Release|x64.ActiveCfg = Release|x64 - {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Release|x64.Build.0 = Release|x64 - {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Debug|x64.ActiveCfg = Debug|x64 - {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Debug|x64.Build.0 = Debug|x64 - {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Release|x64.ActiveCfg = Release|x64 - {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Release|x64.Build.0 = Release|x64 - {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Debug|x64.ActiveCfg = Debug|x64 - {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Debug|x64.Build.0 = Debug|x64 - {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Release|x64.ActiveCfg = Release|x64 - {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Release|x64.Build.0 = Release|x64 - {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Debug|x64.ActiveCfg = Debug|x64 - {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Debug|x64.Build.0 = Debug|x64 - {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Release|x64.ActiveCfg = Release|x64 - {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Release|x64.Build.0 = Release|x64 - {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Debug|x64.ActiveCfg = Debug|x64 - {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Debug|x64.Build.0 = Debug|x64 - {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Release|x64.ActiveCfg = Release|x64 - {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Release|x64.Build.0 = Release|x64 - {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Debug|x64.ActiveCfg = Debug|x64 - {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Debug|x64.Build.0 = Debug|x64 - {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Release|x64.ActiveCfg = Release|x64 - {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Release|x64.Build.0 = Release|x64 - {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Debug|x64.ActiveCfg = Debug|x64 - {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Debug|x64.Build.0 = Debug|x64 - {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Release|x64.ActiveCfg = Release|x64 - {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Release|x64.Build.0 = Release|x64 - {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Debug|x64.ActiveCfg = Debug|x64 - {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Debug|x64.Build.0 = Debug|x64 - {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Release|x64.ActiveCfg = Release|x64 - {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Release|x64.Build.0 = Release|x64 - {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Debug|x64.ActiveCfg = Debug|x64 - {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Debug|x64.Build.0 = Debug|x64 - {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Release|x64.ActiveCfg = Release|x64 - {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Release|x64.Build.0 = Release|x64 - {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Debug|x64.ActiveCfg = Debug|x64 - {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Debug|x64.Build.0 = Debug|x64 - {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Release|x64.ActiveCfg = Release|x64 - {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Release|x64.Build.0 = Release|x64 - {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Debug|x64.ActiveCfg = Debug|x64 - {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Debug|x64.Build.0 = Debug|x64 - {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Release|x64.ActiveCfg = Release|x64 - {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Release|x64.Build.0 = Release|x64 - {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Debug|x64.ActiveCfg = Debug|x64 - {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Debug|x64.Build.0 = Debug|x64 - {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Release|x64.ActiveCfg = Release|x64 - {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Release|x64.Build.0 = Release|x64 - {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Debug|x64.ActiveCfg = Debug|x64 - {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Debug|x64.Build.0 = Debug|x64 - {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Release|x64.ActiveCfg = Release|x64 - {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Release|x64.Build.0 = Release|x64 - {57A04EC9-542A-4E40-83D0-AC3BE1F36805}.Debug|x64.ActiveCfg = Debug|x64 - {57A04EC9-542A-4E40-83D0-AC3BE1F36805}.Debug|x64.Build.0 = Debug|x64 - {57A04EC9-542A-4E40-83D0-AC3BE1F36805}.Release|x64.ActiveCfg = Release|x64 - {57A04EC9-542A-4E40-83D0-AC3BE1F36805}.Release|x64.Build.0 = Release|x64 - {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Debug|x64.ActiveCfg = Debug|x64 - {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Debug|x64.Build.0 = Debug|x64 - {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Release|x64.ActiveCfg = Release|x64 - {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Release|x64.Build.0 = Release|x64 - {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Debug|x64.ActiveCfg = Debug|x64 - {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Debug|x64.Build.0 = Debug|x64 - {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Release|x64.ActiveCfg = Release|x64 - {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Release|x64.Build.0 = Release|x64 - {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Debug|x64.ActiveCfg = Debug|x64 - {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Debug|x64.Build.0 = Debug|x64 - {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Release|x64.ActiveCfg = Release|x64 - {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Release|x64.Build.0 = Release|x64 - {18430FEF-6B61-4C53-B396-718E02850F1B}.Debug|x64.ActiveCfg = Debug|x64 - {18430FEF-6B61-4C53-B396-718E02850F1B}.Debug|x64.Build.0 = Debug|x64 - {18430FEF-6B61-4C53-B396-718E02850F1B}.Release|x64.ActiveCfg = Release|x64 - {18430FEF-6B61-4C53-B396-718E02850F1B}.Release|x64.Build.0 = Release|x64 - {2B4ABFF8-D1FD-4845-88C9-1F3C0A6512BF}.Debug|x64.ActiveCfg = Debug|x64 - {2B4ABFF8-D1FD-4845-88C9-1F3C0A6512BF}.Debug|x64.Build.0 = Debug|x64 - {2B4ABFF8-D1FD-4845-88C9-1F3C0A6512BF}.Release|x64.ActiveCfg = Release|x64 - {2B4ABFF8-D1FD-4845-88C9-1F3C0A6512BF}.Release|x64.Build.0 = Release|x64 - {7E99172D-7FF2-4CB6-B736-AC9B76ED412A}.Debug|x64.ActiveCfg = Debug|x64 - {7E99172D-7FF2-4CB6-B736-AC9B76ED412A}.Debug|x64.Build.0 = Debug|x64 - {7E99172D-7FF2-4CB6-B736-AC9B76ED412A}.Release|x64.ActiveCfg = Release|x64 - {7E99172D-7FF2-4CB6-B736-AC9B76ED412A}.Release|x64.Build.0 = Release|x64 - {868474FD-35F6-4400-8EED-30A33E7521D4}.Debug|x64.ActiveCfg = Debug|x64 - {868474FD-35F6-4400-8EED-30A33E7521D4}.Debug|x64.Build.0 = Debug|x64 - {868474FD-35F6-4400-8EED-30A33E7521D4}.Release|x64.ActiveCfg = Release|x64 - {868474FD-35F6-4400-8EED-30A33E7521D4}.Release|x64.Build.0 = Release|x64 - {51201D5E-D939-4854-AE9D-008F03FF518E}.Debug|x64.ActiveCfg = Debug|x64 - {51201D5E-D939-4854-AE9D-008F03FF518E}.Debug|x64.Build.0 = Debug|x64 - {51201D5E-D939-4854-AE9D-008F03FF518E}.Release|x64.ActiveCfg = Release|x64 - {51201D5E-D939-4854-AE9D-008F03FF518E}.Release|x64.Build.0 = Release|x64 - {542007E3-BE0D-4B0D-A6B0-AA8813E2558D}.Debug|x64.ActiveCfg = Debug|x64 - {542007E3-BE0D-4B0D-A6B0-AA8813E2558D}.Debug|x64.Build.0 = Debug|x64 - {542007E3-BE0D-4B0D-A6B0-AA8813E2558D}.Release|x64.ActiveCfg = Release|x64 - {542007E3-BE0D-4B0D-A6B0-AA8813E2558D}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {58AAB032-7274-49BD-845E-5EF4DBB69B70} - EndGlobalSection -EndGlobal diff --git a/build_msvc/bitcoin_config.h.in b/build_msvc/bitcoin_config.h.in deleted file mode 100644 index 17166474..00000000 --- a/build_msvc/bitcoin_config.h.in +++ /dev/null @@ -1,152 +0,0 @@ -// 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. - -#ifndef BITCOIN_BITCOIN_CONFIG_H -#define BITCOIN_BITCOIN_CONFIG_H - -/* Version Build */ -#define CLIENT_VERSION_BUILD $ - -/* Version is release */ -#define CLIENT_VERSION_IS_RELEASE $ - -/* Major version */ -#define CLIENT_VERSION_MAJOR $ - -/* Minor version */ -#define CLIENT_VERSION_MINOR $ - -/* Copyright holder(s) before %s replacement */ -#define COPYRIGHT_HOLDERS "The %s developers" - -/* Copyright holder(s) */ -#define COPYRIGHT_HOLDERS_FINAL "The Bitcoin Core developers" - -/* Replacement for %s in copyright holders string */ -#define COPYRIGHT_HOLDERS_SUBSTITUTION "Bitcoin Core" - -/* Copyright year */ -#define COPYRIGHT_YEAR $ - -/* Define to 1 to enable wallet functions */ -#define ENABLE_WALLET 1 - -/* Define to 1 to enable BDB wallet */ -#define USE_BDB 1 - -/* Define to 1 to enable SQLite wallet */ -#define USE_SQLITE 1 - -/* Define this symbol to enable ZMQ functions */ -#define ENABLE_ZMQ 1 - -/* define if external signer support is enabled (requires Boost::Process) */ -#define ENABLE_EXTERNAL_SIGNER /**/ - -/* Define to 1 if you have the declaration of `be16toh', and to 0 if you - don't. */ -#define HAVE_DECL_BE16TOH 0 - -/* Define to 1 if you have the declaration of `be32toh', and to 0 if you - don't. */ -#define HAVE_DECL_BE32TOH 0 - -/* Define to 1 if you have the declaration of `be64toh', and to 0 if you - don't. */ -#define HAVE_DECL_BE64TOH 0 - -/* Define to 1 if you have the declaration of `bswap_16', and to 0 if you - don't. */ -#define HAVE_DECL_BSWAP_16 0 - -/* Define to 1 if you have the declaration of `bswap_32', and to 0 if you - don't. */ -#define HAVE_DECL_BSWAP_32 0 - -/* Define to 1 if you have the declaration of `bswap_64', and to 0 if you - don't. */ -#define HAVE_DECL_BSWAP_64 0 - -/* Define to 1 if you have the declaration of `fork', and to 0 if you don't. - */ -#define HAVE_DECL_FORK 0 - -/* Define to 1 if you have the declaration of `htobe16', and to 0 if you - don't. */ -#define HAVE_DECL_HTOBE16 0 - -/* Define to 1 if you have the declaration of `htobe32', and to 0 if you - don't. */ -#define HAVE_DECL_HTOBE32 0 - -/* Define to 1 if you have the declaration of `htobe64', and to 0 if you - don't. */ -#define HAVE_DECL_HTOBE64 0 - -/* Define to 1 if you have the declaration of `htole16', and to 0 if you - don't. */ -#define HAVE_DECL_HTOLE16 0 - -/* Define to 1 if you have the declaration of `htole32', and to 0 if you - don't. */ -#define HAVE_DECL_HTOLE32 0 - -/* Define to 1 if you have the declaration of `htole64', and to 0 if you - don't. */ -#define HAVE_DECL_HTOLE64 0 - -/* Define to 1 if you have the declaration of `le16toh', and to 0 if you - don't. */ -#define HAVE_DECL_LE16TOH 0 - -/* Define to 1 if you have the declaration of `le32toh', and to 0 if you - don't. */ -#define HAVE_DECL_LE32TOH 0 - -/* Define to 1 if you have the declaration of `le64toh', and to 0 if you - don't. */ -#define HAVE_DECL_LE64TOH 0 - -/* Define to 1 if you have the declaration of `setsid', and to 0 if you don't. - */ -#define HAVE_DECL_SETSID 0 - -/* Define if the dllexport attribute is supported. */ -#define HAVE_DLLEXPORT_ATTRIBUTE 1 - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "https://github.com/bitcoin/bitcoin/issues" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "Bitcoin Core" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING $ - -/* Define to the home page for this package. */ -#define PACKAGE_URL "https://bitcoincore.org/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION $ - -/* Define this symbol if the minimal qt platform exists */ -#define QT_QPA_PLATFORM_MINIMAL 1 - -/* Define this symbol if the qt platform is windows */ -#define QT_QPA_PLATFORM_WINDOWS 1 - -/* Define this symbol if qt plugins are static */ -#define QT_STATICPLUGIN 1 - -/* Windows Universal Platform constraints */ -#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) -/* Either a desktop application without API restrictions, or and older system - before these macros were defined. */ - -/* ::wsystem is available */ -#define HAVE_SYSTEM 1 - -#endif // !WINAPI_FAMILY || WINAPI_FAMILY_DESKTOP_APP - -#endif //BITCOIN_BITCOIN_CONFIG_H diff --git a/build_msvc/common.init.vcxproj.in b/build_msvc/common.init.vcxproj.in deleted file mode 100644 index 9cce5462..00000000 --- a/build_msvc/common.init.vcxproj.in +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - 16.0 - true - - - - true - true - true - true - true - $(Configuration) - 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) - - $(WindowsTargetPlatformVersion_10).0 - $(WindowsTargetPlatformVersion_10) - - - - - Release - x64 - - - Debug - x64 - - - - - false - false - @TOOLSET@ - Unicode - No - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - - true - true - @TOOLSET@ - Unicode - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - - - Disabled - false - true - true - true - MultiThreaded - None - - - false - false - /LTCG:OFF - - - - - - Disabled - false - _DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - /bigobj %(AdditionalOptions) - - - - - - Level3 - NotUsing - /utf-8 /Zc:__cplusplus /std:c++20 %(AdditionalOptions) - 4018;4244;4267;4715;4805 - true - _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;SECP256K1_STATIC;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\minisketch\include;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories) - - - Console - 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) - true - - - /ignore:4221 - - - - diff --git a/build_msvc/common.qt.init.vcxproj b/build_msvc/common.qt.init.vcxproj deleted file mode 100644 index cc8063e5..00000000 --- a/build_msvc/common.qt.init.vcxproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - - C:\Qt_static - $(QtBaseDir)\plugins - $(QtBaseDir)\lib - $(QtBaseDir)\include - $(QtIncludeDir);$(QtIncludeDir)\QtNetwork;$(QtIncludeDir)\QtCore;$(QtIncludeDir)\QtWidgets;$(QtIncludeDir)\QtGui; - .\QtGeneratedFiles\qt - $(QtBaseDir)\bin - $(QtPluginsLibraryDir)\platforms\qminimal.lib;$(QtPluginsLibraryDir)\platforms\qwindows.lib;$(QtPluginsLibraryDir)\styles\qwindowsvistastyle.lib;$(QtLibraryDir)\Qt5WindowsUIAutomationSupport.lib;$(QtLibraryDir)\qtfreetype.lib;$(QtLibraryDir)\qtharfbuzz.lib;$(QtLibraryDir)\qtlibpng.lib;$(QtLibraryDir)\qtpcre2.lib;$(QtLibraryDir)\Qt5AccessibilitySupport.lib;$(QtLibraryDir)\Qt5Core.lib;$(QtLibraryDir)\Qt5Concurrent.lib;$(QtLibraryDir)\Qt5EventDispatcherSupport.lib;$(QtLibraryDir)\Qt5FontDatabaseSupport.lib;$(QtLibraryDir)\Qt5Gui.lib;$(QtLibraryDir)\Qt5Network.lib;$(QtLibraryDir)\Qt5PlatformCompositorSupport.lib;$(QtLibraryDir)\Qt5ThemeSupport.lib;$(QtLibraryDir)\Qt5Widgets.lib;$(QtLibraryDir)\Qt5WinExtras.lib;$(QtLibraryDir)\qtmain.lib;Wtsapi32.lib;userenv.lib;netapi32.lib;imm32.lib;Dwmapi.lib;version.lib;winmm.lib;UxTheme.lib - $(QtPluginsLibraryDir)\platforms\qwindowsd.lib;$(QtPluginsLibraryDir)\platforms\qminimald.lib;$(QtPluginsLibraryDir)\styles\qwindowsvistastyled.lib;$(QtLibraryDir)\*d.lib;Wtsapi32.lib;crypt32.lib;userenv.lib;netapi32.lib;imm32.lib;Dwmapi.lib;version.lib;winmm.lib;UxTheme.lib - - - diff --git a/build_msvc/common.vcxproj b/build_msvc/common.vcxproj deleted file mode 100644 index 270c75e8..00000000 --- a/build_msvc/common.vcxproj +++ /dev/null @@ -1,12 +0,0 @@ - - -$(BuildDependsOn);CopyBuildArtifacts - - - - - - - - - diff --git a/build_msvc/coordinate-cli/coordinate-cli.vcxproj b/build_msvc/coordinate-cli/coordinate-cli.vcxproj deleted file mode 100644 index 2fb3fabd..00000000 --- a/build_msvc/coordinate-cli/coordinate-cli.vcxproj +++ /dev/null @@ -1,34 +0,0 @@ - - - - - {0B2D7431-F876-4A58-87BF-F748338CD3BF} - - - Application - $(SolutionDir)$(Platform)\$(Configuration)\ - - - - - - - {0667528c-d734-4009-adf9-c0d6c4a5a5a6} - - - {7c87e378-df58-482e-aa2f-1bc129bc19ce} - - - {6190199c-6cf4-4dad-bfbd-93fa72a760c1} - - - {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754} - - - {5724ba7d-a09a-4ba8-800b-c4c1561b3d69} - - - - - - diff --git a/build_msvc/coordinate-qt/coordinate-qt.vcxproj b/build_msvc/coordinate-qt/coordinate-qt.vcxproj deleted file mode 100644 index b3cf0140..00000000 --- a/build_msvc/coordinate-qt/coordinate-qt.vcxproj +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - {7E99172D-7FF2-4CB6-B736-AC9B76ED412A} - Application - $(SolutionDir)$(Platform)\$(Configuration)\ - - - - - - - - - {2b384fa8-9ee1-4544-93cb-0d733c25e8ce} - - - {0667528c-d734-4009-adf9-c0d6c4a5a5a6} - - - {7c87e378-df58-482e-aa2f-1bc129bc19ce} - - - {6190199c-6cf4-4dad-bfbd-93fa72a760c1} - - - {2b4abff8-d1fd-4845-88c9-1f3c0a6512bf} - - - {460fee33-1fe1-483f-b3bf-931ff8e969a5} - - - {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754} - - - {93b86837-b543-48a5-a89b-7c87abb77df2} - - - {792d487f-f14c-49fc-a9de-3fc150f31c3f} - - - {18430fef-6b61-4c53-b396-718e02850f1b} - - - {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6} - - - {5724ba7d-a09a-4ba8-800b-c4c1561b3d69} - - - - - - $(QtIncludes);%(AdditionalIncludeDirectories) - - - Windows - $(QtReleaseLibraries);%(AdditionalDependencies) - /ignore:4206 /LTCG:OFF - - - ..\..\src; - HAVE_CONFIG_H;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - - - - $(QtIncludes);%(AdditionalIncludeDirectories) - - - $(QtDebugLibraries);%(AdditionalDependencies) - /ignore:4206 - - - ..\..\src; - HAVE_CONFIG_H;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - - - - diff --git a/build_msvc/coordinate-tx/coordinate-tx.vcxproj b/build_msvc/coordinate-tx/coordinate-tx.vcxproj deleted file mode 100644 index 248e8bbd..00000000 --- a/build_msvc/coordinate-tx/coordinate-tx.vcxproj +++ /dev/null @@ -1,37 +0,0 @@ - - - - - {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF} - - - Application - $(SolutionDir)$(Platform)\$(Configuration)\ - - - - - - - {2b384fa8-9ee1-4544-93cb-0d733c25e8ce} - - - {7c87e378-df58-482e-aa2f-1bc129bc19ce} - - - {6190199c-6cf4-4dad-bfbd-93fa72a760c1} - - - {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754} - - - {5724ba7d-a09a-4ba8-800b-c4c1561b3d69} - - - {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6} - - - - - - diff --git a/build_msvc/coordinate-util/coordinate-util.vcxproj b/build_msvc/coordinate-util/coordinate-util.vcxproj deleted file mode 100644 index b0bbbb24..00000000 --- a/build_msvc/coordinate-util/coordinate-util.vcxproj +++ /dev/null @@ -1,37 +0,0 @@ - - - - - {57A04EC9-542A-4E40-83D0-AC3BE1F36805} - - - Application - $(SolutionDir)$(Platform)\$(Configuration)\ - - - - - - - {2b384fa8-9ee1-4544-93cb-0d733c25e8ce} - - - {7c87e378-df58-482e-aa2f-1bc129bc19ce} - - - {6190199c-6cf4-4dad-bfbd-93fa72a760c1} - - - {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754} - - - {5724ba7d-a09a-4ba8-800b-c4c1561b3d69} - - - {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6} - - - - - - diff --git a/build_msvc/coordinate-wallet/coordinate-wallet.vcxproj b/build_msvc/coordinate-wallet/coordinate-wallet.vcxproj deleted file mode 100644 index 6fc93a61..00000000 --- a/build_msvc/coordinate-wallet/coordinate-wallet.vcxproj +++ /dev/null @@ -1,46 +0,0 @@ - - - - - {84DE8790-EDE3-4483-81AC-C32F15E861F4} - - - Application - $(SolutionDir)$(Platform)\$(Configuration)\ - - - - - $(IntDir)init_coordinate-wallet.obj - - - - - {2b384fa8-9ee1-4544-93cb-0d733c25e8ce} - - - {7c87e378-df58-482e-aa2f-1bc129bc19ce} - - - {6190199c-6cf4-4dad-bfbd-93fa72a760c1} - - - {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754} - - - {93b86837-b543-48a5-a89b-7c87abb77df2} - - - {5724ba7d-a09a-4ba8-800b-c4c1561b3d69} - - - {f91ac55e-6f5e-4c58-9ac5-b40db7deef93} - - - {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6} - - - - - - diff --git a/build_msvc/coordinated/coordinated.vcxproj b/build_msvc/coordinated/coordinated.vcxproj deleted file mode 100644 index 4680f5a2..00000000 --- a/build_msvc/coordinated/coordinated.vcxproj +++ /dev/null @@ -1,88 +0,0 @@ - - - - - {D4513DDF-6013-44DC-ADCC-12EAF6D1F038} - - - Application - $(SolutionDir)$(Platform)\$(Configuration)\ - - - - - $(IntDir)init_coordinated.obj - - - - - {2b384fa8-9ee1-4544-93cb-0d733c25e8ce} - - - {7c87e378-df58-482e-aa2f-1bc129bc19ce} - - - {6190199c-6cf4-4dad-bfbd-93fa72a760c1} - - - {460fee33-1fe1-483f-b3bf-931ff8e969a5} - - - {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754} - - - {93b86837-b543-48a5-a89b-7c87abb77df2} - - - {792d487f-f14c-49fc-a9de-3fc150f31c3f} - - - {5724ba7d-a09a-4ba8-800b-c4c1561b3d69} - - - {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6} - - - {18430fef-6b61-4c53-b396-718e02850f1b} - - - - - - - ..\..\test\config.ini.in - ..\..\test\config.ini - - - - - - - - - - - - - - - - - - - - diff --git a/build_msvc/libbitcoin_common/libbitcoin_common.vcxproj.in b/build_msvc/libbitcoin_common/libbitcoin_common.vcxproj.in deleted file mode 100644 index 482e4333..00000000 --- a/build_msvc/libbitcoin_common/libbitcoin_common.vcxproj.in +++ /dev/null @@ -1,17 +0,0 @@ - - - - - {7C87E378-DF58-482E-AA2F-1BC129BC19CE} - - - StaticLibrary - - - -@SOURCE_FILES@ - - - - - diff --git a/build_msvc/libbitcoin_consensus/libbitcoin_consensus.vcxproj b/build_msvc/libbitcoin_consensus/libbitcoin_consensus.vcxproj deleted file mode 100644 index 95fdcdb7..00000000 --- a/build_msvc/libbitcoin_consensus/libbitcoin_consensus.vcxproj +++ /dev/null @@ -1,28 +0,0 @@ - - - - - {2B384FA8-9EE1-4544-93CB-0D733C25E8CE} - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build_msvc/libbitcoin_crypto/libbitcoin_crypto.vcxproj.in b/build_msvc/libbitcoin_crypto/libbitcoin_crypto.vcxproj.in deleted file mode 100644 index 32cb75bf..00000000 --- a/build_msvc/libbitcoin_crypto/libbitcoin_crypto.vcxproj.in +++ /dev/null @@ -1,16 +0,0 @@ - - - - - {6190199C-6CF4-4DAD-BFBD-93FA72A760C1} - - - StaticLibrary - - -@SOURCE_FILES@ - - - - - diff --git a/build_msvc/libbitcoin_node/libbitcoin_node.vcxproj.in b/build_msvc/libbitcoin_node/libbitcoin_node.vcxproj.in deleted file mode 100644 index 58e90dba..00000000 --- a/build_msvc/libbitcoin_node/libbitcoin_node.vcxproj.in +++ /dev/null @@ -1,19 +0,0 @@ - - - - - {460FEE33-1FE1-483F-B3BF-931FF8E969A5} - - - StaticLibrary - - -@SOURCE_FILES@ - - $(IntDir)wallet_init.obj - - - - - - \ No newline at end of file diff --git a/build_msvc/libbitcoin_zmq/libbitcoin_zmq.vcxproj.in b/build_msvc/libbitcoin_zmq/libbitcoin_zmq.vcxproj.in deleted file mode 100644 index e86eea81..00000000 --- a/build_msvc/libbitcoin_zmq/libbitcoin_zmq.vcxproj.in +++ /dev/null @@ -1,16 +0,0 @@ - - - - - {792D487F-F14C-49FC-A9DE-3FC150F31C3F} - - - StaticLibrary - - -@SOURCE_FILES@ - - - - - diff --git a/build_msvc/libcoordinate_cli/libcoordinate_cli.vcxproj.in b/build_msvc/libcoordinate_cli/libcoordinate_cli.vcxproj.in deleted file mode 100644 index 620df72a..00000000 --- a/build_msvc/libcoordinate_cli/libcoordinate_cli.vcxproj.in +++ /dev/null @@ -1,16 +0,0 @@ - - - - - {0667528C-D734-4009-ADF9-C0D6C4A5A5A6} - - - StaticLibrary - - -@SOURCE_FILES@ - - - - - diff --git a/build_msvc/libcoordinate_qt/libcoordinate_qt.vcxproj b/build_msvc/libcoordinate_qt/libcoordinate_qt.vcxproj deleted file mode 100644 index 3cb80b65..00000000 --- a/build_msvc/libcoordinate_qt/libcoordinate_qt.vcxproj +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - {2B4ABFF8-D1FD-4845-88C9-1F3C0A6512BF} - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - _AMD64_;%(PreprocessorDefinitions) - $(QtIncludes);$(GeneratedFilesOutDir)\..;%(AdditionalIncludeDirectories) - - - - - - _AMD64_;%(PreprocessorDefinitions) - $(QtIncludes);$(GeneratedFilesOutDir)\..;%(AdditionalIncludeDirectories) - - - - - - - - - - - - - - - - - There was an error executing the libcoordinate_qt moc code include generation task. - - - - - - - - - - There was an error executing the libcoordinate_qt moc header generation task. - - - - - - - - - - There was an error executing the libcoordinate_qt forms header generation task. - - - - - - - - - There was an error executing the libcoordinate_qt translation file generation task. - - - - - - - - There was an error executing the libcoordinate_qt resource code generation task. - - - - - - - - - - - - - - - moccode; - mocheader; - forms; - translation; - resource; - $(BuildDependsOn); - - - - - qtclean; - $(CleanDependsOn); - - - - diff --git a/build_msvc/libcoordinate_util/libcoordinate_util.vcxproj.in b/build_msvc/libcoordinate_util/libcoordinate_util.vcxproj.in deleted file mode 100644 index adf4fa03..00000000 --- a/build_msvc/libcoordinate_util/libcoordinate_util.vcxproj.in +++ /dev/null @@ -1,16 +0,0 @@ - - - - - {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754} - - - StaticLibrary - - -@SOURCE_FILES@ - - - - - diff --git a/build_msvc/libcoordinate_wallet/libcoordinate_wallet.vcxproj.in b/build_msvc/libcoordinate_wallet/libcoordinate_wallet.vcxproj.in deleted file mode 100644 index 613d5c71..00000000 --- a/build_msvc/libcoordinate_wallet/libcoordinate_wallet.vcxproj.in +++ /dev/null @@ -1,19 +0,0 @@ - - - - - {93B86837-B543-48A5-A89B-7C87ABB77DF2} - - - StaticLibrary - - - - - -@SOURCE_FILES@ - - - - - diff --git a/build_msvc/libcoordinate_wallet_tool/libcoordinate_wallet_tool.vcxproj.in b/build_msvc/libcoordinate_wallet_tool/libcoordinate_wallet_tool.vcxproj.in deleted file mode 100644 index 1a6b7b6b..00000000 --- a/build_msvc/libcoordinate_wallet_tool/libcoordinate_wallet_tool.vcxproj.in +++ /dev/null @@ -1,16 +0,0 @@ - - - - - {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93} - - - StaticLibrary - - -@SOURCE_FILES@ - - - - - diff --git a/build_msvc/libleveldb/libleveldb.vcxproj b/build_msvc/libleveldb/libleveldb.vcxproj deleted file mode 100644 index 2914eb2c..00000000 --- a/build_msvc/libleveldb/libleveldb.vcxproj +++ /dev/null @@ -1,61 +0,0 @@ - - - - - {18430FEF-6B61-4C53-B396-718E02850F1B} - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - HAVE_CRC32C=0;HAVE_SNAPPY=0;LEVELDB_IS_BIG_ENDIAN=0;_UNICODE;UNICODE;_CRT_NONSTDC_NO_DEPRECATE;LEVELDB_PLATFORM_WINDOWS;%(PreprocessorDefinitions) - 4244;4267 - ..\..\src\leveldb;..\..\src\leveldb\include;%(AdditionalIncludeDirectories) - - - - - - diff --git a/build_msvc/libminisketch/libminisketch.vcxproj b/build_msvc/libminisketch/libminisketch.vcxproj deleted file mode 100644 index b34593fe..00000000 --- a/build_msvc/libminisketch/libminisketch.vcxproj +++ /dev/null @@ -1,38 +0,0 @@ - - - - - {542007E3-BE0D-4B0D-A6B0-AA8813E2558D} - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - 4060;4065;4146;4244;4267;4554 - HAVE_CLMUL;DISABLE_DEFAULT_FIELDS;ENABLE_FIELD_32;%(PreprocessorDefinitions) - - - - - - diff --git a/build_msvc/libsecp256k1/libsecp256k1.vcxproj b/build_msvc/libsecp256k1/libsecp256k1.vcxproj deleted file mode 100644 index 777515aa..00000000 --- a/build_msvc/libsecp256k1/libsecp256k1.vcxproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - - {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6} - - - StaticLibrary - - - - - - - - - ENABLE_MODULE_RECOVERY;ENABLE_MODULE_EXTRAKEYS;ENABLE_MODULE_SCHNORRSIG;ENABLE_MODULE_ELLSWIFT;%(PreprocessorDefinitions) - USE_ASM_X86_64;%(UndefinePreprocessorDefinitions) - ..\..\src\secp256k1;%(AdditionalIncludeDirectories) - 4146;4244;4267;4334 - - - - - - diff --git a/build_msvc/libtest_util/libtest_util.vcxproj.in b/build_msvc/libtest_util/libtest_util.vcxproj.in deleted file mode 100644 index 64cfa82d..00000000 --- a/build_msvc/libtest_util/libtest_util.vcxproj.in +++ /dev/null @@ -1,17 +0,0 @@ - - - - - {868474FD-35F6-4400-8EED-30A33E7521D4} - - - StaticLibrary - - - -@SOURCE_FILES@ - - - - - diff --git a/build_msvc/libunivalue/libunivalue.vcxproj b/build_msvc/libunivalue/libunivalue.vcxproj deleted file mode 100644 index 0f13a572..00000000 --- a/build_msvc/libunivalue/libunivalue.vcxproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - - {5724BA7D-A09A-4BA8-800B-C4C1561B3D69} - - - StaticLibrary - - - - - - - - - - - diff --git a/build_msvc/msbuild/tasks/hexdump.targets b/build_msvc/msbuild/tasks/hexdump.targets deleted file mode 100644 index 12868a98..00000000 --- a/build_msvc/msbuild/tasks/hexdump.targets +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - outFileInfo.LastWriteTime) - { - using (Stream inStm = File.OpenRead(RawFilePath)) - { - using (StreamWriter sw = new StreamWriter(HeaderFilePath)) - { - sw.WriteLine(SourceHeader); - int count = 0; - int rawChar = inStm.ReadByte(); - while(rawChar != -1) - { - sw.Write("0x{0:x2}, ", rawChar); - count++; - if(count % 8 == 0) - { - sw.WriteLine(); - } - rawChar = inStm.ReadByte(); - } - sw.WriteLine(SourceFooter); - } - } - } -} -]]> - - - - \ No newline at end of file diff --git a/build_msvc/msbuild/tasks/replaceinfile.targets b/build_msvc/msbuild/tasks/replaceinfile.targets deleted file mode 100644 index 2ccb8b30..00000000 --- a/build_msvc/msbuild/tasks/replaceinfile.targets +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build_msvc/msvc-autogen.py b/build_msvc/msvc-autogen.py deleted file mode 100755 index bccf9aae..00000000 --- a/build_msvc/msvc-autogen.py +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2016-2022 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -import os -import re -import argparse -from shutil import copyfile - -SOURCE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src')) -DEFAULT_PLATFORM_TOOLSET = R'v143' - -libs = [ - 'libcoordinate_cli', - 'libbitcoin_common', - 'libbitcoin_crypto', - 'libbitcoin_node', - 'libcoordinate_util', - 'libcoordinate_wallet_tool', - 'libcoordinate_wallet', - 'libbitcoin_zmq', - 'bench_bitcoin', - 'libtest_util', -] - -ignore_list = [ -] - -lib_sources = {} - - -def parse_makefile(makefile): - with open(makefile, 'r', encoding='utf-8') as file: - current_lib = '' - for line in file.read().splitlines(): - if current_lib: - source = line.split()[0] - if source.endswith('.cpp') and not source.startswith('$') and source not in ignore_list: - source_filename = source.replace('/', '\\') - object_filename = source.replace('/', '_')[:-4] + ".obj" - lib_sources[current_lib].append((source_filename, object_filename)) - if not line.endswith('\\'): - current_lib = '' - continue - for lib in libs: - _lib = lib.replace('-', '_') - if re.search(_lib + '.*_SOURCES \\= \\\\', line): - current_lib = lib - lib_sources[current_lib] = [] - break - -def parse_config_into_btc_config(): - def find_between( s, first, last ): - try: - start = s.index( first ) + len( first ) - end = s.index( last, start ) - return s[start:end] - except ValueError: - return "" - - config_info = [] - with open(os.path.join(SOURCE_DIR,'../configure.ac'), encoding="utf8") as f: - for line in f: - if line.startswith("define"): - config_info.append(find_between(line, "(_", ")")) - - config_info = [c for c in config_info if not c.startswith("COPYRIGHT_HOLDERS")] - - config_dict = dict(item.split(", ") for item in config_info) - config_dict["PACKAGE_VERSION"] = f"\"{config_dict['CLIENT_VERSION_MAJOR']}.{config_dict['CLIENT_VERSION_MINOR']}.{config_dict['CLIENT_VERSION_BUILD']}\"" - version = config_dict["PACKAGE_VERSION"].strip('"') - config_dict["PACKAGE_STRING"] = f"\"Bitcoin Core {version}\"" - - with open(os.path.join(SOURCE_DIR,'../build_msvc/bitcoin_config.h.in'), "r", encoding="utf8") as template_file: - template = template_file.readlines() - - for index, line in enumerate(template): - header = "" - if line.startswith("#define"): - header = line.split(" ")[1] - if header in config_dict: - template[index] = line.replace("$", f"{config_dict[header]}") - - with open(os.path.join(SOURCE_DIR,'../build_msvc/bitcoin_config.h'), "w", encoding="utf8") as btc_config: - btc_config.writelines(template) - -def set_properties(vcxproj_filename, placeholder, content): - with open(vcxproj_filename + '.in', 'r', encoding='utf-8') as vcxproj_in_file: - with open(vcxproj_filename, 'w', encoding='utf-8') as vcxproj_file: - vcxproj_file.write(vcxproj_in_file.read().replace(placeholder, content)) - -def main(): - parser = argparse.ArgumentParser(description='Bitcoin-core msbuild configuration initialiser.') - parser.add_argument('-toolset', nargs='?', default=DEFAULT_PLATFORM_TOOLSET, - help='Optionally sets the msbuild platform toolset, e.g. v143 for Visual Studio 2022.' - ' default is %s.'%DEFAULT_PLATFORM_TOOLSET) - args = parser.parse_args() - set_properties(os.path.join(SOURCE_DIR, '../build_msvc/common.init.vcxproj'), '@TOOLSET@', args.toolset) - - for makefile_name in os.listdir(SOURCE_DIR): - if 'Makefile' in makefile_name: - parse_makefile(os.path.join(SOURCE_DIR, makefile_name)) - for key, value in lib_sources.items(): - vcxproj_filename = os.path.abspath(os.path.join(os.path.dirname(__file__), key, key + '.vcxproj')) - content = '' - for source_filename, object_filename in value: - content += ' \n' - content += ' $(IntDir)' + object_filename + '\n' - content += ' \n' - set_properties(vcxproj_filename, '@SOURCE_FILES@\n', content) - parse_config_into_btc_config() - copyfile(os.path.join(SOURCE_DIR,'../build_msvc/bitcoin_config.h'), os.path.join(SOURCE_DIR, 'config/bitcoin-config.h')) - -if __name__ == '__main__': - main() diff --git a/build_msvc/test_bitcoin/test_bitcoin.vcxproj b/build_msvc/test_bitcoin/test_bitcoin.vcxproj deleted file mode 100644 index 905934a1..00000000 --- a/build_msvc/test_bitcoin/test_bitcoin.vcxproj +++ /dev/null @@ -1,77 +0,0 @@ - - - - - {A56B73DB-D46D-4882-8374-1FE3FFA08F07} - - - Application - $(SolutionDir)$(Platform)\$(Configuration)\ - - - - - - - - - - - - - - {542007e3-be0d-4b0d-a6b0-aa8813e2558d} - - - {2b384fa8-9ee1-4544-93cb-0d733c25e8ce} - - - {0667528c-d734-4009-adf9-c0d6c4a5a5a6} - - - {7c87e378-df58-482e-aa2f-1bc129bc19ce} - - - {6190199c-6cf4-4dad-bfbd-93fa72a760c1} - - - {460fee33-1fe1-483f-b3bf-931ff8e969a5} - - - {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754} - - - {93b86837-b543-48a5-a89b-7c87abb77df2} - - - {792d487f-f14c-49fc-a9de-3fc150f31c3f} - - - {1e065f03-3566-47d0-8fa9-daa72b084e7d} - - - {5724ba7d-a09a-4ba8-800b-c4c1561b3d69} - - - {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6} - - - {18430fef-6b61-4c53-b396-718e02850f1b} - - - - - There was an error executing the JSON test header generation task. - - - - - - - - - - - - - diff --git a/build_msvc/test_coordinate-qt/test_coordinate-qt.vcxproj b/build_msvc/test_coordinate-qt/test_coordinate-qt.vcxproj deleted file mode 100644 index 132f1207..00000000 --- a/build_msvc/test_coordinate-qt/test_coordinate-qt.vcxproj +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - {51201D5E-D939-4854-AE9D-008F03FF518E} - Application - $(SolutionDir)$(Platform)\$(Configuration)\ - - - - - - $(IntDir)wallet_test_util.obj - - - - - - - - - $(IntDir)qt_test_util.obj - - - - - - - - - - - - - {2b384fa8-9ee1-4544-93cb-0d733c25e8ce} - - - {0667528c-d734-4009-adf9-c0d6c4a5a5a6} - - - {7c87e378-df58-482e-aa2f-1bc129bc19ce} - - - {6190199c-6cf4-4dad-bfbd-93fa72a760c1} - - - {2b4abff8-d1fd-4845-88c9-1f3c0a6512bf} - - - {460fee33-1fe1-483f-b3bf-931ff8e969a5} - - - {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754} - - - {93b86837-b543-48a5-a89b-7c87abb77df2} - - - {792d487f-f14c-49fc-a9de-3fc150f31c3f} - - - {1e065f03-3566-47d0-8fa9-daa72b084e7d} - - - {18430fef-6b61-4c53-b396-718e02850f1b} - - - {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6} - - - {5724ba7d-a09a-4ba8-800b-c4c1561b3d69} - - - - - - - - - ..\libcoordinate_qt\$(GeneratedFilesOutDir)\..\;$(QtIncludeDir)\QtTest;$(QtIncludes);%(AdditionalIncludeDirectories) - - - $(QtLibraryDir)\Qt5Test.lib;$(QtReleaseLibraries);%(AdditionalDependencies) - /ignore:4206 /LTCG:OFF - - - - - - ..\libcoordinate_qt\$(GeneratedFilesOutDir)\..\;$(QtIncludeDir)\QtTest;$(QtIncludes);%(AdditionalIncludeDirectories) - - - $(QtDebugLibraries);%(AdditionalDependencies) - /ignore:4206 - - - - - - - - - - - - - There was an error executing the test_coordinate-qt moc code generation task. - - - - - - - - - - - - - moccode; - $(BuildDependsOn); - - - - - QtTestCleanGeneratedFiles; - $(CleanDependsOn); - - - diff --git a/build_msvc/vcpkg.json b/build_msvc/vcpkg.json deleted file mode 100644 index 3557269b..00000000 --- a/build_msvc/vcpkg.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "bitcoin-core", - "version-string": "1", - "dependencies": [ - "berkeleydb", - "boost-multi-index", - "boost-process", - "boost-signals2", - "boost-test", - "sqlite3", - { - "name": "libevent", - "features": ["thread"] - }, - "zeromq" - ], - "builtin-baseline": "f14984af3738e69f197bf0e647a8dca12de92996", - "overrides": [ - { - "name": "libevent", - "version": "2.1.12#7" - } - ] -} diff --git a/ci/README.md b/ci/README.md index f89af329..377aae7f 100644 --- a/ci/README.md +++ b/ci/README.md @@ -9,15 +9,15 @@ If the repository is not a fresh git clone, you might have to clean files from p The ci needs to perform various sysadmin tasks such as installing packages or writing to the user's home directory. While it should be fine to run -the ci system locally on you development box, the ci scripts can generally be assumed to have received less review and +the ci system locally on your development box, the ci scripts can generally be assumed to have received less review and testing compared to other parts of the codebase. If you want to keep the work tree clean, you might want to run the ci system in a virtual machine with a Linux operating system of your choice. To allow for a wide range of tested environments, but also ensure reproducibility to some extent, the test stage -requires `bash`, `docker`, and `python3` to be installed. To install all requirements on Ubuntu, run +requires `bash`, `docker`, and `python3` to be installed. To run on different architectures than the host `qemu` is also required. To install all requirements on Ubuntu, run ``` -sudo apt install bash docker.io python3 +sudo apt install bash docker.io python3 qemu-user-static ``` It is recommended to run the ci system in a clean env. To run the test stage @@ -52,5 +52,5 @@ 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 +cached and reused when possible. Changes in the dependency-generator will trigger cache-invalidation and rebuilds as necessary. diff --git a/ci/lint/04_install.sh b/ci/lint/01_install.sh similarity index 66% rename from ci/lint/04_install.sh rename to ci/lint/01_install.sh index b1604063..a00d95da 100755 --- a/ci/lint/04_install.sh +++ b/ci/lint/01_install.sh @@ -1,24 +1,29 @@ #!/usr/bin/env bash # -# Copyright (c) 2018-2022 The Bitcoin Core developers +# Copyright (c) 2018-present 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 -export PATH=$PWD/ci/retry:$PATH +set -o errexit -o pipefail -o xtrace + +export CI_RETRY_EXE="/ci_retry --" + +pushd "/" ${CI_RETRY_EXE} apt-get update # Lint dependencies: +# - cargo (used to run the lint tests) # - curl/xz-utils (to install shellcheck) # - git (used in many lint scripts) # - gpg (used by verify-commits) -${CI_RETRY_EXE} apt-get install -y curl xz-utils git gpg +${CI_RETRY_EXE} apt-get install -y cargo curl xz-utils git gpg PYTHON_PATH="/python_build" if [ ! -d "${PYTHON_PATH}/bin" ]; then ( - ${CI_RETRY_EXE} git clone https://github.com/pyenv/pyenv.git + ${CI_RETRY_EXE} git clone --depth=1 https://github.com/pyenv/pyenv.git cd pyenv/plugins/python-build || exit 1 ./install.sh ) @@ -27,21 +32,28 @@ if [ ! -d "${PYTHON_PATH}/bin" ]; then libbz2-dev libreadline-dev libsqlite3-dev curl llvm \ libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \ clang - env CC=clang python-build "$(cat "./.python-version")" "${PYTHON_PATH}" + env CC=clang python-build "$(cat "/.python-version")" "${PYTHON_PATH}" fi export PATH="${PYTHON_PATH}/bin:${PATH}" command -v python3 python3 --version ${CI_RETRY_EXE} pip3 install \ - codespell==2.2.5 \ - flake8==6.1.0 \ - lief==0.13.2 \ + codespell==2.4.1 \ + lief==0.16.6 \ mypy==1.4.1 \ pyzmq==25.1.0 \ + ruff==0.5.5 \ vulture==2.6 SHELLCHECK_VERSION=v0.8.0 curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | \ tar --xz -xf - --directory /tmp/ mv "/tmp/shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/bin/ + +MLC_VERSION=v0.19.0 +MLC_BIN=mlc-x86_64-linux +curl -sL "https://github.com/becheran/mlc/releases/download/${MLC_VERSION}/${MLC_BIN}" -o "/usr/bin/mlc" +chmod +x /usr/bin/mlc + +popd || exit diff --git a/ci/lint/06_script.sh b/ci/lint/06_script.sh index ccde12a0..6d637c2a 100755 --- a/ci/lint/06_script.sh +++ b/ci/lint/06_script.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2018-2022 The Bitcoin Core developers +# Copyright (c) 2018-present 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,30 +8,15 @@ export LC_ALL=C set -ex -if [ -n "$LOCAL_BRANCH" ]; then - # To faithfully recreate CI linting locally, specify all commits on the current - # branch. - COMMIT_RANGE="$(git merge-base HEAD master)..HEAD" -elif [ -n "$CIRRUS_PR" ]; then - COMMIT_RANGE="HEAD~..HEAD" - echo - git log --no-merges --oneline "$COMMIT_RANGE" - echo - test/lint/commit-script-check.sh "$COMMIT_RANGE" -else - COMMIT_RANGE="SKIP_EMPTY_NOT_A_PR" +if [ -n "$CIRRUS_PR" ]; then + export COMMIT_RANGE="HEAD~..HEAD" + if [ "$(git rev-list -1 HEAD)" != "$(git rev-list -1 --merges HEAD)" ]; then + echo "Error: The top commit must be a merge commit, usually the remote 'pull/${PR_NUMBER}/merge' branch." + false + fi fi -export COMMIT_RANGE -# This only checks that the trees are pure subtrees, it is not doing a full -# check with -r to not have to fetch all the remotes. -test/lint/git-subtree-check.sh src/crypto/ctaes -test/lint/git-subtree-check.sh src/secp256k1 -test/lint/git-subtree-check.sh src/minisketch -test/lint/git-subtree-check.sh src/leveldb -test/lint/git-subtree-check.sh src/crc32c -test/lint/check-doc.py -test/lint/all-lint.py +RUST_BACKTRACE=1 cargo run --manifest-path "./test/lint/test_runner/Cargo.toml" if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; then # Sanity check only the last few commits to get notified of missing sigs, diff --git a/ci/lint/container-entrypoint.sh b/ci/lint/container-entrypoint.sh index e94a75e2..84e60be2 100755 --- a/ci/lint/container-entrypoint.sh +++ b/ci/lint/container-entrypoint.sh @@ -13,7 +13,7 @@ git config --global --add safe.directory /bitcoin export PATH="/python_build/bin:${PATH}" if [ -z "$1" ]; then - LOCAL_BRANCH=1 bash -ic "./ci/lint/06_script.sh" + bash -ic "./ci/lint/06_script.sh" else exec "$@" fi diff --git a/ci/lint_imagefile b/ci/lint_imagefile index 4136a9bf..b3238076 100644 --- a/ci/lint_imagefile +++ b/ci/lint_imagefile @@ -4,14 +4,15 @@ # See test/lint/README.md for usage. -FROM debian:bookworm +FROM mirror.gcr.io/ubuntu:24.04 ENV DEBIAN_FRONTEND=noninteractive ENV LC_ALL=C.UTF-8 +COPY ./ci/retry/retry /ci_retry COPY ./.python-version /.python-version COPY ./ci/lint/container-entrypoint.sh /entrypoint.sh -COPY ./ci/lint/04_install.sh /install.sh +COPY ./ci/lint/01_install.sh /install.sh RUN /install.sh && \ echo 'alias lint="./ci/lint/06_script.sh"' >> ~/.bashrc && \ diff --git a/ci/lint_run.sh b/ci/lint_run.sh new file mode 100755 index 00000000..6327c3c4 --- /dev/null +++ b/ci/lint_run.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# +# Copyright (c) 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 +set -o errexit -o pipefail -o xtrace + +# Only used in .cirrus.yml. Refer to test/lint/README.md on how to run locally. +export PATH="/python_build/bin:${PATH}" +./ci/lint/06_script.sh diff --git a/ci/lint_run_all.sh b/ci/lint_run_all.sh index b56ee0d3..427e24e1 100755 --- a/ci/lint_run_all.sh +++ b/ci/lint_run_all.sh @@ -1,12 +1,18 @@ #!/usr/bin/env bash # -# Copyright (c) 2019-2020 The Bitcoin Core developers +# Copyright (c) 2019-present 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 -set -o errexit; source ./ci/test/00_setup_env.sh -set -o errexit; source ./ci/lint/04_install.sh +# Only used in .cirrus.yml for stale re-runs of old pull request tasks. This +# file can be removed in September 2025. + +cp "./ci/retry/retry" "/ci_retry" +cp "./.python-version" "/.python-version" +mkdir --parents "/test/lint" +cp --recursive "./test/lint/test_runner" "/test/lint/" +set -o errexit; source ./ci/lint/01_install.sh set -o errexit ./ci/lint/06_script.sh diff --git a/ci/test/00_setup_env.sh b/ci/test/00_setup_env.sh index 8b2adbb0..cf8fbb00 100755 --- a/ci/test/00_setup_env.sh +++ b/ci/test/00_setup_env.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2019-2022 The Bitcoin Core developers +# Copyright (c) 2019-present The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -46,7 +46,6 @@ export RUN_TIDY=${RUN_TIDY:-false} # 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} # Randomize test order. @@ -54,20 +53,21 @@ export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false} export BOOST_TEST_RANDOM=${BOOST_TEST_RANDOM:-1} # See man 7 debconf export DEBIAN_FRONTEND=noninteractive -export CCACHE_MAXSIZE=${CCACHE_MAXSIZE:-100M} +export CCACHE_MAXSIZE=${CCACHE_MAXSIZE:-500M} export CCACHE_TEMPDIR=${CCACHE_TEMPDIR:-/tmp/.ccache-temp} export CCACHE_COMPRESS=${CCACHE_COMPRESS:-1} # The cache dir. # This folder exists only on the ci guest, and on the ci host as a volume. -export CCACHE_DIR=${CCACHE_DIR:-$BASE_SCRATCH_DIR/.ccache} +export CCACHE_DIR="${CCACHE_DIR:-$BASE_SCRATCH_DIR/ccache}" # Folder where the build result is put (bin and lib). export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out} -# Folder where the build is done (dist and out-of-tree build). -export BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build} # The folder for previous release binaries. # This folder exists only on the ci guest, and on the ci host as a volume. export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/prev_releases} -export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps bison e2fsprogs} +export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential pkgconf curl ca-certificates ccache python3 rsync git procps bison e2fsprogs cmake ninja-build} export GOAL=${GOAL:-install} export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets} export CI_RETRY_EXE=${CI_RETRY_EXE:-"retry --"} + +# The --platform argument used with `docker build` and `docker run`. +export CI_IMAGE_PLATFORM=${CI_IMAGE_PLATFORM:-"linux"} # Force linux, but use native arch by default diff --git a/ci/test/00_setup_env_android.sh b/ci/test/00_setup_env_android.sh deleted file mode 100755 index 97a6bd73..00000000 --- a/ci/test/00_setup_env_android.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2019-present 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 HOST=aarch64-linux-android -export PACKAGES="unzip openjdk-8-jdk gradle" -export CONTAINER_NAME=ci_android -export CI_IMAGE_NAME_TAG="docker.io/amd64/ubuntu:22.04" - -export RUN_UNIT_TESTS=false -export RUN_FUNCTIONAL_TESTS=false - -export ANDROID_API_LEVEL=28 -export ANDROID_BUILD_TOOLS_VERSION=28.0.3 -export ANDROID_NDK_VERSION=23.2.8568313 -export ANDROID_TOOLS_URL=https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip -export ANDROID_HOME="${DEPENDS_DIR}/SDKs/android" -export ANDROID_NDK_HOME="${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION}" -export DEP_OPTS="ANDROID_SDK=${ANDROID_HOME} ANDROID_NDK=${ANDROID_NDK_HOME} ANDROID_API_LEVEL=${ANDROID_API_LEVEL} ANDROID_TOOLCHAIN_BIN=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/" - -export BITCOIN_CONFIG="--disable-tests --enable-gui-tests --disable-bench --disable-fuzz-binary --without-utils --without-libs --without-daemon" diff --git a/ci/test/00_setup_env_arm.sh b/ci/test/00_setup_env_arm.sh index 65d37f01..ce019784 100755 --- a/ci/test/00_setup_env_arm.sh +++ b/ci/test/00_setup_env_arm.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2019-2021 The Bitcoin Core developers +# Copyright (c) 2019-present The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -10,11 +10,13 @@ export HOST=arm-linux-gnueabihf export DPKG_ADD_ARCH="armhf" export PACKAGES="python3-zmq g++-arm-linux-gnueabihf busybox libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf" export CONTAINER_NAME=ci_arm_linux -export CI_IMAGE_NAME_TAG="docker.io/arm64v8/debian:bookworm" +export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" # Check that https://packages.ubuntu.com/noble/g++-arm-linux-gnueabihf (version 13.x, similar to guix) can cross-compile +export CI_IMAGE_PLATFORM="linux/arm64" export USE_BUSY_BOX=true export RUN_UNIT_TESTS=true export RUN_FUNCTIONAL_TESTS=false export GOAL="install" +export CI_LIMIT_STACK_SIZE=1 # -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-reduce-exports CXXFLAGS=-Wno-psabi" +export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DCMAKE_CXX_FLAGS='-Wno-psabi -Wno-error=maybe-uninitialized'" diff --git a/ci/test/00_setup_env_i686_centos.sh b/ci/test/00_setup_env_i686_centos.sh deleted file mode 100755 index d509c721..00000000 --- a/ci/test/00_setup_env_i686_centos.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2020-2022 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 HOST=i686-pc-linux-gnu -export CONTAINER_NAME=ci_i686_centos -export CI_IMAGE_NAME_TAG="quay.io/centos/amd64:stream9" -export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python3 python3-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison util-linux e2fsprogs" -export PIP_PACKAGES="pyzmq" -export GOAL="install" -export NO_WERROR=1 # Suppress error: #warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform [-Werror=cpp] -export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-reduce-exports" -export CONFIG_SHELL="/bin/dash" diff --git a/ci/test/00_setup_env_i686_multiprocess.sh b/ci/test/00_setup_env_i686_multiprocess.sh index 37717c51..e19a45d1 100755 --- a/ci/test/00_setup_env_i686_multiprocess.sh +++ b/ci/test/00_setup_env_i686_multiprocess.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2020-2022 The Bitcoin Core developers +# Copyright (c) 2020-present 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,16 @@ export LC_ALL=C.UTF-8 export HOST=i686-pc-linux-gnu export CONTAINER_NAME=ci_i686_multiprocess -export CI_IMAGE_NAME_TAG="docker.io/amd64/ubuntu:20.04" -export PACKAGES="cmake llvm clang g++-multilib" +export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" +export CI_IMAGE_PLATFORM="linux/amd64" +export PACKAGES="llvm clang g++-multilib" export DEP_OPTS="DEBUG=1 MULTIPROCESS=1" export GOAL="install" -export BITCOIN_CONFIG="--enable-debug CC='clang -m32' CXX='clang++ -m32' \ -LDFLAGS='--rtlib=compiler-rt -lgcc_s' CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE'" -export TEST_RUNNER_ENV="COORDINATED=bitcoin-node" +export TEST_RUNNER_EXTRA="--v2transport --usecli" +export BITCOIN_CONFIG="\ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_COMPILER='clang;-m32' \ + -DCMAKE_CXX_COMPILER='clang++;-m32' \ + -DAPPEND_CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' \ +" +export BITCOIN_CMD="bitcoin -m" # Used in functional tests diff --git a/ci/test/00_setup_env_mac.sh b/ci/test/00_setup_env_mac_cross.sh similarity index 56% rename from ci/test/00_setup_env_mac.sh rename to ci/test/00_setup_env_mac_cross.sh index 6fabb4ab..a0d9082f 100755 --- a/ci/test/00_setup_env_mac.sh +++ b/ci/test/00_setup_env_mac_cross.sh @@ -9,15 +9,12 @@ export LC_ALL=C.UTF-8 export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks} export CONTAINER_NAME=ci_macos_cross -export CI_IMAGE_NAME_TAG="docker.io/ubuntu:22.04" +export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export HOST=x86_64-apple-darwin -export PACKAGES="cmake libz-dev python3-setuptools zip" -export XCODE_VERSION=12.2 -export XCODE_BUILD_ID=12B45b +export PACKAGES="clang lld llvm zip" +export XCODE_VERSION=15.0 +export XCODE_BUILD_ID=15A240d export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false export GOAL="deploy" - -# False-positive warning is fixed with clang 17, remove this when that version -# can be used. -export BITCOIN_CONFIG="--with-gui --enable-reduce-exports LDFLAGS=-Wno-error=unused-command-line-argument" +export BITCOIN_CONFIG="-DBUILD_GUI=ON -DREDUCE_EXPORTS=ON" diff --git a/ci/test/00_setup_env_mac_native.sh b/ci/test/00_setup_env_mac_native.sh index c9f65bf3..65917b95 100755 --- a/ci/test/00_setup_env_mac_native.sh +++ b/ci/test/00_setup_env_mac_native.sh @@ -6,13 +6,12 @@ export LC_ALL=C.UTF-8 -export HOST=x86_64-apple-darwin -export PIP_PACKAGES="zmq" -export GOAL="install" -export BITCOIN_CONFIG="--with-gui --with-miniupnpc --with-natpmp --enable-reduce-exports" +# Homebrew's python@3.12 is marked as externally managed (PEP 668). +# Therefore, `--break-system-packages` is needed. +export PIP_PACKAGES="--break-system-packages zmq" +export GOAL="install deploy" +export CMAKE_GENERATOR="Ninja" +export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_ZMQ=ON -DREDUCE_EXPORTS=ON -DCMAKE_EXE_LINKER_FLAGS='-Wl,-stack_size -Wl,0x80000'" export CI_OS_NAME="macos" export NO_DEPENDS=1 export OSX_SDK="" -export CCACHE_MAXSIZE=400M -export RUN_FUZZ_TESTS=true -export FUZZ_TESTS_CONFIG="--exclude banman" # https://github.com/bitcoin/bitcoin/issues/27924 diff --git a/ci/test/00_setup_env_mac_native_fuzz.sh b/ci/test/00_setup_env_mac_native_fuzz.sh new file mode 100755 index 00000000..d8a61fba --- /dev/null +++ b/ci/test/00_setup_env_mac_native_fuzz.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# +# Copyright (c) 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 CMAKE_GENERATOR="Ninja" +export BITCOIN_CONFIG="-DBUILD_FOR_FUZZING=ON -DCMAKE_EXE_LINKER_FLAGS='-Wl,-stack_size -Wl,0x80000'" +export CI_OS_NAME="macos" +export NO_DEPENDS=1 +export OSX_SDK="" +export RUN_UNIT_TESTS=false +export RUN_FUNCTIONAL_TESTS=false +export RUN_FUZZ_TESTS=true +export GOAL="all" diff --git a/ci/test/00_setup_env_native_asan.sh b/ci/test/00_setup_env_native_asan.sh index 93d84bf1..a1dd5aa9 100755 --- a/ci/test/00_setup_env_native_asan.sh +++ b/ci/test/00_setup_env_native_asan.sh @@ -6,8 +6,11 @@ export LC_ALL=C.UTF-8 -# Only install BCC tracing packages in Cirrus CI. -if [[ "${CIRRUS_CI}" == "true" ]]; then +export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" + +# Only install BCC tracing packages in CI. Container has to match the host for BCC to work. +if [[ "${INSTALL_BCC_TRACING_TOOLS}" == "true" ]]; then + # Required for USDT functional tests to run BPFCC_PACKAGE="bpfcc-tools linux-headers-$(uname --kernel-release)" export CI_CONTAINER_CAP="--privileged -v /sys/kernel:/sys/kernel:rw" else @@ -16,11 +19,18 @@ else fi export CONTAINER_NAME=ci_native_asan -export PACKAGES="systemtap-sdt-dev clang-17 llvm-17 libclang-rt-17-dev python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE}" -export CI_IMAGE_NAME_TAG="docker.io/ubuntu:23.10" # This version will reach EOL in Jul 2024, and can be replaced by "ubuntu:24.04" (or anything else that ships the wanted clang version). +export APT_LLVM_V="20" +export PACKAGES="systemtap-sdt-dev clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev python3-zmq qt6-base-dev qt6-tools-dev qt6-l10n-tools libevent-dev libboost-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE}" export NO_DEPENDS=1 export GOAL="install" -export BITCOIN_CONFIG="--enable-c++20 --enable-usdt --enable-zmq --with-incompatible-bdb --with-gui=qt5 \ -CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' \ ---with-sanitizers=address,float-divide-by-zero,integer,undefined \ -CC='clang-17 -ftrivial-auto-var-init=pattern' CXX='clang++-17 -ftrivial-auto-var-init=pattern'" +export CI_LIMIT_STACK_SIZE=1 +export BITCOIN_CONFIG="\ + -DWITH_USDT=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON \ + -DSANITIZERS=address,float-divide-by-zero,integer,undefined \ + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_C_FLAGS='-ftrivial-auto-var-init=pattern' \ + -DCMAKE_CXX_FLAGS='-ftrivial-auto-var-init=pattern' \ + -DAPPEND_CXXFLAGS='-std=c++23' \ + -DAPPEND_CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' \ +" diff --git a/ci/test/00_setup_env_native_centos.sh b/ci/test/00_setup_env_native_centos.sh new file mode 100755 index 00000000..25b9923d --- /dev/null +++ b/ci/test/00_setup_env_native_centos.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2020-present 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_centos +export CI_IMAGE_NAME_TAG="quay.io/centos/centos:stream10" +export CI_BASE_PACKAGES="gcc-c++ glibc-devel libstdc++-devel ccache make ninja-build git python3 python3-pip which patch xz procps-ng ksh rsync coreutils bison e2fsprogs cmake" +export PIP_PACKAGES="pyzmq" +export GOAL="install" +export BITCOIN_CONFIG="\ + -DWITH_ZMQ=ON \ + -DBUILD_GUI=ON \ + -DREDUCE_EXPORTS=ON \ + -DAPPEND_CPPFLAGS='-D_GLIBCXX_ASSERTIONS' \ + -DCMAKE_BUILD_TYPE=Debug \ +" diff --git a/ci/test/00_setup_env_native_fuzz.sh b/ci/test/00_setup_env_native_fuzz.sh index 122f044b..f80c4d98 100755 --- a/ci/test/00_setup_env_native_fuzz.sh +++ b/ci/test/00_setup_env_native_fuzz.sh @@ -6,15 +6,21 @@ export LC_ALL=C.UTF-8 -export CI_IMAGE_NAME_TAG="docker.io/ubuntu:23.10" # This version will reach EOL in Jul 2024, and can be replaced by "ubuntu:24.04" (or anything else that ships the wanted clang version). +export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CONTAINER_NAME=ci_native_fuzz -export PACKAGES="clang-17 llvm-17 libclang-rt-17-dev libevent-dev libboost-dev libsqlite3-dev" +export APT_LLVM_V="20" +export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev libevent-dev libboost-dev libsqlite3-dev" export NO_DEPENDS=1 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false export RUN_FUZZ_TESTS=true -export GOAL="install" +export GOAL="all" export CI_CONTAINER_CAP="--cap-add SYS_PTRACE" # If run with (ASan + LSan), the container needs access to ptrace (https://github.com/google/sanitizers/issues/764) -export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,address,undefined,float-divide-by-zero,integer \ -CC='clang-17 -ftrivial-auto-var-init=pattern' CXX='clang++-17 -ftrivial-auto-var-init=pattern'" -export CCACHE_MAXSIZE=200M +export BITCOIN_CONFIG="\ + -DBUILD_FOR_FUZZING=ON \ + -DSANITIZERS=fuzzer,address,undefined,float-divide-by-zero,integer \ + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_C_FLAGS='-ftrivial-auto-var-init=pattern' \ + -DCMAKE_CXX_FLAGS='-ftrivial-auto-var-init=pattern' \ +" diff --git a/ci/test/00_setup_env_native_fuzz_with_msan.sh b/ci/test/00_setup_env_native_fuzz_with_msan.sh index 6055e0ad..c71772b8 100755 --- a/ci/test/00_setup_env_native_fuzz_with_msan.sh +++ b/ci/test/00_setup_env_native_fuzz_with_msan.sh @@ -6,20 +6,26 @@ export LC_ALL=C.UTF-8 -export CI_IMAGE_NAME_TAG="docker.io/ubuntu:22.04" -LIBCXX_DIR="/msan/cxx_build/" +export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" +LIBCXX_DIR="/cxx_build/" export MSAN_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer -g -O1 -fno-optimize-sibling-calls" LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${LIBCXX_DIR}lib -Wl,-rpath,${LIBCXX_DIR}lib -lc++ -lc++abi -lpthread -Wno-unused-command-line-argument" export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}" export CONTAINER_NAME="ci_native_fuzz_msan" -export PACKAGES="cmake ninja-build" -# BDB generates false-positives and will be removed in future -export DEP_OPTS="NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'" -export GOAL="install" -export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,memory --disable-hardening --with-asm=no CFLAGS='${MSAN_FLAGS}' CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'" -export USE_MEMORY_SANITIZER="true" +export DEP_OPTS="DEBUG=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'" +export GOAL="all" +# Setting CMAKE_{C,CXX}_FLAGS_DEBUG flags to an empty string ensures that the flags set in MSAN_FLAGS remain unaltered. +# _FORTIFY_SOURCE is not compatible with MSAN. +export BITCOIN_CONFIG="\ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_FLAGS_DEBUG='' \ + -DCMAKE_CXX_FLAGS_DEBUG='' \ + -DBUILD_FOR_FUZZING=ON \ + -DSANITIZERS=fuzzer,memory \ + -DAPPEND_CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE -U_FORTIFY_SOURCE' \ +" +export USE_INSTRUMENTED_LIBCPP="MemoryWithOrigins" export RUN_UNIT_TESTS="false" export RUN_FUNCTIONAL_TESTS="false" export RUN_FUZZ_TESTS=true -export CCACHE_MAXSIZE=250M diff --git a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh index 1f60c468..b2f3545b 100755 --- a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh +++ b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh @@ -6,15 +6,16 @@ export LC_ALL=C.UTF-8 -export CI_IMAGE_NAME_TAG="docker.io/debian:bookworm" +export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CONTAINER_NAME=ci_native_fuzz_valgrind -export PACKAGES="clang llvm libclang-rt-dev libevent-dev libboost-dev libsqlite3-dev valgrind" +export PACKAGES="libevent-dev libboost-dev libsqlite3-dev valgrind" export NO_DEPENDS=1 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false export RUN_FUZZ_TESTS=true export FUZZ_TESTS_CONFIG="--valgrind" -export GOAL="install" -# Temporarily pin dwarf 4, until using Valgrind 3.20 or later -export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC='clang -gdwarf-4' CXX='clang++ -gdwarf-4'" -export CCACHE_MAXSIZE=200M +export GOAL="all" +export BITCOIN_CONFIG="\ + -DBUILD_FOR_FUZZING=ON \ + -DCMAKE_CXX_FLAGS='-Wno-error=array-bounds' \ +" diff --git a/ci/test/00_setup_env_native_msan.sh b/ci/test/00_setup_env_native_msan.sh index d73a7db0..80b25988 100755 --- a/ci/test/00_setup_env_native_msan.sh +++ b/ci/test/00_setup_env_native_msan.sh @@ -6,18 +6,25 @@ export LC_ALL=C.UTF-8 -export CI_IMAGE_NAME_TAG="docker.io/ubuntu:22.04" -LIBCXX_DIR="/msan/cxx_build/" +export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" +export APT_LLVM_V="20" +LIBCXX_DIR="/cxx_build/" export MSAN_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer -g -O1 -fno-optimize-sibling-calls" LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${LIBCXX_DIR}lib -Wl,-rpath,${LIBCXX_DIR}lib -lc++ -lc++abi -lpthread -Wno-unused-command-line-argument" export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}" export CONTAINER_NAME="ci_native_msan" -export PACKAGES="cmake ninja-build" -# BDB generates false-positives and will be removed in future -export DEP_OPTS="NO_BDB=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'" +export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev" +export DEP_OPTS="DEBUG=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'" export GOAL="install" -export BITCOIN_CONFIG="--with-sanitizers=memory --disable-hardening --with-asm=no CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'" -export USE_MEMORY_SANITIZER="true" -export RUN_FUNCTIONAL_TESTS="false" -export CCACHE_MAXSIZE=250M +export CI_LIMIT_STACK_SIZE=1 +# Setting CMAKE_{C,CXX}_FLAGS_DEBUG flags to an empty string ensures that the flags set in MSAN_FLAGS remain unaltered. +# _FORTIFY_SOURCE is not compatible with MSAN. +export BITCOIN_CONFIG="\ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_FLAGS_DEBUG='' \ + -DCMAKE_CXX_FLAGS_DEBUG='' \ + -DSANITIZERS=memory \ + -DAPPEND_CPPFLAGS='-U_FORTIFY_SOURCE' \ +" +export USE_INSTRUMENTED_LIBCPP="MemoryWithOrigins" diff --git a/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh b/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh index 454a4b8d..74bc891a 100755 --- a/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh +++ b/ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh @@ -7,9 +7,9 @@ export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel -export CI_IMAGE_NAME_TAG="docker.io/ubuntu:20.04" -# Use minimum supported python3.8 and clang-10, see doc/dependencies.md -export PACKAGES="python3-zmq clang-10 llvm-10 libc++abi-10-dev libc++-10-dev" -export DEP_OPTS="NO_WALLET=1 CC=clang-10 CXX='clang++-10 -stdlib=libc++'" +export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:bookworm" +# Use minimum supported python3.10 (or best-effort 3.11) and clang-16, see doc/dependencies.md +export PACKAGES="python3-zmq clang-16 llvm-16 libc++abi-16-dev libc++-16-dev" +export DEP_OPTS="NO_WALLET=1 CC=clang-16 CXX='clang++-16 -stdlib=libc++'" export GOAL="install" -export BITCOIN_CONFIG="--enable-reduce-exports --enable-experimental-util-chainstate --with-experimental-kernel-lib --enable-shared" +export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DBUILD_UTIL_CHAINSTATE=ON -DBUILD_KERNEL_LIB=ON -DBUILD_SHARED_LIBS=ON" diff --git a/ci/test/00_setup_env_native_previous_releases.sh b/ci/test/00_setup_env_native_previous_releases.sh new file mode 100755 index 00000000..7a7544b3 --- /dev/null +++ b/ci/test/00_setup_env_native_previous_releases.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2019-present 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_previous_releases +export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:22.04" +# Use minimum supported python3.10 and gcc-11, see doc/dependencies.md +export PACKAGES="gcc-11 g++-11 python3-zmq" +export DEP_OPTS="CC=gcc-11 CXX=g++-11" +export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash +export RUN_UNIT_TESTS_SEQUENTIAL="true" +export RUN_UNIT_TESTS="false" +export GOAL="install" +export CI_LIMIT_STACK_SIZE=1 +export DOWNLOAD_PREVIOUS_RELEASES="true" +export BITCOIN_CONFIG="\ + -DWITH_ZMQ=ON -DBUILD_GUI=ON -DREDUCE_EXPORTS=ON \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_FLAGS='-funsigned-char' \ + -DCMAKE_C_FLAGS_DEBUG='-g2 -O2' \ + -DCMAKE_CXX_FLAGS='-funsigned-char' \ + -DCMAKE_CXX_FLAGS_DEBUG='-g2 -O2' \ + -DAPPEND_CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' \ +" diff --git a/ci/test/00_setup_env_native_qt5.sh b/ci/test/00_setup_env_native_qt5.sh deleted file mode 100755 index 0fad95e2..00000000 --- a/ci/test/00_setup_env_native_qt5.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2019-present 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 CI_IMAGE_NAME_TAG="docker.io/ubuntu:20.04" -# Use minimum supported python3.8 and gcc-9, see doc/dependencies.md -export PACKAGES="gcc-9 g++-9 python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev" -export DEP_OPTS="NO_QT=1 NO_UPNP=1 NO_NATPMP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1 CC=gcc-9 CXX=g++-9" -export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash -export RUN_UNIT_TESTS_SEQUENTIAL="true" -export RUN_UNIT_TESTS="false" -export GOAL="install" -export NO_WERROR=1 # -Werror=maybe-uninitialized -export DOWNLOAD_PREVIOUS_RELEASES="true" -export BITCOIN_CONFIG="--enable-zmq --with-libs=no --with-gui=qt5 --enable-reduce-exports --enable-debug \ -CFLAGS=\"-g0 -O2 -funsigned-char\" CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' CXXFLAGS=\"-g0 -O2 -funsigned-char\"" diff --git a/ci/test/00_setup_env_native_tidy.sh b/ci/test/00_setup_env_native_tidy.sh index 6b0c708f..d67616c1 100755 --- a/ci/test/00_setup_env_native_tidy.sh +++ b/ci/test/00_setup_env_native_tidy.sh @@ -6,15 +6,22 @@ export LC_ALL=C.UTF-8 -export CI_IMAGE_NAME_TAG="docker.io/ubuntu:23.10" # This version will reach EOL in Jul 2024, and can be replaced by "ubuntu:24.04" (or anything else that ships the wanted clang version). +export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CONTAINER_NAME=ci_native_tidy -export TIDY_LLVM_V="17" -export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq bear cmake libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev" +export TIDY_LLVM_V="20" +export APT_LLVM_V="${TIDY_LLVM_V}" +export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev" export NO_DEPENDS=1 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false export RUN_FUZZ_TESTS=false +export RUN_CHECK_DEPS=true export RUN_TIDY=true export GOAL="install" -export BITCOIN_CONFIG="CC=clang-${TIDY_LLVM_V} CXX=clang++-${TIDY_LLVM_V} --with-incompatible-bdb --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0 -I/usr/lib/llvm-${TIDY_LLVM_V}/lib/clang/${TIDY_LLVM_V}/include'" -export CCACHE_MAXSIZE=200M +export BITCOIN_CONFIG="\ + -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DWITH_USDT=ON \ + -DCMAKE_C_COMPILER=clang-${TIDY_LLVM_V} \ + -DCMAKE_CXX_COMPILER=clang++-${TIDY_LLVM_V} \ + -DCMAKE_C_FLAGS_RELWITHDEBINFO='-O0 -g0' \ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO='-O0 -g0' \ +" diff --git a/ci/test/00_setup_env_native_tsan.sh b/ci/test/00_setup_env_native_tsan.sh index 67c29d4b..2079ca73 100755 --- a/ci/test/00_setup_env_native_tsan.sh +++ b/ci/test/00_setup_env_native_tsan.sh @@ -7,8 +7,14 @@ export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_native_tsan -export CI_IMAGE_NAME_TAG="docker.io/ubuntu:23.10" # This version will reach EOL in Jul 2024, and can be replaced by "ubuntu:24.04" (or anything else that ships the wanted clang version). -export PACKAGES="clang-17 llvm-17 libclang-rt-17-dev libc++abi-17-dev libc++-17-dev python3-zmq" -export DEP_OPTS="CC=clang-17 CXX='clang++-17 -stdlib=libc++'" +export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" +export APT_LLVM_V="20" +LIBCXX_DIR="/cxx_build/" +LIBCXX_FLAGS="-fsanitize=thread -nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${LIBCXX_DIR}lib -Wl,-rpath,${LIBCXX_DIR}lib -lc++ -lc++abi -lpthread -Wno-unused-command-line-argument" +export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev python3-zmq" +export DEP_OPTS="CC=clang CXX=clang++ CXXFLAGS='${LIBCXX_FLAGS}' NO_QT=1" export GOAL="install" -export BITCOIN_CONFIG="--enable-zmq CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION' CXXFLAGS='-g' --with-sanitizers=thread" +export CI_LIMIT_STACK_SIZE=1 +export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DSANITIZERS=thread \ +-DAPPEND_CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKCONTENTION -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES'" +export USE_INSTRUMENTED_LIBCPP="Thread" diff --git a/ci/test/00_setup_env_native_valgrind.sh b/ci/test/00_setup_env_native_valgrind.sh index daa1a0cd..e0213dbe 100755 --- a/ci/test/00_setup_env_native_valgrind.sh +++ b/ci/test/00_setup_env_native_valgrind.sh @@ -6,12 +6,15 @@ export LC_ALL=C.UTF-8 -export CI_IMAGE_NAME_TAG="docker.io/debian:bookworm" +export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CONTAINER_NAME=ci_native_valgrind -export PACKAGES="valgrind clang llvm libclang-rt-dev python3-zmq libevent-dev libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libsqlite3-dev" +export PACKAGES="valgrind python3-zmq libevent-dev libboost-dev libzmq3-dev libsqlite3-dev" export USE_VALGRIND=1 export NO_DEPENDS=1 -export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547 +# bind tests excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547 +export TEST_RUNNER_EXTRA="--exclude rpc_bind,feature_bind_extra" export GOAL="install" -# Temporarily pin dwarf 4, until using Valgrind 3.20 or later -export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no CC='clang -gdwarf-4' CXX='clang++ -gdwarf-4'" # TODO enable GUI +# TODO enable GUI +export BITCOIN_CONFIG="\ + -DWITH_ZMQ=ON -DBUILD_GUI=OFF \ +" diff --git a/ci/test/00_setup_env_s390x.sh b/ci/test/00_setup_env_s390x.sh index ca84ecce..b84d9907 100755 --- a/ci/test/00_setup_env_s390x.sh +++ b/ci/test/00_setup_env_s390x.sh @@ -9,8 +9,9 @@ export LC_ALL=C.UTF-8 export HOST=s390x-linux-gnu export PACKAGES="python3-zmq" export CONTAINER_NAME=ci_s390x -export CI_IMAGE_NAME_TAG="docker.io/s390x/debian:bookworm" -export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547 +export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" +export CI_IMAGE_PLATFORM="linux/s390x" +export TEST_RUNNER_EXTRA="--exclude rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547 export RUN_FUNCTIONAL_TESTS=true export GOAL="install" -export BITCOIN_CONFIG="--enable-reduce-exports" +export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON" diff --git a/ci/test/00_setup_env_win64.sh b/ci/test/00_setup_env_win64.sh index ebd4487c..13e794bd 100755 --- a/ci/test/00_setup_env_win64.sh +++ b/ci/test/00_setup_env_win64.sh @@ -7,13 +7,12 @@ export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_win64 -export CI_IMAGE_NAME_TAG="docker.io/amd64/ubuntu:22.04" # Check that Jammy can cross-compile to win64 +export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" # Check that https://packages.ubuntu.com/noble/g++-mingw-w64-x86-64-posix (version 13.x, similar to guix) can cross-compile +export CI_IMAGE_PLATFORM="linux/amd64" export HOST=x86_64-w64-mingw32 -export DPKG_ADD_ARCH="i386" -export PACKAGES="nsis g++-mingw-w64-x86-64-posix wine-binfmt wine64 wine32 file" +export PACKAGES="g++-mingw-w64-x86-64-posix nsis" +export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false export GOAL="deploy" -# Prior to 11.0.0, the mingw-w64 headers were missing noreturn attributes, causing warnings when -# cross-compiling for Windows. https://sourceforge.net/p/mingw-w64/bugs/306/ -# https://github.com/mingw-w64/mingw-w64/commit/1690994f515910a31b9fb7c7bd3a52d4ba987abe -export BITCOIN_CONFIG="--enable-reduce-exports --enable-external-signer --disable-gui-tests CXXFLAGS=-Wno-return-type" +export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DBUILD_GUI_TESTS=OFF \ +-DCMAKE_CXX_FLAGS='-Wno-error=maybe-uninitialized'" diff --git a/ci/test/01_base_install.sh b/ci/test/01_base_install.sh index a0b054ab..b68dc778 100755 --- a/ci/test/01_base_install.sh +++ b/ci/test/01_base_install.sh @@ -1,27 +1,41 @@ #!/usr/bin/env bash # -# Copyright (c) 2018-2022 The Bitcoin Core developers +# Copyright (c) 2018-present 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 -set -ex +set -o errexit -o pipefail -o xtrace -CFG_DONE="ci.base-install-done" # Use a global git setting to remember whether this script ran to avoid running it twice +CFG_DONE="${BASE_ROOT_DIR}/ci.base-install-done" # Use a global setting to remember whether this script ran to avoid running it twice -if [ "$(git config --global ${CFG_DONE})" == "true" ]; then +if [ "$( cat "${CFG_DONE}" || true )" == "done" ]; then echo "Skip base install" exit 0 fi +MAKEJOBS="-j$( nproc )" # Use nproc, because MAKEJOBS is the default in docker image builds. + if [ -n "$DPKG_ADD_ARCH" ]; then dpkg --add-architecture "$DPKG_ADD_ARCH" fi +if [ -n "${APT_LLVM_V}" ]; then + ${CI_RETRY_EXE} apt-get update + ${CI_RETRY_EXE} apt-get install curl -y + curl "https://apt.llvm.org/llvm-snapshot.gpg.key" | tee "/etc/apt/trusted.gpg.d/apt.llvm.org.asc" + ( + # shellcheck disable=SC2034 + source /etc/os-release + echo "deb http://apt.llvm.org/${VERSION_CODENAME}/ llvm-toolchain-${VERSION_CODENAME}-${APT_LLVM_V} main" > "/etc/apt/sources.list.d/llvm-toolchain-${VERSION_CODENAME}-${APT_LLVM_V}.list" + ) +fi + if [[ $CI_IMAGE_NAME_TAG == *centos* ]]; then bash -c "dnf -y install epel-release" - bash -c "dnf -y --allowerasing install $CI_BASE_PACKAGES $PACKAGES" + # The ninja-build package is available in the CRB repository. + bash -c "dnf -y --allowerasing --enablerepo crb install $CI_BASE_PACKAGES $PACKAGES" elif [ "$CI_OS_NAME" != "macos" ]; then if [[ -n "${APPEND_APT_SOURCES_LIST}" ]]; then echo "${APPEND_APT_SOURCES_LIST}" >> /etc/apt/sources.list @@ -30,47 +44,62 @@ elif [ "$CI_OS_NAME" != "macos" ]; then ${CI_RETRY_EXE} bash -c "apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $CI_BASE_PACKAGES" fi +if [ -n "${APT_LLVM_V}" ]; then + update-alternatives --install /usr/bin/clang++ clang++ "/usr/bin/clang++-${APT_LLVM_V}" 100 + update-alternatives --install /usr/bin/clang clang "/usr/bin/clang-${APT_LLVM_V}" 100 + update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer "/usr/bin/llvm-symbolizer-${APT_LLVM_V}" 100 +fi + if [ -n "$PIP_PACKAGES" ]; then # shellcheck disable=SC2086 ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES fi -if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then - ${CI_RETRY_EXE} git clone --depth=1 https://github.com/llvm/llvm-project -b llvmorg-17.0.2 /msan/llvm-project - - cmake -G Ninja -B /msan/clang_build/ \ - -DLLVM_ENABLE_PROJECTS="clang" \ - -DCMAKE_BUILD_TYPE=Release \ - -DLLVM_TARGETS_TO_BUILD=Native \ - -DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \ - -S /msan/llvm-project/llvm - - ninja -C /msan/clang_build/ "-j$( nproc )" # Use nproc, because MAKEJOBS is the default in docker image builds - ninja -C /msan/clang_build/ install-runtimes - - update-alternatives --install /usr/bin/clang++ clang++ /msan/clang_build/bin/clang++ 100 - update-alternatives --install /usr/bin/clang clang /msan/clang_build/bin/clang 100 - update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /msan/clang_build/bin/llvm-symbolizer 100 +if [[ -n "${USE_INSTRUMENTED_LIBCPP}" ]]; then + if [ -n "${APT_LLVM_V}" ]; then + ${CI_RETRY_EXE} git clone --depth=1 https://github.com/llvm/llvm-project -b "llvmorg-$( clang --version | sed --silent 's@.*clang version \([0-9.]*\).*@\1@p' )" /llvm-project + else + ${CI_RETRY_EXE} git clone --depth=1 https://github.com/llvm/llvm-project -b "llvmorg-20.1.8" /llvm-project + + cmake -G Ninja -B /clang_build/ \ + -DLLVM_ENABLE_PROJECTS="clang" \ + -DCMAKE_BUILD_TYPE=Release \ + -DLLVM_TARGETS_TO_BUILD=Native \ + -DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \ + -S /llvm-project/llvm + + ninja -C /clang_build/ "$MAKEJOBS" + ninja -C /clang_build/ install-runtimes + + update-alternatives --install /usr/bin/clang++ clang++ /clang_build/bin/clang++ 100 + update-alternatives --install /usr/bin/clang clang /clang_build/bin/clang 100 + update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /clang_build/bin/llvm-symbolizer 100 + fi - cmake -G Ninja -B /msan/cxx_build/ \ - -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi' \ + cmake -G Ninja -B /cxx_build/ \ + -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \ -DCMAKE_BUILD_TYPE=Release \ - -DLLVM_USE_SANITIZER=MemoryWithOrigins \ + -DLLVM_USE_SANITIZER="${USE_INSTRUMENTED_LIBCPP}" \ -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -DLLVM_TARGETS_TO_BUILD=Native \ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \ + -DLIBCXXABI_USE_LLVM_UNWINDER=OFF \ + -DLIBCXX_ABI_DEFINES="_LIBCPP_ABI_BOUNDED_ITERATORS;_LIBCPP_ABI_BOUNDED_ITERATORS_IN_STD_ARRAY;_LIBCPP_ABI_BOUNDED_ITERATORS_IN_STRING;_LIBCPP_ABI_BOUNDED_ITERATORS_IN_VECTOR;_LIBCPP_ABI_BOUNDED_UNIQUE_PTR" \ -DLIBCXX_HARDENING_MODE=debug \ - -S /msan/llvm-project/runtimes + -S /llvm-project/runtimes - ninja -C /msan/cxx_build/ "-j$( nproc )" # Use nproc, because MAKEJOBS is the default in docker image builds + ninja -C /cxx_build/ "$MAKEJOBS" + + # Clear no longer needed source folder + du -sh /llvm-project + rm -rf /llvm-project fi if [[ "${RUN_TIDY}" == "true" ]]; then - ${CI_RETRY_EXE} git clone https://github.com/include-what-you-use/include-what-you-use -b master /include-what-you-use - git -C /include-what-you-use checkout a138eaac254e5a472464e31d5ec418fe6e6f1fc7 + ${CI_RETRY_EXE} git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_"${TIDY_LLVM_V}" /include-what-you-use cmake -B /iwyu-build/ -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-"${TIDY_LLVM_V}" -S /include-what-you-use - make -C /iwyu-build/ install "-j$( nproc )" # Use nproc, because MAKEJOBS is the default in docker image builds + make -C /iwyu-build/ install "$MAKEJOBS" fi mkdir -p "${DEPENDS_DIR}/SDKs" "${DEPENDS_DIR}/sdk-sources" @@ -86,14 +115,4 @@ if [ -n "$XCODE_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${OSX_SDK_BASENAME}" ] tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH" fi -if [ -n "$ANDROID_HOME" ] && [ ! -d "$ANDROID_HOME" ]; then - ANDROID_TOOLS_PATH=${DEPENDS_DIR}/sdk-sources/android-tools.zip - if [ ! -f "$ANDROID_TOOLS_PATH" ]; then - ${CI_RETRY_EXE} curl --location --fail "${ANDROID_TOOLS_URL}" -o "$ANDROID_TOOLS_PATH" - fi - mkdir -p "$ANDROID_HOME" - unzip -o "$ANDROID_TOOLS_PATH" -d "$ANDROID_HOME" - yes | "${ANDROID_HOME}"/cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_HOME}" --install "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" "platform-tools" "platforms;android-31" "platforms;android-${ANDROID_API_LEVEL}" "ndk;${ANDROID_NDK_VERSION}" -fi - -git config --global ${CFG_DONE} "true" +echo -n "done" > "${CFG_DONE}" diff --git a/ci/test/02_run_container.sh b/ci/test/02_run_container.sh index edf8f2c3..33e250c3 100755 --- a/ci/test/02_run_container.sh +++ b/ci/test/02_run_container.sh @@ -7,28 +7,102 @@ export LC_ALL=C.UTF-8 export CI_IMAGE_LABEL="bitcoin-ci-test" -set -ex +set -o errexit -o pipefail -o xtrace if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then # Export all env vars to avoid missing some. # Though, exclude those with newlines to avoid parsing problems. - python3 -c 'import os; [print(f"{key}={value}") for key, value in os.environ.items() if "\n" not in value and "HOME" != key and "PATH" != key and "USER" != key]' | tee /tmp/env - # System-dependent env vars must be kept as is. So read them from the container. - docker run --rm "${CI_IMAGE_NAME_TAG}" bash -c "env | grep --extended-regexp '^(HOME|PATH|USER)='" | tee --append /tmp/env + python3 -c 'import os; [print(f"{key}={value}") for key, value in os.environ.items() if "\n" not in value and "HOME" != key and "PATH" != key and "USER" != key]' | tee "/tmp/env-$USER-$CONTAINER_NAME" + + # Env vars during the build can not be changed. For example, a modified + # $MAKEJOBS is ignored in the build process. Use --cpuset-cpus as an + # approximation to respect $MAKEJOBS somewhat, if cpuset is available. + MAYBE_CPUSET="" + if [ "$HAVE_CGROUP_CPUSET" ]; then + MAYBE_CPUSET="--cpuset-cpus=$( python3 -c "import random;P=$( nproc );M=min(P,int('$MAKEJOBS'.lstrip('-j')));print(','.join(map(str,sorted(random.sample(range(P),M)))))" )" + fi echo "Creating $CI_IMAGE_NAME_TAG container to run in" + + DOCKER_BUILD_CACHE_ARG="" + DOCKER_BUILD_CACHE_TEMPDIR="" + DOCKER_BUILD_CACHE_OLD_DIR="" + DOCKER_BUILD_CACHE_NEW_DIR="" + # If set, use an `docker build` cache directory on the CI host + # to cache docker image layers for the CI container image. + # This cache can be multiple GB in size. Prefixed with DANGER + # as setting it removes (old cache) files from the host. + if [ "$DANGER_DOCKER_BUILD_CACHE_HOST_DIR" ]; then + # Directory where the current cache for this run could be. If not existing + # or empty, "docker build" will warn, but treat it as cache-miss and continue. + DOCKER_BUILD_CACHE_OLD_DIR="${DANGER_DOCKER_BUILD_CACHE_HOST_DIR}/${CONTAINER_NAME}" + # Temporary directory for a newly created cache. We can't write the new + # cache into OLD_DIR directly, as old cache layers would not be removed. + # The NEW_DIR contents are moved to OLD_DIR after OLD_DIR has been cleared. + # This happens after `docker build`. If a task fails or is aborted, the + # DOCKER_BUILD_CACHE_TEMPDIR might be retained on the host. If the host isn't + # ephemeral, it has to take care of cleaning old TEMPDIR's up. + DOCKER_BUILD_CACHE_TEMPDIR="$(mktemp --directory ci-docker-build-cache-XXXXXXXXXX)" + DOCKER_BUILD_CACHE_NEW_DIR="${DOCKER_BUILD_CACHE_TEMPDIR}/${CONTAINER_NAME}" + DOCKER_BUILD_CACHE_ARG="--cache-from type=local,src=${DOCKER_BUILD_CACHE_OLD_DIR} --cache-to type=local,dest=${DOCKER_BUILD_CACHE_NEW_DIR},mode=max" + fi + + # shellcheck disable=SC2086 DOCKER_BUILDKIT=1 docker build \ --file "${BASE_READ_ONLY_DIR}/ci/test_imagefile" \ --build-arg "CI_IMAGE_NAME_TAG=${CI_IMAGE_NAME_TAG}" \ --build-arg "FILE_ENV=${FILE_ENV}" \ + $MAYBE_CPUSET \ + --platform="${CI_IMAGE_PLATFORM}" \ --label="${CI_IMAGE_LABEL}" \ --tag="${CONTAINER_NAME}" \ + $DOCKER_BUILD_CACHE_ARG \ "${BASE_READ_ONLY_DIR}" + + if [ "$DANGER_DOCKER_BUILD_CACHE_HOST_DIR" ]; then + if [ -e "${DOCKER_BUILD_CACHE_NEW_DIR}/index.json" ]; then + echo "Removing the existing docker build cache in ${DOCKER_BUILD_CACHE_OLD_DIR}" + rm -rf "${DOCKER_BUILD_CACHE_OLD_DIR}" + echo "Moving the contents of ${DOCKER_BUILD_CACHE_NEW_DIR} to ${DOCKER_BUILD_CACHE_OLD_DIR}" + mv "${DOCKER_BUILD_CACHE_NEW_DIR}" "${DOCKER_BUILD_CACHE_OLD_DIR}" + fi + fi + docker volume create "${CONTAINER_NAME}_ccache" || true docker volume create "${CONTAINER_NAME}_depends" || true docker volume create "${CONTAINER_NAME}_depends_sources" || true - docker volume create "${CONTAINER_NAME}_depends_SDKs_android" || true docker volume create "${CONTAINER_NAME}_previous_releases" || true + CI_CCACHE_MOUNT="type=volume,src=${CONTAINER_NAME}_ccache,dst=$CCACHE_DIR" + CI_DEPENDS_MOUNT="type=volume,src=${CONTAINER_NAME}_depends,dst=$DEPENDS_DIR/built" + CI_DEPENDS_SOURCES_MOUNT="type=volume,src=${CONTAINER_NAME}_depends_sources,dst=$DEPENDS_DIR/sources" + CI_PREVIOUS_RELEASES_MOUNT="type=volume,src=${CONTAINER_NAME}_previous_releases,dst=$PREVIOUS_RELEASES_DIR" + CI_BUILD_MOUNT="" + + if [ "$DANGER_CI_ON_HOST_FOLDERS" ]; then + # ensure the directories exist + mkdir -p "${CCACHE_DIR}" + mkdir -p "${DEPENDS_DIR}/built" + mkdir -p "${DEPENDS_DIR}/sources" + mkdir -p "${PREVIOUS_RELEASES_DIR}" + mkdir -p "${BASE_BUILD_DIR}" # Unset by default, must be defined externally + + CI_CCACHE_MOUNT="type=bind,src=${CCACHE_DIR},dst=$CCACHE_DIR" + CI_DEPENDS_MOUNT="type=bind,src=${DEPENDS_DIR}/built,dst=$DEPENDS_DIR/built" + CI_DEPENDS_SOURCES_MOUNT="type=bind,src=${DEPENDS_DIR}/sources,dst=$DEPENDS_DIR/sources" + CI_PREVIOUS_RELEASES_MOUNT="type=bind,src=${PREVIOUS_RELEASES_DIR},dst=$PREVIOUS_RELEASES_DIR" + CI_BUILD_MOUNT="--mount type=bind,src=${BASE_BUILD_DIR},dst=${BASE_BUILD_DIR}" + fi + + if [ "$DANGER_CI_ON_HOST_CCACHE_FOLDER" ]; then + if [ ! -d "${CCACHE_DIR}" ]; then + echo "Error: Directory '${CCACHE_DIR}' must be created in advance." + exit 1 + fi + CI_CCACHE_MOUNT="type=bind,src=${CCACHE_DIR},dst=${CCACHE_DIR}" + fi + + docker network create --ipv6 --subnet 1111:1111::/112 ci-ip6net || true + if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then echo "Restart docker before run to stop and clear all containers started with --rm" podman container rm --force --all # Similar to "systemctl restart docker" @@ -44,16 +118,20 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then # When detecting podman-docker, `--external` should be added. docker image prune --force --filter "label=$CI_IMAGE_LABEL" + # Append $USER to /tmp/env to support multi-user systems and $CONTAINER_NAME + # to allow support starting multiple runs simultaneously by the same user. # shellcheck disable=SC2086 CI_CONTAINER_ID=$(docker run --cap-add LINUX_IMMUTABLE $CI_CONTAINER_CAP --rm --interactive --detach --tty \ --mount "type=bind,src=$BASE_READ_ONLY_DIR,dst=$BASE_READ_ONLY_DIR,readonly" \ - --mount "type=volume,src=${CONTAINER_NAME}_ccache,dst=$CCACHE_DIR" \ - --mount "type=volume,src=${CONTAINER_NAME}_depends,dst=$DEPENDS_DIR/built" \ - --mount "type=volume,src=${CONTAINER_NAME}_depends_sources,dst=$DEPENDS_DIR/sources" \ - --mount "type=volume,src=${CONTAINER_NAME}_depends_SDKs_android,dst=$DEPENDS_DIR/SDKs/android" \ - --mount "type=volume,src=${CONTAINER_NAME}_previous_releases,dst=$PREVIOUS_RELEASES_DIR" \ - --env-file /tmp/env \ + --mount "${CI_CCACHE_MOUNT}" \ + --mount "${CI_DEPENDS_MOUNT}" \ + --mount "${CI_DEPENDS_SOURCES_MOUNT}" \ + --mount "${CI_PREVIOUS_RELEASES_MOUNT}" \ + ${CI_BUILD_MOUNT} \ + --env-file /tmp/env-$USER-$CONTAINER_NAME \ --name "$CONTAINER_NAME" \ + --network ci-ip6net \ + --platform="${CI_IMAGE_PLATFORM}" \ "$CONTAINER_NAME") export CI_CONTAINER_ID export CI_EXEC_CMD_PREFIX="docker exec ${CI_CONTAINER_ID}" @@ -70,21 +148,17 @@ if [ "$CI_OS_NAME" == "macos" ]; then fi CI_EXEC () { - $CI_EXEC_CMD_PREFIX bash -c "export PATH=${BINS_SCRATCH_DIR}:${BASE_ROOT_DIR}/ci/retry:\$PATH && cd \"${BASE_ROOT_DIR}\" && $*" + $CI_EXEC_CMD_PREFIX bash -c "export PATH=\"/path_with space:${BINS_SCRATCH_DIR}:${BASE_ROOT_DIR}/ci/retry:\$PATH\" && cd \"${BASE_ROOT_DIR}\" && $*" } export -f CI_EXEC # Normalize all folders to BASE_ROOT_DIR -CI_EXEC rsync --archive --stats --human-readable "${BASE_READ_ONLY_DIR}/" "${BASE_ROOT_DIR}" || echo "Nothing to copy from ${BASE_READ_ONLY_DIR}/" +CI_EXEC rsync --recursive --perms --stats --human-readable "${BASE_READ_ONLY_DIR}/" "${BASE_ROOT_DIR}" || echo "Nothing to copy from ${BASE_READ_ONLY_DIR}/" CI_EXEC "${BASE_ROOT_DIR}/ci/test/01_base_install.sh" -# Fixes permission issues when there is a container UID/GID mismatch with the owner -# of the git source code directory. -CI_EXEC git config --global --add safe.directory \"*\" - CI_EXEC mkdir -p "${BINS_SCRATCH_DIR}" -CI_EXEC "${BASE_ROOT_DIR}/ci/test/06_script_b.sh" +CI_EXEC "${BASE_ROOT_DIR}/ci/test/03_test_script.sh" if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then echo "Stop and remove CI container by ID" diff --git a/ci/test/06_script_b.sh b/ci/test/03_test_script.sh similarity index 54% rename from ci/test/06_script_b.sh rename to ci/test/03_test_script.sh index 20464c3a..24d9e296 100755 --- a/ci/test/06_script_b.sh +++ b/ci/test/03_test_script.sh @@ -8,17 +8,16 @@ export LC_ALL=C.UTF-8 set -ex -export ASAN_OPTIONS="detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1" +export ASAN_OPTIONS="detect_leaks=1: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:halt_on_error=1:log_path=${BASE_SCRATCH_DIR}/sanitizer-output/tsan" +export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1:second_deadlock_stack=1" export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1" +echo "Number of available processing units: $(nproc)" if [ "$CI_OS_NAME" == "macos" ]; then top -l 1 -s 0 | awk ' /PhysMem/ {print}' - echo "Number of CPUs: $(sysctl -n hw.logicalcpu)" else free -m -h - echo "Number of CPUs (nproc): $(nproc)" echo "System info: $(uname --kernel-name --kernel-release)" lscpu fi @@ -30,14 +29,18 @@ df -h # Tests that run natively guess the host export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")} +echo "=== BEGIN env ===" +env +echo "=== END env ===" + ( # compact->outputs[i].file_size is uninitialized memory, so reading it is UB. # The statistic bytes_written is only used for logging, which is disabled in # CI, so as a temporary minimal fix to work around UB and CI failures, leave # bytes_written unmodified. # See https://github.com/bitcoin/bitcoin/pull/28359#issuecomment-1698694748 - echo 'diff --git a/src/leveldb/db/db_impl.cc b/src/leveldb/db/db_impl.cc -index 65e31724bc..f61b471953 100644 + # Tee patch to stdout to make it clear CI is testing modified code. + tee >(patch -p1) <<'EOF' --- a/src/leveldb/db/db_impl.cc +++ b/src/leveldb/db/db_impl.cc @@ -1028,9 +1028,6 @@ Status DBImpl::DoCompactionWork(CompactionState* compact) { @@ -49,12 +52,12 @@ index 65e31724bc..f61b471953 100644 - } mutex_.Lock(); - stats_[compact->compaction->level() + 1].Add(stats);' | patch -p1 - git diff + stats_[compact->compaction->level() + 1].Add(stats); +EOF ) if [ "$RUN_FUZZ_TESTS" = "true" ]; then - export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/ + export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_corpora/ if [ ! -d "$DIR_FUZZ_IN" ]; then ${CI_RETRY_EXE} git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${DIR_QA_ASSETS}" fi @@ -71,8 +74,6 @@ elif [ "$RUN_UNIT_TESTS" = "true" ] || [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ] fi fi -mkdir -p "${BASE_SCRATCH_DIR}/sanitizer-output/" - if [ "$USE_BUSY_BOX" = "true" ]; then echo "Setup to use BusyBox utils" # tar excluded for now because it requires passing in the exact archive type in ./depends (fixed in later BusyBox version) @@ -84,94 +85,100 @@ fi # Make sure default datadir does not exist and is never read by creating a dummy file if [ "$CI_OS_NAME" == "macos" ]; then - echo > "${HOME}/Library/Application Support/Bitcoin" + echo > "${HOME}/Library/Application Support/Coordinate" else - echo > "${HOME}/.bitcoin" + echo > "${HOME}/.coordinate" fi if [ -z "$NO_DEPENDS" ]; then if [[ $CI_IMAGE_NAME_TAG == *centos* ]]; then - SHELL_OPTS="CONFIG_SHELL=/bin/dash" + SHELL_OPTS="CONFIG_SHELL=/bin/ksh" # Temporarily use ksh instead of dash, until https://bugzilla.redhat.com/show_bug.cgi?id=2335416 is fixed. else SHELL_OPTS="CONFIG_SHELL=" fi bash -c "$SHELL_OPTS make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS LOG=1" fi if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then - test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" + test/get_previous_releases.py --target-dir "$PREVIOUS_RELEASES_DIR" fi -BITCOIN_CONFIG_ALL="--disable-dependency-tracking" +BITCOIN_CONFIG_ALL="-DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON" if [ -z "$NO_DEPENDS" ]; then - BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} CONFIG_SITE=$DEPENDS_DIR/$HOST/share/config.site" + BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} -DCMAKE_TOOLCHAIN_FILE=$DEPENDS_DIR/$HOST/toolchain.cmake" fi if [ -z "$NO_WERROR" ]; then - BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-werror" + BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} -DWERROR=ON" fi ccache --zero-stats PRINT_CCACHE_STATISTICS="ccache --version | head -n 1 && ccache --show-stats" -if [ -n "$ANDROID_TOOLS_URL" ]; then - make distclean || true - ./autogen.sh - bash -c "./configure $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false) - make "${MAKEJOBS}" && cd src/qt && ANDROID_HOME=${ANDROID_HOME} ANDROID_NDK_HOME=${ANDROID_NDK_HOME} make apk - bash -c "${PRINT_CCACHE_STATISTICS}" - exit 0 -fi - -BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-external-signer --prefix=$BASE_OUTDIR" - -if [ -n "$CONFIG_SHELL" ]; then - "$CONFIG_SHELL" -c "./autogen.sh" -else - ./autogen.sh -fi - -mkdir -p "${BASE_BUILD_DIR}" -cd "${BASE_BUILD_DIR}" - -bash -c "${BASE_ROOT_DIR}/configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false) +# Folder where the build is done. +BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build-$HOST} -make distdir VERSION="$HOST" - -cd "${BASE_BUILD_DIR}/bitcoin-$HOST" - -bash -c "./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false) +BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_INSTALL_PREFIX=$BASE_OUTDIR -Werror=dev" if [[ "${RUN_TIDY}" == "true" ]]; then - MAYBE_BEAR="bear --config src/.bear-tidy-config" - MAYBE_TOKEN="--" + BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_EXPORT_COMPILE_COMMANDS=ON" fi -bash -c "${MAYBE_BEAR} ${MAYBE_TOKEN} make $MAKEJOBS $GOAL" || ( echo "Build failure. Verbose build follows." && make "$GOAL" V=1 ; false ) +bash -c "cmake -S $BASE_ROOT_DIR -B ${BASE_BUILD_DIR} $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( + # shellcheck disable=SC2046 + cat $(cmake -P "${BASE_ROOT_DIR}/ci/test/GetCMakeLogFiles.cmake") + false +) + +# shellcheck disable=SC2086 +cmake --build "${BASE_BUILD_DIR}" "$MAKEJOBS" --target all $GOAL || ( + echo "Build failure. Verbose build follows." + # shellcheck disable=SC2086 + cmake --build "${BASE_BUILD_DIR}" -j1 --target all $GOAL --verbose + false +) bash -c "${PRINT_CCACHE_STATISTICS}" du -sh "${DEPENDS_DIR}"/*/ du -sh "${PREVIOUS_RELEASES_DIR}" -if [[ $HOST = *-mingw32 ]]; then - # Generate all binaries, so that they can be wrapped - make "$MAKEJOBS" -C src/secp256k1 VERBOSE=1 - make "$MAKEJOBS" -C src minisketch/test.exe VERBOSE=1 - "${BASE_ROOT_DIR}/ci/test/wrap-wine.sh" +if [ -n "${CI_LIMIT_STACK_SIZE}" ]; then + ulimit -s 512 fi if [ -n "$USE_VALGRIND" ]; then "${BASE_ROOT_DIR}/ci/test/wrap-valgrind.sh" fi +if [ "$RUN_CHECK_DEPS" = "true" ]; then + "${BASE_ROOT_DIR}/contrib/devtools/check-deps.sh" "${BASE_BUILD_DIR}" +fi + if [ "$RUN_UNIT_TESTS" = "true" ]; then - bash -c "${TEST_RUNNER_ENV} DIR_UNIT_TEST_DATA=${DIR_UNIT_TEST_DATA} LD_LIBRARY_PATH=${DEPENDS_DIR}/${HOST}/lib make $MAKEJOBS check VERBOSE=1" + DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" \ + LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \ + CTEST_OUTPUT_ON_FAILURE=ON \ + ctest --test-dir "${BASE_BUILD_DIR}" \ + --stop-on-failure \ + "${MAKEJOBS}" \ + --timeout $(( TEST_RUNNER_TIMEOUT_FACTOR * 60 )) fi if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then - bash -c "${TEST_RUNNER_ENV} DIR_UNIT_TEST_DATA=${DIR_UNIT_TEST_DATA} LD_LIBRARY_PATH=${DEPENDS_DIR}/${HOST}/lib ${BASE_OUTDIR}/bin/test_bitcoin --catch_system_errors=no -l test_suite" + DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${BASE_OUTDIR}"/bin/test_bitcoin --catch_system_errors=no -l test_suite fi if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then - bash -c "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=99999999 --timeout-factor=${TEST_RUNNER_TIMEOUT_FACTOR} ${TEST_RUNNER_EXTRA} --quiet --failfast" + # parses TEST_RUNNER_EXTRA as an array which allows for multiple arguments such as TEST_RUNNER_EXTRA='--exclude "rpc_bind.py --ipv6"' + eval "TEST_RUNNER_EXTRA=($TEST_RUNNER_EXTRA)" + LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \ + "${BASE_BUILD_DIR}/test/functional/test_runner.py" \ + --ci "${MAKEJOBS}" \ + --tmpdirprefix "${BASE_SCRATCH_DIR}/test_runner/" \ + --ansi \ + --combinedlogslen=99999999 \ + --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" \ + "${TEST_RUNNER_EXTRA[@]}" \ + --quiet \ + --failfast fi if [ "${RUN_TIDY}" = "true" ]; then @@ -180,18 +187,22 @@ if [ "${RUN_TIDY}" = "true" ]; then cmake --build /tidy-build --target bitcoin-tidy-tests "$MAKEJOBS" set -eo pipefail - cd "${BASE_BUILD_DIR}/bitcoin-$HOST/src/" - ( run-clang-tidy-"${TIDY_LLVM_V}" -quiet -load="/tidy-build/libbitcoin-tidy.so" "${MAKEJOBS}" ) | grep -C5 "error" - # Filter out files by regex here, because regex may not be - # accepted in src/.bear-tidy-config # Filter out: # * qt qrc and moc generated files - jq 'map(select(.file | test("src/qt/qrc_.*\\.cpp$|/moc_.*\\.cpp$") | not))' ../compile_commands.json > tmp.json - mv tmp.json ../compile_commands.json - cd "${BASE_BUILD_DIR}/bitcoin-$HOST/" + jq 'map(select(.file | test("src/qt/.*_autogen/.*\\.cpp$") | not))' "${BASE_BUILD_DIR}/compile_commands.json" > tmp.json + mv tmp.json "${BASE_BUILD_DIR}/compile_commands.json" + + cd "${BASE_BUILD_DIR}/src/" + if ! ( run-clang-tidy-"${TIDY_LLVM_V}" -quiet -load="/tidy-build/libbitcoin-tidy.so" "${MAKEJOBS}" | tee tmp.tidy-out.txt ); then + grep -C5 "error: " tmp.tidy-out.txt + echo "^^^ ⚠️ Failure generated from clang-tidy" + false + fi + + cd "${BASE_ROOT_DIR}" python3 "/include-what-you-use/iwyu_tool.py" \ - -p . "${MAKEJOBS}" \ - -- -Xiwyu --cxx17ns -Xiwyu --mapping_file="${BASE_BUILD_DIR}/bitcoin-$HOST/contrib/devtools/iwyu/bitcoin.core.imp" \ + -p "${BASE_BUILD_DIR}" "${MAKEJOBS}" \ + -- -Xiwyu --cxx17ns -Xiwyu --mapping_file="${BASE_ROOT_DIR}/contrib/devtools/iwyu/bitcoin.core.imp" \ -Xiwyu --max_line_length=160 \ 2>&1 | tee /tmp/iwyu_ci.out cd "${BASE_ROOT_DIR}/src" @@ -200,5 +211,12 @@ if [ "${RUN_TIDY}" = "true" ]; then fi if [ "$RUN_FUZZ_TESTS" = "true" ]; then - bash -c "LD_LIBRARY_PATH=${DEPENDS_DIR}/${HOST}/lib test/fuzz/test_runner.py ${FUZZ_TESTS_CONFIG} $MAKEJOBS -l DEBUG ${DIR_FUZZ_IN} --empty_min_time=60" + # shellcheck disable=SC2086 + LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" \ + "${BASE_BUILD_DIR}/test/fuzz/test_runner.py" \ + ${FUZZ_TESTS_CONFIG} \ + "${MAKEJOBS}" \ + -l DEBUG \ + "${DIR_FUZZ_IN}" \ + --empty_min_time=60 fi diff --git a/ci/test/GetCMakeLogFiles.cmake b/ci/test/GetCMakeLogFiles.cmake new file mode 100644 index 00000000..80f71dcf --- /dev/null +++ b/ci/test/GetCMakeLogFiles.cmake @@ -0,0 +1,11 @@ +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.26) + set(log_files "CMakeFiles/CMakeConfigureLog.yaml") +else() + set(log_files "CMakeFiles/CMakeOutput.log CMakeFiles/CMakeError.log") +endif() + +execute_process(COMMAND ${CMAKE_COMMAND} -E echo ${log_files}) diff --git a/ci/test/wrap-valgrind.sh b/ci/test/wrap-valgrind.sh index 27754831..e351cf24 100755 --- a/ci/test/wrap-valgrind.sh +++ b/ci/test/wrap-valgrind.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2018-2021 The Bitcoin Core developers +# Copyright (c) 2018-present The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -12,7 +12,7 @@ for b_name in "${BASE_OUTDIR}/bin"/*; do echo "Wrap $b ..." mv "$b" "${b}_orig" echo '#!/usr/bin/env bash' > "$b" - echo "valgrind --gen-suppressions=all --quiet --error-exitcode=1 --suppressions=${BASE_ROOT_DIR}/contrib/valgrind.supp \"${b}_orig\" \"\$@\"" >> "$b" + echo "exec valgrind --gen-suppressions=all --quiet --error-exitcode=1 --suppressions=${BASE_ROOT_DIR}/contrib/valgrind.supp \"${b}_orig\" \"\$@\"" >> "$b" chmod +x "$b" done done diff --git a/ci/test/wrap-wine.sh b/ci/test/wrap-wine.sh deleted file mode 100755 index 90e53887..00000000 --- a/ci/test/wrap-wine.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2020-2022 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/minisketch/test{,-verify},src/univalue/{test_json,unitester,object}}.exe; do - # shellcheck disable=SC2044 - for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name "$(basename "$b_name")"); do - if (file "$b" | grep "Windows"); then - echo "Wrap $b ..." - mv "$b" "${b}_orig" - echo '#!/usr/bin/env bash' > "$b" - echo "( wine \"${b}_orig\" \"\$@\" ) || ( sleep 1 && wine \"${b}_orig\" \"\$@\" )" >> "$b" - chmod +x "$b" - fi - done -done diff --git a/cmake/bitcoin-build-config.h.in b/cmake/bitcoin-build-config.h.in new file mode 100644 index 00000000..bf3ddcd7 --- /dev/null +++ b/cmake/bitcoin-build-config.h.in @@ -0,0 +1,115 @@ +// Copyright (c) 2023-present The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or https://opensource.org/license/mit/. + +#ifndef BITCOIN_CONFIG_H +#define BITCOIN_CONFIG_H + +/* Version Build */ +#define CLIENT_VERSION_BUILD @CLIENT_VERSION_BUILD@ + +/* Version is release */ +#define CLIENT_VERSION_IS_RELEASE @CLIENT_VERSION_IS_RELEASE@ + +/* Major version */ +#define CLIENT_VERSION_MAJOR @CLIENT_VERSION_MAJOR@ + +/* Minor version */ +#define CLIENT_VERSION_MINOR @CLIENT_VERSION_MINOR@ + +/* Copyright holder(s) before %s replacement */ +#define COPYRIGHT_HOLDERS "@COPYRIGHT_HOLDERS@" + +/* Copyright holder(s) */ +#define COPYRIGHT_HOLDERS_FINAL "@COPYRIGHT_HOLDERS_FINAL@" + +/* Replacement for %s in copyright holders string */ +#define COPYRIGHT_HOLDERS_SUBSTITUTION "@CLIENT_NAME@" + +/* Copyright year */ +#define COPYRIGHT_YEAR @COPYRIGHT_YEAR@ + +/* Define if external signer support is enabled */ +#cmakedefine ENABLE_EXTERNAL_SIGNER 1 + +/* Define to 1 to enable tracepoints for Userspace, Statically Defined Tracing + */ +#cmakedefine ENABLE_TRACING 1 + +/* Define to 1 to enable wallet functions. */ +#cmakedefine ENABLE_WALLET 1 + +/* Define to 1 if you have the declaration of `fork', and to 0 if you don't. + */ +#cmakedefine01 HAVE_DECL_FORK + +/* Define to 1 if '*ifaddrs' are available. */ +#cmakedefine HAVE_IFADDRS 1 + +/* Define to 1 if you have the declaration of `pipe2', and to 0 if you don't. + */ +#cmakedefine01 HAVE_DECL_PIPE2 + +/* Define to 1 if you have the declaration of `setsid', and to 0 if you don't. + */ +#cmakedefine01 HAVE_DECL_SETSID + +/* Define to 1 if fdatasync is available. */ +#cmakedefine HAVE_FDATASYNC 1 + +/* Define this symbol if the BSD getentropy system call is available with + sys/random.h */ +#cmakedefine HAVE_GETENTROPY_RAND 1 + +/* Define this symbol if the Linux getrandom function call is available */ +#cmakedefine HAVE_GETRANDOM 1 + +/* Define this symbol if you have malloc_info */ +#cmakedefine HAVE_MALLOC_INFO 1 + +/* Define this symbol if you have mallopt with M_ARENA_MAX */ +#cmakedefine HAVE_MALLOPT_ARENA_MAX 1 + +/* Define to 1 if O_CLOEXEC flag is available. */ +#cmakedefine01 HAVE_O_CLOEXEC + +/* Define this symbol if you have posix_fallocate */ +#cmakedefine HAVE_POSIX_FALLOCATE 1 + +/* Define this symbol if platform supports unix domain sockets */ +#cmakedefine HAVE_SOCKADDR_UN 1 + +/* Define this symbol to build code that uses getauxval */ +#cmakedefine HAVE_STRONG_GETAUXVAL 1 + +/* Define this symbol if the BSD sysctl() is available */ +#cmakedefine HAVE_SYSCTL 1 + +/* Define this symbol if the BSD sysctl(KERN_ARND) is available */ +#cmakedefine HAVE_SYSCTL_ARND 1 + +/* Define to 1 if std::system or ::wsystem is available. */ +#cmakedefine HAVE_SYSTEM 1 + +/* Define to the address where bug reports for this package should be sent. */ +#define CLIENT_BUGREPORT "@CLIENT_BUGREPORT@" + +/* Define to the full name of this package. */ +#define CLIENT_NAME "@CLIENT_NAME@" + +/* Define to the home page for this package. */ +#define CLIENT_URL "@PROJECT_HOMEPAGE_URL@" + +/* Define to the version of this package. */ +#define CLIENT_VERSION_STRING "@CLIENT_VERSION_STRING@" + +/* Define to 1 if strerror_r returns char *. */ +#cmakedefine STRERROR_R_CHAR_P 1 + +/* Define if dbus support should be compiled in */ +#cmakedefine USE_DBUS 1 + +/* Define if QR support should be compiled in */ +#cmakedefine USE_QRCODE 1 + +#endif //BITCOIN_CONFIG_H diff --git a/cmake/ccache.cmake b/cmake/ccache.cmake new file mode 100644 index 00000000..0bfd3a41 --- /dev/null +++ b/cmake/ccache.cmake @@ -0,0 +1,30 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +if(NOT MSVC) + find_program(CCACHE_EXECUTABLE ccache) + if(CCACHE_EXECUTABLE) + execute_process( + COMMAND readlink -f ${CMAKE_CXX_COMPILER} + OUTPUT_VARIABLE compiler_resolved_link + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if(CCACHE_EXECUTABLE STREQUAL compiler_resolved_link AND NOT WITH_CCACHE) + list(APPEND configure_warnings + "Disabling ccache was attempted using -DWITH_CCACHE=${WITH_CCACHE}, but ccache masquerades as the compiler." + ) + set(WITH_CCACHE ON) + elseif(WITH_CCACHE) + list(APPEND CMAKE_C_COMPILER_LAUNCHER ${CCACHE_EXECUTABLE}) + list(APPEND CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_EXECUTABLE}) + endif() + else() + set(WITH_CCACHE OFF) + endif() +else() + set(WITH_CCACHE OFF) +endif() + +mark_as_advanced(CCACHE_EXECUTABLE) diff --git a/cmake/crc32c.cmake b/cmake/crc32c.cmake new file mode 100644 index 00000000..25f046bb --- /dev/null +++ b/cmake/crc32c.cmake @@ -0,0 +1,115 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +# This file is part of the transition from Autotools to CMake. Once CMake +# support has been merged we should switch to using the upstream CMake +# buildsystem. + +include(CheckCXXSourceCompiles) +include(CheckSourceCompilesWithFlags) + +# Check for __builtin_prefetch support in the compiler. +check_cxx_source_compiles(" + int main() { + char data = 0; + const char* address = &data; + __builtin_prefetch(address, 0, 0); + return 0; + } + " HAVE_BUILTIN_PREFETCH +) + +# Check for _mm_prefetch support in the compiler. +check_cxx_source_compiles(" + #if defined(_MSC_VER) + #include + #else + #include + #endif + + int main() { + char data = 0; + const char* address = &data; + _mm_prefetch(address, _MM_HINT_NTA); + return 0; + } + " HAVE_MM_PREFETCH +) + +# Check for SSE4.2 support in the compiler. +if(MSVC) + set(SSE42_CXXFLAGS /arch:AVX) +else() + set(SSE42_CXXFLAGS -msse4.2) +endif() +check_cxx_source_compiles_with_flags(" + #include + #if defined(_MSC_VER) + #include + #elif defined(__GNUC__) && defined(__SSE4_2__) + #include + #endif + + int main() { + uint64_t l = 0; + l = _mm_crc32_u8(l, 0); + l = _mm_crc32_u32(l, 0); + l = _mm_crc32_u64(l, 0); + return l; + } + " HAVE_SSE42 + CXXFLAGS ${SSE42_CXXFLAGS} +) + +# Check for ARMv8 w/ CRC and CRYPTO extensions support in the compiler. +set(ARM64_CRC_CXXFLAGS -march=armv8-a+crc+crypto) +check_cxx_source_compiles_with_flags(" + #include + #include + + int main() { + #ifdef __aarch64__ + __crc32cb(0, 0); __crc32ch(0, 0); __crc32cw(0, 0); __crc32cd(0, 0); + vmull_p64(0, 0); + #else + #error crc32c library does not support hardware acceleration on 32-bit ARM + #endif + return 0; + } + " HAVE_ARM64_CRC32C + CXXFLAGS ${ARM64_CRC_CXXFLAGS} +) + +add_library(crc32c STATIC EXCLUDE_FROM_ALL + ${PROJECT_SOURCE_DIR}/src/crc32c/src/crc32c.cc + ${PROJECT_SOURCE_DIR}/src/crc32c/src/crc32c_portable.cc +) +target_compile_definitions(crc32c PRIVATE + HAVE_BUILTIN_PREFETCH=$ + HAVE_MM_PREFETCH=$ + HAVE_STRONG_GETAUXVAL=$ + BYTE_ORDER_BIG_ENDIAN=$ + HAVE_SSE42=$ + HAVE_ARM64_CRC32C=$ +) +target_include_directories(crc32c + PUBLIC + $ +) +target_link_libraries(crc32c PRIVATE core_interface) +set_target_properties(crc32c PROPERTIES EXPORT_COMPILE_COMMANDS OFF) + +if(HAVE_SSE42) + set(_crc32_src ${PROJECT_SOURCE_DIR}/src/crc32c/src/crc32c_sse42.cc) + target_sources(crc32c PRIVATE ${_crc32_src}) + set_property(SOURCE ${_crc32_src} PROPERTY COMPILE_OPTIONS ${SSE42_CXXFLAGS}) +endif() + +if(HAVE_ARM64_CRC32C) + set(_crc32_src ${PROJECT_SOURCE_DIR}/src/crc32c/src/crc32c_arm64.cc) + target_sources(crc32c PRIVATE ${_crc32_src}) + set_property(SOURCE ${_crc32_src} PROPERTY COMPILE_OPTIONS ${ARM64_CRC_CXXFLAGS}) +endif() + +unset(_crc32_src) diff --git a/cmake/introspection.cmake b/cmake/introspection.cmake new file mode 100644 index 00000000..d2257633 --- /dev/null +++ b/cmake/introspection.cmake @@ -0,0 +1,213 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include(CheckCXXSourceCompiles) +include(CheckCXXSymbolExists) + +check_cxx_symbol_exists(O_CLOEXEC "fcntl.h" HAVE_O_CLOEXEC) +check_cxx_symbol_exists(fdatasync "unistd.h" HAVE_FDATASYNC) +check_cxx_symbol_exists(fork "unistd.h" HAVE_DECL_FORK) +check_cxx_symbol_exists(pipe2 "unistd.h" HAVE_DECL_PIPE2) +check_cxx_symbol_exists(setsid "unistd.h" HAVE_DECL_SETSID) + +if(NOT WIN32) + include(TestAppendRequiredLibraries) + test_append_socket_library(core_interface) +endif() + +include(TestAppendRequiredLibraries) +test_append_atomic_library(core_interface) + +# Even though ::system is part of the standard library, we still check +# for it, to support building targets that don't have it, such as iOS. +check_cxx_symbol_exists(std::system "cstdlib" HAVE_STD_SYSTEM) +check_cxx_symbol_exists(::_wsystem "stdlib.h" HAVE__WSYSTEM) +if(HAVE_STD_SYSTEM OR HAVE__WSYSTEM) + set(HAVE_SYSTEM 1) +endif() + +check_cxx_source_compiles(" + #include + + int main() + { + char buf[100]; + char* p{strerror_r(0, buf, sizeof buf)}; + (void)p; + } + " STRERROR_R_CHAR_P +) + +# Check for malloc_info (for memory statistics information in getmemoryinfo). +check_cxx_symbol_exists(malloc_info "malloc.h" HAVE_MALLOC_INFO) + +# Check for mallopt(M_ARENA_MAX) (to set glibc arenas). +check_cxx_source_compiles(" + #include + + int main() + { + mallopt(M_ARENA_MAX, 1); + } + " HAVE_MALLOPT_ARENA_MAX +) + +# Check for posix_fallocate(). +check_cxx_source_compiles(" + #include + + int main() + { + return posix_fallocate(0, 0, 0); + } + " HAVE_POSIX_FALLOCATE +) + +# Check for strong getauxval() support in the system headers. +check_cxx_source_compiles(" + #include + + int main() + { + getauxval(AT_HWCAP); + } + " HAVE_STRONG_GETAUXVAL +) + +# Check for UNIX sockets. +check_cxx_source_compiles(" + #include + #include + + int main() + { + struct sockaddr_un addr; + addr.sun_family = AF_UNIX; + } + " HAVE_SOCKADDR_UN +) + +# Check for different ways of gathering OS randomness: +# - Linux getrandom() +check_cxx_source_compiles(" + #include + + int main() + { + getrandom(nullptr, 32, 0); + } + " HAVE_GETRANDOM +) + +# - BSD getentropy() +check_cxx_source_compiles(" + #include + + int main() + { + getentropy(nullptr, 32); + } + " HAVE_GETENTROPY_RAND +) + + +# - BSD sysctl() +check_cxx_source_compiles(" + #include + #include + + #ifdef __linux__ + #error Don't use sysctl on Linux, it's deprecated even when it works + #endif + + int main() + { + sysctl(nullptr, 2, nullptr, nullptr, nullptr, 0); + } + " HAVE_SYSCTL +) + +# - BSD sysctl(KERN_ARND) +check_cxx_source_compiles(" + #include + #include + + #ifdef __linux__ + #error Don't use sysctl on Linux, it's deprecated even when it works + #endif + + int main() + { + static int name[2] = {CTL_KERN, KERN_ARND}; + sysctl(name, 2, nullptr, nullptr, nullptr, 0); + } + " HAVE_SYSCTL_ARND +) + +if(NOT MSVC) + include(CheckSourceCompilesWithFlags) + + # Check for SSE4.1 intrinsics. + set(SSE41_CXXFLAGS -msse4.1) + check_cxx_source_compiles_with_flags(" + #include + + int main() + { + __m128i a = _mm_set1_epi32(0); + __m128i b = _mm_set1_epi32(1); + __m128i r = _mm_blend_epi16(a, b, 0xFF); + return _mm_extract_epi32(r, 3); + } + " HAVE_SSE41 + CXXFLAGS ${SSE41_CXXFLAGS} + ) + + # Check for AVX2 intrinsics. + set(AVX2_CXXFLAGS -mavx -mavx2) + check_cxx_source_compiles_with_flags(" + #include + + int main() + { + __m256i l = _mm256_set1_epi32(0); + return _mm256_extract_epi32(l, 7); + } + " HAVE_AVX2 + CXXFLAGS ${AVX2_CXXFLAGS} + ) + + # Check for x86 SHA-NI intrinsics. + set(X86_SHANI_CXXFLAGS -msse4 -msha) + check_cxx_source_compiles_with_flags(" + #include + + int main() + { + __m128i i = _mm_set1_epi32(0); + __m128i j = _mm_set1_epi32(1); + __m128i k = _mm_set1_epi32(2); + return _mm_extract_epi32(_mm_sha256rnds2_epu32(i, j, k), 0); + } + " HAVE_X86_SHANI + CXXFLAGS ${X86_SHANI_CXXFLAGS} + ) + + # Check for ARMv8 SHA-NI intrinsics. + set(ARM_SHANI_CXXFLAGS -march=armv8-a+crypto) + check_cxx_source_compiles_with_flags(" + #include + + int main() + { + uint32x4_t a, b, c; + vsha256h2q_u32(a, b, c); + vsha256hq_u32(a, b, c); + vsha256su0q_u32(a, b); + vsha256su1q_u32(a, b, c); + } + " HAVE_ARM_SHANI + CXXFLAGS ${ARM_SHANI_CXXFLAGS} + ) +endif() diff --git a/cmake/leveldb.cmake b/cmake/leveldb.cmake new file mode 100644 index 00000000..572b2bed --- /dev/null +++ b/cmake/leveldb.cmake @@ -0,0 +1,103 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +# This file is part of the transition from Autotools to CMake. Once CMake +# support has been merged we should switch to using the upstream CMake +# buildsystem. + +include(CheckCXXSymbolExists) +check_cxx_symbol_exists(F_FULLFSYNC "fcntl.h" HAVE_FULLFSYNC) + +add_library(leveldb STATIC EXCLUDE_FROM_ALL + ${PROJECT_SOURCE_DIR}/src/leveldb/db/builder.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/db/c.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/db/db_impl.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/db/db_iter.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/db/dbformat.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/db/dumpfile.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/db/filename.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/db/log_reader.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/db/log_writer.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/db/memtable.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/db/repair.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/db/table_cache.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/db/version_edit.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/db/version_set.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/db/write_batch.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/table/block.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/table/block_builder.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/table/filter_block.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/table/format.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/table/iterator.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/table/merger.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/table/table.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/table/table_builder.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/table/two_level_iterator.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/util/arena.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/util/bloom.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/util/cache.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/util/coding.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/util/comparator.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/util/crc32c.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/util/env.cc + $<$>:${PROJECT_SOURCE_DIR}/src/leveldb/util/env_posix.cc> + $<$:${PROJECT_SOURCE_DIR}/src/leveldb/util/env_windows.cc> + ${PROJECT_SOURCE_DIR}/src/leveldb/util/filter_policy.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/util/hash.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/util/histogram.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/util/logging.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/util/options.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/util/status.cc + ${PROJECT_SOURCE_DIR}/src/leveldb/helpers/memenv/memenv.cc +) + +target_compile_definitions(leveldb + PRIVATE + HAVE_SNAPPY=0 + HAVE_CRC32C=1 + HAVE_FDATASYNC=$ + HAVE_FULLFSYNC=$ + HAVE_O_CLOEXEC=$ + FALLTHROUGH_INTENDED=[[fallthrough]] + $<$>:LEVELDB_PLATFORM_POSIX> + $<$:LEVELDB_PLATFORM_WINDOWS> + $<$:_UNICODE;UNICODE> +) +if(MINGW) + target_compile_definitions(leveldb + PRIVATE + __USE_MINGW_ANSI_STDIO=1 + ) +endif() + +target_include_directories(leveldb + PRIVATE + $ + PUBLIC + $ +) + +add_library(nowarn_leveldb_interface INTERFACE) +if(MSVC) + target_compile_options(nowarn_leveldb_interface INTERFACE + /wd4722 + ) + target_compile_definitions(nowarn_leveldb_interface INTERFACE + _CRT_NONSTDC_NO_WARNINGS + ) +else() + try_append_cxx_flags("-Wconditional-uninitialized" TARGET nowarn_leveldb_interface SKIP_LINK + IF_CHECK_PASSED "-Wno-conditional-uninitialized" + ) +endif() + +target_link_libraries(leveldb PRIVATE + core_interface + nowarn_leveldb_interface + crc32c +) + +set_target_properties(leveldb PROPERTIES + EXPORT_COMPILE_COMMANDS OFF +) diff --git a/cmake/libmultiprocess.cmake b/cmake/libmultiprocess.cmake new file mode 100644 index 00000000..5db8f4e9 --- /dev/null +++ b/cmake/libmultiprocess.cmake @@ -0,0 +1,38 @@ +# Copyright (c) 2025 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +function(add_libmultiprocess subdir) + # Set BUILD_TESTING to match BUILD_TESTS. BUILD_TESTING is a standard cmake + # option that controls whether enable_testing() is called, but in the bitcoin + # build a BUILD_TESTS option is used instead. + set(BUILD_TESTING "${BUILD_TESTS}") + add_subdirectory(${subdir} EXCLUDE_FROM_ALL) + # Apply core_interface compile options to libmultiprocess runtime library. + target_link_libraries(multiprocess PUBLIC $) + target_link_libraries(mputil PUBLIC $) + target_link_libraries(mpgen PUBLIC $) + # Mark capproto options as advanced to hide by default from cmake UI + mark_as_advanced(CapnProto_DIR) + mark_as_advanced(CapnProto_capnpc_IMPORTED_LOCATION) + mark_as_advanced(CapnProto_capnp_IMPORTED_LOCATION) + mark_as_advanced(CapnProto_capnp-json_IMPORTED_LOCATION) + mark_as_advanced(CapnProto_capnp-rpc_IMPORTED_LOCATION) + mark_as_advanced(CapnProto_capnp-websocket_IMPORTED_LOCATION) + mark_as_advanced(CapnProto_kj-async_IMPORTED_LOCATION) + mark_as_advanced(CapnProto_kj-gzip_IMPORTED_LOCATION) + mark_as_advanced(CapnProto_kj-http_IMPORTED_LOCATION) + mark_as_advanced(CapnProto_kj_IMPORTED_LOCATION) + mark_as_advanced(CapnProto_kj-test_IMPORTED_LOCATION) + mark_as_advanced(CapnProto_kj-tls_IMPORTED_LOCATION) + if(BUILD_TESTS) + # Add tests to "all" target so ctest can run them + set_target_properties(mptests PROPERTIES EXCLUDE_FROM_ALL OFF) + endif() + # Exclude examples from compilation database, because the examples are not + # built by default, and they contain generated c++ code. Without this + # exclusion, tools like clang-tidy and IWYU that make use of compilation + # database would complain that the generated c++ source files do not exist. An + # alternate fix could build "mpexamples" by default like "mptests" above. + set_target_properties(mpcalculator mpprinter mpexample PROPERTIES EXPORT_COMPILE_COMMANDS OFF) +endfunction() diff --git a/cmake/minisketch.cmake b/cmake/minisketch.cmake new file mode 100644 index 00000000..5f57d25e --- /dev/null +++ b/cmake/minisketch.cmake @@ -0,0 +1,89 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include(CheckSourceCompilesWithFlags) + +# Check for clmul instructions support. +if(MSVC) + set(CLMUL_CXXFLAGS "") +else() + set(CLMUL_CXXFLAGS -mpclmul) +endif() +check_cxx_source_compiles_with_flags(" + #include + #include + + int main() + { + __m128i a = _mm_cvtsi64_si128((uint64_t)7); + __m128i b = _mm_clmulepi64_si128(a, a, 37); + __m128i c = _mm_srli_epi64(b, 41); + __m128i d = _mm_xor_si128(b, c); + uint64_t e = _mm_cvtsi128_si64(d); + return e == 0; + } + " HAVE_CLMUL + CXXFLAGS ${CLMUL_CXXFLAGS} +) + +add_library(minisketch_common INTERFACE) +if(MSVC) + target_compile_options(minisketch_common INTERFACE + /wd4060 + /wd4065 + /wd4146 + /wd4244 + /wd4267 + ) +endif() + +add_library(minisketch STATIC EXCLUDE_FROM_ALL + ${PROJECT_SOURCE_DIR}/src/minisketch/src/minisketch.cpp + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/generic_1byte.cpp + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/generic_2bytes.cpp + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/generic_3bytes.cpp + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/generic_4bytes.cpp + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/generic_5bytes.cpp + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/generic_6bytes.cpp + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/generic_7bytes.cpp + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/generic_8bytes.cpp +) + +target_compile_definitions(minisketch + PRIVATE + DISABLE_DEFAULT_FIELDS + ENABLE_FIELD_32 +) + +target_include_directories(minisketch + PUBLIC + $ +) + +target_link_libraries(minisketch + PRIVATE + core_interface + minisketch_common +) + +set_target_properties(minisketch PROPERTIES + EXPORT_COMPILE_COMMANDS OFF +) + +if(HAVE_CLMUL) + set(_minisketch_clmul_src + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_1byte.cpp + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_2bytes.cpp + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_3bytes.cpp + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_4bytes.cpp + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_5bytes.cpp + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_6bytes.cpp + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_7bytes.cpp + ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_8bytes.cpp + ) + target_sources(minisketch PRIVATE ${_minisketch_clmul_src}) + set_property(SOURCE ${_minisketch_clmul_src} PROPERTY COMPILE_OPTIONS ${CLMUL_CXXFLAGS}) + target_compile_definitions(minisketch PRIVATE HAVE_CLMUL) + unset(_minisketch_clmul_src) +endif() diff --git a/cmake/module/AddBoostIfNeeded.cmake b/cmake/module/AddBoostIfNeeded.cmake new file mode 100644 index 00000000..e2eaf556 --- /dev/null +++ b/cmake/module/AddBoostIfNeeded.cmake @@ -0,0 +1,80 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +function(add_boost_if_needed) + #[=[ + TODO: Not all targets, which will be added in the future, require + Boost. Therefore, a proper check will be appropriate here. + + Implementation notes: + Although only Boost headers are used to build Bitcoin Core, + we still leverage a standard CMake's approach to handle + dependencies, i.e., the Boost::headers "library". + A command target_link_libraries(target PRIVATE Boost::headers) + will propagate Boost::headers usage requirements to the target. + For Boost::headers such usage requirements is an include + directory and other added INTERFACE properties. + ]=] + + if(CMAKE_HOST_APPLE) + find_program(HOMEBREW_EXECUTABLE brew) + if(HOMEBREW_EXECUTABLE) + execute_process( + COMMAND ${HOMEBREW_EXECUTABLE} --prefix boost + OUTPUT_VARIABLE Boost_ROOT + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + endif() + endif() + + find_package(Boost 1.73.0 REQUIRED CONFIG) + mark_as_advanced(Boost_INCLUDE_DIR boost_headers_DIR) + # Workaround for a bug in NetBSD pkgsrc. + # See: https://github.com/NetBSD/pkgsrc/issues/167. + if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD") + get_filename_component(_boost_include_dir "${boost_headers_DIR}/../../../include/" ABSOLUTE) + set_target_properties(Boost::headers PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${_boost_include_dir} + ) + unset(_boost_include_dir) + endif() + set_target_properties(Boost::headers PROPERTIES IMPORTED_GLOBAL TRUE) + target_compile_definitions(Boost::headers INTERFACE + # We don't use multi_index serialization. + BOOST_MULTI_INDEX_DISABLE_SERIALIZATION + ) + if(DEFINED VCPKG_TARGET_TRIPLET) + # Workaround for https://github.com/microsoft/vcpkg/issues/36955. + target_compile_definitions(Boost::headers INTERFACE + BOOST_NO_USER_CONFIG + ) + endif() + + # Prevent use of std::unary_function, which was removed in C++17, + # and will generate warnings with newer compilers for Boost + # older than 1.80. + # See: https://github.com/boostorg/config/pull/430. + set(CMAKE_REQUIRED_DEFINITIONS -DBOOST_NO_CXX98_FUNCTION_BASE) + get_target_property(CMAKE_REQUIRED_INCLUDES Boost::headers INTERFACE_INCLUDE_DIRECTORIES) + set(CMAKE_REQUIRED_FLAGS ${working_compiler_werror_flag}) + set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) + include(CheckCXXSourceCompiles) + check_cxx_source_compiles(" + #include + " NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE + ) + if(NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE) + target_compile_definitions(Boost::headers INTERFACE + BOOST_NO_CXX98_FUNCTION_BASE + ) + endif() + + # Some package managers, such as vcpkg, vendor Boost.Test separately + # from the rest of the headers, so we have to check for it individually. + if(BUILD_TESTS AND DEFINED VCPKG_TARGET_TRIPLET) + find_package(boost_included_unit_test_framework ${Boost_VERSION} EXACT REQUIRED CONFIG) + endif() + +endfunction() diff --git a/cmake/module/AddWindowsResources.cmake b/cmake/module/AddWindowsResources.cmake new file mode 100644 index 00000000..84c1ba85 --- /dev/null +++ b/cmake/module/AddWindowsResources.cmake @@ -0,0 +1,24 @@ +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include_guard(GLOBAL) + +function(add_windows_resources target rc_file) + if(WIN32) + target_sources(${target} PRIVATE ${rc_file}) + endif() +endfunction() + +# Add a fusion manifest to Windows executables. +# See: https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests +function(add_windows_application_manifest target) + if(WIN32) + configure_file(${PROJECT_SOURCE_DIR}/cmake/windows-app.manifest.in ${target}.manifest USE_SOURCE_PERMISSIONS) + file(CONFIGURE + OUTPUT ${target}-manifest.rc + CONTENT "1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ \"${target}.manifest\"" + ) + add_windows_resources(${target} ${CMAKE_CURRENT_BINARY_DIR}/${target}-manifest.rc) + endif() +endfunction() diff --git a/cmake/module/CheckLinkerSupportsPIE.cmake b/cmake/module/CheckLinkerSupportsPIE.cmake new file mode 100644 index 00000000..f3897e56 --- /dev/null +++ b/cmake/module/CheckLinkerSupportsPIE.cmake @@ -0,0 +1,27 @@ +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include_guard(GLOBAL) + +function(check_linker_supports_pie warnings) + # Workaround for a bug in the check_pie_supported() function. + # See: + # - https://gitlab.kitware.com/cmake/cmake/-/issues/26463 + # - https://gitlab.kitware.com/cmake/cmake/-/merge_requests/10034 + if(CMAKE_VERSION VERSION_LESS 3.32) + # CMAKE_CXX_COMPILE_OPTIONS_PIE is a list, whereas CMAKE_REQUIRED_FLAGS + # must be a string. Therefore, a proper conversion is required. + list(JOIN CMAKE_CXX_COMPILE_OPTIONS_PIE " " CMAKE_REQUIRED_FLAGS) + endif() + + include(CheckPIESupported) + check_pie_supported(OUTPUT_VARIABLE output LANGUAGES CXX) + if(CMAKE_CXX_LINK_PIE_SUPPORTED) + set(CMAKE_POSITION_INDEPENDENT_CODE ON PARENT_SCOPE) + elseif(NOT WIN32) + # The warning is superfluous for Windows. + message(WARNING "PIE is not supported at link time. See the configure log for details.") + set(${warnings} ${${warnings}} "Position independent code disabled." PARENT_SCOPE) + endif() +endfunction() diff --git a/cmake/module/CheckSourceCompilesWithFlags.cmake b/cmake/module/CheckSourceCompilesWithFlags.cmake new file mode 100644 index 00000000..02bd7265 --- /dev/null +++ b/cmake/module/CheckSourceCompilesWithFlags.cmake @@ -0,0 +1,34 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include_guard(GLOBAL) + +#[=[ +Check once if C++ source code can be compiled. + +Options: + + CXXFLAGS - A list of additional flags to pass to the compiler. + + LDFLAGS - A list of additional flags to pass to the linker. + + LINK_LIBRARIES - A list of libraries to add to the link command. + +For historical reasons, among the CMake `CMAKE_REQUIRED_*` variables that influence +`check_cxx_source_compiles()`, only `CMAKE_REQUIRED_FLAGS` is a string rather than +a list. Additionally, `target_compile_options()` also expects a list of options. + +The `check_cxx_source_compiles_with_flags()` function handles this case and accepts +`CXXFLAGS` as a list, simplifying the code at the caller site. + +#]=] +function(check_cxx_source_compiles_with_flags source result_var) + cmake_parse_arguments(PARSE_ARGV 2 _ "" "" "CXXFLAGS;LDFLAGS;LINK_LIBRARIES") + list(JOIN __CXXFLAGS " " CMAKE_REQUIRED_FLAGS) + set(CMAKE_REQUIRED_LINK_OPTIONS ${__LDFLAGS}) + set(CMAKE_REQUIRED_LIBRARIES ${__LINK_LIBRARIES}) + include(CheckCXXSourceCompiles) + check_cxx_source_compiles("${source}" ${result_var}) + set(${result_var} ${${result_var}} PARENT_SCOPE) +endfunction() diff --git a/cmake/module/FindLibevent.cmake b/cmake/module/FindLibevent.cmake new file mode 100644 index 00000000..c006b43d --- /dev/null +++ b/cmake/module/FindLibevent.cmake @@ -0,0 +1,86 @@ +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +#[=======================================================================[ +FindLibevent +------------ + +Finds the Libevent headers and libraries. + +This is a wrapper around find_package()/pkg_check_modules() commands that: + - facilitates searching in various build environments + - prints a standard log message + +#]=======================================================================] + +# Check whether evhttp_connection_get_peer expects const char**. +# See https://github.com/libevent/libevent/commit/a18301a2bb160ff7c3ffaf5b7653c39ffe27b385 +function(check_evhttp_connection_get_peer target) + include(CMakePushCheckState) + cmake_push_check_state(RESET) + set(CMAKE_REQUIRED_LIBRARIES ${target}) + include(CheckCXXSourceCompiles) + check_cxx_source_compiles(" + #include + #include + + int main() + { + evhttp_connection* conn = (evhttp_connection*)1; + const char* host; + uint16_t port; + evhttp_connection_get_peer(conn, &host, &port); + } + " HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR + ) + cmake_pop_check_state() + target_compile_definitions(${target} INTERFACE + $<$:HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR> + ) +endfunction() + +set(_libevent_components core extra) +if(NOT WIN32) + list(APPEND _libevent_components pthreads) +endif() + +find_package(Libevent ${Libevent_FIND_VERSION} QUIET + NO_MODULE +) + +include(FindPackageHandleStandardArgs) +if(Libevent_FOUND) + find_package(Libevent ${Libevent_FIND_VERSION} QUIET + REQUIRED COMPONENTS ${_libevent_components} + NO_MODULE + ) + find_package_handle_standard_args(Libevent + REQUIRED_VARS Libevent_DIR + VERSION_VAR Libevent_VERSION + ) + check_evhttp_connection_get_peer(libevent::extra) +else() + find_package(PkgConfig REQUIRED) + foreach(component IN LISTS _libevent_components) + pkg_check_modules(libevent_${component} + REQUIRED QUIET + IMPORTED_TARGET GLOBAL + libevent_${component}>=${Libevent_FIND_VERSION} + ) + if(TARGET PkgConfig::libevent_${component} AND NOT TARGET libevent::${component}) + add_library(libevent::${component} ALIAS PkgConfig::libevent_${component}) + endif() + endforeach() + find_package_handle_standard_args(Libevent + REQUIRED_VARS libevent_core_LIBRARY_DIRS + VERSION_VAR libevent_core_VERSION + ) + check_evhttp_connection_get_peer(PkgConfig::libevent_extra) +endif() + +unset(_libevent_components) + +mark_as_advanced(Libevent_DIR) +mark_as_advanced(_event_h) +mark_as_advanced(_event_lib) diff --git a/cmake/module/FindQRencode.cmake b/cmake/module/FindQRencode.cmake new file mode 100644 index 00000000..575bfecc --- /dev/null +++ b/cmake/module/FindQRencode.cmake @@ -0,0 +1,71 @@ +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +#[=======================================================================[ +FindQRencode +------------ + +Finds the QRencode header and library. + +This is a wrapper around find_package()/pkg_check_modules() commands that: + - facilitates searching in various build environments + - prints a standard log message + +#]=======================================================================] + +find_package(PkgConfig QUIET) +if(PKG_CONFIG_FOUND) + pkg_check_modules(PC_QRencode QUIET libqrencode) +endif() + +find_path(QRencode_INCLUDE_DIR + NAMES qrencode.h + HINTS ${PC_QRencode_INCLUDE_DIRS} +) + +find_library(QRencode_LIBRARY_RELEASE + NAMES qrencode + HINTS ${PC_QRencode_LIBRARY_DIRS} +) +find_library(QRencode_LIBRARY_DEBUG + NAMES qrencoded qrencode + HINTS ${PC_QRencode_LIBRARY_DIRS} +) +include(SelectLibraryConfigurations) +select_library_configurations(QRencode) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(QRencode + REQUIRED_VARS QRencode_LIBRARY QRencode_INCLUDE_DIR + VERSION_VAR PC_QRencode_VERSION +) + +if(QRencode_FOUND) + if(NOT TARGET QRencode::QRencode) + add_library(QRencode::QRencode UNKNOWN IMPORTED) + endif() + if(QRencode_LIBRARY_RELEASE) + set_property(TARGET QRencode::QRencode APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE + ) + set_target_properties(QRencode::QRencode PROPERTIES + IMPORTED_LOCATION_RELEASE "${QRencode_LIBRARY_RELEASE}" + ) + endif() + if(QRencode_LIBRARY_DEBUG) + set_property(TARGET QRencode::QRencode APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG + ) + set_target_properties(QRencode::QRencode PROPERTIES + IMPORTED_LOCATION_DEBUG "${QRencode_LIBRARY_DEBUG}" + ) + endif() + set_target_properties(QRencode::QRencode PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${QRencode_INCLUDE_DIR}" + ) +endif() + +mark_as_advanced( + QRencode_INCLUDE_DIR +) diff --git a/cmake/module/FindQt.cmake b/cmake/module/FindQt.cmake new file mode 100644 index 00000000..d98af5bb --- /dev/null +++ b/cmake/module/FindQt.cmake @@ -0,0 +1,45 @@ +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +#[=======================================================================[ +FindQt +------ + +Finds the Qt headers and libraries. + +This is a wrapper around find_package() command that: + - facilitates searching in various build environments + - prints a standard log message + +#]=======================================================================] + +set(_qt_homebrew_prefix) +if(CMAKE_HOST_APPLE) + find_program(HOMEBREW_EXECUTABLE brew) + if(HOMEBREW_EXECUTABLE) + execute_process( + COMMAND ${HOMEBREW_EXECUTABLE} --prefix qt@${Qt_FIND_VERSION_MAJOR} + OUTPUT_VARIABLE _qt_homebrew_prefix + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + endif() +endif() + +find_package(Qt${Qt_FIND_VERSION_MAJOR} ${Qt_FIND_VERSION} + COMPONENTS ${Qt_FIND_COMPONENTS} + HINTS ${_qt_homebrew_prefix} + PATH_SUFFIXES Qt${Qt_FIND_VERSION_MAJOR} # Required on OpenBSD systems. +) +unset(_qt_homebrew_prefix) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Qt + REQUIRED_VARS Qt${Qt_FIND_VERSION_MAJOR}_DIR + VERSION_VAR Qt${Qt_FIND_VERSION_MAJOR}_VERSION +) + +foreach(component IN LISTS Qt_FIND_COMPONENTS ITEMS "") + mark_as_advanced(Qt${Qt_FIND_VERSION_MAJOR}${component}_DIR) +endforeach() diff --git a/cmake/module/FindUSDT.cmake b/cmake/module/FindUSDT.cmake new file mode 100644 index 00000000..0be7c28f --- /dev/null +++ b/cmake/module/FindUSDT.cmake @@ -0,0 +1,67 @@ +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +#[=======================================================================[ +FindUSDT +-------- + +Finds the Userspace, Statically Defined Tracing header(s). + +Imported Targets +^^^^^^^^^^^^^^^^ + +This module provides imported target ``USDT::headers``, if +USDT has been found. + +Result Variables +^^^^^^^^^^^^^^^^ + +This module defines the following variables: + +``USDT_FOUND`` + "True" if USDT found. + +#]=======================================================================] + +find_path(USDT_INCLUDE_DIR + NAMES sys/sdt.h +) +mark_as_advanced(USDT_INCLUDE_DIR) + +if(USDT_INCLUDE_DIR) + include(CMakePushCheckState) + cmake_push_check_state(RESET) + + include(CheckCXXSourceCompiles) + set(CMAKE_REQUIRED_INCLUDES ${USDT_INCLUDE_DIR}) + check_cxx_source_compiles(" + // Setting SDT_USE_VARIADIC lets systemtap (sys/sdt.h) know that we want to use + // the optional variadic macros to define tracepoints. + #define SDT_USE_VARIADIC 1 + #include + + int main() + { + STAP_PROBEV(context, event); + int a, b, c, d, e, f, g; + STAP_PROBEV(context, event, a, b, c, d, e, f, g); + } + " HAVE_USDT_H + ) + + cmake_pop_check_state() +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(USDT + REQUIRED_VARS USDT_INCLUDE_DIR HAVE_USDT_H +) + +if(USDT_FOUND AND NOT TARGET USDT::headers) + add_library(USDT::headers INTERFACE IMPORTED) + set_target_properties(USDT::headers PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${USDT_INCLUDE_DIR}" + ) + set(ENABLE_TRACING TRUE) +endif() diff --git a/cmake/module/FindZeroMQ.cmake b/cmake/module/FindZeroMQ.cmake new file mode 100644 index 00000000..eecd9b24 --- /dev/null +++ b/cmake/module/FindZeroMQ.cmake @@ -0,0 +1,41 @@ +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +#[=======================================================================[ +FindZeroMQ +---------- + +Finds the ZeroMQ headers and library. + +This is a wrapper around find_package()/pkg_check_modules() commands that: + - facilitates searching in various build environments + - prints a standard log message + +#]=======================================================================] + +include(FindPackageHandleStandardArgs) +find_package(ZeroMQ ${ZeroMQ_FIND_VERSION} NO_MODULE QUIET) +if(ZeroMQ_FOUND) + find_package_handle_standard_args(ZeroMQ + REQUIRED_VARS ZeroMQ_DIR + VERSION_VAR ZeroMQ_VERSION + ) + if(TARGET libzmq) + add_library(zeromq ALIAS libzmq) + elseif(TARGET libzmq-static) + add_library(zeromq ALIAS libzmq-static) + endif() + mark_as_advanced(ZeroMQ_DIR) +else() + find_package(PkgConfig REQUIRED) + pkg_check_modules(libzmq QUIET + IMPORTED_TARGET + libzmq>=${ZeroMQ_FIND_VERSION} + ) + find_package_handle_standard_args(ZeroMQ + REQUIRED_VARS libzmq_LIBRARY_DIRS + VERSION_VAR libzmq_VERSION + ) + add_library(zeromq ALIAS PkgConfig::libzmq) +endif() diff --git a/cmake/module/FlagsSummary.cmake b/cmake/module/FlagsSummary.cmake new file mode 100644 index 00000000..91d1df90 --- /dev/null +++ b/cmake/module/FlagsSummary.cmake @@ -0,0 +1,74 @@ +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include_guard(GLOBAL) + +function(indent_message header content indent_num) + if(indent_num GREATER 0) + string(REPEAT " " ${indent_num} indentation) + string(REPEAT "." ${indent_num} tail) + string(REGEX REPLACE "${tail}$" "" header "${header}") + endif() + message("${indentation}${header} ${content}") +endfunction() + +# Print tools' flags on best-effort. Include the abstracted +# CMake flags that we touch ourselves. +function(print_flags_per_config config indent_num) + string(TOUPPER "${config}" config_uppercase) + + include(GetTargetInterface) + get_target_interface(definitions "${config}" core_interface COMPILE_DEFINITIONS) + indent_message("Preprocessor defined macros ..........." "${definitions}" ${indent_num}) + + string(STRIP "${CMAKE_CXX_COMPILER_ARG1} ${CMAKE_CXX_FLAGS}" combined_cxx_flags) + string(STRIP "${combined_cxx_flags} ${CMAKE_CXX_FLAGS_${config_uppercase}}" combined_cxx_flags) + string(STRIP "${combined_cxx_flags} ${CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION}" combined_cxx_flags) + if(CMAKE_POSITION_INDEPENDENT_CODE) + string(JOIN " " combined_cxx_flags ${combined_cxx_flags} ${CMAKE_CXX_COMPILE_OPTIONS_PIC}) + endif() + get_target_interface(core_cxx_flags "${config}" core_interface COMPILE_OPTIONS) + string(STRIP "${combined_cxx_flags} ${core_cxx_flags}" combined_cxx_flags) + string(STRIP "${combined_cxx_flags} ${APPEND_CPPFLAGS}" combined_cxx_flags) + string(STRIP "${combined_cxx_flags} ${APPEND_CXXFLAGS}" combined_cxx_flags) + indent_message("C++ compiler flags ...................." "${combined_cxx_flags}" ${indent_num}) + + string(STRIP "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${config_uppercase}}" combined_linker_flags) + string(STRIP "${combined_linker_flags} ${CMAKE_EXE_LINKER_FLAGS}" combined_linker_flags) + get_target_interface(common_link_options "${config}" core_interface LINK_OPTIONS) + string(STRIP "${combined_linker_flags} ${common_link_options}" combined_linker_flags) + if(CMAKE_CXX_LINK_PIE_SUPPORTED) + string(JOIN " " combined_linker_flags ${combined_linker_flags} ${CMAKE_CXX_LINK_OPTIONS_PIE}) + endif() + string(STRIP "${combined_linker_flags} ${APPEND_LDFLAGS}" combined_linker_flags) + indent_message("Linker flags .........................." "${combined_linker_flags}" ${indent_num}) +endfunction() + +function(flags_summary) + get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(is_multi_config) + list(JOIN CMAKE_CONFIGURATION_TYPES ", " configs) + message("Available build configurations ........ ${configs}") + if(CMAKE_GENERATOR MATCHES "Visual Studio") + set(default_config "Debug") + else() + list(GET CMAKE_CONFIGURATION_TYPES 0 default_config) + endif() + message("Default build configuration ........... ${default_config}") + foreach(config IN LISTS CMAKE_CONFIGURATION_TYPES) + message("") + message("'${config}' build configuration:") + print_flags_per_config("${config}" 2) + endforeach() + else() + message("CMAKE_BUILD_TYPE ...................... ${CMAKE_BUILD_TYPE}") + print_flags_per_config("${CMAKE_BUILD_TYPE}" 0) + endif() + message("") + message([=[ +NOTE: The summary above may not exactly match the final applied build flags + if any additional CMAKE_* or environment variables have been modified. + To see the exact flags applied, build with the --verbose option. +]=]) +endfunction() diff --git a/cmake/module/GenerateSetupNsi.cmake b/cmake/module/GenerateSetupNsi.cmake new file mode 100644 index 00000000..c8d5bd67 --- /dev/null +++ b/cmake/module/GenerateSetupNsi.cmake @@ -0,0 +1,19 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +function(generate_setup_nsi) + set(abs_top_srcdir ${PROJECT_SOURCE_DIR}) + set(abs_top_builddir ${PROJECT_BINARY_DIR}) + set(CLIENT_URL ${PROJECT_HOMEPAGE_URL}) + set(CLIENT_TARNAME "bitcoin") + set(BITCOIN_WRAPPER_NAME "bitcoin") + set(BITCOIN_GUI_NAME "bitcoin-qt") + set(BITCOIN_DAEMON_NAME "bitcoind") + set(BITCOIN_CLI_NAME "bitcoin-cli") + set(BITCOIN_TX_NAME "bitcoin-tx") + set(BITCOIN_WALLET_TOOL_NAME "bitcoin-wallet") + set(BITCOIN_TEST_NAME "test_bitcoin") + set(EXEEXT ${CMAKE_EXECUTABLE_SUFFIX}) + configure_file(${PROJECT_SOURCE_DIR}/share/setup.nsi.in ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.nsi USE_SOURCE_PERMISSIONS @ONLY) +endfunction() diff --git a/cmake/module/GetTargetInterface.cmake b/cmake/module/GetTargetInterface.cmake new file mode 100644 index 00000000..1e455d45 --- /dev/null +++ b/cmake/module/GetTargetInterface.cmake @@ -0,0 +1,53 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include_guard(GLOBAL) + +# Evaluates config-specific generator expressions in a list. +# Recognizable patterns are: +# - $<$:[value]> +# - $<$>:[value]> +function(evaluate_generator_expressions list config) + set(input ${${list}}) + set(result) + foreach(token IN LISTS input) + if(token MATCHES "\\$<\\$]+)>:([^>]+)>") + if(CMAKE_MATCH_1 STREQUAL config) + list(APPEND result ${CMAKE_MATCH_2}) + endif() + elseif(token MATCHES "\\$<\\$]+)>>:([^>]+)>") + if(NOT CMAKE_MATCH_1 STREQUAL config) + list(APPEND result ${CMAKE_MATCH_2}) + endif() + else() + list(APPEND result ${token}) + endif() + endforeach() + set(${list} ${result} PARENT_SCOPE) +endfunction() + + +# Gets target's interface properties recursively. +function(get_target_interface var config target property) + get_target_property(result ${target} INTERFACE_${property}) + if(result) + evaluate_generator_expressions(result "${config}") + list(JOIN result " " result) + else() + set(result) + endif() + + get_target_property(dependencies ${target} INTERFACE_LINK_LIBRARIES) + if(dependencies) + evaluate_generator_expressions(dependencies "${config}") + foreach(dependency IN LISTS dependencies) + if(TARGET ${dependency}) + get_target_interface(dep_result "${config}" ${dependency} ${property}) + string(STRIP "${result} ${dep_result}" result) + endif() + endforeach() + endif() + + set(${var} "${result}" PARENT_SCOPE) +endfunction() diff --git a/cmake/module/InstallBinaryComponent.cmake b/cmake/module/InstallBinaryComponent.cmake new file mode 100644 index 00000000..c7b2ed9a --- /dev/null +++ b/cmake/module/InstallBinaryComponent.cmake @@ -0,0 +1,26 @@ +# Copyright (c) 2025-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include_guard(GLOBAL) +include(GNUInstallDirs) + +function(install_binary_component component) + cmake_parse_arguments(PARSE_ARGV 1 + IC # prefix + "HAS_MANPAGE" # options + "" # one_value_keywords + "" # multi_value_keywords + ) + set(target_name ${component}) + install(TARGETS ${target_name} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT ${component} + ) + if(INSTALL_MAN AND IC_HAS_MANPAGE) + install(FILES ${PROJECT_SOURCE_DIR}/doc/man/${target_name}.1 + DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 + COMPONENT ${component} + ) + endif() +endfunction() diff --git a/cmake/module/Maintenance.cmake b/cmake/module/Maintenance.cmake new file mode 100644 index 00000000..52fc7fab --- /dev/null +++ b/cmake/module/Maintenance.cmake @@ -0,0 +1,144 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include_guard(GLOBAL) + +function(setup_split_debug_script) + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + set(OBJCOPY ${CMAKE_OBJCOPY}) + set(STRIP ${CMAKE_STRIP}) + configure_file( + contrib/devtools/split-debug.sh.in split-debug.sh + FILE_PERMISSIONS OWNER_READ OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ + @ONLY + ) + endif() +endfunction() + +function(add_maintenance_targets) + if(NOT TARGET Python3::Interpreter) + return() + endif() + + foreach(target IN ITEMS bitcoin bitcoind bitcoin-qt bitcoin-cli bitcoin-tx bitcoin-util bitcoin-wallet test_bitcoin bench_bitcoin) + if(TARGET ${target}) + list(APPEND executables $) + endif() + endforeach() + + add_custom_target(check-symbols + COMMAND ${CMAKE_COMMAND} -E echo "Running symbol and dynamic library checks..." + COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/guix/symbol-check.py ${executables} + VERBATIM + ) + + add_custom_target(check-security + COMMAND ${CMAKE_COMMAND} -E echo "Checking binary security..." + COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/guix/security-check.py ${executables} + VERBATIM + ) +endfunction() + +function(add_windows_deploy_target) + if(MINGW AND TARGET bitcoin AND TARGET bitcoin-qt AND TARGET bitcoind AND TARGET bitcoin-cli AND TARGET bitcoin-tx AND TARGET bitcoin-wallet AND TARGET bitcoin-util AND TARGET test_bitcoin) + find_program(MAKENSIS_EXECUTABLE makensis) + if(NOT MAKENSIS_EXECUTABLE) + add_custom_target(deploy + COMMAND ${CMAKE_COMMAND} -E echo "Error: NSIS not found" + ) + return() + endif() + + # TODO: Consider replacing this code with the CPack NSIS Generator. + # See https://cmake.org/cmake/help/latest/cpack_gen/nsis.html + include(GenerateSetupNsi) + generate_setup_nsi() + add_custom_command( + OUTPUT ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.exe + COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/release + COMMAND ${CMAKE_STRIP} $ -o ${PROJECT_BINARY_DIR}/release/$ + COMMAND ${CMAKE_STRIP} $ -o ${PROJECT_BINARY_DIR}/release/$ + COMMAND ${CMAKE_STRIP} $ -o ${PROJECT_BINARY_DIR}/release/$ + COMMAND ${CMAKE_STRIP} $ -o ${PROJECT_BINARY_DIR}/release/$ + COMMAND ${CMAKE_STRIP} $ -o ${PROJECT_BINARY_DIR}/release/$ + COMMAND ${CMAKE_STRIP} $ -o ${PROJECT_BINARY_DIR}/release/$ + COMMAND ${CMAKE_STRIP} $ -o ${PROJECT_BINARY_DIR}/release/$ + COMMAND ${CMAKE_STRIP} $ -o ${PROJECT_BINARY_DIR}/release/$ + COMMAND ${MAKENSIS_EXECUTABLE} -V2 ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.nsi + VERBATIM + ) + add_custom_target(deploy DEPENDS ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.exe) + endif() +endfunction() + +function(add_macos_deploy_target) + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND TARGET bitcoin-qt) + set(macos_app "Bitcoin-Qt.app") + # Populate Contents subdirectory. + configure_file(${PROJECT_SOURCE_DIR}/share/qt/Info.plist.in ${macos_app}/Contents/Info.plist NO_SOURCE_PERMISSIONS) + file(CONFIGURE OUTPUT ${macos_app}/Contents/PkgInfo CONTENT "APPL????") + # Populate Contents/Resources subdirectory. + file(CONFIGURE OUTPUT ${macos_app}/Contents/Resources/empty.lproj CONTENT "") + configure_file(${PROJECT_SOURCE_DIR}/src/qt/res/icons/bitcoin.icns ${macos_app}/Contents/Resources/bitcoin.icns NO_SOURCE_PERMISSIONS COPYONLY) + file(CONFIGURE OUTPUT ${macos_app}/Contents/Resources/Base.lproj/InfoPlist.strings + CONTENT "{ CFBundleDisplayName = \"@CLIENT_NAME@\"; CFBundleName = \"@CLIENT_NAME@\"; }" + ) + + add_custom_command( + OUTPUT ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt + COMMAND ${CMAKE_COMMAND} --install ${PROJECT_BINARY_DIR} --config $ --component bitcoin-qt --prefix ${macos_app}/Contents/MacOS --strip + COMMAND ${CMAKE_COMMAND} -E rename ${macos_app}/Contents/MacOS/bin/$ ${macos_app}/Contents/MacOS/Bitcoin-Qt + COMMAND ${CMAKE_COMMAND} -E rm -rf ${macos_app}/Contents/MacOS/bin + COMMAND ${CMAKE_COMMAND} -E rm -rf ${macos_app}/Contents/MacOS/share + VERBATIM + ) + + string(REPLACE " " "-" osx_volname ${CLIENT_NAME}) + if(CMAKE_HOST_APPLE) + add_custom_command( + OUTPUT ${PROJECT_BINARY_DIR}/${osx_volname}.zip + COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR} -zip + DEPENDS ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt + VERBATIM + ) + add_custom_target(deploydir + DEPENDS ${PROJECT_BINARY_DIR}/${osx_volname}.zip + ) + add_custom_target(deploy + DEPENDS ${PROJECT_BINARY_DIR}/${osx_volname}.zip + ) + else() + add_custom_command( + OUTPUT ${PROJECT_BINARY_DIR}/dist/${macos_app}/Contents/MacOS/Bitcoin-Qt + COMMAND ${CMAKE_COMMAND} -E env OBJDUMP=${CMAKE_OBJDUMP} $ ${PROJECT_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR} + DEPENDS ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt + VERBATIM + ) + add_custom_target(deploydir + DEPENDS ${PROJECT_BINARY_DIR}/dist/${macos_app}/Contents/MacOS/Bitcoin-Qt + ) + + find_program(ZIP_EXECUTABLE zip) + if(NOT ZIP_EXECUTABLE) + add_custom_target(deploy + COMMAND ${CMAKE_COMMAND} -E echo "Error: ZIP not found" + ) + else() + add_custom_command( + OUTPUT ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip + WORKING_DIRECTORY dist + COMMAND ${PROJECT_SOURCE_DIR}/cmake/script/macos_zip.sh ${ZIP_EXECUTABLE} ${osx_volname}.zip + VERBATIM + ) + add_custom_target(deploy + DEPENDS ${PROJECT_BINARY_DIR}/dist/${osx_volname}.zip + ) + endif() + endif() + add_dependencies(deploydir bitcoin-qt) + add_dependencies(deploy deploydir) + endif() +endfunction() diff --git a/cmake/module/ProcessConfigurations.cmake b/cmake/module/ProcessConfigurations.cmake new file mode 100644 index 00000000..d5426f6e --- /dev/null +++ b/cmake/module/ProcessConfigurations.cmake @@ -0,0 +1,166 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include_guard(GLOBAL) + +macro(normalize_string string) + string(REGEX REPLACE " +" " " ${string} "${${string}}") + string(STRIP "${${string}}" ${string}) +endmacro() + +function(are_flags_overridden flags_var result_var) + normalize_string(${flags_var}) + normalize_string(${flags_var}_INIT) + if(${flags_var} STREQUAL ${flags_var}_INIT) + set(${result_var} FALSE PARENT_SCOPE) + else() + set(${result_var} TRUE PARENT_SCOPE) + endif() +endfunction() + + +# Removes duplicated flags. The relative order of flags is preserved. +# If duplicates are encountered, only the last instance is preserved. +function(deduplicate_flags flags) + separate_arguments(${flags}) + list(REVERSE ${flags}) + list(REMOVE_DUPLICATES ${flags}) + list(REVERSE ${flags}) + list(JOIN ${flags} " " result) + set(${flags} "${result}" PARENT_SCOPE) +endfunction() + + +function(get_all_configs output) + get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(is_multi_config) + set(all_configs ${CMAKE_CONFIGURATION_TYPES}) + else() + get_property(all_configs CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS) + if(NOT all_configs) + # See https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#default-and-custom-configurations + set(all_configs Debug Release RelWithDebInfo MinSizeRel) + endif() + endif() + set(${output} "${all_configs}" PARENT_SCOPE) +endfunction() + + +#[=[ +Set the default build configuration. + +See: https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#build-configurations. + +On single-configuration generators, this function sets the CMAKE_BUILD_TYPE variable to +the default build configuration, which can be overridden by the user at configure time if needed. + +On multi-configuration generators, this function rearranges the CMAKE_CONFIGURATION_TYPES list, +ensuring that the default build configuration appears first while maintaining the order of the +remaining configurations. The user can choose a build configuration at build time. +]=] +function(set_default_config config) + get_all_configs(all_configs) + if(NOT ${config} IN_LIST all_configs) + message(FATAL_ERROR "The default config is \"${config}\", but must be one of ${all_configs}.") + endif() + + list(REMOVE_ITEM all_configs ${config}) + list(PREPEND all_configs ${config}) + + get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(is_multi_config) + get_property(help_string CACHE CMAKE_CONFIGURATION_TYPES PROPERTY HELPSTRING) + set(CMAKE_CONFIGURATION_TYPES "${all_configs}" CACHE STRING "${help_string}" FORCE) + # Also see https://gitlab.kitware.com/cmake/cmake/-/issues/19512. + set(CMAKE_TRY_COMPILE_CONFIGURATION "${config}" PARENT_SCOPE) + else() + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY + STRINGS "${all_configs}" + ) + if(NOT CMAKE_BUILD_TYPE) + message(STATUS "Setting build type to \"${config}\" as none was specified") + get_property(help_string CACHE CMAKE_BUILD_TYPE PROPERTY HELPSTRING) + set(CMAKE_BUILD_TYPE "${config}" CACHE STRING "${help_string}" FORCE) + endif() + set(CMAKE_TRY_COMPILE_CONFIGURATION "${CMAKE_BUILD_TYPE}" PARENT_SCOPE) + endif() +endfunction() + +function(remove_cxx_flag_from_all_configs flag) + get_all_configs(all_configs) + foreach(config IN LISTS all_configs) + string(TOUPPER "${config}" config_uppercase) + set(flags "${CMAKE_CXX_FLAGS_${config_uppercase}}") + separate_arguments(flags) + list(FILTER flags EXCLUDE REGEX "${flag}") + list(JOIN flags " " new_flags) + set(CMAKE_CXX_FLAGS_${config_uppercase} "${new_flags}" PARENT_SCOPE) + set(CMAKE_CXX_FLAGS_${config_uppercase} "${new_flags}" + CACHE STRING + "Flags used by the CXX compiler during ${config_uppercase} builds." + FORCE + ) + endforeach() +endfunction() + +function(replace_cxx_flag_in_config config old_flag new_flag) + string(TOUPPER "CMAKE_CXX_FLAGS_${config}" var_name) + if("${var_name}" IN_LIST precious_variables) + return() + endif() + string(REGEX REPLACE "(^| )${old_flag}( |$)" "\\1${new_flag}\\2" ${var_name} "${${var_name}}") + set(${var_name} "${${var_name}}" PARENT_SCOPE) + set_property(CACHE ${var_name} PROPERTY VALUE "${${var_name}}") +endfunction() + +set_default_config(RelWithDebInfo) + +include(TryAppendCXXFlags) + +# We leave assertions on. +if(MSVC) + remove_cxx_flag_from_all_configs(/DNDEBUG) +else() + remove_cxx_flag_from_all_configs(-DNDEBUG) + + # Adjust flags used by the CXX compiler during RELEASE builds. + # Prefer -O2 optimization level. (-O3 is CMake's default for Release for many compilers.) + replace_cxx_flag_in_config(Release -O3 -O2) + + are_flags_overridden(CMAKE_CXX_FLAGS_DEBUG cxx_flags_debug_overridden) + if(NOT cxx_flags_debug_overridden) + # Redefine flags used by the CXX compiler during DEBUG builds. + try_append_cxx_flags("-g3" RESULT_VAR compiler_supports_g3) + if(compiler_supports_g3) + replace_cxx_flag_in_config(Debug -g -g3) + endif() + unset(compiler_supports_g3) + + try_append_cxx_flags("-ftrapv" RESULT_VAR compiler_supports_ftrapv) + if(compiler_supports_ftrapv) + string(PREPEND CMAKE_CXX_FLAGS_DEBUG "-ftrapv ") + endif() + unset(compiler_supports_ftrapv) + + string(PREPEND CMAKE_CXX_FLAGS_DEBUG "-O0 ") + + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" + CACHE STRING + "Flags used by the CXX compiler during DEBUG builds." + FORCE + ) + endif() + unset(cxx_flags_debug_overridden) +endif() + +set(CMAKE_CXX_FLAGS_COVERAGE "-g -Og --coverage") +set(CMAKE_OBJCXX_FLAGS_COVERAGE "-g -Og --coverage") +set(CMAKE_EXE_LINKER_FLAGS_COVERAGE "--coverage") +set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE "--coverage") +get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(is_multi_config) + if(NOT "Coverage" IN_LIST CMAKE_CONFIGURATION_TYPES) + list(APPEND CMAKE_CONFIGURATION_TYPES Coverage) + endif() +endif() diff --git a/cmake/module/TargetDataSources.cmake b/cmake/module/TargetDataSources.cmake new file mode 100644 index 00000000..a549f9a2 --- /dev/null +++ b/cmake/module/TargetDataSources.cmake @@ -0,0 +1,55 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +macro(set_add_custom_command_options) + set(DEPENDS_EXPLICIT_OPT "") + if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.27) + set(DEPENDS_EXPLICIT_OPT DEPENDS_EXPLICIT_ONLY) + endif() + set(CODEGEN_OPT "") + if(POLICY CMP0171) + cmake_policy(GET CMP0171 _cmp0171_status) + if(_cmp0171_status STREQUAL "NEW") + set(CODEGEN_OPT CODEGEN) + endif() + unset(_cmp0171_status) + endif() +endmacro() + +# Specifies JSON data files to be processed into corresponding +# header files for inclusion when building a target. +function(target_json_data_sources target) + set_add_custom_command_options() + foreach(json_file IN LISTS ARGN) + set(header ${CMAKE_CURRENT_BINARY_DIR}/${json_file}.h) + add_custom_command( + OUTPUT ${header} + COMMAND ${CMAKE_COMMAND} -DJSON_SOURCE_PATH=${CMAKE_CURRENT_SOURCE_DIR}/${json_file} -DHEADER_PATH=${header} -P ${PROJECT_SOURCE_DIR}/cmake/script/GenerateHeaderFromJson.cmake + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${json_file} ${PROJECT_SOURCE_DIR}/cmake/script/GenerateHeaderFromJson.cmake + VERBATIM + ${CODEGEN_OPT} + ${DEPENDS_EXPLICIT_OPT} + ) + target_sources(${target} PRIVATE ${header}) + endforeach() +endfunction() + +# Specifies raw binary data files to be processed into corresponding +# header files for inclusion when building a target. +function(target_raw_data_sources target) + cmake_parse_arguments(PARSE_ARGV 1 _ "" "NAMESPACE" "") + set_add_custom_command_options() + foreach(raw_file IN LISTS __UNPARSED_ARGUMENTS) + set(header ${CMAKE_CURRENT_BINARY_DIR}/${raw_file}.h) + add_custom_command( + OUTPUT ${header} + COMMAND ${CMAKE_COMMAND} -DRAW_SOURCE_PATH=${CMAKE_CURRENT_SOURCE_DIR}/${raw_file} -DHEADER_PATH=${header} -DRAW_NAMESPACE=${__NAMESPACE} -P ${PROJECT_SOURCE_DIR}/cmake/script/GenerateHeaderFromRaw.cmake + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${raw_file} ${PROJECT_SOURCE_DIR}/cmake/script/GenerateHeaderFromRaw.cmake + VERBATIM + ${CODEGEN_OPT} + ${DEPENDS_EXPLICIT_OPT} + ) + target_sources(${target} PRIVATE ${header}) + endforeach() +endfunction() diff --git a/cmake/module/TestAppendRequiredLibraries.cmake b/cmake/module/TestAppendRequiredLibraries.cmake new file mode 100644 index 00000000..1fc339a9 --- /dev/null +++ b/cmake/module/TestAppendRequiredLibraries.cmake @@ -0,0 +1,95 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include_guard(GLOBAL) + +# Illumos/SmartOS requires linking with -lsocket if +# using getifaddrs & freeifaddrs. +# See: +# - https://github.com/bitcoin/bitcoin/pull/21486 +# - https://smartos.org/man/3socket/getifaddrs +function(test_append_socket_library target) + if (NOT TARGET ${target}) + message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION}() called with non-existent target \"${target}\".") + endif() + + set(check_socket_source " + #include + #include + + int main() { + struct ifaddrs* ifaddr; + getifaddrs(&ifaddr); + freeifaddrs(ifaddr); + } + ") + + include(CheckCXXSourceCompiles) + check_cxx_source_compiles("${check_socket_source}" IFADDR_LINKS_WITHOUT_LIBSOCKET) + if(NOT IFADDR_LINKS_WITHOUT_LIBSOCKET) + include(CheckSourceCompilesWithFlags) + check_cxx_source_compiles_with_flags("${check_socket_source}" IFADDR_NEEDS_LINK_TO_LIBSOCKET + LINK_LIBRARIES socket + ) + if(IFADDR_NEEDS_LINK_TO_LIBSOCKET) + target_link_libraries(${target} INTERFACE socket) + else() + message(FATAL_ERROR "Cannot figure out how to use getifaddrs/freeifaddrs.") + endif() + endif() + set(HAVE_IFADDRS TRUE PARENT_SCOPE) +endfunction() + +# Clang, when building for 32-bit, +# and linking against libstdc++, requires linking with +# -latomic if using the C++ atomic library. +# Can be tested with: clang++ -std=c++20 test.cpp -m32 +# +# Sourced from http://bugs.debian.org/797228 +function(test_append_atomic_library target) + if (NOT TARGET ${target}) + message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION}() called with non-existent target \"${target}\".") + endif() + + set(check_atomic_source " + #include + #include + #include + + using namespace std::chrono_literals; + + int main() { + std::atomic lock{true}; + lock.exchange(false); + + std::atomic t{0s}; + t.store(2s); + auto t1 = t.load(); + t.compare_exchange_strong(t1, 3s); + + std::atomic d{}; + d.store(3.14); + auto d1 = d.load(); + + std::atomic a{}; + int64_t v = 5; + int64_t r = a.fetch_add(v); + return static_cast(r); + } + ") + + include(CheckCXXSourceCompiles) + check_cxx_source_compiles("${check_atomic_source}" STD_ATOMIC_LINKS_WITHOUT_LIBATOMIC) + if(NOT STD_ATOMIC_LINKS_WITHOUT_LIBATOMIC) + include(CheckSourceCompilesWithFlags) + check_cxx_source_compiles_with_flags("${check_atomic_source}" STD_ATOMIC_NEEDS_LINK_TO_LIBATOMIC + LINK_LIBRARIES atomic + ) + if(STD_ATOMIC_NEEDS_LINK_TO_LIBATOMIC) + target_link_libraries(${target} INTERFACE atomic) + else() + message(FATAL_ERROR "Cannot figure out how to use std::atomic.") + endif() + endif() +endfunction() diff --git a/cmake/module/TryAppendCXXFlags.cmake b/cmake/module/TryAppendCXXFlags.cmake new file mode 100644 index 00000000..dc0a9b7f --- /dev/null +++ b/cmake/module/TryAppendCXXFlags.cmake @@ -0,0 +1,126 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include_guard(GLOBAL) +include(CheckCXXSourceCompiles) + +#[=[ +Add language-wide flags, which will be passed to all invocations of the compiler. +This includes invocations that drive compiling and those that drive linking. + +Usage examples: + + try_append_cxx_flags("-Wformat -Wformat-security" VAR warn_cxx_flags) + + + try_append_cxx_flags("-Wsuggest-override" VAR warn_cxx_flags + SOURCE "struct A { virtual void f(); }; struct B : A { void f() final; };" + ) + + + try_append_cxx_flags("-fsanitize=${SANITIZERS}" TARGET core_interface + RESULT_VAR cxx_supports_sanitizers + ) + if(NOT cxx_supports_sanitizers) + message(FATAL_ERROR "Compiler did not accept requested flags.") + endif() + + + try_append_cxx_flags("-Wunused-parameter" TARGET core_interface + IF_CHECK_PASSED "-Wno-unused-parameter" + ) + + +In configuration output, this function prints a string by the following pattern: + + -- Performing Test CXX_SUPPORTS_[flags] + -- Performing Test CXX_SUPPORTS_[flags] - Success + +]=] +function(try_append_cxx_flags flags) + cmake_parse_arguments(PARSE_ARGV 1 + TACXXF # prefix + "SKIP_LINK" # options + "TARGET;VAR;SOURCE;RESULT_VAR" # one_value_keywords + "IF_CHECK_PASSED" # multi_value_keywords + ) + + set(flags_as_string "${flags}") + separate_arguments(flags) + + string(MAKE_C_IDENTIFIER "${flags_as_string}" id_string) + string(TOUPPER "${id_string}" id_string) + + set(source "int main() { return 0; }") + if(DEFINED TACXXF_SOURCE AND NOT TACXXF_SOURCE STREQUAL source) + set(source "${TACXXF_SOURCE}") + string(SHA256 source_hash "${source}") + string(SUBSTRING ${source_hash} 0 4 source_hash_head) + string(APPEND id_string _${source_hash_head}) + endif() + + # This avoids running a linker. + set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) + set(CMAKE_REQUIRED_FLAGS "${flags_as_string} ${working_compiler_werror_flag}") + set(compiler_result CXX_SUPPORTS_${id_string}) + check_cxx_source_compiles("${source}" ${compiler_result}) + + if(${compiler_result}) + if(DEFINED TACXXF_IF_CHECK_PASSED) + if(DEFINED TACXXF_TARGET) + target_compile_options(${TACXXF_TARGET} INTERFACE ${TACXXF_IF_CHECK_PASSED}) + endif() + if(DEFINED TACXXF_VAR) + list(JOIN TACXXF_IF_CHECK_PASSED " " flags_if_check_passed_as_string) + string(STRIP "${${TACXXF_VAR}} ${flags_if_check_passed_as_string}" ${TACXXF_VAR}) + endif() + else() + if(DEFINED TACXXF_TARGET) + target_compile_options(${TACXXF_TARGET} INTERFACE ${flags}) + endif() + if(DEFINED TACXXF_VAR) + string(STRIP "${${TACXXF_VAR}} ${flags_as_string}" ${TACXXF_VAR}) + endif() + endif() + endif() + + if(DEFINED TACXXF_VAR) + set(${TACXXF_VAR} "${${TACXXF_VAR}}" PARENT_SCOPE) + endif() + + if(DEFINED TACXXF_RESULT_VAR) + set(${TACXXF_RESULT_VAR} "${${compiler_result}}" PARENT_SCOPE) + endif() + + if(NOT ${compiler_result} OR TACXXF_SKIP_LINK) + return() + endif() + + # This forces running a linker. + set(CMAKE_TRY_COMPILE_TARGET_TYPE EXECUTABLE) + set(CMAKE_REQUIRED_FLAGS "${flags_as_string}") + set(CMAKE_REQUIRED_LINK_OPTIONS ${working_linker_werror_flag}) + set(linker_result LINKER_SUPPORTS_${id_string}) + check_cxx_source_compiles("${source}" ${linker_result}) + + if(${linker_result}) + if(DEFINED TACXXF_IF_CHECK_PASSED) + if(DEFINED TACXXF_TARGET) + target_link_options(${TACXXF_TARGET} INTERFACE ${TACXXF_IF_CHECK_PASSED}) + endif() + else() + if(DEFINED TACXXF_TARGET) + target_link_options(${TACXXF_TARGET} INTERFACE ${flags}) + endif() + endif() + else() + message(WARNING "'${flags_as_string}' fail(s) to link.") + endif() +endfunction() + +if(MSVC) + try_append_cxx_flags("/WX /options:strict" VAR working_compiler_werror_flag SKIP_LINK) +else() + try_append_cxx_flags("-Werror" VAR working_compiler_werror_flag SKIP_LINK) +endif() diff --git a/cmake/module/TryAppendLinkerFlag.cmake b/cmake/module/TryAppendLinkerFlag.cmake new file mode 100644 index 00000000..fe7c2bce --- /dev/null +++ b/cmake/module/TryAppendLinkerFlag.cmake @@ -0,0 +1,83 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include_guard(GLOBAL) +include(CheckCXXSourceCompiles) + +#[=[ +Usage example: + + try_append_linker_flag("-Wl,--major-subsystem-version,6" TARGET core_interface) + + +In configuration output, this function prints a string by the following pattern: + + -- Performing Test LINKER_SUPPORTS_[flag] + -- Performing Test LINKER_SUPPORTS_[flag] - Success + +]=] +function(try_append_linker_flag flag) + cmake_parse_arguments(PARSE_ARGV 1 + TALF # prefix + "NO_CACHE_IF_FAILED" # options + "TARGET;VAR;SOURCE;RESULT_VAR" # one_value_keywords + "IF_CHECK_PASSED" # multi_value_keywords + ) + + string(MAKE_C_IDENTIFIER "${flag}" result) + string(TOUPPER "${result}" result) + string(PREPEND result LINKER_SUPPORTS_) + + set(source "int main() { return 0; }") + if(DEFINED TALF_SOURCE AND NOT TALF_SOURCE STREQUAL source) + set(source "${TALF_SOURCE}") + string(SHA256 source_hash "${source}") + string(SUBSTRING ${source_hash} 0 4 source_hash_head) + string(APPEND result _${source_hash_head}) + endif() + + # This forces running a linker. + set(CMAKE_TRY_COMPILE_TARGET_TYPE EXECUTABLE) + set(CMAKE_REQUIRED_LINK_OPTIONS ${flag} ${working_linker_werror_flag}) + check_cxx_source_compiles("${source}" ${result}) + + if(${result}) + if(DEFINED TALF_IF_CHECK_PASSED) + if(DEFINED TALF_TARGET) + target_link_options(${TALF_TARGET} INTERFACE ${TALF_IF_CHECK_PASSED}) + endif() + if(DEFINED TALF_VAR) + list(JOIN TALF_IF_CHECK_PASSED " " flags_if_check_passed_as_string) + string(STRIP "${${TALF_VAR}} ${flags_if_check_passed_as_string}" ${TALF_VAR}) + endif() + else() + if(DEFINED TALF_TARGET) + target_link_options(${TALF_TARGET} INTERFACE ${flag}) + endif() + if(DEFINED TALF_VAR) + string(STRIP "${${TALF_VAR}} ${flag}" ${TALF_VAR}) + endif() + endif() + endif() + + if(DEFINED TALF_VAR) + set(${TALF_VAR} "${${TALF_VAR}}" PARENT_SCOPE) + endif() + + if(DEFINED TALF_RESULT_VAR) + set(${TALF_RESULT_VAR} "${${result}}" PARENT_SCOPE) + endif() + + if(NOT ${result} AND TALF_NO_CACHE_IF_FAILED) + unset(${result} CACHE) + endif() +endfunction() + +if(MSVC) + try_append_linker_flag("/WX" VAR working_linker_werror_flag) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + try_append_linker_flag("-Wl,-fatal_warnings" VAR working_linker_werror_flag) +else() + try_append_linker_flag("-Wl,--fatal-warnings" VAR working_linker_werror_flag) +endif() diff --git a/cmake/module/WarnAboutGlobalProperties.cmake b/cmake/module/WarnAboutGlobalProperties.cmake new file mode 100644 index 00000000..faa56a2a --- /dev/null +++ b/cmake/module/WarnAboutGlobalProperties.cmake @@ -0,0 +1,36 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include_guard(GLOBAL) + +# Avoid the directory-wide add_definitions() and add_compile_definitions() commands. +# Instead, prefer the target-specific target_compile_definitions() one. +get_directory_property(global_compile_definitions COMPILE_DEFINITIONS) +if(global_compile_definitions) + message(AUTHOR_WARNING "The directory's COMPILE_DEFINITIONS property is not empty: ${global_compile_definitions}") +endif() + +# Avoid the directory-wide add_compile_options() command. +# Instead, prefer the target-specific target_compile_options() one. +get_directory_property(global_compile_options COMPILE_OPTIONS) +if(global_compile_options) + message(AUTHOR_WARNING "The directory's COMPILE_OPTIONS property is not empty: ${global_compile_options}") +endif() + +# Avoid the directory-wide add_link_options() command. +# Instead, prefer the target-specific target_link_options() one. +get_directory_property(global_link_options LINK_OPTIONS) +if(global_link_options) + message(AUTHOR_WARNING "The directory's LINK_OPTIONS property is not empty: ${global_link_options}") +endif() + +# Avoid the directory-wide link_libraries() command. +# Instead, prefer the target-specific target_link_libraries() one. +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy_cxx_source.cpp "#error") +add_library(check_loose_linked_libraries OBJECT EXCLUDE_FROM_ALL ${CMAKE_CURRENT_BINARY_DIR}/dummy_cxx_source.cpp) +set_target_properties(check_loose_linked_libraries PROPERTIES EXPORT_COMPILE_COMMANDS OFF) +get_target_property(global_linked_libraries check_loose_linked_libraries LINK_LIBRARIES) +if(global_linked_libraries) + message(AUTHOR_WARNING "There are libraries linked with `link_libraries` commands: ${global_linked_libraries}") +endif() diff --git a/cmake/script/Coverage.cmake b/cmake/script/Coverage.cmake new file mode 100644 index 00000000..72587a5e --- /dev/null +++ b/cmake/script/Coverage.cmake @@ -0,0 +1,89 @@ +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include(${CMAKE_CURRENT_LIST_DIR}/CoverageInclude.cmake) + +set(functional_test_runner test/functional/test_runner.py) +if(EXTENDED_FUNCTIONAL_TESTS) + list(APPEND functional_test_runner --extended) +endif() +if(DEFINED JOBS) + list(APPEND CMAKE_CTEST_COMMAND -j ${JOBS}) + list(APPEND functional_test_runner -j ${JOBS}) +endif() + +execute_process( + COMMAND ${CMAKE_CTEST_COMMAND} --build-config Coverage + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_COMMAND} --capture --directory src --test-name test_bitcoin --output-file test_bitcoin.info + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_COMMAND} --zerocounters --directory src + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_FILTER_COMMAND} test_bitcoin.info test_bitcoin_filtered.info + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_COMMAND} --add-tracefile test_bitcoin_filtered.info --output-file test_bitcoin_filtered.info + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --add-tracefile test_bitcoin_filtered.info --output-file test_bitcoin_coverage.info + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${GENHTML_COMMAND} test_bitcoin_coverage.info --output-directory test_bitcoin.coverage + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) + +execute_process( + COMMAND ${functional_test_runner} + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_COMMAND} --capture --directory src --test-name functional-tests --output-file functional_test.info + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_COMMAND} --zerocounters --directory src + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_FILTER_COMMAND} functional_test.info functional_test_filtered.info + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_COMMAND} --add-tracefile functional_test_filtered.info --output-file functional_test_filtered.info + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --add-tracefile test_bitcoin_filtered.info --add-tracefile functional_test_filtered.info --output-file total_coverage.info + COMMAND ${GREP_EXECUTABLE} "%" + COMMAND ${AWK_EXECUTABLE} "{ print substr($3,2,50) \"/\" $5 }" + OUTPUT_FILE coverage_percent.txt + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${GENHTML_COMMAND} total_coverage.info --output-directory total.coverage + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) diff --git a/cmake/script/CoverageFuzz.cmake b/cmake/script/CoverageFuzz.cmake new file mode 100644 index 00000000..05588053 --- /dev/null +++ b/cmake/script/CoverageFuzz.cmake @@ -0,0 +1,53 @@ +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +include(${CMAKE_CURRENT_LIST_DIR}/CoverageInclude.cmake) + +if(NOT DEFINED FUZZ_CORPORA_DIR) + set(FUZZ_CORPORA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/qa-assets/fuzz_corpora) +endif() + +set(fuzz_test_runner test/fuzz/test_runner.py ${FUZZ_CORPORA_DIR}) +if(DEFINED JOBS) + list(APPEND fuzz_test_runner -j ${JOBS}) +endif() + +execute_process( + COMMAND ${fuzz_test_runner} --loglevel DEBUG + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_COMMAND} --capture --directory src --test-name fuzz-tests --output-file fuzz.info + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_COMMAND} --zerocounters --directory src + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_FILTER_COMMAND} fuzz.info fuzz_filtered.info + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_COMMAND} --add-tracefile fuzz_filtered.info --output-file fuzz_filtered.info + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --add-tracefile fuzz_filtered.info --output-file fuzz_coverage.info + COMMAND ${GREP_EXECUTABLE} "%" + COMMAND ${AWK_EXECUTABLE} "{ print substr($3,2,50) \"/\" $5 }" + OUTPUT_FILE coverage_percent.txt + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${GENHTML_COMMAND} fuzz_coverage.info --output-directory fuzz.coverage + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) diff --git a/cmake/script/CoverageInclude.cmake.in b/cmake/script/CoverageInclude.cmake.in new file mode 100644 index 00000000..8fe11b48 --- /dev/null +++ b/cmake/script/CoverageInclude.cmake.in @@ -0,0 +1,59 @@ +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +if("@CMAKE_CXX_COMPILER_ID@" STREQUAL "Clang") + find_program(LLVM_COV_EXECUTABLE llvm-cov REQUIRED) + set(COV_TOOL "${LLVM_COV_EXECUTABLE} gcov") +else() + find_program(GCOV_EXECUTABLE gcov REQUIRED) + set(COV_TOOL "${GCOV_EXECUTABLE}") +endif() + +# COV_TOOL is used to replace a placeholder. +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/cov_tool_wrapper.sh.in ${CMAKE_CURRENT_LIST_DIR}/cov_tool_wrapper.sh + FILE_PERMISSIONS OWNER_READ OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ + @ONLY +) + +find_program(LCOV_EXECUTABLE lcov REQUIRED) +separate_arguments(LCOV_OPTS) +set(LCOV_COMMAND ${LCOV_EXECUTABLE} --gcov-tool ${CMAKE_CURRENT_LIST_DIR}/cov_tool_wrapper.sh ${LCOV_OPTS}) + +find_program(GENHTML_EXECUTABLE genhtml REQUIRED) +set(GENHTML_COMMAND ${GENHTML_EXECUTABLE} --show-details ${LCOV_OPTS}) + +find_program(GREP_EXECUTABLE grep REQUIRED) +find_program(AWK_EXECUTABLE awk REQUIRED) + +set(LCOV_FILTER_COMMAND ./filter-lcov.py) +list(APPEND LCOV_FILTER_COMMAND -p "/usr/local/") +list(APPEND LCOV_FILTER_COMMAND -p "/usr/include/") +list(APPEND LCOV_FILTER_COMMAND -p "/usr/lib/") +list(APPEND LCOV_FILTER_COMMAND -p "/usr/lib64/") +list(APPEND LCOV_FILTER_COMMAND -p "src/leveldb/") +list(APPEND LCOV_FILTER_COMMAND -p "src/crc32c/") +list(APPEND LCOV_FILTER_COMMAND -p "src/bench/") +list(APPEND LCOV_FILTER_COMMAND -p "src/crypto/ctaes") +list(APPEND LCOV_FILTER_COMMAND -p "src/minisketch") +list(APPEND LCOV_FILTER_COMMAND -p "src/secp256k1") +list(APPEND LCOV_FILTER_COMMAND -p "depends") + +execute_process( + COMMAND ${LCOV_COMMAND} --capture --initial --directory src --output-file baseline.info + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_FILTER_COMMAND} baseline.info baseline_filtered.info + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) +execute_process( + COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --output-file baseline_filtered.info + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + COMMAND_ERROR_IS_FATAL ANY +) diff --git a/cmake/script/GenerateBuildInfo.cmake b/cmake/script/GenerateBuildInfo.cmake new file mode 100644 index 00000000..d3ee2eb0 --- /dev/null +++ b/cmake/script/GenerateBuildInfo.cmake @@ -0,0 +1,113 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +macro(fatal_error) + message(FATAL_ERROR "\n" + "Usage:\n" + " cmake -D BUILD_INFO_HEADER_PATH= [-D SOURCE_DIR=] -P ${CMAKE_CURRENT_LIST_FILE}\n" + "All specified paths must be absolute ones.\n" + ) +endmacro() + +if(DEFINED BUILD_INFO_HEADER_PATH AND IS_ABSOLUTE "${BUILD_INFO_HEADER_PATH}") + if(EXISTS "${BUILD_INFO_HEADER_PATH}") + file(STRINGS ${BUILD_INFO_HEADER_PATH} INFO LIMIT_COUNT 1) + endif() +else() + fatal_error() +endif() + +if(DEFINED SOURCE_DIR) + if(IS_ABSOLUTE "${SOURCE_DIR}" AND IS_DIRECTORY "${SOURCE_DIR}") + set(WORKING_DIR ${SOURCE_DIR}) + else() + fatal_error() + endif() +else() + set(WORKING_DIR ${CMAKE_CURRENT_SOURCE_DIR}) +endif() + +set(GIT_TAG) +set(GIT_COMMIT) +if(NOT "$ENV{BITCOIN_GENBUILD_NO_GIT}" STREQUAL "1") + find_package(Git QUIET) + if(Git_FOUND) + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse --is-inside-work-tree + WORKING_DIRECTORY ${WORKING_DIR} + OUTPUT_VARIABLE IS_INSIDE_WORK_TREE + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + ) + if(IS_INSIDE_WORK_TREE) + # Clean 'dirty' status of touched files that haven't been modified. + execute_process( + COMMAND ${GIT_EXECUTABLE} diff + WORKING_DIRECTORY ${WORKING_DIR} + OUTPUT_QUIET + ERROR_QUIET + ) + + execute_process( + COMMAND ${GIT_EXECUTABLE} describe --abbrev=0 + WORKING_DIRECTORY ${WORKING_DIR} + OUTPUT_VARIABLE MOST_RECENT_TAG + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + ) + + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-list -1 ${MOST_RECENT_TAG} + WORKING_DIRECTORY ${WORKING_DIR} + OUTPUT_VARIABLE MOST_RECENT_TAG_COMMIT + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + ) + + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse HEAD + WORKING_DIRECTORY ${WORKING_DIR} + OUTPUT_VARIABLE HEAD_COMMIT + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + ) + + execute_process( + COMMAND ${GIT_EXECUTABLE} diff-index --quiet HEAD -- + WORKING_DIRECTORY ${WORKING_DIR} + RESULT_VARIABLE IS_DIRTY + ) + + if(HEAD_COMMIT STREQUAL MOST_RECENT_TAG_COMMIT AND NOT IS_DIRTY) + # If latest commit is tagged and not dirty, then use the tag name. + set(GIT_TAG ${MOST_RECENT_TAG}) + else() + # Otherwise, generate suffix from git, i.e. string like "0e0a5173fae3-dirty". + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse --short=12 HEAD + WORKING_DIRECTORY ${WORKING_DIR} + OUTPUT_VARIABLE GIT_COMMIT + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + ) + if(IS_DIRTY) + string(APPEND GIT_COMMIT "-dirty") + endif() + endif() + endif() + endif() +endif() + +if(GIT_TAG) + set(NEWINFO "#define BUILD_GIT_TAG \"${GIT_TAG}\"") +elseif(GIT_COMMIT) + set(NEWINFO "#define BUILD_GIT_COMMIT \"${GIT_COMMIT}\"") +else() + set(NEWINFO "// No build information available") +endif() + +# Only update the header if necessary. +if(NOT "${INFO}" STREQUAL "${NEWINFO}") + file(WRITE ${BUILD_INFO_HEADER_PATH} "${NEWINFO}\n") +endif() diff --git a/cmake/script/GenerateHeaderFromJson.cmake b/cmake/script/GenerateHeaderFromJson.cmake new file mode 100644 index 00000000..384ac20d --- /dev/null +++ b/cmake/script/GenerateHeaderFromJson.cmake @@ -0,0 +1,22 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +cmake_path(GET JSON_SOURCE_PATH STEM json_source_basename) + +file(READ ${JSON_SOURCE_PATH} hex_content HEX) +string(REGEX REPLACE "................" "\\0\n" formatted_bytes "${hex_content}") +string(REGEX REPLACE "[^\n][^\n]" "'\\\\x\\0'," formatted_bytes "${formatted_bytes}") + +set(header_content +"#include + +namespace json_tests { +inline constexpr char detail_${json_source_basename}_bytes[] { +${formatted_bytes} +}; + +inline constexpr std::string_view ${json_source_basename}{std::begin(detail_${json_source_basename}_bytes), std::end(detail_${json_source_basename}_bytes)}; +} +") +file(WRITE ${HEADER_PATH} "${header_content}") diff --git a/cmake/script/GenerateHeaderFromRaw.cmake b/cmake/script/GenerateHeaderFromRaw.cmake new file mode 100644 index 00000000..d373d1c4 --- /dev/null +++ b/cmake/script/GenerateHeaderFromRaw.cmake @@ -0,0 +1,23 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +cmake_path(GET RAW_SOURCE_PATH STEM raw_source_basename) + +file(READ ${RAW_SOURCE_PATH} hex_content HEX) +string(REGEX REPLACE "................" "\\0\n" formatted_bytes "${hex_content}") +string(REGEX REPLACE "[^\n][^\n]" "std::byte{0x\\0}," formatted_bytes "${formatted_bytes}") + +set(header_content +"#include +#include + +namespace ${RAW_NAMESPACE} { +inline constexpr std::byte detail_${raw_source_basename}_raw[] { +${formatted_bytes} +}; + +inline constexpr std::span ${raw_source_basename}{detail_${raw_source_basename}_raw}; +} +") +file(WRITE ${HEADER_PATH} "${header_content}") diff --git a/cmake/script/cov_tool_wrapper.sh.in b/cmake/script/cov_tool_wrapper.sh.in new file mode 100644 index 00000000..f6b7ff34 --- /dev/null +++ b/cmake/script/cov_tool_wrapper.sh.in @@ -0,0 +1,5 @@ +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +exec @COV_TOOL@ "$@" diff --git a/cmake/script/macos_zip.sh b/cmake/script/macos_zip.sh new file mode 100755 index 00000000..cc51699d --- /dev/null +++ b/cmake/script/macos_zip.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +export LC_ALL=C + +if [ -n "$SOURCE_DATE_EPOCH" ]; then + find . -exec touch -d "@$SOURCE_DATE_EPOCH" {} + +fi + +find . | sort | "$1" -X@ "$2" diff --git a/cmake/windows-app.manifest.in b/cmake/windows-app.manifest.in new file mode 100644 index 00000000..c3bd333a --- /dev/null +++ b/cmake/windows-app.manifest.in @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 54ac56fa..00000000 --- a/configure.ac +++ /dev/null @@ -1,2018 +0,0 @@ -AC_PREREQ([2.69]) -define(_CLIENT_VERSION_MAJOR, 26) -define(_CLIENT_VERSION_MINOR, 0) -define(_CLIENT_VERSION_BUILD, 0) -define(_CLIENT_VERSION_RC, 0) -define(_CLIENT_VERSION_IS_RELEASE, true) -define(_COPYRIGHT_YEAR, 2023) -define(_COPYRIGHT_HOLDERS,[The %s developers]) -define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]]) -AC_INIT([Bitcoin Core],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_BUILD)m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC),[https://github.com/bitcoin/bitcoin/issues],[bitcoin],[https://bitcoincore.org/]) -AC_CONFIG_SRCDIR([src/validation.cpp]) -AC_CONFIG_HEADERS([src/config/bitcoin-config.h]) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIR([build-aux/m4]) - -m4_ifndef([PKG_PROG_PKG_CONFIG], [m4_fatal([PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh])]) -PKG_PROG_PKG_CONFIG -if test "$PKG_CONFIG" = ""; then - AC_MSG_ERROR([pkg-config not found]) -fi - -# When compiling with depends, the `PKG_CONFIG_PATH` and `PKG_CONFIG_LIBDIR` variables, -# being set in a `config.site` file, are not exported to let the `--config-cache` option -# work properly. -if test -n "$PKG_CONFIG_PATH"; then - PKG_CONFIG="env PKG_CONFIG_PATH=$PKG_CONFIG_PATH $PKG_CONFIG" -fi -if test -n "$PKG_CONFIG_LIBDIR"; then - PKG_CONFIG="env PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR $PKG_CONFIG" -fi - -BITCOIN_DAEMON_NAME=coordinated -BITCOIN_GUI_NAME=coordinate-qt -BITCOIN_TEST_NAME=test_bitcoin -COORDINATE_CLI_NAME=coordinate-cli -COORDINATE_TX_NAME=coordinate-tx -COORDINATE_UTIL_NAME=coordinate-util -BITCOIN_CHAINSTATE_NAME=bitcoin-chainstate -COORDINATE_WALLET_TOOL_NAME=coordinate-wallet -dnl Multi Process -BITCOIN_MP_NODE_NAME=bitcoin-node -BITCOIN_MP_GUI_NAME=bitcoin-gui - -dnl Unless the user specified ARFLAGS, force it to be cr -dnl This is also the default as-of libtool 2.4.7 -AC_ARG_VAR([ARFLAGS], [Flags for the archiver, defaults to if not set]) -if test "${ARFLAGS+set}" != "set"; then - ARFLAGS="cr" -fi - -AC_CANONICAL_HOST - -AH_TOP([#ifndef BITCOIN_CONFIG_H]) -AH_TOP([#define BITCOIN_CONFIG_H]) -AH_BOTTOM([#endif //BITCOIN_CONFIG_H]) - -dnl Automake init set-up and checks -AM_INIT_AUTOMAKE([1.13 no-define subdir-objects foreign]) - -AM_MAINTAINER_MODE([enable]) - -dnl make the compilation flags quiet unless V=1 is used -AM_SILENT_RULES([yes]) - -dnl Compiler checks (here before libtool). -if test "${CXXFLAGS+set}" = "set"; then - CXXFLAGS_overridden=yes -else - CXXFLAGS_overridden=no -fi -AC_PROG_CXX - -dnl libtool overrides -case $host in - *mingw*) - dnl By default, libtool for mingw refuses to link static libs into a dll for - dnl fear of mixing pic/non-pic objects, and import/export complications. Since - dnl we have those under control, re-enable that functionality. - lt_cv_deplibs_check_method="pass_all" - - dnl Remove unwanted -DDLL_EXPORT from these variables. - dnl We do not use this macro, but system headers may export unwanted symbols - dnl if it's set. - lt_cv_prog_compiler_pic="-DPIC" - lt_cv_prog_compiler_pic_CXX="-DPIC" - ;; - *darwin*) - dnl Because it prints a verbose warning, lld fails the following check - dnl for "-Wl,-single_module" from libtool.m4: - dnl # If there is a non-empty error log, and "single_module" - dnl # appears in it, assume the flag caused a linker warning - dnl "-single_module" works fine on ld64 and lld, so just bypass the test. - dnl Failure to set this to "yes" causes libtool to use a very broken - dnl link-line for shared libs. - lt_cv_apple_cc_single_mod="yes" - ;; -esac - -AC_ARG_ENABLE([c++20], - [AS_HELP_STRING([--enable-c++20], - [enable compilation in c++20 mode (disabled by default)])], - [use_cxx20=$enableval], - [use_cxx20=no]) - -dnl Require C++17 compiler (no GNU extensions) -if test "$use_cxx20" = "no"; then -AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory]) -else -AX_CXX_COMPILE_STDCXX([20], [noext], [mandatory]) -fi - -dnl Unless the user specified OBJCXX, force it to be the same as CXX. This ensures -dnl that we get the same -std flags for both. -m4_ifdef([AC_PROG_OBJCXX],[ -if test "${OBJCXX+set}" = ""; then - OBJCXX="${CXX}" -fi -AC_PROG_OBJCXX -]) - -dnl OpenBSD ships with 2.4.2 -LT_PREREQ([2.4.2]) -dnl Libtool init checks. -LT_INIT([pic-only win32-dll]) - -dnl Check/return PATH for base programs. -AC_PATH_TOOL([AR], [ar]) -AC_PATH_TOOL([GCOV], [gcov]) -AC_PATH_TOOL([LLVM_COV], [llvm-cov]) -AC_PATH_PROG([LCOV], [lcov]) -dnl Python 3.8 is specified in .python-version and should be used if available, see doc/dependencies.md -AC_PATH_PROGS([PYTHON], [python3.8 python3.9 python3.10 python3.11 python3.12 python3 python]) -AC_PATH_PROG([GENHTML], [genhtml]) -AC_PATH_PROG([GIT], [git]) -AC_PATH_PROG([CCACHE], [ccache]) -AC_PATH_PROG([XGETTEXT], [xgettext]) -AC_PATH_PROG([HEXDUMP], [hexdump]) -AC_PATH_TOOL([OBJCOPY], [objcopy]) -AC_PATH_PROG([DOXYGEN], [doxygen]) -AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) - -AC_ARG_VAR([PYTHONPATH], [Augments the default search path for python module files]) - -AC_ARG_ENABLE([wallet], - [AS_HELP_STRING([--disable-wallet], - [disable wallet (enabled by default)])], - [enable_wallet=$enableval], - [enable_wallet=auto]) - -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([bdb], - [AS_HELP_STRING([--without-bdb], - [disable bdb wallet support (default is enabled if wallet is enabled)])], - [use_bdb=$withval], - [use_bdb=auto]) - -AC_ARG_ENABLE([usdt], - [AS_HELP_STRING([--enable-usdt], - [enable tracepoints for Userspace, Statically Defined Tracing (default is yes if sys/sdt.h is found)])], - [use_usdt=$enableval], - [use_usdt=yes]) - -AC_ARG_WITH([miniupnpc], - [AS_HELP_STRING([--with-miniupnpc], - [enable UPNP (default is yes if libminiupnpc is found)])], - [use_upnp=$withval], - [use_upnp=auto]) - -AC_ARG_WITH([natpmp], - [AS_HELP_STRING([--with-natpmp], - [enable NAT-PMP (default is yes if libnatpmp is found)])], - [use_natpmp=$withval], - [use_natpmp=auto]) - -AC_ARG_ENABLE(tests, - AS_HELP_STRING([--disable-tests],[do not compile tests (default is to compile)]), - [use_tests=$enableval], - [use_tests=yes]) - -AC_ARG_ENABLE(gui-tests, - AS_HELP_STRING([--disable-gui-tests],[do not compile GUI tests (default is to compile if GUI and tests enabled)]), - [use_gui_tests=$enableval], - [use_gui_tests=$use_tests]) - -AC_ARG_ENABLE(bench, - AS_HELP_STRING([--disable-bench],[do not compile benchmarks (default is to compile)]), - [use_bench=$enableval], - [use_bench=yes]) - -AC_ARG_ENABLE([extended-functional-tests], - AS_HELP_STRING([--enable-extended-functional-tests],[enable expensive functional tests when using lcov (default no)]), - [use_extended_functional_tests=$enableval], - [use_extended_functional_tests=no]) - -AC_ARG_ENABLE([fuzz], - AS_HELP_STRING([--enable-fuzz], - [build for fuzzing (default no). enabling this will disable all other targets and override --{enable,disable}-fuzz-binary]), - [enable_fuzz=$enableval], - [enable_fuzz=no]) - -AC_ARG_ENABLE([fuzz-binary], - AS_HELP_STRING([--enable-fuzz-binary], - [enable building of fuzz binary (default yes).]), - [enable_fuzz_binary=$enableval], - [enable_fuzz_binary=yes]) - -AC_ARG_WITH([qrencode], - [AS_HELP_STRING([--with-qrencode], - [enable QR code support (default is yes if qt is enabled and libqrencode is found)])], - [use_qr=$withval], - [use_qr=auto]) - -AC_ARG_ENABLE([hardening], - [AS_HELP_STRING([--disable-hardening], - [do not attempt to harden the resulting executables (default is to harden when possible)])], - [use_hardening=$enableval], - [use_hardening=auto]) - -AC_ARG_ENABLE([reduce-exports], - [AS_HELP_STRING([--enable-reduce-exports], - [attempt to reduce exported symbols in the resulting executables (default is no)])], - [use_reduce_exports=$enableval], - [use_reduce_exports=no]) - -AC_ARG_ENABLE([ccache], - [AS_HELP_STRING([--disable-ccache], - [do not use ccache for building (default is to use if found)])], - [use_ccache=$enableval], - [use_ccache=auto]) - -dnl Suppress warnings from external headers (e.g. Boost, Qt). -dnl May be useful if warnings from external headers clutter the build output -dnl too much, so that it becomes difficult to spot Bitcoin Core warnings -dnl or if they cause a build failure with --enable-werror. -AC_ARG_ENABLE([suppress-external-warnings], - [AS_HELP_STRING([--disable-suppress-external-warnings], - [Do not suppress warnings from external headers (default is to suppress)])], - [suppress_external_warnings=$enableval], - [suppress_external_warnings=yes]) - -AC_ARG_ENABLE([lcov], - [AS_HELP_STRING([--enable-lcov], - [enable lcov testing (default is no)])], - [use_lcov=$enableval], - [use_lcov=no]) - -AC_ARG_ENABLE([lcov-branch-coverage], - [AS_HELP_STRING([--enable-lcov-branch-coverage], - [enable lcov testing branch coverage (default is no)])], - [use_lcov_branch=yes], - [use_lcov_branch=no]) - -AC_ARG_ENABLE([threadlocal], - [AS_HELP_STRING([--enable-threadlocal], - [enable features that depend on the c++ thread_local keyword (currently just thread names in debug logs). (default is to enable if there is platform support)])], - [use_thread_local=$enableval], - [use_thread_local=auto]) - -AC_ARG_ENABLE([asm], - [AS_HELP_STRING([--disable-asm], - [disable assembly routines (enabled by default)])], - [use_asm=$enableval], - [use_asm=yes]) - -if test "$use_asm" = "yes"; then - AC_DEFINE([USE_ASM], [1], [Define this symbol to build in assembly routines]) -fi - -AC_ARG_ENABLE([zmq], - [AS_HELP_STRING([--disable-zmq], - [disable ZMQ notifications])], - [use_zmq=$enableval], - [use_zmq=yes]) - -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, coordinate-wallet, and bitcoin-gui executables in addition to monolithic coordinated and coordinate-qt executables. Requires libmultiprocess library. Experimental (default is no)])], - [enable_multiprocess=$enableval], - [enable_multiprocess=no]) - -AC_ARG_ENABLE(man, - [AS_HELP_STRING([--disable-man], - [do not install man pages (default is to install)])],, - enable_man=yes) -AM_CONDITIONAL([ENABLE_MAN], [test "$enable_man" != "no"]) - -dnl Enable debug -AC_ARG_ENABLE([debug], - [AS_HELP_STRING([--enable-debug], - [use compiler flags and macros suited for debugging (default is no)])], - [enable_debug=$enableval], - [enable_debug=no]) - -dnl Enable different -fsanitize options -AC_ARG_WITH([sanitizers], - [AS_HELP_STRING([--with-sanitizers], - [comma separated list of extra sanitizers to build with (default is none enabled)])], - [use_sanitizers=$withval]) - -dnl Enable gprof profiling -AC_ARG_ENABLE([gprof], - [AS_HELP_STRING([--enable-gprof], - [use gprof profiling compiler flags (default is no)])], - [enable_gprof=$enableval], - [enable_gprof=no]) - -dnl Turn warnings into errors -AC_ARG_ENABLE([werror], - [AS_HELP_STRING([--enable-werror], - [Treat compiler warnings as errors (default is no)])], - [enable_werror=$enableval], - [enable_werror=no]) - -AC_ARG_ENABLE([external-signer], - [AS_HELP_STRING([--enable-external-signer],[compile external signer support (default is auto, requires Boost::Process)])], - [use_external_signer=$enableval], - [use_external_signer=auto]) - -AC_ARG_ENABLE([lto], - [AS_HELP_STRING([--enable-lto],[build using LTO (default is no)])], - [enable_lto=$enableval], - [enable_lto=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 "$enable_debug" = "yes"; then - dnl If debugging is enabled, and the user hasn't overridden CXXFLAGS, clear - dnl them, to prevent autoconfs "-g -O2" being added. Otherwise we'd end up - dnl with "-O0 -g3 -g -O2". - if test "$CXXFLAGS_overridden" = "no"; then - CXXFLAGS="" - fi - - dnl Disable all optimizations - AX_CHECK_COMPILE_FLAG([-O0], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -O0"], [], [$CXXFLAG_WERROR]) - - dnl Prefer -g3, fall back to -g if that is unavailable. - AX_CHECK_COMPILE_FLAG( - [-g3], - [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g3"], - [AX_CHECK_COMPILE_FLAG([-g], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g"], [], [$CXXFLAG_WERROR])], - [$CXXFLAG_WERROR]) - - AX_CHECK_PREPROC_FLAG([-DDEBUG], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG"], [], [$CXXFLAG_WERROR]) - AX_CHECK_PREPROC_FLAG([-DDEBUG_LOCKORDER], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG_LOCKORDER"], [], [$CXXFLAG_WERROR]) - AX_CHECK_PREPROC_FLAG([-DDEBUG_LOCKCONTENTION], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG_LOCKCONTENTION"], [], [$CXXFLAG_WERROR]) - AX_CHECK_PREPROC_FLAG([-DRPC_DOC_CHECK], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DRPC_DOC_CHECK"], [], [$CXXFLAG_WERROR]) - AX_CHECK_PREPROC_FLAG([-DABORT_ON_FAILED_ASSUME], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DABORT_ON_FAILED_ASSUME"], [], [$CXXFLAG_WERROR]) - AX_CHECK_COMPILE_FLAG([-ftrapv], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -ftrapv"], [], [$CXXFLAG_WERROR]) -fi - -if test "$enable_lto" = "yes"; then - AX_CHECK_COMPILE_FLAG([-flto], [LTO_CXXFLAGS="$LTO_CXXFLAGS -flto"], [AC_MSG_ERROR([compile failed with -flto])], [$CXXFLAG_WERROR]) - AX_CHECK_LINK_FLAG([-flto], [LTO_LDFLAGS="$LTO_LDFLAGS -flto"], [AC_MSG_ERROR([link failed with -flto])], [$CXXFLAG_WERROR]) -fi - -if test "$use_sanitizers" != ""; then - dnl First check if the compiler accepts flags. If an incompatible pair like - dnl -fsanitize=address,thread is used here, this check will fail. This will also - dnl fail if a bad argument is passed, e.g. -fsanitize=undfeined - AX_CHECK_COMPILE_FLAG( - [-fsanitize=$use_sanitizers], - [SANITIZER_CXXFLAGS="-fsanitize=$use_sanitizers"], - [AC_MSG_ERROR([compiler did not accept requested flags])]) - - dnl Some compilers (e.g. GCC) require additional libraries like libasan, - dnl libtsan, libubsan, etc. Make sure linking still works with the sanitize - dnl flag. This is a separate check so we can give a better error message when - dnl the sanitize flags are supported by the compiler but the actual sanitizer - dnl libs are missing. - AX_CHECK_LINK_FLAG( - [-fsanitize=$use_sanitizers], - [SANITIZER_LDFLAGS="-fsanitize=$use_sanitizers"], - [AC_MSG_ERROR([linker did not accept requested flags, you are missing required libraries])], - [], - [AC_LANG_PROGRAM([[ - #include - #include - extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { return 0; } - __attribute__((weak)) // allow for libFuzzer linking - ]],[[]])]) -fi - -ERROR_CXXFLAGS= -if test "$enable_werror" = "yes"; then - if test "$CXXFLAG_WERROR" = ""; then - AC_MSG_ERROR([enable-werror set but -Werror is not usable]) - fi - ERROR_CXXFLAGS=$CXXFLAG_WERROR -fi - -if test "$CXXFLAGS_overridden" = "no"; 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([-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([-Wthread-safety], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety"], [], [$CXXFLAG_WERROR]) - AX_CHECK_COMPILE_FLAG([-Wloop-analysis], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wloop-analysis"], [], [$CXXFLAG_WERROR]) - AX_CHECK_COMPILE_FLAG([-Wredundant-decls], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wredundant-decls"], [], [$CXXFLAG_WERROR]) - AX_CHECK_COMPILE_FLAG([-Wunused-member-function], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunused-member-function"], [], [$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([-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]) - 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([-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]) - AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wimplicit-fallthrough"], [], [$CXXFLAG_WERROR]) - - if test "$suppress_external_warnings" != "no" ; then - AX_CHECK_COMPILE_FLAG([-Wdocumentation], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdocumentation"], [], [$CXXFLAG_WERROR]) - fi - - 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 - dnl set the -Wno-foo case if it works. - AX_CHECK_COMPILE_FLAG([-Wunused-parameter], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-unused-parameter"], [], [$CXXFLAG_WERROR]) - AX_CHECK_COMPILE_FLAG([-Wself-assign], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-self-assign"], [], [$CXXFLAG_WERROR]) - if test "$suppress_external_warnings" != "yes" ; then - AX_CHECK_COMPILE_FLAG([-Wdeprecated-copy], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-deprecated-copy"], [], [$CXXFLAG_WERROR]) - fi -fi - -dnl Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review. -AX_CHECK_COMPILE_FLAG([-fno-extended-identifiers], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fno-extended-identifiers"], [], [$CXXFLAG_WERROR]) - -dnl Currently all versions of gcc are subject to a class of bugs, see the -dnl gccbug_90348 test case (only reproduces on GCC 11 and earlier) and -dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111843. To work around that, set -dnl -fstack-reuse=none for all gcc builds. (Only gcc understands this flag) -AX_CHECK_COMPILE_FLAG([-fstack-reuse=none], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fstack-reuse=none"]) - -enable_arm_crc=no -enable_arm_shani=no -enable_sse42=no -enable_sse41=no -enable_avx2=no -enable_x86_shani=no - -if test "$use_asm" = "yes"; then - -dnl Check for optional instruction set support. Enabling these does _not_ imply that all code will -dnl be compiled with them, rather that specific objects/libs may use them after checking for runtime -dnl compatibility. - -dnl x86 -AX_CHECK_COMPILE_FLAG([-msse4.2], [SSE42_CXXFLAGS="-msse4.2"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-msse4.1], [SSE41_CXXFLAGS="-msse4.1"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-mavx -mavx2], [AVX2_CXXFLAGS="-mavx -mavx2"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-msse4 -msha], [X86_SHANI_CXXFLAGS="-msse4 -msha"], [], [$CXXFLAG_WERROR]) - -enable_clmul= -AX_CHECK_COMPILE_FLAG([-mpclmul], [enable_clmul=yes], [], [$CXXFLAG_WERROR], [AC_LANG_PROGRAM([ - #include - #include -], [ - __m128i a = _mm_cvtsi64_si128((uint64_t)7); - __m128i b = _mm_clmulepi64_si128(a, a, 37); - __m128i c = _mm_srli_epi64(b, 41); - __m128i d = _mm_xor_si128(b, c); - uint64_t e = _mm_cvtsi128_si64(d); - return e == 0; -])]) - -if test "$enable_clmul" = "yes"; then - CLMUL_CXXFLAGS="-mpclmul" - AC_DEFINE([HAVE_CLMUL], [1], [Define this symbol if clmul instructions can be used]) -fi - -TEMP_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$SSE42_CXXFLAGS $CXXFLAGS" -AC_MSG_CHECKING([for SSE4.2 intrinsics]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #if defined(_MSC_VER) - #include - #elif defined(__GNUC__) && defined(__SSE4_2__) - #include - #endif - ]],[[ - uint64_t l = 0; - l = _mm_crc32_u8(l, 0); - l = _mm_crc32_u32(l, 0); - l = _mm_crc32_u64(l, 0); - return l; - ]])], - [ AC_MSG_RESULT([yes]); enable_sse42=yes], - [ AC_MSG_RESULT([no])] -) -CXXFLAGS="$TEMP_CXXFLAGS" - -TEMP_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$SSE41_CXXFLAGS $CXXFLAGS" -AC_MSG_CHECKING([for SSE4.1 intrinsics]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]],[[ - __m128i l = _mm_set1_epi32(0); - return _mm_extract_epi32(l, 3); - ]])], - [ AC_MSG_RESULT([yes]); enable_sse41=yes; AC_DEFINE([ENABLE_SSE41], [1], [Define this symbol to build code that uses SSE4.1 intrinsics]) ], - [ AC_MSG_RESULT([no])] -) -CXXFLAGS="$TEMP_CXXFLAGS" - -TEMP_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$AVX2_CXXFLAGS $CXXFLAGS" -AC_MSG_CHECKING([for AVX2 intrinsics]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]],[[ - __m256i l = _mm256_set1_epi32(0); - return _mm256_extract_epi32(l, 7); - ]])], - [ AC_MSG_RESULT([yes]); enable_avx2=yes; AC_DEFINE([ENABLE_AVX2], [1], [Define this symbol to build code that uses AVX2 intrinsics]) ], - [ AC_MSG_RESULT([no])] -) -CXXFLAGS="$TEMP_CXXFLAGS" - -TEMP_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$X86_SHANI_CXXFLAGS $CXXFLAGS" -AC_MSG_CHECKING([for x86 SHA-NI intrinsics]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]],[[ - __m128i i = _mm_set1_epi32(0); - __m128i j = _mm_set1_epi32(1); - __m128i k = _mm_set1_epi32(2); - return _mm_extract_epi32(_mm_sha256rnds2_epu32(i, i, k), 0); - ]])], - [ AC_MSG_RESULT([yes]); enable_x86_shani=yes; AC_DEFINE([ENABLE_X86_SHANI], [1], [Define this symbol to build code that uses x86 SHA-NI intrinsics]) ], - [ AC_MSG_RESULT([no])] -) -CXXFLAGS="$TEMP_CXXFLAGS" - -# ARM -AX_CHECK_COMPILE_FLAG([-march=armv8-a+crc+crypto], [ARM_CRC_CXXFLAGS="-march=armv8-a+crc+crypto"], [], [$CXXFLAG_WERROR]) -AX_CHECK_COMPILE_FLAG([-march=armv8-a+crypto], [ARM_SHANI_CXXFLAGS="-march=armv8-a+crypto"], [], [$CXXFLAG_WERROR]) - -TEMP_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$ARM_CRC_CXXFLAGS $CXXFLAGS" -AC_MSG_CHECKING([for ARMv8 CRC32 intrinsics]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]],[[ -#ifdef __aarch64__ - __crc32cb(0, 0); __crc32ch(0, 0); __crc32cw(0, 0); __crc32cd(0, 0); - vmull_p64(0, 0); -#else -#error "crc32c library does not support hardware acceleration on 32-bit ARM" -#endif - ]])], - [ AC_MSG_RESULT([yes]); enable_arm_crc=yes; ], - [ AC_MSG_RESULT([no])] -) -CXXFLAGS="$TEMP_CXXFLAGS" - -TEMP_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$ARM_SHANI_CXXFLAGS $CXXFLAGS" -AC_MSG_CHECKING([for ARMv8 SHA-NI intrinsics]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]],[[ - uint32x4_t a, b, c; - vsha256h2q_u32(a, b, c); - vsha256hq_u32(a, b, c); - vsha256su0q_u32(a, b); - vsha256su1q_u32(a, b, c); - ]])], - [ AC_MSG_RESULT([yes]); enable_arm_shani=yes; AC_DEFINE([ENABLE_ARM_SHANI], [1], [Define this symbol to build code that uses ARMv8 SHA-NI intrinsics]) ], - [ AC_MSG_RESULT([no])] -) -CXXFLAGS="$TEMP_CXXFLAGS" - -fi - -CORE_CPPFLAGS="$CORE_CPPFLAGS -DHAVE_BUILD_INFO" - -AC_ARG_WITH([utils], - [AS_HELP_STRING([--with-utils], - [build coordinate-cli coordinate-tx coordinate-util coordinate-wallet (default=yes)])], - [build_coordinate_utils=$withval], - [build_coordinate_utils=yes]) - -AC_ARG_ENABLE([util-cli], - [AS_HELP_STRING([--enable-util-cli], - [build coordinate-cli])], - [build_coordinate_cli=$enableval], - [build_coordinate_cli=$build_coordinate_utils]) - -AC_ARG_ENABLE([util-tx], - [AS_HELP_STRING([--enable-util-tx], - [build coordinate-tx])], - [build_coordinate_tx=$enableval], - [build_coordinate_tx=$build_coordinate_utils]) - -AC_ARG_ENABLE([util-wallet], - [AS_HELP_STRING([--enable-util-wallet], - [build coordinate-wallet])], - [build_coordinate_wallet=$enableval], - [build_coordinate_wallet=$build_coordinate_utils]) - -AC_ARG_ENABLE([util-util], - [AS_HELP_STRING([--enable-util-util], - [build coordinate-util])], - [build_coordinate_util=$enableval], - [build_coordinate_util=$build_coordinate_utils]) - -AC_ARG_ENABLE([experimental-util-chainstate], - [AS_HELP_STRING([--enable-experimental-util-chainstate], - [build experimental bitcoin-chainstate executable (default=no)])], - [build_bitcoin_chainstate=$enableval], - [build_bitcoin_chainstate=no]) - -AC_ARG_WITH([libs], - [AS_HELP_STRING([--with-libs], - [build libraries (default=yes)])], - [build_bitcoin_libs=$withval], - [build_bitcoin_libs=yes]) - -AC_ARG_WITH([experimental-kernel-lib], - [AS_HELP_STRING([--with-experimental-kernel-lib], - [build experimental bitcoinkernel library (default is to build if we're building libraries and the experimental build-chainstate executable)])], - [build_experimental_kernel_lib=$withval], - [build_experimental_kernel_lib=auto]) - -AC_ARG_WITH([daemon], - [AS_HELP_STRING([--with-daemon], - [build coordinated daemon (default=yes)])], - [build_coordinated=$withval], - [build_coordinated=yes]) - -case $host in - *mingw*) - TARGET_OS=windows - AC_CHECK_LIB([kernel32], [GetModuleFileNameA], [], [AC_MSG_ERROR([libkernel32 missing])]) - AC_CHECK_LIB([user32], [main], [], [AC_MSG_ERROR([libuser32 missing])]) - AC_CHECK_LIB([gdi32], [main], [], [AC_MSG_ERROR([libgdi32 missing])]) - AC_CHECK_LIB([comdlg32], [main], [], [AC_MSG_ERROR([libcomdlg32 missing])]) - AC_CHECK_LIB([winmm], [main], [], [AC_MSG_ERROR([libwinmm missing])]) - AC_CHECK_LIB([shell32], [SHGetSpecialFolderPathW], [], [AC_MSG_ERROR([libshell32 missing])]) - AC_CHECK_LIB([comctl32], [main], [], [AC_MSG_ERROR([libcomctl32 missing])]) - AC_CHECK_LIB([ole32], [CoCreateInstance], [], [AC_MSG_ERROR([libole32 missing])]) - AC_CHECK_LIB([oleaut32], [main], [], [AC_MSG_ERROR([liboleaut32 missing])]) - AC_CHECK_LIB([uuid], [main], [], [AC_MSG_ERROR([libuuid missing])]) - AC_CHECK_LIB([advapi32], [CryptAcquireContextW], [], [AC_MSG_ERROR([libadvapi32 missing])]) - AC_CHECK_LIB([ws2_32], [WSAStartup], [], [AC_MSG_ERROR([libws2_32 missing])]) - AC_CHECK_LIB([shlwapi], [PathRemoveFileSpecW], [], [AC_MSG_ERROR([libshlwapi missing])]) - AC_CHECK_LIB([iphlpapi], [GetAdaptersAddresses], [], [AC_MSG_ERROR([libiphlpapi missing])]) - - dnl -static is interpreted by libtool, where it has a different meaning. - dnl In libtool-speak, it's -all-static. - AX_CHECK_LINK_FLAG([-static], [LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -all-static"]) - - AC_PATH_PROG([MAKENSIS], [makensis], [none]) - if test "$MAKENSIS" = "none"; then - AC_MSG_WARN([makensis not found. Cannot create installer.]) - fi - - AC_PATH_TOOL([WINDRES], [windres], [none]) - if test "$WINDRES" = "none"; then - AC_MSG_ERROR([windres not found]) - fi - - CORE_CPPFLAGS="$CORE_CPPFLAGS -DSECP256K1_STATIC" - - CORE_CPPFLAGS="$CORE_CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN" - dnl Prevent the definition of min/max macros. - dnl We always want to use the standard library. - CORE_CPPFLAGS="$CORE_CPPFLAGS -DNOMINMAX" - - dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against. - dnl That breaks our ability to build dll's with static libgcc/libstdc++/libssp. Override - dnl its command here, with the predeps/postdeps removed, and -static inserted. Postdeps are - dnl also overridden to prevent their insertion later. - dnl This should only affect dll's. - archive_cmds_CXX="\$CC -shared \$libobjs \$deplibs \$compiler_flags -static -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib" - postdeps_CXX= - - dnl We require Windows 7 (NT 6.1) or later - AX_CHECK_LINK_FLAG([-Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1"], [], [$LDFLAG_WERROR]) - - dnl Avoid the use of aligned vector instructions when building for Windows. - dnl See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412. - AX_CHECK_COMPILE_FLAG([-Wa,-muse-unaligned-vector-move], [CORE_CXXFLAGS="$CORE_CXXFLAGS -Wa,-muse-unaligned-vector-move"], [], [$CXXFLAG_WERROR]) - ;; - *darwin*) - TARGET_OS=darwin - if test $cross_compiling != "yes"; then - BUILD_OS=darwin - AC_CHECK_PROG([BREW], [brew], [brew]) - if test "$BREW" = "brew"; then - dnl These Homebrew packages may be keg-only, meaning that they won't be found - dnl in expected paths because they may conflict with system files. Ask - dnl Homebrew where each one is located, then adjust paths accordingly. - 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). - - dnl Homebrew may create symlinks in /usr/local/include for some packages. - dnl Because MacOS's clang internally adds "-I /usr/local/include" to its search - dnl paths, this will negate efforts to use -isystem for those packages, as they - dnl will be found first in /usr/local. Use the internal "-internal-isystem" - dnl option to system-ify all /usr/local/include paths without adding it to the list - dnl of search paths in case it's not already there. - if test "$suppress_external_warnings" != "no"; then - AX_CHECK_PREPROC_FLAG([-Xclang -internal-isystem/usr/local/include], [CORE_CPPFLAGS="$CORE_CPPFLAGS -Xclang -internal-isystem/usr/local/include"], [], [$CXXFLAG_WERROR]) - fi - - if test "$use_bdb" != "no" && $BREW list --versions berkeley-db@4 >/dev/null && test "$BDB_CFLAGS" = "" && test "$BDB_LIBS" = ""; then - bdb_prefix=$($BREW --prefix berkeley-db@4 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 $BREW list --versions qt@5 >/dev/null; then - export PKG_CONFIG_PATH="$($BREW --prefix qt@5 2>/dev/null)/lib/pkgconfig:$PKG_CONFIG_PATH" - fi - - case $host in - *aarch64*) - dnl The preferred Homebrew prefix for Apple Silicon is /opt/homebrew. - dnl Therefore, as we do not use pkg-config to detect miniupnpc and libnatpmp - dnl packages, we should set the CPPFLAGS and LDFLAGS variables for them - dnl explicitly. - if test "$use_upnp" != "no" && $BREW list --versions miniupnpc >/dev/null; then - miniupnpc_prefix=$($BREW --prefix miniupnpc 2>/dev/null) - if test "$suppress_external_warnings" != "no"; then - MINIUPNPC_CPPFLAGS="-isystem $miniupnpc_prefix/include" - else - MINIUPNPC_CPPFLAGS="-I$miniupnpc_prefix/include" - fi - MINIUPNPC_LIBS="-L$miniupnpc_prefix/lib" - fi - if test "$use_natpmp" != "no" && $BREW list --versions libnatpmp >/dev/null; then - libnatpmp_prefix=$($BREW --prefix libnatpmp 2>/dev/null) - if test "$suppress_external_warnings" != "no"; then - NATPMP_CPPFLAGS="-isystem $libnatpmp_prefix/include" - else - NATPMP_CPPFLAGS="-I$libnatpmp_prefix/include" - fi - NATPMP_LIBS="-L$libnatpmp_prefix/lib" - fi - ;; - esac - fi - else - case $build_os in - *darwin*) - BUILD_OS=darwin - ;; - *) - AC_PATH_TOOL([DSYMUTIL], [dsymutil], [dsymutil]) - AC_PATH_TOOL([INSTALL_NAME_TOOL], [install_name_tool], [install_name_tool]) - AC_PATH_TOOL([OTOOL], [otool], [otool]) - AC_PATH_PROG([ZIP], [zip], [zip]) - - dnl libtool will try to strip the static lib, which is a problem for - dnl cross-builds because strip attempts to call a hard-coded ld, - dnl which may not exist in the path. Stripping the .a is not - dnl necessary, so just disable it. - old_striplib= - ;; - esac - fi - - AX_CHECK_LINK_FLAG([-Wl,-headerpad_max_install_names], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-headerpad_max_install_names"], [], [$LDFLAG_WERROR]) - CORE_CPPFLAGS="$CORE_CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0" - OBJCXXFLAGS="$CXXFLAGS" - ;; - *android*) - dnl make sure android stays above linux for hosts like *linux-android* - TARGET_OS=android - case $host in - *x86_64*) - ANDROID_ARCH=x86_64 - ;; - *aarch64*) - ANDROID_ARCH=arm64-v8a - ;; - *armv7a*) - ANDROID_ARCH=armeabi-v7a - ;; - *) AC_MSG_ERROR([Could not determine Android arch, or it is unsupported]) ;; - esac - ;; - *linux*) - TARGET_OS=linux - ;; -esac - -if test "$use_extended_functional_tests" != "no"; then - AC_SUBST(EXTENDED_FUNCTIONAL_TESTS, --extended) -fi - -if test "$use_lcov" = "yes"; then - if test "$LCOV" = ""; then - AC_MSG_ERROR([lcov testing requested but lcov not found]) - fi - if test "$PYTHON" = ""; then - AC_MSG_ERROR([lcov testing requested but python not found]) - fi - if test "$GENHTML" = ""; then - AC_MSG_ERROR([lcov testing requested but genhtml not found]) - fi - - 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 "$LLVM_COV" = ""; then - AC_MSG_ERROR([lcov testing requested but llvm-cov not found]) - fi - COV_TOOL="$LLVM_COV gcov" - ],[ - AC_MSG_RESULT([no]) - if test "$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], [CORE_LDFLAGS="$CORE_LDFLAGS --coverage"], - [AC_MSG_ERROR([lcov testing requested but --coverage linker flag does not work])]) - AX_CHECK_COMPILE_FLAG([--coverage],[CORE_CXXFLAGS="$CORE_CXXFLAGS --coverage"], - [AC_MSG_ERROR([lcov testing requested but --coverage flag does not work])]) - dnl If coverage is enabled, and the user hasn't overridden CXXFLAGS, clear - dnl them, to prevent autoconfs "-g -O2" being added. Otherwise we'd end up - dnl with "--coverage -Og -O0 -g -O2". - if test "$CXXFLAGS_overridden" = "no"; then - CXXFLAGS="" - fi - CORE_CXXFLAGS="$CORE_CXXFLAGS -Og -O0" -fi - -if test "$use_lcov_branch" != "no"; then - AC_SUBST(LCOV_OPTS, "$LCOV_OPTS --rc lcov_branch_coverage=1") -fi - -dnl Check for endianness -AC_C_BIGENDIAN - -dnl Check for pthread compile/link requirements -AX_PTHREAD - -dnl Check if -latomic is required for -CHECK_ATOMIC - -dnl The following macro will add the necessary defines to bitcoin-config.h, but -dnl they also need to be passed down to any subprojects. Pull the results out of -dnl the cache and add them to CPPFLAGS. -AC_SYS_LARGEFILE -dnl detect POSIX or GNU variant of strerror_r -AC_FUNC_STRERROR_R - -if test "$ac_cv_sys_file_offset_bits" != "" && - test "$ac_cv_sys_file_offset_bits" != "no" && - test "$ac_cv_sys_file_offset_bits" != "unknown"; then - CORE_CPPFLAGS="$CORE_CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" -fi - -if test "$ac_cv_sys_large_files" != "" && - test "$ac_cv_sys_large_files" != "no" && - test "$ac_cv_sys_large_files" != "unknown"; then - CORE_CPPFLAGS="$CORE_CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files" -fi - -if test "$enable_gprof" = "yes"; then - dnl -pg is incompatible with -pie. Since hardening and profiling together doesn't make sense, - dnl we simply make them mutually exclusive here. Additionally, hardened toolchains may force - dnl -pie by default, in which case it needs to be turned off with -no-pie. - - if test "$use_hardening" = "yes"; then - AC_MSG_ERROR([gprof profiling is not compatible with hardening. Reconfigure with --disable-hardening or --disable-gprof]) - fi - use_hardening=no - AX_CHECK_COMPILE_FLAG([-pg],[GPROF_CXXFLAGS="-pg"], - [AC_MSG_ERROR([gprof profiling requested but not available])], [$CXXFLAG_WERROR]) - - AX_CHECK_LINK_FLAG([-no-pie], [GPROF_LDFLAGS="-no-pie"]) - AX_CHECK_LINK_FLAG([-pg], [GPROF_LDFLAGS="$GPROF_LDFLAGS -pg"], - [AC_MSG_ERROR([gprof profiling requested but not available])], [$GPROF_LDFLAGS]) -fi - -if test "$TARGET_OS" != "windows"; then - dnl All windows code is PIC, forcing it on just adds useless compile warnings - AX_CHECK_COMPILE_FLAG([-fPIC], [PIC_FLAGS="-fPIC"]) -fi - -if test "$use_hardening" != "no"; then - use_hardening=yes - 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"]) - - case $host in - *mingw*) - dnl stack-clash-protection doesn't compile with GCC 10 and earlier. - dnl In any case, it is a no-op for Windows. - dnl See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 for more details. - ;; - *) - AX_CHECK_COMPILE_FLAG([-fstack-clash-protection], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-clash-protection"], [], [$CXXFLAG_WERROR]) - ;; - esac - - case $host in - *aarch64*) - AX_CHECK_COMPILE_FLAG([-mbranch-protection=bti], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -mbranch-protection=bti"]) - ;; - esac - - 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. - if test "$enable_debug" != "yes"; then - AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=3],[ - AX_CHECK_PREPROC_FLAG([-U_FORTIFY_SOURCE],[ - HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -U_FORTIFY_SOURCE" - ]) - HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -D_FORTIFY_SOURCE=3" - ]) - fi - - AX_CHECK_LINK_FLAG([-Wl,--enable-reloc-section], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--enable-reloc-section"], [], [$LDFLAG_WERROR]) - 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 - *mingw*) - AC_CHECK_LIB([ssp], [main], [], [AC_MSG_ERROR([libssp missing])]) - ;; - esac -fi - -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 "$TARGET_OS" = "darwin"; then - AX_CHECK_LINK_FLAG([-Wl,-dead_strip], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-dead_strip"], [], [$LDFLAG_WERROR]) - AX_CHECK_LINK_FLAG([-Wl,-dead_strip_dylibs], [CORE_LDFLAGS="$CORE_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]) - AX_CHECK_LINK_FLAG([-Wl,-fixup_chains], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-fixup_chains"], [], [$LDFLAG_WERROR]) -fi - -AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h]) - -AC_CHECK_DECLS([getifaddrs, freeifaddrs],[CHECK_SOCKET],, - [#include - #include ] -) - -dnl These are used for daemonization in coordinated -AC_CHECK_DECLS([fork]) -AC_CHECK_DECLS([setsid]) - -AC_CHECK_DECLS([pipe2]) - -AC_CHECK_FUNCS([timingsafe_bcmp]) - -AC_CHECK_DECLS([le16toh, le32toh, le64toh, htole16, htole32, htole64, be16toh, be32toh, be64toh, htobe16, htobe32, htobe64],,, - [#if HAVE_ENDIAN_H - #include - #elif HAVE_SYS_ENDIAN_H - #include - #endif]) - -AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64],,, - [#if HAVE_BYTESWAP_H - #include - #endif]) - -AC_MSG_CHECKING([for __builtin_clzl]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ - (void) __builtin_clzl(0); - ]])], - [ AC_MSG_RESULT([yes]); have_clzl=yes; AC_DEFINE([HAVE_BUILTIN_CLZL], [1], [Define this symbol if you have __builtin_clzl])], - [ AC_MSG_RESULT([no]); have_clzl=no;] -) - -AC_MSG_CHECKING([for __builtin_clzll]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ - (void) __builtin_clzll(0); - ]])], - [ AC_MSG_RESULT([yes]); have_clzll=yes; AC_DEFINE([HAVE_BUILTIN_CLZLL], [1], [Define this symbol if you have __builtin_clzll])], - [ AC_MSG_RESULT([no]); have_clzll=no;] -) - -dnl Check for malloc_info (for memory statistics information in getmemoryinfo) -AC_MSG_CHECKING([for getmemoryinfo]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[ int f = malloc_info(0, NULL); ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_MALLOC_INFO], [1], [Define this symbol if you have malloc_info]) ], - [ AC_MSG_RESULT([no])] -) - -dnl Check for mallopt(M_ARENA_MAX) (to set glibc arenas) -AC_MSG_CHECKING([for mallopt M_ARENA_MAX]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[ mallopt(M_ARENA_MAX, 1); ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_MALLOPT_ARENA_MAX], [1], [Define this symbol if you have mallopt with M_ARENA_MAX]) ], - [ AC_MSG_RESULT([no])] -) - -dnl Check for posix_fallocate -AC_MSG_CHECKING([for posix_fallocate]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - // same as in src/util/fs_helpers.cpp - #ifdef __linux__ - #ifdef _POSIX_C_SOURCE - #undef _POSIX_C_SOURCE - #endif - #define _POSIX_C_SOURCE 200112L - #endif // __linux__ - #include ]], - [[ int f = posix_fallocate(0, 0, 0); ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_POSIX_FALLOCATE], [1], [Define this symbol if you have posix_fallocate]) ], - [ AC_MSG_RESULT([no])] -) - -AC_MSG_CHECKING([for default visibility attribute]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - int foo(void) __attribute__((visibility("default"))); - int main(){} - ])], - [ - AC_DEFINE([HAVE_DEFAULT_VISIBILITY_ATTRIBUTE], [1], [Define if the visibility attribute is supported.]) - AC_MSG_RESULT([yes]) - ], - [ - AC_MSG_RESULT([no]) - if test "$use_reduce_exports" = "yes"; then - AC_MSG_ERROR([Cannot find a working visibility attribute. Use --disable-reduce-exports.]) - fi - ] -) - -AC_MSG_CHECKING([for dllexport attribute]) -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - __declspec(dllexport) int foo(void); - int main(){} - ])], - [ - AC_DEFINE([HAVE_DLLEXPORT_ATTRIBUTE], [1], [Define if the dllexport attribute is supported.]) - AC_MSG_RESULT([yes]) - ], - [AC_MSG_RESULT([no])] -) - -if test "$use_thread_local" = "yes" || test "$use_thread_local" = "auto"; then - TEMP_LDFLAGS="$LDFLAGS" - LDFLAGS="$TEMP_LDFLAGS $PTHREAD_CFLAGS" - AC_MSG_CHECKING([for thread_local support]) - AC_LINK_IFELSE([AC_LANG_SOURCE([ - #include - static thread_local int foo = 0; - static void run_thread() { foo++;} - int main(){ - for(int i = 0; i < 10; i++) { std::thread(run_thread).detach();} - return foo; - } - ])], - [ - case $host in - *mingw*) - dnl mingw32's implementation of thread_local has also been shown to behave - dnl erroneously under concurrent usage; see: - dnl https://gist.github.com/jamesob/fe9a872051a88b2025b1aa37bfa98605 - AC_MSG_RESULT([no]) - ;; - *freebsd*) - dnl FreeBSD's implementation of thread_local is also buggy (per - dnl https://groups.google.com/d/msg/bsdmailinglist/22ncTZAbDp4/Dii_pII5AwAJ) - AC_MSG_RESULT([no]) - ;; - *) - AC_DEFINE([HAVE_THREAD_LOCAL], [1], [Define if thread_local is supported.]) - AC_MSG_RESULT([yes]) - ;; - esac - ], - [ - AC_MSG_RESULT([no]) - ] - ) - LDFLAGS="$TEMP_LDFLAGS" -fi - -dnl check for gmtime_r(), fallback to gmtime_s() if that is unavailable -dnl fail if neither are available. -AC_MSG_CHECKING([for gmtime_r]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[ gmtime_r((const time_t *) nullptr, (struct tm *) nullptr); ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GMTIME_R], [1], [Define this symbol if gmtime_r is available]) ], - [ AC_MSG_RESULT([no]); - AC_MSG_CHECKING([for gmtime_s]); - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[ gmtime_s((struct tm *) nullptr, (const time_t *) nullptr); ]])], - [ AC_MSG_RESULT([yes])], - [ AC_MSG_RESULT([no]); AC_MSG_ERROR([Both gmtime_r and gmtime_s are unavailable]) ] - ) - ] -) - -dnl Check for different ways of gathering OS randomness -AC_MSG_CHECKING([for Linux getrandom function]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include ]], - [[ getrandom(nullptr, 32, 0); ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GETRANDOM], [1], [Define this symbol if the Linux getrandom function call is available]) ], - [ AC_MSG_RESULT([no])] -) - -AC_MSG_CHECKING([for getentropy via sys/random.h]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include ]], - [[ getentropy(nullptr, 32) ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GETENTROPY_RAND], [1], [Define this symbol if the BSD getentropy system call is available with sys/random.h]) ], - [ AC_MSG_RESULT([no])] -) - -AC_MSG_CHECKING([for sysctl]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include ]], - [[ #ifdef __linux__ - #error "Don't use sysctl on Linux, it's deprecated even when it works" - #endif - sysctl(nullptr, 2, nullptr, nullptr, nullptr, 0); ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_SYSCTL], [1], [Define this symbol if the BSD sysctl() is available]) ], - [ AC_MSG_RESULT([no])] -) - -AC_MSG_CHECKING([for sysctl KERN_ARND]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include ]], - [[ #ifdef __linux__ - #error "Don't use sysctl on Linux, it's deprecated even when it works" - #endif - static int name[2] = {CTL_KERN, KERN_ARND}; - sysctl(name, 2, nullptr, nullptr, nullptr, 0); ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_SYSCTL_ARND], [1], [Define this symbol if the BSD sysctl(KERN_ARND) is available]) ], - [ AC_MSG_RESULT([no])] -) - -AC_MSG_CHECKING([for if type char equals int8_t]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include ]], - [[ static_assert(std::is_same::value, ""); ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([CHAR_EQUALS_INT8], [1], [Define this symbol if type char equals int8_t]) ], - [ AC_MSG_RESULT([no])] -) - -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 ]], - [[ fcntl(0, F_FULLFSYNC, 0); ]])], - [ AC_MSG_RESULT([yes]); HAVE_FULLFSYNC=1 ], - [ AC_MSG_RESULT([no]); HAVE_FULLFSYNC=0 ] -) - -AC_MSG_CHECKING([for O_CLOEXEC]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[ open("", O_CLOEXEC); ]])], - [ AC_MSG_RESULT([yes]); HAVE_O_CLOEXEC=1 ], - [ AC_MSG_RESULT([no]); HAVE_O_CLOEXEC=0 ] -) -AC_DEFINE_UNQUOTED([HAVE_O_CLOEXEC], [$HAVE_O_CLOEXEC], [Define to 1 if O_CLOEXEC flag is available.]) - -dnl crc32c platform checks -AC_MSG_CHECKING([for __builtin_prefetch]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ - char data = 0; - const char* address = &data; - __builtin_prefetch(address, 0, 0); - ]])], - [ AC_MSG_RESULT([yes]); HAVE_BUILTIN_PREFETCH=1 ], - [ AC_MSG_RESULT([no]); HAVE_BUILTIN_PREFETCH=0 ] -) - -AC_MSG_CHECKING([for _mm_prefetch]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ - char data = 0; - const char* address = &data; - _mm_prefetch(address, _MM_HINT_NTA); - ]])], - [ AC_MSG_RESULT([yes]); HAVE_MM_PREFETCH=1 ], - [ AC_MSG_RESULT([no]); HAVE_MM_PREFETCH=0 ] -) - -AC_MSG_CHECKING([for strong getauxval support in the system headers]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - ]], [[ - getauxval(AT_HWCAP); - ]])], - [ 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 ] -) - -have_any_system=no -AC_MSG_CHECKING([for std::system]) -AC_LINK_IFELSE( - [ AC_LANG_PROGRAM( - [[ #include ]], - [[ int nErr = std::system(""); ]] - )], - [ AC_MSG_RESULT([yes]); have_any_system=yes], - [ AC_MSG_RESULT([no]) ] -) - -AC_MSG_CHECKING([for ::_wsystem]) -AC_LINK_IFELSE( - [ AC_LANG_PROGRAM( - [[ #include ]], - [[ int nErr = ::_wsystem(NULL); ]] - )], - [ AC_MSG_RESULT([yes]); have_any_system=yes], - [ AC_MSG_RESULT([no]) ] -) - -if test "$have_any_system" != "no"; then - AC_DEFINE([HAVE_SYSTEM], [1], [Define to 1 if std::system or ::wsystem is available.]) -fi - -dnl SUPPRESSED_CPPFLAGS=SUPPRESS_WARNINGS([$SOME_CPPFLAGS]) -dnl Replace -I with -isystem in $SOME_CPPFLAGS to suppress warnings from -dnl headers from its include directories and return the result. -dnl See -isystem documentation: -dnl https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html -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 "$enable_fuzz" = "yes"; then - AC_MSG_WARN([enable-fuzz will disable all other targets and force --enable-fuzz-binary=yes]) - build_coordinate_utils=no - build_coordinate_cli=no - build_coordinate_tx=no - build_coordinate_util=no - build_bitcoin_chainstate=no - build_coordinate_wallet=no - build_coordinated=no - build_bitcoin_libs=no - bitcoin_enable_qt=no - bitcoin_enable_qt_test=no - bitcoin_enable_qt_dbus=no - use_bench=no - use_tests=no - use_external_signer=no - use_upnp=no - use_natpmp=no - use_zmq=no - enable_fuzz_binary=yes - - AX_CHECK_PREPROC_FLAG([-DABORT_ON_FAILED_ASSUME], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DABORT_ON_FAILED_ASSUME"], [], [$CXXFLAG_WERROR]) -else - COORDINATE_QT_INIT - - dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus - COORDINATE_QT_CONFIGURE([5.11.3]) - - dnl Keep a copy of the original $QT_INCLUDES and use it when invoking qt's moc - QT_INCLUDES_UNSUPPRESSED=$QT_INCLUDES - if test "$suppress_external_warnings" != "no" ; then - QT_INCLUDES=SUPPRESS_WARNINGS($QT_INCLUDES) - QT_DBUS_INCLUDES=SUPPRESS_WARNINGS($QT_DBUS_INCLUDES) - QT_TEST_INCLUDES=SUPPRESS_WARNINGS($QT_TEST_INCLUDES) - fi -fi - -if test "$enable_fuzz_binary" = "yes"; then - AC_MSG_CHECKING([whether main function is needed for fuzz binary]) - AX_CHECK_LINK_FLAG( - [], - [AC_MSG_RESULT([no])], - [AC_MSG_RESULT([yes]); CORE_CPPFLAGS="$CORE_CPPFLAGS -DPROVIDE_FUZZ_MAIN_FUNCTION"], - [$SANITIZER_LDFLAGS], - [AC_LANG_PROGRAM([[ - #include - #include - extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { return 0; } - /* comment to remove the main function ... - ]],[[ - */ int not_main() { - ]])]) - - CHECK_RUNTIME_LIB -fi - -if test "$enable_wallet" != "no"; then - dnl Check for libdb_cxx only if wallet enabled - if test "$use_bdb" != "no"; then - BITCOIN_FIND_BDB48 - if test "$suppress_external_warnings" != "no" ; then - BDB_CPPFLAGS=SUPPRESS_WARNINGS($BDB_CPPFLAGS) - fi - fi - - dnl Check for sqlite3 - if test "$use_sqlite" != "no"; 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 "$use_sqlite" = "no"; then - use_sqlite=no - elif test "$have_sqlite" = "no"; then - if test "$use_sqlite" = "yes"; then - AC_MSG_ERROR([sqlite support requested but cannot be built. Use --without-sqlite]) - fi - use_sqlite=no - else - if test "$use_sqlite" != "no"; then - AC_DEFINE([USE_SQLITE],[1],[Define if sqlite support should be compiled in]) - use_sqlite=yes - fi - fi - AC_MSG_RESULT([$use_sqlite]) - - dnl Disable wallet if both --without-bdb and --without-sqlite - if test "$use_bdb$use_sqlite" = "nono"; then - if test "$enable_wallet" = "yes"; then - AC_MSG_ERROR([wallet functionality requested but no BDB or SQLite support available.]) - fi - enable_wallet=no - fi -fi - -if test "$use_usdt" != "no"; then - AC_MSG_CHECKING([whether Userspace, Statically Defined Tracing tracepoints are supported]) - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM( - [#include ], - [DTRACE_PROBE(context, event); - int a, b, c, d, e, f, g; - DTRACE_PROBE7(context, event, a, b, c, d, e, f, g);] - )], - [AC_MSG_RESULT([yes]); AC_DEFINE([ENABLE_TRACING], [1], [Define to 1 to enable tracepoints for Userspace, Statically Defined Tracing])], - [AC_MSG_RESULT([no]); use_usdt=no;] - ) -fi -AM_CONDITIONAL([ENABLE_USDT_TRACEPOINTS], [test "$use_usdt" = "yes"]) - -if test "$build_coordinated$bitcoin_enable_qt$use_bench$use_tests" = "nononono"; then - use_upnp=no - use_natpmp=no - use_zmq=no -fi - -dnl Check for libminiupnpc (optional) -if test "$use_upnp" != "no"; then - TEMP_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $MINIUPNPC_CPPFLAGS" - AC_CHECK_HEADERS( - [miniupnpc/miniupnpc.h miniupnpc/upnpcommands.h miniupnpc/upnperrors.h], - [AC_CHECK_LIB([miniupnpc], [upnpDiscover], [MINIUPNPC_LIBS="$MINIUPNPC_LIBS -lminiupnpc"], [have_miniupnpc=no], [$MINIUPNPC_LIBS])], - [have_miniupnpc=no] - ) - - dnl The minimum supported miniUPnPc API version is set to 17. This excludes - dnl versions with known vulnerabilities. - if test "$have_miniupnpc" != "no"; then - AC_MSG_CHECKING([whether miniUPnPc API version is supported]) - AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if MINIUPNPC_API_VERSION >= 17 - // Everything is okay - #else - # error miniUPnPc API version is too old - #endif - ]])],[ - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - AC_MSG_WARN([miniUPnPc API version < 17 is unsupported, disabling UPnP support.]) - have_miniupnpc=no - ]) - fi - CPPFLAGS="$TEMP_CPPFLAGS" -fi - -dnl Check for libnatpmp (optional). -if test "$use_natpmp" != "no"; then - TEMP_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $NATPMP_CPPFLAGS" - AC_CHECK_HEADERS([natpmp.h], - [AC_CHECK_LIB([natpmp], [initnatpmp], [NATPMP_LIBS="$NATPMP_LIBS -lnatpmp"], [have_natpmp=no], [$NATPMP_LIBS])], - [have_natpmp=no]) - CPPFLAGS="$TEMP_CPPFLAGS" -fi - -if test "$build_coordinate_wallet$build_coordinate_cli$build_coordinate_tx$build_coordinate_util$build_coordinated$bitcoin_enable_qt$use_tests$use_bench$enable_fuzz_binary" = "nonononononononono"; then - use_boost=no -else - use_boost=yes -fi - -if test "$use_boost" = "yes"; then - - dnl Check for Boost headers - AX_BOOST_BASE([1.64.0],[],[AC_MSG_ERROR([Boost is not available!])]) - if test "$want_boost" = "no"; then - AC_MSG_ERROR([only libbitcoinconsensus can be built without Boost]) - fi - - dnl we don't use multi_index serialization - BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION" - - dnl Prevent use of std::unary_function, which was removed in C++17, - dnl and will generate warnings with newer compilers for Boost - dnl older than 1.80. - dnl See: https://github.com/boostorg/config/pull/430. - AX_CHECK_PREPROC_FLAG([-DBOOST_NO_CXX98_FUNCTION_BASE], [BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"], [], [$CXXFLAG_WERROR], - [AC_LANG_PROGRAM([[#include ]])]) - - if test "$suppress_external_warnings" != "no"; then - BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS) - fi -fi - -if test "$use_external_signer" != "no"; then - AC_MSG_CHECKING([whether Boost.Process can be used]) - TEMP_CXXFLAGS="$CXXFLAGS" - dnl Boost 1.78 requires the following workaround. - dnl See: https://github.com/boostorg/process/issues/235 - CXXFLAGS="$CXXFLAGS -Wno-error=narrowing" - TEMP_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - TEMP_LDFLAGS="$LDFLAGS" - dnl Boost 1.73 and older require the following workaround. - LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #define BOOST_PROCESS_USE_STD_FS - #include - ]],[[ - namespace bp = boost::process; - bp::opstream stdin_stream; - bp::ipstream stdout_stream; - bp::child c("dummy", bp::std_out > stdout_stream, bp::std_err > stdout_stream, bp::std_in < stdin_stream); - stdin_stream << std::string{"test"} << std::endl; - if (c.running()) c.terminate(); - c.wait(); - c.exit_code(); - ]])], - [have_boost_process="yes"], - [have_boost_process="no"]) - LDFLAGS="$TEMP_LDFLAGS" - CPPFLAGS="$TEMP_CPPFLAGS" - CXXFLAGS="$TEMP_CXXFLAGS" - AC_MSG_RESULT([$have_boost_process]) - if test "$have_boost_process" = "yes"; then - use_external_signer="yes" - AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled]) - AC_DEFINE([BOOST_PROCESS_USE_STD_FS], [1], [Defined to avoid Boost::Process trying to use Boost Filesystem]) - else - if test "$use_external_signer" = "yes"; then - AC_MSG_ERROR([External signing is not supported for this Boost version]) - fi - use_external_signer="no"; - fi -fi -AM_CONDITIONAL([ENABLE_EXTERNAL_SIGNER], [test "$use_external_signer" = "yes"]) - -dnl Check for reduced exports -if test "$use_reduce_exports" = "yes"; then - AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fvisibility=hidden"], - [AC_MSG_ERROR([Cannot set hidden symbol visibility. Use --disable-reduce-exports.])], [$CXXFLAG_WERROR]) - AX_CHECK_LINK_FLAG([-Wl,--exclude-libs,ALL], [RELDFLAGS="-Wl,--exclude-libs,ALL"], [], [$LDFLAG_WERROR]) -fi - -if test "$use_tests" = "yes"; then - - if test "$HEXDUMP" = ""; then - AC_MSG_ERROR([hexdump is required for tests]) - fi -fi - -dnl libevent check - -use_libevent=no -if test "$build_coordinate_cli$build_coordinated$bitcoin_enable_qt$enable_fuzz_binary$use_tests$use_bench" != "nononononono"; then - PKG_CHECK_MODULES([EVENT], [libevent >= 2.1.8], [use_libevent=yes], [AC_MSG_ERROR([libevent version 2.1.8 or greater not found.])]) - if test "$TARGET_OS" != "windows"; then - PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads >= 2.1.8], [], [AC_MSG_ERROR([libevent_pthreads version 2.1.8 or greater not found.])]) - fi - - if test "$suppress_external_warnings" != "no"; then - EVENT_CFLAGS=SUPPRESS_WARNINGS($EVENT_CFLAGS) - fi -fi - -if test x$use_libevent = xyes; then - TEMP_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $EVENT_CFLAGS" - AC_MSG_CHECKING([if evhttp_connection_get_peer expects const char**]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]], [[ - evhttp_connection *conn = (evhttp_connection *)1; - const char *host; - uint16_t port; - - evhttp_connection_get_peer(conn, &host, &port); - ]])], - [ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR], [1], [Define this symbol if evhttp_connection_get_peer expects const char**]) ], - [ AC_MSG_RESULT([no]) ] - ) - CXXFLAGS="$TEMP_CXXFLAGS" -fi - -dnl QR Code encoding library check - -if test "$use_qr" != "no"; then - COORDINATE_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])]) -fi - -dnl ZMQ check - -if test "$use_zmq" = "yes"; then - PKG_CHECK_MODULES([ZMQ], [libzmq >= 4], - AC_DEFINE([ENABLE_ZMQ], [1], [Define this symbol to enable ZMQ functions]), - [AC_MSG_WARN([libzmq version 4.x or greater not found, disabling]) - use_zmq=no]) -fi - -if test "$use_zmq" = "yes"; then - dnl Assume libzmq was built for static linking - case $host in - *mingw*) - ZMQ_CFLAGS="$ZMQ_CFLAGS -DZMQ_STATIC" - ;; - esac -fi - -AM_CONDITIONAL([ENABLE_ZMQ], [test "$use_zmq" = "yes"]) - -dnl libmultiprocess library check - -libmultiprocess_found=no -if test "$with_libmultiprocess" = "yes" || test "$with_libmultiprocess" = "auto"; then - PKG_CHECK_MODULES([LIBMULTIPROCESS], [libmultiprocess], [ - libmultiprocess_found=yes; - libmultiprocess_prefix=`$PKG_CONFIG --variable=prefix libmultiprocess`; - ], [true]) -elif test "$with_libmultiprocess" != "no"; then - AC_MSG_ERROR([--with-libmultiprocess=$with_libmultiprocess value is not yes, auto, or no]) -fi - -dnl Enable multiprocess check - -if test "$enable_multiprocess" = "yes"; then - if test "$libmultiprocess_found" != "yes"; 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 "$enable_multiprocess" = "auto"; then - build_multiprocess=$libmultiprocess_found -else - build_multiprocess=no -fi - -AM_CONDITIONAL([BUILD_MULTIPROCESS], [test "$build_multiprocess" = "yes"]) -AM_CONDITIONAL([BUILD_BITCOIN_NODE], [test "$build_multiprocess" = "yes"]) -AM_CONDITIONAL([BUILD_BITCOIN_GUI], [test "$build_multiprocess" = "yes"]) - -dnl codegen tools check - -if test "$build_multiprocess" != "no"; then - if test "$with_mpgen" = "yes" || test "$with_mpgen" = "auto"; then - MPGEN_PREFIX="$libmultiprocess_prefix" - elif test "$with_mpgen" != "no"; then - MPGEN_PREFIX="$with_mpgen"; - fi - AC_SUBST(MPGEN_PREFIX) -fi - -AC_MSG_CHECKING([whether to build coordinated]) -AM_CONDITIONAL([build_coordinated], [test $build_coordinated = "yes"]) -AC_MSG_RESULT($build_coordinated) - -AC_MSG_CHECKING([whether to build coordinate-cli]) -AM_CONDITIONAL([BUILD_COORDINATE_CLI], [test $build_coordinate_cli = "yes"]) -AC_MSG_RESULT($build_coordinate_cli) - -AC_MSG_CHECKING([whether to build coordinate-tx]) -AM_CONDITIONAL([BUILD_COORDINATE_TX], [test $build_coordinate_tx = "yes"]) -AC_MSG_RESULT($build_coordinate_tx) - -AC_MSG_CHECKING([whether to build coordinate-wallet]) -AM_CONDITIONAL([BUILD_COORDINATE_WALLET], [test $build_coordinate_wallet = "yes"]) -AC_MSG_RESULT($build_coordinate_wallet) - -AC_MSG_CHECKING([whether to build coordinate-util]) -AM_CONDITIONAL([BUILD_COORDINATE_UTIL], [test $build_coordinate_util = "yes"]) -AC_MSG_RESULT($build_coordinate_util) - -AC_MSG_CHECKING([whether to build experimental bitcoin-chainstate]) -if test "$build_bitcoin_chainstate" = "yes"; then - if test "$build_experimental_kernel_lib" = "no"; then - AC_MSG_ERROR([experimental bitcoin-chainstate cannot be built without the experimental bitcoinkernel library. Use --with-experimental-kernel-lib]); - fi -fi -AM_CONDITIONAL([BUILD_BITCOIN_CHAINSTATE], [test $build_bitcoin_chainstate = "yes"]) -AC_MSG_RESULT($build_bitcoin_chainstate) - -AC_MSG_CHECKING([whether to build libraries]) -AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test $build_bitcoin_libs = "yes"]) - -if test "$build_bitcoin_libs" = "yes"; then - AC_DEFINE([HAVE_CONSENSUS_LIB], [1], [Define this symbol if the consensus lib has been built]) - AC_CONFIG_FILES([libbitcoinconsensus.pc:libbitcoinconsensus.pc.in]) -fi - -AM_CONDITIONAL([BUILD_BITCOIN_KERNEL_LIB], [test "$build_experimental_kernel_lib" != "no" && ( test "$build_experimental_kernel_lib" = "yes" || test "$build_bitcoin_chainstate" = "yes" )]) - -AC_MSG_RESULT($build_bitcoin_libs) - -AC_LANG_POP - -if test "$use_ccache" != "no"; then - AC_MSG_CHECKING([if ccache should be used]) - if test "$CCACHE" = ""; then - if test "$use_ccache" = "yes"; then - AC_MSG_ERROR([ccache not found.]); - else - use_ccache=no - fi - else - use_ccache=yes - CC="$ac_cv_path_CCACHE $CC" - CXX="$ac_cv_path_CCACHE $CXX" - fi - AC_MSG_RESULT($use_ccache) - if test "$use_ccache" = "yes"; then - AX_CHECK_COMPILE_FLAG([-fdebug-prefix-map=A=B], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -fdebug-prefix-map=\$(abs_top_srcdir)=."], [], [$CXXFLAG_WERROR]) - AX_CHECK_PREPROC_FLAG([-fmacro-prefix-map=A=B], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -fmacro-prefix-map=\$(abs_top_srcdir)=."], [], [$CXXFLAG_WERROR]) - fi -fi - -dnl enable wallet -AC_MSG_CHECKING([if wallet should be enabled]) -if test "$enable_wallet" != "no"; then - AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED([ENABLE_WALLET],[1],[Define to 1 to enable wallet functions]) - enable_wallet=yes - -else - AC_MSG_RESULT([no]) -fi - -dnl enable upnp support -AC_MSG_CHECKING([whether to build with support for UPnP]) -if test "$have_miniupnpc" = "no"; then - if test "$use_upnp" = "yes"; then - AC_MSG_ERROR([UPnP requested but cannot be built. Use --without-miniupnpc]) - fi - AC_MSG_RESULT([no]) - use_upnp=no -else - if test "$use_upnp" != "no"; then - AC_MSG_RESULT([yes]) - use_upnp=yes - AC_DEFINE([USE_UPNP], [1], [Define to 1 if UPnP support should be compiled in.]) - if test "$TARGET_OS" = "windows"; then - MINIUPNPC_CPPFLAGS="$MINIUPNPC_CPPFLAGS -DMINIUPNP_STATICLIB" - fi - else - AC_MSG_RESULT([no]) - fi -fi - -dnl Enable NAT-PMP support. -AC_MSG_CHECKING([whether to build with support for NAT-PMP]) -if test "$have_natpmp" = "no"; then - if test "$use_natpmp" = "yes"; then - AC_MSG_ERROR([NAT-PMP requested but cannot be built. Use --without-natpmp]) - fi - AC_MSG_RESULT([no]) - use_natpmp=no -else - if test "$use_natpmp" != "no"; then - AC_MSG_RESULT([yes]) - use_natpmp=yes - AC_DEFINE([USE_NATPMP], [1], [Define to 1 if UPnP support should be compiled in.]) - if test "$TARGET_OS" = "windows"; then - NATPMP_CPPFLAGS="$NATPMP_CPPFLAGS -DSTATICLIB -DNATPMP_STATICLIB" - fi - else - AC_MSG_RESULT([no]) - fi -fi - -dnl these are only used when qt is enabled -BUILD_TEST_QT="" -if test "$bitcoin_enable_qt" != "no"; then - dnl enable dbus support - AC_MSG_CHECKING([whether to build GUI with support for D-Bus]) - if test "$bitcoin_enable_qt_dbus" != "no"; then - AC_DEFINE([USE_DBUS], [1], [Define if dbus support should be compiled in]) - fi - AC_MSG_RESULT([$bitcoin_enable_qt_dbus]) - - dnl enable qr support - AC_MSG_CHECKING([whether to build GUI with support for QR codes]) - if test "$have_qrencode" = "no"; then - if test "$use_qr" = "yes"; then - AC_MSG_ERROR([QR support requested but cannot be built. Use --without-qrencode]) - fi - use_qr=no - else - if test "$use_qr" != "no"; then - AC_DEFINE([USE_QRCODE], [1], [Define if QR support should be compiled in]) - use_qr=yes - fi - fi - AC_MSG_RESULT([$use_qr]) - - if test "$XGETTEXT" = ""; then - AC_MSG_WARN([xgettext is required to update qt translations]) - fi - - AC_MSG_CHECKING([whether to build test_coordinate-qt]) - if test "$use_gui_tests$bitcoin_enable_qt_test" = "yesyes"; then - AC_MSG_RESULT([yes]) - BUILD_TEST_QT="yes" - else - AC_MSG_RESULT([no]) - fi -fi - -AC_MSG_CHECKING([whether to build test_bitcoin]) -if test "$use_tests" = "yes"; then - if test "$enable_fuzz" = "yes"; then - AC_MSG_RESULT([no, because fuzzing is enabled]) - else - AC_MSG_RESULT([yes]) - fi - BUILD_TEST="yes" -else - AC_MSG_RESULT([no]) - BUILD_TEST="" -fi - -AC_MSG_CHECKING([whether to reduce exports]) -if test "$use_reduce_exports" = "yes"; then - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -if test "$build_coordinate_wallet$build_coordinate_cli$build_coordinate_tx$build_coordinate_util$build_bitcoin_libs$build_coordinated$bitcoin_enable_qt$enable_fuzz_binary$use_bench$use_tests" = "nononononononononono"; then - AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-fuzz(-binary) --enable-bench or --enable-tests]) -fi - -AM_CONDITIONAL([TARGET_DARWIN], [test "$TARGET_OS" = "darwin"]) -AM_CONDITIONAL([BUILD_DARWIN], [test "$BUILD_OS" = "darwin"]) -AM_CONDITIONAL([TARGET_LINUX], [test "$TARGET_OS" = "linux"]) -AM_CONDITIONAL([TARGET_WINDOWS], [test "$TARGET_OS" = "windows"]) -AM_CONDITIONAL([ENABLE_WALLET], [test "$enable_wallet" = "yes"]) -AM_CONDITIONAL([USE_SQLITE], [test "$use_sqlite" = "yes"]) -AM_CONDITIONAL([USE_BDB], [test "$use_bdb" = "yes"]) -AM_CONDITIONAL([ENABLE_TESTS], [test "$BUILD_TEST" = "yes"]) -AM_CONDITIONAL([ENABLE_FUZZ], [test "$enable_fuzz" = "yes"]) -AM_CONDITIONAL([ENABLE_FUZZ_BINARY], [test "$enable_fuzz_binary" = "yes"]) -AM_CONDITIONAL([ENABLE_QT], [test "$bitcoin_enable_qt" = "yes"]) -AM_CONDITIONAL([ENABLE_QT_TESTS], [test "$BUILD_TEST_QT" = "yes"]) -AM_CONDITIONAL([ENABLE_BENCH], [test "$use_bench" = "yes"]) -AM_CONDITIONAL([USE_QRCODE], [test "$use_qr" = "yes"]) -AM_CONDITIONAL([USE_LCOV], [test "$use_lcov" = "yes"]) -AM_CONDITIONAL([USE_LIBEVENT], [test "$use_libevent" = "yes"]) -AM_CONDITIONAL([HARDEN], [test "$use_hardening" = "yes"]) -AM_CONDITIONAL([ENABLE_SSE42], [test "$enable_sse42" = "yes"]) -AM_CONDITIONAL([ENABLE_SSE41], [test "$enable_sse41" = "yes"]) -AM_CONDITIONAL([ENABLE_AVX2], [test "$enable_avx2" = "yes"]) -AM_CONDITIONAL([ENABLE_X86_SHANI], [test "$enable_x86_shani" = "yes"]) -AM_CONDITIONAL([ENABLE_ARM_CRC], [test "$enable_arm_crc" = "yes"]) -AM_CONDITIONAL([ENABLE_ARM_SHANI], [test "$enable_arm_shani" = "yes"]) -AM_CONDITIONAL([USE_ASM], [test "$use_asm" = "yes"]) -AM_CONDITIONAL([WORDS_BIGENDIAN], [test "$ac_cv_c_bigendian" = "yes"]) -AM_CONDITIONAL([USE_NATPMP], [test "$use_natpmp" = "yes"]) -AM_CONDITIONAL([USE_UPNP], [test "$use_upnp" = "yes"]) - -dnl for minisketch -AM_CONDITIONAL([ENABLE_CLMUL], [test "$enable_clmul" = "yes"]) -AM_CONDITIONAL([HAVE_CLZ], [test "$have_clzl$have_clzll" = "yesyes"]) - -AC_DEFINE([CLIENT_VERSION_MAJOR], [_CLIENT_VERSION_MAJOR], [Major version]) -AC_DEFINE([CLIENT_VERSION_MINOR], [_CLIENT_VERSION_MINOR], [Minor version]) -AC_DEFINE([CLIENT_VERSION_BUILD], [_CLIENT_VERSION_BUILD], [Version Build]) -AC_DEFINE([CLIENT_VERSION_IS_RELEASE], [_CLIENT_VERSION_IS_RELEASE], [Version is release]) -AC_DEFINE([COPYRIGHT_YEAR], [_COPYRIGHT_YEAR], [Copyright year]) -AC_DEFINE([COPYRIGHT_HOLDERS], ["_COPYRIGHT_HOLDERS"], [Copyright holder(s) before %s replacement]) -AC_DEFINE([COPYRIGHT_HOLDERS_SUBSTITUTION], ["_COPYRIGHT_HOLDERS_SUBSTITUTION"], [Replacement for %s in copyright holders string]) -define(_COPYRIGHT_HOLDERS_FINAL, [patsubst(_COPYRIGHT_HOLDERS, [%s], [_COPYRIGHT_HOLDERS_SUBSTITUTION])]) -AC_DEFINE([COPYRIGHT_HOLDERS_FINAL], ["_COPYRIGHT_HOLDERS_FINAL"], [Copyright holder(s)]) -AC_SUBST(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR) -AC_SUBST(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR) -AC_SUBST(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD) -AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE) -AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR) -AC_SUBST(COPYRIGHT_HOLDERS, "_COPYRIGHT_HOLDERS") -AC_SUBST(COPYRIGHT_HOLDERS_SUBSTITUTION, "_COPYRIGHT_HOLDERS_SUBSTITUTION") -AC_SUBST(COPYRIGHT_HOLDERS_FINAL, "_COPYRIGHT_HOLDERS_FINAL") -AC_SUBST(BITCOIN_DAEMON_NAME) -AC_SUBST(BITCOIN_GUI_NAME) -AC_SUBST(BITCOIN_TEST_NAME) -AC_SUBST(COORDINATE_CLI_NAME) -AC_SUBST(COORDINATE_TX_NAME) -AC_SUBST(COORDINATE_UTIL_NAME) -AC_SUBST(BITCOIN_CHAINSTATE_NAME) -AC_SUBST(COORDINATE_WALLET_TOOL_NAME) -AC_SUBST(BITCOIN_MP_NODE_NAME) -AC_SUBST(BITCOIN_MP_GUI_NAME) - -AC_SUBST(RELDFLAGS) -AC_SUBST(CORE_LDFLAGS) -AC_SUBST(CORE_CPPFLAGS) -AC_SUBST(CORE_CXXFLAGS) -AC_SUBST(DEBUG_CPPFLAGS) -AC_SUBST(WARN_CXXFLAGS) -AC_SUBST(NOWARN_CXXFLAGS) -AC_SUBST(DEBUG_CXXFLAGS) -AC_SUBST(ERROR_CXXFLAGS) -AC_SUBST(GPROF_CXXFLAGS) -AC_SUBST(GPROF_LDFLAGS) -AC_SUBST(HARDENED_CXXFLAGS) -AC_SUBST(HARDENED_CPPFLAGS) -AC_SUBST(HARDENED_LDFLAGS) -AC_SUBST(LTO_CXXFLAGS) -AC_SUBST(LTO_LDFLAGS) -AC_SUBST(PIC_FLAGS) -AC_SUBST(PIE_FLAGS) -AC_SUBST(SANITIZER_CXXFLAGS) -AC_SUBST(SANITIZER_LDFLAGS) -AC_SUBST(SSE42_CXXFLAGS) -AC_SUBST(SSE41_CXXFLAGS) -AC_SUBST(CLMUL_CXXFLAGS) -AC_SUBST(AVX2_CXXFLAGS) -AC_SUBST(X86_SHANI_CXXFLAGS) -AC_SUBST(ARM_CRC_CXXFLAGS) -AC_SUBST(ARM_SHANI_CXXFLAGS) -AC_SUBST(LIBTOOL_APP_LDFLAGS) -AC_SUBST(USE_SQLITE) -AC_SUBST(USE_BDB) -AC_SUBST(ENABLE_EXTERNAL_SIGNER) -AC_SUBST(USE_UPNP) -AC_SUBST(USE_QRCODE) -AC_SUBST(TESTDEFS) -AC_SUBST(MINIUPNPC_CPPFLAGS) -AC_SUBST(MINIUPNPC_LIBS) -AC_SUBST(NATPMP_CPPFLAGS) -AC_SUBST(NATPMP_LIBS) -AC_SUBST(HAVE_GMTIME_R) -AC_SUBST(HAVE_FDATASYNC) -AC_SUBST(HAVE_FULLFSYNC) -AC_SUBST(HAVE_O_CLOEXEC) -AC_SUBST(HAVE_BUILTIN_PREFETCH) -AC_SUBST(HAVE_MM_PREFETCH) -AC_SUBST(HAVE_STRONG_GETAUXVAL) -AC_SUBST(ANDROID_ARCH) -AC_SUBST(HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR) -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/iwyu/bitcoin.core.imp:contrib/devtools/iwyu/bitcoin.core.imp]) -AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py]) -AC_CONFIG_LINKS([src/.bear-tidy-config:src/.bear-tidy-config]) -AC_CONFIG_LINKS([src/.clang-tidy:src/.clang-tidy]) -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]) -AC_CONFIG_LINKS([test/util/test_runner.py:test/util/test_runner.py]) -AC_CONFIG_LINKS([test/util/rpcauth-test.py:test/util/rpcauth-test.py]) -AC_CONFIG_LINKS([src/qt/Makefile:src/qt/Makefile]) -AC_CONFIG_LINKS([src/qt/test/Makefile:src/qt/test/Makefile]) -AC_CONFIG_LINKS([src/test/Makefile:src/test/Makefile]) - -dnl boost's m4 checks do something really nasty: they export these vars. As a -dnl result, they leak into secp256k1's configure and crazy things happen. -dnl Until this is fixed upstream and we've synced, we'll just un-export them. -CPPFLAGS_TEMP="$CPPFLAGS" -unset CPPFLAGS -CPPFLAGS="$CPPFLAGS_TEMP" - -ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --disable-module-ecdh" -AC_CONFIG_SUBDIRS([src/secp256k1]) - -AC_OUTPUT - -dnl Replace the BUILDDIR path with the correct Windows path if compiling on Native Windows -case ${OS} in - *Windows*) - sed 's/BUILDDIR="\/\([[a-z]]\)/BUILDDIR="\1:/' test/config.ini > test/config-2.ini - mv test/config-2.ini test/config.ini - ;; -esac - -echo -echo "Options used to compile and link:" -echo " external signer = $use_external_signer" -echo " multiprocess = $build_multiprocess" -echo " with libs = $build_bitcoin_libs" -echo " with wallet = $enable_wallet" -if test "$enable_wallet" != "no"; then - echo " with sqlite = $use_sqlite" - echo " with bdb = $use_bdb" -fi -echo " with gui / qt = $bitcoin_enable_qt" -if test $bitcoin_enable_qt != "no"; then - echo " with qr = $use_qr" -fi -echo " with zmq = $use_zmq" -if test $enable_fuzz = "no"; then - echo " with test = $use_tests" -else - echo " with test = not building test_bitcoin because fuzzing is enabled" -fi -echo " with fuzz binary = $enable_fuzz_binary" -echo " with bench = $use_bench" -echo " with upnp = $use_upnp" -echo " with natpmp = $use_natpmp" -echo " use asm = $use_asm" -echo " USDT tracing = $use_usdt" -echo " sanitizers = $use_sanitizers" -echo " debug enabled = $enable_debug" -echo " gprof enabled = $enable_gprof" -echo " werror = $enable_werror" -echo " LTO = $enable_lto" -echo -echo " target os = $host_os" -echo " build os = $build_os" -echo -echo " CC = $CC" -echo " CFLAGS = $PTHREAD_CFLAGS $CFLAGS" -echo " CPPFLAGS = $DEBUG_CPPFLAGS $HARDENED_CPPFLAGS $CORE_CPPFLAGS $CPPFLAGS" -echo " CXX = $CXX" -echo " CXXFLAGS = $LTO_CXXFLAGS $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOWARN_CXXFLAGS $ERROR_CXXFLAGS $GPROF_CXXFLAGS $CORE_CXXFLAGS $CXXFLAGS" -echo " LDFLAGS = $LTO_LDFLAGS $PTHREAD_LIBS $HARDENED_LDFLAGS $GPROF_LDFLAGS $CORE_LDFLAGS $LDFLAGS" -echo " AR = $AR" -echo " ARFLAGS = $ARFLAGS" -echo diff --git a/contrib/README.md b/contrib/README.md index 12c57a96..f23d7ac5 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -13,7 +13,7 @@ Construct a linear, no-fork, best version of the blockchain. ### [Qos](/contrib/qos) ### -A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Bitcoin network. This means one can have an always-on coordinated instance running, and another local coordinated/coordinate-qt instance which connects to this node and receives blocks from it. +A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Bitcoin network. This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it. ### [Seeds](/contrib/seeds) ### Utility to generate the pnSeed[] array that is compiled into the client. @@ -43,3 +43,11 @@ Command Line Tools ### [Completions](/contrib/completions) ### Shell completions for bash and fish. + +UTXO Set Tools +-------------- + +### [UTXO-to-SQLite](/contrib/utxo-tools/utxo_to_sqlite.py) ### +This script converts a compact-serialized UTXO set (as generated by Bitcoin Core with `dumptxoutset`) +to a SQLite3 database. For more details like e.g. the created table name and schema, refer to the +module docstring on top of the script, which is also contained in the command's `--help` output. diff --git a/contrib/asmap/README.md b/contrib/asmap/README.md new file mode 100644 index 00000000..849281c5 --- /dev/null +++ b/contrib/asmap/README.md @@ -0,0 +1,83 @@ +# ASMap Tool + +Tool for performing various operations on textual and binary asmap files, +particularly encoding/compressing the raw data to the binary format that can +be used in Bitcoin Core with the `-asmap` option. + +Example usage: +``` +python3 asmap-tool.py encode /path/to/input.file /path/to/output.file +python3 asmap-tool.py decode /path/to/input.file /path/to/output.file +python3 asmap-tool.py diff /path/to/first.file /path/to/second.file +python3 asmap-tool.py diff_addrs /path/to/first.file /path/to/second.file addrs.file +``` +These commands may take a few minutes to run with `python3`, +depending on the amount of data involved and your machine specs. +Consider using `pypy3` for a faster run time. + +### Encoding and Decoding + +ASmap files are somewhat large in text form, and need to be encoded +to binary before being used with Bitcoin Core. + +The `encode` command takes an ASmap and an output file. + +The `--fill`/`-f` flag further reduces the size of the output file +by assuming an AS assignment for an unmapped network if an adjacent network is assigned. +This procedure is lossy, in the sense that it loses information +about which ranges were unassigned. +However, if the input ASmap is incomplete, +this procedure will also reassign ranges that should have an AS assignment, +resulting in an ASmap that may diverge from reality significantly. +Finally, another consequence is that the resulting encoded file +will no longer be meaningful for diffs. +Therefore only use `--fill` if +you want to optimise space, you have a reasonably complete ASmap, +and do not intend to diff the file at a later time. + +The `decode` command takes an encoded ASmap and an output file. +As with `encode`, the `--fill`/`-f` flag reduces the output file size +by reassigning subnets. Conversely, the `--non-overlapping`/`-n` flag +increases output size by outputting strictly non-overlapping network ranges. + +### Comparing ASmaps + +AS control of IP networks changes frequently, therefore it can be useful to get +the changes between two ASmaps via the `diff` and `diff_addrs` commands. + +`diff` takes two ASmap files, and returns a file detailing the changes +in the state of a network's AS assignment between the first and the second file. +This command may take a few minutes to run, depending on your machine. + +The example below shows the three possible output states: +- reassigned to a new AS (`AS26496 # was AS20738`), +- present in the first but not the second (`# 220.157.65.0/24 was AS9723`), +- or present in the second but not the first (`# was unassigned`). + +``` +217.199.160.0/19 AS26496 # was AS20738 +# 220.157.65.0/24 was AS9723 +216.151.172.0/23 AS400080 # was unassigned +2001:470:49::/48 AS20205 # was AS6939 +# 2001:678:bd0::/48 was AS207631 +2001:67c:308::/48 AS26496 # was unassigned +``` +`diff` accepts a `--ignore-unassigned`/`-i` flag +which ignores networks present in the second but not the first. + +`diff_addrs` is intended to provide changes between two ASmaps and +a node's known peers. +The command takes two ASmap files, and a file of IP addresses as output by +the `bitcoin-cli getnodeaddresses` command. +It returns the changes between the two ASmaps for the peer IPs provided in +the `getnodeaddresses` output. +The resulting file is in the same format as the `diff` command shown above. + +You can output address data to a file: +``` +bitcoin-cli getnodeaddresses 0 > addrs.json +``` +and pass in the address file as the third argument: +``` +python3 asmap-tool.py diff_addrs path/to/first.file path/to/second.file addrs.json +``` diff --git a/contrib/asmap/asmap-tool.py b/contrib/asmap/asmap-tool.py new file mode 100755 index 00000000..33a380a2 --- /dev/null +++ b/contrib/asmap/asmap-tool.py @@ -0,0 +1,197 @@ +#!/usr/bin/env python3 +# Copyright (c) 2022 Pieter Wuille +# Distributed under the MIT software license, see the accompanying +# file LICENSE or http://www.opensource.org/licenses/mit-license.php. + +import argparse +import sys +import ipaddress +import json +import math +from collections import defaultdict + +import asmap + +def load_file(input_file): + try: + contents = input_file.read() + except OSError as err: + sys.exit(f"Input file '{input_file.name}' cannot be read: {err.strerror}.") + try: + bin_asmap = asmap.ASMap.from_binary(contents) + except ValueError: + bin_asmap = None + txt_error = None + entries = None + try: + txt_contents = str(contents, encoding="utf-8") + except UnicodeError: + txt_error = "invalid UTF-8" + txt_contents = None + if txt_contents is not None: + entries = [] + for line in txt_contents.split("\n"): + idx = line.find('#') + if idx >= 0: + line = line[:idx] + line = line.lstrip(' ').rstrip(' \t\r\n') + if len(line) == 0: + continue + fields = line.split(' ') + if len(fields) != 2: + txt_error = f"unparseable line '{line}'" + entries = None + break + prefix, asn = fields + if len(asn) <= 2 or asn[:2] != "AS" or any(c < '0' or c > '9' for c in asn[2:]): + txt_error = f"invalid ASN '{asn}'" + entries = None + break + try: + net = ipaddress.ip_network(prefix) + except ValueError: + txt_error = f"invalid network '{prefix}'" + entries = None + break + entries.append((asmap.net_to_prefix(net), int(asn[2:]))) + if entries is not None and bin_asmap is not None and len(contents) > 0: + sys.exit(f"Input file '{input_file.name}' is ambiguous.") + if entries is not None: + state = asmap.ASMap() + state.update_multi(entries) + return state + if bin_asmap is not None: + return bin_asmap + sys.exit(f"Input file '{input_file.name}' is neither a valid binary asmap file nor valid text input ({txt_error}).") + + +def save_binary(output_file, state, fill): + contents = state.to_binary(fill=fill) + try: + output_file.write(contents) + output_file.close() + except OSError as err: + sys.exit(f"Output file '{output_file.name}' cannot be written to: {err.strerror}.") + +def save_text(output_file, state, fill, overlapping): + for prefix, asn in state.to_entries(fill=fill, overlapping=overlapping): + net = asmap.prefix_to_net(prefix) + try: + print(f"{net} AS{asn}", file=output_file) + except OSError as err: + sys.exit(f"Output file '{output_file.name}' cannot be written to: {err.strerror}.") + try: + output_file.close() + except OSError as err: + sys.exit(f"Output file '{output_file.name}' cannot be written to: {err.strerror}.") + +def main(): + parser = argparse.ArgumentParser(description="Tool for performing various operations on textual and binary asmap files.") + subparsers = parser.add_subparsers(title="valid subcommands", dest="subcommand") + + parser_encode = subparsers.add_parser("encode", help="convert asmap data to binary format") + parser_encode.add_argument('-f', '--fill', dest="fill", default=False, action="store_true", + help="permit reassigning undefined network ranges arbitrarily to reduce size") + parser_encode.add_argument('infile', nargs='?', type=argparse.FileType('rb'), default=sys.stdin.buffer, + help="input asmap file (text or binary); default is stdin") + parser_encode.add_argument('outfile', nargs='?', type=argparse.FileType('wb'), default=sys.stdout.buffer, + help="output binary asmap file; default is stdout") + + parser_decode = subparsers.add_parser("decode", help="convert asmap data to text format") + parser_decode.add_argument('-f', '--fill', dest="fill", default=False, action="store_true", + help="permit reassigning undefined network ranges arbitrarily to reduce length") + parser_decode.add_argument('-n', '--nonoverlapping', dest="overlapping", default=True, action="store_false", + help="output strictly non-overall ping network ranges (increases output size)") + parser_decode.add_argument('infile', nargs='?', type=argparse.FileType('rb'), default=sys.stdin.buffer, + help="input asmap file (text or binary); default is stdin") + parser_decode.add_argument('outfile', nargs='?', type=argparse.FileType('w'), default=sys.stdout, + help="output text file; default is stdout") + + parser_diff = subparsers.add_parser("diff", help="compute the difference between two asmap files") + parser_diff.add_argument('-i', '--ignore-unassigned', dest="ignore_unassigned", default=False, action="store_true", + help="ignore unassigned ranges in the first input (useful when second input is filled)") + parser_diff.add_argument('infile1', type=argparse.FileType('rb'), + help="first file to compare (text or binary)") + parser_diff.add_argument('infile2', type=argparse.FileType('rb'), + help="second file to compare (text or binary)") + + parser_diff_addrs = subparsers.add_parser("diff_addrs", + help="compute difference between two asmap files for a set of addresses") + parser_diff_addrs.add_argument('-s', '--show-addresses', dest="show_addresses", default=False, action="store_true", + help="include reassigned addresses in the output") + parser_diff_addrs.add_argument("infile1", type=argparse.FileType("rb"), + help="first file to compare (text or binary)") + parser_diff_addrs.add_argument("infile2", type=argparse.FileType("rb"), + help="second file to compare (text or binary)") + parser_diff_addrs.add_argument("addrs_file", type=argparse.FileType("r"), + help="address file containing getnodeaddresses output to use in the comparison " + "(make sure to set the count parameter to zero to get all node addresses, " + "e.g. 'bitcoin-cli getnodeaddresses 0 > addrs.json')") + args = parser.parse_args() + if args.subcommand is None: + parser.print_help() + elif args.subcommand == "encode": + state = load_file(args.infile) + save_binary(args.outfile, state, fill=args.fill) + elif args.subcommand == "decode": + state = load_file(args.infile) + save_text(args.outfile, state, fill=args.fill, overlapping=args.overlapping) + elif args.subcommand == "diff": + state1 = load_file(args.infile1) + state2 = load_file(args.infile2) + ipv4_changed = 0 + ipv6_changed = 0 + for prefix, old_asn, new_asn in state1.diff(state2): + if args.ignore_unassigned and old_asn == 0: + continue + net = asmap.prefix_to_net(prefix) + if isinstance(net, ipaddress.IPv4Network): + ipv4_changed += 1 << (32 - net.prefixlen) + elif isinstance(net, ipaddress.IPv6Network): + ipv6_changed += 1 << (128 - net.prefixlen) + if new_asn == 0: + print(f"# {net} was AS{old_asn}") + elif old_asn == 0: + print(f"{net} AS{new_asn} # was unassigned") + else: + print(f"{net} AS{new_asn} # was AS{old_asn}") + ipv4_change_str = "" if ipv4_changed == 0 else f" (2^{math.log2(ipv4_changed):.2f})" + ipv6_change_str = "" if ipv6_changed == 0 else f" (2^{math.log2(ipv6_changed):.2f})" + + print( + f"# {ipv4_changed}{ipv4_change_str} IPv4 addresses changed; " + f"{ipv6_changed}{ipv6_change_str} IPv6 addresses changed" + ) + elif args.subcommand == "diff_addrs": + state1 = load_file(args.infile1) + state2 = load_file(args.infile2) + address_info = json.load(args.addrs_file) + addrs = {a["address"] for a in address_info if a["network"] in ["ipv4", "ipv6"]} + reassignments = defaultdict(list) + for addr in addrs: + net = ipaddress.ip_network(addr) + prefix = asmap.net_to_prefix(net) + old_asn = state1.lookup(prefix) + new_asn = state2.lookup(prefix) + if new_asn != old_asn: + reassignments[(old_asn, new_asn)].append(addr) + reassignments = sorted(reassignments.items(), key=lambda item: len(item[1]), reverse=True) + num_reassignment_type = defaultdict(int) + for (old_asn, new_asn), reassigned_addrs in reassignments: + num_reassigned = len(reassigned_addrs) + num_reassignment_type[(bool(old_asn), bool(new_asn))] += num_reassigned + old_asn_str = f"AS{old_asn}" if old_asn else "unassigned" + new_asn_str = f"AS{new_asn}" if new_asn else "unassigned" + opt = ": " + ", ".join(reassigned_addrs) if args.show_addresses else "" + print(f"{num_reassigned} address(es) reassigned from {old_asn_str} to {new_asn_str}{opt}") + num_reassignments = sum(len(addrs) for _, addrs in reassignments) + share = num_reassignments / len(addrs) if len(addrs) > 0 else 0 + print(f"Summary: {num_reassignments:,} ({share:.2%}) of {len(addrs):,} addresses were reassigned " + f"(migrations={num_reassignment_type[True, True]}, assignments={num_reassignment_type[False, True]}, " + f"unassignments={num_reassignment_type[True, False]})") + else: + parser.print_help() + sys.exit("No command provided.") + +if __name__ == '__main__': + main() diff --git a/contrib/seeds/asmap.py b/contrib/asmap/asmap.py similarity index 93% rename from contrib/seeds/asmap.py rename to contrib/asmap/asmap.py index e28e5cf5..2ae84a3f 100644 --- a/contrib/seeds/asmap.py +++ b/contrib/asmap/asmap.py @@ -10,11 +10,12 @@ import ipaddress import random import unittest +from collections.abc import Callable, Iterable from enum import Enum from functools import total_ordering -from typing import Callable, Dict, Iterable, List, Optional, Tuple, Union, overload +from typing import Optional, Union, overload -def net_to_prefix(net: Union[ipaddress.IPv4Network,ipaddress.IPv6Network]) -> List[bool]: +def net_to_prefix(net: Union[ipaddress.IPv4Network,ipaddress.IPv6Network]) -> list[bool]: """ Convert an IPv4 or IPv6 network to a prefix represented as a list of bits. @@ -32,7 +33,7 @@ def net_to_prefix(net: Union[ipaddress.IPv4Network,ipaddress.IPv6Network]) -> Li assert (netrange & ((1 << (128 - num_bits)) - 1)) == 0 return [((netrange >> (127 - i)) & 1) != 0 for i in range(num_bits)] -def prefix_to_net(prefix: List[bool]) -> Union[ipaddress.IPv4Network,ipaddress.IPv6Network]: +def prefix_to_net(prefix: list[bool]) -> Union[ipaddress.IPv4Network,ipaddress.IPv6Network]: """The reverse operation of net_to_prefix.""" # Convert to number netrange = sum(b << (127 - i) for i, b in enumerate(prefix)) @@ -47,10 +48,10 @@ def prefix_to_net(prefix: List[bool]) -> Union[ipaddress.IPv4Network,ipaddress.I return ipaddress.IPv6Network((netrange, num_bits), True) # Shortcut for (prefix, ASN) entries. -ASNEntry = Tuple[List[bool], int] +ASNEntry = tuple[list[bool], int] # Shortcut for (prefix, old ASN, new ASN) entries. -ASNDiff = Tuple[List[bool], int, int] +ASNDiff = tuple[list[bool], int, int] class _VarLenCoder: """ @@ -75,7 +76,7 @@ class _VarLenCoder: other classes start one past the last element of the class before it. """ - def __init__(self, minval: int, clsbits: List[int]): + def __init__(self, minval: int, clsbits: list[int]): """Construct a new _VarLenCoder.""" self._minval = minval self._clsbits = clsbits @@ -85,7 +86,7 @@ def can_encode(self, val: int) -> bool: """Check whether value val is in the range this coder supports.""" return self._minval <= val <= self._maxval - def encode(self, val: int, ret: List[int]) -> None: + def encode(self, val: int, ret: list[int]) -> None: """Append encoding of val onto integer list ret.""" assert self._minval <= val <= self._maxval @@ -120,7 +121,7 @@ def encode_size(self, val: int) -> int: break return ret + bits - def decode(self, stream, bitpos) -> Tuple[int,int]: + def decode(self, stream, bitpos) -> tuple[int,int]: """Decode a number starting at bitpos in stream, returning value and new bitpos.""" val = self._minval bits = 0 @@ -281,11 +282,11 @@ class ASMap: - mappings, represented by new trie nodes. """ - def update(self, prefix: List[bool], asn: int) -> None: + def update(self, prefix: list[bool], asn: int) -> None: """Update this ASMap object to map prefix to the specified asn.""" assert asn == 0 or _CODER_ASN.can_encode(asn) - def recurse(node: List, offset: int) -> None: + def recurse(node: list, offset: int) -> None: if offset == len(prefix): # Reached the end of prefix; overwrite this node. node.clear() @@ -306,7 +307,7 @@ def recurse(node: List, offset: int) -> None: node.append(oldasn) recurse(self._trie, 0) - def update_multi(self, entries: List[Tuple[List[bool], int]]) -> None: + def update_multi(self, entries: list[tuple[list[bool], int]]) -> None: """Apply multiple update operations, where longer prefixes take precedence.""" entries.sort(key=lambda entry: len(entry[0])) for prefix, asn in entries: @@ -314,7 +315,7 @@ def update_multi(self, entries: List[Tuple[List[bool], int]]) -> None: def _set_trie(self, trie) -> None: """Set trie directly. Internal use only.""" - def recurse(node: List) -> None: + def recurse(node: list) -> None: if len(node) < 2: return recurse(node[0]) @@ -342,7 +343,7 @@ def entry_key(entry): for prefix, asn in sorted(entries, key=entry_key): self.update(prefix, asn) - def lookup(self, prefix: List[bool]) -> Optional[int]: + def lookup(self, prefix: list[bool]) -> Optional[int]: """Look up a prefix. Returns ASN, or 0 if unassigned, or None if indeterminate.""" node = self._trie for bit in prefix: @@ -353,11 +354,11 @@ def lookup(self, prefix: List[bool]) -> Optional[int]: return node[0] return None - def _to_entries_flat(self, fill: bool = False) -> List[ASNEntry]: + def _to_entries_flat(self, fill: bool = False) -> list[ASNEntry]: """Convert an ASMap object to a list of non-overlapping (prefix, asn) objects.""" - prefix : List[bool] = [] + prefix : list[bool] = [] - def recurse(node: List) -> List[ASNEntry]: + def recurse(node: list) -> list[ASNEntry]: ret = [] if len(node) == 1: if node[0] > 0: @@ -375,24 +376,24 @@ def recurse(node: List) -> List[ASNEntry]: return ret return recurse(self._trie) - def _to_entries_minimal(self, fill: bool = False) -> List[ASNEntry]: + def _to_entries_minimal(self, fill: bool = False) -> list[ASNEntry]: """Convert a trie to a minimal list of ASNEntry objects, exploiting overlap.""" - prefix : List[bool] = [] + prefix : list[bool] = [] - def recurse(node: List) -> (Tuple[Dict[Optional[int], List[ASNEntry]], bool]): + def recurse(node: list) -> (tuple[dict[Optional[int], list[ASNEntry]], bool]): if len(node) == 1 and node[0] == 0: return {None if fill else 0: []}, True if len(node) == 1: return {node[0]: [], None: [(list(prefix), node[0])]}, False - ret: Dict[Optional[int], List[ASNEntry]] = {} + ret: dict[Optional[int], list[ASNEntry]] = {} prefix.append(False) left, lhole = recurse(node[0]) prefix[-1] = True right, rhole = recurse(node[1]) prefix.pop() hole = not fill and (lhole or rhole) - def candidate(ctx: Optional[int], res0: Optional[List[ASNEntry]], - res1: Optional[List[ASNEntry]]): + def candidate(ctx: Optional[int], res0: Optional[list[ASNEntry]], + res1: Optional[list[ASNEntry]]): if res0 is not None and res1 is not None: if ctx not in ret or len(res0) + len(res1) < len(ret[ctx]): ret[ctx] = res0 + res1 @@ -417,7 +418,7 @@ def __str__(self) -> str: """Convert this ASMap object to a string containing Python code constructing it.""" return f"ASMap({self._trie})" - def to_entries(self, overlapping: bool = True, fill: bool = False) -> List[ASNEntry]: + def to_entries(self, overlapping: bool = True, fill: bool = False) -> list[ASNEntry]: """ Convert the mappings in this ASMap object to a list of ASNEntry objects. @@ -448,7 +449,7 @@ def from_random(num_leaves: int = 10, max_asn: int = 6, assert max_asn >= 1 or unassigned_prob == 1 assert _CODER_ASN.can_encode(max_asn) assert 0.0 <= unassigned_prob <= 1.0 - trie: List = [] + trie: list = [] leaves = [trie] ret = ASMap() for i in range(1, num_leaves): @@ -472,12 +473,12 @@ def from_random(num_leaves: int = 10, max_asn: int = 6, def _to_binnode(self, fill: bool = False) -> _BinNode: """Convert a trie to a _BinNode object.""" - def recurse(node: List) -> Tuple[Dict[Optional[int], _BinNode], bool]: + def recurse(node: list) -> tuple[dict[Optional[int], _BinNode], bool]: if len(node) == 1 and node[0] == 0: return {(None if fill else 0): _BinNode.make_end()}, True if len(node) == 1: return {None: _BinNode.make_leaf(node[0]), node[0]: _BinNode.make_end()}, False - ret: Dict[Optional[int], _BinNode] = {} + ret: dict[Optional[int], _BinNode] = {} left, lhole = recurse(node[0]) right, rhole = recurse(node[1]) hole = (lhole or rhole) and not fill @@ -488,12 +489,14 @@ def candidate(ctx: Optional[int], arg1, arg2, func: Callable): if ctx not in ret or cand.size < ret[ctx].size: ret[ctx] = cand - for ctx in set(left) | set(right): + union = set(left) | set(right) + sorted_union = sorted(union, key=lambda x: (x is None, x)) + for ctx in sorted_union: candidate(ctx, left.get(ctx), right.get(ctx), _BinNode.make_branch) candidate(ctx, left.get(None), right.get(ctx), _BinNode.make_branch) candidate(ctx, left.get(ctx), right.get(None), _BinNode.make_branch) if not hole: - for ctx in set(ret) - set([None]): + for ctx in sorted(set(ret) - set([None])): candidate(None, ctx, ret[ctx], _BinNode.make_default) if None in ret: ret = {ctx:enc for ctx, enc in ret.items() @@ -507,7 +510,7 @@ def candidate(ctx: Optional[int], arg1, arg2, func: Callable): @staticmethod def _from_binnode(binnode: _BinNode) -> "ASMap": """Construct an ASMap object from a _BinNode. Internal use only.""" - def recurse(node: _BinNode, default: int) -> List: + def recurse(node: _BinNode, default: int) -> list: if node.ins == _Instruction.RETURN: return [node.arg1] if node.ins == _Instruction.JUMP: @@ -542,7 +545,7 @@ def to_binary(self, fill: bool = False) -> bytes: Returns: A bytes object with the encoding of this ASMap object. """ - bits: List[int] = [] + bits: list[int] = [] def recurse(node: _BinNode) -> None: _CODER_INS.encode(node.ins.value, bits) @@ -582,11 +585,11 @@ def recurse(node: _BinNode) -> None: def from_binary(bindata: bytes) -> Optional["ASMap"]: """Decode an ASMap object from the provided binary encoding.""" - bits: List[int] = [] + bits: list[int] = [] for byte in bindata: bits.extend((byte >> i) & 1 for i in range(8)) - def recurse(bitpos: int) -> Tuple[_BinNode, int]: + def recurse(bitpos: int) -> tuple[_BinNode, int]: insval, bitpos = _CODER_INS.decode(bits, bitpos) ins = _Instruction(insval) if ins == _Instruction.RETURN: @@ -632,7 +635,7 @@ def __eq__(self, other: object) -> bool: def extends(self, req: "ASMap") -> bool: """Determine whether this matches req for all subranges where req is assigned.""" - def recurse(actual: List, require: List) -> bool: + def recurse(actual: list, require: list) -> bool: if len(require) == 1 and require[0] == 0: return True if len(require) == 1: @@ -646,20 +649,20 @@ def recurse(actual: List, require: List) -> bool: #pylint: disable=protected-access return recurse(self._trie, req._trie) - def diff(self, other: "ASMap") -> List[ASNDiff]: + def diff(self, other: "ASMap") -> list[ASNDiff]: """Compute the diff from self to other.""" - prefix: List[bool] = [] - ret: List[ASNDiff] = [] + prefix: list[bool] = [] + ret: list[ASNDiff] = [] - def recurse(old_node: List, new_node: List): + def recurse(old_node: list, new_node: list): if len(old_node) == 1 and len(new_node) == 1: if old_node[0] != new_node[0]: ret.append((list(prefix), old_node[0], new_node[0])) else: - old_left: List = old_node if len(old_node) == 1 else old_node[0] - old_right: List = old_node if len(old_node) == 1 else old_node[1] - new_left: List = new_node if len(new_node) == 1 else new_node[0] - new_right: List = new_node if len(new_node) == 1 else new_node[1] + old_left: list = old_node if len(old_node) == 1 else old_node[0] + old_right: list = old_node if len(old_node) == 1 else old_node[1] + new_left: list = new_node if len(new_node) == 1 else new_node[0] + new_right: list = new_node if len(new_node) == 1 else new_node[1] prefix.append(False) recurse(old_left, new_left) prefix[-1] = True @@ -760,7 +763,7 @@ def test_patching(self) -> None: # It starts off being equal to asmap. patched = copy.copy(asmap) # Keep a list of patches performed. - patches: List[ASNEntry] = [] + patches: list[ASNEntry] = [] # Initially there cannot be any difference. self.assertEqual(asmap.diff(patched), []) # Make 5 patches, each building on top of the previous ones. diff --git a/contrib/completions/bash/coordinate-cli.bash b/contrib/completions/bash/bitcoin-cli.bash similarity index 81% rename from contrib/completions/bash/coordinate-cli.bash rename to contrib/completions/bash/bitcoin-cli.bash index f3da004c..3018d076 100644 --- a/contrib/completions/bash/coordinate-cli.bash +++ b/contrib/completions/bash/bitcoin-cli.bash @@ -1,29 +1,29 @@ -# bash programmable completion for coordinate-cli(1) +# bash programmable completion for bitcoin-cli(1) # Copyright (c) 2012-2022 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -# call $coordinate-cli for RPC +# call $bitcoin-cli for RPC _bitcoin_rpc() { # determine already specified args necessary for RPC local rpcargs=() for i in ${COMP_LINE}; do case "$i" in - -conf=*|-datadir=*|-regtest|-rpc*|-testnet) + -conf=*|-datadir=*|-regtest|-rpc*|-testnet|-testnet4) rpcargs=( "${rpcargs[@]}" "$i" ) ;; esac done - $coordinate_cli "${rpcargs[@]}" "$@" + $bitcoin_cli "${rpcargs[@]}" "$@" } -_coordinate_cli() { +_bitcoin_cli() { local cur prev words=() cword - local coordinate_cli + local bitcoin_cli - # save and use original argument to invoke coordinate-cli for -help, help and RPC - # as coordinate-cli might not be in $PATH - coordinate_cli="$1" + # save and use original argument to invoke bitcoin-cli for -help, help and RPC + # as bitcoin-cli might not be in $PATH + bitcoin_cli="$1" COMPREPLY=() _get_comp_words_by_ref -n = cur prev words cword @@ -39,7 +39,7 @@ _coordinate_cli() { if ((cword > 4)); then case ${words[cword-4]} in - importaddress|listtransactions|setban) + listtransactions|setban) COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) return 0 ;; @@ -52,10 +52,7 @@ _coordinate_cli() { if ((cword > 3)); then case ${words[cword-3]} in - addmultisigaddress) - return 0 - ;; - getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaddress|listsinceblock) + getbalance|gettxout|listreceivedbyaddress|listsinceblock) COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) return 0 ;; @@ -80,7 +77,7 @@ _coordinate_cli() { fi case "$prev" in - backupwallet|dumpwallet|importwallet) + backupwallet) _filedir return 0 ;; @@ -112,7 +109,7 @@ _coordinate_cli() { # only parse -help if senseful if [[ -z "$cur" || "$cur" =~ ^- ]]; then - helpopts=$($coordinate_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) + helpopts=$($bitcoin_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) fi # only parse help if senseful @@ -130,7 +127,7 @@ _coordinate_cli() { ;; esac } && -complete -F _coordinate_cli coordinate-cli +complete -F _bitcoin_cli bitcoin-cli # Local variables: # mode: shell-script diff --git a/contrib/completions/bash/coordinate-tx.bash b/contrib/completions/bash/bitcoin-tx.bash similarity index 73% rename from contrib/completions/bash/coordinate-tx.bash rename to contrib/completions/bash/bitcoin-tx.bash index 62d076e4..51a9fe31 100644 --- a/contrib/completions/bash/coordinate-tx.bash +++ b/contrib/completions/bash/bitcoin-tx.bash @@ -1,15 +1,15 @@ -# bash programmable completion for coordinate-tx(1) +# bash programmable completion for bitcoin-tx(1) # Copyright (c) 2016-2022 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -_coordinate_tx() { +_bitcoin_tx() { local cur prev words=() cword - local coordinate_tx + local bitcoin_tx - # save and use original argument to invoke coordinate-tx for -help + # save and use original argument to invoke bitcoin-tx for -help # it might not be in $PATH - coordinate_tx="$1" + bitcoin_tx="$1" COMPREPLY=() _get_comp_words_by_ref -n =: cur prev words cword @@ -27,15 +27,15 @@ _coordinate_tx() { if [[ "$cword" == 1 || ( "$prev" != "-create" && "$prev" == -* ) ]]; then # only options (or an uncompletable hex-string) allowed - # parse coordinate-tx -help for options + # parse bitcoin-tx -help for options local helpopts - helpopts=$($coordinate_tx -help | sed -e '/^ -/ p' -e d ) + helpopts=$($bitcoin_tx -help | sed -e '/^ -/ p' -e d ) COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) ) else # only commands are allowed # parse -help for commands local helpcmds - helpcmds=$($coordinate_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d ) + helpcmds=$($bitcoin_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d ) COMPREPLY=( $( compgen -W "$helpcmds" -- "$cur" ) ) fi @@ -46,7 +46,7 @@ _coordinate_tx() { return 0 } && -complete -F _coordinate_tx coordinate-tx +complete -F _bitcoin_tx bitcoin-tx # Local variables: # mode: shell-script diff --git a/contrib/completions/bash/coordinated.bash b/contrib/completions/bash/bitcoind.bash similarity index 78% rename from contrib/completions/bash/coordinated.bash rename to contrib/completions/bash/bitcoind.bash index f3020f8e..c11d99ef 100644 --- a/contrib/completions/bash/coordinated.bash +++ b/contrib/completions/bash/bitcoind.bash @@ -1,15 +1,15 @@ -# bash programmable completion for coordinated(1) and coordinate-qt(1) +# bash programmable completion for bitcoind(1) and bitcoin-qt(1) # Copyright (c) 2012-2022 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -_coordinated() { +_bitcoind() { local cur prev words=() cword - local coordinated + local bitcoind - # save and use original argument to invoke coordinated for -help + # save and use original argument to invoke bitcoind for -help # it might not be in $PATH - coordinated="$1" + bitcoind="$1" COMPREPLY=() _get_comp_words_by_ref -n = cur prev words cword @@ -33,7 +33,7 @@ _coordinated() { # only parse -help if sensible if [[ -z "$cur" || "$cur" =~ ^- ]]; then local helpopts - helpopts=$($coordinated -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) + helpopts=$($bitcoind -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) ) fi @@ -45,7 +45,7 @@ _coordinated() { ;; esac } && -complete -F _coordinated coordinated coordinate-qt +complete -F _bitcoind bitcoind bitcoin-qt # Local variables: # mode: shell-script diff --git a/contrib/completions/fish/coordinate-cli.fish b/contrib/completions/fish/bitcoin-cli.fish similarity index 64% rename from contrib/completions/fish/coordinate-cli.fish rename to contrib/completions/fish/bitcoin-cli.fish index 43e17e36..2f034c47 100644 --- a/contrib/completions/fish/coordinate-cli.fish +++ b/contrib/completions/fish/bitcoin-cli.fish @@ -1,7 +1,7 @@ # Disable files from being included in completions by default -complete --command coordinate-cli --no-files +complete --command bitcoin-cli --no-files -function __fish_coordinate_cli_get_commands_helper +function __fish_bitcoin_cli_get_commands_helper set --local cmd (commandline -oc) # Don't return commands if '-help or -?' in commandline @@ -21,22 +21,22 @@ function __fish_coordinate_cli_get_commands_helper end end -function __fish_coordinate_cli_get_commands +function __fish_bitcoin_cli_get_commands argparse 'nohelp' 'commandsonly' -- $argv set --local commands # Exclude description, exclude help if set -q _flag_nohelp; and set -q _flag_commandsonly - set --append commands (__fish_coordinate_cli_get_commands_helper | string replace -r ' .*$' '' | string match --invert -r 'help') + set --append commands (__fish_bitcoin_cli_get_commands_helper | string replace -r ' .*$' '' | string match --invert -r 'help') # Include description, exclude help else if set -q _flag_nohelp - set --append commands (__fish_coordinate_cli_get_commands_helper | string replace ' ' \t | string match --invert -r 'help') + set --append commands (__fish_bitcoin_cli_get_commands_helper | string replace ' ' \t | string match --invert -r 'help') # Exclude description, include help else if set -q _flag_commandsonly - set --append commands (__fish_coordinate_cli_get_commands_helper | string replace -r ' .*$' '') + set --append commands (__fish_bitcoin_cli_get_commands_helper | string replace -r ' .*$' '') # Include description, include help else - set --append commands (__fish_coordinate_cli_get_commands_helper | string replace ' ' \t) + set --append commands (__fish_bitcoin_cli_get_commands_helper | string replace ' ' \t) end if string match -q -r '^.*error.*$' $commands[1] @@ -50,7 +50,7 @@ function __fish_coordinate_cli_get_commands end -function __fish_coordinate_cli_get_options +function __fish_bitcoin_cli_get_options argparse 'nofiles' -- $argv set --local cmd (commandline -oc) # Don't return options if '-help or -?' in commandline @@ -73,27 +73,27 @@ end # Add options with file completion # Don't offer after a command is given complete \ - --command coordinate-cli \ + --command bitcoin-cli \ --no-files \ - --condition "not __fish_seen_subcommand_from (__fish_coordinate_cli_get_commands --commandsonly)" \ - --arguments "(__fish_coordinate_cli_get_options)" + --condition "not __fish_seen_subcommand_from (__fish_bitcoin_cli_get_commands --commandsonly)" \ + --arguments "(__fish_bitcoin_cli_get_options)" # Enable file completions only if the commandline now contains a `*.=` style option -complete --command coordinate-cli \ +complete --command bitcoin-cli \ --condition 'string match --regex -- ".*=" (commandline -pt)' \ --force-files # Add options without file completion # Don't offer after a command is given complete \ - --command coordinate-cli \ + --command bitcoin-cli \ --no-files \ - --condition "not __fish_seen_subcommand_from (__fish_coordinate_cli_get_commands --commandsonly)" \ - --arguments "(__fish_coordinate_cli_get_options --nofiles)" + --condition "not __fish_seen_subcommand_from (__fish_bitcoin_cli_get_commands --commandsonly)" \ + --arguments "(__fish_bitcoin_cli_get_options --nofiles)" # Add commands -# Permit command completions after `coordinate-cli help` but not after other commands +# Permit command completions after `bitcoin-cli help` but not after other commands complete \ - --command coordinate-cli \ + --command bitcoin-cli \ --no-files \ - --condition "not __fish_seen_subcommand_from (__fish_coordinate_cli_get_commands --commandsonly --nohelp)" \ - --arguments "(__fish_coordinate_cli_get_commands)" + --condition "not __fish_seen_subcommand_from (__fish_bitcoin_cli_get_commands --commandsonly --nohelp)" \ + --arguments "(__fish_bitcoin_cli_get_commands)" diff --git a/contrib/completions/fish/coordinate-qt.fish b/contrib/completions/fish/bitcoin-qt.fish similarity index 88% rename from contrib/completions/fish/coordinate-qt.fish rename to contrib/completions/fish/bitcoin-qt.fish index 574e099a..15a355ae 100644 --- a/contrib/completions/fish/coordinate-qt.fish +++ b/contrib/completions/fish/bitcoin-qt.fish @@ -1,5 +1,5 @@ # Disable files from being included in completions by default -complete --command coordinate-qt --no-files +complete --command bitcoin-qt --no-files # Extract options function __fish_bitcoinqt_get_options @@ -21,15 +21,15 @@ end # Add options with file completion complete \ - --command coordinate-qt \ + --command bitcoin-qt \ --arguments "(__fish_bitcoinqt_get_options)" # Enable file completions only if the commandline now contains a `*.=` style option -complete -c coordinate-qt \ +complete -c bitcoin-qt \ --condition 'string match --regex -- ".*=" (commandline -pt)' \ --force-files # Add options without file completion complete \ - --command coordinate-qt \ + --command bitcoin-qt \ --arguments "(__fish_bitcoinqt_get_options --nofiles)" diff --git a/contrib/completions/fish/coordinate-tx.fish b/contrib/completions/fish/bitcoin-tx.fish similarity index 77% rename from contrib/completions/fish/coordinate-tx.fish rename to contrib/completions/fish/bitcoin-tx.fish index ac89d75b..0ff262b9 100644 --- a/contrib/completions/fish/coordinate-tx.fish +++ b/contrib/completions/fish/bitcoin-tx.fish @@ -1,5 +1,5 @@ # Disable files from being included in completions by default -complete --command coordinate-tx --no-files +complete --command bitcoin-tx --no-files # Modified version of __fish_seen_subcommand_from # Uses regex to detect cmd= syntax @@ -17,7 +17,7 @@ function __fish_bitcoin_seen_cmd end # Extract options -function __fish_coordinate_tx_get_options +function __fish_bitcoin_tx_get_options set --local cmd (commandline -oc)[1] if string match --quiet --regex -- '^-help$|-\?$' $cmd return @@ -29,7 +29,7 @@ function __fish_coordinate_tx_get_options end # Extract commands -function __fish_coordinate_tx_get_commands +function __fish_bitcoin_tx_get_commands argparse 'commandsonly' -- $argv set --local cmd (commandline -oc)[1] set --local commands @@ -47,19 +47,19 @@ end # Add options complete \ - --command coordinate-tx \ - --condition "not __fish_bitcoin_seen_cmd (__fish_coordinate_tx_get_commands --commandsonly)" \ - --arguments "(__fish_coordinate_tx_get_options)" \ + --command bitcoin-tx \ + --condition "not __fish_bitcoin_seen_cmd (__fish_bitcoin_tx_get_commands --commandsonly)" \ + --arguments "(__fish_bitcoin_tx_get_options)" \ --no-files # Add commands complete \ - --command coordinate-tx \ - --arguments "(__fish_coordinate_tx_get_commands)" \ + --command bitcoin-tx \ + --arguments "(__fish_bitcoin_tx_get_commands)" \ --no-files # Add file completions for load and set commands complete \ - --command coordinate-tx \ + --command bitcoin-tx \ --condition 'string match --regex -- "(load|set)=" (commandline -pt)' \ --force-files diff --git a/contrib/completions/fish/coordinate-util.fish b/contrib/completions/fish/bitcoin-util.fish similarity index 58% rename from contrib/completions/fish/coordinate-util.fish rename to contrib/completions/fish/bitcoin-util.fish index 97c1cee7..0650bf2c 100644 --- a/contrib/completions/fish/coordinate-util.fish +++ b/contrib/completions/fish/bitcoin-util.fish @@ -1,8 +1,8 @@ # Disable files from being included in completions by default -complete --command coordinate-util --no-files +complete --command bitcoin-util --no-files # Extract options -function __fish_coordinate_util_get_options +function __fish_bitcoin_util_get_options set --local cmd (commandline -opc)[1] set --local options @@ -14,7 +14,7 @@ function __fish_coordinate_util_get_options end # Extract commands -function __fish_coordinate_util_get_commands +function __fish_bitcoin_util_get_commands set --local cmd (commandline -opc)[1] set --local commands @@ -26,13 +26,13 @@ end # Add options complete \ - --command coordinate-util \ - --condition "not __fish_seen_subcommand_from (__fish_coordinate_util_get_commands)" \ - --arguments "(__fish_coordinate_util_get_options)" + --command bitcoin-util \ + --condition "not __fish_seen_subcommand_from (__fish_bitcoin_util_get_commands)" \ + --arguments "(__fish_bitcoin_util_get_options)" # Add commands complete \ - --command coordinate-util \ - --condition "not __fish_seen_subcommand_from (__fish_coordinate_util_get_commands)" \ - --arguments "(__fish_coordinate_util_get_commands)" + --command bitcoin-util \ + --condition "not __fish_seen_subcommand_from (__fish_bitcoin_util_get_commands)" \ + --arguments "(__fish_bitcoin_util_get_commands)" diff --git a/contrib/completions/fish/coordinate-wallet.fish b/contrib/completions/fish/bitcoin-wallet.fish similarity index 56% rename from contrib/completions/fish/coordinate-wallet.fish rename to contrib/completions/fish/bitcoin-wallet.fish index 5aa6ce2d..82d8277c 100644 --- a/contrib/completions/fish/coordinate-wallet.fish +++ b/contrib/completions/fish/bitcoin-wallet.fish @@ -1,8 +1,8 @@ # Disable files from being included in completions by default -complete --command coordinate-wallet --no-files +complete --command bitcoin-wallet --no-files # Extract options -function __fish_coordinate_wallet_get_options +function __fish_bitcoin_wallet_get_options set --local cmd (commandline -opc)[1] for option in ($cmd -help 2>&1 | string match -r '^ -.*' | string replace -r ' -' '-' | string replace -r '=.*' '=') echo $option @@ -10,7 +10,7 @@ function __fish_coordinate_wallet_get_options end # Extract commands -function __fish_coordinate_wallet_get_commands +function __fish_bitcoin_wallet_get_commands set --local cmd (commandline -opc)[1] for command in ($cmd -help | sed -e '1,/Commands:/d' -e 's/=/=\t/' -e 's/(=/=/' -e '/^ [a-z]/ p' -e d | string replace -r '\ \ ' '') echo $command @@ -19,17 +19,17 @@ end # Add options complete \ - --command coordinate-wallet \ - --condition "not __fish_seen_subcommand_from (__fish_coordinate_wallet_get_commands)" \ - --arguments "(__fish_coordinate_wallet_get_options)" + --command bitcoin-wallet \ + --condition "not __fish_seen_subcommand_from (__fish_bitcoin_wallet_get_commands)" \ + --arguments "(__fish_bitcoin_wallet_get_options)" # Add commands complete \ - --command coordinate-wallet \ - --condition "not __fish_seen_subcommand_from (__fish_coordinate_wallet_get_commands)" \ - --arguments "(__fish_coordinate_wallet_get_commands)" + --command bitcoin-wallet \ + --condition "not __fish_seen_subcommand_from (__fish_bitcoin_wallet_get_commands)" \ + --arguments "(__fish_bitcoin_wallet_get_commands)" # Add file completions for load and set commands -complete --command coordinate-wallet \ +complete --command bitcoin-wallet \ --condition "string match -r -- '(dumpfile|datadir)*=' (commandline -pt)" \ --force-files diff --git a/contrib/completions/fish/coordinated.fish b/contrib/completions/fish/bitcoind.fish similarity index 75% rename from contrib/completions/fish/coordinated.fish rename to contrib/completions/fish/bitcoind.fish index ed056dda..fa245ae1 100644 --- a/contrib/completions/fish/coordinated.fish +++ b/contrib/completions/fish/bitcoind.fish @@ -1,8 +1,8 @@ # Disable files from being included in completions by default -complete --command coordinated --no-files +complete --command bitcoind --no-files # Extract options -function __fish_coordinated_get_options +function __fish_bitcoind_get_options argparse 'nofiles' -- $argv set --local cmd (commandline -opc)[1] set --local options @@ -21,15 +21,15 @@ end # Add options with file completion complete \ - --command coordinated \ - --arguments "(__fish_coordinated_get_options)" + --command bitcoind \ + --arguments "(__fish_bitcoind_get_options)" # Enable file completions only if the commandline now contains a `*.=` style option -complete --command coordinated \ +complete --command bitcoind \ --condition 'string match --regex -- ".*=" (commandline -pt)' \ --force-files # Add options without file completion complete \ - --command coordinated \ - --arguments "(__fish_coordinated_get_options --nofiles)" + --command bitcoind \ + --arguments "(__fish_bitcoind_get_options --nofiles)" diff --git a/contrib/debian/copyright b/contrib/debian/copyright index ca430170..4e4deef9 100644 --- a/contrib/debian/copyright +++ b/contrib/debian/copyright @@ -5,7 +5,7 @@ Upstream-Contact: Satoshi Nakamoto Source: https://github.com/bitcoin/bitcoin Files: * -Copyright: 2009-2023, Bitcoin Core Developers +Copyright: 2009-2025, Bitcoin Core Developers License: Expat Comment: The Bitcoin Core Developers encompasses all contributors to the project, listed in the release notes or the git log. @@ -121,17 +121,6 @@ Comment: You should have received a copy of the GNU General Public License along with this program. If not, see . -License: GPL-3+ - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU General Public License, Version 3 or any - later version published by the Free Software Foundation. -Comment: - On Debian systems the GNU General Public License (GPL) version 3 is - located in '/usr/share/common-licenses/GPL-3'. - . - You should have received a copy of the GNU General Public License along - with this program. If not, see . - License: public-domain This work is in the public domain. diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md index e98b209a..366cd4a0 100644 --- a/contrib/devtools/README.md +++ b/contrib/devtools/README.md @@ -2,6 +2,50 @@ Contents ======== This directory contains tools for developers working on this repository. +deterministic-fuzz-coverage +=========================== + +A tool to check for non-determinism in fuzz coverage. To get the help, run: + +``` +cargo run --manifest-path ./contrib/devtools/deterministic-fuzz-coverage/Cargo.toml -- --help +``` + +To execute the tool, compilation has to be done with the build options: + +``` +-DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++' -DBUILD_FOR_FUZZING=ON -DCMAKE_CXX_FLAGS='-fprofile-instr-generate -fcoverage-mapping' +``` + +Both llvm-profdata and llvm-cov must be installed. Also, the qa-assets +repository must have been cloned. Finally, a fuzz target has to be picked +before running the tool: + +``` +cargo run --manifest-path ./contrib/devtools/deterministic-fuzz-coverage/Cargo.toml -- $PWD/build_dir $PWD/qa-assets/fuzz_corpora fuzz_target_name +``` + +deterministic-unittest-coverage +=========================== + +A tool to check for non-determinism in unit-test coverage. To get the help, run: + +``` +cargo run --manifest-path ./contrib/devtools/deterministic-unittest-coverage/Cargo.toml -- --help +``` + +To execute the tool, compilation has to be done with the build options: + +``` +-DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++' -DCMAKE_CXX_FLAGS='-fprofile-instr-generate -fcoverage-mapping' +``` + +Both llvm-profdata and llvm-cov must be installed. + +``` +cargo run --manifest-path ./contrib/devtools/deterministic-unittest-coverage/Cargo.toml -- $PWD/build_dir +``` + clang-format-diff.py =================== @@ -82,12 +126,12 @@ gen-manpages.py A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option. This requires help2man which can be found at: https://www.gnu.org/software/help2man/ -With in-tree builds this tool can be run from any directory within the -repository. To use this tool with out-of-tree builds set `BUILDDIR`. For -example: +This script assumes a build directory named `build` as suggested by example build documentation. +To use it with a different build directory, set `BUILDDIR`. +For example: ```bash -BUILDDIR=$PWD/build contrib/devtools/gen-manpages.py +BUILDDIR=$PWD/my-build-dir contrib/devtools/gen-manpages.py ``` headerssync-params.py @@ -103,47 +147,18 @@ pypy3 contrib/devtools/headerssync-params.py gen-bitcoin-conf.sh =================== -Generates a bitcoin.conf file in `share/examples/` by parsing the output from `coordinated --help`. This script is run during the +Generates a bitcoin.conf file in `share/examples/` by parsing the output from `bitcoind --help`. This script is run during the release process to include a bitcoin.conf with the release binaries and can also be run by users to generate a file locally. When generating a file as part of the release process, make sure to commit the changes after running the script. -With in-tree builds this tool can be run from any directory within the -repository. To use this tool with out-of-tree builds set `BUILDDIR`. For -example: +This script assumes a build directory named `build` as suggested by example build documentation. +To use it with a different build directory, set `BUILDDIR`. +For example: ```bash -BUILDDIR=$PWD/build contrib/devtools/gen-bitcoin-conf.sh +BUILDDIR=$PWD/my-build-dir contrib/devtools/gen-bitcoin-conf.sh ``` -security-check.py and test-security-check.py -============================================ - -Perform basic security checks on a series of executables. - -symbol-check.py -=============== - -A script to check that release executables only contain -certain symbols and are only linked against allowed libraries. - -For Linux this means checking for allowed gcc, glibc and libstdc++ version symbols. -This makes sure they are still compatible with the minimum supported distribution versions. - -For macOS and Windows we check that the executables are only linked against libraries we allow. - -Example usage: - - find ../path/to/executables -type f -executable | xargs python3 contrib/devtools/symbol-check.py - -If no errors occur the return value will be 0 and the output will be empty. - -If there are any errors the return value will be 1 and output like this will be printed: - - .../64/test_bitcoin: symbol memcpy from unsupported version GLIBC_2.14 - .../64/test_bitcoin: symbol __fdelt_chk from unsupported version GLIBC_2.15 - .../64/test_bitcoin: symbol std::out_of_range::~out_of_range() from unsupported version GLIBCXX_3.4.15 - .../64/test_bitcoin: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15 - circular-dependencies.py ======================== diff --git a/contrib/devtools/bitcoin-tidy/CMakeLists.txt b/contrib/devtools/bitcoin-tidy/CMakeLists.txt index 35e60d1d..c6f683f7 100644 --- a/contrib/devtools/bitcoin-tidy/CMakeLists.txt +++ b/contrib/devtools/bitcoin-tidy/CMakeLists.txt @@ -1,20 +1,31 @@ -cmake_minimum_required(VERSION 3.9) +cmake_minimum_required(VERSION 3.22) -project(bitcoin-tidy VERSION 1.0.0 DESCRIPTION "clang-tidy checks for Bitcoin Core") +project(bitcoin-tidy + VERSION + 1.0.0 + DESCRIPTION "clang-tidy checks for Bitcoin Core" + LANGUAGES CXX) include(GNUInstallDirs) -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_CXX_EXTENSIONS False) -# TODO: Figure out how to avoid the terminfo check +set(CMAKE_DISABLE_FIND_PACKAGE_CURL ON) +set(CMAKE_DISABLE_FIND_PACKAGE_FFI ON) +set(CMAKE_DISABLE_FIND_PACKAGE_LibEdit ON) +set(CMAKE_DISABLE_FIND_PACKAGE_LibXml2 ON) +set(CMAKE_DISABLE_FIND_PACKAGE_Terminfo ON) +set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB ON) +set(CMAKE_DISABLE_FIND_PACKAGE_zstd ON) + find_package(LLVM REQUIRED CONFIG) find_program(CLANG_TIDY_EXE NAMES "clang-tidy-${LLVM_VERSION_MAJOR}" "clang-tidy" HINTS ${LLVM_TOOLS_BINARY_DIR}) message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") message(STATUS "Found clang-tidy: ${CLANG_TIDY_EXE}") -add_library(bitcoin-tidy MODULE bitcoin-tidy.cpp logprintf.cpp) +add_library(bitcoin-tidy MODULE bitcoin-tidy.cpp nontrivial-threadlocal.cpp) target_include_directories(bitcoin-tidy SYSTEM PRIVATE ${LLVM_INCLUDE_DIRS}) # Disable RTTI and exceptions as necessary @@ -47,7 +58,7 @@ else() endif() # Create a dummy library that runs clang-tidy tests as a side-effect of building -add_library(bitcoin-tidy-tests OBJECT EXCLUDE_FROM_ALL example_logprintf.cpp) +add_library(bitcoin-tidy-tests OBJECT EXCLUDE_FROM_ALL example_nontrivial-threadlocal.cpp) add_dependencies(bitcoin-tidy-tests bitcoin-tidy) set_target_properties(bitcoin-tidy-tests PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}") diff --git a/contrib/devtools/bitcoin-tidy/README b/contrib/devtools/bitcoin-tidy/README.md similarity index 100% rename from contrib/devtools/bitcoin-tidy/README rename to contrib/devtools/bitcoin-tidy/README.md diff --git a/contrib/devtools/bitcoin-tidy/bitcoin-tidy.cpp b/contrib/devtools/bitcoin-tidy/bitcoin-tidy.cpp index 0f34d377..f2658b5a 100644 --- a/contrib/devtools/bitcoin-tidy/bitcoin-tidy.cpp +++ b/contrib/devtools/bitcoin-tidy/bitcoin-tidy.cpp @@ -2,7 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "logprintf.h" +#include "nontrivial-threadlocal.h" #include #include @@ -12,7 +12,7 @@ class BitcoinModule final : public clang::tidy::ClangTidyModule public: void addCheckFactories(clang::tidy::ClangTidyCheckFactories& CheckFactories) override { - CheckFactories.registerCheck("bitcoin-unterminated-logprintf"); + CheckFactories.registerCheck("bitcoin-nontrivial-threadlocal"); } }; diff --git a/contrib/devtools/bitcoin-tidy/example_logprintf.cpp b/contrib/devtools/bitcoin-tidy/example_logprintf.cpp deleted file mode 100644 index a12a666c..00000000 --- a/contrib/devtools/bitcoin-tidy/example_logprintf.cpp +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 2023 Bitcoin Developers -// Distributed under the MIT software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. - -#include - -// Test for bitcoin-unterminated-logprintf - -enum LogFlags { - NONE -}; - -enum Level { - None -}; - -template -static inline void LogPrintf_(const std::string& logging_function, const std::string& source_file, const int source_line, const LogFlags flag, const Level level, const char* fmt, const Args&... args) -{ -} - -#define LogPrintLevel_(category, level, ...) LogPrintf_(__func__, __FILE__, __LINE__, category, level, __VA_ARGS__) -#define LogPrintf(...) LogPrintLevel_(LogFlags::NONE, Level::None, __VA_ARGS__) - -#define LogPrint(category, ...) \ - do { \ - LogPrintf(__VA_ARGS__); \ - } while (0) - - -class CWallet -{ - std::string GetDisplayName() const - { - return "default wallet"; - } - -public: - template - void WalletLogPrintf(const char* fmt, Params... parameters) const - { - LogPrintf(("%s " + std::string{fmt}).c_str(), GetDisplayName(), parameters...); - }; -}; - -struct ScriptPubKeyMan -{ - std::string GetDisplayName() const - { - return "default wallet"; - } - - template - void WalletLogPrintf(const char* fmt, Params... parameters) const - { - LogPrintf(("%s " + std::string{fmt}).c_str(), GetDisplayName(), parameters...); - }; -}; - -void good_func() -{ - LogPrintf("hello world!\n"); -} -void good_func2() -{ - CWallet wallet; - wallet.WalletLogPrintf("hi\n"); - ScriptPubKeyMan spkm; - spkm.WalletLogPrintf("hi\n"); - - const CWallet& walletref = wallet; - walletref.WalletLogPrintf("hi\n"); - - auto* walletptr = new CWallet(); - walletptr->WalletLogPrintf("hi\n"); - delete walletptr; -} -void bad_func() -{ - LogPrintf("hello world!"); -} -void bad_func2() -{ - LogPrintf(""); -} -void bad_func3() -{ - // Ending in "..." has no special meaning. - LogPrintf("hello world!..."); -} -void bad_func4_ignored() -{ - LogPrintf("hello world!"); // NOLINT(bitcoin-unterminated-logprintf) -} -void bad_func5() -{ - CWallet wallet; - wallet.WalletLogPrintf("hi"); - ScriptPubKeyMan spkm; - spkm.WalletLogPrintf("hi"); - - const CWallet& walletref = wallet; - walletref.WalletLogPrintf("hi"); - - auto* walletptr = new CWallet(); - walletptr->WalletLogPrintf("hi"); - delete walletptr; -} diff --git a/contrib/devtools/bitcoin-tidy/example_nontrivial-threadlocal.cpp b/contrib/devtools/bitcoin-tidy/example_nontrivial-threadlocal.cpp new file mode 100644 index 00000000..2b74df5d --- /dev/null +++ b/contrib/devtools/bitcoin-tidy/example_nontrivial-threadlocal.cpp @@ -0,0 +1,2 @@ +#include +thread_local std::string foo; diff --git a/contrib/devtools/bitcoin-tidy/logprintf.cpp b/contrib/devtools/bitcoin-tidy/logprintf.cpp deleted file mode 100644 index 36beac28..00000000 --- a/contrib/devtools/bitcoin-tidy/logprintf.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2023 Bitcoin Developers -// Distributed under the MIT software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. - -#include "logprintf.h" - -#include -#include - - -namespace { -AST_MATCHER(clang::StringLiteral, unterminated) -{ - size_t len = Node.getLength(); - if (len > 0 && Node.getCodeUnit(len - 1) == '\n') { - return false; - } - return true; -} -} // namespace - -namespace bitcoin { - -void LogPrintfCheck::registerMatchers(clang::ast_matchers::MatchFinder* finder) -{ - using namespace clang::ast_matchers; - - /* - Logprintf(..., ..., ..., ..., ..., "foo", ...) - */ - - finder->addMatcher( - callExpr( - callee(functionDecl(hasName("LogPrintf_"))), - hasArgument(5, stringLiteral(unterminated()).bind("logstring"))), - this); - - /* - auto walletptr = &wallet; - wallet.WalletLogPrintf("foo"); - wallet->WalletLogPrintf("foo"); - */ - finder->addMatcher( - cxxMemberCallExpr( - callee(cxxMethodDecl(hasName("WalletLogPrintf"))), - hasArgument(0, stringLiteral(unterminated()).bind("logstring"))), - this); -} - -void LogPrintfCheck::check(const clang::ast_matchers::MatchFinder::MatchResult& Result) -{ - if (const clang::StringLiteral* lit = Result.Nodes.getNodeAs("logstring")) { - const clang::ASTContext& ctx = *Result.Context; - const auto user_diag = diag(lit->getEndLoc(), "Unterminated format string used with LogPrintf"); - const auto& loc = lit->getLocationOfByte(lit->getByteLength(), *Result.SourceManager, ctx.getLangOpts(), ctx.getTargetInfo()); - user_diag << clang::FixItHint::CreateInsertion(loc, "\\n"); - } -} - -} // namespace bitcoin diff --git a/contrib/devtools/bitcoin-tidy/nontrivial-threadlocal.cpp b/contrib/devtools/bitcoin-tidy/nontrivial-threadlocal.cpp new file mode 100644 index 00000000..d2bc78a3 --- /dev/null +++ b/contrib/devtools/bitcoin-tidy/nontrivial-threadlocal.cpp @@ -0,0 +1,44 @@ +// Copyright (c) 2023 Bitcoin Developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "nontrivial-threadlocal.h" + +#include +#include + + +// Copied from clang-tidy's UnusedRaiiCheck +namespace { +AST_MATCHER(clang::CXXRecordDecl, hasNonTrivialDestructor) { + // TODO: If the dtor is there but empty we don't want to warn either. + return Node.hasDefinition() && Node.hasNonTrivialDestructor(); +} +} // namespace + +namespace bitcoin { + +void NonTrivialThreadLocal::registerMatchers(clang::ast_matchers::MatchFinder* finder) +{ + using namespace clang::ast_matchers; + + /* + thread_local std::string foo; + */ + + finder->addMatcher( + varDecl( + hasThreadStorageDuration(), + hasType(hasCanonicalType(recordType(hasDeclaration(cxxRecordDecl(hasNonTrivialDestructor()))))) + ).bind("nontrivial_threadlocal"), + this); +} + +void NonTrivialThreadLocal::check(const clang::ast_matchers::MatchFinder::MatchResult& Result) +{ + if (const clang::VarDecl* var = Result.Nodes.getNodeAs("nontrivial_threadlocal")) { + const auto user_diag = diag(var->getBeginLoc(), "Variable with non-trivial destructor cannot be thread_local."); + } +} + +} // namespace bitcoin diff --git a/contrib/devtools/bitcoin-tidy/logprintf.h b/contrib/devtools/bitcoin-tidy/nontrivial-threadlocal.h similarity index 64% rename from contrib/devtools/bitcoin-tidy/logprintf.h rename to contrib/devtools/bitcoin-tidy/nontrivial-threadlocal.h index db95dfe1..c8530734 100644 --- a/contrib/devtools/bitcoin-tidy/logprintf.h +++ b/contrib/devtools/bitcoin-tidy/nontrivial-threadlocal.h @@ -2,18 +2,18 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef LOGPRINTF_CHECK_H -#define LOGPRINTF_CHECK_H +#ifndef NONTRIVIAL_THREADLOCAL_CHECK_H +#define NONTRIVIAL_THREADLOCAL_CHECK_H #include namespace bitcoin { -// Warn about any use of LogPrintf that does not end with a newline. -class LogPrintfCheck final : public clang::tidy::ClangTidyCheck +// Warn about any thread_local variable with a non-trivial destructor. +class NonTrivialThreadLocal final : public clang::tidy::ClangTidyCheck { public: - LogPrintfCheck(clang::StringRef Name, clang::tidy::ClangTidyContext* Context) + NonTrivialThreadLocal(clang::StringRef Name, clang::tidy::ClangTidyContext* Context) : clang::tidy::ClangTidyCheck(Name, Context) {} bool isLanguageVersionSupported(const clang::LangOptions& LangOpts) const override @@ -26,4 +26,4 @@ class LogPrintfCheck final : public clang::tidy::ClangTidyCheck } // namespace bitcoin -#endif // LOGPRINTF_CHECK_H +#endif // NONTRIVIAL_THREADLOCAL_CHECK_H diff --git a/contrib/devtools/check-deps.sh b/contrib/devtools/check-deps.sh new file mode 100755 index 00000000..0ae81725 --- /dev/null +++ b/contrib/devtools/check-deps.sh @@ -0,0 +1,197 @@ +#!/usr/bin/env bash + +export LC_ALL=C +set -Eeuo pipefail + +# Declare paths to libraries +declare -A LIBS +LIBS[cli]="libbitcoin_cli.a" +LIBS[common]="libbitcoin_common.a" +LIBS[consensus]="libbitcoin_consensus.a" +LIBS[crypto]="libbitcoin_crypto.a" +LIBS[node]="libbitcoin_node.a" +LIBS[util]="libbitcoin_util.a" +LIBS[wallet]="libbitcoin_wallet.a" + +# Declare allowed dependencies "X Y" where X is allowed to depend on Y. This +# list is taken from doc/design/libraries.md. +ALLOWED_DEPENDENCIES=( + "cli common" + "cli util" + "common consensus" + "common crypto" + "common util" + "consensus crypto" + "node common" + "node consensus" + "node crypto" + "node kernel" + "node util" + "util crypto" + "wallet common" + "wallet crypto" + "wallet util" +) + +# Add minor dependencies omitted from doc/design/libraries.md to keep the +# dependency diagram simple. +ALLOWED_DEPENDENCIES+=( + "wallet consensus" +) + +# Declare list of known errors that should be suppressed. +declare -A SUPPRESS +# init/common.cpp file calls InitError and InitWarning from interface_ui which +# is currently part of the node library. interface_ui should just be part of the +# common library instead, and is moved in +# https://github.com/bitcoin/bitcoin/issues/10102 +SUPPRESS["common.cpp.o interface_ui.cpp.o _Z11InitWarningRK13bilingual_str"]=1 +SUPPRESS["common.cpp.o interface_ui.cpp.o _Z9InitErrorRK13bilingual_str"]=1 + +usage() { + echo "Usage: $(basename "${BASH_SOURCE[0]}") [BUILD_DIR]" +} + +# Output makefile targets, converting library .a paths to CMake targets +lib_targets() { + for lib in "${!LIBS[@]}"; do + for lib_path in ${LIBS[$lib]}; do + local name="${lib_path##*/}" + name="${name#lib}" + name="${name%.a}" + echo "$name" + done + done +} + +# Extract symbol names and object names and write to text files +extract_symbols() { + local temp_dir="$1" + for lib in "${!LIBS[@]}"; do + for lib_path in ${LIBS[$lib]}; do + nm -o "$lib_path" | { grep ' T \| W ' || true; } | awk '{print $3, $1}' >> "${temp_dir}/${lib}_exports.txt" + nm -o "$lib_path" | { grep ' U ' || true; } | awk '{print $3, $1}' >> "${temp_dir}/${lib}_imports.txt" + awk '{print $1}' "${temp_dir}/${lib}_exports.txt" | sort -u > "${temp_dir}/${lib}_exported_symbols.txt" + awk '{print $1}' "${temp_dir}/${lib}_imports.txt" | sort -u > "${temp_dir}/${lib}_imported_symbols.txt" + done + done +} + +# Lookup object name(s) corresponding to symbol name in text file +obj_names() { + local symbol="$1" + local txt_file="$2" + sed -n "s/^$symbol [^:]\\+:\\([^:]\\+\\):[^:]*\$/\\1/p" "$txt_file" | sort -u +} + +# Iterate through libraries and find disallowed dependencies +check_libraries() { + local temp_dir="$1" + local result=0 + for src in "${!LIBS[@]}"; do + for dst in "${!LIBS[@]}"; do + if [ "$src" != "$dst" ] && ! is_allowed "$src" "$dst"; then + if ! check_disallowed "$src" "$dst" "$temp_dir"; then + result=1 + fi + fi + done + done + check_not_suppressed + return $result +} + +# Return whether src library is allowed to depend on dst. +is_allowed() { + local src="$1" + local dst="$2" + for allowed in "${ALLOWED_DEPENDENCIES[@]}"; do + if [ "$src $dst" = "$allowed" ]; then + return 0 + fi + done + return 1 +} + +# Return whether src library imports any symbols from dst, assuming src is not +# allowed to depend on dst. +check_disallowed() { + local src="$1" + local dst="$2" + local temp_dir="$3" + local result=0 + + # Loop over symbol names exported by dst and imported by src + while read symbol; do + local dst_obj + dst_obj=$(obj_names "$symbol" "${temp_dir}/${dst}_exports.txt") + while read src_obj; do + if ! check_suppress "$src_obj" "$dst_obj" "$symbol"; then + echo "Error: $src_obj depends on $dst_obj symbol '$(c++filt "$symbol")', can suppress with:" + echo " SUPPRESS[\"$src_obj $dst_obj $symbol\"]=1" + result=1 + fi + done < <(obj_names "$symbol" "${temp_dir}/${src}_imports.txt") + done < <(comm -12 "${temp_dir}/${dst}_exported_symbols.txt" "${temp_dir}/${src}_imported_symbols.txt") + return $result +} + +# Declare array to track errors which were suppressed. +declare -A SUPPRESSED + +# Return whether error should be suppressed and record suppression in +# SUPPRESSED array. +check_suppress() { + local src_obj="$1" + local dst_obj="$2" + local symbol="$3" + for suppress in "${!SUPPRESS[@]}"; do + read suppress_src suppress_dst suppress_pattern <<<"$suppress" + if [[ "$src_obj" == "$suppress_src" && "$dst_obj" == "$suppress_dst" && "$symbol" =~ $suppress_pattern ]]; then + SUPPRESSED["$suppress"]=1 + return 0 + fi + done + return 1 +} + +# Warn about error which were supposed to be suppressed, but were not encountered. +check_not_suppressed() { + for suppress in "${!SUPPRESS[@]}"; do + if [[ ! -v SUPPRESSED[$suppress] ]]; then + echo >&2 "Warning: suppression '$suppress' was ignored, consider deleting." + fi + done +} + +# Check arguments. +if [ "$#" = 0 ]; then + BUILD_DIR="$(dirname "${BASH_SOURCE[0]}")/../../build" +elif [ "$#" = 1 ]; then + BUILD_DIR="$1" +else + echo >&2 "Error: wrong number of arguments." + usage >&2 + exit 1 +fi +if [ ! -f "$BUILD_DIR/Makefile" ]; then + echo >&2 "Error: directory '$BUILD_DIR' does not contain a makefile, please specify path to build directory for library targets." + usage >&2 + exit 1 +fi + +# Build libraries and run checks. +# shellcheck disable=SC2046 +cmake --build "$BUILD_DIR" -j"$(nproc)" -t $(lib_targets) +TEMP_DIR="$(mktemp -d)" +cd "$BUILD_DIR/lib" +extract_symbols "$TEMP_DIR" +if check_libraries "$TEMP_DIR"; then + echo "Success! No unexpected dependencies were detected." + RET=0 +else + echo >&2 "Error: Unexpected dependencies were detected. Check previous output." + RET=1 +fi +rm -r "$TEMP_DIR" +exit $RET diff --git a/contrib/devtools/circular-dependencies.py b/contrib/devtools/circular-dependencies.py index b1d9f2b7..b742a8ce 100755 --- a/contrib/devtools/circular-dependencies.py +++ b/contrib/devtools/circular-dependencies.py @@ -5,7 +5,6 @@ import sys import re -from typing import Dict, List, Set MAPPING = { 'core_read.cpp': 'core_io.cpp', @@ -33,7 +32,7 @@ def module_name(path): return None files = dict() -deps: Dict[str, Set[str]] = dict() +deps: dict[str, set[str]] = dict() RE = re.compile("^#include <(.*)>") @@ -65,7 +64,7 @@ def module_name(path): shortest_cycle = None for module in sorted(deps.keys()): # Build the transitive closure of dependencies of module - closure: Dict[str, List[str]] = dict() + closure: dict[str, list[str]] = dict() for dep in deps[module]: closure[dep] = [] while True: diff --git a/contrib/devtools/clang-format-diff.py b/contrib/devtools/clang-format-diff.py index 420bf7ff..30e804db 100755 --- a/contrib/devtools/clang-format-diff.py +++ b/contrib/devtools/clang-format-diff.py @@ -1,166 +1,190 @@ #!/usr/bin/env python3 # -#===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===# +# ===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===# # -# The LLVM Compiler Infrastructure +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # -# This file is distributed under the University of Illinois Open Source -# License. -# -# ============================================================ -# -# University of Illinois/NCSA -# Open Source License -# -# Copyright (c) 2007-2015 University of Illinois at Urbana-Champaign. -# All rights reserved. -# -# Developed by: -# -# LLVM Team -# -# University of Illinois at Urbana-Champaign -# -# http://llvm.org -# -# Permission is hereby granted, free of charge, to any person obtaining a copy of -# this software and associated documentation files (the "Software"), to deal with -# the Software without restriction, including without limitation the rights to -# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -# of the Software, and to permit persons to whom the Software is furnished to do -# so, subject to the following conditions: -# -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimers. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimers in the -# documentation and/or other materials provided with the distribution. -# -# * Neither the names of the LLVM Team, University of Illinois at -# Urbana-Champaign, nor the names of its contributors may be used to -# endorse or promote products derived from this Software without specific -# prior written permission. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE -# SOFTWARE. -# -# ============================================================ -# -#===------------------------------------------------------------------------===# - -r""" -ClangFormat Diff Reformatter -============================ +# ===------------------------------------------------------------------------===# +""" This script reads input from a unified diff and reformats all the changed lines. This is useful to reformat all the lines touched by a specific patch. Example usage for git/svn users: - git diff -U0 HEAD^ | clang-format-diff.py -p1 -i - svn diff --diff-cmd=diff -x-U0 | clang-format-diff.py -i + git diff -U0 --no-color --relative HEAD^ | {clang_format_diff} -p1 -i + svn diff --diff-cmd=diff -x-U0 | {clang_format_diff} -i +It should be noted that the filename contained in the diff is used unmodified +to determine the source file to update. Users calling this script directly +should be careful to ensure that the path in the diff is correct relative to the +current working directory. """ +from __future__ import absolute_import, division, print_function import argparse import difflib -import io import re import subprocess import sys - -# Change this to the full path if clang-format is not on the path. -binary = 'clang-format' +from io import StringIO def main(): - parser = argparse.ArgumentParser(description= - 'Reformat changed lines in diff. Without -i ' - 'option just output the diff that would be ' - 'introduced.') - parser.add_argument('-i', action='store_true', default=False, - help='apply edits to files instead of displaying a diff') - parser.add_argument('-p', metavar='NUM', default=0, - help='strip the smallest prefix containing P slashes') - parser.add_argument('-regex', metavar='PATTERN', default=None, - help='custom pattern selecting file paths to reformat ' - '(case sensitive, overrides -iregex)') - parser.add_argument('-iregex', metavar='PATTERN', default= - r'.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hpp|m|mm|inc|js|ts|proto' - r'|protodevel|java)', - help='custom pattern selecting file paths to reformat ' - '(case insensitive, overridden by -regex)') - parser.add_argument('-sort-includes', action='store_true', default=False, - help='let clang-format sort include blocks') - parser.add_argument('-v', '--verbose', action='store_true', - help='be more verbose, ineffective without -i') - args = parser.parse_args() - - # Extract changed lines for each file. - filename = None - lines_by_file = {} - for line in sys.stdin: - match = re.search(r'^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line) - if match: - filename = match.group(2) - if filename is None: - continue - - if args.regex is not None: - if not re.match('^%s$' % args.regex, filename): - continue - else: - if not re.match('^%s$' % args.iregex, filename, re.IGNORECASE): - continue - - match = re.search(r'^@@.*\+(\d+)(,(\d+))?', line) - if match: - start_line = int(match.group(1)) - line_count = 1 - if match.group(3): - line_count = int(match.group(3)) - if line_count == 0: - continue - end_line = start_line + line_count - 1 - lines_by_file.setdefault(filename, []).extend( - ['-lines', str(start_line) + ':' + str(end_line)]) - - # Reformat files containing changes in place. - for filename, lines in lines_by_file.items(): - if args.i and args.verbose: - print('Formatting {}'.format(filename)) - command = [binary, filename] - if args.i: - command.append('-i') - if args.sort_includes: - command.append('-sort-includes') - command.extend(lines) - command.extend(['-style=file', '-fallback-style=none']) - p = subprocess.Popen(command, - stdout=subprocess.PIPE, - stderr=None, - stdin=subprocess.PIPE, - text=True) - stdout, stderr = p.communicate() - if p.returncode != 0: - sys.exit(p.returncode) - - if not args.i: - with open(filename, encoding="utf8") as f: - code = f.readlines() - formatted_code = io.StringIO(stdout).readlines() - diff = difflib.unified_diff(code, formatted_code, - filename, filename, - '(before formatting)', '(after formatting)') - diff_string = ''.join(diff) - if len(diff_string) > 0: - sys.stdout.write(diff_string) - -if __name__ == '__main__': - main() + parser = argparse.ArgumentParser( + description=__doc__.format(clang_format_diff="%(prog)s"), + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + parser.add_argument( + "-i", + action="store_true", + default=False, + help="apply edits to files instead of displaying a diff", + ) + parser.add_argument( + "-p", + metavar="NUM", + default=0, + help="strip the smallest prefix containing P slashes", + ) + parser.add_argument( + "-regex", + metavar="PATTERN", + default=None, + help="custom pattern selecting file paths to reformat " + "(case sensitive, overrides -iregex)", + ) + parser.add_argument( + "-iregex", + metavar="PATTERN", + default=r".*\.(?:cpp|cc|c\+\+|cxx|cppm|ccm|cxxm|c\+\+m|c|cl|h|hh|hpp" + r"|hxx|m|mm|inc|js|ts|proto|protodevel|java|cs|json|s?vh?)", + help="custom pattern selecting file paths to reformat " + "(case insensitive, overridden by -regex)", + ) + parser.add_argument( + "-sort-includes", + action="store_true", + default=False, + help="let clang-format sort include blocks", + ) + parser.add_argument( + "-v", + "--verbose", + action="store_true", + help="be more verbose, ineffective without -i", + ) + parser.add_argument( + "-style", + help="formatting style to apply (LLVM, GNU, Google, Chromium, " + "Microsoft, Mozilla, WebKit)", + ) + parser.add_argument( + "-fallback-style", + help="The name of the predefined style used as a" + "fallback in case clang-format is invoked with" + "-style=file, but can not find the .clang-format" + "file to use.", + ) + parser.add_argument( + "-binary", + default="clang-format", + help="location of binary to use for clang-format", + ) + args = parser.parse_args() + + # Extract changed lines for each file. + filename = None + lines_by_file = {} + for line in sys.stdin: + match = re.search(r"^\+\+\+\ (.*?/){%s}(\S*)" % args.p, line) + if match: + filename = match.group(2) + if filename is None: + continue + + if args.regex is not None: + if not re.match("^%s$" % args.regex, filename): + continue + else: + if not re.match("^%s$" % args.iregex, filename, re.IGNORECASE): + continue + + match = re.search(r"^@@.*\+(\d+)(?:,(\d+))?", line) + if match: + start_line = int(match.group(1)) + line_count = 1 + if match.group(2): + line_count = int(match.group(2)) + # The input is something like + # + # @@ -1, +0,0 @@ + # + # which means no lines were added. + if line_count == 0: + continue + # Also format lines range if line_count is 0 in case of deleting + # surrounding statements. + end_line = start_line + if line_count != 0: + end_line += line_count - 1 + lines_by_file.setdefault(filename, []).extend( + ["-lines", str(start_line) + ":" + str(end_line)] + ) + + # Reformat files containing changes in place. + for filename, lines in lines_by_file.items(): + if args.i and args.verbose: + print("Formatting {}".format(filename)) + command = [args.binary, filename] + if args.i: + command.append("-i") + if args.sort_includes: + command.append("-sort-includes") + command.extend(lines) + if args.style: + command.extend(["-style", args.style]) + if args.fallback_style: + command.extend(["-fallback-style", args.fallback_style]) + + try: + p = subprocess.Popen( + command, + stdout=subprocess.PIPE, + stderr=None, + stdin=subprocess.PIPE, + universal_newlines=True, + ) + except OSError as e: + # Give the user more context when clang-format isn't + # found/isn't executable, etc. + raise RuntimeError( + 'Failed to run "%s" - %s"' % (" ".join(command), e.strerror) + ) + + stdout, _stderr = p.communicate() + if p.returncode != 0: + sys.exit(p.returncode) + + if not args.i: + with open(filename, encoding="utf8") as f: + code = f.readlines() + formatted_code = StringIO(stdout).readlines() + diff = difflib.unified_diff( + code, + formatted_code, + filename, + filename, + "(before formatting)", + "(after formatting)", + ) + diff_string = "".join(diff) + if len(diff_string) > 0: + sys.stdout.write(diff_string) + sys.exit(1) + + +if __name__ == "__main__": + main() diff --git a/contrib/devtools/copyright_header.py b/contrib/devtools/copyright_header.py index 3dddffe3..12d72764 100755 --- a/contrib/devtools/copyright_header.py +++ b/contrib/devtools/copyright_header.py @@ -19,11 +19,9 @@ 'src/qt/bitcoinstrings.cpp', 'src/chainparamsseeds.h', # other external copyrights: - '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', ] @@ -95,7 +93,6 @@ def compile_copyright_regex(copyright_style, year_style, name): r"Satoshi Nakamoto", r"The Bitcoin Core developers", r"BitPay Inc\.", - r"University of Illinois at Urbana-Champaign\.", r"Pieter Wuille", r"Wladimir J\. van der Laan", r"Jeff Garzik", diff --git a/contrib/devtools/deterministic-fuzz-coverage/Cargo.lock b/contrib/devtools/deterministic-fuzz-coverage/Cargo.lock new file mode 100644 index 00000000..319e7bfa --- /dev/null +++ b/contrib/devtools/deterministic-fuzz-coverage/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "deterministic-fuzz-coverage" +version = "0.1.0" diff --git a/contrib/devtools/deterministic-fuzz-coverage/Cargo.toml b/contrib/devtools/deterministic-fuzz-coverage/Cargo.toml new file mode 100644 index 00000000..b559b0c5 --- /dev/null +++ b/contrib/devtools/deterministic-fuzz-coverage/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "deterministic-fuzz-coverage" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/contrib/devtools/deterministic-fuzz-coverage/src/main.rs b/contrib/devtools/deterministic-fuzz-coverage/src/main.rs new file mode 100644 index 00000000..3eeb121d --- /dev/null +++ b/contrib/devtools/deterministic-fuzz-coverage/src/main.rs @@ -0,0 +1,281 @@ +// Copyright (c) The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or https://opensource.org/license/mit/. + +use std::collections::VecDeque; +use std::env; +use std::fs::{read_dir, DirEntry, File}; +use std::path::{Path, PathBuf}; +use std::process::{Command, ExitCode}; +use std::str; +use std::thread; + +/// A type for a complete and readable error message. +type AppError = String; +type AppResult = Result<(), AppError>; + +const LLVM_PROFDATA: &str = "llvm-profdata"; +const LLVM_COV: &str = "llvm-cov"; +const GIT: &str = "git"; + +const DEFAULT_PAR: usize = 1; + +fn exit_help(err: &str) -> AppError { + format!( + r#" +Error: {err} + +Usage: program ./build_dir ./qa-assets/fuzz_corpora fuzz_target_name [parallelism={DEFAULT_PAR}] + +Refer to the devtools/README.md for more details."# + ) +} + +fn sanity_check(corpora_dir: &Path, fuzz_exe: &Path) -> AppResult { + for tool in [LLVM_PROFDATA, LLVM_COV, GIT] { + let output = Command::new(tool).arg("--help").output(); + match output { + Ok(output) if output.status.success() => {} + _ => Err(exit_help(&format!("The tool {} is not installed", tool)))?, + } + } + if !corpora_dir.is_dir() { + Err(exit_help(&format!( + "Fuzz corpora path ({}) must be a directory", + corpora_dir.display() + )))?; + } + if !fuzz_exe.exists() { + Err(exit_help(&format!( + "Fuzz executable ({}) not found", + fuzz_exe.display() + )))?; + } + Ok(()) +} + +fn app() -> AppResult { + // Parse args + let args = env::args().collect::>(); + let build_dir = args.get(1).ok_or(exit_help("Must set build dir"))?; + if build_dir == "--help" { + Err(exit_help("--help requested"))?; + } + let corpora_dir = args.get(2).ok_or(exit_help("Must set fuzz corpora dir"))?; + let fuzz_target = args + .get(3) + // Require fuzz target for now. In the future it could be optional and the tool could + // iterate over all compiled fuzz targets + .ok_or(exit_help("Must set fuzz target"))?; + let par = match args.get(4) { + Some(s) => s + .parse::() + .map_err(|e| exit_help(&format!("Could not parse parallelism as usize ({s}): {e}")))?, + None => DEFAULT_PAR, + } + .max(1); + if args.get(5).is_some() { + Err(exit_help("Too many args"))?; + } + + let build_dir = Path::new(build_dir); + let corpora_dir = Path::new(corpora_dir); + let fuzz_exe = build_dir.join("bin/fuzz"); + + sanity_check(corpora_dir, &fuzz_exe)?; + + deterministic_coverage(build_dir, corpora_dir, &fuzz_exe, fuzz_target, par) +} + +fn using_libfuzzer(fuzz_exe: &Path) -> Result { + println!("Check if using libFuzzer ..."); + let stderr = Command::new(fuzz_exe) + .arg("-help=1") // Will be interpreted as option (libfuzzer) or as input file + .env("FUZZ", "addition_overflow") // Any valid target + .output() + .map_err(|e| format!("fuzz failed with {e}"))? + .stderr; + let help_output = str::from_utf8(&stderr) + .map_err(|e| format!("The libFuzzer -help=1 output must be valid text ({e})"))?; + Ok(help_output.contains("libFuzzer")) +} + +fn deterministic_coverage( + build_dir: &Path, + corpora_dir: &Path, + fuzz_exe: &Path, + fuzz_target: &str, + par: usize, +) -> AppResult { + let using_libfuzzer = using_libfuzzer(fuzz_exe)?; + if using_libfuzzer { + println!("Warning: The fuzz executable was compiled with libFuzzer as sanitizer."); + println!("This tool may be tripped by libFuzzer misbehavior."); + println!("It is recommended to compile without libFuzzer."); + } + let corpus_dir = corpora_dir.join(fuzz_target); + let mut entries = read_dir(&corpus_dir) + .map_err(|err| { + exit_help(&format!( + "The fuzz target's input directory must exist! ({}; {})", + corpus_dir.display(), + err + )) + })? + .map(|entry| entry.expect("IO error")) + .collect::>(); + entries.sort_by_key(|entry| entry.file_name()); + let run_single = |run_id: char, entry: &Path, thread_id: usize| -> Result { + let cov_txt_path = build_dir.join(format!("fuzz_det_cov.show.t{thread_id}.{run_id}.txt")); + let profraw_file = build_dir.join(format!("fuzz_det_cov.t{thread_id}.{run_id}.profraw")); + let profdata_file = build_dir.join(format!("fuzz_det_cov.t{thread_id}.{run_id}.profdata")); + { + let output = { + let mut cmd = Command::new(fuzz_exe); + if using_libfuzzer { + cmd.args(["-runs=1", "-shuffle=1", "-prefer_small=0"]); + } + cmd + } + .env("LLVM_PROFILE_FILE", &profraw_file) + .env("FUZZ", fuzz_target) + .arg(entry) + .output() + .map_err(|e| format!("fuzz failed: {e}"))?; + if !output.status.success() { + Err(format!( + "fuzz failed!\nstdout:\n{}\nstderr:\n{}\n", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr) + ))?; + } + } + if !Command::new(LLVM_PROFDATA) + .arg("merge") + .arg("--sparse") + .arg(&profraw_file) + .arg("-o") + .arg(&profdata_file) + .status() + .map_err(|e| format!("{LLVM_PROFDATA} merge failed with {e}"))? + .success() + { + Err(format!("{LLVM_PROFDATA} merge failed. This can be a sign of compiling without code coverage support."))?; + } + let cov_file = File::create(&cov_txt_path) + .map_err(|e| format!("Failed to create coverage txt file ({e})"))?; + if !Command::new(LLVM_COV) + .args([ + "show", + "--show-line-counts-or-regions", + "--show-branches=count", + "--show-expansions", + "--show-instantiation-summary", + "-Xdemangler=llvm-cxxfilt", + &format!("--instr-profile={}", profdata_file.display()), + ]) + .arg(fuzz_exe) + .stdout(cov_file) + .spawn() + .map_err(|e| format!("{LLVM_COV} show failed with {e}"))? + .wait() + .map_err(|e| format!("{LLVM_COV} show failed with {e}"))? + .success() + { + Err(format!("{LLVM_COV} show failed"))?; + }; + Ok(cov_txt_path) + }; + let check_diff = |a: &Path, b: &Path, err: &str| -> AppResult { + let same = Command::new(GIT) + .args(["--no-pager", "diff", "--no-index"]) + .arg(a) + .arg(b) + .status() + .map_err(|e| format!("{GIT} diff failed with {e}"))? + .success(); + if !same { + Err(format!( + r#" +The coverage was not deterministic between runs. +{err}"# + ))?; + } + Ok(()) + }; + // First, check that each fuzz input is deterministic running by itself in a process. + // + // This can catch issues and isolate where a single fuzz input triggers non-determinism, but + // all other fuzz inputs are deterministic. + // + // Also, This can catch issues where several fuzz inputs are non-deterministic, but the sum of + // their overall coverage trace remains the same across runs and thus remains undetected. + println!( + "Check each fuzz input individually ... ({} inputs with parallelism {par})", + entries.len() + ); + let check_individual = |entry: &DirEntry, thread_id: usize| -> AppResult { + let entry = entry.path(); + if !entry.is_file() { + Err(format!("{} should be a file", entry.display()))?; + } + let cov_txt_base = run_single('a', &entry, thread_id)?; + let cov_txt_repeat = run_single('b', &entry, thread_id)?; + check_diff( + &cov_txt_base, + &cov_txt_repeat, + &format!("The fuzz target input was {}.", entry.display()), + )?; + Ok(()) + }; + thread::scope(|s| -> AppResult { + let mut handles = VecDeque::with_capacity(par); + let mut res = Ok(()); + for (i, entry) in entries.iter().enumerate() { + println!("[{}/{}]", i + 1, entries.len()); + handles.push_back(s.spawn(move || check_individual(entry, i % par))); + while handles.len() >= par || i == (entries.len() - 1) || res.is_err() { + if let Some(th) = handles.pop_front() { + let thread_result = match th.join() { + Err(_e) => Err("A scoped thread panicked".to_string()), + Ok(r) => r, + }; + if thread_result.is_err() { + res = thread_result; + } + } else { + return res; + } + } + } + res + })?; + // Finally, check that running over all fuzz inputs in one process is deterministic as well. + // This can catch issues where mutable global state is leaked from one fuzz input execution to + // the next. + println!("Check all fuzz inputs in one go ..."); + { + if !corpus_dir.is_dir() { + Err(format!("{} should be a folder", corpus_dir.display()))?; + } + let cov_txt_base = run_single('a', &corpus_dir, 0)?; + let cov_txt_repeat = run_single('b', &corpus_dir, 0)?; + check_diff( + &cov_txt_base, + &cov_txt_repeat, + &format!("All fuzz inputs in {} were used.", corpus_dir.display()), + )?; + } + println!("✨ Coverage test passed for {fuzz_target}. ✨"); + Ok(()) +} + +fn main() -> ExitCode { + match app() { + Ok(()) => ExitCode::SUCCESS, + Err(err) => { + eprintln!("⚠️\n{}", err); + ExitCode::FAILURE + } + } +} diff --git a/contrib/devtools/deterministic-unittest-coverage/Cargo.lock b/contrib/devtools/deterministic-unittest-coverage/Cargo.lock new file mode 100644 index 00000000..39013304 --- /dev/null +++ b/contrib/devtools/deterministic-unittest-coverage/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "deterministic-unittest-coverage" +version = "0.1.0" diff --git a/contrib/devtools/deterministic-unittest-coverage/Cargo.toml b/contrib/devtools/deterministic-unittest-coverage/Cargo.toml new file mode 100644 index 00000000..d5810213 --- /dev/null +++ b/contrib/devtools/deterministic-unittest-coverage/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "deterministic-unittest-coverage" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/contrib/devtools/deterministic-unittest-coverage/src/main.rs b/contrib/devtools/deterministic-unittest-coverage/src/main.rs new file mode 100644 index 00000000..047c8d24 --- /dev/null +++ b/contrib/devtools/deterministic-unittest-coverage/src/main.rs @@ -0,0 +1,149 @@ +// Copyright (c) The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or https://opensource.org/license/mit/. + +use std::env; +use std::fs::File; +use std::path::{Path, PathBuf}; +use std::process::{Command, ExitCode}; +use std::str; + +/// A type for a complete and readable error message. +type AppError = String; +type AppResult = Result<(), AppError>; + +const LLVM_PROFDATA: &str = "llvm-profdata"; +const LLVM_COV: &str = "llvm-cov"; +const GIT: &str = "git"; + +fn exit_help(err: &str) -> AppError { + format!( + r#" +Error: {err} + +Usage: program ./build_dir boost_unittest_filter + +Refer to the devtools/README.md for more details."# + ) +} + +fn sanity_check(test_exe: &Path) -> AppResult { + for tool in [LLVM_PROFDATA, LLVM_COV, GIT] { + let output = Command::new(tool).arg("--help").output(); + match output { + Ok(output) if output.status.success() => {} + _ => Err(exit_help(&format!("The tool {} is not installed", tool)))?, + } + } + if !test_exe.exists() { + Err(exit_help(&format!( + "Test executable ({}) not found", + test_exe.display() + )))?; + } + Ok(()) +} + +fn app() -> AppResult { + // Parse args + let args = env::args().collect::>(); + let build_dir = args.get(1).ok_or(exit_help("Must set build dir"))?; + if build_dir == "--help" { + Err(exit_help("--help requested"))?; + } + let filter = args + .get(2) + // Require filter for now. In the future it could be optional and the tool could provide a + // default filter. + .ok_or(exit_help("Must set boost test filter"))?; + if args.get(3).is_some() { + Err(exit_help("Too many args"))?; + } + + let build_dir = Path::new(build_dir); + let test_exe = build_dir.join("bin/test_bitcoin"); + + sanity_check(&test_exe)?; + + deterministic_coverage(build_dir, &test_exe, filter) +} + +fn deterministic_coverage(build_dir: &Path, test_exe: &Path, filter: &str) -> AppResult { + let profraw_file = build_dir.join("test_det_cov.profraw"); + let profdata_file = build_dir.join("test_det_cov.profdata"); + let run_single = |run_id: char| -> Result { + println!("Run with id {run_id}"); + let cov_txt_path = build_dir.join(format!("test_det_cov.show.{run_id}.txt")); + if !Command::new(test_exe) + .env("LLVM_PROFILE_FILE", &profraw_file) + .env("BOOST_TEST_RUN_FILTERS", filter) + .env("RANDOM_CTX_SEED", "21") + .status() + .map_err(|e| format!("test failed with {e}"))? + .success() + { + Err("test failed".to_string())?; + } + if !Command::new(LLVM_PROFDATA) + .arg("merge") + .arg("--sparse") + .arg(&profraw_file) + .arg("-o") + .arg(&profdata_file) + .status() + .map_err(|e| format!("{LLVM_PROFDATA} merge failed with {e}"))? + .success() + { + Err(format!("{LLVM_PROFDATA} merge failed. This can be a sign of compiling without code coverage support."))?; + } + let cov_file = File::create(&cov_txt_path) + .map_err(|e| format!("Failed to create coverage txt file ({e})"))?; + if !Command::new(LLVM_COV) + .args([ + "show", + "--show-line-counts-or-regions", + "--show-branches=count", + "--show-expansions", + "--show-instantiation-summary", + "-Xdemangler=llvm-cxxfilt", + &format!("--instr-profile={}", profdata_file.display()), + ]) + .arg(test_exe) + .stdout(cov_file) + .status() + .map_err(|e| format!("{LLVM_COV} show failed with {e}"))? + .success() + { + Err(format!("{LLVM_COV} show failed"))?; + } + Ok(cov_txt_path) + }; + let check_diff = |a: &Path, b: &Path| -> AppResult { + let same = Command::new(GIT) + .args(["--no-pager", "diff", "--no-index"]) + .arg(a) + .arg(b) + .status() + .map_err(|e| format!("{GIT} diff failed with {e}"))? + .success(); + if !same { + Err("The coverage was not deterministic between runs.".to_string())?; + } + Ok(()) + }; + let r0 = run_single('a')?; + let r1 = run_single('b')?; + check_diff(&r0, &r1)?; + println!("✨ The coverage was deterministic across two runs. ✨"); + Ok(()) +} + +fn main() -> ExitCode { + match app() { + Ok(()) => ExitCode::SUCCESS, + Err(err) => { + eprintln!("⚠️\n{}", err); + ExitCode::FAILURE + } + } +} diff --git a/contrib/devtools/gen-bitcoin-conf.sh b/contrib/devtools/gen-bitcoin-conf.sh index 1021cd6d..d31f5462 100755 --- a/contrib/devtools/gen-bitcoin-conf.sh +++ b/contrib/devtools/gen-bitcoin-conf.sh @@ -5,24 +5,24 @@ export LC_ALL=C TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} -BUILDDIR=${BUILDDIR:-$TOPDIR} -BINDIR=${BINDIR:-$BUILDDIR/src} -COORDINATED=${COORDINATED:-$BINDIR/coordinated} +BUILDDIR=${BUILDDIR:-$TOPDIR/build} +BINDIR=${BINDIR:-$BUILDDIR/bin} +BITCOIND=${BITCOIND:-$BINDIR/bitcoind} SHARE_EXAMPLES_DIR=${SHARE_EXAMPLES_DIR:-$TOPDIR/share/examples} EXAMPLE_CONF_FILE=${EXAMPLE_CONF_FILE:-$SHARE_EXAMPLES_DIR/bitcoin.conf} -[ ! -x "$COORDINATED" ] && echo "$COORDINATED not found or not executable." && exit 1 +[ ! -x "$BITCOIND" ] && echo "$BITCOIND not found or not executable." && exit 1 DIRTY="" -VERSION_OUTPUT=$($COORDINATED --version) +VERSION_OUTPUT=$($BITCOIND --version) if [[ $VERSION_OUTPUT == *"dirty"* ]]; then - DIRTY="${DIRTY}${COORDINATED}\n" + DIRTY="${DIRTY}${BITCOIND}\n" fi if [ -n "$DIRTY" ] then - echo -e "WARNING: $COORDINATED was built from a dirty tree.\n" - echo -e "To safely generate a bitcoin.conf file, please commit your changes to $COORDINATED, rebuild, then run this script again.\n" + echo -e "WARNING: $BITCOIND was built from a dirty tree.\n" + echo -e "To safely generate a bitcoin.conf file, please commit your changes to $BITCOIND, rebuild, then run this script again.\n" fi echo 'Generating example bitcoin.conf file in share/examples/' @@ -46,11 +46,12 @@ cat > "${EXAMPLE_CONF_FILE}" << 'EOF' ### Options EOF -# parse the output from coordinated --help +# parse the output from bitcoind --help # adding newlines is a bit funky to ensure portability for BSD # see here for more details: https://stackoverflow.com/a/24575385 -${COORDINATED} --help \ - | sed '1,/Print this help message and exit/d' \ +${BITCOIND} --help \ + | sed '1,/Options:/d' \ + | sed -E '/^[[:space:]]{2}-help/,/^[[:space:]]*$/d' \ | sed -E 's/^[[:space:]]{2}\-/#/' \ | sed -E 's/^[[:space:]]{7}/# /' \ | sed -E '/[=[:space:]]/!s/#.*$/&=1/' \ @@ -72,9 +73,12 @@ cat >> "${EXAMPLE_CONF_FILE}" << 'EOF' # Options for mainnet [main] -# Options for testnet +# Options for testnet3 [test] +# Options for testnet4 +[testnet4] + # Options for signet [signet] diff --git a/contrib/devtools/gen-manpages.py b/contrib/devtools/gen-manpages.py index 1dc1f4c6..c7678817 100755 --- a/contrib/devtools/gen-manpages.py +++ b/contrib/devtools/gen-manpages.py @@ -6,16 +6,29 @@ import subprocess import sys import tempfile +import argparse BINARIES = [ -'src/coordinated', -'src/coordinate-cli', -'src/coordinate-tx', -'src/coordinate-wallet', -'src/coordinate-util', -'src/qt/coordinate-qt', +'bin/bitcoind', +'bin/bitcoin-cli', +'bin/bitcoin-tx', +'bin/bitcoin-wallet', +'bin/bitcoin-util', +'bin/bitcoin-qt', ] +parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, +) +parser.add_argument( + "-s", + "--skip-missing-binaries", + action="store_true", + default=False, + help="skip generation for binaries that are not found in the build path", +) +args = parser.parse_args() + # Paths to external utilities. git = os.getenv('GIT', 'git') help2man = os.getenv('HELP2MAN', 'help2man') @@ -27,7 +40,7 @@ topdir = r.stdout.rstrip() # Get input and output directories. -builddir = os.getenv('BUILDDIR', topdir) +builddir = os.getenv('BUILDDIR', os.path.join(topdir, 'build')) mandir = os.getenv('MANDIR', os.path.join(topdir, 'doc/man')) # Verify that all the required binaries are usable, and extract copyright @@ -38,8 +51,12 @@ try: r = subprocess.run([abspath, "--version"], stdout=subprocess.PIPE, check=True, text=True) except IOError: - print(f'{abspath} not found or not an executable', file=sys.stderr) - sys.exit(1) + if(args.skip_missing_binaries): + print(f'{abspath} not found or not an executable. Skipping...', file=sys.stderr) + continue + else: + print(f'{abspath} not found or not an executable', file=sys.stderr) + sys.exit(1) # take first line (which must contain version) verstr = r.stdout.splitlines()[0] # last word of line is the actual version e.g. v22.99.0-5c6b3d5b3508 @@ -51,6 +68,10 @@ versions.append((abspath, verstr, copyright)) +if not versions: + print(f'No binaries found in {builddir}. Please ensure the binaries are present in {builddir}, or set another build path using the BUILDDIR env variable.') + sys.exit(1) + if any(verstr.endswith('-dirty') for (_, verstr, _) in versions): print("WARNING: Binaries were built from a dirty tree.") print('man pages generated from dirty binaries should NOT be committed.') @@ -62,6 +83,10 @@ # Copyright is the same for all binaries, so just use the first. footer.write('[COPYRIGHT]\n') footer.write('\n'.join(versions[0][2]).strip()) + # Create SEE ALSO section + footer.write('\n[SEE ALSO]\n') + footer.write(', '.join(s.rpartition('/')[2] + '(1)' for s in BINARIES)) + footer.write('\n') footer.flush() # Call the binaries through help2man to produce a manual page for each of them. diff --git a/contrib/devtools/headerssync-params.py b/contrib/devtools/headerssync-params.py old mode 100644 new mode 100755 index 0198f5db..4640718c --- a/contrib/devtools/headerssync-params.py +++ b/contrib/devtools/headerssync-params.py @@ -12,13 +12,13 @@ # Parameters: # Aim for still working fine at some point in the future. [datetime] -TIME = datetime(2026, 10, 5) +TIME = datetime(2027, 10, 6) # Expected block interval. [timedelta] BLOCK_INTERVAL = timedelta(seconds=600) # The number of headers corresponding to the minchainwork parameter. [headers] -MINCHAINWORK_HEADERS = 804000 +MINCHAINWORK_HEADERS = 886157 # Combined processing bandwidth from all attackers to one victim. [bit/s] # 6 Gbit/s is approximately the speed at which a single thread of a Ryzen 5950X CPU thread can hash diff --git a/contrib/devtools/iwyu/bitcoin.core.imp b/contrib/devtools/iwyu/bitcoin.core.imp index 919ffab1..c4c4ba4c 100644 --- a/contrib/devtools/iwyu/bitcoin.core.imp +++ b/contrib/devtools/iwyu/bitcoin.core.imp @@ -1,7 +1,3 @@ -# Fixups / upstreamed changes +# Nothing for now. [ - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, - { include: [ "", private, "", public ] }, ] diff --git a/contrib/devtools/split-debug.sh b/contrib/devtools/split-debug.sh deleted file mode 100755 index e7209aff..00000000 --- a/contrib/devtools/split-debug.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -e -if [ $# -ne 3 ]; - then echo "usage: $0 " -fi - - --enable-deterministic-archives -p --only-keep-debug $1 $3 - --enable-deterministic-archives -p --strip-debug $1 $2 -strip --enable-deterministic-archives -p -s $2 - --enable-deterministic-archives -p --add-gnu-debuglink=$3 $2 diff --git a/contrib/devtools/test-security-check.py b/contrib/devtools/test-security-check.py deleted file mode 100755 index 802bf9fd..00000000 --- a/contrib/devtools/test-security-check.py +++ /dev/null @@ -1,153 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2015-2022 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. -''' -Test script for security-check.py -''' -import lief -import os -import subprocess -from typing import List -import unittest - -from utils import determine_wellknown_cmd - -def write_testcode(filename): - with open(filename, 'w', encoding="utf8") as f: - f.write(''' - #include - int main() - { - printf("the quick brown fox jumps over the lazy god\\n"); - return 0; - } - ''') - -def clean_files(source, executable): - os.remove(source) - os.remove(executable) - -def call_security_check(cc: str, source: str, executable: str, options) -> tuple: - # This should behave the same as AC_TRY_LINK, so arrange well-known flags - # in the same order as autoconf would. - # - # See the definitions for ac_link in autoconf's lib/autoconf/c.m4 file for - # reference. - env_flags: List[str] = [] - for var in ['CFLAGS', 'CPPFLAGS', 'LDFLAGS']: - env_flags += filter(None, os.environ.get(var, '').split(' ')) - - subprocess.run([*cc,source,'-o',executable] + env_flags + options, check=True) - p = subprocess.run([os.path.join(os.path.dirname(__file__), 'security-check.py'), executable], stdout=subprocess.PIPE, text=True) - return (p.returncode, p.stdout.rstrip()) - -def get_arch(cc, source, executable): - subprocess.run([*cc, source, '-o', executable], check=True) - binary = lief.parse(executable) - arch = binary.abstract.header.architecture - os.remove(executable) - return arch - -class TestSecurityChecks(unittest.TestCase): - def test_ELF(self): - source = 'test1.c' - executable = 'test1' - cc = determine_wellknown_cmd('CC', 'gcc') - write_testcode(source) - arch = get_arch(cc, source, executable) - - if arch == lief.ARCHITECTURES.X86: - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']), - (1, executable+': failed PIE NX RELRO Canary CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']), - (1, executable+': failed PIE RELRO Canary CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']), - (1, executable+': failed PIE RELRO CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-pie','-fPIE', '-Wl,-z,separate-code']), - (1, executable+': failed RELRO CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,noseparate-code']), - (1, executable+': failed separate_code CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code']), - (1, executable+': failed CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code', '-fcf-protection=full']), - (0, '')) - else: - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']), - (1, executable+': failed PIE NX RELRO Canary')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']), - (1, executable+': failed PIE RELRO Canary')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']), - (1, executable+': failed PIE RELRO')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-pie','-fPIE', '-Wl,-z,separate-code']), - (1, executable+': failed RELRO')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,noseparate-code']), - (1, executable+': failed separate_code')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code']), - (0, '')) - - clean_files(source, executable) - - def test_PE(self): - source = 'test1.c' - executable = 'test1.exe' - cc = determine_wellknown_cmd('CC', 'x86_64-w64-mingw32-gcc') - write_testcode(source) - - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--disable-nxcompat','-Wl,--disable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-no-pie','-fno-PIE','-fno-stack-protector']), - (1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA NX RELOC_SECTION CONTROL_FLOW Canary')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--disable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-no-pie','-fno-PIE','-fstack-protector-all', '-lssp']), - (1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA RELOC_SECTION CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-no-pie','-fno-PIE','-fstack-protector-all', '-lssp']), - (1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--disable-dynamicbase','-Wl,--disable-high-entropy-va','-pie','-fPIE','-fstack-protector-all', '-lssp']), - (1, executable+': failed PIE DYNAMIC_BASE HIGH_ENTROPY_VA CONTROL_FLOW')) # -pie -fPIE does nothing unless --dynamicbase is also supplied - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--disable-high-entropy-va','-pie','-fPIE','-fstack-protector-all', '-lssp']), - (1, executable+': failed HIGH_ENTROPY_VA CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--high-entropy-va','-pie','-fPIE','-fstack-protector-all', '-lssp']), - (1, executable+': failed CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--enable-reloc-section','-Wl,--dynamicbase','-Wl,--high-entropy-va','-pie','-fPIE', '-fcf-protection=full','-fstack-protector-all', '-lssp']), - (0, '')) - - clean_files(source, executable) - - def test_MACHO(self): - source = 'test1.c' - executable = 'test1' - cc = determine_wellknown_cmd('CC', 'clang') - write_testcode(source) - arch = get_arch(cc, source, executable) - - if arch == lief.ARCHITECTURES.X86: - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector', '-Wl,-no_fixup_chains']), - (1, executable+': failed NOUNDEFS Canary FIXUP_CHAINS PIE NX CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector', '-Wl,-fixup_chains']), - (1, executable+': failed NOUNDEFS Canary PIE NX CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fstack-protector-all', '-Wl,-fixup_chains']), - (1, executable+': failed NOUNDEFS PIE NX CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-fstack-protector-all', '-Wl,-fixup_chains']), - (1, executable+': failed NOUNDEFS PIE CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all', '-Wl,-fixup_chains']), - (1, executable+': failed PIE CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all', '-Wl,-fixup_chains']), - (1, executable+': failed PIE CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all', '-fcf-protection=full', '-Wl,-fixup_chains']), - (1, executable+': failed PIE')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-Wl,-bind_at_load','-fstack-protector-all', '-fcf-protection=full', '-Wl,-fixup_chains']), - (0, '')) - else: - # arm64 darwin doesn't support non-PIE binaries, control flow or executable stacks - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fno-stack-protector', '-Wl,-no_fixup_chains']), - (1, executable+': failed NOUNDEFS Canary FIXUP_CHAINS')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fno-stack-protector', '-Wl,-fixup_chains']), - (1, executable+': failed NOUNDEFS Canary')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fstack-protector-all', '-Wl,-fixup_chains']), - (1, executable+': failed NOUNDEFS')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-bind_at_load','-fstack-protector-all', '-Wl,-fixup_chains']), - (0, '')) - - - clean_files(source, executable) - -if __name__ == '__main__': - unittest.main() diff --git a/contrib/devtools/test-symbol-check.py b/contrib/devtools/test-symbol-check.py deleted file mode 100755 index fe8a9973..00000000 --- a/contrib/devtools/test-symbol-check.py +++ /dev/null @@ -1,179 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2020-2022 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. -''' -Test script for symbol-check.py -''' -import os -import subprocess -from typing import List -import unittest - -from utils import determine_wellknown_cmd - -def call_symbol_check(cc: List[str], source, executable, options): - # This should behave the same as AC_TRY_LINK, so arrange well-known flags - # in the same order as autoconf would. - # - # See the definitions for ac_link in autoconf's lib/autoconf/c.m4 file for - # reference. - env_flags: List[str] = [] - for var in ['CFLAGS', 'CPPFLAGS', 'LDFLAGS']: - env_flags += filter(None, os.environ.get(var, '').split(' ')) - - subprocess.run([*cc,source,'-o',executable] + env_flags + options, check=True) - p = subprocess.run([os.path.join(os.path.dirname(__file__), 'symbol-check.py'), executable], stdout=subprocess.PIPE, text=True) - os.remove(source) - os.remove(executable) - return (p.returncode, p.stdout.rstrip()) - -def get_machine(cc: List[str]): - p = subprocess.run([*cc,'-dumpmachine'], stdout=subprocess.PIPE, text=True) - return p.stdout.rstrip() - -class TestSymbolChecks(unittest.TestCase): - def test_ELF(self): - source = 'test1.c' - executable = 'test1' - cc = determine_wellknown_cmd('CC', 'gcc') - - # -lutil is part of the libc6 package so a safe bet that it's installed - # it's also out of context enough that it's unlikely to ever become a real dependency - source = 'test2.c' - executable = 'test2' - with open(source, 'w', encoding="utf8") as f: - f.write(''' - #include - - int main() - { - login(0); - return 0; - } - ''') - - self.assertEqual(call_symbol_check(cc, source, executable, ['-lutil']), - (1, executable + ': libutil.so.1 is not in ALLOWED_LIBRARIES!\n' + - executable + ': failed LIBRARY_DEPENDENCIES')) - - # finally, check a simple conforming binary - source = 'test3.c' - executable = 'test3' - with open(source, 'w', encoding="utf8") as f: - f.write(''' - #include - - int main() - { - printf("42"); - return 0; - } - ''') - - self.assertEqual(call_symbol_check(cc, source, executable, []), - (0, '')) - - def test_MACHO(self): - source = 'test1.c' - executable = 'test1' - cc = determine_wellknown_cmd('CC', 'clang') - - with open(source, 'w', encoding="utf8") as f: - f.write(''' - #include - - int main() - { - XML_ExpatVersion(); - return 0; - } - - ''') - - self.assertEqual(call_symbol_check(cc, source, executable, ['-lexpat', '-Wl,-platform_version','-Wl,macos', '-Wl,11.4', '-Wl,11.4']), - (1, 'libexpat.1.dylib is not in ALLOWED_LIBRARIES!\n' + - f'{executable}: failed DYNAMIC_LIBRARIES MIN_OS SDK')) - - source = 'test2.c' - executable = 'test2' - with open(source, 'w', encoding="utf8") as f: - f.write(''' - #include - - int main() - { - CGMainDisplayID(); - return 0; - } - ''') - - self.assertEqual(call_symbol_check(cc, source, executable, ['-framework', 'CoreGraphics', '-Wl,-platform_version','-Wl,macos', '-Wl,11.4', '-Wl,11.4']), - (1, f'{executable}: failed MIN_OS SDK')) - - source = 'test3.c' - executable = 'test3' - with open(source, 'w', encoding="utf8") as f: - f.write(''' - int main() - { - return 0; - } - ''') - - self.assertEqual(call_symbol_check(cc, source, executable, ['-Wl,-platform_version','-Wl,macos', '-Wl,11.0', '-Wl,11.4']), - (1, f'{executable}: failed SDK')) - - def test_PE(self): - source = 'test1.c' - executable = 'test1.exe' - cc = determine_wellknown_cmd('CC', 'x86_64-w64-mingw32-gcc') - - with open(source, 'w', encoding="utf8") as f: - f.write(''' - #include - - int main() - { - PdhConnectMachineA(NULL); - return 0; - } - ''') - - self.assertEqual(call_symbol_check(cc, source, executable, ['-lpdh', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,1']), - (1, 'pdh.dll is not in ALLOWED_LIBRARIES!\n' + - executable + ': failed DYNAMIC_LIBRARIES')) - - source = 'test2.c' - executable = 'test2.exe' - - with open(source, 'w', encoding="utf8") as f: - f.write(''' - int main() - { - return 0; - } - ''') - - self.assertEqual(call_symbol_check(cc, source, executable, ['-Wl,--major-subsystem-version', '-Wl,9', '-Wl,--minor-subsystem-version', '-Wl,9']), - (1, executable + ': failed SUBSYSTEM_VERSION')) - - source = 'test3.c' - executable = 'test3.exe' - with open(source, 'w', encoding="utf8") as f: - f.write(''' - #include - - int main() - { - CoFreeUnusedLibrariesEx(0,0); - return 0; - } - ''') - - self.assertEqual(call_symbol_check(cc, source, executable, ['-lole32', '-Wl,--major-subsystem-version', '-Wl,6', '-Wl,--minor-subsystem-version', '-Wl,1']), - (0, '')) - - -if __name__ == '__main__': - unittest.main() diff --git a/contrib/devtools/test_deterministic_coverage.sh b/contrib/devtools/test_deterministic_coverage.sh deleted file mode 100755 index 8501c72f..00000000 --- a/contrib/devtools/test_deterministic_coverage.sh +++ /dev/null @@ -1,151 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# -# Test for deterministic coverage across unit test runs. - -export LC_ALL=C - -# Use GCOV_EXECUTABLE="gcov" if compiling with gcc. -# Use GCOV_EXECUTABLE="llvm-cov gcov" if compiling with clang. -GCOV_EXECUTABLE="gcov" - -# Disable tests known to cause non-deterministic behaviour and document the source or point of non-determinism. -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)) - "fs_tests/fsbridge_fstream" # deterministic test failure? - "miner_tests/CreateNewBlock_validity" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) - "scheduler_tests/manythreads" # scheduler.cpp: CScheduler::serviceQueue() - "scheduler_tests/singlethreadedscheduler_ordered" # scheduler.cpp: CScheduler::serviceQueue() - "txvalidationcache_tests/checkinputs_test" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) - "txvalidationcache_tests/tx_mempool_block_doublespend" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) - "txindex_tests/txindex_initial_sync" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) - "txvalidation_tests/tx_mempool_reject_coinbase" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) - "validation_block_tests/processnewblock_signals_ordering" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) - "wallet_tests/coin_mark_dirty_immature_credit" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) - "wallet_tests/dummy_input_size_test" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) - "wallet_tests/importmulti_rescan" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) - "wallet_tests/importwallet_rescan" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) - "wallet_tests/ListCoins" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) - "wallet_tests/scan_for_wallet_transactions" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) - "wallet_tests/wallet_disableprivkeys" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) -) - -TEST_BITCOIN_BINARY="src/test/test_bitcoin" - -print_usage() { - echo "Usage: $0 [custom test filter (default: all but known non-deterministic tests)] [number of test runs (default: 2)]" -} - -N_TEST_RUNS=2 -BOOST_TEST_RUN_FILTERS="" -if [[ $# != 0 ]]; then - if [[ $1 == "--help" ]]; then - print_usage - exit - fi - PARSED_ARGUMENTS=0 - if [[ $1 =~ [a-z] ]]; then - BOOST_TEST_RUN_FILTERS=$1 - PARSED_ARGUMENTS=$((PARSED_ARGUMENTS + 1)) - shift - fi - if [[ $1 =~ ^[0-9]+$ ]]; then - N_TEST_RUNS=$1 - PARSED_ARGUMENTS=$((PARSED_ARGUMENTS + 1)) - shift - fi - if [[ ${PARSED_ARGUMENTS} == 0 || $# -gt 2 || ${N_TEST_RUNS} -lt 2 ]]; then - print_usage - exit - fi -fi -if [[ ${BOOST_TEST_RUN_FILTERS} == "" ]]; then - BOOST_TEST_RUN_FILTERS="$(IFS=":"; echo "!${NON_DETERMINISTIC_TESTS[*]}" | sed 's/:/:!/g')" -else - echo "Using Boost test filter: ${BOOST_TEST_RUN_FILTERS}" - echo -fi - -if ! command -v gcov > /dev/null; then - echo "Error: gcov not installed. Exiting." - exit 1 -fi - -if ! command -v gcovr > /dev/null; then - echo "Error: gcovr not installed. Exiting." - exit 1 -fi - -if [[ ! -e ${TEST_BITCOIN_BINARY} ]]; then - echo "Error: Executable ${TEST_BITCOIN_BINARY} not found. Run \"./configure --enable-lcov\" and compile." - exit 1 -fi - -get_file_suffix_count() { - find src/ -type f -name "*.$1" | wc -l -} - -if [[ $(get_file_suffix_count gcno) == 0 ]]; then - echo "Error: Could not find any *.gcno files. The *.gcno files are generated by the compiler. Run \"./configure --enable-lcov\" and re-compile." - exit 1 -fi - -get_covr_filename() { - echo "gcovr.run-$1.txt" -} - -TEST_RUN_ID=0 -while [[ ${TEST_RUN_ID} -lt ${N_TEST_RUNS} ]]; do - TEST_RUN_ID=$((TEST_RUN_ID + 1)) - echo "[$(date +"%Y-%m-%d %H:%M:%S")] Measuring coverage, run #${TEST_RUN_ID} of ${N_TEST_RUNS}" - find src/ -type f -name "*.gcda" -exec rm {} \; - if [[ $(get_file_suffix_count gcda) != 0 ]]; then - echo "Error: Stale *.gcda files found. Exiting." - exit 1 - fi - TEST_OUTPUT_TEMPFILE=$(mktemp) - if ! BOOST_TEST_RUN_FILTERS="${BOOST_TEST_RUN_FILTERS}" ${TEST_BITCOIN_BINARY} > "${TEST_OUTPUT_TEMPFILE}" 2>&1; then - cat "${TEST_OUTPUT_TEMPFILE}" - rm "${TEST_OUTPUT_TEMPFILE}" - exit 1 - fi - rm "${TEST_OUTPUT_TEMPFILE}" - if [[ $(get_file_suffix_count gcda) == 0 ]]; then - echo "Error: Running the test suite did not create any *.gcda files. The gcda files are generated when the instrumented test programs are executed. Run \"./configure --enable-lcov\" and re-compile." - exit 1 - fi - GCOVR_TEMPFILE=$(mktemp) - if ! gcovr --gcov-executable "${GCOV_EXECUTABLE}" -r src/ > "${GCOVR_TEMPFILE}"; then - echo "Error: gcovr failed. Output written to ${GCOVR_TEMPFILE}. Exiting." - exit 1 - fi - GCOVR_FILENAME=$(get_covr_filename ${TEST_RUN_ID}) - mv "${GCOVR_TEMPFILE}" "${GCOVR_FILENAME}" - if grep -E "^TOTAL *0 *0 " "${GCOVR_FILENAME}"; then - echo "Error: Spurious gcovr output. Make sure the correct GCOV_EXECUTABLE variable is set in $0 (\"gcov\" for gcc, \"llvm-cov gcov\" for clang)." - exit 1 - fi - if [[ ${TEST_RUN_ID} != 1 ]]; then - COVERAGE_DIFF=$(diff -u "$(get_covr_filename 1)" "${GCOVR_FILENAME}") - if [[ ${COVERAGE_DIFF} != "" ]]; then - echo - echo "The line coverage is non-deterministic between runs. Exiting." - echo - echo "The test suite must be deterministic in the sense that the set of lines executed at least" - echo "once must be identical between runs. This is a necessary condition for meaningful" - echo "coverage measuring." - echo - echo "${COVERAGE_DIFF}" - exit 1 - fi - rm "${GCOVR_FILENAME}" - fi -done - -echo -echo "Coverage test passed: Deterministic coverage across ${N_TEST_RUNS} runs." -exit diff --git a/contrib/devtools/test_utxo_snapshots.sh b/contrib/devtools/test_utxo_snapshots.sh deleted file mode 100755 index 814ec33e..00000000 --- a/contrib/devtools/test_utxo_snapshots.sh +++ /dev/null @@ -1,209 +0,0 @@ -#!/usr/bin/env bash -# Demonstrate the creation and usage of UTXO snapshots. -# -# A server node starts up, IBDs up to a certain height, then generates a UTXO -# snapshot at that point. -# -# The server then downloads more blocks (to create a diff from the snapshot). -# -# We bring a client up, load the UTXO snapshot, and we show the client sync to -# the "network tip" and then start a background validation of the snapshot it -# loaded. We see the background validation chainstate removed after validation -# completes. -# -# The shellcheck rule SC2086 (quoted variables) disablements are necessary -# since this rule needs to be violated in order to get coordinated to pick up on -# $EARLY_IBD_FLAGS for the script to work. - -export LC_ALL=C -set -e - -BASE_HEIGHT=${1:-30000} -INCREMENTAL_HEIGHT=20000 -FINAL_HEIGHT=$((BASE_HEIGHT + INCREMENTAL_HEIGHT)) - -SERVER_DATADIR="$(pwd)/utxodemo-data-server-$BASE_HEIGHT" -CLIENT_DATADIR="$(pwd)/utxodemo-data-client-$BASE_HEIGHT" -UTXO_DAT_FILE="$(pwd)/utxo.$BASE_HEIGHT.dat" - -# Chosen to try to not interfere with any running coordinated processes. -SERVER_PORT=8633 -SERVER_RPC_PORT=8632 - -CLIENT_PORT=8733 -CLIENT_RPC_PORT=8732 - -SERVER_PORTS="-port=${SERVER_PORT} -rpcport=${SERVER_RPC_PORT}" -CLIENT_PORTS="-port=${CLIENT_PORT} -rpcport=${CLIENT_RPC_PORT}" - -# Ensure the client exercises all indexes to test that snapshot use works -# properly with indexes. -ALL_INDEXES="-txindex -coinstatsindex -blockfilterindex=1" - -if ! command -v jq >/dev/null ; then - echo "This script requires jq to parse JSON RPC output. Please install it." - echo "(e.g. sudo apt install jq)" - exit 1 -fi - -DUMP_OUTPUT="dumptxoutset-output-$BASE_HEIGHT.json" - -finish() { - echo - echo "Killing server and client PIDs ($SERVER_PID, $CLIENT_PID) and cleaning up datadirs" - echo - rm -f "$UTXO_DAT_FILE" "$DUMP_OUTPUT" - rm -rf "$SERVER_DATADIR" "$CLIENT_DATADIR" - kill -9 "$SERVER_PID" "$CLIENT_PID" -} - -trap finish EXIT - -# Need to specify these to trick client into accepting server as a peer -# it can IBD from, otherwise the default values prevent IBD from the server node. -EARLY_IBD_FLAGS="-maxtipage=9223372036854775207 -minimumchainwork=0x00" - -server_rpc() { - ./src/coordinate-cli -rpcport=$SERVER_RPC_PORT -datadir="$SERVER_DATADIR" "$@" -} -client_rpc() { - ./src/coordinate-cli -rpcport=$CLIENT_RPC_PORT -datadir="$CLIENT_DATADIR" "$@" -} -server_sleep_til_boot() { - while ! server_rpc ping >/dev/null 2>&1; do sleep 0.1; done -} -client_sleep_til_boot() { - while ! client_rpc ping >/dev/null 2>&1; do sleep 0.1; done -} -server_sleep_til_shutdown() { - while server_rpc ping >/dev/null 2>&1; do sleep 0.1; done -} - -mkdir -p "$SERVER_DATADIR" "$CLIENT_DATADIR" - -echo "Hi, welcome to the assumeutxo demo/test" -echo -echo "We're going to" -echo -echo " - start up a 'server' node, sync it via mainnet IBD to height ${BASE_HEIGHT}" -echo " - create a UTXO snapshot at that height" -echo " - IBD ${INCREMENTAL_HEIGHT} more blocks on top of that" -echo -echo "then we'll demonstrate assumeutxo by " -echo -echo " - starting another node (the 'client') and loading the snapshot in" -echo " * first you'll have to modify the code slightly (chainparams) and recompile" -echo " * don't worry, we'll make it easy" -echo " - observing the client sync ${INCREMENTAL_HEIGHT} blocks on top of the snapshot from the server" -echo " - observing the client validate the snapshot chain via background IBD" -echo -read -p "Press [enter] to continue" _ - -echo -echo "-- Starting the demo. You might want to run the two following commands in" -echo " separate terminal windows:" -echo -echo " watch -n0.1 tail -n 30 $SERVER_DATADIR/debug.log" -echo " watch -n0.1 tail -n 30 $CLIENT_DATADIR/debug.log" -echo -read -p "Press [enter] to continue" _ - -echo -echo "-- IBDing the blocks (height=$BASE_HEIGHT) required to the server node..." -# shellcheck disable=SC2086 -./src/coordinated -logthreadnames=1 $SERVER_PORTS \ - -datadir="$SERVER_DATADIR" $EARLY_IBD_FLAGS -stopatheight="$BASE_HEIGHT" >/dev/null - -echo -echo "-- Creating snapshot at ~ height $BASE_HEIGHT ($UTXO_DAT_FILE)..." -server_sleep_til_shutdown # wait for stopatheight to be hit -# shellcheck disable=SC2086 -./src/coordinated -logthreadnames=1 $SERVER_PORTS \ - -datadir="$SERVER_DATADIR" $EARLY_IBD_FLAGS -connect=0 -listen=0 >/dev/null & -SERVER_PID="$!" - -server_sleep_til_boot -server_rpc dumptxoutset "$UTXO_DAT_FILE" > "$DUMP_OUTPUT" -cat "$DUMP_OUTPUT" -kill -9 "$SERVER_PID" - -RPC_BASE_HEIGHT=$(jq -r .base_height < "$DUMP_OUTPUT") -RPC_AU=$(jq -r .txoutset_hash < "$DUMP_OUTPUT") -RPC_NCHAINTX=$(jq -r .nchaintx < "$DUMP_OUTPUT") -RPC_BLOCKHASH=$(jq -r .base_hash < "$DUMP_OUTPUT") - -server_sleep_til_shutdown - -echo -echo "-- Now: add the following to CMainParams::m_assumeutxo_data" -echo " in src/kernel/chainparams.cpp, and recompile:" -echo -echo " {${RPC_BASE_HEIGHT}, AssumeutxoHash{uint256S(\"0x${RPC_AU}\")}, ${RPC_NCHAINTX}, uint256S(\"0x${RPC_BLOCKHASH}\")}," -echo -echo -echo "-- IBDing more blocks to the server node (height=$FINAL_HEIGHT) so there is a diff between snapshot and tip..." -# shellcheck disable=SC2086 -./src/coordinated $SERVER_PORTS -logthreadnames=1 -datadir="$SERVER_DATADIR" \ - $EARLY_IBD_FLAGS -stopatheight="$FINAL_HEIGHT" >/dev/null - -echo -echo "-- Starting the server node to provide blocks to the client node..." -# shellcheck disable=SC2086 -./src/coordinated $SERVER_PORTS -logthreadnames=1 -debug=net -datadir="$SERVER_DATADIR" \ - $EARLY_IBD_FLAGS -connect=0 -listen=1 >/dev/null & -SERVER_PID="$!" -server_sleep_til_boot - -echo -echo "-- Okay, what you're about to see is the client starting up and activating the snapshot." -echo " I'm going to display the top 14 log lines from the client on top of an RPC called" -echo " getchainstates, which is like getblockchaininfo but for both the snapshot and " -echo " background validation chainstates." -echo -echo " You're going to first see the snapshot chainstate sync to the server's tip, then" -echo " the background IBD chain kicks in to validate up to the base of the snapshot." -echo -echo " Once validation of the snapshot is done, you should see log lines indicating" -echo " that we've deleted the background validation chainstate." -echo -echo " Once everything completes, exit the watch command with CTRL+C." -echo -read -p "When you're ready for all this, hit [enter]" _ - -echo -echo "-- Starting the client node to get headers from the server, then load the snapshot..." -# shellcheck disable=SC2086 -./src/coordinated $CLIENT_PORTS $ALL_INDEXES -logthreadnames=1 -datadir="$CLIENT_DATADIR" \ - -connect=0 -addnode=127.0.0.1:$SERVER_PORT -debug=net $EARLY_IBD_FLAGS >/dev/null & -CLIENT_PID="$!" -client_sleep_til_boot - -echo -echo "-- Initial state of the client:" -client_rpc getchainstates - -echo -echo "-- Loading UTXO snapshot into client..." -client_rpc loadtxoutset "$UTXO_DAT_FILE" - -watch -n 0.3 "( tail -n 14 $CLIENT_DATADIR/debug.log ; echo ; ./src/coordinate-cli -rpcport=$CLIENT_RPC_PORT -datadir=$CLIENT_DATADIR getchainstates) | cat" - -echo -echo "-- Okay, now I'm going to restart the client to make sure that the snapshot chain reloads " -echo " as the main chain properly..." -echo -echo " Press CTRL+C after you're satisfied to exit the demo" -echo -read -p "Press [enter] to continue" - -client_sleep_til_boot -# shellcheck disable=SC2086 -./src/coordinated $CLIENT_PORTS $ALL_INDEXES -logthreadnames=1 -datadir="$CLIENT_DATADIR" -connect=0 \ - -addnode=127.0.0.1:$SERVER_PORT "$EARLY_IBD_FLAGS" >/dev/null & -CLIENT_PID="$!" -client_sleep_til_boot - -watch -n 0.3 "( tail -n 14 $CLIENT_DATADIR/debug.log ; echo ; ./src/coordinate-cli -rpcport=$CLIENT_RPC_PORT -datadir=$CLIENT_DATADIR getchainstates) | cat" - -echo -echo "-- Done!" diff --git a/contrib/devtools/utils.py b/contrib/devtools/utils.py index 68ad1c3a..8b4c67c6 100755 --- a/contrib/devtools/utils.py +++ b/contrib/devtools/utils.py @@ -8,10 +8,9 @@ import shutil import sys import os -from typing import List -def determine_wellknown_cmd(envvar, progname) -> List[str]: +def determine_wellknown_cmd(envvar, progname) -> list[str]: maybe_env = os.getenv(envvar) maybe_which = shutil.which(progname) if maybe_env: diff --git a/contrib/devtools/utxo_snapshot.sh b/contrib/devtools/utxo_snapshot.sh deleted file mode 100755 index cfc43b5a..00000000 --- a/contrib/devtools/utxo_snapshot.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 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. -# -export LC_ALL=C - -set -ueo pipefail - -if (( $# < 3 )); then - echo 'Usage: utxo_snapshot.sh ' - echo - echo " if is '-', don't produce a snapshot file but instead print the " - echo " expected assumeutxo hash" - echo - echo 'Examples:' - echo - echo " ./contrib/devtools/utxo_snapshot.sh 570000 utxo.dat ./src/coordinate-cli -datadir=\$(pwd)/testdata" - echo ' ./contrib/devtools/utxo_snapshot.sh 570000 - ./src/coordinate-cli' - exit 1 -fi - -GENERATE_AT_HEIGHT="${1}"; shift; -OUTPUT_PATH="${1}"; shift; -# Most of the calls we make take a while to run, so pad with a lengthy timeout. -COORDINATE_CLI_CALL="${*} -rpcclienttimeout=9999999" - -# Block we'll invalidate/reconsider to rewind/fast-forward the chain. -PIVOT_BLOCKHASH=$($COORDINATE_CLI_CALL getblockhash $(( GENERATE_AT_HEIGHT + 1 )) ) - -(>&2 echo "Rewinding chain back to height ${GENERATE_AT_HEIGHT} (by invalidating ${PIVOT_BLOCKHASH}); this may take a while") -${COORDINATE_CLI_CALL} invalidateblock "${PIVOT_BLOCKHASH}" - -if [[ "${OUTPUT_PATH}" = "-" ]]; then - (>&2 echo "Generating txoutset info...") - ${COORDINATE_CLI_CALL} gettxoutsetinfo | grep hash_serialized_3 | sed 's/^.*: "\(.\+\)\+",/\1/g' -else - (>&2 echo "Generating UTXO snapshot...") - ${COORDINATE_CLI_CALL} dumptxoutset "${OUTPUT_PATH}" -fi - -(>&2 echo "Restoring chain to original height; this may take a while") -${COORDINATE_CLI_CALL} reconsiderblock "${PIVOT_BLOCKHASH}" diff --git a/contrib/guix/INSTALL.md b/contrib/guix/INSTALL.md index 49e92acd..f9a79f66 100644 --- a/contrib/guix/INSTALL.md +++ b/contrib/guix/INSTALL.md @@ -18,10 +18,10 @@ Otherwise, you may choose from one of the following options to install Guix: - Works on nearly all Linux distributions - Installs any release - Binary installation only, requires high level of trust -3. Using fanquake's **Docker image** [↗︎ external instructions][install-fanquake-docker] +3. Using fanquake's **container image** [↗︎ external instructions][install-fanquake-container] - Maintained by fanquake - Easy (automatically performs *some* setup) - - Works wherever Docker images work + - Works wherever container images work (Docker/Podman) - Installs any release - Binary installation only, requires high level of trust 4. Using a **distribution-maintained package** [⤓ skip to section][install-distro-pkg] @@ -57,14 +57,11 @@ Regardless of which installation option you chose, the changes to `/etc/profile.d` will not take effect until the next shell or desktop session, so you should log out and log back in. -## Option 3: Using fanquake's Docker image +## Option 3: Using fanquake's container image Please refer to fanquake's instructions [here](https://github.com/fanquake/core-review/tree/master/guix). -Note that the `Dockerfile` is largely equivalent to running through the binary -tarball installation steps. - ## Option 4: Using a distribution-maintained package Note that this section is based on the distro packaging situation at the time of @@ -74,25 +71,15 @@ https://repology.org/project/guix/versions ### Debian / Ubuntu -Guix v1.2.0 is available as a distribution package starting in [Debian -11](https://packages.debian.org/bullseye/guix) and [Ubuntu -21.04](https://packages.ubuntu.com/search?keywords=guix). - -Note that if you intend on using Guix without using any substitutes (more -details [here][security-model]), v1.2.0 has a known problem when building GnuTLS -from source. Solutions and workarounds are documented -[here](#gnutls-test-suite-fail-status-request-revoked). - +Guix is available as a distribution package in [Debian +](https://packages.debian.org/search?keywords=guix) and [Ubuntu +](https://packages.ubuntu.com/search?keywords=guix). To install: ```sh sudo apt install guix ``` -For up-to-date information on Debian and Ubuntu's release history: -- [Debian release history](https://www.debian.org/releases/) -- [Ubuntu release history](https://ubuntu.com/about/release-cycle) - ### Arch Linux Guix is available in the AUR as @@ -167,80 +154,41 @@ For reference, the graphic below outlines Guix v1.3.0's dependency graph: ![bootstrap map](https://user-images.githubusercontent.com/6399679/125064185-a9a59880-e0b0-11eb-82c1-9b8e5dc9950d.png) -#### Consider /tmp on tmpfs - -If you use an NVME (SSD) drive, you may encounter [cryptic build errors](#coreutils-fail-teststail-2inotify-dir-recreate). Mounting a [tmpfs at /tmp](https://ubuntu.com/blog/data-driven-analysis-tmp-on-tmpfs) should prevent this and may improve performance as a bonus. - -#### Guile - -##### Choosing a Guile version and sticking to it - -One of the first things you need to decide is which Guile version you want to -use: Guile v2.2 or Guile v3.0. Unlike the python2 to python3 transition, Guile -v2.2 and Guile v3.0 are largely compatible, as evidenced by the fact that most -Guile packages and even [Guix -itself](https://guix.gnu.org/en/blog/2020/guile-3-and-guix/) support running on -both. - -What is important here is that you **choose one**, and you **remain consistent** -with your choice throughout **all Guile-related packages**, no matter if they -are installed via the distribution's package manager or installed from source. -This is because the files for Guile packages are installed to directories which -are separated based on the Guile version. - -###### Example: Checking that Ubuntu's `guile-git` is compatible with your chosen Guile version - -On Ubuntu Focal: +If you do not care about building each dependency from source, and Guix is +already packaged for your distribution, you can easily install only the build +dependencies of Guix. For example, to enable deb-src and install the Guix build +dependencies on Ubuntu/Debian: ```sh -$ apt show guile-git -Package: guile-git -... -Depends: guile-2.2, guile-bytestructures, libgit2-dev -... +sed -i 's|# deb-src|deb-src|g' /etc/apt/sources.list +apt update +apt-get build-dep -y guix ``` -As you can see, the package `guile-git` depends on `guile-2.2`, meaning that it -was likely built for Guile v2.2. This means that if you decided to use Guile -v3.0 on Ubuntu Focal, you would need to build guile-git from source instead of -using the distribution package. +If this succeeded, you can likely skip to section +["Building and Installing Guix itself"](#building-and-installing-guix-itself). -On Ubuntu Hirsute: - -```sh -$ apt show guile-git -Package: guile-git -... -Depends: guile-3.0 | guile-2.2, guile-bytestructures (>= 1.0.7-3~), libgit2-dev (>= 1.0) -... -``` - -In this case, `guile-git` depends on either `guile-3.0` or `guile-2.2`, meaning -that it would work no matter what Guile version you decided to use. +#### Guile ###### Corner case: Multiple versions of Guile on one system -It is recommended to only install one version of Guile, so that build systems do +It is recommended to only install the required version of Guile, so that build systems do not get confused about which Guile to use. -However, if you insist on having both Guile v2.2 and Guile v3.0 installed on -your system, then you need to **consistently** specify one of -`GUILE_EFFECTIVE_VERSION=3.0` or `GUILE_EFFECTIVE_VERSION=2.2` to all +However, if you insist on having more versions of Guile installed on +your system, then you need to **consistently** specify +`GUILE_EFFECTIVE_VERSION=3.0` to all `./configure` invocations for Guix and its dependencies. ##### Installing Guile -Guile is most likely already packaged for your distribution, so after you have -[chosen a Guile version](#choosing-a-guile-version-and-sticking-to-it), install -it via your distribution's package manager. - If your distribution splits packages into `-dev`-suffixed and non-`-dev`-suffixed sub-packages (as is the case for Debian-derived distributions), please make sure to install both. For example, to install Guile -v2.2 on Debian/Ubuntu: +v3.0 on Debian/Ubuntu: ```sh -apt install guile-2.2 guile-2.2-dev +apt install guile-3.0 guile-3.0-dev ``` #### Mixing distribution packages and source-built packages @@ -258,16 +206,16 @@ source-built packages, you will need to augment the `GUILE_LOAD_PATH` and `GUILE_LOAD_COMPILED_PATH` environment variables so that Guile will look under the right prefix and find your source-built packages. -For example, if you are using Guile v2.2, and have Guile packages in the +For example, if you are using Guile v3.0, and have Guile packages in the `/usr/local` prefix, either add the following lines to your `.profile` or `.bash_profile` so that the environment variable is properly set for all future shell logins, or paste the lines into a POSIX-style shell to temporarily modify the environment variables of your current shell session. ```sh -# Help Guile v2.2.x find packages in /usr/local -export GUILE_LOAD_PATH="/usr/local/share/guile/site/2.2${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH" -export GUILE_LOAD_COMPILED_PATH="/usr/local/lib/guile/2.2/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_COMPILED_LOAD_PATH" +# Help Guile v3.0.x find packages in /usr/local +export GUILE_LOAD_PATH="/usr/local/share/guile/site/3.0${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH" +export GUILE_LOAD_COMPILED_PATH="/usr/local/lib/guile/3.0/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_COMPILED_LOAD_PATH" ``` Note that these environment variables are used to check for packages during @@ -352,7 +300,7 @@ Relevant for: - Those installing `guile-git` from their distribution where `guile-git` is built against `libgit2 < 1.1` -As of v0.4.0, `guile-git` claims to only require `libgit2 >= 0.28.0`, however, +As of v0.5.2, `guile-git` claims to only require `libgit2 >= 0.28.0`, however, it actually requires `libgit2 >= 1.1`, otherwise, it will be confused by a reference of `origin/keyring`: instead of interpreting the reference as "the 'keyring' branch of the 'origin' remote", the reference is interpreted as "the @@ -366,33 +314,17 @@ Should you be in this situation, you need to build both `libgit2 v1.1.x` and Source: https://logs.guix.gnu.org/guix/2020-11-12.log#232527 -##### `{scheme,guile}-bytestructures` v1.0.8 and v1.0.9 are broken for Guile v2.2 - -Relevant for: -- Those building `{scheme,guile}-bytestructures` from source against Guile v2.2 - -Commit -[707eea3](https://github.com/TaylanUB/scheme-bytestructures/commit/707eea3a85e1e375e86702229ebf73d496377669) -introduced a regression for Guile v2.2 and was first included in v1.0.8, this -was later corrected in commit -[ec9a721](https://github.com/TaylanUB/scheme-bytestructures/commit/ec9a721957c17bcda13148f8faa5f06934431ff7) -and included in v1.1.0. - -TL;DR If you decided to use Guile v2.2, do not use `{scheme,guile}-bytestructures` v1.0.8 or v1.0.9. - ### Building and Installing Guix itself Start by cloning Guix: ``` -git clone https://git.savannah.gnu.org/git/guix.git +git clone https://codeberg.org/guix/guix.git cd guix ``` -You will likely want to build the latest release, however, if the latest release -when you're reading this is still 1.3.0 then you may want to use 998eda30 instead -to avoid the issues described in [#25099]( -https://github.com/bitcoin/bitcoin/pull/25099). +You will likely want to build the latest release. +At the time of writing (November 2023), the latest release was `v1.4.0`. ``` git branch -a -l 'origin/version-*' # check for the latest release @@ -483,7 +415,7 @@ make it "what Guix intended", then read the next few subsections. This section definitely does not apply to you if you installed Guix using: 1. The shell installer script -2. fanquake's Docker image +2. fanquake's container image 3. Debian's `guix` package #### Background @@ -524,7 +456,7 @@ Alternately, see `guix package --search-paths -p "$HOME/.guix-profile"'. However, this is somewhat tedious to do for both `guix pull` and `guix install` for each user on the system that wants to properly use `guix`. I recommend that -you instead add an entry to `/etc/profile.d` instead. This is done by default +you add an entry to `/etc/profile.d` instead. This is done by default when installing the Debian package later than 1.2.0-4 and when using the shell script installer. @@ -675,7 +607,7 @@ checklist. ``` Generation 38 Feb 22 2021 16:39:31 (current) guix f350df4 - repository URL: https://git.savannah.gnu.org/git/guix.git + repository URL: https://codeberg.org/guix/guix.git branch: version-1.2.0 commit: f350df405fbcd5b9e27e6b6aa500da7f101f41e7 ``` @@ -726,26 +658,20 @@ $ bzcat /var/log/guix/drvs/../...-foo-3.6.12.drv.bz2 | less times, it may be `/tmp/...drv-1` or `/tmp/...drv-2`. Always consult the build failure output for the most accurate, up-to-date information. -### openssl-1.1.1l and openssl-1.1.1n - -OpenSSL includes tests that will fail once some certificate has expired. A workaround -is to change your system clock: - -```sh -sudo timedatectl set-ntp no -sudo date --set "28 may 2022 15:00:00" -sudo --login guix build --cores=1 /gnu/store/g9alz81w4q03ncm542487xd001s6akd4-openssl-1.1.1l.drv -sudo --login guix build --cores=1 /gnu/store/mw6ax0gk33gh082anrdrxp2flrbskxv6-openssl-1.1.1n.drv -sudo timedatectl set-ntp yes -``` - ### python(-minimal): [Errno 84] Invalid or incomplete multibyte or wide character This error occurs when your `$TMPDIR` (default: /tmp) exists on a filesystem which rejects characters not present in the UTF-8 character code set. An example is ZFS with the utf8only=on option set. -More information: https://bugs.python.org/issue37584 +More information: https://github.com/python/cpython/issues/81765 + +### openssl-1.1.1l and openssl-1.1.1n + +OpenSSL includes tests that will fail once some certificate has expired. +The workarounds from the GnuTLS section immediately below can be used. + +For openssl-1.1.1l use 2022-05-01 as the date. ### GnuTLS: test-suite FAIL: status-request-revoked @@ -781,13 +707,42 @@ authorized. This workaround was described [here](https://issues.guix.gnu.org/44559#5). Basically: -1. Turn off networking -2. Turn off NTP -3. Set system time to 2020-10-01 -4. guix build --no-substitutes /gnu/store/vhphki5sg9xkdhh2pbc8gi6vhpfzryf0-gnutls-3.6.12.drv -5. Set system time back to accurate current time -6. Turn NTP back on -7. Turn networking back on + +1. Turn off NTP +2. Set system time to 2020-10-01 +3. guix build --no-substitutes /gnu/store/vhphki5sg9xkdhh2pbc8gi6vhpfzryf0-gnutls-3.6.12.drv +4. Set system time back to accurate current time +5. Turn NTP back on + +For example, + +```sh +sudo timedatectl set-ntp no +sudo date --set "01 oct 2020 15:00:00" +guix build /gnu/store/vhphki5sg9xkdhh2pbc8gi6vhpfzryf0-gnutls-3.6.12.drv +sudo timedatectl set-ntp yes +``` + +#### Workaround 3: Disable the tests in the Guix source code for this single derivation + +If all of the above workarounds fail, you can also disable the `tests` phase of +the derivation via the `arguments` option, as described in the official +[`package` +reference](https://guix.gnu.org/manual/en/html_node/package-Reference.html). + +For example, to disable the openssl-1.1 check phase: + +```diff +diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm +index f1e844b..1077c4b 100644 +--- a/gnu/packages/tls.scm ++++ b/gnu/packages/tls.scm +@@ -494,4 +494,5 @@ (define-public openssl-1.1 + (arguments + `(#:parallel-tests? #f ++ #:tests? #f + #:test-target "test" +``` ### coreutils: FAIL: tests/tail-2/inotify-dir-recreate @@ -796,7 +751,7 @@ The inotify-dir-create test fails on "remote" filesystems such as overlayfs as non-remote. A relatively easy workaround to this is to make sure that a somewhat traditional -filesystem is mounted at `/tmp` (where `guix-daemon` performs its builds), see [/tmp on tmpfs](#consider-tmp-on-tmpfs). For +filesystem is mounted at `/tmp` (where `guix-daemon` performs its builds). For Docker users, this might mean [using a volume][docker/volumes], [binding mounting][docker/bind-mnt] from host, or (for those with enough RAM and swap) [mounting a tmpfs][docker/tmpfs] using the `--tmpfs` flag. @@ -805,13 +760,13 @@ Please see the following links for more details: - An upstream coreutils bug has been filed: [debbugs#47940](https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47940) - A Guix bug detailing the underlying problem has been filed: [guix-issues#47935](https://issues.guix.gnu.org/47935), [guix-issues#49985](https://issues.guix.gnu.org/49985#5) -- A commit to skip this test in Guix has been merged into the core-updates branch: -[savannah/guix@6ba1058](https://git.savannah.gnu.org/cgit/guix.git/commit/?id=6ba1058df0c4ce5611c2367531ae5c3cdc729ab4) +- A commit to skip this test is included since Guix 1.4.0: +[codeberg/guix@6ba1058](https://codeberg.org/guix/guix/commit/6ba1058df0c4ce5611c2367531ae5c3cdc729ab4) [install-script]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball [install-bin-tarball]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball -[install-fanquake-docker]: #option-3-using-fanquakes-docker-image +[install-fanquake-container]: #option-3-using-fanquakes-container-image [install-distro-pkg]: #option-4-using-a-distribution-maintained-package [install-source]: #option-5-building-from-source diff --git a/contrib/guix/README.md b/contrib/guix/README.md index c0feb486..7f6b8232 100644 --- a/contrib/guix/README.md +++ b/contrib/guix/README.md @@ -11,7 +11,7 @@ We achieve bootstrappability by using Guix as a functional package manager. # Requirements -Conservatively, you will need an x86_64 machine with: +Conservatively, you will need: - 16GB of free disk space on the partition that /gnu/store will reside in - 8GB of free disk space **per platform triple** you're planning on building @@ -31,7 +31,7 @@ section](#choosing-your-security-model) before proceeding to perform a build. In order to perform a build for macOS (which is included in the default set of platform triples to build), you'll need to extract the macOS SDK tarball using -tools found in the [`macdeploy` directory](../macdeploy/README.md). +tools found in the [`macdeploy` directory](../macdeploy/README.md#sdk-extraction). You can then either point to the SDK using the `SDK_PATH` environment variable: @@ -68,7 +68,7 @@ following from the top of a clean repository: The `guix-codesign` command attaches codesignatures (produced by codesigners) to existing non-codesigned outputs. Please see the [release process -documentation](/doc/release-process.md) for more context. +documentation](/doc/release-process.md#codesigning) for more context. It respects many of the same environment variable flags as `guix-build`, with 2 crucial differences: @@ -247,7 +247,7 @@ details. * _**SDK_PATH**_ Set the path where _extracted_ SDKs can be found. This is passed through to - the depends tree. Note that this is should be set to the _parent_ directory of + the depends tree. Note that this should be set to the _parent_ directory of the actual SDK (e.g. `SDK_PATH=$HOME/Downloads/macOS-SDKs` instead of `$HOME/Downloads/macOS-SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers`). @@ -259,8 +259,9 @@ details. Override the number of jobs to run simultaneously, you might want to do so on a memory-limited machine. This may be passed to: - - `guix` build commands as in `guix environment --cores="$JOBS"` + - `guix` build commands as in `guix shell --cores="$JOBS"` - `make` as in `make --jobs="$JOBS"` + - `cmake` as in `cmake --build build -j "$JOBS"` - `xargs` as in `xargs -P"$JOBS"` See [here](#controlling-the-number-of-threads-used-by-guix-build-commands) for @@ -301,7 +302,7 @@ details. * _**ADDITIONAL_GUIX_ENVIRONMENT_FLAGS**_ - Additional flags to be passed to the invocation of `guix environment` inside + Additional flags to be passed to the invocation of `guix shell` inside `guix time-machine`. # Choosing your security model @@ -364,12 +365,6 @@ Where `` is likely: - `/usr/local` if you installed Guix from source and didn't supply any prefix-modifying flags to Guix's `./configure` -For dongcarl's substitute server at https://guix.carldong.io, run as root: - -```sh -wget -qO- 'https://guix.carldong.io/signing-key.pub' | guix archive --authorize -``` - #### Removing authorized keys To remove previously authorized keys, simply edit `/etc/guix/acl` and remove the @@ -381,28 +376,28 @@ Once its key is authorized, the official Guix build farm at https://ci.guix.gnu.org is automatically used unless the `--no-substitutes` flag is supplied. This default list of substitute servers is overridable both on a `guix-daemon` level and when you invoke `guix` commands. See examples below for -the various ways of adding dongcarl's substitute server after having [authorized -his signing key](#step-1-authorize-the-signing-keys). +the various ways of adding a substitute server after having [authorized +its signing key](#step-1-authorize-the-signing-keys). Change the **default list** of substitute servers by starting `guix-daemon` with the `--substitute-urls` option (you will likely need to edit your init script): ```sh -guix-daemon --substitute-urls='https://guix.carldong.io https://ci.guix.gnu.org' +guix-daemon --substitute-urls='https://bordeaux.guix.gnu.org https://ci.guix.gnu.org' ``` Override the default list of substitute servers by passing the `--substitute-urls` option for invocations of `guix` commands: ```sh -guix --substitute-urls='https://guix.carldong.io https://ci.guix.gnu.org' +guix --substitute-urls='https://bordeaux.guix.gnu.org https://ci.guix.gnu.org' ``` For scripts under `./contrib/guix`, set the `SUBSTITUTE_URLS` environment variable: ```sh -export SUBSTITUTE_URLS='https://guix.carldong.io https://ci.guix.gnu.org' +export SUBSTITUTE_URLS='https://bordeaux.guix.gnu.org https://ci.guix.gnu.org' ``` ## Option 2: Disabling substitutes on an ad-hoc basis diff --git a/contrib/guix/guix-build b/contrib/guix/guix-build index 74b24b96..ee285bf3 100755 --- a/contrib/guix/guix-build +++ b/contrib/guix/guix-build @@ -69,12 +69,19 @@ fi mkdir -p "$VERSION_BASE" +################ +# SOURCE_DATE_EPOCH should not unintentionally be set +################ + +check_source_date_epoch + ################ # Build directories should not exist ################ # Default to building for all supported HOSTs (overridable by environment) -export HOSTS="${HOSTS:-x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu powerpc64-linux-gnu powerpc64le-linux-gnu +# powerpc64le-linux-gnu currently disabled due non-determinism issues across build arches. +export HOSTS="${HOSTS:-x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu powerpc64-linux-gnu x86_64-w64-mingw32 x86_64-apple-darwin arm64-apple-darwin}" @@ -360,12 +367,16 @@ INFO: Building ${VERSION:?not set} for platform triple ${HOST:?not set}: ...bind-mounted in container to: '$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")' ...outputting in: '$(outdir_for_host "$HOST")' ...bind-mounted in container to: '$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST")' + ADDITIONAL FLAGS (if set) + ADDITIONAL_GUIX_COMMON_FLAGS: ${ADDITIONAL_GUIX_COMMON_FLAGS} + ADDITIONAL_GUIX_ENVIRONMENT_FLAGS: ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} + ADDITIONAL_GUIX_TIMEMACHINE_FLAGS: ${ADDITIONAL_GUIX_TIMEMACHINE_FLAGS} EOF # Run the build script 'contrib/guix/libexec/build.sh' in the build # container specified by 'contrib/guix/manifest.scm'. # - # Explanation of `guix environment` flags: + # Explanation of `guix shell` flags: # # --container run command within an isolated container # @@ -428,7 +439,7 @@ EOF # more information. # # shellcheck disable=SC2086,SC2031 - time-machine environment --manifest="${PWD}/contrib/guix/manifest.scm" \ + time-machine shell --manifest="${PWD}/contrib/guix/manifest.scm" \ --container \ --pure \ --no-cwd \ diff --git a/contrib/guix/guix-codesign b/contrib/guix/guix-codesign index 3279d431..ac7aae3a 100755 --- a/contrib/guix/guix-codesign +++ b/contrib/guix/guix-codesign @@ -67,6 +67,12 @@ EOF exit 1 fi +################ +# SOURCE_DATE_EPOCH should not unintentionally be set +################ + +check_source_date_epoch + ################ # The codesignature git worktree should not be dirty ################ @@ -137,7 +143,7 @@ fi ################ -# Unsigned tarballs SHOULD exist +# Codesigning tarballs SHOULD exist ################ # Usage: outdir_for_host HOST SUFFIX @@ -149,13 +155,13 @@ outdir_for_host() { } -unsigned_tarball_for_host() { +codesigning_tarball_for_host() { case "$1" in *mingw*) - echo "$(outdir_for_host "$1")/${DISTNAME}-win64-unsigned.tar.gz" + echo "$(outdir_for_host "$1")/${DISTNAME}-win64-codesigning.tar.gz" ;; *darwin*) - echo "$(outdir_for_host "$1")/${DISTNAME}-${1}-unsigned.tar.gz" + echo "$(outdir_for_host "$1")/${DISTNAME}-${1}-codesigning.tar.gz" ;; *) exit 1 @@ -164,22 +170,22 @@ unsigned_tarball_for_host() { } # Accumulate a list of build directories that already exist... -hosts_unsigned_tarball_missing="" +hosts_codesigning_tarball_missing="" for host in $HOSTS; do - if [ ! -e "$(unsigned_tarball_for_host "$host")" ]; then - hosts_unsigned_tarball_missing+=" ${host}" + if [ ! -e "$(codesigning_tarball_for_host "$host")" ]; then + hosts_codesigning_tarball_missing+=" ${host}" fi done -if [ -n "$hosts_unsigned_tarball_missing" ]; then +if [ -n "$hosts_codesigning_tarball_missing" ]; then # ...so that we can print them out nicely in an error message cat << EOF -ERR: Unsigned tarballs do not exist +ERR: Codesigning tarballs do not exist ... EOF -for host in $hosts_unsigned_tarball_missing; do - echo " ${host} '$(unsigned_tarball_for_host "$host")'" +for host in $hosts_codesigning_tarball_missing; do + echo " ${host} '$(codesigning_tarball_for_host "$host")'" done exit 1 fi @@ -286,7 +292,7 @@ EOF # Run the build script 'contrib/guix/libexec/build.sh' in the build # container specified by 'contrib/guix/manifest.scm'. # - # Explanation of `guix environment` flags: + # Explanation of `guix shell` flags: # # --container run command within an isolated container # @@ -343,7 +349,7 @@ EOF # more information. # # shellcheck disable=SC2086,SC2031 - time-machine environment --manifest="${PWD}/contrib/guix/manifest.scm" \ + time-machine shell --manifest="${PWD}/contrib/guix/manifest.scm" \ --container \ --pure \ --no-cwd \ @@ -371,7 +377,7 @@ EOF OUTDIR="$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST" codesigned)" \ DIST_ARCHIVE_BASE=/outdir-base/dist-archive \ DETACHED_SIGS_REPO=/detached-sigs \ - UNSIGNED_TARBALL="$(OUTDIR_BASE=/outdir-base && unsigned_tarball_for_host "$HOST")" \ + CODESIGNING_TARBALL="$(OUTDIR_BASE=/outdir-base && codesigning_tarball_for_host "$HOST")" \ bash -c "cd /bitcoin && bash contrib/guix/libexec/codesign.sh" ) diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index c49553be..2b47e164 100755 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -8,7 +8,7 @@ export TZ=UTC # Although Guix _does_ set umask when building its own packages (in our case, # this is all packages in manifest.scm), it does not set it for `guix -# environment`. It does make sense for at least `guix environment --container` +# shell`. It does make sense for at least `guix shell --container` # to set umask, so if that change gets merged upstream and we bump the # time-machine to a commit which includes the aforementioned change, we can # remove this line. @@ -61,7 +61,6 @@ store_path() { # Set environment variables to point the NATIVE toolchain to the right # includes/libs NATIVE_GCC="$(store_path gcc-toolchain)" -NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)" unset LIBRARY_PATH unset CPATH @@ -70,11 +69,18 @@ unset CPLUS_INCLUDE_PATH unset OBJC_INCLUDE_PATH unset OBJCPLUS_INCLUDE_PATH -export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC_STATIC}/lib" -export C_INCLUDE_PATH="${NATIVE_GCC}/include" -export CPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include" -export OBJC_INCLUDE_PATH="${NATIVE_GCC}/include" -export OBJCPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include" +# Set native toolchain +build_CC="${NATIVE_GCC}/bin/gcc -isystem ${NATIVE_GCC}/include" +build_CXX="${NATIVE_GCC}/bin/g++ -isystem ${NATIVE_GCC}/include/c++ -isystem ${NATIVE_GCC}/include" + +case "$HOST" in + *darwin*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;; # Required for qt/qmake + *mingw*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;; + *) + NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)" + export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC_STATIC}/lib" + ;; +esac # Set environment variables to point the CROSS toolchain to the right # includes/libs for $HOST @@ -126,24 +132,12 @@ for p in "${PATHS[@]}"; do done # Disable Guix ld auto-rpath behavior -case "$HOST" in - *darwin*) - # The auto-rpath behavior is necessary for darwin builds as some native - # tools built by depends refer to and depend on Guix-built native - # libraries - # - # After the native packages in depends are built, the ld wrapper should - # no longer affect our build, as clang would instead reach for - # x86_64-apple-darwin-ld from cctools - ;; - *) export GUIX_LD_WRAPPER_DISABLE_RPATH=yes ;; -esac +export GUIX_LD_WRAPPER_DISABLE_RPATH=yes # Make /usr/bin if it doesn't exist [ -e /usr/bin ] || mkdir -p /usr/bin -# Symlink file and env to a conventional path -[ -e /usr/bin/file ] || ln -s --no-dereference "$(command -v file)" /usr/bin/file +# Symlink env to a conventional path [ -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 @@ -166,16 +160,6 @@ esac # Environment variables for determinism export TAR_OPTIONS="--owner=0 --group=0 --numeric-owner --mtime='@${SOURCE_DATE_EPOCH}' --sort=name" export TZ="UTC" -case "$HOST" in - *darwin*) - # cctools AR, unlike GNU binutils AR, does not have a deterministic mode - # or a configure flag to enable determinism by default, it only - # understands if this env-var is set or not. See: - # - # https://github.com/tpoechtrager/cctools-port/blob/55562e4073dea0fbfd0b20e0bf69ffe6390c7f97/cctools/ar/archive.c#L334 - export ZERO_AR_DATE=yes - ;; -esac #################### # Depends Building # @@ -187,14 +171,21 @@ make -C depends --jobs="$JOBS" HOST="$HOST" \ ${SOURCES_PATH+SOURCES_PATH="$SOURCES_PATH"} \ ${BASE_CACHE+BASE_CACHE="$BASE_CACHE"} \ ${SDK_PATH+SDK_PATH="$SDK_PATH"} \ + ${build_CC+build_CC="$build_CC"} \ + ${build_CXX+build_CXX="$build_CXX"} \ x86_64_linux_CC=x86_64-linux-gnu-gcc \ x86_64_linux_CXX=x86_64-linux-gnu-g++ \ x86_64_linux_AR=x86_64-linux-gnu-gcc-ar \ x86_64_linux_RANLIB=x86_64-linux-gnu-gcc-ranlib \ x86_64_linux_NM=x86_64-linux-gnu-gcc-nm \ - x86_64_linux_STRIP=x86_64-linux-gnu-strip \ - FORCE_USE_SYSTEM_CLANG=1 + x86_64_linux_STRIP=x86_64-linux-gnu-strip +case "$HOST" in + *darwin*) + # Unset now that Qt is built + unset LIBRARY_PATH + ;; +esac ########################### # Source Tarball Building # @@ -215,13 +206,12 @@ mkdir -p "$OUTDIR" ########################### # CONFIGFLAGS -CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests --disable-fuzz-binary" +CONFIGFLAGS="-DREDUCE_EXPORTS=ON -DBUILD_BENCH=OFF -DBUILD_GUI_TESTS=OFF -DBUILD_FUZZ_BINARY=OFF" # CFLAGS HOST_CFLAGS="-O2 -g" HOST_CFLAGS+=$(find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;) case "$HOST" in - *linux*) HOST_CFLAGS+=" -ffile-prefix-map=${PWD}=." ;; *mingw*) HOST_CFLAGS+=" -fno-ident" ;; *darwin*) unset HOST_CFLAGS ;; esac @@ -239,8 +229,6 @@ case "$HOST" in *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}" mkdir -p "$DISTSRC" ( cd "$DISTSRC" @@ -248,38 +236,30 @@ mkdir -p "$DISTSRC" # Extract the source tarball tar --strip-components=1 -xf "${GIT_ARCHIVE}" - ./autogen.sh - # Configure this DISTSRC for $HOST # shellcheck disable=SC2086 - env CONFIG_SITE="${BASEPREFIX}/${HOST}/share/config.site" \ - ./configure --prefix=/ \ - --disable-ccache \ - --disable-maintainer-mode \ - --disable-dependency-tracking \ - ${CONFIGFLAGS} \ - ${HOST_CFLAGS:+CFLAGS="${HOST_CFLAGS}"} \ - ${HOST_CXXFLAGS:+CXXFLAGS="${HOST_CXXFLAGS}"} \ - ${HOST_LDFLAGS:+LDFLAGS="${HOST_LDFLAGS}"} - - sed -i.old 's/-lstdc++ //g' config.status libtool + env CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}" \ + cmake -S . -B build \ + --toolchain "${BASEPREFIX}/${HOST}/toolchain.cmake" \ + -DWITH_CCACHE=OFF \ + -Werror=dev \ + ${CONFIGFLAGS} # Build Bitcoin Core - make --jobs="$JOBS" ${V:+V=1} + cmake --build build -j "$JOBS" ${V:+--verbose} - # Check that symbol/security checks tools are sane. - make test-security-check ${V:+V=1} # Perform basic security checks on a series of executables. - make -C src --jobs=1 check-security ${V:+V=1} + cmake --build build -j 1 --target check-security ${V:+--verbose} # Check that executables only contain allowed version symbols. - make -C src --jobs=1 check-symbols ${V:+V=1} + cmake --build build -j 1 --target check-symbols ${V:+--verbose} mkdir -p "$OUTDIR" # Make the os-specific installers case "$HOST" in *mingw*) - make deploy ${V:+V=1} BITCOIN_WIN_INSTALLER="${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe" + cmake --build build -j "$JOBS" -t deploy ${V:+--verbose} + mv build/bitcoin-win64-setup.exe "${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe" ;; esac @@ -291,57 +271,27 @@ mkdir -p "$DISTSRC" # Install built Bitcoin Core to $INSTALLPATH case "$HOST" in *darwin*) - make install-strip DESTDIR="${INSTALLPATH}" ${V:+V=1} + # This workaround can be dropped for CMake >= 3.27. + # See the upstream commit 689616785f76acd844fd448c51c5b2a0711aafa2. + find build -name 'cmake_install.cmake' -exec sed -i 's| -u -r | |g' {} + + + cmake --install build --strip --prefix "${INSTALLPATH}" ${V:+--verbose} ;; *) - make install DESTDIR="${INSTALLPATH}" ${V:+V=1} + cmake --install build --prefix "${INSTALLPATH}" ${V:+--verbose} ;; esac - case "$HOST" in - *darwin*) - make osx_volname ${V:+V=1} - make deploydir ${V:+V=1} - mkdir -p "unsigned-app-${HOST}" - cp --target-directory="unsigned-app-${HOST}" \ - osx_volname \ - contrib/macdeploy/detached-sig-create.sh - mv --target-directory="unsigned-app-${HOST}" dist - ( - cd "unsigned-app-${HOST}" - find . -print0 \ - | sort --zero-terminated \ - | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ - | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" \ - || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" && exit 1 ) - ) - make deploy ${V:+V=1} OSX_ZIP="${OUTDIR}/${DISTNAME}-${HOST}-unsigned.zip" - ;; - esac ( 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 - - # Prune pkg-config files - rm -rf "${DISTNAME}/lib/pkgconfig" - case "$HOST" in *darwin*) ;; *) - # Split binaries and libraries from their debug symbols + # Split binaries from their debug symbols { find "${DISTNAME}/bin" -type f -executable -print0 - find "${DISTNAME}/lib" -type f -print0 - } | xargs -0 -P"$JOBS" -I{} "${DISTSRC}/contrib/devtools/split-debug.sh" {} {} {}.dbg + } | xargs -0 -P"$JOBS" -I{} "${DISTSRC}/build/split-debug.sh" {} {} {}.dbg ;; esac @@ -360,7 +310,7 @@ mkdir -p "$DISTSRC" cp -r "${DISTSRC}/share/rpcauth" "${DISTNAME}/share/" - # Finally, deterministically produce {non-,}debug binary tarballs ready + # Deterministically produce {non-,}debug binary tarballs ready # for release case "$HOST" in *mingw*) @@ -368,8 +318,8 @@ mkdir -p "$DISTSRC" | 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 ) + | zip -X@ "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}-unsigned.zip" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}-unsigned.zip" && exit 1 ) find "${DISTNAME}" -name "*.dbg" -print0 \ | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" find "${DISTNAME}" -name "*.dbg" \ @@ -393,12 +343,13 @@ mkdir -p "$DISTSRC" find "${DISTNAME}" -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 ) + | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" && exit 1 ) ;; esac ) # $DISTSRC/installed + # Finally make tarballs for codesigning case "$HOST" in *mingw*) cp -rf --target-directory=. contrib/windeploy @@ -406,11 +357,31 @@ mkdir -p "$DISTSRC" cd ./windeploy mkdir -p unsigned cp --target-directory=unsigned/ "${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe" + cp -r --target-directory=unsigned/ "${INSTALLPATH}" + find unsigned/ -name "*.dbg" -print0 \ + | xargs -0r rm + find . -print0 \ + | sort --zero-terminated \ + | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ + | gzip -9n > "${OUTDIR}/${DISTNAME}-win64-codesigning.tar.gz" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-win64-codesigning.tar.gz" && exit 1 ) + ) + ;; + *darwin*) + cmake --build build --target deploy ${V:+--verbose} + mv build/dist/Bitcoin-Core.zip "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.zip" + mkdir -p "unsigned-app-${HOST}" + cp --target-directory="unsigned-app-${HOST}" \ + contrib/macdeploy/detached-sig-create.sh + mv --target-directory="unsigned-app-${HOST}" build/dist + cp -r --target-directory="unsigned-app-${HOST}" "${INSTALLPATH}" + ( + cd "unsigned-app-${HOST}" find . -print0 \ | sort --zero-terminated \ | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ - | gzip -9n > "${OUTDIR}/${DISTNAME}-win64-unsigned.tar.gz" \ - || ( rm -f "${OUTDIR}/${DISTNAME}-win64-unsigned.tar.gz" && exit 1 ) + | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-codesigning.tar.gz" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-codesigning.tar.gz" && exit 1 ) ) ;; esac diff --git a/contrib/guix/libexec/codesign.sh b/contrib/guix/libexec/codesign.sh index 245911c5..3a729371 100755 --- a/contrib/guix/libexec/codesign.sh +++ b/contrib/guix/libexec/codesign.sh @@ -4,11 +4,14 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C set -e -o pipefail + +# Environment variables for determinism +export TAR_OPTIONS="--owner=0 --group=0 --numeric-owner --mtime='@${SOURCE_DATE_EPOCH}' --sort=name" export TZ=UTC # Although Guix _does_ set umask when building its own packages (in our case, # this is all packages in manifest.scm), it does not set it for `guix -# environment`. It does make sense for at least `guix environment --container` +# shell`. It does make sense for at least `guix shell --container` # to set umask, so if that change gets merged upstream and we bump the # time-machine to a commit which includes the aforementioned change, we can # remove this line. @@ -27,7 +30,7 @@ fi # Check that required environment variables are set cat << EOF Required environment variables as seen inside the container: - UNSIGNED_TARBALL: ${UNSIGNED_TARBALL:?not set} + CODESIGNING_TARBALL: ${CODESIGNING_TARBALL:?not set} DETACHED_SIGS_REPO: ${DETACHED_SIGS_REPO:?not set} DIST_ARCHIVE_BASE: ${DIST_ARCHIVE_BASE:?not set} DISTNAME: ${DISTNAME:?not set} @@ -63,27 +66,54 @@ mkdir -p "$DISTSRC" ( cd "$DISTSRC" - tar -xf "$UNSIGNED_TARBALL" + tar -xf "$CODESIGNING_TARBALL" mkdir -p codesignatures tar -C codesignatures -xf "$CODESIGNATURE_GIT_ARCHIVE" case "$HOST" in *mingw*) - find "$PWD" -name "*-unsigned.exe" | while read -r infile; do - infile_base="$(basename "$infile")" - - # Codesigned *-unsigned.exe and output to OUTDIR + # Apply detached codesignatures + WORKDIR=".tmp" + mkdir -p ${WORKDIR} + cp -r --target-directory="${WORKDIR}" "unsigned/${DISTNAME}" + find "${WORKDIR}/${DISTNAME}" -name "*.exe" -type f -exec rm {} \; + find unsigned/ -name "*.exe" -type f | while read -r bin + do + bin_base="$(realpath --relative-to=unsigned/ "${bin}")" + mkdir -p "${WORKDIR}/$(dirname "${bin_base}")" osslsigncode attach-signature \ - -in "$infile" \ - -out "${OUTDIR}/${infile_base/-unsigned}" \ + -in "${bin}" \ + -out "${WORKDIR}/${bin_base/-unsigned}" \ -CAfile "$GUIX_ENVIRONMENT/etc/ssl/certs/ca-certificates.crt" \ - -sigin codesignatures/win/"$infile_base".pem + -sigin codesignatures/win/"${bin_base}".pem done + + # Move installer to outdir + cd "${WORKDIR}" + find . -name "*setup.exe" -print0 \ + | xargs -0r mv --target-directory="${OUTDIR}" + + # Make .zip from binaries + find "${DISTNAME}" -print0 \ + | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" + find "${DISTNAME}" \ + | 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 ) ;; *darwin*) - # Apply detached codesignatures to dist/ (in-place) - signapple apply dist/Coordinate-Qt.app codesignatures/osx/dist + case "$HOST" in + arm64*) ARCH="arm64" ;; + x86_64*) ARCH="x86_64" ;; + esac + + # Apply detached codesignatures (in-place) + signapple apply dist/Bitcoin-Qt.app codesignatures/osx/"${HOST}"/dist/Bitcoin-Qt.app + find "${DISTNAME}" -wholename "*/bin/*" -type f | while read -r bin + do + signapple apply "${bin}" "codesignatures/osx/${HOST}/${bin}.${ARCH}sign" + done # Make a .zip from dist/ cd dist/ @@ -91,6 +121,14 @@ mkdir -p "$DISTSRC" | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" find . | sort \ | zip -X@ "${OUTDIR}/${DISTNAME}-${HOST}.zip" + cd .. + + # Make a .tar.gz from bins + find "${DISTNAME}" -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 ) ;; *) exit 1 @@ -105,7 +143,7 @@ mv --no-target-directory "$OUTDIR" "$ACTUAL_OUTDIR" \ ( cd /outdir-base { - echo "$UNSIGNED_TARBALL" + echo "$CODESIGNING_TARBALL" echo "$CODESIGNATURE_GIT_ARCHIVE" find "$ACTUAL_OUTDIR" -type f } | xargs realpath --relative-base="$PWD" \ diff --git a/contrib/guix/libexec/prelude.bash b/contrib/guix/libexec/prelude.bash index 4d5b06a5..d25c371a 100644 --- a/contrib/guix/libexec/prelude.bash +++ b/contrib/guix/libexec/prelude.bash @@ -21,6 +21,26 @@ check_tools() { done } +################ +# SOURCE_DATE_EPOCH should not unintentionally be set +################ + +check_source_date_epoch() { + if [ -n "$SOURCE_DATE_EPOCH" ] && [ -z "$FORCE_SOURCE_DATE_EPOCH" ]; then + cat << EOF +ERR: Environment variable SOURCE_DATE_EPOCH is set which may break reproducibility. + + Aborting... + +Hint: You may want to: + 1. Unset this variable: \`unset SOURCE_DATE_EPOCH\` before rebuilding + 2. Set the 'FORCE_SOURCE_DATE_EPOCH' environment variable if you insist on + using your own epoch +EOF + exit 1 + fi +} + check_tools cat env readlink dirname basename git ################ @@ -50,8 +70,8 @@ fi # across time. time-machine() { # shellcheck disable=SC2086 - guix time-machine --url=https://git.savannah.gnu.org/git/guix.git \ - --commit=160f78a4d92205df986ed9efcce7d3aac188cb24 \ + guix time-machine --url=https://codeberg.org/guix/guix.git \ + --commit=53396a22afc04536ddf75d8f82ad2eafa5082725 \ --cores="$JOBS" \ --keep-failed \ --fallback \ diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index 12f57fcc..a230eea9 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -1,5 +1,4 @@ (use-modules (gnu packages) - (gnu packages autotools) ((gnu packages bash) #:select (bash-minimal)) (gnu packages bison) ((gnu packages certs) #:select (nss-certs)) @@ -7,29 +6,32 @@ (gnu packages commencement) (gnu packages compression) (gnu packages cross-base) - (gnu packages file) (gnu packages gawk) (gnu packages gcc) ((gnu packages installers) #:select (nsis-x86_64)) - ((gnu packages linux) #:select (linux-libre-headers-5.15 util-linux)) + ((gnu packages linux) #:select (linux-libre-headers-6.1)) (gnu packages llvm) (gnu packages mingw) - (gnu packages moreutils) + (gnu packages ninja) (gnu packages pkg-config) ((gnu packages python) #:select (python-minimal)) - ((gnu packages python-build) #:select (python-tomli)) + ((gnu packages python-build) #:select (python-poetry-core)) ((gnu packages python-crypto) #:select (python-asn1crypto)) + ((gnu packages python-science) #:select (python-scikit-build-core)) + ((gnu packages python-xyz) #:select (python-pydantic-2 python-pydantic-core)) ((gnu packages tls) #:select (openssl)) ((gnu packages version-control) #:select (git-minimal)) (guix build-system cmake) (guix build-system gnu) (guix build-system python) + (guix build-system pyproject) (guix build-system trivial) + (guix download) (guix gexp) (guix git-download) ((guix licenses) #:prefix license:) (guix packages) - ((guix utils) #:select (substitute-keyword-arguments))) + ((guix utils) #:select (cc-for-target substitute-keyword-arguments))) (define-syntax-rule (search-our-patches file-name ...) "Return the list of absolute file names corresponding to each @@ -80,25 +82,26 @@ FILE-NAME found in ./patches relative to the current file." (build-system trivial-build-system) (arguments '(#:builder (begin (mkdir %output) #t))) (propagated-inputs - `(("binutils" ,xbinutils) - ("libc" ,xlibc) - ("libc:static" ,xlibc "static") - ("gcc" ,xgcc) - ("gcc-lib" ,xgcc "lib"))) + (list xbinutils + xlibc + xgcc + `(,xlibc "static") + `(,xgcc "lib"))) (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 xgcc)) (license (package-license xgcc))))) -(define base-gcc gcc-10) -(define base-linux-kernel-headers linux-libre-headers-5.15) +(define base-gcc gcc-13) ;; 13.3.0 + +(define base-linux-kernel-headers linux-libre-headers-6.1) (define* (make-bitcoin-cross-toolchain target #:key (base-gcc-for-libc linux-base-gcc) (base-kernel-headers base-linux-kernel-headers) - (base-libc glibc-2.27) + (base-libc glibc-2.31) (base-gcc linux-base-gcc)) "Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values desirable for building Bitcoin Core release binaries." @@ -110,13 +113,23 @@ desirable for building Bitcoin Core release binaries." (define (gcc-mingw-patches gcc) (package-with-extra-patches gcc - (search-our-patches "gcc-remap-guix-store.patch" - "vmov-alignment.patch"))) + (search-our-patches "gcc-remap-guix-store.patch"))) + +(define (binutils-mingw-patches binutils) + (package-with-extra-patches binutils + (search-our-patches "binutils-unaligned-default.patch"))) + +(define (winpthreads-patches mingw-w64-x86_64-winpthreads) + (package-with-extra-patches mingw-w64-x86_64-winpthreads + (search-our-patches "winpthreads-remap-guix-store.patch"))) (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) + (let* ((xbinutils (binutils-mingw-patches (cross-binutils target))) + (machine (substring target 0 (string-index target #\-))) + (pthreads-xlibc (winpthreads-patches (make-mingw-w64 machine + #:xgcc (cross-gcc target #:xgcc (gcc-mingw-patches base-gcc)) + #:with-winpthreads? #t))) (pthreads-xgcc (cross-gcc target #:xgcc (gcc-mingw-patches mingw-w64-base-gcc) #:xbinutils xbinutils @@ -130,10 +143,10 @@ desirable for building Bitcoin Core release binaries." (build-system trivial-build-system) (arguments '(#:builder (begin (mkdir %output) #t))) (propagated-inputs - `(("binutils" ,xbinutils) - ("libc" ,pthreads-xlibc) - ("gcc" ,pthreads-xgcc) - ("gcc-lib" ,pthreads-xgcc "lib"))) + (list xbinutils + pthreads-xlibc + pthreads-xgcc + `(,pthreads-xgcc "lib"))) (synopsis (string-append "Complete GCC tool chain for " target)) (description (string-append "This package provides a complete GCC tool chain for " target " development.")) @@ -147,37 +160,35 @@ chain for " target " development.")) (define-public python-lief (package (name "python-lief") - (version "0.13.2") + (version "0.16.6") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/lief-project/LIEF") (commit version))) (file-name (git-file-name name version)) - (modules '((guix build utils))) - (snippet - '(begin - ;; Configure build for Python bindings. - (substitute* "api/python/config-default.toml" - (("(ninja = )true" all m) - (string-append m "false")) - (("(parallel-jobs = )0" all m) - (string-append m (number->string (parallel-job-count))))))) (sha256 (base32 - "0y48x358ppig5xp97ahcphfipx7cg9chldj2q5zrmn610fmi4zll")))) - (build-system python-build-system) - (native-inputs (list cmake-minimal python-tomli)) + "1pq9nagrnkl1x943bqnpiyxmkd9vk99znfxiwqp6vf012b50bz2a")) + (patches (search-our-patches "lief-scikit-0-9.patch")))) + (build-system pyproject-build-system) + (native-inputs (list cmake-minimal + ninja + python-scikit-build-core + python-pydantic-core + python-pydantic-2)) (arguments (list #:tests? #f ;needs network #:phases #~(modify-phases %standard-phases - (add-before 'build 'change-directory + (add-before 'build 'set-pythonpath (lambda _ - (chdir "api/python"))) - (replace 'build + (setenv "PYTHONPATH" + (string-append (string-append (getcwd) "/api/python/backend") + ":" (or (getenv "PYTHONPATH") ""))))) + (add-after 'set-pythonpath 'change-directory (lambda _ - (invoke "python" "setup.py" "build")))))) + (chdir "api/python")))))) (home-page "https://github.com/lief-project/LIEF") (synopsis "Library to instrument executable formats") (description @@ -198,8 +209,7 @@ and abstract ELF, PE and MachO formats.") (base32 "1j47vwq4caxfv0xw68kw5yh00qcpbd56d7rq6c483ma3y7s96yyz")))) (build-system cmake-build-system) - (inputs - `(("openssl", openssl))) + (inputs (list openssl)) (home-page "https://github.com/mtrojnar/osslsigncode") (synopsis "Authenticode signing and timestamping tool") (description "osslsigncode is a small tool that implements part of the @@ -256,8 +266,7 @@ thus should be able to compile on most platforms where these exist.") (files '("etc/ssl/certs/ca-certificates.crt"))))) (propagated-inputs - `(("python-asn1crypto" ,python-asn1crypto) - ("openssl" ,openssl))) + (list python-asn1crypto openssl)) (arguments `(#:phases (modify-phases %standard-phases @@ -295,7 +304,7 @@ thus should be able to compile on most platforms where these exist.") (package (inherit python-oscrypto) (name "python-oscryptotests") (propagated-inputs - `(("python-oscrypto" ,python-oscrypto))) + (list python-oscrypto)) (arguments `(#:tests? #f #:phases @@ -322,9 +331,9 @@ thus should be able to compile on most platforms where these exist.") "1qw2k7xis53179lpqdqyylbcmp76lj7sagp883wmxg5i7chhc96k")))) (build-system python-build-system) (propagated-inputs - `(("python-asn1crypto" ,python-asn1crypto) - ("python-oscrypto" ,python-oscrypto) - ("python-oscryptotests", python-oscryptotests))) ;; certvalidator tests import oscryptotests + (list python-asn1crypto + python-oscrypto + python-oscryptotests)) ;; certvalidator tests import oscryptotests (arguments `(#:phases (modify-phases %standard-phases @@ -372,82 +381,11 @@ certificates or paths. Supports various options, including: validation at a specific moment in time, whitelisting and revocation checks.") (license license:expat)))) -(define-public python-altgraph - (package - (name "python-altgraph") - (version "0.17") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ronaldoussoren/altgraph") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "09sm4srvvkw458pn48ga9q7ykr4xlz7q8gh1h9w7nxpf001qgpwb")))) - (build-system python-build-system) - (home-page "https://github.com/ronaldoussoren/altgraph") - (synopsis "Python graph (network) package") - (description "altgraph is a fork of graphlib: a graph (network) package for -constructing graphs, BFS and DFS traversals, topological sort, shortest paths, -etc. with graphviz output.") - (license license:expat))) - - -(define-public python-macholib - (package - (name "python-macholib") - (version "1.14") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ronaldoussoren/macholib") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0aislnnfsza9wl4f0vp45ivzlc0pzhp9d4r08700slrypn5flg42")))) - (build-system python-build-system) - (propagated-inputs - `(("python-altgraph" ,python-altgraph))) - (arguments - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'disable-broken-tests - (lambda _ - ;; This test is broken as there is no keyboard interrupt. - (substitute* "macholib_tests/test_command_line.py" - (("^(.*)class TestCmdLine" line indent) - (string-append indent - "@unittest.skip(\"Disabled by Guix\")\n" - line))) - (substitute* "macholib_tests/test_dyld.py" - (("^(.*)def test_\\S+_find" line indent) - (string-append indent - "@unittest.skip(\"Disabled by Guix\")\n" - line)) - (("^(.*)def testBasic" line indent) - (string-append indent - "@unittest.skip(\"Disabled by Guix\")\n" - line)) - ) - #t))))) - (home-page "https://github.com/ronaldoussoren/macholib") - (synopsis "Python library for analyzing and editing Mach-O headers") - (description "macholib is a Macho-O header analyzer and editor. It's -typically used as a dependency analysis tool, and also to rewrite dylib -references in Mach-O headers to be @executable_path relative. Though this tool -targets a platform specific file format, it is pure python code that is platform -and endian independent.") - (license license:expat))) - (define-public python-signapple - (let ((commit "7a96b4171a360abf0f0f56e499f8f9ed2116280d")) + (let ((commit "85bfcecc33d2773bc09bc318cec0614af2c8e287")) (package (name "python-signapple") - (version (git-version "0.1" "1" commit)) + (version (git-version "0.2.0" "1" commit)) (source (origin (method git-fetch) @@ -457,14 +395,14 @@ and endian independent.") (file-name (git-file-name name commit)) (sha256 (base32 - "0aa4k180jnpal15yhncnm3g3z9gzmi7qb25q5l0kaj444a1p2pm4")))) - (build-system python-build-system) + "17yqjll8nw83q6dhgqhkl7w502z5vy9sln8m6mlx0f1c10isg8yg")))) + (build-system pyproject-build-system) (propagated-inputs - `(("python-asn1crypto" ,python-asn1crypto) - ("python-oscrypto" ,python-oscrypto) - ("python-certvalidator" ,python-certvalidator) - ("python-elfesteem" ,python-elfesteem) - ("python-macholib" ,python-macholib))) + (list python-asn1crypto + python-oscrypto + python-certvalidator + python-elfesteem)) + (native-inputs (list python-poetry-core)) ;; There are no tests, but attempting to run python setup.py test leads to ;; problems, just disable the test (arguments '(#:tests? #f)) @@ -483,12 +421,9 @@ inspecting signatures in Mach-O binaries.") `(append ,flags ;; https://gcc.gnu.org/install/configure.html (list "--enable-threads=posix", - building-on))) - ((#:make-flags flags) - ;; Uses the SSP functions 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. - `(cons "gcc_cv_libc_provides_ssp=yes" ,flags)))))) + "--enable-default-ssp=yes", + "--disable-gcov", + building-on))))))) (define-public linux-base-gcc (package @@ -501,6 +436,9 @@ inspecting signatures in Mach-O binaries.") (list "--enable-initfini-array=yes", "--enable-default-ssp=yes", "--enable-default-pie=yes", + "--enable-standard-branch-protection=yes", + "--enable-cet=yes", + "--disable-gcov", building-on))) ((#:phases phases) `(modify-phases ,phases @@ -514,32 +452,32 @@ inspecting signatures in Mach-O binaries.") (("-rpath=") "-rpath-link=")) #t)))))))) -(define-public glibc-2.27 +(define-public glibc-2.31 + (let ((commit "7b27c450c34563a28e634cccb399cd415e71ebfe")) (package - (inherit glibc-2.31) - (version "2.27") + (inherit glibc) ;; 2.35 + (version "2.31") (source (origin (method git-fetch) (uri (git-reference (url "https://sourceware.org/git/glibc.git") - (commit "73886db6218e613bd6d4edf529f11e008a6c2fa6"))) - (file-name (git-file-name "glibc" "73886db6218e613bd6d4edf529f11e008a6c2fa6")) + (commit commit))) + (file-name (git-file-name "glibc" commit)) (sha256 (base32 - "0azpb9cvnbv25zg8019rqz48h8i2257ngyjg566dlnp74ivrs9vq")) - (patches (search-our-patches "glibc-2.27-riscv64-Use-__has_include-to-include-asm-syscalls.h.patch" - "glibc-2.27-fcommon.patch" - "glibc-2.27-guix-prefix.patch" - "glibc-2.27-no-librt.patch" - "glibc-2.27-powerpc-ldbrx.patch")))) + "017qdpr5id7ddb4lpkzj2li1abvw916m3fc6n7nw28z4h5qbv2n0")) + (patches (search-our-patches "glibc-guix-prefix.patch")))) (arguments (substitute-keyword-arguments (package-arguments glibc) ((#:configure-flags flags) `(append ,flags ;; https://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html (list "--enable-stack-protector=all", + "--enable-cet", "--enable-bind-now", "--disable-werror", + "--disable-timezone-tools", + "--disable-profile", building-on))) ((#:phases phases) `(modify-phases ,phases @@ -547,12 +485,43 @@ inspecting signatures in Mach-O binaries.") (lambda* (#:key outputs #:allow-other-keys) ;; Install the rpc data base file under `$out/etc/rpc'. ;; Otherwise build will fail with "Permission denied." + ;; Can be removed when we are building 2.32 or later. (let ((out (assoc-ref outputs "out"))) (substitute* "sunrpc/Makefile" (("^\\$\\(inst_sysconfdir\\)/rpc(.*)$" _ suffix) (string-append out "/etc/rpc" suffix "\n")) (("^install-others =.*$") - (string-append "install-others = " out "/etc/rpc\n")))))))))))) + (string-append "install-others = " out "/etc/rpc\n"))))))))))))) + +;; The sponge tool from moreutils. +(define-public sponge + (package + (name "sponge") + (version "0.69") + (source (origin + (method url-fetch) + (uri (string-append + "https://git.joeyh.name/index.cgi/moreutils.git/snapshot/ + moreutils-" version ".tar.gz")) + (file-name (string-append "moreutils-" version ".tar.gz")) + (sha256 + (base32 + "1l859qnzccslvxlh5ghn863bkq2vgmqgnik6jr21b9kc6ljmsy8g")))) + (build-system gnu-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) + (install-file "sponge" bin))))) + #:make-flags + #~(list "sponge" (string-append "CC=" #$(cc-for-target))))) + (home-page "https://joeyh.name/code/moreutils/") + (synopsis "Miscellaneous general-purpose command-line tools") + (description "Just sponge") + (license license:gpl2+))) (packages->manifest (append @@ -560,9 +529,7 @@ inspecting signatures in Mach-O binaries.") bash-minimal which coreutils-minimal - util-linux ;; File(system) inspection - file grep diffutils findutils @@ -570,22 +537,16 @@ inspecting signatures in Mach-O binaries.") patch gawk sed - moreutils + sponge ;; Compression and archiving tar - bzip2 gzip xz ;; Build tools + gcc-toolchain-13 + cmake-minimal gnu-make - libtool - autoconf-2.71 - automake - pkg-config - bison - ;; Native GCC 10 toolchain - gcc-toolchain-10 - (list gcc-toolchain-10 "static") + ninja ;; Scripting python-minimal ;; (3.10) ;; Git @@ -594,14 +555,20 @@ inspecting signatures in Mach-O binaries.") python-lief) (let ((target (getenv "HOST"))) (cond ((string-suffix? "-mingw32" target) - ;; Windows (list zip (make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32") nsis-x86_64 nss-certs osslsigncode)) ((string-contains target "-linux-") - (list (make-bitcoin-cross-toolchain target))) + (list bison + pkg-config + (list gcc-toolchain-13 "static") + (make-bitcoin-cross-toolchain target))) ((string-contains target "darwin") - (list clang-toolchain-15 binutils cmake-minimal python-signapple zip)) + (list clang-toolchain-18 + lld-18 + (make-lld-wrapper lld-18 #:lld-as-ld? #t) + python-signapple + zip)) (else '()))))) diff --git a/contrib/guix/patches/binutils-unaligned-default.patch b/contrib/guix/patches/binutils-unaligned-default.patch new file mode 100644 index 00000000..d1bc71ae --- /dev/null +++ b/contrib/guix/patches/binutils-unaligned-default.patch @@ -0,0 +1,22 @@ +commit 6537181f59ed186a341db621812a6bc35e22eaf6 +Author: fanquake +Date: Wed Apr 10 12:15:52 2024 +0200 + + build: turn on -muse-unaligned-vector-move by default + + This allows us to avoid (more invasively) patching GCC, to avoid + unaligned instruction use. + +diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c +index e0632681477..14a9653abdf 100644 +--- a/gas/config/tc-i386.c ++++ b/gas/config/tc-i386.c +@@ -801,7 +801,7 @@ static unsigned int no_cond_jump_promotion = 0; + static unsigned int sse2avx; + + /* Encode aligned vector move as unaligned vector move. */ +-static unsigned int use_unaligned_vector_move; ++static unsigned int use_unaligned_vector_move = 1; + + /* Encode scalar AVX instructions with specific vector length. */ + static enum diff --git a/contrib/guix/patches/gcc-remap-guix-store.patch b/contrib/guix/patches/gcc-remap-guix-store.patch index a47ef7a2..a8b41d48 100644 --- a/contrib/guix/patches/gcc-remap-guix-store.patch +++ b/contrib/guix/patches/gcc-remap-guix-store.patch @@ -1,14 +1,9 @@ -From aad25427e74f387412e8bc9a9d7bbc6c496c792f Mon Sep 17 00:00:00 2001 -From: Andrew Chow -Date: Wed, 6 Jul 2022 16:49:41 -0400 -Subject: [PATCH] guix: remap guix store paths to /usr +Without ffile-prefix-map, the debug symbols will contain paths for the +guix store which will include the hashes of each package. However, the +hash for the same package will differ when on different architectures. +In order to be reproducible regardless of the architecture used to build +the package, map all guix store prefixes to something fixed, e.g. /usr. ---- - libgcc/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in -index 851e7657d07..476c2becd1c 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -854,7 +854,7 @@ endif diff --git a/contrib/guix/patches/glibc-2.27-fcommon.patch b/contrib/guix/patches/glibc-2.27-fcommon.patch deleted file mode 100644 index 817aa85b..00000000 --- a/contrib/guix/patches/glibc-2.27-fcommon.patch +++ /dev/null @@ -1,34 +0,0 @@ -commit 264a4a0dbe1f4369db315080034b500bed66016c -Author: fanquake -Date: Fri May 6 11:03:04 2022 +0100 - - build: use -fcommon to retain legacy behaviour with GCC 10 - - GCC 10 started using -fno-common by default, which causes issues with - the powerpc builds using gibc 2.27. A patch was commited to glibc to fix - the issue, 18363b4f010da9ba459b13310b113ac0647c2fcc but is non-trvial - to backport, and was broken in at least one way, see the followup in - commit 7650321ce037302bfc2f026aa19e0213b8d02fe6. - - For now, retain the legacy GCC behaviour by passing -fcommon when - building glibc. - - https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html. - https://sourceware.org/git/?p=glibc.git;a=commit;h=18363b4f010da9ba459b13310b113ac0647c2fcc - https://sourceware.org/git/?p=glibc.git;a=commit;h=7650321ce037302bfc2f026aa19e0213b8d02fe6 - - This patch can be dropped when we are building with glibc 2.31+. - -diff --git a/Makeconfig b/Makeconfig -index 86a71e5802..aa2166be60 100644 ---- a/Makeconfig -+++ b/Makeconfig -@@ -896,7 +896,7 @@ ifeq "$(strip $(+cflags))" "" - endif # $(+cflags) == "" - - +cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags) \ -- $(+stack-protector) -+ $(+stack-protector) -fcommon - +gcc-nowarn := -w - - # Don't duplicate options if we inherited variables from the parent. diff --git a/contrib/guix/patches/glibc-2.27-no-librt.patch b/contrib/guix/patches/glibc-2.27-no-librt.patch deleted file mode 100644 index 4f2092ba..00000000 --- a/contrib/guix/patches/glibc-2.27-no-librt.patch +++ /dev/null @@ -1,53 +0,0 @@ -This patch can be dropped when we are building with glibc 2.30+. - -commit 6e41ef56c9baab719a02f1377b1e7ce7bff61e73 -Author: Florian Weimer -Date: Fri Feb 8 10:21:56 2019 +0100 - - rt: Turn forwards from librt to libc into compat symbols [BZ #24194] - - As the result of commit 6e6249d0b461b952d0f544792372663feb6d792a - ("BZ#14743: Move clock_* symbols from librt to libc."), in glibc 2.17, - clock_gettime, clock_getres, clock_settime, clock_getcpuclockid, - clock_nanosleep were added to libc, and the file rt/clock-compat.c - was added with forwarders to the actual implementations in libc. - These forwarders were wrapped in - - #if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_17) - - so that they are not present for newer architectures (such as - powerpc64le) with a 2.17 or later ABI baseline. But the forwarders - were not marked as compatibility symbols. As a result, on older - architectures, historic configure checks such as - - AC_CHECK_LIB(rt, clock_gettime) - - still cause linking against librt, even though this is completely - unnecessary. It also creates a needless porting hazard because - architectures behave differently when it comes to symbol availability. - - Reviewed-by: Carlos O'Donell - -diff --git a/rt/clock-compat.c b/rt/clock-compat.c -index f816973c05..11e71aa890 100644 ---- a/rt/clock-compat.c -+++ b/rt/clock-compat.c -@@ -30,14 +30,16 @@ - #if HAVE_IFUNC - # undef INIT_ARCH - # define INIT_ARCH() --# define COMPAT_REDIRECT(name, proto, arglist) libc_ifunc (name, &__##name) -+# define COMPAT_REDIRECT(name, proto, arglist) libc_ifunc (name, &__##name) \ -+ compat_symbol (librt, name, name, GLIBC_2_2); - #else - # define COMPAT_REDIRECT(name, proto, arglist) \ - int \ - name proto \ - { \ - return __##name arglist; \ -- } -+ } \ -+ compat_symbol (librt, name, name, GLIBC_2_2); - #endif - - COMPAT_REDIRECT (clock_getres, diff --git a/contrib/guix/patches/glibc-2.27-powerpc-ldbrx.patch b/contrib/guix/patches/glibc-2.27-powerpc-ldbrx.patch deleted file mode 100644 index 26716054..00000000 --- a/contrib/guix/patches/glibc-2.27-powerpc-ldbrx.patch +++ /dev/null @@ -1,245 +0,0 @@ -From 50b0b3c9ff71ffd7ebbd74ae46844c3566478123 Mon Sep 17 00:00:00 2001 -From: "Gabriel F. T. Gomes" -Date: Mon, 27 May 2019 15:21:22 -0300 -Subject: [PATCH] powerpc: Fix build failures with current GCC - -Since GCC commit 271500 (svn), also known as the following commit on the -git mirror: - -commit e154242724b084380e3221df7c08fcdbd8460674 -Author: amodra -Date: Wed May 22 04:34:26 2019 +0000 - - [RS6000] Don't pass -many to the assembler - -glibc builds are failing when an assembly implementation does not -declare the correct '.machine' directive, or when no such directive is -declared at all. For example, when a POWER6 instruction is used, but -'.machine power6' is not declared, the assembler will fail with an error -similar to the following: - - ../sysdeps/powerpc/powerpc64/power8/strcmp.S: Assembler messages: - 24 ../sysdeps/powerpc/powerpc64/power8/strcmp.S:55: Error: unrecognized opcode: `cmpb' - -This patch adds '.machine powerN' directives where none existed, as well -as it updates '.machine power7' directives on POWER8 files, because the -minimum binutils version required to build glibc (binutils 2.25) now -provides this machine version. It also adds '-many' to the assembler -command used to build tst-set_ppr.c. - -Tested for powerpc, powerpc64, and powerpc64le, as well as with -build-many-glibcs.py for powerpc targets. - -Reviewed-by: Tulio Magno Quites Machado Filho ---- - sysdeps/powerpc/Makefile | 5 +++ - sysdeps/powerpc/powerpc64/power4/memcmp.S | 7 ++++ - sysdeps/powerpc/powerpc64/power7/strncmp.S | 1 + - .../powerpc/powerpc64/power8/fpu/s_llround.S | 1 + - sysdeps/powerpc/powerpc64/power8/strcasecmp.S | 36 ++++++------------- - sysdeps/powerpc/powerpc64/power8/strcasestr.S | 14 ++------ - sysdeps/powerpc/powerpc64/power8/strcmp.S | 1 + - 7 files changed, 28 insertions(+), 37 deletions(-) - -diff --git a/sysdeps/powerpc/Makefile b/sysdeps/powerpc/Makefile -index 6aa683b03f..23126147df 100644 ---- a/sysdeps/powerpc/Makefile -+++ b/sysdeps/powerpc/Makefile -@@ -45,6 +45,11 @@ ifeq ($(subdir),misc) - sysdep_headers += sys/platform/ppc.h - tests += test-gettimebase - tests += tst-set_ppr -+ -+# This test is expected to run and exit with EXIT_UNSUPPORTED on -+# processors that do not implement the Power ISA 2.06 or greater. -+# But the test makes use of instructions from Power ISA 2.06 and 2.07. -+CFLAGS-tst-set_ppr.c += -Wa,-many - endif - - ifneq (,$(filter %le,$(config-machine))) -diff --git a/sysdeps/powerpc/powerpc64/power4/memcmp.S b/sysdeps/powerpc/powerpc64/power4/memcmp.S -index e5319f101f..38dcf4c9a1 100644 ---- a/sysdeps/powerpc/powerpc64/power4/memcmp.S -+++ b/sysdeps/powerpc/powerpc64/power4/memcmp.S -@@ -26,7 +26,14 @@ - # define MEMCMP memcmp - #endif - -+#ifndef __LITTLE_ENDIAN__ - .machine power4 -+#else -+/* Little endian is only available since POWER8, so it's safe to -+ specify .machine as power8 (or older), even though this is a POWER4 -+ file. Since the little-endian code uses 'ldbrx', power7 is enough. */ -+ .machine power7 -+#endif - ENTRY_TOCLESS (MEMCMP, 4) - CALL_MCOUNT 3 - -diff --git a/sysdeps/powerpc/powerpc64/power7/strncmp.S b/sysdeps/powerpc/powerpc64/power7/strncmp.S -index 0c7429d19f..10f898c5a3 100644 ---- a/sysdeps/powerpc/powerpc64/power7/strncmp.S -+++ b/sysdeps/powerpc/powerpc64/power7/strncmp.S -@@ -28,6 +28,7 @@ - const char *s2 [r4], - size_t size [r5]) */ - -+ .machine power7 - ENTRY_TOCLESS (STRNCMP, 5) - CALL_MCOUNT 3 - -diff --git a/sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S b/sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S -index a22fc63bb3..84c76ba0f9 100644 ---- a/sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S -+++ b/sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S -@@ -26,6 +26,7 @@ - - /* long long [r3] llround (float x [fp1]) */ - -+ .machine power8 - ENTRY_TOCLESS (__llround) - CALL_MCOUNT 0 - frin fp1,fp1 /* Round to nearest +-0.5. */ -diff --git a/sysdeps/powerpc/powerpc64/power8/strcasecmp.S b/sysdeps/powerpc/powerpc64/power8/strcasecmp.S -index 3a2efe2a64..eeacd40c7f 100644 ---- a/sysdeps/powerpc/powerpc64/power8/strcasecmp.S -+++ b/sysdeps/powerpc/powerpc64/power8/strcasecmp.S -@@ -91,21 +91,7 @@ - 3: \ - TOLOWER() - --#ifdef _ARCH_PWR8 --# define VCLZD_V8_v7 vclzd v8, v7; --# define MFVRD_R3_V1 mfvrd r3, v1; --# define VSUBUDM_V9_V8 vsubudm v9, v9, v8; --# define VPOPCNTD_V8_V8 vpopcntd v8, v8; --# define VADDUQM_V7_V8 vadduqm v9, v7, v8; --#else --# define VCLZD_V8_v7 .long 0x11003fc2 --# define MFVRD_R3_V1 .long 0x7c230067 --# define VSUBUDM_V9_V8 .long 0x112944c0 --# define VPOPCNTD_V8_V8 .long 0x110047c3 --# define VADDUQM_V7_V8 .long 0x11274100 --#endif -- -- .machine power7 -+ .machine power8 - - ENTRY (__STRCASECMP) - #ifdef USE_AS_STRNCASECMP -@@ -265,15 +251,15 @@ L(different): - #ifdef __LITTLE_ENDIAN__ - /* Count trailing zero. */ - vspltisb v8, -1 -- VADDUQM_V7_V8 -+ vadduqm v9, v7, v8 - vandc v8, v9, v7 -- VPOPCNTD_V8_V8 -+ vpopcntd v8, v8 - vspltb v6, v8, 15 - vcmpequb. v6, v6, v1 - blt cr6, L(shift8) - #else - /* Count leading zero. */ -- VCLZD_V8_v7 -+ vclzd v8, v7 - vspltb v6, v8, 7 - vcmpequb. v6, v6, v1 - blt cr6, L(shift8) -@@ -291,7 +277,7 @@ L(skipsum): - /* Merge and move to GPR. */ - vmrglb v6, v6, v7 - vslo v1, v6, v1 -- MFVRD_R3_V1 -+ mfvrd r3, v1 - /* Place the characters that are different in first position. */ - sldi rSTR2, rRTN, 56 - srdi rSTR2, rSTR2, 56 -@@ -301,7 +287,7 @@ L(skipsum): - vslo v6, v5, v8 - vslo v7, v4, v8 - vmrghb v1, v6, v7 -- MFVRD_R3_V1 -+ mfvrd r3, v1 - srdi rSTR2, rRTN, 48 - sldi rSTR2, rSTR2, 56 - srdi rSTR2, rSTR2, 56 -@@ -320,15 +306,15 @@ L(null_found): - #ifdef __LITTLE_ENDIAN__ - /* Count trailing zero. */ - vspltisb v8, -1 -- VADDUQM_V7_V8 -+ vadduqm v9, v7, v8 - vandc v8, v9, v7 -- VPOPCNTD_V8_V8 -+ vpopcntd v8, v8 - vspltb v6, v8, 15 - vcmpequb. v6, v6, v10 - blt cr6, L(shift_8) - #else - /* Count leading zero. */ -- VCLZD_V8_v7 -+ vclzd v8, v7 - vspltb v6, v8, 7 - vcmpequb. v6, v6, v10 - blt cr6, L(shift_8) -@@ -343,10 +329,10 @@ L(skipsum1): - vspltisb v10, 7 - vslb v10, v10, v10 - vsldoi v9, v0, v10, 1 -- VSUBUDM_V9_V8 -+ vsubudm v9, v9, v8 - vspltisb v8, 8 - vsldoi v8, v0, v8, 1 -- VSUBUDM_V9_V8 -+ vsubudm v9, v9, v8 - /* Shift and remove junk after null character. */ - #ifdef __LITTLE_ENDIAN__ - vslo v5, v5, v9 -diff --git a/sysdeps/powerpc/powerpc64/power8/strcasestr.S b/sysdeps/powerpc/powerpc64/power8/strcasestr.S -index 9fc24c29f9..e10f06fd86 100644 ---- a/sysdeps/powerpc/powerpc64/power8/strcasestr.S -+++ b/sysdeps/powerpc/powerpc64/power8/strcasestr.S -@@ -73,18 +73,8 @@ - vor reg, v8, reg; \ - vcmpequb. v6, reg, v4; - --/* TODO: change these to the actual instructions when the minimum required -- binutils allows it. */ --#ifdef _ARCH_PWR8 --#define VCLZD_V8_v7 vclzd v8, v7; --#else --#define VCLZD_V8_v7 .long 0x11003fc2 --#endif -- - #define FRAMESIZE (FRAME_MIN_SIZE+48) --/* TODO: change this to .machine power8 when the minimum required binutils -- allows it. */ -- .machine power7 -+ .machine power8 - ENTRY (STRCASESTR, 4) - CALL_MCOUNT 2 - mflr r0 /* Load link register LR to r0. */ -@@ -291,7 +281,7 @@ L(nullchk1): - vcmpequb. v6, v0, v7 - /* Shift r3 by 16 bytes and proceed. */ - blt cr6, L(shift16) -- VCLZD_V8_v7 -+ vclzd v8, v7 - #ifdef __LITTLE_ENDIAN__ - vspltb v6, v8, 15 - #else -diff --git a/sysdeps/powerpc/powerpc64/power8/strcmp.S b/sysdeps/powerpc/powerpc64/power8/strcmp.S -index 15e7351d1b..d592266d1d 100644 ---- a/sysdeps/powerpc/powerpc64/power8/strcmp.S -+++ b/sysdeps/powerpc/powerpc64/power8/strcmp.S -@@ -31,6 +31,7 @@ - 64K as default, the page cross handling assumes minimum page size of - 4k. */ - -+ .machine power8 - ENTRY_TOCLESS (STRCMP, 4) - li r0,0 - --- -2.41.0 diff --git a/contrib/guix/patches/glibc-2.27-riscv64-Use-__has_include-to-include-asm-syscalls.h.patch b/contrib/guix/patches/glibc-2.27-riscv64-Use-__has_include-to-include-asm-syscalls.h.patch deleted file mode 100644 index ab8ae9c0..00000000 --- a/contrib/guix/patches/glibc-2.27-riscv64-Use-__has_include-to-include-asm-syscalls.h.patch +++ /dev/null @@ -1,78 +0,0 @@ -Note that this has been modified from the original commit, to use __has_include -instead of __has_include__, as the later was causing build failures with GCC 10. -See also: http://lists.busybox.net/pipermail/buildroot/2020-July/590376.html. - -https://sourceware.org/git/?p=glibc.git;a=commit;h=0b9c84906f653978fb8768c7ebd0ee14a47e662e - -This patch can be dropped when we are building with glibc 2.28+. - -From 562c52cc81a4e456a62e6455feb32732049e9070 Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" -Date: Mon, 31 Dec 2018 09:26:42 -0800 -Subject: [PATCH] riscv: Use __has_include__ to include [BZ - #24022] - - has been removed by - -commit 27f8899d6002e11a6e2d995e29b8deab5aa9cc25 -Author: David Abdurachmanov -Date: Thu Nov 8 20:02:39 2018 +0100 - - riscv: add asm/unistd.h UAPI header - - Marcin Juszkiewicz reported issues while generating syscall table for riscv - using 4.20-rc1. The patch refactors our unistd.h files to match some other - architectures. - - - Add asm/unistd.h UAPI header, which has __ARCH_WANT_NEW_STAT only for 64-bit - - Remove asm/syscalls.h UAPI header and merge to asm/unistd.h - - Adjust kernel asm/unistd.h - - So now asm/unistd.h UAPI header should show all syscalls for riscv. - - may be restored by - -Subject: [PATCH] riscv: restore asm/syscalls.h UAPI header -Date: Tue, 11 Dec 2018 09:09:35 +0100 - -UAPI header asm/syscalls.h was merged into UAPI asm/unistd.h header, -which did resolve issue with missing syscalls macros resulting in -glibc (2.28) build failure. It also broke glibc in a different way: -asm/syscalls.h is being used by glibc. I noticed this while doing -Fedora 30/Rawhide mass rebuild. - -The patch returns asm/syscalls.h header and incl. it into asm/unistd.h. -I plan to send a patch to glibc to use asm/unistd.h instead of -asm/syscalls.h - -In the meantime, we use __has_include__, which was added to GCC 5, to -check if exists before including it. Tested with -build-many-glibcs.py for riscv against kernel 4.19.12 and 4.20-rc7. - - [BZ #24022] - * sysdeps/unix/sysv/linux/riscv/flush-icache.c: Check if - exists with __has_include__ before including it. ---- - sysdeps/unix/sysv/linux/riscv/flush-icache.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/sysdeps/unix/sysv/linux/riscv/flush-icache.c b/sysdeps/unix/sysv/linux/riscv/flush-icache.c -index d612ef4c6c..0b2042620b 100644 ---- a/sysdeps/unix/sysv/linux/riscv/flush-icache.c -+++ b/sysdeps/unix/sysv/linux/riscv/flush-icache.c -@@ -21,7 +21,11 @@ - #include - #include - #include --#include -+#if __has_include () -+# include -+#else -+# include -+#endif - - typedef int (*func_type) (void *, void *, unsigned long int); - --- -2.31.1 - diff --git a/contrib/guix/patches/glibc-2.27-guix-prefix.patch b/contrib/guix/patches/glibc-guix-prefix.patch similarity index 78% rename from contrib/guix/patches/glibc-2.27-guix-prefix.patch rename to contrib/guix/patches/glibc-guix-prefix.patch index dc515907..60e12ca5 100644 --- a/contrib/guix/patches/glibc-2.27-guix-prefix.patch +++ b/contrib/guix/patches/glibc-guix-prefix.patch @@ -4,19 +4,13 @@ hash for the same package will differ when on different architectures. In order to be reproducible regardless of the architecture used to build the package, map all guix store prefixes to something fixed, e.g. /usr. -We might be able to drop this in favour of using --with-nonshared-cflags -when we begin using newer versions of glibc. - --- a/Makeconfig +++ b/Makeconfig -@@ -992,6 +992,10 @@ object-suffixes := +@@ -1007,6 +1007,7 @@ object-suffixes := CPPFLAGS-.o = $(pic-default) # libc.a must be compiled with -fPIE/-fpie for static PIE. CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) $(pie-default) -+ -+# Map Guix store paths to /usr +CFLAGS-.o += `find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;` -+ libtype.o := lib%.a object-suffixes += .o ifeq (yes,$(build-shared)) diff --git a/contrib/guix/patches/lief-scikit-0-9.patch b/contrib/guix/patches/lief-scikit-0-9.patch new file mode 100644 index 00000000..71e61783 --- /dev/null +++ b/contrib/guix/patches/lief-scikit-0-9.patch @@ -0,0 +1,21 @@ +Partially revert f23ced2f4ffc170d0a6f40ff4a1bee575e3447cf + +Restore compat with python-scikit-build-core 0.9.x +Can be dropped when using python-scikit-build-core >= 0.10.x + +--- a/api/python/backend/setup.py ++++ b/api/python/backend/setup.py +@@ -101,12 +101,12 @@ def _get_hooked_config(is_editable: bool) -> Optional[dict[str, Union[str, List[ + config_settings = { + "logging.level": "DEBUG", + "build-dir": config.build_dir, +- "build.targets": config.build.targets, + "install.strip": config.strip, + "backport.find-python": "0", + "wheel.py-api": config.build.py_api, + "cmake.source-dir": SRC_DIR.as_posix(), + "cmake.build-type": config.build.build_type, ++ "cmake.targets": config.build.targets, + "cmake.args": [ + *config.cmake_generator, + *config.get_cmake_args(is_editable), diff --git a/contrib/guix/patches/vmov-alignment.patch b/contrib/guix/patches/vmov-alignment.patch deleted file mode 100644 index 7976b864..00000000 --- a/contrib/guix/patches/vmov-alignment.patch +++ /dev/null @@ -1,268 +0,0 @@ -Description: Use unaligned VMOV instructions -Author: Stephen Kitt -Bug-Debian: https://bugs.debian.org/939559 -See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412 - -Based on a patch originally by Claude Heiland-Allen - ---- a/gcc/config/i386/sse.md -+++ b/gcc/config/i386/sse.md -@@ -1058,17 +1058,11 @@ - { - if (FLOAT_MODE_P (GET_MODE_INNER (mode))) - { -- if (misaligned_operand (operands[1], mode)) -- return "vmovu\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"; -- else -- return "vmova\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"; -+ return "vmovu\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"; - } - else - { -- if (misaligned_operand (operands[1], mode)) -- return "vmovdqu\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"; -- else -- return "vmovdqa\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"; -+ return "vmovdqu\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"; - } - } - [(set_attr "type" "ssemov") -@@ -1184,17 +1178,11 @@ - { - if (FLOAT_MODE_P (GET_MODE_INNER (mode))) - { -- if (misaligned_operand (operands[0], mode)) -- return "vmovu\t{%1, %0%{%2%}|%0%{%2%}, %1}"; -- else -- return "vmova\t{%1, %0%{%2%}|%0%{%2%}, %1}"; -+ return "vmovu\t{%1, %0%{%2%}|%0%{%2%}, %1}"; - } - else - { -- if (misaligned_operand (operands[0], mode)) -- return "vmovdqu\t{%1, %0%{%2%}|%0%{%2%}, %1}"; -- else -- return "vmovdqa\t{%1, %0%{%2%}|%0%{%2%}, %1}"; -+ return "vmovdqu\t{%1, %0%{%2%}|%0%{%2%}, %1}"; - } - } - [(set_attr "type" "ssemov") -@@ -7806,7 +7794,7 @@ - "TARGET_SSE && !(MEM_P (operands[0]) && MEM_P (operands[1]))" - "@ - %vmovlps\t{%1, %0|%q0, %1} -- %vmovaps\t{%1, %0|%0, %1} -+ %vmovups\t{%1, %0|%0, %1} - %vmovlps\t{%1, %d0|%d0, %q1}" - [(set_attr "type" "ssemov") - (set_attr "prefix" "maybe_vex") -@@ -13997,29 +13985,15 @@ - switch (mode) - { - case E_V8DFmode: -- if (misaligned_operand (operands[2], mode)) -- return "vmovupd\t{%2, %x0|%x0, %2}"; -- else -- return "vmovapd\t{%2, %x0|%x0, %2}"; -+ return "vmovupd\t{%2, %x0|%x0, %2}"; - case E_V16SFmode: -- if (misaligned_operand (operands[2], mode)) -- return "vmovups\t{%2, %x0|%x0, %2}"; -- else -- return "vmovaps\t{%2, %x0|%x0, %2}"; -+ return "vmovups\t{%2, %x0|%x0, %2}"; - case E_V8DImode: -- if (misaligned_operand (operands[2], mode)) -- return which_alternative == 2 ? "vmovdqu64\t{%2, %x0|%x0, %2}" -+ return which_alternative == 2 ? "vmovdqu64\t{%2, %x0|%x0, %2}" - : "vmovdqu\t{%2, %x0|%x0, %2}"; -- else -- return which_alternative == 2 ? "vmovdqa64\t{%2, %x0|%x0, %2}" -- : "vmovdqa\t{%2, %x0|%x0, %2}"; - case E_V16SImode: -- if (misaligned_operand (operands[2], mode)) -- return which_alternative == 2 ? "vmovdqu32\t{%2, %x0|%x0, %2}" -+ return which_alternative == 2 ? "vmovdqu32\t{%2, %x0|%x0, %2}" - : "vmovdqu\t{%2, %x0|%x0, %2}"; -- else -- return which_alternative == 2 ? "vmovdqa32\t{%2, %x0|%x0, %2}" -- : "vmovdqa\t{%2, %x0|%x0, %2}"; - default: - gcc_unreachable (); - } -@@ -21225,63 +21199,27 @@ - switch (get_attr_mode (insn)) - { - case MODE_V16SF: -- if (misaligned_operand (operands[1], mode)) -- return "vmovups\t{%1, %t0|%t0, %1}"; -- else -- return "vmovaps\t{%1, %t0|%t0, %1}"; -+ return "vmovups\t{%1, %t0|%t0, %1}"; - case MODE_V8DF: -- if (misaligned_operand (operands[1], mode)) -- return "vmovupd\t{%1, %t0|%t0, %1}"; -- else -- return "vmovapd\t{%1, %t0|%t0, %1}"; -+ return "vmovupd\t{%1, %t0|%t0, %1}"; - case MODE_V8SF: -- if (misaligned_operand (operands[1], mode)) -- return "vmovups\t{%1, %x0|%x0, %1}"; -- else -- return "vmovaps\t{%1, %x0|%x0, %1}"; -+ return "vmovups\t{%1, %x0|%x0, %1}"; - case MODE_V4DF: -- if (misaligned_operand (operands[1], mode)) -- return "vmovupd\t{%1, %x0|%x0, %1}"; -- else -- return "vmovapd\t{%1, %x0|%x0, %1}"; -+ return "vmovupd\t{%1, %x0|%x0, %1}"; - case MODE_XI: -- if (misaligned_operand (operands[1], mode)) -- { -- if (which_alternative == 2) -- return "vmovdqu\t{%1, %t0|%t0, %1}"; -- else if (GET_MODE_SIZE (mode) == 8) -- return "vmovdqu64\t{%1, %t0|%t0, %1}"; -- else -- return "vmovdqu32\t{%1, %t0|%t0, %1}"; -- } -+ if (which_alternative == 2) -+ return "vmovdqu\t{%1, %t0|%t0, %1}"; -+ else if (GET_MODE_SIZE (mode) == 8) -+ return "vmovdqu64\t{%1, %t0|%t0, %1}"; - else -- { -- if (which_alternative == 2) -- return "vmovdqa\t{%1, %t0|%t0, %1}"; -- else if (GET_MODE_SIZE (mode) == 8) -- return "vmovdqa64\t{%1, %t0|%t0, %1}"; -- else -- return "vmovdqa32\t{%1, %t0|%t0, %1}"; -- } -+ return "vmovdqu32\t{%1, %t0|%t0, %1}"; - case MODE_OI: -- if (misaligned_operand (operands[1], mode)) -- { -- if (which_alternative == 2) -- return "vmovdqu\t{%1, %x0|%x0, %1}"; -- else if (GET_MODE_SIZE (mode) == 8) -- return "vmovdqu64\t{%1, %x0|%x0, %1}"; -- else -- return "vmovdqu32\t{%1, %x0|%x0, %1}"; -- } -+ if (which_alternative == 2) -+ return "vmovdqu\t{%1, %x0|%x0, %1}"; -+ else if (GET_MODE_SIZE (mode) == 8) -+ return "vmovdqu64\t{%1, %x0|%x0, %1}"; - else -- { -- if (which_alternative == 2) -- return "vmovdqa\t{%1, %x0|%x0, %1}"; -- else if (GET_MODE_SIZE (mode) == 8) -- return "vmovdqa64\t{%1, %x0|%x0, %1}"; -- else -- return "vmovdqa32\t{%1, %x0|%x0, %1}"; -- } -+ return "vmovdqu32\t{%1, %x0|%x0, %1}"; - default: - gcc_unreachable (); - } ---- a/gcc/config/i386/i386.c -+++ b/gcc/config/i386/i386.c -@@ -4981,13 +4981,13 @@ - switch (type) - { - case opcode_int: -- opcode = misaligned_p ? "vmovdqu32" : "vmovdqa32"; -+ opcode = "vmovdqu32"; - break; - case opcode_float: -- opcode = misaligned_p ? "vmovups" : "vmovaps"; -+ opcode = "vmovups"; - break; - case opcode_double: -- opcode = misaligned_p ? "vmovupd" : "vmovapd"; -+ opcode = "vmovupd"; - break; - } - } -@@ -4996,16 +4996,16 @@ - switch (scalar_mode) - { - case E_SFmode: -- opcode = misaligned_p ? "%vmovups" : "%vmovaps"; -+ opcode = "%vmovups"; - break; - case E_DFmode: -- opcode = misaligned_p ? "%vmovupd" : "%vmovapd"; -+ opcode = "%vmovupd"; - break; - case E_TFmode: - if (evex_reg_p) -- opcode = misaligned_p ? "vmovdqu64" : "vmovdqa64"; -+ opcode = "vmovdqu64"; - else -- opcode = misaligned_p ? "%vmovdqu" : "%vmovdqa"; -+ opcode = "%vmovdqu"; - break; - default: - gcc_unreachable (); -@@ -5017,48 +5017,32 @@ - { - case E_QImode: - if (evex_reg_p) -- opcode = (misaligned_p -- ? (TARGET_AVX512BW -- ? "vmovdqu8" -- : "vmovdqu64") -- : "vmovdqa64"); -+ opcode = TARGET_AVX512BW ? "vmovdqu8" : "vmovdqu64"; - else -- opcode = (misaligned_p -- ? (TARGET_AVX512BW -- ? "vmovdqu8" -- : "%vmovdqu") -- : "%vmovdqa"); -+ opcode = TARGET_AVX512BW ? "vmovdqu8" : "%vmovdqu"; - break; - case E_HImode: - if (evex_reg_p) -- opcode = (misaligned_p -- ? (TARGET_AVX512BW -- ? "vmovdqu16" -- : "vmovdqu64") -- : "vmovdqa64"); -+ opcode = TARGET_AVX512BW ? "vmovdqu16" : "vmovdqu64"; - else -- opcode = (misaligned_p -- ? (TARGET_AVX512BW -- ? "vmovdqu16" -- : "%vmovdqu") -- : "%vmovdqa"); -+ opcode = TARGET_AVX512BW ? "vmovdqu16" : "%vmovdqu"; - break; - case E_SImode: - if (evex_reg_p) -- opcode = misaligned_p ? "vmovdqu32" : "vmovdqa32"; -+ opcode = "vmovdqu32"; - else -- opcode = misaligned_p ? "%vmovdqu" : "%vmovdqa"; -+ opcode = "%vmovdqu"; - break; - case E_DImode: - case E_TImode: - case E_OImode: - if (evex_reg_p) -- opcode = misaligned_p ? "vmovdqu64" : "vmovdqa64"; -+ opcode = "vmovdqu64"; - else -- opcode = misaligned_p ? "%vmovdqu" : "%vmovdqa"; -+ opcode = "%vmovdqu"; - break; - case E_XImode: -- opcode = misaligned_p ? "vmovdqu64" : "vmovdqa64"; -+ opcode = "vmovdqu64"; - break; - default: - gcc_unreachable (); diff --git a/contrib/guix/patches/winpthreads-remap-guix-store.patch b/contrib/guix/patches/winpthreads-remap-guix-store.patch new file mode 100644 index 00000000..e1f1a6eb --- /dev/null +++ b/contrib/guix/patches/winpthreads-remap-guix-store.patch @@ -0,0 +1,17 @@ +Without ffile-prefix-map, the debug symbols will contain paths for the +guix store which will include the hashes of each package. However, the +hash for the same package will differ when on different architectures. +In order to be reproducible regardless of the architecture used to build +the package, map all guix store prefixes to something fixed, e.g. /usr. + +--- a/mingw-w64-libraries/winpthreads/Makefile.in ++++ b/mingw-w64-libraries/winpthreads/Makefile.in +@@ -478,7 +478,7 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + SUBDIRS = . tests +-AM_CFLAGS = -Wall -DWIN32_LEAN_AND_MEAN $(am__append_1) ++AM_CFLAGS = -Wall -DWIN32_LEAN_AND_MEAN $(am__append_1) $(shell find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;) + ACLOCAL_AMFLAGS = -I m4 + lib_LTLIBRARIES = libwinpthread.la + include_HEADERS = include/pthread.h include/sched.h include/semaphore.h include/pthread_unistd.h include/pthread_time.h include/pthread_compat.h include/pthread_signal.h diff --git a/contrib/devtools/security-check.py b/contrib/guix/security-check.py similarity index 64% rename from contrib/devtools/security-check.py rename to contrib/guix/security-check.py index f90fa578..8e8285fe 100755 --- a/contrib/devtools/security-check.py +++ b/contrib/guix/security-check.py @@ -6,9 +6,13 @@ Perform basic security checks on a series of executables. Exit status will be 0 if successful, and the program will be silent. Otherwise the exit status will be 1 and it will log which executables failed which checks. + +Example usage: + + find ../path/to/guix/binaries -type f -executable | xargs python3 contrib/guix/security-check.py ''' +import re import sys -from typing import List import lief @@ -26,34 +30,34 @@ def check_ELF_RELRO(binary) -> bool: # 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 - if segment.type == lief.ELF.SEGMENT_TYPES.GNU_RELRO: + if segment.type == lief.ELF.Segment.TYPE.GNU_RELRO: have_gnu_relro = True have_bindnow = False try: - flags = binary.get(lief.ELF.DYNAMIC_TAGS.FLAGS) - if flags.value & lief.ELF.DYNAMIC_FLAGS.BIND_NOW: + flags = binary.get(lief.ELF.DynamicEntry.TAG.FLAGS) + if flags.has(lief.ELF.DynamicEntryFlags.FLAG.BIND_NOW): have_bindnow = True except Exception: have_bindnow = False return have_gnu_relro and have_bindnow -def check_ELF_Canary(binary) -> bool: +def check_ELF_CANARY(binary) -> bool: ''' Check for use of stack canary ''' return binary.has_symbol('__stack_chk_fail') -def check_ELF_separate_code(binary): +def check_ELF_SEPARATE_CODE(binary): ''' Check that sections are appropriately separated in virtual memory, based on their permissions. This checks for missing -Wl,-z,separate-code and potentially other problems. ''' - R = lief.ELF.SEGMENT_FLAGS.R - W = lief.ELF.SEGMENT_FLAGS.W - E = lief.ELF.SEGMENT_FLAGS.X + R = lief.ELF.Segment.FLAGS.R + W = lief.ELF.Segment.FLAGS.W + E = lief.ELF.Segment.FLAGS.X EXPECTED_FLAGS = { # Read + execute '.init': R | E, @@ -95,7 +99,7 @@ def check_ELF_separate_code(binary): # and for each section, remember the flags of the associated program header. flags_per_section = {} for segment in binary.segments: - if segment.type == lief.ELF.SEGMENT_TYPES.LOAD: + if segment.type == lief.ELF.Segment.TYPE.LOAD: for section in segment.sections: flags_per_section[section.name] = segment.flags # Spot-check ELF LOAD program header flags per section @@ -106,7 +110,7 @@ def check_ELF_separate_code(binary): return False return True -def check_ELF_control_flow(binary) -> bool: +def check_ELF_CONTROL_FLOW(binary) -> bool: ''' Check for control flow instrumentation ''' @@ -117,21 +121,42 @@ def check_ELF_control_flow(binary) -> bool: return True return False +def check_ELF_FORTIFY(binary) -> bool: + + # bitcoin-util does not currently contain any fortified functions + if 'Bitcoin Core bitcoin-util utility version ' in binary.strings: + return True + # bitcoin wrapper does not currently contain any fortified functions + if '--monolithic' in binary.strings: + return True + + chk_funcs = set() + + for sym in binary.imported_symbols: + match = re.search(r'__[a-z]*_chk', sym.name) + if match: + chk_funcs.add(match.group(0)) + + # ignore stack-protector + chk_funcs.discard('__stack_chk') + + return len(chk_funcs) >= 1 + def check_PE_DYNAMIC_BASE(binary) -> bool: '''PIE: DllCharacteristics bit 0x40 signifies dynamicbase (ASLR)''' - return lief.PE.DLL_CHARACTERISTICS.DYNAMIC_BASE in binary.optional_header.dll_characteristics_lists + return lief.PE.OptionalHeader.DLL_CHARACTERISTICS.DYNAMIC_BASE in binary.optional_header.dll_characteristics_lists # 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(binary) -> bool: '''PIE: DllCharacteristics bit 0x20 signifies high-entropy ASLR''' - return lief.PE.DLL_CHARACTERISTICS.HIGH_ENTROPY_VA in binary.optional_header.dll_characteristics_lists + return lief.PE.OptionalHeader.DLL_CHARACTERISTICS.HIGH_ENTROPY_VA in binary.optional_header.dll_characteristics_lists def check_PE_RELOC_SECTION(binary) -> bool: '''Check for a reloc section. This is required for functional ASLR.''' return binary.has_relocations -def check_PE_control_flow(binary) -> bool: +def check_PE_CONTROL_FLOW(binary) -> bool: ''' Check for control flow instrumentation ''' @@ -146,7 +171,7 @@ def check_PE_control_flow(binary) -> bool: return True return False -def check_PE_Canary(binary) -> bool: +def check_PE_CANARY(binary) -> bool: ''' Check for use of stack canary ''' @@ -156,7 +181,7 @@ def check_MACHO_NOUNDEFS(binary) -> bool: ''' Check for no undefined references. ''' - return binary.header.has(lief.MachO.HEADER_FLAGS.NOUNDEFS) + return binary.header.has(lief.MachO.Header.FLAGS.NOUNDEFS) def check_MACHO_FIXUP_CHAINS(binary) -> bool: ''' @@ -164,7 +189,7 @@ def check_MACHO_FIXUP_CHAINS(binary) -> bool: ''' return binary.has_dyld_chained_fixups -def check_MACHO_Canary(binary) -> bool: +def check_MACHO_CANARY(binary) -> bool: ''' Check for use of stack canary ''' @@ -181,9 +206,15 @@ def check_NX(binary) -> bool: ''' Check for no stack execution ''' - return binary.has_nx -def check_MACHO_control_flow(binary) -> bool: + # binary.has_nx checks are only for the stack, but MachO binaries might + # have executable heaps. + if binary.format == lief.Binary.FORMATS.MACHO: + return binary.concrete.has_nx_stack and binary.concrete.has_nx_heap + else: + return binary.has_nx + +def check_MACHO_CONTROL_FLOW(binary) -> bool: ''' Check for control flow instrumentation ''' @@ -193,12 +224,23 @@ def check_MACHO_control_flow(binary) -> bool: return True return False +def check_MACHO_BRANCH_PROTECTION(binary) -> bool: + ''' + Check for branch protection instrumentation + ''' + content = binary.get_content_from_virtual_address(binary.entrypoint, 4, lief.Binary.VA_TYPES.AUTO) + + if content.tolist() == [95, 36, 3, 213]: # bti + return True + return False + BASE_ELF = [ + ('FORTIFY', check_ELF_FORTIFY), ('PIE', check_PIE), ('NX', check_NX), ('RELRO', check_ELF_RELRO), - ('Canary', check_ELF_Canary), - ('separate_code', check_ELF_separate_code), + ('CANARY', check_ELF_CANARY), + ('SEPARATE_CODE', check_ELF_SEPARATE_CODE), ] BASE_PE = [ @@ -207,63 +249,48 @@ def check_MACHO_control_flow(binary) -> bool: ('HIGH_ENTROPY_VA', check_PE_HIGH_ENTROPY_VA), ('NX', check_NX), ('RELOC_SECTION', check_PE_RELOC_SECTION), - ('CONTROL_FLOW', check_PE_control_flow), - ('Canary', check_PE_Canary), + ('CONTROL_FLOW', check_PE_CONTROL_FLOW), + ('CANARY', check_PE_CANARY), ] BASE_MACHO = [ ('NOUNDEFS', check_MACHO_NOUNDEFS), - ('Canary', check_MACHO_Canary), + ('CANARY', check_MACHO_CANARY), ('FIXUP_CHAINS', check_MACHO_FIXUP_CHAINS), ] CHECKS = { - lief.EXE_FORMATS.ELF: { - lief.ARCHITECTURES.X86: BASE_ELF + [('CONTROL_FLOW', check_ELF_control_flow)], - lief.ARCHITECTURES.ARM: BASE_ELF, - lief.ARCHITECTURES.ARM64: BASE_ELF, - lief.ARCHITECTURES.PPC: BASE_ELF, - lief.ARCHITECTURES.RISCV: BASE_ELF, + lief.Binary.FORMATS.ELF: { + lief.Header.ARCHITECTURES.X86_64: BASE_ELF + [('CONTROL_FLOW', check_ELF_CONTROL_FLOW)], + lief.Header.ARCHITECTURES.ARM: BASE_ELF, + lief.Header.ARCHITECTURES.ARM64: BASE_ELF, + lief.Header.ARCHITECTURES.PPC64: BASE_ELF, + lief.Header.ARCHITECTURES.RISCV: BASE_ELF, }, - lief.EXE_FORMATS.PE: { - lief.ARCHITECTURES.X86: BASE_PE, + lief.Binary.FORMATS.PE: { + lief.Header.ARCHITECTURES.X86_64: BASE_PE, }, - lief.EXE_FORMATS.MACHO: { - lief.ARCHITECTURES.X86: BASE_MACHO + [('PIE', check_PIE), + lief.Binary.FORMATS.MACHO: { + lief.Header.ARCHITECTURES.X86_64: BASE_MACHO + [('PIE', check_PIE), ('NX', check_NX), - ('CONTROL_FLOW', check_MACHO_control_flow)], - lief.ARCHITECTURES.ARM64: BASE_MACHO, + ('CONTROL_FLOW', check_MACHO_CONTROL_FLOW)], + lief.Header.ARCHITECTURES.ARM64: BASE_MACHO + [('BRANCH_PROTECTION', check_MACHO_BRANCH_PROTECTION)], } } if __name__ == '__main__': retval: int = 0 for filename in sys.argv[1:]: - try: - binary = lief.parse(filename) - etype = binary.format - arch = binary.abstract.header.architecture - binary.concrete - - if etype == lief.EXE_FORMATS.UNKNOWN: - print(f'{filename}: unknown executable format') - retval = 1 - continue - - if arch == lief.ARCHITECTURES.NONE: - print(f'{filename}: unknown architecture') - retval = 1 - continue - - failed: List[str] = [] - for (name, func) in CHECKS[etype][arch]: - if not func(binary): - failed.append(name) - if failed: - print(f'{filename}: failed {" ".join(failed)}') - retval = 1 - except IOError: - print(f'{filename}: cannot open') + binary = lief.parse(filename) + + etype = binary.format + arch = binary.abstract.header.architecture + + failed: list[str] = [] + for (name, func) in CHECKS[etype][arch]: + if not func(binary): + failed.append(name) + if failed: + print(f'{filename}: failed {" ".join(failed)}') retval = 1 sys.exit(retval) - diff --git a/contrib/devtools/symbol-check.py b/contrib/guix/symbol-check.py similarity index 63% rename from contrib/devtools/symbol-check.py rename to contrib/guix/symbol-check.py index 6d74a458..91241eda 100755 --- a/contrib/devtools/symbol-check.py +++ b/contrib/guix/symbol-check.py @@ -8,41 +8,40 @@ Example usage: - find ../path/to/binaries -type f -executable | xargs python3 contrib/devtools/symbol-check.py + find ../path/to/guix/binaries -type f -executable | xargs python3 contrib/guix/symbol-check.py ''' import sys -from typing import List, Dict import lief -# Debian 10 (Buster) EOL: 2024. https://wiki.debian.org/LTS +# Debian 11 (Bullseye) EOL: 2026. https://wiki.debian.org/LTS # -# - libgcc version 8.3.0 (https://packages.debian.org/search?suite=buster&arch=any&searchon=names&keywords=libgcc1) -# - libc version 2.28 (https://packages.debian.org/search?suite=buster&arch=any&searchon=names&keywords=libc6) +# - libgcc version 10.2.1 (https://packages.debian.org/bullseye/libgcc-s1) +# - libc version 2.31 (https://packages.debian.org/source/bullseye/glibc) # -# Ubuntu 18.04 (Bionic) EOL: 2028. https://wiki.ubuntu.com/ReleaseTeam +# Ubuntu 20.04 (Focal) EOL: 2030. https://wiki.ubuntu.com/ReleaseTeam # -# - libgcc version 8.4.0 (https://packages.ubuntu.com/bionic/libgcc1) -# - libc version 2.27 (https://packages.ubuntu.com/bionic/libc6) +# - libgcc version 10.5.0 (https://packages.ubuntu.com/focal/libgcc1) +# - libc version 2.31 (https://packages.ubuntu.com/focal/libc6) # -# CentOS Stream 8 EOL: 2024. https://wiki.centos.org/About/Product +# CentOS Stream 9 EOL: 2027. https://www.centos.org/cl-vs-cs/#end-of-life # -# - libgcc version 8.5.0 (http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/) -# - libc version 2.28 (http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/) +# - libgcc version 12.2.1 (https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/) +# - libc version 2.34 (https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/) # # See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html for more info. MAX_VERSIONS = { -'GCC': (4,8,0), +'GCC': (4,3,0), 'GLIBC': { - lief.ELF.ARCH.x86_64: (2,27), - lief.ELF.ARCH.ARM: (2,27), - lief.ELF.ARCH.AARCH64:(2,27), - lief.ELF.ARCH.PPC64: (2,27), - lief.ELF.ARCH.RISCV: (2,27), + lief.ELF.ARCH.X86_64: (2,31), + lief.ELF.ARCH.ARM: (2,31), + lief.ELF.ARCH.AARCH64:(2,31), + lief.ELF.ARCH.PPC64: (2,31), + lief.ELF.ARCH.RISCV: (2,31), }, 'LIBATOMIC': (1,0), -'V': (0,5,0), # xkb (coordinate-qt only) +'V': (0,5,0), # xkb (bitcoin-qt only) } # Ignore symbols that are exported as part of every executable @@ -53,47 +52,47 @@ # Expected linker-loader names can be found here: # https://sourceware.org/glibc/wiki/ABIList?action=recall&rev=16 -ELF_INTERPRETER_NAMES: Dict[lief.ELF.ARCH, Dict[lief.ENDIANNESS, str]] = { - lief.ELF.ARCH.x86_64: { - lief.ENDIANNESS.LITTLE: "/lib64/ld-linux-x86-64.so.2", +ELF_INTERPRETER_NAMES: dict[lief.ELF.ARCH, dict[lief.Header.ENDIANNESS, str]] = { + lief.ELF.ARCH.X86_64: { + lief.Header.ENDIANNESS.LITTLE: "/lib64/ld-linux-x86-64.so.2", }, lief.ELF.ARCH.ARM: { - lief.ENDIANNESS.LITTLE: "/lib/ld-linux-armhf.so.3", + lief.Header.ENDIANNESS.LITTLE: "/lib/ld-linux-armhf.so.3", }, lief.ELF.ARCH.AARCH64: { - lief.ENDIANNESS.LITTLE: "/lib/ld-linux-aarch64.so.1", + lief.Header.ENDIANNESS.LITTLE: "/lib/ld-linux-aarch64.so.1", }, lief.ELF.ARCH.PPC64: { - lief.ENDIANNESS.BIG: "/lib64/ld64.so.1", - lief.ENDIANNESS.LITTLE: "/lib64/ld64.so.2", + lief.Header.ENDIANNESS.BIG: "/lib64/ld64.so.1", + lief.Header.ENDIANNESS.LITTLE: "/lib64/ld64.so.2", }, lief.ELF.ARCH.RISCV: { - lief.ENDIANNESS.LITTLE: "/lib/ld-linux-riscv64-lp64d.so.1", + lief.Header.ENDIANNESS.LITTLE: "/lib/ld-linux-riscv64-lp64d.so.1", }, } -ELF_ABIS: Dict[lief.ELF.ARCH, Dict[lief.ENDIANNESS, List[int]]] = { - lief.ELF.ARCH.x86_64: { - lief.ENDIANNESS.LITTLE: [3,2,0], +ELF_ABIS: dict[lief.ELF.ARCH, dict[lief.Header.ENDIANNESS, list[int]]] = { + lief.ELF.ARCH.X86_64: { + lief.Header.ENDIANNESS.LITTLE: [3,2,0], }, lief.ELF.ARCH.ARM: { - lief.ENDIANNESS.LITTLE: [3,2,0], + lief.Header.ENDIANNESS.LITTLE: [3,2,0], }, lief.ELF.ARCH.AARCH64: { - lief.ENDIANNESS.LITTLE: [3,7,0], + lief.Header.ENDIANNESS.LITTLE: [3,7,0], }, lief.ELF.ARCH.PPC64: { - lief.ENDIANNESS.LITTLE: [3,10,0], - lief.ENDIANNESS.BIG: [3,2,0], + lief.Header.ENDIANNESS.LITTLE: [3,10,0], + lief.Header.ENDIANNESS.BIG: [3,2,0], }, lief.ELF.ARCH.RISCV: { - lief.ENDIANNESS.LITTLE: [4,15,0], + lief.Header.ENDIANNESS.LITTLE: [4,15,0], }, } # Allowed NEEDED libraries ELF_ALLOWED_LIBRARIES = { -# coordinated and coordinate-qt +# bitcoind and bitcoin-qt 'libgcc_s.so.1', # GCC base support 'libc.so.6', # C library 'libpthread.so.0', # threading @@ -106,13 +105,14 @@ 'ld64.so.1', # POWER64 ABIv1 dynamic linker 'ld64.so.2', # POWER64 ABIv2 dynamic linker 'ld-linux-riscv64-lp64d.so.1', # 64-bit RISC-V dynamic linker -# coordinate-qt only +# bitcoin-qt only 'libxcb.so.1', # part of X11 'libxkbcommon.so.0', # keyboard keymapping 'libxkbcommon-x11.so.0', # keyboard keymapping 'libfontconfig.so.1', # font support 'libfreetype.so.6', # font parsing 'libdl.so.2', # programming interface to dynamic linker +'libxcb-cursor.so.0', 'libxcb-icccm.so.4', 'libxcb-image.so.0', 'libxcb-shm.so.0', @@ -128,10 +128,10 @@ } MACHO_ALLOWED_LIBRARIES = { -# coordinated and coordinate-qt +# bitcoind and bitcoin-qt 'libc++.1.dylib', # C++ Standard Library 'libSystem.B.dylib', # libc, libm, libpthread, libinfo -# coordinate-qt only +# bitcoin-qt only 'AppKit', # user interface 'ApplicationServices', # common application tasks. 'Carbon', # deprecated c back-compat API @@ -147,19 +147,31 @@ 'IOSurface', # cross process image/drawing buffers 'libobjc.A.dylib', # Objective-C runtime library 'Metal', # 3D graphics -'Security', # access control and authentication 'QuartzCore', # animation +'Security', # access control and authentication +'UniformTypeIdentifiers', # collection of types that map to MIME and file types } PE_ALLOWED_LIBRARIES = { -'ADVAPI32.dll', # security & registry +'ADVAPI32.dll', # legacy security & registry +'bcrypt.dll', # newer security and identity API 'IPHLPAPI.DLL', # IP helper API 'KERNEL32.dll', # win32 base APIs 'msvcrt.dll', # C standard library for MSVC 'SHELL32.dll', # shell API 'WS2_32.dll', # sockets -# coordinate-qt only +# bitcoin-qt only +'api-ms-win-core-synch-l1-2-0.dll', # Synchronization Primitives API +'api-ms-win-core-winrt-l1-1-0.dll', # Windows Runtime API +'api-ms-win-core-winrt-string-l1-1-0.dll', # WinRT String API +'AUTHZ.dll', # Windows Authorization Framework +'comdlg32.dll', # Common Dialog Box Library +'d3d11.dll', # Direct3D 11 API +'d3d12.dll', # Direct3D 12 API +'d3d9.dll', # Direct3D 9 API 'dwmapi.dll', # desktop window manager +'DWrite.dll', # DirectX Typography Services +'dxgi.dll', # DirectX Graphics Infrastructure 'GDI32.dll', # graphics device interface 'IMM32.dll', # input method editor 'NETAPI32.dll', # network management @@ -172,6 +184,8 @@ 'VERSION.dll', # version checking 'WINMM.dll', # WinMM audio API 'WTSAPI32.dll', # Remote Desktop +'SETUPAPI.dll', # Windows Setup API +'SHCORE.dll', # Stream Handler Core } def check_version(max_versions, version, arch) -> bool: @@ -209,10 +223,15 @@ def check_exported_symbols(binary) -> bool: name = symbol.name if binary.header.machine_type == lief.ELF.ARCH.RISCV or name in IGNORE_EXPORTS: continue - print(f'{binary.name}: export of symbol {name} not allowed!') + print(f'{filename}: export of symbol {name} not allowed!') ok = False return ok +def check_RUNPATH(binary) -> bool: + assert binary.get(lief.ELF.DynamicEntry.TAG.RUNPATH) is None + assert binary.get(lief.ELF.DynamicEntry.TAG.RPATH) is None + return True + def check_ELF_libraries(binary) -> bool: ok: bool = True for library in binary.libraries: @@ -231,17 +250,17 @@ def check_MACHO_libraries(binary) -> bool: return ok def check_MACHO_min_os(binary) -> bool: - if binary.build_version.minos == [11,0,0]: + if binary.build_version.minos == [13,0,0]: return True return False def check_MACHO_sdk(binary) -> bool: - if binary.build_version.sdk == [11, 0, 0]: + if binary.build_version.sdk == [14, 0, 0]: return True return False -def check_MACHO_ld64(binary) -> bool: - if binary.build_version.tools[0].version == [711, 0, 0]: +def check_MACHO_lld(binary) -> bool: + if binary.build_version.tools[0].version == [18, 1, 8]: return True return False @@ -256,10 +275,18 @@ def check_PE_libraries(binary) -> bool: def check_PE_subsystem_version(binary) -> bool: major: int = binary.optional_header.major_subsystem_version minor: int = binary.optional_header.minor_subsystem_version - if major == 6 and minor == 1: + if major == 6 and minor == 2: return True return False +def check_PE_application_manifest(binary) -> bool: + if not binary.has_resources: + # No resources at all. + return False + + rm = binary.resources_manager + return rm.has_manifest + def check_ELF_interpreter(binary) -> bool: expected_interpreter = ELF_INTERPRETER_NAMES[binary.header.machine_type][binary.abstract.header.endianness] @@ -267,49 +294,44 @@ def check_ELF_interpreter(binary) -> bool: def check_ELF_ABI(binary) -> bool: expected_abi = ELF_ABIS[binary.header.machine_type][binary.abstract.header.endianness] - note = binary.concrete.get(lief.ELF.NOTE_TYPES.ABI_TAG) - assert note.details.abi == lief.ELF.NOTE_ABIS.LINUX - return note.details.version == expected_abi + note = binary.concrete.get(lief.ELF.Note.TYPE.GNU_ABI_TAG) + assert note.abi == lief.ELF.NoteAbi.ABI.LINUX + return note.version == expected_abi CHECKS = { -lief.EXE_FORMATS.ELF: [ +lief.Binary.FORMATS.ELF: [ ('IMPORTED_SYMBOLS', check_imported_symbols), ('EXPORTED_SYMBOLS', check_exported_symbols), ('LIBRARY_DEPENDENCIES', check_ELF_libraries), ('INTERPRETER_NAME', check_ELF_interpreter), ('ABI', check_ELF_ABI), + ('RUNPATH', check_RUNPATH), ], -lief.EXE_FORMATS.MACHO: [ +lief.Binary.FORMATS.MACHO: [ ('DYNAMIC_LIBRARIES', check_MACHO_libraries), ('MIN_OS', check_MACHO_min_os), ('SDK', check_MACHO_sdk), - ('LD64', check_MACHO_ld64), + ('LLD', check_MACHO_lld), ], -lief.EXE_FORMATS.PE: [ +lief.Binary.FORMATS.PE: [ ('DYNAMIC_LIBRARIES', check_PE_libraries), ('SUBSYSTEM_VERSION', check_PE_subsystem_version), + ('APPLICATION_MANIFEST', check_PE_application_manifest), ] } if __name__ == '__main__': retval: int = 0 for filename in sys.argv[1:]: - try: - binary = lief.parse(filename) - etype = binary.format - if etype == lief.EXE_FORMATS.UNKNOWN: - print(f'{filename}: unknown executable format') - retval = 1 - continue - - failed: List[str] = [] - for (name, func) in CHECKS[etype]: - if not func(binary): - failed.append(name) - if failed: - print(f'{filename}: failed {" ".join(failed)}') - retval = 1 - except IOError: - print(f'{filename}: cannot open') + binary = lief.parse(filename) + + etype = binary.format + + failed: list[str] = [] + for (name, func) in CHECKS[etype]: + if not func(binary): + failed.append(name) + if failed: + print(f'{filename}: failed {" ".join(failed)}') retval = 1 sys.exit(retval) diff --git a/contrib/init/README.md b/contrib/init/README.md index 398a843b..affc7c2e 100644 --- a/contrib/init/README.md +++ b/contrib/init/README.md @@ -1,11 +1,11 @@ Sample configuration files for: ``` -systemd: coordinated.service -Upstart: coordinated.conf -OpenRC: coordinated.openrc - coordinated.openrcconf -CentOS: coordinated.init -macOS: org.bitcoin.coordinated.plist +systemd: bitcoind.service +Upstart: bitcoind.conf +OpenRC: bitcoind.openrc + bitcoind.openrcconf +CentOS: bitcoind.init +macOS: org.bitcoin.bitcoind.plist ``` have been made available to assist packagers in creating node packages here. diff --git a/contrib/init/coordinated.conf b/contrib/init/bitcoind.conf similarity index 51% rename from contrib/init/coordinated.conf rename to contrib/init/bitcoind.conf index c837d11f..dde1bd0c 100644 --- a/contrib/init/coordinated.conf +++ b/contrib/init/bitcoind.conf @@ -3,14 +3,14 @@ description "Bitcoin Core Daemon" start on runlevel [2345] stop on starting rc RUNLEVEL=[016] -env COORDINATED_BIN="/usr/bin/coordinated" -env COORDINATED_USER="bitcoin" -env COORDINATED_GROUP="bitcoin" -env COORDINATED_PIDDIR="/var/run/coordinated" +env BITCOIND_BIN="/usr/bin/bitcoind" +env BITCOIND_USER="bitcoin" +env BITCOIND_GROUP="bitcoin" +env BITCOIND_PIDDIR="/var/run/bitcoind" # upstart can't handle variables constructed with other variables -env COORDINATED_PIDFILE="/var/run/coordinated/coordinated.pid" -env COORDINATED_CONFIGFILE="/etc/bitcoin/bitcoin.conf" -env COORDINATED_DATADIR="/var/lib/coordinated" +env BITCOIND_PIDFILE="/var/run/bitcoind/bitcoind.pid" +env BITCOIND_CONFIGFILE="/etc/bitcoin/bitcoin.conf" +env BITCOIND_DATADIR="/var/lib/bitcoind" expect fork @@ -20,13 +20,13 @@ kill timeout 600 pre-start script # this will catch non-existent config files - # coordinated will check and exit with this very warning, but it can do so + # bitcoind will check and exit with this very warning, but it can do so # long after forking, leaving upstart to think everything started fine. # since this is a commonly encountered case on install, just check and # warn here. - if ! grep -qs '^rpcpassword=' "$COORDINATED_CONFIGFILE" ; then - echo "ERROR: You must set a secure rpcpassword to run coordinated." - echo "The setting must appear in $COORDINATED_CONFIGFILE" + if ! grep -qs '^rpcpassword=' "$BITCOIND_CONFIGFILE" ; then + echo "ERROR: You must set a secure rpcpassword to run bitcoind." + echo "The setting must appear in $BITCOIND_CONFIGFILE" echo echo "This password is security critical to securing wallets " echo "and must not be the same as the rpcuser setting." @@ -44,22 +44,22 @@ pre-start script exit 1 fi - mkdir -p "$COORDINATED_PIDDIR" - chmod 0755 "$COORDINATED_PIDDIR" - chown $COORDINATED_USER:$COORDINATED_GROUP "$COORDINATED_PIDDIR" - chown $COORDINATED_USER:$COORDINATED_GROUP "$COORDINATED_CONFIGFILE" - chmod 0660 "$COORDINATED_CONFIGFILE" + mkdir -p "$BITCOIND_PIDDIR" + chmod 0755 "$BITCOIND_PIDDIR" + chown $BITCOIND_USER:$BITCOIND_GROUP "$BITCOIND_PIDDIR" + chown $BITCOIND_USER:$BITCOIND_GROUP "$BITCOIND_CONFIGFILE" + chmod 0660 "$BITCOIND_CONFIGFILE" end script exec start-stop-daemon \ --start \ - --pidfile "$COORDINATED_PIDFILE" \ - --chuid $COORDINATED_USER:$COORDINATED_GROUP \ - --exec "$COORDINATED_BIN" \ + --pidfile "$BITCOIND_PIDFILE" \ + --chuid $BITCOIND_USER:$BITCOIND_GROUP \ + --exec "$BITCOIND_BIN" \ -- \ - -pid="$COORDINATED_PIDFILE" \ - -conf="$COORDINATED_CONFIGFILE" \ - -datadir="$COORDINATED_DATADIR" \ + -pid="$BITCOIND_PIDFILE" \ + -conf="$BITCOIND_CONFIGFILE" \ + -datadir="$BITCOIND_DATADIR" \ -disablewallet \ -daemon diff --git a/contrib/init/bitcoind.init b/contrib/init/bitcoind.init new file mode 100644 index 00000000..19e1f76d --- /dev/null +++ b/contrib/init/bitcoind.init @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +# +# bitcoind The bitcoin core server. +# +# +# chkconfig: 345 80 20 +# description: bitcoind +# processname: bitcoind +# + +# Source function library. +. /etc/init.d/functions + +# you can override defaults in /etc/sysconfig/bitcoind, see below +if [ -f /etc/sysconfig/bitcoind ]; then + . /etc/sysconfig/bitcoind +fi + +RETVAL=0 + +prog=bitcoind +# you can override the lockfile via BITCOIND_LOCKFILE in /etc/sysconfig/bitcoind +lockfile=${BITCOIND_LOCKFILE-/var/lock/subsys/bitcoind} + +# bitcoind defaults to /usr/bin/bitcoind, override with BITCOIND_BIN +bitcoind=${BITCOIND_BIN-/usr/bin/bitcoind} + +# bitcoind opts default to -disablewallet, override with BITCOIND_OPTS +bitcoind_opts=${BITCOIND_OPTS--disablewallet} + +start() { + echo -n $"Starting $prog: " + daemon $DAEMONOPTS $bitcoind $bitcoind_opts + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $lockfile + return $RETVAL +} + +stop() { + echo -n $"Stopping $prog: " + killproc $prog -t600 + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $lockfile + return $RETVAL +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status $prog + ;; + restart) + stop + start + ;; + *) + echo "Usage: service $prog {start|stop|status|restart}" + exit 1 + ;; +esac diff --git a/contrib/init/bitcoind.openrc b/contrib/init/bitcoind.openrc new file mode 100644 index 00000000..013a1a60 --- /dev/null +++ b/contrib/init/bitcoind.openrc @@ -0,0 +1,93 @@ +#!/sbin/openrc-run + +# backward compatibility for existing gentoo layout +# +if [ -d "/var/lib/bitcoin/.bitcoin" ]; then + BITCOIND_DEFAULT_DATADIR="/var/lib/bitcoin/.bitcoin" +else + BITCOIND_DEFAULT_DATADIR="/var/lib/bitcoind" +fi + +BITCOIND_CONFIGFILE=${BITCOIND_CONFIGFILE:-/etc/bitcoin/bitcoin.conf} +BITCOIND_PIDDIR=${BITCOIND_PIDDIR:-/var/run/bitcoind} +BITCOIND_PIDFILE=${BITCOIND_PIDFILE:-${BITCOIND_PIDDIR}/bitcoind.pid} +BITCOIND_DATADIR=${BITCOIND_DATADIR:-${BITCOIND_DEFAULT_DATADIR}} +BITCOIND_USER=${BITCOIND_USER:-${BITCOIN_USER:-bitcoin}} +BITCOIND_GROUP=${BITCOIND_GROUP:-bitcoin} +BITCOIND_BIN=${BITCOIND_BIN:-/usr/bin/bitcoind} +BITCOIND_NICE=${BITCOIND_NICE:-${NICELEVEL:-0}} +BITCOIND_OPTS="${BITCOIND_OPTS:-${BITCOIN_OPTS}}" + +name="Bitcoin Core Daemon" +description="Bitcoin cryptocurrency P2P network daemon" + +command="/usr/bin/bitcoind" +command_args="-pid=\"${BITCOIND_PIDFILE}\" \ + -conf=\"${BITCOIND_CONFIGFILE}\" \ + -datadir=\"${BITCOIND_DATADIR}\" \ + -daemon \ + ${BITCOIND_OPTS}" + +required_files="${BITCOIND_CONFIGFILE}" +start_stop_daemon_args="-u ${BITCOIND_USER} \ + -N ${BITCOIND_NICE} -w 2000" +pidfile="${BITCOIND_PIDFILE}" + +# The retry schedule to use when stopping the daemon. Could be either +# a timeout in seconds or multiple signal/timeout pairs (like +# "SIGKILL/180 SIGTERM/300") +retry="${BITCOIND_SIGTERM_TIMEOUT}" + +depend() { + need localmount net +} + +# verify +# 1) that the datadir exists and is writable (or create it) +# 2) that a directory for the pid exists and is writable +# 3) ownership and permissions on the config file +start_pre() { + checkpath \ + -d \ + --mode 0750 \ + --owner "${BITCOIND_USER}:${BITCOIND_GROUP}" \ + "${BITCOIND_DATADIR}" + + checkpath \ + -d \ + --mode 0755 \ + --owner "${BITCOIND_USER}:${BITCOIND_GROUP}" \ + "${BITCOIND_PIDDIR}" + + checkpath -f \ + -o "${BITCOIND_USER}:${BITCOIND_GROUP}" \ + -m 0660 \ + "${BITCOIND_CONFIGFILE}" + + checkconfig || return 1 +} + +checkconfig() +{ + if grep -qs '^rpcuser=' "${BITCOIND_CONFIGFILE}" && \ + ! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then + eerror "" + eerror "ERROR: You must set a secure rpcpassword to run bitcoind." + eerror "The setting must appear in ${BITCOIND_CONFIGFILE}" + eerror "" + eerror "This password is security critical to securing wallets " + eerror "and must not be the same as the rpcuser setting." + eerror "You can generate a suitable random password using the following " + eerror "command from the shell:" + eerror "" + eerror "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'" + eerror "" + eerror "It is recommended that you also set alertnotify so you are " + eerror "notified of problems:" + eerror "" + eerror "ie: alertnotify=echo %%s | mail -s \"Bitcoin Alert\"" \ + "admin@foo.com" + eerror "" + return 1 + fi +} diff --git a/contrib/init/bitcoind.openrcconf b/contrib/init/bitcoind.openrcconf new file mode 100644 index 00000000..c8a22a08 --- /dev/null +++ b/contrib/init/bitcoind.openrcconf @@ -0,0 +1,33 @@ +# /etc/conf.d/bitcoind: config file for /etc/init.d/bitcoind + +# Config file location +#BITCOIND_CONFIGFILE="/etc/bitcoin/bitcoin.conf" + +# What directory to write pidfile to? (created and owned by $BITCOIND_USER) +#BITCOIND_PIDDIR="/var/run/bitcoind" + +# What filename to give the pidfile +#BITCOIND_PIDFILE="${BITCOIND_PIDDIR}/bitcoind.pid" + +# Where to write bitcoind data (be mindful that the blockchain is large) +#BITCOIND_DATADIR="/var/lib/bitcoind" + +# User and group to own bitcoind process +#BITCOIND_USER="bitcoin" +#BITCOIND_GROUP="bitcoin" + +# Path to bitcoind executable +#BITCOIND_BIN="/usr/bin/bitcoind" + +# Nice value to run bitcoind under +#BITCOIND_NICE=0 + +# Additional options (avoid -conf and -datadir, use flags above) +#BITCOIND_OPTS="" + +# The timeout in seconds OpenRC will wait for bitcoind to terminate +# after a SIGTERM has been raised. +# Note that this will be mapped as argument to start-stop-daemon's +# '--retry' option, which means you can specify a retry schedule +# here. For more information see man 8 start-stop-daemon. +BITCOIND_SIGTERM_TIMEOUT=600 diff --git a/contrib/init/coordinated.service b/contrib/init/bitcoind.service similarity index 84% rename from contrib/init/coordinated.service rename to contrib/init/bitcoind.service index 44aac916..ade8a059 100644 --- a/contrib/init/coordinated.service +++ b/contrib/init/bitcoind.service @@ -1,7 +1,7 @@ # It is not recommended to modify this file in-place, because it will # be overwritten during package upgrades. If you want to add further # options or overwrite existing ones then use -# $ systemctl edit coordinated.service +# $ systemctl edit bitcoind.service # See "man systemd.service" for details. # Note that almost all daemon options could be specified in @@ -18,9 +18,9 @@ After=network-online.target Wants=network-online.target [Service] -ExecStart=/usr/bin/coordinated -pid=/run/coordinated/coordinated.pid \ +ExecStart=/usr/bin/bitcoind -pid=/run/bitcoind/bitcoind.pid \ -conf=/etc/bitcoin/bitcoin.conf \ - -datadir=/var/lib/coordinated \ + -datadir=/var/lib/bitcoind \ -startupnotify='systemd-notify --ready' \ -shutdownnotify='systemd-notify --stopping' @@ -33,7 +33,7 @@ ExecStartPre=/bin/chgrp bitcoin /etc/bitcoin Type=notify NotifyAccess=all -PIDFile=/run/coordinated/coordinated.pid +PIDFile=/run/bitcoind/bitcoind.pid Restart=on-failure TimeoutStartSec=infinity @@ -46,16 +46,16 @@ TimeoutStopSec=600 User=bitcoin Group=bitcoin -# /run/coordinated -RuntimeDirectory=coordinated +# /run/bitcoind +RuntimeDirectory=bitcoind RuntimeDirectoryMode=0710 # /etc/bitcoin ConfigurationDirectory=bitcoin ConfigurationDirectoryMode=0710 -# /var/lib/coordinated -StateDirectory=coordinated +# /var/lib/bitcoind +StateDirectory=bitcoind StateDirectoryMode=0710 # Hardening measures @@ -81,5 +81,8 @@ PrivateDevices=true # Deny the creation of writable and executable memory mappings. MemoryDenyWriteExecute=true +# Restrict ABIs to help ensure MemoryDenyWriteExecute is enforced +SystemCallArchitectures=native + [Install] WantedBy=multi-user.target diff --git a/contrib/init/coordinated.init b/contrib/init/coordinated.init deleted file mode 100644 index 57bcf486..00000000 --- a/contrib/init/coordinated.init +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env bash -# -# coordinated The bitcoin core server. -# -# -# chkconfig: 345 80 20 -# description: coordinated -# processname: coordinated -# - -# Source function library. -. /etc/init.d/functions - -# you can override defaults in /etc/sysconfig/coordinated, see below -if [ -f /etc/sysconfig/coordinated ]; then - . /etc/sysconfig/coordinated -fi - -RETVAL=0 - -prog=coordinated -# you can override the lockfile via COORDINATED_LOCKFILE in /etc/sysconfig/coordinated -lockfile=${COORDINATED_LOCKFILE-/var/lock/subsys/coordinated} - -# coordinated defaults to /usr/bin/coordinated, override with COORDINATED_BIN -coordinated=${COORDINATED_BIN-/usr/bin/coordinated} - -# coordinated opts default to -disablewallet, override with COORDINATED_OPTS -coordinated_opts=${COORDINATED_OPTS--disablewallet} - -start() { - echo -n $"Starting $prog: " - daemon $DAEMONOPTS $coordinated $coordinated_opts - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch $lockfile - return $RETVAL -} - -stop() { - echo -n $"Stopping $prog: " - killproc $prog -t600 - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f $lockfile - return $RETVAL -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - status) - status $prog - ;; - restart) - stop - start - ;; - *) - echo "Usage: service $prog {start|stop|status|restart}" - exit 1 - ;; -esac diff --git a/contrib/init/coordinated.openrc b/contrib/init/coordinated.openrc deleted file mode 100644 index 145d9730..00000000 --- a/contrib/init/coordinated.openrc +++ /dev/null @@ -1,93 +0,0 @@ -#!/sbin/openrc-run - -# backward compatibility for existing gentoo layout -# -if [ -d "/var/lib/bitcoin/.bitcoin" ]; then - COORDINATED_DEFAULT_DATADIR="/var/lib/bitcoin/.bitcoin" -else - COORDINATED_DEFAULT_DATADIR="/var/lib/coordinated" -fi - -COORDINATED_CONFIGFILE=${COORDINATED_CONFIGFILE:-/etc/bitcoin/bitcoin.conf} -COORDINATED_PIDDIR=${COORDINATED_PIDDIR:-/var/run/coordinated} -COORDINATED_PIDFILE=${COORDINATED_PIDFILE:-${COORDINATED_PIDDIR}/coordinated.pid} -COORDINATED_DATADIR=${COORDINATED_DATADIR:-${COORDINATED_DEFAULT_DATADIR}} -COORDINATED_USER=${COORDINATED_USER:-${BITCOIN_USER:-bitcoin}} -COORDINATED_GROUP=${COORDINATED_GROUP:-bitcoin} -COORDINATED_BIN=${COORDINATED_BIN:-/usr/bin/coordinated} -COORDINATED_NICE=${COORDINATED_NICE:-${NICELEVEL:-0}} -COORDINATED_OPTS="${COORDINATED_OPTS:-${BITCOIN_OPTS}}" - -name="Bitcoin Core Daemon" -description="Bitcoin cryptocurrency P2P network daemon" - -command="/usr/bin/coordinated" -command_args="-pid=\"${COORDINATED_PIDFILE}\" \ - -conf=\"${COORDINATED_CONFIGFILE}\" \ - -datadir=\"${COORDINATED_DATADIR}\" \ - -daemon \ - ${COORDINATED_OPTS}" - -required_files="${COORDINATED_CONFIGFILE}" -start_stop_daemon_args="-u ${COORDINATED_USER} \ - -N ${COORDINATED_NICE} -w 2000" -pidfile="${COORDINATED_PIDFILE}" - -# The retry schedule to use when stopping the daemon. Could be either -# a timeout in seconds or multiple signal/timeout pairs (like -# "SIGKILL/180 SIGTERM/300") -retry="${COORDINATED_SIGTERM_TIMEOUT}" - -depend() { - need localmount net -} - -# verify -# 1) that the datadir exists and is writable (or create it) -# 2) that a directory for the pid exists and is writable -# 3) ownership and permissions on the config file -start_pre() { - checkpath \ - -d \ - --mode 0750 \ - --owner "${COORDINATED_USER}:${COORDINATED_GROUP}" \ - "${COORDINATED_DATADIR}" - - checkpath \ - -d \ - --mode 0755 \ - --owner "${COORDINATED_USER}:${COORDINATED_GROUP}" \ - "${COORDINATED_PIDDIR}" - - checkpath -f \ - -o "${COORDINATED_USER}:${COORDINATED_GROUP}" \ - -m 0660 \ - "${COORDINATED_CONFIGFILE}" - - checkconfig || return 1 -} - -checkconfig() -{ - if grep -qs '^rpcuser=' "${COORDINATED_CONFIGFILE}" && \ - ! grep -qs '^rpcpassword=' "${COORDINATED_CONFIGFILE}" ; then - eerror "" - eerror "ERROR: You must set a secure rpcpassword to run coordinated." - eerror "The setting must appear in ${COORDINATED_CONFIGFILE}" - eerror "" - eerror "This password is security critical to securing wallets " - eerror "and must not be the same as the rpcuser setting." - eerror "You can generate a suitable random password using the following " - eerror "command from the shell:" - eerror "" - eerror "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'" - eerror "" - eerror "It is recommended that you also set alertnotify so you are " - eerror "notified of problems:" - eerror "" - eerror "ie: alertnotify=echo %%s | mail -s \"Bitcoin Alert\"" \ - "admin@foo.com" - eerror "" - return 1 - fi -} diff --git a/contrib/init/coordinated.openrcconf b/contrib/init/coordinated.openrcconf deleted file mode 100644 index aaf30397..00000000 --- a/contrib/init/coordinated.openrcconf +++ /dev/null @@ -1,33 +0,0 @@ -# /etc/conf.d/coordinated: config file for /etc/init.d/coordinated - -# Config file location -#COORDINATED_CONFIGFILE="/etc/bitcoin/bitcoin.conf" - -# What directory to write pidfile to? (created and owned by $COORDINATED_USER) -#COORDINATED_PIDDIR="/var/run/coordinated" - -# What filename to give the pidfile -#COORDINATED_PIDFILE="${COORDINATED_PIDDIR}/coordinated.pid" - -# Where to write coordinated data (be mindful that the blockchain is large) -#COORDINATED_DATADIR="/var/lib/coordinated" - -# User and group to own coordinated process -#COORDINATED_USER="bitcoin" -#COORDINATED_GROUP="bitcoin" - -# Path to coordinated executable -#COORDINATED_BIN="/usr/bin/coordinated" - -# Nice value to run coordinated under -#COORDINATED_NICE=0 - -# Additional options (avoid -conf and -datadir, use flags above) -#COORDINATED_OPTS="" - -# The timeout in seconds OpenRC will wait for coordinated to terminate -# after a SIGTERM has been raised. -# Note that this will be mapped as argument to start-stop-daemon's -# '--retry' option, which means you can specify a retry schedule -# here. For more information see man 8 start-stop-daemon. -COORDINATED_SIGTERM_TIMEOUT=600 diff --git a/contrib/init/org.bitcoin.bitcoind.plist b/contrib/init/org.bitcoin.bitcoind.plist new file mode 100644 index 00000000..95b5342f --- /dev/null +++ b/contrib/init/org.bitcoin.bitcoind.plist @@ -0,0 +1,14 @@ + + + + + Label + org.bitcoin.bitcoind + ProgramArguments + + /usr/local/bin/bitcoind + + RunAtLoad + + + diff --git a/contrib/linearize/README.md b/contrib/linearize/README.md index 94da35f3..25a1c735 100644 --- a/contrib/linearize/README.md +++ b/contrib/linearize/README.md @@ -20,7 +20,7 @@ standalone hash lists but safe to use with linearize-data.py, which will output the same data no matter which byte format is chosen. The `linearize-hashes` script requires a connection, local or remote, to a -JSON-RPC server. Running `coordinated` or `coordinate-qt -server` will be sufficient. +JSON-RPC server. Running `bitcoind` or `bitcoin-qt -server` will be sufficient. ## Step 2: Copy local block data @@ -38,7 +38,7 @@ will be printed. respectively, to the current time and to the timestamp of the most recent block written to the script's blockchain. * `genesis`: The hash of the genesis block in the blockchain. -* `input`: coordinated blocks/ directory containing blkNNNNN.dat +* `input`: bitcoind blocks/ directory containing blkNNNNN.dat * `hashlist`: text file containing list of block hashes created by linearize-hashes.py. * `max_out_sz`: Maximum size for files created by the `output_file` option. diff --git a/contrib/linearize/example-linearize.cfg b/contrib/linearize/example-linearize.cfg index 9a192f74..5f566261 100644 --- a/contrib/linearize/example-linearize.cfg +++ b/contrib/linearize/example-linearize.cfg @@ -1,4 +1,4 @@ -# coordinated RPC settings (linearize-hashes) +# bitcoind RPC settings (linearize-hashes) rpcuser=someuser rpcpassword=somepassword #datadir=~/.bitcoin diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py index 24f6b29a..74d98307 100755 --- a/contrib/linearize/linearize-data.py +++ b/contrib/linearize/linearize-data.py @@ -76,6 +76,16 @@ def getFirstBlockFileId(block_dir_path): blkId = int(firstBlkFn[3:8]) return blkId +def read_xor_key(blocks_path): + NUM_XOR_BYTES = 8 # From InitBlocksdirXorKey::xor_key.size() + try: + xor_filename = os.path.join(blocks_path, "xor.dat") + with open(xor_filename, "rb") as xor_file: + return xor_file.read(NUM_XOR_BYTES) + # support also blockdirs created with pre-v28 versions, where no xor key exists yet + except FileNotFoundError: + return bytes([0] * NUM_XOR_BYTES) + # Block header and extent on disk BlockExtent = namedtuple('BlockExtent', ['fn', 'offset', 'inhdr', 'blkhdr', 'size']) @@ -95,6 +105,7 @@ def __init__(self, settings, blkindex, blkmap): self.outFname = None self.blkCountIn = 0 self.blkCountOut = 0 + self.xor_key = read_xor_key(self.settings['input']) self.lastDate = datetime.datetime(2000, 1, 1) self.highTS = 1408893517 - 315360000 @@ -113,6 +124,13 @@ def __init__(self, settings, blkindex, blkmap): self.outOfOrderData = {} self.outOfOrderSize = 0 # running total size for items in outOfOrderData + def read_xored(self, f, size): + offset = f.tell() + data = bytearray(f.read(size)) + for i in range(len(data)): + data[i] ^= self.xor_key[(i + offset) % len(self.xor_key)] + return bytes(data) + def writeBlock(self, inhdr, blk_hdr, rawblock): blockSizeOnDisk = len(inhdr) + len(blk_hdr) + len(rawblock) if not self.fileOutput and ((self.outsz + blockSizeOnDisk) > self.maxOutSz): @@ -165,7 +183,7 @@ def fetchBlock(self, extent): '''Fetch block contents from disk given extents''' with open(self.inFileName(extent.fn), "rb") as f: f.seek(extent.offset) - return f.read(extent.size) + return self.read_xored(f, extent.size) def copyOneBlock(self): '''Find the next block to be written in the input, and copy it to the output.''' @@ -190,7 +208,7 @@ def run(self): print("Premature end of block data") return - inhdr = self.inF.read(8) + inhdr = self.read_xored(self.inF, 8) if (not inhdr or (inhdr[0] == "\0")): self.inF.close() self.inF = None @@ -207,7 +225,7 @@ def run(self): inLenLE = inhdr[4:] su = struct.unpack("" - echo "example: $0 " +if [ "$#" -ne 3 ]; then + echo "usage: $0 " exit 1 fi rm -rf ${TEMPDIR} mkdir -p ${TEMPDIR} -${SIGNAPPLE} sign -f --detach "${TEMPDIR}/${OUTROOT}" "$@" "${BUNDLE}" +stty -echo +printf "Enter the passphrase for %s: " "$1" +read cs_key_pass +printf "\n" +printf "Enter the passphrase for %s: " "$2" +read api_key_pass +printf "\n" +stty echo + +# Sign and notarize app bundle +${SIGNAPPLE} sign -f --hardened-runtime --detach "${OUTROOT}/${BUNDLE_ROOT}" --passphrase "${cs_key_pass}" "$1" "${UNSIGNED_BUNDLE}" +${SIGNAPPLE} apply "${UNSIGNED_BUNDLE}" "${OUTROOT}/${BUNDLE_ROOT}/${BUNDLE_NAME}" +${SIGNAPPLE} notarize --detach "${OUTROOT}/${BUNDLE_ROOT}" --passphrase "${api_key_pass}" "$2" "$3" "${UNSIGNED_BUNDLE}" + +# Sign each binary +find . -maxdepth 3 -wholename "*/bin/*" -type f -exec realpath --relative-to=. {} \; | while read -r bin +do + bin_dir=$(dirname "${bin}") + bin_name=$(basename "${bin}") + ${SIGNAPPLE} sign -f --hardened-runtime --detach "${OUTROOT}/${bin_dir}" --passphrase "${cs_key_pass}" "$1" "${bin}" + ${SIGNAPPLE} apply "${bin}" "${OUTROOT}/${bin_dir}/${bin_name}.${ARCH}sign" +done + +# Notarize the binaries +# Binaries cannot have stapled notarizations so this does not actually generate any output +binaries_dir=$(dirname "$(find . -maxdepth 2 -wholename '*/bin' -type d -exec realpath --relative-to=. {} \;)") +${SIGNAPPLE} notarize --passphrase "${api_key_pass}" "$2" "$3" "${binaries_dir}" -tar -C "${TEMPDIR}" -czf "${OUT}" . +tar -C "${TEMPDIR}" -czf "${OUT}" "${OUTDIR}" rm -rf "${TEMPDIR}" echo "Created ${OUT}" diff --git a/contrib/macdeploy/gen-sdk b/contrib/macdeploy/gen-sdk index 6efaaccb..f0bbabf8 100755 --- a/contrib/macdeploy/gen-sdk +++ b/contrib/macdeploy/gen-sdk @@ -8,21 +8,6 @@ import gzip import os import contextlib -# monkey-patch Python 3.8 and older to fix wrong TAR header handling -# see https://github.com/bitcoin/bitcoin/pull/24534 -# and https://github.com/python/cpython/pull/18080 for more info -if sys.version_info < (3, 9): - _old_create_header = tarfile.TarInfo._create_header - def _create_header(info, format, encoding, errors): - buf = _old_create_header(info, format, encoding, errors) - # replace devmajor/devminor with binary zeroes - buf = buf[:329] + bytes(16) + buf[345:] - # recompute checksum - chksum = tarfile.calc_chksums(buf)[0] - buf = buf[:-364] + bytes("%06o\0" % chksum, "ascii") + buf[-357:] - return buf - tarfile.TarInfo._create_header = staticmethod(_create_header) - @contextlib.contextmanager def cd(path): """Context manager that restores PWD even if an exception was raised.""" @@ -62,9 +47,6 @@ def run(): 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: @@ -72,7 +54,7 @@ def run(): 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' + """Add all files in dir_to_add to tarfp, but prepend alt_base_dir to the files' names e.g. if the only file under /root/bazdir is /root/bazdir/qux, invoking: @@ -107,8 +89,6 @@ def run(): with tarfile.open(mode="w", fileobj=gzf, format=tarfile.GNU_FORMAT) 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()) diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus index 16274618..ba532d77 100755 --- a/contrib/macdeploy/macdeployqtplus +++ b/contrib/macdeploy/macdeployqtplus @@ -20,7 +20,7 @@ import sys, re, os, platform, shutil, stat, subprocess, os.path from argparse import ArgumentParser from pathlib import Path from subprocess import PIPE, run -from typing import List, Optional +from typing import Optional # This is ported from the original macdeployqt with modifications @@ -77,7 +77,7 @@ class FrameworkInfo(object): bundleBinaryDirectory = "Contents/MacOS" @classmethod - def fromOtoolLibraryLine(cls, line: str) -> Optional['FrameworkInfo']: + def fromLibraryLine(cls, line: str) -> Optional['FrameworkInfo']: # Note: line must be trimmed if line == "": return None @@ -88,7 +88,7 @@ class FrameworkInfo(object): m = cls.reOLine.match(line) if m is None: - raise RuntimeError(f"otool line could not be parsed: {line}") + raise RuntimeError(f"Line could not be parsed: {line}") path = m.group(1) @@ -120,7 +120,7 @@ class FrameworkInfo(object): break i += 1 if i == len(parts): - raise RuntimeError(f"Could not find .framework or .dylib in otool line: {line}") + raise RuntimeError(f"Could not find .framework or .dylib in line: {line}") info.frameworkName = parts[i] info.frameworkDirectory = "/".join(parts[:i]) @@ -145,8 +145,8 @@ class FrameworkInfo(object): class ApplicationBundleInfo(object): def __init__(self, path: str): self.path = path - # for backwards compatibility reasons, this must remain as Coordinate-Qt - self.binaryPath = os.path.join(path, "Contents", "MacOS", "Coordinate-Qt") + # for backwards compatibility reasons, this must remain as Bitcoin-Qt + self.binaryPath = os.path.join(path, "Contents", "MacOS", "Bitcoin-Qt") if not os.path.exists(self.binaryPath): raise RuntimeError(f"Could not find bundle binary for {path}") self.resourcesPath = os.path.join(path, "Contents", "Resources") @@ -157,20 +157,19 @@ class DeploymentInfo(object): self.qtPath = None self.pluginPath = None self.deployedFrameworks = [] - + def detectQtPath(self, frameworkDirectory: str): parentDir = os.path.dirname(frameworkDirectory) - if os.path.exists(os.path.join(parentDir, "translations")): - # Classic layout, e.g. "/usr/local/Trolltech/Qt-4.x.x" + if os.path.exists(os.path.join(parentDir, "share", "qt", "translations")): self.qtPath = parentDir else: self.qtPath = os.getenv("QTDIR", None) if self.qtPath is not None: - pluginPath = os.path.join(self.qtPath, "plugins") + pluginPath = os.path.join(self.qtPath, "share", "qt", "plugins") if os.path.exists(pluginPath): self.pluginPath = pluginPath - + def usesFramework(self, name: str) -> bool: for framework in self.deployedFrameworks: if framework.endswith(".framework"): @@ -181,31 +180,33 @@ class DeploymentInfo(object): return True return False -def getFrameworks(binaryPath: str, verbose: int) -> List[FrameworkInfo]: +def getFrameworks(binaryPath: str, verbose: int, rpath: str = '') -> list[FrameworkInfo]: + objdump = os.getenv("OBJDUMP", "objdump") if verbose: - print(f"Inspecting with otool: {binaryPath}") - otoolbin=os.getenv("OTOOL", "otool") - otool = run([otoolbin, "-L", binaryPath], stdout=PIPE, stderr=PIPE, text=True) - if otool.returncode != 0: - sys.stderr.write(otool.stderr) + print(f"Inspecting with {objdump}: {binaryPath}") + output = run([objdump, "--macho", "--dylibs-used", binaryPath], stdout=PIPE, stderr=PIPE, text=True) + if output.returncode != 0: + sys.stderr.write(output.stderr) sys.stderr.flush() - raise RuntimeError(f"otool failed with return code {otool.returncode}") + raise RuntimeError(f"{objdump} failed with return code {output.returncode}") - otoolLines = otool.stdout.split("\n") - otoolLines.pop(0) # First line is the inspected binary + lines = output.stdout.split("\n") + lines.pop(0) # First line is the inspected binary if ".framework" in binaryPath or binaryPath.endswith(".dylib"): - otoolLines.pop(0) # Frameworks and dylibs list themselves as a dependency. - + lines.pop(0) # Frameworks and dylibs list themselves as a dependency. + libraries = [] - for line in otoolLines: + for line in lines: line = line.replace("@loader_path", os.path.dirname(binaryPath)) - info = FrameworkInfo.fromOtoolLibraryLine(line.strip()) + if rpath: + line = line.replace("@rpath", rpath) + info = FrameworkInfo.fromLibraryLine(line.strip()) if info is not None: if verbose: print("Found framework:") print(info) libraries.append(info) - + return libraries def runInstallNameTool(action: str, *args): @@ -285,7 +286,7 @@ def copyFramework(framework: FrameworkInfo, path: str, verbose: int) -> Optional return toPath -def deployFrameworks(frameworks: List[FrameworkInfo], bundlePath: str, binaryPath: str, strip: bool, verbose: int, deploymentInfo: Optional[DeploymentInfo] = None) -> DeploymentInfo: +def deployFrameworks(frameworks: list[FrameworkInfo], bundlePath: str, binaryPath: str, strip: bool, verbose: int, deploymentInfo: Optional[DeploymentInfo] = None) -> DeploymentInfo: if deploymentInfo is None: deploymentInfo = DeploymentInfo() @@ -318,7 +319,7 @@ def deployFrameworks(frameworks: List[FrameworkInfo], bundlePath: str, binaryPat # install_name_tool it a new id. changeIdentification(framework.deployedInstallName, deployedBinaryPath, verbose) # Check for framework dependencies - dependencies = getFrameworks(deployedBinaryPath, verbose) + dependencies = getFrameworks(deployedBinaryPath, verbose, rpath=framework.frameworkDirectory) for dependency in dependencies: changeInstallName(dependency.installName, dependency.deployedInstallName, deployedBinaryPath, verbose) @@ -421,7 +422,7 @@ if os.path.exists(appname + ".zip"): # ------------------------------------------------ -target = os.path.join("dist", "Coordinate-Qt.app") +target = os.path.join("dist", "Bitcoin-Qt.app") print("+ Copying source bundle +") if verbose: @@ -498,7 +499,7 @@ if platform.system() == "Darwin": # ------------------------------------------------ if config.zip is not None: - shutil.make_archive('{}'.format(appname), format='zip', root_dir='dist', base_dir='Coordinate-Qt.app') + shutil.make_archive('{}'.format(appname), format='zip', root_dir='dist', base_dir='Bitcoin-Qt.app') # ------------------------------------------------ diff --git a/contrib/message-capture/message-capture-docs.md b/contrib/message-capture/message-capture-docs.md index eca94fdd..73019684 100644 --- a/contrib/message-capture/message-capture-docs.md +++ b/contrib/message-capture/message-capture-docs.md @@ -6,7 +6,7 @@ This feature allows for message capture on a per-peer basis. It answers the sim ## Usage and Functionality -* Run `coordinated` with the `-capturemessages` option. +* Run `bitcoind` with the `-capturemessages` option. * Look in the `message_capture` folder in your datadir. * Typically this will be `~/.bitcoin/message_capture`. * See that there are many folders inside, one for each peer names with its IP address and port. diff --git a/contrib/message-capture/message-capture-parser.py b/contrib/message-capture/message-capture-parser.py index d6ddc1c1..0f409717 100755 --- a/contrib/message-capture/message-capture-parser.py +++ b/contrib/message-capture/message-capture-parser.py @@ -11,7 +11,7 @@ from io import BytesIO import json from pathlib import Path -from typing import Any, List, Optional +from typing import Any, Optional sys.path.append(os.path.join(os.path.dirname(__file__), '../../test/functional')) @@ -92,7 +92,7 @@ def to_jsonable(obj: Any) -> Any: return obj -def process_file(path: str, messages: List[Any], recv: bool, progress_bar: Optional[ProgressBar]) -> None: +def process_file(path: str, messages: list[Any], recv: bool, progress_bar: Optional[ProgressBar]) -> None: with open(path, 'rb') as f_in: if progress_bar: bytes_read = 0 @@ -188,7 +188,7 @@ def main(): output = Path.cwd() / Path(args.output) if args.output else False use_progress_bar = (not args.no_progress_bar) and sys.stdout.isatty() - messages = [] # type: List[Any] + messages = [] # type: list[Any] if use_progress_bar: total_size = sum(capture.stat().st_size for capture in capturepaths) progress_bar = ProgressBar(total_size) diff --git a/contrib/qos/README.md b/contrib/qos/README.md index 7a767682..0ded87c5 100644 --- a/contrib/qos/README.md +++ b/contrib/qos/README.md @@ -2,4 +2,4 @@ This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitcoin network. It limits outbound TCP traffic with a source or destination port of 8333, but not if the destination IP is within a LAN. -This means one can have an always-on coordinated instance running, and another local coordinated/coordinate-qt instance which connects to this node and receives blocks from it. +This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it. diff --git a/contrib/seeds/.gitignore b/contrib/seeds/.gitignore index d9a2451f..e62dd99d 100644 --- a/contrib/seeds/.gitignore +++ b/contrib/seeds/.gitignore @@ -1,2 +1,5 @@ seeds_main.txt +seeds_signet.txt +seeds_test.txt +seeds_testnet4.txt asmap-filled.dat diff --git a/contrib/seeds/README.md b/contrib/seeds/README.md index 6db77cbb..a1a2e34b 100644 --- a/contrib/seeds/README.md +++ b/contrib/seeds/README.md @@ -4,17 +4,28 @@ Utility to generate the seeds.txt list that is compiled into the client (see [src/chainparamsseeds.h](/src/chainparamsseeds.h) and other utilities in [contrib/seeds](/contrib/seeds)). Be sure to update `PATTERN_AGENT` in `makeseeds.py` to include the current version, -and remove old versions as necessary (at a minimum when GetDesirableServiceFlags +and remove old versions as necessary (at a minimum when SeedsServiceFlags() changes its default return value, as those are the services which seeds are added to addrman with). -The seeds compiled into the release are created from sipa's DNS seed and AS map -data. Run the following commands from the `/contrib/seeds` directory: +Update `MIN_BLOCKS` in `makeseeds.py` and the `-m`/`--minblocks` arguments below, as needed. + +The seeds compiled into the release are created from sipa's, achow101's and luke-jr's +DNS seed, virtu's crawler, and asmap community AS map data. Run the following commands +from the `/contrib/seeds` directory: ``` curl https://bitcoin.sipa.be/seeds.txt.gz | gzip -dc > seeds_main.txt -curl https://bitcoin.sipa.be/asmap-filled.dat > asmap-filled.dat +curl https://21.ninja/seeds.txt.gz | gzip -dc >> seeds_main.txt +curl https://luke.dashjr.org/programs/bitcoin/files/charts/seeds.txt >> seeds_main.txt +curl https://mainnet.achownodes.xyz/seeds.txt.gz | gzip -dc >> seeds_main.txt +curl https://signet.achownodes.xyz/seeds.txt.gz | gzip -dc > seeds_signet.txt +curl https://testnet.achownodes.xyz/seeds.txt.gz | gzip -dc > seeds_test.txt +curl https://testnet4.achownodes.xyz/seeds.txt.gz | gzip -dc > seeds_testnet4.txt +curl https://raw.githubusercontent.com/asmap/asmap-data/main/latest_asmap.dat > asmap-filled.dat python3 makeseeds.py -a asmap-filled.dat -s seeds_main.txt > nodes_main.txt -cat nodes_main_manual.txt >> nodes_main.txt +python3 makeseeds.py -a asmap-filled.dat -s seeds_signet.txt -m 237800 > nodes_signet.txt +python3 makeseeds.py -a asmap-filled.dat -s seeds_test.txt > nodes_test.txt +python3 makeseeds.py -a asmap-filled.dat -s seeds_testnet4.txt -m 72600 > nodes_testnet4.txt python3 generate-seeds.py . > ../../src/chainparamsseeds.h ``` diff --git a/contrib/seeds/generate-seeds.py b/contrib/seeds/generate-seeds.py index e9217578..a3ce0122 100755 --- a/contrib/seeds/generate-seeds.py +++ b/contrib/seeds/generate-seeds.py @@ -5,11 +5,13 @@ ''' Script to generate list of seed nodes for kernel/chainparams.cpp. -This script expects two text files in the directory that is passed as an +This script expects three text files in the directory that is passed as an argument: nodes_main.txt + nodes_signet.txt nodes_test.txt + nodes_testnet4.txt These files must consist of lines in the format @@ -18,9 +20,9 @@ .onion: .b32.i2p: -The output will be two data structures with the peers in binary format: +The output will be several data structures with the peers in binary format: - static const uint8_t chainparams_seed_{main,test}[]={ + static const uint8_t chainparams_seed_{main,signet,test,testnet4}[]={ ... } @@ -29,7 +31,6 @@ from base64 import b32decode from enum import Enum -import struct import sys import os import re @@ -115,13 +116,13 @@ def parse_spec(s): def ser_compact_size(l): r = b"" if l < 253: - r = struct.pack("B", l) + r = l.to_bytes(1, "little") elif l < 0x10000: - r = struct.pack("H', spec[2]) + r += spec[2].to_bytes(2, "big") return r def process_nodes(g, f, structname): @@ -170,8 +171,14 @@ def main(): with open(os.path.join(indir,'nodes_main.txt'), 'r', encoding="utf8") as f: process_nodes(g, f, 'chainparams_seed_main') g.write('\n') + with open(os.path.join(indir,'nodes_signet.txt'), 'r', encoding="utf8") as f: + process_nodes(g, f, 'chainparams_seed_signet') + g.write('\n') with open(os.path.join(indir,'nodes_test.txt'), 'r', encoding="utf8") as f: process_nodes(g, f, 'chainparams_seed_test') + g.write('\n') + with open(os.path.join(indir,'nodes_testnet4.txt'), 'r', encoding="utf8") as f: + process_nodes(g, f, 'chainparams_seed_testnet4') g.write('#endif // BITCOIN_CHAINPARAMSSEEDS_H\n') if __name__ == '__main__': diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py index af408c2d..da6efe70 100755 --- a/contrib/seeds/makeseeds.py +++ b/contrib/seeds/makeseeds.py @@ -9,11 +9,15 @@ import argparse import collections import ipaddress +from pathlib import Path +import random import re import sys -from typing import List, Dict, Union +from typing import Union -from asmap import ASMap, net_to_prefix +asmap_dir = Path(__file__).parent.parent / "asmap" +sys.path.append(str(asmap_dir)) +from asmap import ASMap, net_to_prefix # noqa: E402 NSEEDS=512 @@ -22,25 +26,29 @@ 'ipv6': 10, } -MIN_BLOCKS = 730000 +MIN_BLOCKS = 868000 -PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})):(\d+)$") -PATTERN_IPV6 = re.compile(r"^\[([0-9a-z:]+)\]:(\d+)$") +PATTERN_IPV4 = re.compile(r"^(([0-2]?\d{1,2})\.([0-2]?\d{1,2})\.([0-2]?\d{1,2})\.([0-2]?\d{1,2})):(\d{1,5})$") +PATTERN_IPV6 = re.compile(r"^\[([\da-f:]+)]:(\d{1,5})$", re.IGNORECASE) PATTERN_ONION = re.compile(r"^([a-z2-7]{56}\.onion):(\d+)$") +PATTERN_I2P = re.compile(r"^([a-z2-7]{52}\.b32\.i2p):(\d{1,5})$") PATTERN_AGENT = re.compile( r"^/Satoshi:(" - r"0.14.(0|1|2|3|99)|" - r"0.15.(0|1|2|99)|" - r"0.16.(0|1|2|3|99)|" - r"0.17.(0|0.1|1|2|99)|" - r"0.18.(0|1|99)|" - r"0.19.(0|1|2|99)|" - r"0.20.(0|1|2|99)|" - r"0.21.(0|1|2|99)|" - r"22.(0|1|99)|" - r"23.(0|1|99)|" - r"24.(0|1|99)|" - r"25.99" + r"0\.14\.(0|1|2|3|99)" + r"|0\.15\.(0|1|2|99)" + r"|0\.16\.(0|1|2|3|99)" + r"|0\.17\.(0|0\.1|1|2|99)" + r"|0\.18\.(0|1|99)" + r"|0\.19\.(0|1|2|99)" + r"|0\.20\.(0|1|2|99)" + r"|0\.21\.(0|1|2|99)" + r"|22\.(0|1|99)\.0" + r"|23\.(0|1|2|99)\.0" + r"|24\.(0|1|2|99)\.(0|1)" + r"|25\.(0|1|2|99)\.0" + r"|26\.(0|1|2|99)\.0" + r"|27\.(0|1|2|99)\.0" + r"|28\.(0|1|99)\.0" r")") def parseline(line: str) -> Union[dict, None]: @@ -65,7 +73,13 @@ def parseline(line: str) -> Union[dict, None]: if m is None: m = PATTERN_ONION.match(sline[0]) if m is None: - return None + m = PATTERN_I2P.match(sline[0]) + if m is None: + return None + else: + net = 'i2p' + ipstr = sortkey = m.group(1) + port = int(m.group(2)) else: net = 'onion' ipstr = sortkey = m.group(1) @@ -75,6 +89,8 @@ def parseline(line: str) -> Union[dict, None]: if m.group(1) in ['::']: # Not interested in localhost return None ipstr = m.group(1) + if ipstr.startswith("fc"): # cjdns looks like ipv6 but always begins with fc + net = "cjdns" sortkey = ipstr # XXX parse IPv6 into number, could use name_to_ipv6 from generate-seeds port = int(m.group(2)) else: @@ -117,14 +133,14 @@ def parseline(line: str) -> Union[dict, None]: 'sortkey': sortkey, } -def dedup(ips: List[Dict]) -> List[Dict]: +def dedup(ips: list[dict]) -> list[dict]: """ Remove duplicates from `ips` where multiple ips share address and port. """ d = {} for ip in ips: d[ip['ip'],ip['port']] = ip return list(d.values()) -def filtermultiport(ips: List[Dict]) -> List[Dict]: +def filtermultiport(ips: list[dict]) -> list[dict]: """ Filter out hosts with more nodes per IP""" hist = collections.defaultdict(list) for ip in ips: @@ -132,7 +148,7 @@ def filtermultiport(ips: List[Dict]) -> List[Dict]: return [value[0] for (key,value) in list(hist.items()) if len(value)==1] # Based on Greg Maxwell's seed_filter.py -def filterbyasn(asmap: ASMap, ips: List[Dict], max_per_asn: Dict, max_per_net: int) -> List[Dict]: +def filterbyasn(asmap: ASMap, ips: list[dict], max_per_asn: dict, max_per_net: int) -> list[dict]: """ Prunes `ips` by (a) trimming ips to have at most `max_per_net` ips from each net (e.g. ipv4, ipv6); and (b) trimming ips to have at most `max_per_asn` ips from each asn in each net. @@ -140,11 +156,13 @@ def filterbyasn(asmap: ASMap, ips: List[Dict], max_per_asn: Dict, max_per_net: i # Sift out ips by type ips_ipv46 = [ip for ip in ips if ip['net'] in ['ipv4', 'ipv6']] ips_onion = [ip for ip in ips if ip['net'] == 'onion'] + ips_i2p = [ip for ip in ips if ip['net'] == 'i2p'] + ips_cjdns = [ip for ip in ips if ip["net"] == "cjdns"] # Filter IPv46 by ASN, and limit to max_per_net per network result = [] - net_count: Dict[str, int] = collections.defaultdict(int) - asn_count: Dict[int, int] = collections.defaultdict(int) + net_count: dict[str, int] = collections.defaultdict(int) + asn_count: dict[int, int] = collections.defaultdict(int) for i, ip in enumerate(ips_ipv46): if net_count[ip['net']] == max_per_net: @@ -163,21 +181,24 @@ def filterbyasn(asmap: ASMap, ips: List[Dict], max_per_asn: Dict, max_per_net: i # Add back Onions (up to max_per_net) result.extend(ips_onion[0:max_per_net]) + result.extend(ips_i2p[0:max_per_net]) + result.extend(ips_cjdns[0:max_per_net]) return result -def ip_stats(ips: List[Dict]) -> str: +def ip_stats(ips: list[dict]) -> str: """ Format and return pretty string from `ips`. """ - hist: Dict[str, int] = collections.defaultdict(int) + hist: dict[str, int] = collections.defaultdict(int) for ip in ips: if ip is not None: hist[ip['net']] += 1 - return f"{hist['ipv4']:6d} {hist['ipv6']:6d} {hist['onion']:6d}" + return f"{hist['ipv4']:6d} {hist['ipv6']:6d} {hist['onion']:6d} {hist['i2p']:6d} {hist['cjdns']:6d}" def parse_args(): argparser = argparse.ArgumentParser(description='Generate a list of bitcoin node seed ip addresses.') argparser.add_argument("-a","--asmap", help='the location of the asmap asn database file (required)', required=True) argparser.add_argument("-s","--seeds", help='the location of the DNS seeds file (required)', required=True) + argparser.add_argument("-m", "--minblocks", help="The minimum number of blocks each node must have", default=MIN_BLOCKS, type=int) return argparser.parse_args() def main(): @@ -192,9 +213,10 @@ def main(): with open(args.seeds, 'r', encoding='utf8') as f: lines = f.readlines() ips = [parseline(line) for line in lines] + random.shuffle(ips) print('Done.', file=sys.stderr) - print('\x1b[7m IPv4 IPv6 Onion Pass \x1b[0m', file=sys.stderr) + print('\x1b[7m IPv4 IPv6 Onion I2P CJDNS Pass \x1b[0m', file=sys.stderr) print(f'{ip_stats(ips):s} Initial', file=sys.stderr) # Skip entries with invalid address. ips = [ip for ip in ips if ip is not None] @@ -203,16 +225,18 @@ def main(): ips = dedup(ips) print(f'{ip_stats(ips):s} After removing duplicates', file=sys.stderr) # Enforce minimal number of blocks. - ips = [ip for ip in ips if ip['blocks'] >= MIN_BLOCKS] + ips = [ip for ip in ips if ip['blocks'] >= args.minblocks] print(f'{ip_stats(ips):s} Enforce minimal number of blocks', file=sys.stderr) # Require service bit 1. ips = [ip for ip in ips if (ip['service'] & 1) == 1] print(f'{ip_stats(ips):s} Require service bit 1', file=sys.stderr) - # Require at least 50% 30-day uptime for clearnet, 10% for onion. + # Require at least 50% 30-day uptime for clearnet, onion and i2p; 10% for cjdns req_uptime = { 'ipv4': 50, 'ipv6': 50, - 'onion': 10, + 'onion': 50, + 'i2p': 50, + 'cjdns': 10, } ips = [ip for ip in ips if ip['uptime'] > req_uptime[ip['net']]] print(f'{ip_stats(ips):s} Require minimum uptime', file=sys.stderr) @@ -230,7 +254,7 @@ def main(): # Sort the results by IP address (for deterministic output). ips.sort(key=lambda x: (x['net'], x['sortkey'])) for ip in ips: - if ip['net'] == 'ipv6': + if ip['net'] == 'ipv6' or ip["net"] == "cjdns": print(f"[{ip['ip']}]:{ip['port']}", end="") else: print(f"{ip['ip']}:{ip['port']}", end="") diff --git a/contrib/seeds/nodes_main.txt b/contrib/seeds/nodes_main.txt index 100fe096..d839d380 100644 --- a/contrib/seeds/nodes_main.txt +++ b/contrib/seeds/nodes_main.txt @@ -1,896 +1,2031 @@ -1.65.195.98:8333 # AS4760 -2.59.236.56:8333 # AS24904 -2.83.114.20:8333 # AS8657 -2.248.194.16:8333 # AS3301 -5.2.154.6:8333 # AS8708 -5.101.140.30:8333 # AS42831 -5.128.87.126:8333 # AS31200 -5.144.21.49:8333 # AS15600 -5.172.132.104:8333 # AS15600 -5.188.62.18:8333 # AS34665 -5.200.2.180:8333 # AS49544 -8.129.184.255:8333 # AS37963 -8.209.105.138:8333 # AS45102 -12.34.98.148:8333 # AS7018 -14.199.102.151:8333 # AS9269 -18.27.79.17:8333 # AS3 -18.27.124.231:8333 # AS3 -18.216.249.151:8333 # AS16509 -23.88.155.58:8333 # AS10242 -23.93.101.158:8333 # AS46375 -23.109.156.76:8333 # AS7979 -23.175.0.220:8333 # AS395502 -23.175.0.222:8333 # AS395502 -24.232.36.225:8333 # AS7303 -27.124.108.19:8333 # AS58511 -27.148.206.140:8333 # AS4134 -31.7.70.195:8333 # AS49666 -31.25.98.16:8333 # AS48635 -31.41.23.249:8333 # AS31287 -31.47.102.92:8333 # AS8251 +[fc10:efa7:ca6:1548:f8c:6bb9:1cc4:63ae]:8333 +[fc1f:22c3:95dc:a3af:4a93:8251:beb9:1858]:8333 +[fc32:2c16:d0d0:f1fb:3b27:c187:8cb5:9201]:8333 +[fc70:de9d:7fe2:b32:5828:1a3c:d0f:83ec]:8333 +[fc77:89c1:cb33:b770:f92c:1eff:a60a:b1cb]:8333 +[fc95:6edb:af65:9ea3:cd27:21ef:f5e2:29c6]:8333 +[fca0:151:79ac:8992:b51e:bdc4:6ed9:41be]:8333 +[fcc7:be49:ccd1:dc91:3125:f0da:457d:8ce]:8333 +[fccb:248:11a6:1042:bca:1218:f7ce:7d3d]:8333 +[fcf1:22ff:3070:582f:a873:61bc:4bc1:81bf]:8333 +25rm76uae7qbj7dyrwxe5koi3eyp4pytzngnymgk2tm6m6ojzhma.b32.i2p:0 +2a4f3ac3rtweo5u5juqjdx63o4pytnpdr2ecnywjrdsd27pvvfwq.b32.i2p:0 +2cng4offkkneiw7xtfhvcgyu5rohy6ta4epowlrvnkbnuxfef3pq.b32.i2p:0 +2f6uzzetcurnwoioo65bgjjrhab3x5mgeacfojllwp77psjgwu7a.b32.i2p:0 +2hh75bmlo7nbwympmqjhtzoes7lxaxeph736i3vgrsq6uf3xkd3q.b32.i2p:0 +2ipe4z2l354zluvnxesjthdayd2n36qe4fuawqh64cetbufvagkq.b32.i2p:0 +2jgfxxzts6rfr5m2iwklltya2kmuejnkufpt4bavwjhi2j7fmyma.b32.i2p:0 +2k3lztzfal3k6dl7yrh2jykfa3xpmou2c7cm2ewo4qctkkvbhfvq.b32.i2p:0 +2lyuiflrruwnrvmlnsoxctsoez5bxsd7e7g766eamf4cw723wsxq.b32.i2p:0 +2muk57255tdm4g273fy7aitrmqnturut6krqojxz76jssrqm2rsa.b32.i2p:0 +2n23repkqxcbemx6vwl6wwkpel4xoezt6x6bissipxrz6dzijiaa.b32.i2p:0 +2ny6ifcupp7xx75a2anecwhih5kibumg2o3uqdk5j2ejn26jkv4q.b32.i2p:0 +2u6vnbkm3ofxqqzkxi5kynd55inreotaidt3dfca62fpgtxabdhq.b32.i2p:0 +2ucgg5wlvoxcas2o5lscp354ghcdwwpx5hadi3kcpr2p2pysk5ba.b32.i2p:0 +2v5nr3u3scbyxd3nkqxinw2pvqqe66y4hc3u6gotil2sgbyivruq.b32.i2p:0 +2wvq5am4tsc3ejeeunhhofp6tni244zkbqz7lbqjycjwcw7v6tva.b32.i2p:0 +2xygt6zbuiqvl2jdn2dlavjjzumqpwkgjawfosmhkaozwodcgl6a.b32.i2p:0 +3bghwmgjmsmpjevkvou3eldck2vvvvidykxvomn5kxfogmjwbxrq.b32.i2p:0 +3covklglzlod2sxmjtyq3rlzqd57kcfjricj27yyexg3rc2hroqa.b32.i2p:0 +3gfnwe3y6n55facql4jztmrg7slxif2vmbl3ygg44p2rno57yrwa.b32.i2p:0 +3lmii22nacqrs76rd2ixpgyudrchmyrkqqkigns2nk2gcffuv3da.b32.i2p:0 +3nbv3o7j6h3okg4orvk5zfhcjdjnwxuu3cdusqh2lqeeogv7uzsq.b32.i2p:0 +3q6nv6vg5aas7i5a457ckf46nfw4lyvipdagxlhujwczqzuvu77q.b32.i2p:0 +3rgwk2zwdo343z5gjxzddvig2ivr2htncvmqxmvkvlta27ceroca.b32.i2p:0 +3ru63xjzrqphkve5xw6ev3iharlzqs3rbp475yxnr5ma7bys6q7a.b32.i2p:0 +3slxqwc7rmmpnhv6dsk2spesbt77v2j25yoktwqztpnpnt2got4q.b32.i2p:0 +3t23wkj2tslzm7ytzoxzbdekf36yzno4wjllgil45j7qqlzv2dda.b32.i2p:0 +3y4oiw7cglzzshasapfmlte7ixbgpl4js7w2afsd4znemu4ddefa.b32.i2p:0 +44qgfpibsi7w7ulbg76yt5hyi33t6unleq7yifhbhdqdy5ihljyq.b32.i2p:0 +45eh6rxbfli4ju26cqaf63vfs5xx6zgt7hn3uzzz3nem45d4ps6q.b32.i2p:0 +46t7icqffks2db3utvtm7mbycopbcewpb2dihwfapdi2ukeke5pq.b32.i2p:0 +46xory66pc6qxd6glapmcrxujp6wc5swghhbnhybvewxffo37gaq.b32.i2p:0 +4ccr4ejpia2pn72d6xok5tubyb2gii7pjdqb4mwyl4c5wiwoysoq.b32.i2p:0 +4dde4fh6gybebhqtoiraoqjab2w3qn2ym4u36l6fdwmeb63ljm2q.b32.i2p:0 +4gdidscp3badfijfuesami5opqpz5ntjw2ephfdhb3i5bgrzzh2q.b32.i2p:0 +4imp5e6332cdcaoeqtuif7xymlwpmstgchotaoa5kuzgvc2wpqvq.b32.i2p:0 +4jh4w7ifveva6rh7l2nemqor4abako6qo7rdjq26lr6anfo6gbsa.b32.i2p:0 +4n2z2vlqzupmc46hh4eizoo2nhmcucmrggpiivdb3prswlnf3krq.b32.i2p:0 +4nxdyltgdwpfkautpralacdlolzlpwr43cj4ig4gozn5y43gk6nq.b32.i2p:0 +4ocs2dc2jkd2j3kedyjn6kmfvx7lkdrheu2n2wio5zv75sedzk6q.b32.i2p:0 +4ripix2seo5ac3bjb4a5louhtbycghyf3leysidy22wnbak7tzjq.b32.i2p:0 +4supe3vqjcq2pp55vdploz455wpwgmnjqgadlvtlteaxy6t437fq.b32.i2p:0 +4trblupsxprghxtsglv25zhy4ofxm3fwa4y7mmesso3x2fl2khwq.b32.i2p:0 +4unxgzwe2zlrfgivsl72b4z5he6jawedzuceu3usvlp7bcoj3c7q.b32.i2p:0 +4xpl5q7i5uu3yktqqaw7jaanmamwsgtxsdl23ds7nugh22lxsxjq.b32.i2p:0 +4z7l5ldbrcav7lv3u2a4hso7uaclug5yfcbeztqmmv5hyw6crdda.b32.i2p:0 +4zc3ku23mmbnkjvy6mcfgvgkxdoxzvioqnfvle3q6pmiuaixotfa.b32.i2p:0 +53utzmap3lyrl6m7ws5oo73rpc3y2dawcu43g7q7hkru5qx4djua.b32.i2p:0 +54h4pb62qkqott3do63jc3jflpt355n6gi5coad6fkkdvfir7jga.b32.i2p:0 +56xx7arua67o6gzmz7fisqsco3s5yx3mhz4g7dwp73nvjxx44idq.b32.i2p:0 +5dfgzcf3ccte7riwfodvefwhet3f4z6nubeln73q3qpyadbtekxa.b32.i2p:0 +5dx4sfe4huncxaflmwo5kzwgrbtvvptttu65fgjzquwl2vwizhtq.b32.i2p:0 +5kog73uwths255tdrwee7dc2pshq6xlukbxtpgn3bbwunm52jwdq.b32.i2p:0 +5on4kc5ev6pbv4ib53xcwhwve2d4agh5drzwuoqwvmrqv2czrjba.b32.i2p:0 +5pjaaexikmlyhl5dihzvqbykuec6uzkyujvvs5bjoi6htlb3oxzq.b32.i2p:0 +5puvvkyv6qr2kaqb2avbqxzhdyiquhk2767omhoa2s52gcnfcx4q.b32.i2p:0 +5pvqmsnbnldzogflte4nwyxpr6jn4x4rxmrbjcwjknwwz4255rkq.b32.i2p:0 +5qf5uwixbva3xzmrgl26k2bswq27ome6uurvhcea3i57rhz4lqgq.b32.i2p:0 +5qn7zzaxno6jogdskmjqlssi5k34ibkokcghts7vrfctb4vmc6uq.b32.i2p:0 +5xhyftag6e6hjwdosgffvkxk3fo5muk5vqbcxbithtjr6zg6vuwa.b32.i2p:0 +5yme5e7jmq73zsm4ap4agnkiwrupjagrybusvlyzemeek7lreswq.b32.i2p:0 +62cmrc6aio5blhc2rx5qgwai2urelcq2mtkl4jpprlyt6kihlbsa.b32.i2p:0 +62srw23f4rrxzs3253g7mb2lbop3pfpsu56g5iiptrao3qoasd4a.b32.i2p:0 +6cb5bbpnsnr4uxlkwtekxbg5qrwpvdqfpgncl46xndg3np4yfita.b32.i2p:0 +6dkvhlhwoiwpdjpebuemxq66soh6os6xa2sq42dwhfbp3d4sdzga.b32.i2p:0 +6mroga77egf2fzs7y46huhxwesppxx6k72jc7h2cznq2fmcaelsq.b32.i2p:0 +6rsbnc2njzfyppwcjlmpt4dxzndxe7scyc2vjzjvixlt6qebslwa.b32.i2p:0 +6ujb3xak7iformdm7xjpbzuyqzuu3tmdcngvhioqnzo4emcoxz3a.b32.i2p:0 +6v6jax64xiqf6dekptdqjwstuf63v2s5i6px3kn7camlji75ilzq.b32.i2p:0 +6vrjslktb4gtjx7uifoje5o4r5lsfasdcfbrnna6r56ruiaiowqa.b32.i2p:0 +6zsislqyaufihc6atpm3hnlo2uwewhnitnlzqzh7rsfgim3vt6gq.b32.i2p:0 +764xiwqk2izz4tylrba5urvqjo73q72yflkiubmruzpd2bib4pda.b32.i2p:0 +7djd7fbu66r6xwmisj6r2sfgcten7ovticj2zp4gvenhpbrokyiq.b32.i2p:0 +7fddpunmty7eruhumq2iqa2yw5ckcn6xpsw26pj6csnhnty3jcqa.b32.i2p:0 +7jwvx7eged34ctrgyrt5y6x5p7xzkfpidvwrxjplqywqa5dqlg3a.b32.i2p:0 +7lx7lr2taxmtbdx5sdqo2apwka3br7iig5mejzkxpw4ksvk524hq.b32.i2p:0 +7o3sndesp2d7mrkw3qlpfipknxddu4tz2l34hpymy3vexfyg27pq.b32.i2p:0 +7pmzb44ybjrq26wq24pdjz6tkktgwkyvvrpatmsbsx2xs3f6x43a.b32.i2p:0 +7rmw4miaffahgwpy42fnd324fhiq4dygn5denzxtik6gk3slhqra.b32.i2p:0 +7utc6ztzqaljtirabf3l5ynvf3akmzofayid4caia6nd6z6a2ebq.b32.i2p:0 +7vupqprsgbad6v2trw75e7kpk7vhmoyxqqlaxrkfwofg6qkfm3oa.b32.i2p:0 +7wgrywhskd24kqqjvodx6bxnjnv374xlnrwssy7zqd4wza5drqmq.b32.i2p:0 +7woh7qguyjfcmqu43k4hge6uehvfh5gdwel6ps2mjpdttml7iybq.b32.i2p:0 +7ykkgcm6pta4sywgl4klcvl4b6k4ucrxh3vw3s2umdpb7zejarjq.b32.i2p:0 +7zxl3ohprpqmnmsz72el5o2wqzs5ybc5ixie5i64ayvzhjbhe2bq.b32.i2p:0 +a2zioocy4z3jijn6qzl2grifqd7hvuk6kagjv5maoqrnxwoucdoq.b32.i2p:0 +a4ot6mtsfgtkciklj34r2zvkmxtbpg5ycint6zehehf7xtz2djka.b32.i2p:0 +a5gtxv444a52shcmjq5v4zkbmxfwn4o5ofqlyirhmr5goonrimvq.b32.i2p:0 +ab5xl3uj5rmagrwfwraocuinjthvb5f6wtstktlrjrlajnarteia.b32.i2p:0 +agd3ebr4tmkj5pnrukswh7luxk7bftdlngwvvntznc2rr5awkaqq.b32.i2p:0 +alwzfqb2uol3fu2tbmwy72kqxr243pwabg2g4mtaomvjetscckmq.b32.i2p:0 +ame7bnmodeayhxcsb4hh23ocakzaox4bm5mz6yfkpemhb26wpnuq.b32.i2p:0 +apiu52rucnbhji3q6qfxfbqdw35woslfpfm2kaca6mjobvrn4kpa.b32.i2p:0 +aqwcmdtqbg7g4b7kqpzpbkzoqhyy6epydjx276vgv2vg5kw2rywq.b32.i2p:0 +atyfkxoezxfmpmnbj4lmzhxtzaatiidv2exc7gzzm33brhapwwwa.b32.i2p:0 +awvhek2uj5fenn4scqhhdp5vuzg5vrrl7f3qasod7cy222iwb4iq.b32.i2p:0 +ayn7r3jdijhcl6t6gexmq45dw2tap2l67rn7xgoisaenkel74wha.b32.i2p:0 +azavco4tqpr375qqgan567lcmotlib6h7jjh3rboutrxax7u6haa.b32.i2p:0 +b36faeb2flnkg2tigqi7rxlnekwiljt25drgow2d4jvsruktqnaa.b32.i2p:0 +b3au442ynpqirynybrf22qowknc6leljlbq4xix5xjk2ehlkr2ha.b32.i2p:0 +bf2j2wma2oq2222heshaivpon6xud5fum3pzuuffgu3ddg7ss3ma.b32.i2p:0 +bipk7yyoxznzzs7tjyh2y7nieuph2gccf4x55vrci6w4aefbxlxa.b32.i2p:0 +bkmpto4dtnblvlqvyknp2fa2cfugse5u5oonoipd3qooizqdvbua.b32.i2p:0 +bnwgr4t47loftduanvx2rgcse7gls75b7zq5ydtlluesa6p3gxqq.b32.i2p:0 +bq56m3mk4w3q4fmh5vcrcxcusssmd7ygi4iyrazrhpbmjh4bnsja.b32.i2p:0 +bsiz6td65kdvoyx3d36w7ctinc6dkieasg6575dkotlpaxbplxzq.b32.i2p:0 +bsn5rlu4h3a4xpklhhymxorogxpdgudstloclzshghb4deiui3rq.b32.i2p:0 +bvqrib7iaoymm5oh3nkrfp2u6zfp3v3xgwp77jmvruj6hlulxi3a.b32.i2p:0 +bwq6y5u7jcx77ok4iqpjtiz5re4qagvhhlr3skhe3s4nphnrfhaa.b32.i2p:0 +bwsuwvghcfdegz2vg4vrrh4gqbs2yez6w6mzmct2gt6hyregfnga.b32.i2p:0 +byoucerid5rb2dducaqwepaytvkw4b4l2wmbfkbfgicflfcd4dta.b32.i2p:0 +c3xl7bimshx3o6oxwhq2jfmhmmmike2jbx5icugysmefwgs26n3a.b32.i2p:0 +c4rbwijavo6m4gj3sjo6jjwjdvmlmzml2mcagrbw6tqn3rixmdiq.b32.i2p:0 +c5az3bzjm47vsp7sps4yaltcifv2nvcolftvmnyiwrctrkwjjhma.b32.i2p:0 +c5ytdepbzhdrwn6ymkrk5a2ll3zkwpgk2la6ec7hs7ysvcxhf32a.b32.i2p:0 +c6sdbzckovbl7hd5bq5pfkkwc2xtdkx7b357bk3v4vdspzmy34cq.b32.i2p:0 +caqiocmm72yn5ymatzbeo3se25j7mhp33bd32xju463vr7ef2voa.b32.i2p:0 +carg765pk5ef25vhvpu7phus75yp2xmwf4juphulsksqrho5krsa.b32.i2p:0 +cazzdhgkd6ejtqu3hdh74cfnhq536ktrcnww7yq6lyjwd7ocs4iq.b32.i2p:0 +cgeb2ffbyjb56vhuder63aeswvhy6isvrhivwbxfaqcu4th5pj6a.b32.i2p:0 +chhqibkwshxl5afottq3f4qhtaw3esesunfc4xljqcjeqcht7d6q.b32.i2p:0 +cilepisotgs43xi6s7lwlahpxnp55qjti4dck7i2y3kicq7tmw7q.b32.i2p:0 +ciwvimts7zzoyrknhlowmzh35mzx4cluq7uycw3ffcckuov4tjjq.b32.i2p:0 +cjjktdv4wtr232f5jtw6rge6k2bmxbunelq236vqt2yte6jnqfkq.b32.i2p:0 +cjvo2dibbl2hapfbqnpqbcgfpzzwkpkojfac3zo4t7iiwuffjj4a.b32.i2p:0 +clqwslg6ijsxtydfzahhxymkx7oboofarzbzrzrla5mhtmpyvdvq.b32.i2p:0 +cmfgxulstg5trnmmssjvdrq5e7taqfta6jpuiqzakqujddhljs4a.b32.i2p:0 +cmnpbzyfif37aq2bncdtp2wankepsaxpvpexjpydwm6etufqseha.b32.i2p:0 +csq5rwmdv43eii7ohtywl4ou6kuewf5wb4nswifkfx2iri7fzdlq.b32.i2p:0 +cuktr7luziv3z44rh6ef75hl3atlfqcszodgjwqahgxsstaevvsa.b32.i2p:0 +cv4zl42obux6uk7ghxuujbwzl4kuaneruiq2gqmaksxqfcbnxjkq.b32.i2p:0 +cws3w5267jj34c4icoz2342dgbm66dr2gljqkeih7kh6e65r2z5a.b32.i2p:0 +cysjtseqmtwng3ty25dapg6gyzozmbzv43zqhg7abu3isjhmac4q.b32.i2p:0 +d3gmwp7tebwuagm6orga3hwhhuchp6kwsfcsdttittcssjhkshnq.b32.i2p:0 +d3udzfukxm3cm2ucd7oen3glvgtymah3r7wdndli7tl5e3xttswq.b32.i2p:0 +dclij7rdlmxclsasycgjtwczkksmjykzcqf5z4yvyhofichqyh5a.b32.i2p:0 +ddtuamdoynsa4r543psethu4ygfuwvcc7ftlb24ak2n35gnmekha.b32.i2p:0 +dfhkpobqzc4soif3kocu62sodohxekxmye5hybt7lr3agqu2k34a.b32.i2p:0 +dhci2k575bhvvi2pf45or4x3ts5csnm3yqzaff3t2tsx4mh2d76a.b32.i2p:0 +dioihjkfyyb4xgypkmfpdepzmrwoju5tc4v7bwmhcdrllnpg4hmq.b32.i2p:0 +diqahlv3xidi733dkqymddufa3ftlbxoxcgqmtvnrjs4kc5qzg7q.b32.i2p:0 +dllxsougtvwyyrhthsud4onw4q4jtpirzghofsuahpunr2pkfvya.b32.i2p:0 +dlz27nejbzcswguuwzgpv6efms3uaunximpnarc7djgjtqjlthlq.b32.i2p:0 +dmed6el2h56j5kno7xocalj6k7ehosyr2fbwcrk5yf62c3edcodq.b32.i2p:0 +do6y4lsrp2qzfenbmplla2shhysigcrdjuvb7b5rg2yuedjs2wra.b32.i2p:0 +dqr3ge73yw7ctie2vvfmowhwiywplwavkiozfttwop4sthhg6fcq.b32.i2p:0 +dqyiv5vbbxpvvzhg4z4s5d4ztjq3jeeafy7q53vuvv4gshfponoa.b32.i2p:0 +duawsbyorcgdipwpuvt3f3tmnyqs32xr7h2kzyjhct44vx5i67eq.b32.i2p:0 +dupayeh2uwvnmz2c3ti33x76zgnv2uf2rkp75kgdg3zjlyuv4xgq.b32.i2p:0 +dw7oovp44knhrikivfmt3hs2lz2trlpb7xout6dlinfnzxeac3sa.b32.i2p:0 +e6qoyaetj3zf5jmavn44avsjdynx6oc6lxdgxfsq2bq3zue4nyeq.b32.i2p:0 +ea57r6dh5gjumzc466khizfymzl4j6mxuq62t7kb7lnbp64lxpcq.b32.i2p:0 +ee75buofrqnhkjmvabyhfalbkz3sjg3p3wchl3wlaa4cz3ua4wka.b32.i2p:0 +eedgqvf6vrxdvporvfh3ihjizegyplk3buupvu6v3cbrmiplv6za.b32.i2p:0 +efopxval2cwm7fe2jxd2srg5bm23cf4q37bnydecszxdhflvcwpa.b32.i2p:0 +egweubjkn3bvp5ukk2qdtkvfuss6hmtc2pmtblmtyteu2ax4es2a.b32.i2p:0 +ejq34wotitjk7o5xmxdlx6zakrxchwwtk4vggpfpxx2abyacrh2q.b32.i2p:0 +emckeftl5wkd4mylivr3hrxphs775rpcq5s4jm4kxdaamc7luxlq.b32.i2p:0 +epzzk4ta5pn6ralqol4fp35j4gzjfvcjnmm2oefwazk2dki2246q.b32.i2p:0 +et5ndch6nw756ds2myh2ctvszhqek66j2y46xtnh3qz4m7nbmqea.b32.i2p:0 +etouz5h35ofnip445vwtffvtbl3qbvx4dfopf7ypscxhboeuy2yq.b32.i2p:0 +eubmbzk6rtpu3utz4crdwvm2jy564cywwwrw6dz7l2kfzvaiyuha.b32.i2p:0 +ev2ijxlza3gp26vxubheds4oxsimlvttrv2ezgnger44qpnpyoxa.b32.i2p:0 +f23v3vovpxxntn7xsm52uf6hzfngbmyhwbcdbtg2pqaoebag57tq.b32.i2p:0 +fae3tesbnlbnl4flz4hk7eud6axewuisklvw634nplv7ieeg457a.b32.i2p:0 +fbmglhmeasq3it5ziaow7pczmzlrbwavo726j7secd4wugakepmq.b32.i2p:0 +fd7npzmrpdkfsrsdytagsjpnzww6y5vgomxulnfpwbdiqup37yqa.b32.i2p:0 +fdraytuzmed622myazwpw2sg66xfq2pjhpplt2smi64dqv6qb3eq.b32.i2p:0 +fghecqp7tm3doc74vozr2qiddpo7j3kfzy2tu2nfckpoqss7qora.b32.i2p:0 +fh3yb7elyvnzmhxv2hap6ddqcym6lpfxafavkuhrrxk5sb3wshva.b32.i2p:0 +fnhesnhbix6ua26b5jpbieas7s5lglvusmruk3tciov3wyry4g2q.b32.i2p:0 +foc3ole3bfsxzz6sxufnwzhx72cijco6oefwggh6a7mx7kytbk3a.b32.i2p:0 +foyb2sneia3ygbbjozz4wszcaznztjbgkae4d52iskyxxzku2xra.b32.i2p:0 +fsdn2phijfbwo35ezvgtkzv4p7wp4ym3yfd72ucfcahnw524d22a.b32.i2p:0 +fwex73tw3ebsysv3sziu4pl3pmgkbdm32mc73uyiswlcx7btcf2q.b32.i2p:0 +fwiu4gd7i6da6gbslctxpetgkb7kz6bznemcsl7oy7f6aywmndvq.b32.i2p:0 +fzuoiirfzhnml7egyor6b3bzthptsioe6zuwe64mn4pktmi7c4la.b32.i2p:0 +g2ins5xhxtdd5m57rkopn2rm6mtr677ktmo26ymcrc2bz5v2igla.b32.i2p:0 +g2mv4wdsdd423imdpfq5dd4fsifa6evmvdmj2pccb2nqtfas7dza.b32.i2p:0 +g5ayhhbanipee5wyehvfsf5cuqn2djl6xvrcmuv2r7us6mrcl7da.b32.i2p:0 +g5eujubxvzwiovihiedokkb7uwheiqb674rfa2xijsyyr3sexiwq.b32.i2p:0 +g5yzfhaelbngq3zqfpufdrpntpqr5urnoteaxmnzqkcsfuqs5svq.b32.i2p:0 +g6cxz6yy54bbkkjrklbq65ujlwom6i65sh2wbhe6zebnrciwhzsq.b32.i2p:0 +g7oomoe6adb3qtwit5aztjx2lpnvkvopqgtb5xtdozara754miaq.b32.i2p:0 +g7samwpj5lyi5hkrrwizzmzez5a5r33dq2uwa7ufi6pdv236qyda.b32.i2p:0 +ga25oahtxga27pmece3snv2vlpcim4gitvzjl42mc3oxkhclxgja.b32.i2p:0 +gco2hwi2rcbbapcxkzy2m5kaaui7csxqst337pycftz6kwyeraqa.b32.i2p:0 +gd5r6jobykemsb3beip7kaham3tyfr23w7lrkjvo3zagrgbrgnjq.b32.i2p:0 +gd6pjdoj6nniith2nkvd6pdhoq5rugxbm5emz5exlhieyc3hnbna.b32.i2p:0 +ge7ppvshhfd2bf7eywnc3xepbeh5nzcqyqf5tdchoimt7nxhz2ca.b32.i2p:0 +gfartwr6pkbz4a356heez436fw5im4thimitetn6sdsq55prb74q.b32.i2p:0 +gh6mgvrqvx47hmgl2uhdn5623cdsrdbe3fwtgp2y72svvoi7gyua.b32.i2p:0 +ghrzttcyxr2ujobdxvl5pljjfywy3hfyq4i4mqiha3t3uuiqn2da.b32.i2p:0 +ghuf53y3dxdnxgjjxast56jcsjohoxffc45mbx5wvx23mt6q6nkq.b32.i2p:0 +ghvmoyhep4sayhgen7c2pcg575aiihrwlcngm7lxxqtbymbgmiha.b32.i2p:0 +gk3sjjgjcff2gxmxy3wejlxbgqbohxsnfxdmd2p5ybm5o3pgqj4a.b32.i2p:0 +gmdyky27756xd4dcky734kuqiojgwdbhavz6ou73dpkg2xhwjrsq.b32.i2p:0 +goe4yckghgepu2hsctbizoszs27r32hexxsovbbkqqi6t7n2k2wq.b32.i2p:0 +gqerl5bp6brqik4pxagwldb6d2sy5enbxav7y2a4ttgeczlk6dzq.b32.i2p:0 +gvlhwl5joqjjd7n76ve4tcbqn3rhzfy3ipmdwiql4cjfayyfiwyq.b32.i2p:0 +gxj4yw7xhezc2oodjmmsfxmiopfzxjmbhmfkipcal5fivqfc2gfq.b32.i2p:0 +gyccxcchiq47yfzcerb23dr57mqvqptip6pvnemasbd2vpbgs57q.b32.i2p:0 +h2hcwns4deljblz6xbkba6e7eltqb75lh2gjpelgkxvg4ey5hp2q.b32.i2p:0 +h3urnunwn6chzvbjvs5x7dvfauzwnozcxtj5vjjdyglnfmlzigzq.b32.i2p:0 +h4k3d34tuim4gi4tfie5ulslg6jg3yqhafujajno4pmhy62yecna.b32.i2p:0 +h7foalesr2keimfe7qv3fwygefwukvoojtr6mlgw5urw7jojjn6q.b32.i2p:0 +hcv5zizlrdemafcezwzchu7klydbrquutmdvr5vwaawdcpcwouyq.b32.i2p:0 +hfu5l2szzt7faqsbef2reqku7pdhxhfbi462pahejq4ykaeqgizq.b32.i2p:0 +hglrt74vwbajhbaykjwkbjrdtptjxgnpg3w2crfphv2jss6of5ia.b32.i2p:0 +hiewpc5jb63t2xlr37tbvzba4jywo74iei6hl4meadbj2jibow3a.b32.i2p:0 +hnmrabzioiwxj64ih237rxf2zbdttfndiepp7vikt2jko7ovvrkq.b32.i2p:0 +hnxxsx7stxzesijof4fgr4xxysunipnivnxc3lqj2lefs7k7dqfa.b32.i2p:0 +hoclepz72rcrwjxzsgl4o7uvxih5uzyqkin77iovccxwyek45eyq.b32.i2p:0 +hoislrpk3v4grtevg5mowggoi2zbltk3hfbgp23qht3zl4sn4eaa.b32.i2p:0 +hpaio6vghijyxd6fxboef4f7ogxhusqcyetjbp3ymmmbv6tzmg2q.b32.i2p:0 +hwd3yvybu435k2svvcowd4hgbk3yiemw34d5xauf3e6hr5t5wd3a.b32.i2p:0 +hxuyh2weoko3iof7hhvffcira3yt3ggmxb5prio6tywor4vut6ia.b32.i2p:0 +i2k32sb3fmkhemu2gzm7h4m24ubcgqdohhgq44qya7zbkrgw6mua.b32.i2p:0 +i2zleprgvnwstip4ehhny44y4cf6mp7gqbl7y62x3yndjx3s7nia.b32.i2p:0 +i6p5plk5yucb6klnedouoiubr47jpw5u6odvn3gwbtxqhmzwvvqq.b32.i2p:0 +ic4ybawsjcxr4gfnwvp5go2wsugw6govevz2lmmef25z2mfva7iq.b32.i2p:0 +iccnhyf2ma6m7vcbu23dp4erpz6vzf3emlrx22w5e2pie5hh2v3a.b32.i2p:0 +iddzvtvx5l4mpfv3lkutmf3nptl5qxtzv3qyxlhwbkptz2mphyva.b32.i2p:0 +idzlsjx4m6n3g4knql7h53bnnh2v62o2qt6monicpz7q56u2jwlq.b32.i2p:0 +ifajz75zdk6w63v5zq6tadlq2cycyd3tkstultnqot2fnglgxpia.b32.i2p:0 +ii7ra5loq7nw43kxjtr6tdhf6clvtnfqqatnaz2mtr6pf5hyelbq.b32.i2p:0 +iiai66vnuffmhnjiu6wllnx474hwkpw5eqowj5k7i26z2ea7dd2q.b32.i2p:0 +ij4nbzypgqlk6ztlevbjuly4m3uqantz36eyed57tciqhmlgxfqa.b32.i2p:0 +ik3asfioedfgrzjszelqicxlnban7qfnvlnng2prol5iut7ltc2a.b32.i2p:0 +iorno6nomjiens5qvzvdeav2mmizcxpp5wsbicdazpg3gvthqtaq.b32.i2p:0 +isefwae7twhnzwgrhcfrvk5oxymgxpzuokuc5cywmo55is5nb4cq.b32.i2p:0 +itrjkgswudaoyrrfmgpi4vtbowcwkpzs523lh44vbzwbmcz44rka.b32.i2p:0 +ixhgawpp5anrlwxxgfun4zl3m5xhlxassszncph4i4e6aymb5fqq.b32.i2p:0 +ixvv4njukuae6msnpatik45oucfaabpeisbauqxddhwnubu25ioa.b32.i2p:0 +izrk5tzrxm4lq23qbdiaoxbzzhygipuucoyapz6ib4dprxmfrvhq.b32.i2p:0 +j26gpaan5ablb56k4rtbeamv3ihd4vdzdv74dw4kkevxruapwarq.b32.i2p:0 +j3lqwybu6vptuo27tpnkckliz2weani3pnzzbziwfsj6nqcb43la.b32.i2p:0 +j4tjrfxnwcmbhkixmqlnotginhfxgfdvjahr6yn7j7rkbdqngh4a.b32.i2p:0 +j63slhfjsmvtoetikb364pztywrlrv3rpk452mf3dyjizm4fbdra.b32.i2p:0 +jbtdslz743oawsvgghp2traf2e67de67ec3dbigvyb6g5jotapoq.b32.i2p:0 +jd43pc2l73ek6hk2tp6hiyada7ed7vshqo2fvxbga2daylcghfyq.b32.i2p:0 +ji3bxuak6mmsvcppqrt2g27haiugobvqbyngt2n5cgtf4xmhyx6a.b32.i2p:0 +jibaw7ynbnxueqsy7k7jyvoj6ldzbuckppfx5wozt7mftihy5vcq.b32.i2p:0 +jiins2brur6m6dt35rr2rj7giaggvwcffz6lsvxcrcc5nfv2a56a.b32.i2p:0 +jpl5utzbcmszv6xjynf4buz6hn3kra27xvfowplvjalpogrsxjhq.b32.i2p:0 +jrvg22xvbmjyrkqg7mr622zhnda3ijtua65cqngwrven7sf5zd7q.b32.i2p:0 +js2nuhxqxp7ocg6wh7n7dflcjiexkyfauski5hc2w2hke42mygca.b32.i2p:0 +jspsip6bfqu55yxd45lf5kpbhn6bvtt6hgycixbzoyuwoabcenka.b32.i2p:0 +jtgpesmlbpsvhv2jxzrokydnmad7aqbsx5f6ptyqol4ypwkn3zyq.b32.i2p:0 +jxqyize2ct6mm3jvvzavm2zbccsoe5qd4ekqo7zgt75rzz3mni3q.b32.i2p:0 +jyugnnxqhe6alidik6xclgxb33mx7jqzqosznijr4i6zaqavogma.b32.i2p:0 +jzymnirkvpexwtbykienuhpcp6hf2r5hko7wjlvorhsfaojihf2q.b32.i2p:0 +k2m4cxmgn7wnv37tupfq66ycjcwcd3xubhzhgjkxluxn4hzym65a.b32.i2p:0 +k5oyn7higpqwarsh3ukdgmx3z6tvqcwju4xawrge6aaswrdnoo3a.b32.i2p:0 +k67qwu4dtuehpxm6d2nl6ik23fvdtn52rmmznoh5qitd7wylmm3q.b32.i2p:0 +kbq3zwwo46vvvhubrscfpwapbck2dx5lvyu3cs62s7ntjdyruh4q.b32.i2p:0 +kcj5ifya5tnsgeyqlgxjigdnwy3q7gdodqikmfotsz6vbbtkfbqq.b32.i2p:0 +kcqkothplemakipfpeajxmu4xsszpaxpprgtuv5tgfdaqejg2sqq.b32.i2p:0 +kdc2f7exxzig43scf7r5clipy3ywkwxhdevguymkadcmhxalyxzq.b32.i2p:0 +kehosmgk76fxnjywqjj6nqs4ohg4hsutljdzjo4sswhxlj5l5tca.b32.i2p:0 +keoewoantu2e4yah736fplwr5omvzqdryadofqogk3hbwaskn6jq.b32.i2p:0 +kh5svu6npgstymw2kuxamwnzalpu5jcmgx6gsliibsua23jds6rq.b32.i2p:0 +kizk5v5e3khywdh35vwvztsub274pruigqnmumorv36otvncbpea.b32.i2p:0 +kjdqyu7j6ojdhftlh6dd4do3ns6nhj544uzjt53p4cwhppg47mhq.b32.i2p:0 +klfp44ljmaxoxhpymmnuj33d744ai2wcbj7o5i2cv5mkjbmjc3fa.b32.i2p:0 +klsaj4g2jh7w7gxwctniktg3hqwspm7zlkwtsaxw4nu35jssjasq.b32.i2p:0 +kouxxivmwywiwv77bvpe5lgamnhlcypan6urupymt3s56lvrnftq.b32.i2p:0 +ks2nfolgkpdfg7pizwv6kueyqeqaixjru6ui5qktcycsyulppg7q.b32.i2p:0 +ktjqkbyl3soy4kscrs23n2bidiismoq2jvsx7d7p42sxizgf46rq.b32.i2p:0 +ktua3j43ijxhhhfeljsp32kdiuic5nlnfnkx3ealy7ojva4vwkoq.b32.i2p:0 +kuzu73gzvlnog4cdtdk7edbusxr4pigknvwg2bjo6l46ugsgmrtq.b32.i2p:0 +l6kwirv4m4vzzmg6lp4mpbu6k5jv2yjmdgsxxr67x6blm57i4dsq.b32.i2p:0 +l7j3gpfyicterbchswmaasozruckfohtrnqssqttsxggjomlccwq.b32.i2p:0 +l7lvurgolje5wjlbzjov5lwntoumxrlx6depd55memi6fy24bhba.b32.i2p:0 +lckuhkvnnkh5gs3s4v4tdpesmdjiruqhfifgkszyfsgy6vx2h4ga.b32.i2p:0 +ldl3a2gjjlj4sqmvbomn3gmj6xig344krwxy3gulhlcihyvqdsya.b32.i2p:0 +lfm6pz6nqqm4ofhlkja4y63myjjumgrvh7qul2ejiimrl4izdgwa.b32.i2p:0 +lfomaqlecc4ieyaldsm26o6affnlx6nsqup25wasmd3f26qeghpq.b32.i2p:0 +lfuvzzzceuik5u5pnd2i67amegel5ua2rrnncxkyyc7bhteq73aa.b32.i2p:0 +lg5h76b5n4r3ne7bwpf7be5byyncrapo7thhkuzaktblk63qvjsa.b32.i2p:0 +lhl55njfnmt2fzbklcnunvscq22jx4nxd5p4pureu74442mrjgwa.b32.i2p:0 +lprgmkc45te7skx7rffpz72ca5c3zdg3tabiksdboao5w4wceu5a.b32.i2p:0 +lrah7acdsgopybg43shadwwiv6igezaw64i6jb5muqdg7dmhj3la.b32.i2p:0 +m3rq24awypjmmimszz5cqsdwo7okpkjpilny4ss2vuxwq22fqdfq.b32.i2p:0 +m45c54fio6dij4ywvnjosbokblhqsynyds4ywagrrrkzhznoryfq.b32.i2p:0 +maqk6lnttwykae67lhms6car4py5p6w74ntyv7izskl7o5lr4x3q.b32.i2p:0 +mbz4wyfeqtllccary2crak2qfovnaq2366vdddro76ihxcaavfpq.b32.i2p:0 +mektdpdufe6p74i7ijumj5nw5ckjtphj3ic42fbpstgdlwpvqjaq.b32.i2p:0 +mf6tmlegp7uga66cdael5376uaz4qd3wacuh44yvepa3kbu4fk3a.b32.i2p:0 +mhgxec57s6h7eixgemsghlcuhmgh7m7p7phqd5kzmm4wovrp2pqq.b32.i2p:0 +mjpulaafdyuanouslfpjcsvumi4edtckfu3ffn3ipabkxj4sn35q.b32.i2p:0 +mrzn5dwt5suy7ywbc5rb3oqunxu4whkrarfdabh27rdzqu2lycoa.b32.i2p:0 +muz6dlwaldiabrmv4goironrkejtjiaivtp5s4wy4xiktwu3firq.b32.i2p:0 +mv7b44duaxqpzbdztnrdvnj6ypsp7yhs4z3dc2q64jov6pritmja.b32.i2p:0 +mwevh5r5dkzddlo2ol6bojpdds3kno4xqoy6p6ulid3paamgrtla.b32.i2p:0 +mwyjzdrgtypbwjyulw4ifetejz6xusqstvzylztsphpg2r2zf7ua.b32.i2p:0 +nbxnyibgbf3awxxneu75a6xhvs5foxrrkfzwjywk7vs2pp7dfupq.b32.i2p:0 +nghwktleeqp7j4zmii3u55hgxip3kd2xj2hm2hb7qrf5x3ym7cwq.b32.i2p:0 +nkj2zabj5b4vhold33nz3kgp2x3i3es2l3iz64rxx7em7rkgubaq.b32.i2p:0 +nluwsgpbk3cplcb2fpnfpjrhot2w7a6mtjggkqikudspysqlsceq.b32.i2p:0 +nt72dtparurtk3ccvasllacdzg2ubtvc7jp2kzx3hs4dzvrtayqa.b32.i2p:0 +ntxiyrlhss4r54zz762ugascfnpyucuzhvt2vdbjwysoyohlk7wq.b32.i2p:0 +nuj7cpelk27czgrj7vcyv47qazkdlqfhaz53huzxohv32fn4raya.b32.i2p:0 +nw5dd5rrmlmrkrf6ncqtivajhq2idmr5zluw5hv35tngsmngnprq.b32.i2p:0 +nwfdwlblhudom3oqe32yzzuuj2sb37tjvlmimiru4coazi5freeq.b32.i2p:0 +o2dfd5fx3mwyw6fig2qiesnl3foynovu2ifhixrni23uiw7gnaoa.b32.i2p:0 +o4mhr3ptokcgwopb36okxwhreo27pqq7m3wnuczm5rbku7yatuoq.b32.i2p:0 +o6vbupdnpd5bwvcx7ivaecgyo7x5vdu5em4va6cmx5iwcf5tyaca.b32.i2p:0 +odbgdisp7y4fj5xqycwzibau7cwzen5wpjph6betdvgsicxx6q5q.b32.i2p:0 +oefjimgz2vzsjixg7h56gukedb6n3gfw6m3e7mrxypzg7givl3cq.b32.i2p:0 +oig6mlccmguof4iar5y4kqotjllryhtse6j25ch4rgcerqinms2q.b32.i2p:0 +ojrr3gjhfhlshhnvrbvyqxw2wuonng4a2oq5ooph6bmdl3evhxtq.b32.i2p:0 +ok5i76xbjhfukzcsffxtjn4anq5lwgct2ktov2lnttht2ic2v3fa.b32.i2p:0 +ol4zsxh2mml3wmdl6ix3rtu4fontev4w437kp4rns47keidcz5dq.b32.i2p:0 +olctygj4urjaes36stgzuxnfvjsnub67g3qtasaxo5krmiqwwm4q.b32.i2p:0 +oqbvnqidy6wtal7amigktvq7iggyv3ghirvi5h3hxvwneb225u5q.b32.i2p:0 +orvshryqq24l24e4dvockx2ekj4hu42otqxsvyvy7tm7hhdjsz7a.b32.i2p:0 +osrwb56pz75vgfs5q3dtsgxoib2ijz7dzcjcktzbbklceg32ggea.b32.i2p:0 +ouk4enblrjm46yoycsybi4usgtysncd2eyli4pstqh3yunhrcpxa.b32.i2p:0 +ovb6oh2sliwf3q5ncjcpiyhatfb4zjsf3bg3npmlf54ry23mr55a.b32.i2p:0 +ovkjylbsfe2756cpphzx2zvhhmtbetr5ci6swmydqc5itajqxm7a.b32.i2p:0 +p37ckc2woa4tvpt7opht7btmks7ni7cdrj3a7tb5aqw5euthacwa.b32.i2p:0 +p3qxhtoxajkmt7tgc6stv55msievc5323rtrsiwstvtf37iwi4dq.b32.i2p:0 +pcdlqw2awppohbiued4rffgs6n3lv3thhon3r67jmx2652qx2khq.b32.i2p:0 +peh2c5jbvzupm3stkgkmrlkhzzlnn4lqlejlehe3xjartzm4t6dq.b32.i2p:0 +phixf45de5tbuqt3yla4cldxx4cckybafsbiu6mbuoru4b5wttwq.b32.i2p:0 +pivckwqf5htiicsoevadbi2qtkapd3fr52jbsijhlwr7ksc6i4eq.b32.i2p:0 +pl4dsxve665bl6y5dtldtnldp3mrzkuw7hs45juitlay2zj7xvva.b32.i2p:0 +pnhspu3rloczdbzsysa2iftsgoiy3zgcd22jodmk7zdjanhiemla.b32.i2p:0 +pnsmjjbigqktlxpuxwvuc7jb3bm7f3rtd5xfulrwbjxdqhzjjsaa.b32.i2p:0 +pomodyf3nnav7yeu2usrshzq7dvdqawrhoau3uxlimivhy46lmaq.b32.i2p:0 +ppe2jfsb2xrmgwugbq7agy44ucb6yq4qbufaf2sh76b4kwpa4jcq.b32.i2p:0 +ppez53yrs6lanyvyxuxblqxiuvhnqvvtafmwaid2kgp2dx2v5iaq.b32.i2p:0 +ppyl3c4tanrlkpwzi2zpctkmevfceo5a6mkemsyvgg7gpwl44k4a.b32.i2p:0 +prgq2fqhzc6lbtyzefqfx477sakkfumxv2i7psco6tdi7zr3yrma.b32.i2p:0 +pri376r6uuwgnbnevki7c363h4ryfwjza7pcbfswqqxk6hnrkhja.b32.i2p:0 +pscw5yzaj5js2fn7gzrzoj6teonlsohlbnvdco65ubdefpnpwhpa.b32.i2p:0 +pv6g7uin653rerdiivdgtoirjvokjowi4b3fwatszdlteyos3i2a.b32.i2p:0 +pw42656k2vbwxmvrc2qbsz3jslvcxahln7rehsbia5jdio2knh3q.b32.i2p:0 +q4o7bf37e6afx7evwdyovsqptjwo6td3c6qtjh4rtdngp3trwi3a.b32.i2p:0 +qaqvxmyvq2m4wombmtaz3our3qmp7eet3qle5flnrs3a5wgfhxba.b32.i2p:0 +qawed5ou5vb42ugi42goxr2s6cqzpyh3s5atkhvfvyhyc6anxyaa.b32.i2p:0 +qelsaseevnmz2unpovh4nbpjpshjg45iudiaf5zbngealwwuxe2a.b32.i2p:0 +qf3fj25vq2dbp6bvvmcroixohcsk4qfvx3t33kztomgmyu5vdkza.b32.i2p:0 +qfnafktekhndrriu6mkd3dxao5lpm5hdgezot2ngvtu4jxjh6fmq.b32.i2p:0 +qg76yse42g7rjhy52hhyo34jcpdmqfp3jh3dqeg4yxsk2bzsp4tq.b32.i2p:0 +qgemqcxwh34xaotjlik26ygvu7hgjzp3zp4fqzs3gy3stcgzdqpq.b32.i2p:0 +qgeudiusyeltzl5ghvhjhdhs5cqa5jjspjlcshdsqk6kkk7t727a.b32.i2p:0 +qh6w3hgua5ftynnmg4bqpposs2qwgfmxk2smxirne56lbbetspda.b32.i2p:0 +qj26ldkxdaa5pgvmifp6uvwlk2rbg2l5vnew3vewevhivjzazzhq.b32.i2p:0 +qllztpshewimlfgxfv7gyqu76akuutu77a3qo24ubz44kk7cnffa.b32.i2p:0 +qlvxgvl6kmfuclivjj2hdliuhqp6cu6tl2gqbp4sxxlw254a7xcq.b32.i2p:0 +qm6vfq4pfvjg3r4g22xkg47xc4d2y5c7qlsoqyhfppsvh3grjfka.b32.i2p:0 +qnqojlthym7z4gwizcblhpd2thy7v4a6ifme57bzyl3nxzkj6ica.b32.i2p:0 +qorzdjceszf432obxa73tnwhqb7ltxrxlfkkqmw2flmfjhoyv36a.b32.i2p:0 +qpe55twml5tsuow2sfxac56a67hhf7gm4ogtsv5wqkfkrmpd4d2a.b32.i2p:0 +qslxyiesbbegxr6ksmh2lfk66pogbubvvbkglvowikkpgvdppbwa.b32.i2p:0 +qsqtfbta27nnygmsiimzu6exhc2jgps4aicfmw4dgmmj222siuaa.b32.i2p:0 +qtb5fd5yaytg4n5xviyaqpljdprj76bzektgyet7grlogm6gwwaa.b32.i2p:0 +qtubqd2rbzzftyje6r6zzcao35knliq2df5v5kzs77y7t5gaxwja.b32.i2p:0 +quzkrgzb5pmn4465647ke5lsfbseqnorr6ljvfsxcagj7rzl7hcq.b32.i2p:0 +qvuzgrsquvskvxpac3fyrh6ssho7jx3mcdrdgprdbel76o6yxcvq.b32.i2p:0 +qwdrunaogud3v34aod63v4upwcoawqs6hshrye3quktuxziorw5a.b32.i2p:0 +qwhvlprhk3ntswr5xntnc2hhgmvd3bbgzgkbombiibhrsj7k6gyq.b32.i2p:0 +qwtpmh6ssnkeowocnvl7uveuhfodht3hsgwwydhy3v4xmwqbwveq.b32.i2p:0 +rb7x26lmepfbcd7wtxu42pf4tdxbe5p5zsf3cwuukd4fs4zhxtba.b32.i2p:0 +rcsddyxkabmkkjrjf4rbf6cimlmcxxmvdbczq3bczlmyn5q3tqfa.b32.i2p:0 +rglf7mv553yknevqejaf3xleqofmm3cyjacbhv4jzosylrkrp5gq.b32.i2p:0 +rho4s4jbcb3dvzgxxzijbhqxic2manxm244zy6suw7irja5h2mqq.b32.i2p:0 +rlivtzxori6lpewmlr2jdm42iwxt3ex5sodwzhi2f6vjc7lur54a.b32.i2p:0 +rlvwiiu6emvj46hjukstww4dfknmsqf7xphmdy5tdsftyem5kpva.b32.i2p:0 +rnfc6sekfhk4hyyoa3ro74pg7kx7dgh6y5qs2huwz76bh7ymnk4a.b32.i2p:0 +rolicqq4ebyfgjgpl7xjokglkfwq7vy2b56aloe5bdhzpfzbt2uq.b32.i2p:0 +rqzsypuk7ewsyh2xtihabkp2iyshxgdatgrhghpnhhlythszoykq.b32.i2p:0 +rrm2pems425buhonptp7lbtbprmwwjhbftey4ujvk25nclx7rerq.b32.i2p:0 +rtwm6njef5tifwv5ols3b4nsboniig5kdw32ik5qbv3wmhoo3pba.b32.i2p:0 +ruccvtj2tlvj5s4yqexhgosk43xyyqdcfql5osxpufqn4u65wz4q.b32.i2p:0 +s2sa4qnikyaaiyv5s63l64w6qvb7dkq7elorsuen4ksnw4mu7xsa.b32.i2p:0 +s2x2k3gw2y4vtesxrezvpubo3qubpr5qckxolc47z7rbshjjhvpq.b32.i2p:0 +s3ct7nrzj3w3jpjvnsp4tdlyn4enl7rbf773kiklrdfrh3oj3g2a.b32.i2p:0 +s3sh2zyyphzyzvznhe7s3lbv7eeqwk6kmayqcoekdyggaza543yq.b32.i2p:0 +s7mu7i6gygygixd2ccrfex4doywbx34umcj2ba24atn6qbo34szq.b32.i2p:0 +sawmppomw6zlu3ruaobnlc5y7kg54tvgvfmhimwdfmorzmdmc7aa.b32.i2p:0 +sbalp2doxyedtr52kj57va2rmbi5npspv4drk4vxnujag72gtpiq.b32.i2p:0 +sedndhv5vpcgdmykyi5st4yqhdxl3hpdtglta4do435wupahhx6q.b32.i2p:0 +segnvtkjqqhzo52njxma3jgerwblnpvqrojjyeuqgzav7dwjlzoa.b32.i2p:0 +sjd2fpbiqucslisyynpxvsmxg2jydqpddyaodnkuptuwkiz3cjbq.b32.i2p:0 +sjpqyf3rq7ojcalldlybvyyh5lqiq5j3ade5w6txe3473ybhk3sa.b32.i2p:0 +sle3cbbdom6rknc3drqtawctpy635ica5d5gerjjdahfymkok4ma.b32.i2p:0 +slg46wsae25tx4mjbncrrhbs4rjfzxcwmm5jc425cnipruoo22ha.b32.i2p:0 +smrvlfmq4j4ddtlcpzwixyvlunhvh56omu2k5tyjkbdy3itqgadq.b32.i2p:0 +sszwxree3mlpsnpcjhgqjh2kxltan3xua5pyp3xob6sonphyxgka.b32.i2p:0 +swqpk36n4oyqc3e234eml63pn5hblxai6epryfuo23pdgfemsl2q.b32.i2p:0 +sxb7p33xjjinvolexb4y3k5kx7uwlzsnzvbv46i3lyorm7gsv6iq.b32.i2p:0 +sykset75mlxa4igxqgmfu6o5qyvlr5wtcsqkehf53fguuyt5rkla.b32.i2p:0 +tat2veaz5nwsv7g3czy2mxr4opg7bkeegegdfqjgaxlt6qvk2dma.b32.i2p:0 +tcx3ftsdl36ukysuuewydapdzuu4alewyg22squei2wda4a74tba.b32.i2p:0 +tdvomapjxmxg6ktoedyrndhrjtk3ex4rll5ijkmdcvakzamubslq.b32.i2p:0 +tiomg3tuu3uza3nmdztsode67rn7v6yv4f2npb57l6gnwoenfdza.b32.i2p:0 +tjfdp6mel3wzdpxkhbyhrmfrha7gekv3gghalnxezrmvnhy2ncra.b32.i2p:0 +tk63xbzug7def6esivofwq2h2c53ar3ot7hsezdq3amxqqaoyr5a.b32.i2p:0 +tl3xkknuukvyinyhvt7saz3tvz24ptgyqtzy3igygyfapcf2o3lq.b32.i2p:0 +tnvg4ol42joykttvxs66yoyrvdidhy3vr7mrjf7ona5sf4h36txq.b32.i2p:0 +tsdpkr6llyohtsarxgepqehdauo3vpdcqdml6evevu5mhuu4bsyq.b32.i2p:0 +tsrlbxayhihugr723z6rkyafglnhcyzi2zhojzsyfdjsqkkd53bq.b32.i2p:0 +tsxwmahei6rt2vwgygdvzh6dyp3boh3ixpwq6l5yw43eq5sfgy2q.b32.i2p:0 +tvbutrv73xhwqbtosmbp3cesdyc5bbtslay4gjsf7rzdx4ztgzaq.b32.i2p:0 +twu4qyvf3sttu6vsjwujjqbd37wlkthndbi5so6undt2abj72bqa.b32.i2p:0 +twwjmbvrcfkl7s3hh473jwmxdys2zxo2ozlfivsjvbh2kobl3vsq.b32.i2p:0 +tyvsuqy36cx2yvf7jhnkd5ojc52g6vxl2rw5qshqwpk63ptovdda.b32.i2p:0 +u465w7hete2bpjhsn655oan4ryxbrb2muvc6abhv7wy2hw54vcwq.b32.i2p:0 +u4enqhila7pkwbwuyfbfd36qllbyv7y3p4nelxekrf3fizp4htza.b32.i2p:0 +uc52rzz4xu5ikx6hl6r6sqxfmiyyxsffpcu5frrtepczidwjwuha.b32.i2p:0 +ufepan7c77blkedldhiygt7363boe3xwi3oy5es6eapfdd2nivka.b32.i2p:0 +uhkfrosqc2uqczwcktbb7ups5b5t2up7yhmicryrzqknkj334rnq.b32.i2p:0 +uiz5w66ez6dyncfivv6ihsnccx6jigyjbnfv7voztugyuqrnt3xq.b32.i2p:0 +ujfge4rusfh4bcnuuenva5cch5eji6rxwox7e337dy23om4sci2q.b32.i2p:0 +ujzgzob27kxdc3gtj46qgaewdfhex7q34njlzcm22pq2suyubr7q.b32.i2p:0 +ul6hbnoyd6gdhm32dw2la46ik34b2hhjc5wo4rqilw6wbvbqbvoq.b32.i2p:0 +uls757zxmryrazn36okmcdkzolfohv5ftetsclteibv2dwnuxm7a.b32.i2p:0 +umlbkwpm35dpp66ggxt23tdzsqh3t2ancdyrga5nxidn2lnkdgxq.b32.i2p:0 +uncalsdoypwylzugunja667sdynbf56f6makgjkygyanuklb7lda.b32.i2p:0 +uohuxnjd27cftarbf6kh4czmotwvstpon2sgs2vpffqkgmg7guxa.b32.i2p:0 +usgqijrwhtwgoekjcr26yqcgpncwpsescrr3eek35e3rhkrtptoa.b32.i2p:0 +usvobohlqeb6hre3dkqjqgzul54cn2s2htppk36bsxjcz6ngajba.b32.i2p:0 +uu2nvtd5jeppiovo7wksv7lrgl56kog3e5js4cxpgik3wwqj3w3a.b32.i2p:0 +uxq6sz3jptldm3r3o3ogwqbxqhpqg3hrroyiy4lpvjjqf4i5pata.b32.i2p:0 +uyy4dbfyx2i2x3goobc6uxj4nb7ktzsu72zlksypjfisgka3xnta.b32.i2p:0 +uz4fa7nlzuqgmwfukqm4jkkng5pwfolyrbd4qtsorv7qa7cxcmsq.b32.i2p:0 +v3ob2c7arrot324zel5w7ibmfmud6lyhkqyyldiwnxphdhm2e7xq.b32.i2p:0 +vavpoevto45dv5spd4csk3ut3afe5cldtzvoceuiix4ingmfhxla.b32.i2p:0 +vicxbb4ts6jmqj52hhx32mxnwpur5covzxotaiy6zhaansldlodq.b32.i2p:0 +vlmixyf7yg5xqe54r4htfrjdrsci7k2broic5n7vugry46m5xuoa.b32.i2p:0 +vo22o2zy6gb4nsmcteelpyoa4khh3hogoe3jsgis6yglyrtxzloq.b32.i2p:0 +vrrkgdrlov6obcqqyu6rbcsu37heehxetutnacl6qgr3clm7aeza.b32.i2p:0 +vuqk76jvxfk55bkovqcmmkvycmndee7j3tuv7ezdb2slrfpjyvoa.b32.i2p:0 +vwbls7ihzlzwu3uapbnzfsudy75dp3ih2fp2psffli3ir4iuezgq.b32.i2p:0 +vxjkydkgnpl4j7pt4qrf3ec3ds4ks3ucb347k5xae5jg6f5offga.b32.i2p:0 +vxs2es6f7uw2uuneslb7ipvmg6kqh6ytpjezoj2ptwx7od4jqmxa.b32.i2p:0 +vycnqqqrlbexyr37ytulbzesazy3voozq5sz7j3o6vedxic7ionq.b32.i2p:0 +w3iu6clea65cckmimaclxdvuxsudbghfytphejcsp5ufyfgfppra.b32.i2p:0 +w4moc55z2f47lfyumqap4td2zfcjrjd34ung3vircwrpp3ts7oiq.b32.i2p:0 +w6jl2gubyscdpubizes5bp6s42cito4k27xwcjwh76rvuik2prha.b32.i2p:0 +w7fsijz4juktjzpksc2iec2ljtdykgxere3m3dwfnqztl2fto2ca.b32.i2p:0 +wacfewi6ehmfxvftxqmracfh7se2t7ozl62u4hsuyd4c5xfzuajq.b32.i2p:0 +wagprvzeuinlzec7hxrggjxpex66uikbvh32lhdv44ez2z5vgxfq.b32.i2p:0 +wfrvnaeqad6zevflyme66n3p77b4axymni33fu42bhsaei6cmrpa.b32.i2p:0 +wll2w3rtszujy6lmfrvexgyv46czhfx4ym7fiyf3mdwl3mnbzcgq.b32.i2p:0 +woyjnznau675j4mazibi5cjkr3ts4sqtp6ufidi7zozanczdyicq.b32.i2p:0 +wpnewole7fofvwvrvkkgf45sgcverlodocu7fstm2axp5jfykraq.b32.i2p:0 +wrqu543ssub7kiwzfug4o7m6lc5ibmaamdc3o4uo6a7ntxiqzd4q.b32.i2p:0 +wshmvsvqjnzlvsajbqr34vr5hlqxdywees24eubv5swignloww2a.b32.i2p:0 +wsulywnyo6kuppkz7lcaecca3kvqjpynbd2ysvvuj6dylnd3vf2a.b32.i2p:0 +wtdyush2aybxg2ga46txd7oiv2nmulrhv3bfzilzg7rbzf4mbu3a.b32.i2p:0 +wtfebbwmsxoywu6nw5cowlxqhtokxrxftve2zee6flvrpqg4j6ma.b32.i2p:0 +wwbw7nqr3ahkqv62cuqfwgtneekvvpnuc4i4f6yo7tpoqjswvcwa.b32.i2p:0 +wx7cpx6i263dmx7vkhveuzyazdjy5pfrrt4f2y6fhiev24v26gtq.b32.i2p:0 +wy2udklgydh7iknnffbzvldoiwsct6dy3o7fjcsjcdjoq4b65vha.b32.i2p:0 +x3mabmgx32hljbx46xqjobh6l3tvrridnxgrla4q7s2bgkk63aqa.b32.i2p:0 +x4tbcqodj4dbatrsjjznx6srdycgmcfknqkoo6asb7aisc4wtmxa.b32.i2p:0 +x6vn35i2xv7lwpeasn3eihdii56v5wllemaallxlwq56j42du34q.b32.i2p:0 +xateuy7lebnitxx634irwytrprp3s6o7agee62pm4oytvffbk2ea.b32.i2p:0 +xcjjg4k6fss4b3lpihknh5ws2esug7i6j5gehjta6ejxawxlotma.b32.i2p:0 +xcoq7v26jvysna4zqwbfswfqqb5hjmdqys46j7oczzu4g3craegq.b32.i2p:0 +xdmcmjahaeyue2mknpavqkflccaznfdosl4jxltzo2suqdyc3mla.b32.i2p:0 +xfrlfngubzadfa4bvqdirlkzlo5uunvcvlwppvxbz5vgf64tm54q.b32.i2p:0 +xfyzfugo3qtfpq3s5zccbbqrxfkgy3ttlqhz6t6ovmtgrsuyce7q.b32.i2p:0 +xgbz5vpek6vaeej2zejxrjloqg2sqb67gim72qqpodqfq62rflvq.b32.i2p:0 +xm5nole53h2rwys6uiz6qc65yw4dkqkfxuobgxrmvo5fwqgxeohq.b32.i2p:0 +xn2wekjcxrhkm66vnvea2lx7yxsu3yx5cbmkjbcdct66wlj2jfta.b32.i2p:0 +xn5dz3dzloj5g6nr2qzw5ldz6rlcainm7ddpstjfopyirctw2hkq.b32.i2p:0 +xnvsgbonlja7cmeokr2msvdelqlasbkwgqndqg7eakw43t3m465q.b32.i2p:0 +xrwuqylcgkr2ovsf4pziosd27ywd7pfaohnreoyzm72qlnvoktrq.b32.i2p:0 +xvlj55kzoy7qtdqfs4o4dqyuajw6bkmydiymdi6nbrpr33toj2xa.b32.i2p:0 +xwlkpubkvsdsyaeylqfmxfk43juk6sz3hxnmwe4zencjq77aznea.b32.i2p:0 +xxxqbqzrtilchxwuqyqrfmuhwbpia2kurv5ho7g5q6a7bvsvd3gq.b32.i2p:0 +xylrnmpubtdsdhab37syiiaj7shmg4bmhgss4vkdyvsogp45fdrq.b32.i2p:0 +xzo2nvkiin53drbnir65zxq42sfkybnbgx4ozmeayszvjjrppfpa.b32.i2p:0 +y3kqvifjucu52hg3f27f572vc4lburush7s7q4kuepbxmnlroolq.b32.i2p:0 +y3occl5rqc2mz64esu5mqzoyfzlbxop7tttf2b3gyxjust57txfq.b32.i2p:0 +y5wr2bw3rt4rvw7hqqj7qtlf7vdds6zk6cs3mu3myyduasieqoka.b32.i2p:0 +ybbmx7a3zau7c7ax3glgj75mza5e5dpibzy5j4p5qduttgo4xgbq.b32.i2p:0 +ybdhpsgmtw4eewreo7kswclgexdztzk32a5x4pbr5ws6nm42gpoq.b32.i2p:0 +ybx3kj4hfjcpxtifqy4ziztx3pqyijindks7zdacq3vk3cjzyztq.b32.i2p:0 +ygtc5m4mh3qhi7tct44gxqbenhkasp2y4ydjn5qua4l5vh35osdq.b32.i2p:0 +yodn52qhw4v5aoaoqfsunvfecbbl6cyk5j4aq2pfm4otu63qlp6a.b32.i2p:0 +yphmy6w3myyy3am5awdksfyhbmmleqmblru3pfoajhjdilktwdca.b32.i2p:0 +yradzf5ip7f3qq6kdyqm6qqafygk7a5spov6a2miha2dk2u4me3q.b32.i2p:0 +yrpsrh7tn3qfgnu5djdubjca6oodvxaheanpcmwh2cwkekqrtida.b32.i2p:0 +ysenhmvz3jo56h57zzzvr45y3t57rvt7vi37p2kdiz6fpfrbmucq.b32.i2p:0 +ywlcceffoptf6vynbgut777k4w4agc7tvhvvlnlwtdzq35v5mvga.b32.i2p:0 +yzsnqd236vyo77afhxnbmrnie5fepnuuvpwqyz5lvmqeihx6z4ia.b32.i2p:0 +z4zjvj27uxkzwmltkyd4jslrkqpeqtkztfql2nlsunetkkkl7vma.b32.i2p:0 +z6g6lmwuhnldiazyf72zlsvtwbql5mfvpmyaipuvjfwnb6slel6a.b32.i2p:0 +z6mlyrxcjddpcaoumxnw5peulnkvj56hgwqmnc5adoutp7piujaa.b32.i2p:0 +zaq7uso4bgzhv5beqjrwlciyevzv3g3kyalvtftombe3m43myesq.b32.i2p:0 +zas4vpvbzsno3hmqu3tlw4mkalvu5xiollxveapgsolub2mcimuq.b32.i2p:0 +zbymohtlahzy2ygf4pw3kcxg5mzu6mjhzonucfks6txhv54f2uoa.b32.i2p:0 +zckxrkzbo66y5k442djsd3cgffvp5t2us2ewv2i6f6dwpaxxaxpa.b32.i2p:0 +zcrenbrluidv3wbzdsvw6jvkhymp7yric76zcd4dfdcrr2n4kpga.b32.i2p:0 +zcwgqw7hlw7437a7au6n6obljdb4arnshoibdqo6voree4xiznoq.b32.i2p:0 +zd7xacyuee22h2qjmf4e77vr7zylardqnehldv7j4uxu7urfljka.b32.i2p:0 +zh34uj3cwyr7zs2uc4aeyrhffgumxd5uzpfpbmbuyetqkd3xy4ia.b32.i2p:0 +zhqbovteqcfmhg77wcrpre4njrguxkc3au42sf4wmzeb6mjyggfa.b32.i2p:0 +ziijxo742secxdbebrvaxf4pbbr7hip53lgnexnswvaoaxap64ua.b32.i2p:0 +znt6mdvmstxcdaqeiuo67k2ug4e422gjftrnm7ov2izaeuh73d5q.b32.i2p:0 +zs3a5qtz7ruxlp6gppcqw5wneafdwbn66j757xg4adpjyt3ec5ja.b32.i2p:0 +ztr3c7qz6v4hrnegmkzjsr52wyi4u6ery4m74sk3m77oup2ws4ka.b32.i2p:0 +zvgkzfbaqzkxfhc7bnwim3srvcmgwq6ndihhv2zpbymtwkloxm2a.b32.i2p:0 +zvs53qyzauufv33zdsd76tf337kyimj5edep3xqjimhc5t7rfv4q.b32.i2p:0 +zzpgfcs2vuybf4t337fpeidybrsfqkuetvkg353ja3juhjimlmqa.b32.i2p:0 +zzx4goazsdha3hvdzmppxp4sxenhzz6g2mlz3inanbzaw76s7coq.b32.i2p:0 +1.1.189.28:8333 # AS23969 +1.34.178.212:8333 # AS3462 +2.13.146.228:8333 # AS3215 +2.56.245.204:8333 # AS213250 +2.86.50.136:8333 # AS6799 +3.123.190.28:8333 # AS16509 +5.35.15.93:8333 # AS50340 +5.78.108.233:8333 # AS212317 +5.79.71.147:8333 # AS60781 +5.149.248.152:8333 # AS59711 +5.186.60.13:8333 # AS44869 +8.209.97.98:8333 # AS45102 +12.221.144.189:8333 # AS398337 +14.203.57.50:8333 # AS7545 +18.169.180.38:8333 # AS8987 +20.74.80.10:8333 # AS8075 +23.111.172.18:8333 # AS29802 +23.142.145.238:8333 # AS210000 +23.175.0.202:8333 # AS395502 +23.242.4.83:8333 # AS20001 +24.0.172.162:8333 # AS33659 +24.49.240.218:8333 # AS11290 +24.90.140.41:8333 # AS12271 +24.118.34.69:8333 # AS13367 +24.125.96.34:8333 # AS7725 +24.146.33.13:8333 # AS7992 +24.152.147.11:8333 # AS10242 +24.164.176.84:8333 # AS12271 +24.210.23.136:8333 # AS10796 +24.220.72.43:8333 # AS11232 +31.18.200.28:8333 # AS3209 31.47.202.112:8333 # AS34385 -31.165.78.146:8333 # AS6730 -31.165.228.138:8333 # AS6730 -34.64.101.4:8333 # AS139070 -34.105.19.97:8333 # AS15169 -34.126.107.179:8333 # AS396982 -34.126.115.35:8333 # AS396982 -35.245.186.117:8333 # AS15169 -37.15.60.144:8333 # AS12479 -37.16.105.63:8333 # AS20904 -37.120.155.34:8333 # AS9009 -37.120.179.29:8333 # AS47147 -37.139.102.73:8333 # AS35816 -37.193.227.16:8333 # AS31200 -37.220.135.151:8333 # AS41206 -38.53.129.67:8333 # AS40237 -38.54.14.89:8333 # AS138915 -38.141.134.140:8333 # AS174 -38.145.151.150:8333 # AS40545 -41.72.154.66:8333 # AS37153 -43.143.203.198:8333 # AS45090 -45.15.124.117:8333 # AS35913 -45.43.97.103:8333 # AS26827 -45.44.213.116:8333 # AS54198 -45.58.187.101:8333 # AS46844 -45.79.192.236:8333 # AS63949 -45.81.241.97:8333 # AS30823 +31.164.229.252:8333 # AS6730 +31.189.53.251:8333 # AS24608 +31.207.53.11:8333 # AS8758 +32.220.61.208:8333 # AS46690 +34.40.131.0:8333 # AS396982 +35.204.253.254:8333 # AS396982 +35.214.111.72:8333 # AS15169 +35.217.18.242:8333 # AS15169 +37.179.155.30:8333 # AS30722 +37.204.171.82:8333 # AS42610 +37.209.87.163:8333 # AS3209 +37.251.41.41:8333 # AS1136 +38.40.110.66:8333 # AS398721 +38.41.59.162:8333 # AS397422 +38.42.237.194:8333 # AS395354 +38.75.215.250:8333 # AS397377 +38.172.75.57:8333 # AS13693 +38.180.242.6:8333 # AS58061 +43.156.93.235:8333 # AS132203 +45.45.27.233:8333 # AS5769 +45.79.223.168:8333 # AS63949 45.83.220.102:8333 # AS39351 -45.83.241.46:8333 # AS206238 -45.87.106.57:8333 # AS39238 -45.129.38.5:8333 # AS49666 -45.130.20.177:8333 # AS3214 -45.134.142.40:8333 # AS60068 -45.135.4.143:8333 # AS25596 -45.135.92.127:8333 # AS12555 -45.145.188.112:8333 # AS206805 -46.23.87.218:8333 # AS51088 -46.32.50.98:8333 # AS39642 -46.32.78.17:8333 # AS48416 -46.59.40.91:8333 # AS8473 -46.138.246.77:8333 # AS8359 -46.166.142.2:8333 # AS43350 -46.166.162.59:8333 # AS16125 -46.175.178.3:8333 # AS28725 -46.188.15.6:8333 # AS39153 -46.188.30.118:8333 # AS39153 -46.223.223.216:8333 # AS51185 +45.88.106.107:8333 # AS204601 +45.150.66.10:8333 # AS215402 +45.154.252.162:8333 # AS41281 +45.159.230.118:8333 # AS51167 +45.190.192.174:8333 # AS269868 +46.10.215.188:8333 # AS8866 +46.23.87.218:8333 # AS60131 +46.39.187.205:8333 # AS31246 +46.59.13.35:8333 # AS8473 +46.136.116.252:8333 # AS12430 +46.146.231.187:8333 # AS12768 +46.148.235.36:8333 # AS49505 +46.150.161.43:8333 # AS49106 46.226.18.135:8333 # AS52176 -47.88.86.79:8333 # AS45102 -47.148.7.69:8333 # AS5650 -47.198.223.60:8333 # AS5650 -50.2.13.164:8333 # AS62904 -50.4.135.84:8333 # AS12083 -50.53.39.237:8333 # AS20055 -50.53.250.162:8333 # AS20055 -50.68.121.44:8333 # AS6327 -50.117.132.178:8333 # AS577 -51.154.62.103:8333 # AS15796 -51.158.150.155:8333 # AS12876 -51.250.46.215:8333 # AS200350 -54.176.63.16:8333 # AS16509 -58.158.0.86:8333 # AS2519 -60.205.205.119:8333 # AS37963 -61.74.99.193:8333 # AS4766 -61.92.59.104:8333 # AS9269 -62.122.173.171:8333 # AS50245 -62.171.129.32:8333 # AS51167 -62.178.27.239:8333 # AS8412 -62.209.210.3:8333 # AS6855 -62.215.127.73:8333 # AS21050 -62.238.148.104:8333 # AS15435 -62.245.153.8:8333 # AS8767 -64.146.136.45:8333 # AS16713 -65.21.134.184:8333 # AS24940 -66.18.13.146:8333 # AS13767 -66.23.233.43:8333 # AS19318 -66.27.98.216:8333 # AS20001 -66.29.129.218:8333 # AS22612 -66.38.94.13:8333 # AS11979 -66.45.141.46:8333 # AS11232 -66.58.243.215:8333 # AS8047 -66.114.33.49:8333 # AS23175 -66.198.211.167:8333 # AS10835 -66.208.64.128:8333 # AS10352 -66.219.196.170:8333 # AS29933 -67.210.228.203:8333 # AS7819 -68.183.75.251:8333 # AS14061 -68.194.125.140:8333 # AS6128 -68.199.120.17:8333 # AS6128 -69.4.94.226:8333 # AS36352 -69.8.175.201:8333 # AS21766 -69.59.18.22:8333 # AS397444 -69.196.152.33:8333 # AS5645 -69.228.219.124:8333 # AS7018 -70.64.27.12:8333 # AS6327 -70.160.240.132:8333 # AS22773 -71.79.109.128:8333 # AS7843 -71.184.193.75:8333 # AS701 -72.15.59.173:8333 # AS21949 -72.48.253.168:8333 # AS7459 -72.207.171.210:8333 # AS22773 -73.117.132.138:8333 # AS7922 -73.212.226.59:8333 # AS7922 -74.76.151.110:8333 # AS7843 -74.91.115.229:8333 # AS14586 -74.118.137.119:8333 # AS20326 -74.213.175.108:8333 # AS21949 -74.213.251.239:8333 # AS14978 -74.220.255.190:8333 # AS23175 -74.221.189.109:8333 # AS26827 -75.83.203.225:8333 # AS20001 -75.172.52.186:8333 # AS209 -76.24.143.22:8333 # AS1351 -76.69.202.247:8333 # AS577 -76.73.198.242:8333 # AS12083 -76.119.248.240:8333 # AS1351 -77.20.48.144:8333 # AS3209 -77.22.152.239:8333 # AS204028 -77.37.224.222:8333 # AS42610 -77.48.196.234:8333 # AS16019 -77.70.16.245:8333 # AS8717 -77.162.190.90:8333 # AS1136 -78.20.227.249:8333 # AS6848 -78.21.167.8:8333 # AS6848 -78.35.147.203:8333 # AS8422 -78.108.108.25:8333 # AS8251 -78.154.237.60:8333 # AS9155 -79.11.31.76:8333 # AS3269 -79.87.88.235:8333 # AS15557 -79.101.1.25:8333 # AS8400 -79.124.7.241:8333 # AS203380 -79.124.7.253:8333 # AS203380 -79.150.68.42:8333 # AS3352 -79.249.10.53:8333 # AS3320 -80.82.21.77:8333 # AS42927 -80.82.76.59:8333 # AS202425 -80.88.172.227:8333 # AS31263 -80.93.213.246:8333 # AS42910 -80.111.142.213:8333 # AS6830 -80.208.227.134:8333 # AS62282 -80.208.228.9:8333 # AS62282 -80.209.64.86:8333 # AS31027 -80.229.28.60:8333 # AS2856 -81.7.16.182:8333 # AS35366 -81.19.10.2:8333 # AS24641 +46.229.238.187:8333 # AS29405 +46.254.212.21:8333 # AS204779 +47.144.231.35:8333 # AS5650 +47.147.169.80:8333 # AS5650 +47.254.178.44:8333 # AS45102 +50.20.212.8:8333 # AS20432 +50.37.113.212:8333 # AS27017 +50.43.49.155:8333 # AS27017 +50.99.219.56:8333 # AS852 +50.125.114.46:8333 # AS20055 +51.159.223.13:8333 # AS12876 +51.194.13.25:8333 # AS5607 +51.255.94.190:8333 # AS16276 +52.165.88.21:8333 # AS8075 +52.205.29.182:8333 # AS14618 +54.170.73.194:8333 # AS16509 +54.211.187.0:8333 # AS14618 +58.96.73.95:8333 # AS10143 +61.7.163.41:8333 # AS131090 +62.12.168.100:8333 # AS15623 +62.57.94.187:8333 # AS6739 +64.31.61.150:8333 # AS46475 +64.67.80.177:8333 # AS3737 +64.156.192.61:8333 # AS21581 +64.187.168.198:8333 # AS11404 +64.226.146.203:8333 # AS26831 +65.183.252.105:8333 # AS15267 +65.190.216.137:8333 # AS11426 +66.29.147.20:8333 # AS22612 +66.30.198.179:8333 # AS7015 +66.35.84.14:8333 # AS2734 +66.37.25.18:8333 # AS19237 +66.37.25.30:8333 # AS19237 +66.94.126.184:8333 # AS40021 +66.228.28.63:8333 # AS11233 +67.80.209.16:8333 # AS6128 +67.144.32.64:8333 # AS19901 +67.145.204.18:8333 # AS19901 +67.240.148.148:8333 # AS11351 +68.37.43.81:8333 # AS33668 +68.41.204.141:8333 # AS33668 +68.54.100.248:8333 # AS13367 +68.172.45.230:8333 # AS11351 +69.59.18.35:8333 # AS397444 +69.64.51.41:8333 # AS30083 +69.67.150.71:8333 # AS262287 +69.172.131.118:8333 # AS3580 +69.246.248.54:8333 # AS33491 +70.121.50.147:8333 # AS11427 +70.122.134.79:8333 # AS11427 +70.127.40.118:8333 # AS33363 +71.29.150.207:8333 # AS7029 +71.52.48.60:8333 # AS209 +71.86.10.194:8333 # AS20115 +71.196.181.115:8333 # AS33652 +72.46.131.18:8333 # AS36114 +72.104.31.113:8333 # AS6167 +73.52.208.234:8333 # AS7016 +73.113.14.233:8333 # AS22909 +73.117.132.138:8333 # AS7016 +73.128.36.145:8333 # AS33657 +73.129.38.38:8333 # AS33657 +73.131.84.183:8333 # AS33489 +73.140.121.110:8333 # AS33650 +73.166.131.61:8333 # AS33662 +73.185.74.222:8333 # AS33667 +73.241.228.74:8333 # AS33651 +74.15.8.154:8333 # AS577 +74.88.231.79:8333 # AS6128 +74.112.115.219:8333 # AS11525 +74.207.168.63:8333 # AS14543 +76.25.208.232:8333 # AS33652 +76.140.90.174:8333 # AS33660 +76.145.236.222:8333 # AS7725 +77.48.31.240:8333 # AS16019 +77.78.126.46:8333 # AS15685 +77.95.229.224:8333 # AS62370 +77.101.237.159:8333 # AS5089 +77.105.164.118:8333 # AS214422 +77.237.238.26:8333 # AS51167 +77.239.42.73:8333 # AS15600 +77.240.190.41:8333 # AS24641 +77.247.178.158:8333 # AS43350 +78.44.219.42:8333 # AS16019 +78.140.183.229:8333 # AS35415 +79.77.133.30:8333 # AS19905 +79.116.189.111:8333 # AS57269 +79.127.230.250:8333 # AS60068 +79.135.106.88:8333 # AS62371 +79.148.50.92:8333 # AS3352 +79.154.247.191:8333 # AS3352 +79.201.52.144:8333 # AS3320 +80.64.211.102:8333 # AS200295 +80.90.4.178:8333 # AS20546 +80.188.97.250:8333 # AS5610 +80.203.83.135:8333 # AS29695 +80.209.231.126:8333 # AS62282 +80.221.244.201:8333 # AS1759 +80.254.174.149:8333 # AS1836 +81.83.214.134:8333 # AS6848 81.162.196.43:8333 # AS34955 -81.171.22.143:8333 # AS60781 -81.172.221.4:8333 # AS12430 -81.224.44.164:8333 # AS3301 -81.245.96.36:8333 # AS5432 -82.1.68.54:8333 # AS5089 -82.66.10.11:8333 # AS12322 -82.66.211.31:8333 # AS12322 -82.71.4.154:8333 # AS13037 +81.172.214.101:8333 # AS15435 +81.174.2.16:8333 # AS35612 +81.197.182.195:8333 # AS719 +81.229.234.87:8333 # AS3301 +82.4.47.42:8333 # AS5089 +82.64.89.125:8333 # AS12322 +82.64.133.129:8333 # AS12322 82.96.96.40:8333 # AS29686 -82.116.50.101:8333 # AS30936 82.136.98.249:8333 # AS8821 -82.195.237.253:8333 # AS1836 -83.137.41.10:8333 # AS31394 -83.171.175.5:8333 # AS8767 -83.208.193.242:8333 # AS5610 -83.233.76.165:8333 # AS29518 -83.240.89.196:8333 # AS31246 -84.38.3.249:8333 # AS196691 -84.54.23.48:8333 # AS35913 -84.126.216.77:8333 # AS12430 -84.211.187.211:8333 # AS41164 -84.246.200.122:8333 # AS42455 -84.255.244.61:8333 # AS34779 -85.165.42.115:8333 # AS2119 -85.194.238.134:8333 # AS47605 -85.208.69.21:8333 # AS25091 -85.208.71.36:8333 # AS42275 -85.209.240.91:8333 # AS205581 -85.214.118.71:8333 # AS6724 +83.69.176.70:8333 # AS42767 +83.168.65.186:8333 # AS31304 +83.253.62.50:8333 # AS1257 +84.20.63.156:8333 # AS21040 +84.32.32.132:8333 # AS204770 +84.32.186.158:8333 # AS59642 +84.75.26.217:8333 # AS6730 +84.115.128.225:8333 # AS8412 +84.217.134.213:8333 # AS2119 +84.255.238.120:8333 # AS34779 +85.7.24.206:8333 # AS3303 +85.14.79.26:8333 # AS31242 +85.147.2.227:8333 # AS33915 +85.159.237.71:8333 # AS43350 +85.163.23.103:8333 # AS28725 +85.195.201.131:8333 # AS13030 +85.195.244.202:8333 # AS13030 +85.198.116.246:8333 # AS29182 +85.208.69.13:8333 # AS42275 +85.208.117.14:8333 # AS18978 85.214.161.252:8333 # AS6724 -85.236.190.252:8333 # AS35032 -85.243.115.136:8333 # AS8657 -86.22.20.13:8333 # AS5089 -86.49.34.92:8333 # AS16019 -86.95.8.249:8333 # AS1136 -86.104.228.10:8333 # AS31638 -86.104.228.23:8333 # AS31638 -87.79.94.221:8333 # AS8422 -88.10.89.23:8333 # AS3352 -88.84.223.30:8333 # AS21453 -88.86.125.50:8333 # AS39392 -88.90.77.100:8333 # AS2119 -88.97.40.50:8333 # AS13037 +85.215.75.210:8333 # AS8560 +86.84.198.19:8333 # AS1136 +86.97.84.57:8333 # AS5384 +86.104.228.10:8333 # AS45021 +86.104.228.20:8333 # AS45021 +86.111.48.71:8333 # AS50304 +86.136.1.60:8333 # AS2856 +86.157.171.157:8333 # AS2856 +87.211.224.212:8333 # AS13127 +87.228.184.201:8333 # AS6866 +88.85.88.133:8333 # AS35415 +88.99.167.178:8333 # AS24940 +88.101.101.227:8333 # AS5610 +88.119.128.36:8333 # AS8764 88.137.109.62:8333 # AS15557 -88.147.244.250:8333 # AS12389 -88.208.115.70:8333 # AS29208 -88.212.53.246:8333 # AS42841 -89.35.142.168:8333 # AS34977 -89.78.111.197:8333 # AS6830 -89.117.59.129:8333 # AS1239 -89.147.108.200:8333 # AS44735 -89.163.132.180:8333 # AS24961 -89.165.232.242:8333 # AS48161 -89.216.21.96:8333 # AS31042 -90.50.172.182:8333 # AS3215 -90.146.130.214:8333 # AS12605 -90.146.208.162:8333 # AS12605 -90.156.26.148:8333 # AS12741 -90.163.172.139:8333 # AS12479 -90.177.163.77:8333 # AS5610 -91.67.145.110:8333 # AS3209 -91.93.194.154:8333 # AS34984 +88.201.175.250:8333 # AS35807 +89.24.174.30:8333 # AS13036 +89.39.141.90:8333 # AS56478 +89.58.70.141:8333 # AS44656 +89.129.78.173:8333 # AS12479 +89.207.131.19:8333 # AS62370 +89.247.224.28:8333 # AS8881 +89.250.73.38:8333 # AS41420 +90.89.251.147:8333 # AS3215 +90.156.26.148:8333 # AS43939 +90.250.10.165:8333 # AS5378 +91.92.152.118:8333 # AS61098 +91.110.16.244:8333 # AS12576 91.123.182.164:8333 # AS51648 -91.123.183.219:8333 # AS51792 -91.135.0.187:8333 # AS12496 -91.147.232.98:8333 # AS5483 -91.184.168.249:8333 # AS9063 -91.193.237.116:8333 # AS42916 -91.199.41.45:8333 # AS6866 -91.204.149.5:8333 # AS42765 -91.215.91.254:8333 # AS48078 -91.219.25.232:8333 # AS50448 -91.237.88.218:8333 # AS56813 -92.27.150.46:8333 # AS13285 -92.27.150.47:8333 # AS13285 -92.221.20.232:8333 # AS29695 -92.221.126.65:8333 # AS29695 -93.33.192.204:8333 # AS12874 -93.41.237.78:8333 # AS12874 -93.95.88.13:8333 # AS35434 -93.95.227.125:8333 # AS44735 -93.103.13.1:8333 # AS34779 -93.115.86.239:8333 # AS3223 +91.132.42.25:8333 # AS206238 +91.183.207.58:8333 # AS5432 +91.194.12.244:8333 # AS42995 +91.202.4.65:8333 # AS43641 +91.231.182.94:8333 # AS214379 +91.235.255.7:8333 # AS198509 +91.236.251.137:8333 # AS57944 +92.96.219.197:8333 # AS5384 +92.101.99.58:8333 # AS12389 +92.186.67.107:8333 # AS12479 +92.205.232.47:8333 # AS21499 +92.206.105.31:8333 # AS16202 +92.240.185.182:8333 # AS16246 +93.28.33.141:8333 # AS198949 +93.55.255.176:8333 # AS12874 93.123.180.164:8333 # AS35539 -93.186.201.173:8333 # AS24961 -93.190.117.26:8333 # AS196881 -94.19.7.55:8333 # AS35807 -94.23.21.80:8333 # AS16276 -94.23.205.110:8333 # AS16276 -94.131.0.73:8333 # AS29632 -94.142.237.4:8333 # AS48926 +93.160.66.70:8333 # AS3292 +93.174.188.110:8333 # AS47506 +93.177.188.74:8333 # AS16010 +93.189.25.250:8333 # AS44133 +93.190.143.76:8333 # AS49981 +94.19.128.204:8333 # AS35807 +94.54.154.209:8333 # AS47524 +94.60.103.81:8333 # AS12353 +94.74.105.231:8333 # AS136907 +94.79.55.28:8333 # AS48614 +94.136.185.80:8333 # AS141995 94.154.159.99:8333 # AS62240 -94.202.50.200:8333 # AS15802 -94.231.253.18:8333 # AS35224 -95.42.140.142:8333 # AS8866 -95.67.18.100:8333 # AS34867 -95.70.238.176:8333 # AS12735 -95.83.73.31:8333 # AS8359 -95.90.128.3:8333 # AS204028 -95.110.234.93:8333 # AS31034 -95.161.12.45:8333 # AS39598 -95.172.62.167:8333 # AS201826 -95.179.128.87:8333 # AS20473 -95.191.130.100:8333 # AS12389 -95.214.53.154:8333 # AS201814 -96.3.53.254:8333 # AS11232 -97.75.145.12:8333 # AS22709 -97.81.198.180:8333 # AS20115 -97.87.216.110:8333 # AS20115 -99.229.210.111:8333 # AS812 -99.246.87.2:8333 # AS812 -101.43.124.195:8333 # AS45090 -102.132.192.141:8333 # AS37680 -103.21.3.89:8333 # AS38195 -103.35.121.72:8333 # AS9498 -103.99.168.100:8333 # AS6939 -103.99.168.140:8333 # AS6939 -103.99.170.210:8333 # AS54415 -103.99.170.220:8333 # AS54415 -103.105.202.50:8333 # AS137764 -104.238.220.199:8333 # AS23470 -104.243.33.165:8333 # AS23470 -104.244.73.6:8333 # AS53667 -108.26.125.214:8333 # AS701 -109.86.60.33:8333 # AS13188 -109.99.63.159:8333 # AS9050 -109.120.194.136:8333 # AS34569 -109.123.233.138:8333 # AS15685 -109.123.240.53:8333 # AS15685 -109.153.94.35:8333 # AS2856 -109.173.126.157:8333 # AS42610 -109.193.76.200:8333 # AS51185 -109.221.229.197:8333 # AS3215 -109.236.90.117:8333 # AS49981 -109.248.206.13:8333 # AS203493 -111.90.140.23:8333 # AS45839 -111.90.140.46:8333 # AS45839 -111.90.145.37:8333 # AS18106 -114.173.159.209:8333 # AS4713 +94.157.34.0:8333 # AS50266 +94.210.254.143:8333 # AS33915 +95.82.130.223:8333 # AS31246 +95.83.73.31:8333 # AS35728 +95.98.239.70:8333 # AS50266 +95.105.192.217:8333 # AS15962 +95.168.169.227:8333 # AS60781 +95.169.196.247:8333 # AS201133 +95.179.216.148:8333 # AS20473 +95.213.145.218:8333 # AS49505 +95.214.235.86:8333 # AS30860 +96.41.133.58:8333 # AS20115 +96.43.142.163:8333 # AS19969 +96.53.92.166:8333 # AS6327 +96.77.181.25:8333 # AS33660 +96.81.219.106:8333 # AS33491 +96.238.29.2:8333 # AS701 +97.75.144.9:8333 # AS22709 +97.119.208.128:8333 # AS209 +98.56.168.78:8333 # AS33667 +98.143.182.206:8333 # AS23481 +98.168.198.50:8333 # AS22773 +98.169.1.164:8333 # AS22773 +98.195.93.125:8333 # AS33662 +99.184.57.234:8333 # AS7018 +99.229.184.94:8333 # AS812 +99.248.151.172:8333 # AS812 +101.47.131.207:8333 # AS150436 +101.99.88.33:8333 # AS19324 +101.100.139.249:8333 # AS9790 +101.173.27.162:8333 # AS1221 +103.74.116.139:8333 # AS63759 +103.99.169.110:8333 # AS54415 +103.99.171.171:8333 # AS54415 +103.231.42.36:8333 # AS18229 +103.233.83.28:8333 # AS4213 +103.246.186.143:8333 # AS401199 +103.246.186.234:8333 # AS401199 +104.143.2.195:8333 # AS26863 +104.200.67.161:8333 # AS8100 +104.243.38.148:8333 # AS23470 +106.246.195.13:8333 # AS3786 +107.13.105.120:8333 # AS11426 +107.173.244.87:8333 # AS36352 +107.178.115.244:8333 # AS3223 +108.20.173.160:8333 # AS701 +108.170.133.169:8333 # AS40788 +108.175.176.253:8333 # AS21565 +108.181.55.173:8333 # AS40676 +109.130.50.200:8333 # AS5432 +109.190.58.34:8333 # AS35540 +109.190.140.89:8333 # AS35540 +111.90.158.46:8333 # AS19324 +114.4.204.184:8333 # AS4761 +115.85.88.107:8333 # AS23953 116.58.171.67:8333 # AS2514 -119.31.179.202:8333 # AS17408 -119.42.55.203:8333 # AS133159 -122.222.160.190:8333 # AS2519 -123.60.213.192:8333 # AS55990 -124.197.54.113:8333 # AS9790 -125.168.140.108:8333 # AS4826 -128.0.190.26:8333 # AS30764 -128.65.194.136:8333 # AS29222 -129.13.189.212:8333 # AS34878 +118.67.199.102:8333 # AS64073 +121.98.22.147:8333 # AS9790 +122.32.38.201:8333 # AS17858 +122.37.248.225:8333 # AS17858 +122.155.9.25:8333 # AS9335 +124.241.11.196:8333 # AS17961 +125.77.173.152:8333 # AS133776 +128.0.98.214:8333 # AS42652 129.13.189.215:8333 # AS34878 -129.226.216.148:8333 # AS132203 -131.188.40.191:8333 # AS680 -134.65.9.63:8333 # AS19653 -134.122.200.160:8333 # AS64050 -134.195.185.52:8333 # AS13536 -135.19.253.101:8333 # AS5769 -136.29.109.58:8333 # AS19165 -136.32.238.6:8333 # AS16591 -136.49.201.24:8333 # AS16591 -137.226.34.46:8333 # AS680 -138.207.211.189:8333 # AS11776 -139.130.41.82:8333 # AS1221 -140.238.220.99:8333 # AS31898 -142.54.181.218:8333 # AS32097 -142.166.19.23:8333 # AS855 -142.254.87.115:8333 # AS46375 -143.177.229.149:8333 # AS50266 -144.2.101.21:8333 # AS3303 -144.24.236.64:8333 # AS31898 -145.40.51.52:8333 # AS49808 -146.71.69.103:8333 # AS7782 -146.120.241.173:8333 # AS208515 -147.50.238.53:8333 # AS45265 -148.103.101.132:8333 # AS28118 -149.75.48.92:8333 # AS6079 -152.44.137.83:8333 # AS11404 -154.0.3.194:8333 # AS37680 -154.26.137.105:8333 # AS174 -154.26.154.73:8333 # AS1299 -154.57.5.11:8333 # AS200736 -155.4.55.21:8333 # AS8473 -156.146.137.142:8333 # AS1448 -156.146.177.221:8333 # AS1448 -157.22.72.175:8333 # AS397379 -157.97.0.118:8333 # AS43571 -158.140.141.69:8333 # AS132132 -158.181.132.84:8333 # AS41750 -159.2.215.98:8333 # AS855 -159.196.3.239:8333 # AS4764 -159.224.189.250:8333 # AS13188 -160.80.12.16:8333 # AS137 -161.230.38.160:8333 # AS12353 -161.246.11.230:8333 # AS9486 -162.0.210.152:8333 # AS22612 -162.62.18.226:8333 # AS132203 -162.254.118.20:8333 # AS6130 -163.158.168.181:8333 # AS15435 -165.173.19.33:8333 # AS132132 -165.228.174.117:8333 # AS1221 -165.255.241.184:8333 # AS327693 -167.88.11.203:8333 # AS20278 -167.179.147.155:8333 # AS4764 -170.17.151.235:8333 # AS3303 -170.64.174.230:8333 # AS15108 -172.92.102.115:8333 # AS11404 -172.105.21.216:8333 # AS63949 -172.111.176.244:8333 # AS46562 -172.255.98.108:8333 # AS7979 -173.82.5.202:8333 # AS35916 -173.181.35.50:8333 # AS395570 -173.212.253.137:8333 # AS51167 -173.235.73.87:8333 # AS11272 -174.30.29.85:8333 # AS209 -174.141.209.40:8333 # AS6461 -176.9.17.121:8333 # AS24940 -176.12.16.135:8333 # AS8717 -176.74.136.237:8333 # AS35613 -176.74.139.120:8333 # AS35613 -176.122.122.134:8333 # AS50581 -176.126.167.10:8333 # AS8449 -176.151.244.130:8333 # AS5410 -176.186.19.106:8333 # AS5410 -176.212.185.153:8333 # AS9049 -177.142.146.193:8333 # AS4230 -178.21.118.178:8333 # AS49544 -178.61.141.198:8333 # AS21050 -178.124.162.209:8333 # AS6697 -178.143.25.194:8333 # AS15962 -178.154.233.197:8333 # AS200350 -178.159.98.133:8333 # AS202390 -178.232.186.191:8333 # AS41164 -178.236.137.63:8333 # AS44843 -179.60.149.4:8333 # AS395839 -184.160.110.104:8333 # AS5769 -184.174.37.139:8333 # AS1239 -185.8.104.179:8333 # AS16125 -185.14.30.25:8333 # AS21100 -185.25.48.184:8333 # AS61272 -185.52.93.45:8333 # AS39449 -185.64.116.15:8333 # AS31736 -185.69.105.117:8333 # AS6855 -185.98.54.20:8333 # AS39572 -185.107.83.55:8333 # AS43350 -185.132.109.122:8333 # AS38919 -185.135.81.50:8333 # AS57494 -185.140.253.169:8333 # AS200735 -185.148.3.227:8333 # AS47605 -185.154.2.3:8333 # AS29119 -185.162.92.36:8333 # AS41722 -185.163.44.36:8333 # AS39798 -185.165.170.19:8333 # AS3223 -185.167.113.59:8333 # AS207054 -185.185.59.12:8333 # AS48614 -185.203.41.148:8333 # AS9009 -185.209.12.76:8333 # AS212323 -185.209.70.17:8333 # AS204568 -185.210.125.33:8333 # AS205671 -185.233.189.210:8333 # AS61303 -185.238.131.19:8333 # AS206238 -185.239.220.210:8333 # AS61282 -185.239.221.5:8333 # AS61282 -185.250.90.246:8333 # AS61955 -186.249.217.25:8333 # AS7195 -186.250.95.132:8333 # AS262967 -188.35.167.14:8333 # AS34123 -188.68.53.44:8333 # AS47147 -188.120.255.115:8333 # AS29182 -189.6.195.111:8333 # AS28573 -190.2.130.44:8333 # AS49981 -190.13.122.89:8333 # AS33576 -190.123.27.11:8333 # AS52468 -190.145.127.254:8333 # AS14080 -191.220.156.64:8333 # AS8167 -192.31.136.90:8333 # AS54098 -192.69.53.43:8333 # AS11142 -192.146.137.44:8333 # AS25376 -192.174.121.33:8333 # AS11492 -192.222.147.175:8333 # AS1403 -193.198.34.24:8333 # AS2108 -193.222.130.14:8333 # AS29208 -194.35.185.167:8333 # AS9063 -194.54.83.234:8333 # AS41018 -194.233.84.100:8333 # AS141995 -195.2.73.88:8333 # AS48282 -195.48.12.8:8333 # AS1836 -195.154.200.157:8333 # AS12876 -197.211.133.15:8333 # AS51265 -198.84.146.8:8333 # AS5645 -198.98.55.86:8333 # AS53667 -199.247.7.208:8333 # AS20473 -200.116.154.131:8333 # AS13489 -201.191.6.103:8333 # AS11830 -201.221.234.200:8333 # AS27928 -202.47.225.242:8333 # AS9931 -202.107.219.130:8333 # AS4134 -202.108.211.135:8333 # AS4837 -202.138.13.122:8333 # AS4826 -203.86.195.32:8333 # AS23655 -203.184.52.247:8333 # AS9790 -204.111.163.114:8333 # AS4922 -205.178.41.124:8333 # AS11039 -206.192.203.0:8333 # AS7029 -207.229.46.80:8333 # AS852 -207.244.248.81:8333 # AS40021 -207.255.193.47:8333 # AS11776 -208.59.133.63:8333 # AS11039 -209.58.145.157:8333 # AS394380 -209.97.189.249:8333 # AS14061 -209.177.138.245:8333 # AS7832 -209.237.133.54:8333 # AS53859 -210.54.37.190:8333 # AS4648 -210.54.39.238:8333 # AS4648 -212.34.225.118:8333 # AS44395 -212.41.9.30:8333 # AS49505 -212.51.132.176:8333 # AS13030 -212.69.60.77:8333 # AS12496 -212.86.32.106:8333 # AS15366 -213.47.64.105:8333 # AS8412 -213.141.154.201:8333 # AS12714 -213.142.148.169:8333 # AS6762 -213.184.244.24:8333 # AS60280 -213.227.147.244:8333 # AS60781 -213.250.21.112:8333 # AS5603 -216.146.251.8:8333 # AS54579 -216.232.157.104:8333 # AS395570 +129.151.196.119:8333 # AS31898 +129.213.158.163:8333 # AS31898 +130.44.176.111:8333 # AS6079 +131.153.232.61:8333 # AS19437 +131.153.242.129:8333 # AS19437 +132.147.192.5:8333 # AS10750 +135.23.202.6:8333 # AS5645 +135.129.105.93:8333 # AS394195 +135.181.180.80:8333 # AS24940 +136.28.1.41:8333 # AS19165 +136.56.56.93:8333 # AS16591 +136.62.243.153:8333 # AS16591 +139.84.193.137:8333 # AS20473 +141.98.81.120:8333 # AS209588 +141.98.219.12:8333 # AS20326 +142.117.176.19:8333 # AS577 +143.110.231.111:8333 # AS14061 +144.2.72.68:8333 # AS57370 +144.2.104.35:8333 # AS57370 +144.6.192.154:8333 # AS4764 +144.126.147.55:8333 # AS40021 +146.0.74.196:8333 # AS57043 +146.70.49.38:8333 # AS9009 +146.71.69.103:8333 # AS396006 +147.28.163.54:8333 # AS54825 +147.28.185.150:8333 # AS54825 +147.32.95.62:8333 # AS2852 +148.113.159.109:8333 # AS16276 +148.163.68.23:8333 # AS3223 +149.7.16.137:8333 # AS63023 +149.143.32.144:8333 # AS15435 +151.115.74.102:8333 # AS12876 +151.236.34.245:8333 # AS29550 +151.248.167.250:8333 # AS8821 +152.42.229.252:8333 # AS14061 +152.53.18.161:8333 # AS197540 +152.53.37.21:8333 # AS42473 +154.57.6.171:8333 # AS200736 +156.57.38.205:8333 # AS855 +157.131.74.56:8333 # AS1299 +159.138.87.18:8333 # AS136907 +159.246.25.53:8333 # AS30491 +161.29.221.26:8333 # AS140220 +162.120.69.182:8333 # AS62240 +162.156.205.178:8333 # AS852 +162.207.122.215:8333 # AS7018 +163.123.215.229:8333 # AS63152 +164.152.167.208:8333 # AS59253 +165.173.18.251:8333 # AS56300 +166.70.65.79:8333 # AS6315 +167.224.189.201:8333 # AS395662 +167.248.185.196:8333 # AS398721 +169.150.206.200:8333 # AS60068 +170.39.103.163:8333 # AS33724 +170.205.178.76:8333 # AS22646 +172.92.108.184:8333 # AS11404 +172.96.142.246:8333 # AS23470 +172.234.29.229:8333 # AS63949 +172.241.70.236:8333 # AS7979 +173.23.232.48:8333 # AS30036 +173.164.210.49:8333 # AS33651 +173.169.42.150:8333 # AS33363 +173.208.166.82:8333 # AS32097 +173.208.236.58:8333 # AS32097 +173.236.10.158:8333 # AS32475 +173.241.227.243:8333 # AS19009 +174.2.93.93:8333 # AS6327 +174.177.29.211:8333 # AS22909 +175.41.191.135:8333 # AS8987 +176.57.213.53:8333 # AS9123 +176.99.2.90:8333 # AS197695 +176.113.167.35:8333 # AS56835 +176.166.34.226:8333 # AS5410 +176.172.173.205:8333 # AS5410 +177.39.12.242:8333 # AS52790 +178.115.246.157:8333 # AS25255 +178.143.180.249:8333 # AS15962 +178.192.9.193:8333 # AS3303 +178.232.204.112:8333 # AS25400 +178.250.232.111:8333 # AS31197 +179.43.172.23:8333 # AS51852 +179.214.122.129:8333 # AS28573 +180.150.46.187:8333 # AS4764 +184.56.122.69:8333 # AS10796 +184.83.140.189:8333 # AS11232 +184.105.131.181:8333 # AS6939 +184.162.91.24:8333 # AS5769 +185.8.106.179:8333 # AS204770 +185.31.136.172:8333 # AS60414 +185.63.97.216:8333 # AS50825 +185.68.249.91:8333 # AS51184 +185.70.43.192:8333 # AS62371 +185.87.191.80:8333 # AS199736 +185.92.72.157:8333 # AS200904 +185.95.37.16:8333 # AS200799 +185.119.118.68:8333 # AS44133 +185.133.42.54:8333 # AS57494 +185.143.48.4:8333 # AS20742 +185.148.146.24:8333 # AS44901 +185.150.160.208:8333 # AS34197 +185.156.37.30:8333 # AS202605 +185.161.6.75:8333 # AS43915 +185.181.230.117:8333 # AS60602 +185.194.93.135:8333 # AS197869 +185.197.160.61:8333 # AS60144 +185.251.88.100:8333 # AS35278 +186.75.66.162:8333 # AS11556 +188.68.54.170:8333 # AS197540 +188.120.222.69:8333 # AS49985 +188.138.88.47:8333 # AS8972 +188.212.113.16:8333 # AS206238 +188.214.129.26:8333 # AS16125 +188.214.129.217:8333 # AS16125 +188.237.167.51:8333 # AS8926 +190.64.134.52:8333 # AS6057 +192.3.11.20:8333 # AS36352 +192.119.148.210:8333 # AS393892 +192.145.127.190:8333 # AS9009 +192.187.121.46:8333 # AS33387 +192.227.73.9:8333 # AS13886 +192.243.215.102:8333 # AS63297 +193.22.128.10:8333 # AS56469 +193.22.128.12:8333 # AS56469 +193.72.32.187:8333 # AS33965 +193.238.16.12:8333 # AS39907 +194.1.163.112:8333 # AS8298 +194.14.247.35:8333 # AS50066 +194.106.127.43:8333 # AS3249 +194.233.69.180:8333 # AS141995 +195.62.52.19:8333 # AS44812 +195.133.68.203:8333 # AS48614 +195.139.85.46:8333 # AS2116 +195.189.97.38:8333 # AS59642 +195.216.214.27:8333 # AS25057 +197.87.144.126:8333 # AS3741 +197.155.6.43:8333 # AS37199 +198.16.178.88:8333 # AS1403 +199.85.210.133:8333 # AS22612 +199.230.127.169:8333 # AS398844 +201.131.200.50:8333 # AS28387 +202.177.24.140:8333 # AS7479 +203.123.97.227:8333 # AS38195 +203.132.94.196:8333 # AS38195 +204.15.11.35:8333 # AS13331 +204.16.245.163:8333 # AS20326 +204.83.161.154:8333 # AS803 +204.107.27.48:8333 # AS54303 +204.194.220.39:8333 # AS20055 +205.209.118.254:8333 # AS19318 +206.204.104.6:8333 # AS212947 +206.204.106.8:8333 # AS212947 +207.47.156.175:8333 # AS803 +207.158.15.96:8333 # AS21581 +207.178.119.175:8333 # AS27425 +207.182.146.85:8333 # AS10297 +208.53.32.26:8333 # AS13767 +209.59.150.4:8333 # AS32244 +209.71.50.11:8333 # AS20259 +209.141.37.57:8333 # AS53667 +209.205.204.210:8333 # AS55081 +209.227.228.193:8333 # AS31034 +209.253.210.114:8333 # AS7029 +210.179.103.74:8333 # AS4766 +211.58.126.101:8333 # AS9318 +212.24.104.116:8333 # AS62282 +212.39.67.41:8333 # AS8866 +212.86.55.47:8333 # AS15366 +212.90.85.145:8333 # AS16086 +212.112.65.254:8333 # AS48815 +212.159.75.247:8333 # AS6871 +212.227.211.87:8333 # AS8560 +212.241.94.177:8333 # AS1299 +212.251.164.10:8333 # AS2119 +213.14.190.184:8333 # AS34984 +213.139.207.219:8333 # AS395092 +213.183.46.51:8333 # AS56630 +216.41.130.41:8333 # AS396287 +216.53.190.99:8333 # AS14288 +216.172.82.150:8333 # AS53818 +216.219.91.82:8333 # AS19318 +216.226.128.189:8333 # AS13706 217.15.178.11:8333 # AS25534 -217.26.32.10:8333 # AS197312 -217.64.47.200:8333 # AS39324 -217.76.51.25:8333 # AS39597 -217.92.55.246:8333 # AS3320 -217.170.124.170:8333 # AS35401 -217.180.221.162:8333 # AS30600 -217.180.238.137:8333 # AS30600 -220.84.232.46:8333 # AS4766 -220.133.39.61:8333 # AS3462 -220.233.91.182:8333 # AS38195 -[2001:19f0:1000:1db3:5400:4ff:fe56:5a8d]:8333 # AS20473 -[2001:19f0:5:24da:3eec:efff:feb9:f36e]:8333 # AS20473 -[2001:19f0:5:24da::]:8333 # AS20473 -[2001:19f0:5:4535:3eec:efff:feb9:87e4]:8333 # AS20473 -[2001:19f0:5:4535::]:8333 # AS20473 +217.20.131.64:8333 # AS5483 +217.23.3.251:8333 # AS49981 +217.79.247.130:8333 # AS29802 +217.94.254.57:8333 # AS3320 +217.173.236.25:8333 # AS20634 +217.180.216.148:8333 # AS30600 +218.39.61.122:8333 # AS9318 +218.102.232.50:8333 # AS4760 +220.86.25.1:8333 # AS4766 +[2001:13d8:1c01:21:215:17ff:fe63:2a7e]:8333 # AS3790 +[2001:1620:542c:210::100]:8333 # AS13030 +[2001:1620:5566:100::62c]:8333 # AS13030 +[2001:18b8:0:100:0:b00b:420:69]:8333 # AS29789 +[2001:1970:5a22:4500::4f9c]:8333 # AS7992 +[2001:19f0:4401:e8a:5400:4ff:fe8e:d398]:8333 # AS20473 +[2001:19f0:5000:1a80:5400:4ff:fe71:aac5]:8333 # AS20473 +[2001:19f0:5:2b12:5400:4ff:fe6e:3afe]:8333 # AS20473 +[2001:19f0:5:5b81:5e6f:69ff:fe57:94d0]:8333 # AS20473 +[2001:19f0:6801:6ec:2::1]:8333 # AS20473 +[2001:19f0:c800:2ce5:5400:4ff:fed7:663d]:8333 # AS20473 +[2001:19f0:c:6da:5e6f:69ff:fe56:a650]:8333 # AS20473 [2001:1bc0:c1::2000]:8333 # AS29686 -[2001:1c04:4008:6300:8a5f:2678:114b:a660]:8333 # AS6830 -[2001:41d0:203:3739::]:8333 # AS16276 -[2001:41d0:203:8f49::]:8333 # AS16276 -[2001:41d0:203:bb0a::]:8333 # AS16276 -[2001:41d0:2:bf8f::]:8333 # AS16276 -[2001:41d0:303:de8b::]:8333 # AS16276 -[2001:41d0:403:3d61::]:8333 # AS16276 -[2001:41d0:405:9600::]:8333 # AS16276 -[2001:41d0:8:ed7f::1]:8333 # AS16276 -[2001:41d0:a:69a2::1]:8333 # AS16276 -[2001:41f0::62:6974:636f:696e]:8333 # AS6830 -[2001:470:1b62::]:8333 # AS6939 -[2001:470:1f05:43b:2831:8530:7179:5864]:8333 # AS6939 -[2001:470:1f09:b14::11]:8333 # AS6939 -[2001:470:1f15:106:e2d5:5eff:fe42:7ae5]:8333 # AS6939 -[2001:470:1f1b:365:aa20:66ff:fe3f:1909]:8333 # AS6939 -[2001:470:1f1b:5a6:216:3eff:fe24:1162]:8333 # AS6939 -[2001:470:6a7c::]:8333 # AS6939 -[2001:470:75e9:1::10]:8333 # AS6939 -[2001:470:8ca0:2:4e72:b9ff:fe56:f8b8]:8333 # AS6939 -[2001:470:dbc7:0:1010::100]:8333 # AS6939 -[2001:4ba0:cafe:14cc::1]:8333 # AS24961 -[2001:4ba0:ffff:24::1]:8333 # AS24961 +[2001:2043:180e:400::47]:8333 # AS3301 +[2001:250:1001:1621:401a:5c40:322f:9ea3]:8333 # AS24353 +[2001:4060:4419:8001::42]:8333 # AS6772 +[2001:41d0:2:7b3d::1]:8333 # AS16276 +[2001:41d0:2:7ba8::]:8333 # AS16276 +[2001:41d0:602:34f0::1]:8333 # AS16276 +[2001:41d0:800:10c0::]:8333 # AS16276 +[2001:41d0:800:364d::]:8333 # AS16276 +[2001:448a:2071:150d:1c3f:135e:6675:a69b]:8333 # AS7713 +[2001:470:1a34:2:a804:86ff:fec2:863a]:8333 # AS6939 +[2001:470:1f0a:89a::2]:8333 # AS6939 +[2001:470:28:b17::2]:8333 # AS6939 +[2001:470:7984::1337]:8333 # AS6939 +[2001:470:88ff:2e::1]:8333 # AS6939 +[2001:470:8a71:2::200]:8333 # AS6939 +[2001:470:8ca0:2:7646:a0ff:fe9b:e662]:8333 # AS6939 +[2001:470:a:c13::2]:8333 # AS6939 +[2001:470:da72::2:3]:8333 # AS6939 +[2001:470:dee0:1::3]:8333 # AS6939 [2001:4dd0:3564:0:30b7:1d7b:6fec:4c5c]:8333 # AS8422 [2001:4dd0:3564:0:88e:b4ff:2ad0:699b]:8333 # AS8422 [2001:4dd0:3564:0:9c1c:cc31:9fe8:5505]:8333 # AS8422 [2001:4dd0:3564:0:a0c4:d41f:4c4:1bb0]:8333 # AS8422 +[2001:4dd0:3564:0:fd76:c1d3:1854:5bd9]:8333 # AS8422 [2001:4dd0:3564:1::7676:8090]:8333 # AS8422 [2001:4dd0:3564:1:b977:bd71:4612:8e40]:8333 # AS8422 +[2001:4dd0:af0e:3564:0:69:90:8333]:8333 # AS8422 [2001:4dd0:af0e:3564::69:1]:8333 # AS8422 [2001:4dd0:af0e:3564::69:90]:8333 # AS8422 -[2001:560:441f:1::4]:8333 # AS18530 -[2001:638:a000:4140::ffff:191]:8333 # AS680 -[2001:67c:25dc:91::2]:8333 # AS41018 -[2001:67c:26b4:ff00::44]:8333 # AS25376 -[2001:67c:2db8:6::36]:8333 # AS39798 +[2001:550:af00:7:0:1:aff9:18]:8333 # AS174 +[2001:569:5079:abd2::c9]:8333 # AS852 +[2001:569:713f:4800:e9af:dd81:7b94:f105]:8333 # AS852 +[2001:569:bed3:3100:ac3e:c5d8:c4e:56fe]:8333 # AS852 +[2001:5a8:40db:2000:8668:a702:c89:bdd4]:8333 # AS7065 +[2001:5a8:40db:2000:867b:8aa6:2010:879a]:8333 # AS7065 +[2001:5a8:4164:7a00::506]:8333 # AS7065 +[2001:5a8:60c0:d500::7840]:8333 # AS7065 +[2001:648:2800:131:4b1f:f6fc:20f7:f99f]:8333 # AS5470 +[2001:678:68c:fffb::195]:8333 # AS13259 +[2001:678:d78:22d0:5065:c1ff:fef2:3f65]:8333 # AS8298 +[2001:67c:1220:808::93e5:81f]:8333 # AS197451 +[2001:67c:1254:d2:6b9c::1]:8333 # AS4455 +[2001:67c:26b4:ff00::44]:8333 # AS57672 +[2001:67c:440:688:91:236:251:137]:8333 # AS57944 +[2001:67c:440:f887:194:147:140:37]:8333 # AS57944 [2001:7c0:2310:0:f816:3eff:fe6c:4f58]:8333 # AS34878 -[2001:861:3242:8420::40]:8333 # AS5410 -[2001:8b0:1301:1000::60]:8333 # AS20712 +[2001:8003:d117:3500:bfc5:7e90:9da5:a8c0]:8333 # AS1221 +[2001:818:df59:5800:f8a4:ceff:fefd:d63a]:8333 # AS12353 +[2001:818:e9f4:5400:e65f:1ff:fecd:69ad]:8333 # AS12353 +[2001:861:3200:64a0:92b1:1cff:fe91:137f]:8333 # AS5410 +[2001:8b0:ba7b:c965::8:85]:8333 # AS20712 +[2001:8f8:1b69:13ef:48ab:74ff:fe36:2313]:8333 # AS8966 +[2001:a61:101b:b201:dea6:32ff:fefb:f7da]:8333 # AS8767 +[2001:b011:7008:31b7:9624:d01c:8f94:e6f7]:8333 # AS3462 [2001:b030:2422::208d]:8333 # AS3462 -[2001:b07:2ef:6e4a:3d:974e:784a:684b]:8333 # AS12874 -[2001:b07:5d32:b142:8f77:3c7d:a2fd:ed2e]:8333 # AS12874 +[2001:b07:5d2e:3604:1125:c712:2aac:5c0]:8333 # AS12874 +[2001:b07:6440:3a98:a280:5d86:d5a3:3fc4]:8333 # AS12874 +[2001:b07:644c:1b5a:566f:23e4:9a34:a619]:8333 # AS12874 [2001:b07:6461:7811:489:d2da:e07:1af7]:8333 # AS12874 -[2001:b07:646b:8074:32e8:9243:a337:e60a]:8333 # AS12874 -[2001:b07:646b:8074:4cc6:79a5:3af7:7132]:8333 # AS12874 -[2001:b07:ad4:ca4b:7dd5:8471:50c3:5363]:8333 # AS12874 +[2001:b07:646d:caf:3c06:693f:73a9:e71b]:8333 # AS12874 +[2001:b07:6474:51d8:6156:84e7:397a:a847]:8333 # AS12874 +[2001:b07:6474:51d8:c27e:427e:fe37:6356]:8333 # AS12874 +[2001:b07:6474:51d8:f31f:fdc:1c90:67ac]:8333 # AS12874 +[2001:b07:ae6:3b99:7270:fcff:fe02:33c0]:8333 # AS12874 +[2001:bc8:1201:701:ca1f:66ff:fec9:221c]:8333 # AS12876 +[2001:bc8:1201:715:ca1f:66ff:fec9:5ff0]:8333 # AS12876 [2001:bc8:1201:71a:2e59:e5ff:fe42:52f4]:8333 # AS12876 +[2001:bc8:1201:900:46a8:42ff:fe26:9501]:8333 # AS12876 [2001:bc8:1600:0:208:a2ff:fe0c:8a2e]:8333 # AS12876 -[2001:bc8:323c:ff:a634:384f:1849:f4bc]:8333 # AS12876 -[2001:bc8:323c:ff:d217:c2ff:fe07:2cd9]:8333 # AS12876 -[2001:bc8:700:2b14::1]:8333 # AS12876 -[2001:bc8:700:8d16::1]:8333 # AS12876 -[2001:e68:5400:58d0:bd15:ea8c:5b20:7523]:8333 # AS4788 -[2400:2411:a3e1:4900:7298:f550:67e7:b99b]:8333 # AS17676 -[2400:8901::f03c:93ff:fe2b:5c0b]:8333 # AS63949 -[2400:8901::f03c:93ff:fe5a:685c]:8333 # AS63949 -[2401:b140:1::100:210]:8333 # AS54415 +[2001:bc8:3e54:6b02::1]:8333 # AS12876 +[2001:bc8:610:9:46a8:42ff:fe0c:d385]:8333 # AS12876 +[2001:bc8:701:409:b683:51ff:fe06:75f4]:8333 # AS12876 +[2001:bc8:701:40d:ae16:2dff:fea6:e868]:8333 # AS12876 +[2001:e68:541b:9472:c86:6c6b:8f1e:eb8d]:8333 # AS4788 +[2001:f40:94e:426:7270:fcff:fe05:3cd]:8333 # AS9930 +[2003:c0:6f34:d600:201:2eff:fe6b:c20c]:8333 # AS3320 +[2003:ca:e74b:ea58:dea6:32ff:fe26:b6fb]:8333 # AS3320 +[2003:d6:270a:ea00:5a47:caff:fe73:450c]:8333 # AS3320 +[2003:e6:3742:b00:9209:d0ff:fe0f:9ea7]:8333 # AS3320 +[2003:f0:df07:c202:aaa1:59ff:fe57:7779]:8333 # AS3320 +[2003:f6:3f48:7000:4c9f:7620:8324:d4a7]:8333 # AS3320 +[2400:3b00:20:c:bacb:29ff:feab:8886]:8333 # AS18229 +[2400:4053:1203:3f00:1:1:1:134]:8333 # AS4713 +[2400:6180:0:d2::78b7:6000]:8333 # AS14061 +[2400:6180:0:d2::fd91:9000]:8333 # AS14061 +[2400:8901::f03c:92ff:fe3e:e1d6]:8333 # AS63949 +[2400:8901::f03c:92ff:fe4e:95f3]:8333 # AS63949 +[2400:8902::f03c:94ff:fe53:568]:8333 # AS63949 +[2400:8905::f03c:94ff:fecc:1466]:8333 # AS48337 +[2400:8907::f03c:94ff:fed9:9696]:8333 # AS63949 +[2400:a848:4045:1:be24:11ff:fe88:7852]:8333 # AS134090 +[2400:adc1:18e:7c00:8243:2452:89af:6cbb]:8333 # AS9541 +[2400:d321:2231:5973::1]:8333 # AS141995 [2401:b140:1::100:220]:8333 # AS54415 +[2401:b140:3::44:110]:8333 # AS54415 +[2401:b140:3::44:120]:8333 # AS54415 +[2401:d002:2103:400:211:32ff:fe9e:7ae3]:8333 # AS38195 [2401:d002:3902:700:d72c:5e22:4e95:389d]:8333 # AS38195 -[2404:4408:63a4:a01::250]:8333 # AS9790 -[2406:3400:216:8b00:211:32ff:feca:336b]:8333 # AS10143 -[2406:8c00:0:3422:133:18:228:108]:8333 # AS24282 -[2406:da11:169:b03:32b5:f901:9f7c:3e4b]:8333 # AS16509 -[2406:da18:9f1:f301:7d2e:c256:c112:f2be]:8333 # AS16509 -[2406:da18:9f1:f303:c1c9:c569:b799:2057]:8333 # AS16509 -[2406:da1e:a4e:8a00:20db:dd8d:3670:28f0]:8333 # AS16509 -[2406:da1e:a4e:8a03:2aad:496b:768d:e497]:8333 # AS16509 +[2402:1f00:8000:21a::]:8333 # AS16276 +[2402:a7c0:8100:a015::6f2:79a5]:8333 # AS59253 +[2403:580c:c505:0:6955:67d3:6229:88e7]:8333 # AS4764 +[2403:71c0:2000:b3e0::101]:8333 # AS23959 +[2403:71c0:2000:b3e0::7693]:8333 # AS23959 +[2404:4400:411a:6000::7d73]:8333 # AS9790 +[2404:4400:416c:f400:4a21:bff:fe32:571]:8333 # AS9790 +[2404:4408:6397:8201::250]:8333 # AS9790 +[2404:7a81:17a0:f000:e4b1:aef3:2a2e:d54]:8333 # AS2518 +[2405:6582:de0:4400:8ce:2b80:2960:7b4e]:8333 # AS4685 +[2405:6582:de0:4400:f:854d:5057:4fc9]:8333 # AS4685 +[2406:3400:31f:61d0:b7f5:6b3e:2241:bc44]:8333 # AS10143 +[2406:3400:31f:61d0:f25b:ae67:d9ed:b31c]:8333 # AS10143 +[2406:3400:912:4940:1e45:e8cc:2d24:8250]:8333 # AS10143 +[2406:da14:335:b600:38cc:a776:1818:1285]:8333 # AS16509 [2407:3640:2107:1278::1]:8333 # AS141995 -[2407:3640:3010:4012::1]:8333 # AS141995 -[2407:8800:bc61:2202:d63d:7eff:fe6c:dc36]:8333 # AS7545 -[2600:1700:5c5b:b0:aaa1:59ff:fe5f:615a]:8333 # AS7018 +[2407:8800:bc61:2220:3cf5:57ac:851b:2b1e]:8333 # AS7545 +[2407:8800:bc61:2220:555b:7e78:78a0:eb32]:8333 # AS7545 +[2408:820c:a93a:8f00:101b:7dc4:98f9:e065]:8333 # AS17621 +[2408:824c:3618:e8f1:d43c:7c0f:6300:dd39]:8333 # AS4837 +[2409:8a44:9116:2740:63b0:124d:1ce7:8836]:8333 # AS24445 +[240b:11:5501:5e00:10f2:46c7:c6f6:6e25]:8333 # AS2516 +[240b:250:2221:b100:f0fb:1424:b379:5c1]:8333 # AS2516 +[2600:1015:a032:1ca1:8c04:c837:a14:b1da]:8333 # AS6167 +[2600:1700:488:10::421]:8333 # AS7018 +[2600:1700:488:10::614]:8333 # AS7018 +[2600:1700:5453:69e::109]:8333 # AS7018 +[2600:1700:5af3:2c10:46a8:42ff:fe08:5835]:8333 # AS7018 +[2600:1700:6f20:abc4::c65]:8333 # AS7018 +[2600:1700:944c:e00f:2a27:f664:1801:599f]:8333 # AS7018 +[2600:1700:e41:2040:9ab7:85ff:fe20:621]:8333 # AS7018 [2600:1700:ec7b:5730::48]:8333 # AS7018 -[2600:1900:4000:4cc4:0:1::]:8333 # AS15169 -[2600:1900:4000:4cc4:0:2::]:8333 # AS15169 -[2600:1900:4000:4cc4:0:3::]:8333 # AS15169 -[2600:1900:4000:4cc4::]:8333 # AS15169 -[2600:1900:4030:a25e::]:8333 # AS15169 -[2600:1f14:40e:e301:afdd:ad00:e568:d220]:8333 # AS16509 -[2600:1f1c:2d3:2400:f15e:2f2a:760d:a33d]:8333 # AS16509 +[2600:1702:57f0:11c0::19d8]:8333 # AS7018 +[2600:1702:6d33:ec10::22]:8333 # AS7018 +[2600:1900:4000:7be1::]:8333 # AS396982 +[2600:1900:4020:65f:0:1::]:8333 # AS396982 +[2600:1900:4060:40b::]:8333 # AS396982 +[2600:1900:4090:5db:0:1::]:8333 # AS396982 +[2600:1900:40b0:3af2::]:8333 # AS396982 +[2600:1900:40c0:5470:0:1::]:8333 # AS396982 +[2600:1900:40e0:3cdc::]:8333 # AS396982 +[2600:1900:40f0:964b::]:8333 # AS396982 +[2600:1900:4170:ca4e::]:8333 # AS396982 +[2600:1901:8170:4bb:0:1::]:8333 # AS396982 +[2600:1f14:40e:e300:c97e:fc1c:c0db:fe83]:8333 # AS16509 +[2600:1f14:40e:e300:cf69:2dac:5fa1:19fa]:8333 # AS16509 +[2600:1f18:64d9:1603:4436:871e:2bfe:7403]:8333 # AS14618 +[2600:1f18:66fc:d700:214c:9628:5325:67fc]:8333 # AS14618 +[2600:1f18:66fc:d700:3ea6:7dc2:83c6:cd91]:8333 # AS14618 +[2600:1f18:66fc:d700:be6f:27a6:7449:b1c3]:8333 # AS14618 +[2600:1f18:66fc:d700:fb0f:3b9d:a7c9:84cd]:8333 # AS14618 +[2600:1f18:719a:e302:2758:8042:929f:a384]:8333 # AS14618 +[2600:1f18:719a:e302:4c90:e1e6:2a59:82c4]:8333 # AS14618 +[2600:1f18:719a:e302:e6c0:8878:401c:27c2]:8333 # AS14618 +[2600:1f18:719a:e302:ef0c:40ab:f8f:6d6c]:8333 # AS14618 [2600:2104:1003:c5ab:dc5e:90ff:fe18:1d08]:8333 # AS11404 -[2600:3c00::f03c:92ff:fe92:2745]:8333 # AS63949 -[2600:3c00::f03c:92ff:fecf:61b6]:8333 # AS63949 -[2600:3c00:e002:2e32::1:14]:8333 # AS63949 -[2600:3c01::f03c:93ff:fe2a:5266]:8333 # AS63949 -[2600:3c01::f03c:93ff:fe74:5f59]:8333 # AS63949 -[2600:3c01::f03c:93ff:fee6:2146]:8333 # AS63949 +[2600:3c00::f03c:94ff:fe7c:86e2]:8333 # AS63949 +[2600:3c00::f03c:94ff:feb7:4dd7]:8333 # AS63949 [2600:3c02::f03c:92ff:fe5d:9fb]:8333 # AS63949 -[2600:4040:2004:3201:459f:8fe8:444d:baf1]:8333 # AS13786 -[2600:4040:4541:4900:4e1:b58a:8438:450e]:8333 # AS13786 +[2600:3c02::f03c:93ff:fe14:a4f2]:8333 # AS63949 +[2600:3c0e::f03c:94ff:fe63:2e90]:8333 # AS63949 +[2600:3c0e::f03c:94ff:fe72:bfe0]:8333 # AS63949 +[2600:6c4e:a00:cd0:428d:5cff:fe58:4884]:8333 # AS20115 [2600:6c54:7100:1ad1:c92e:36d:651:bd18]:8333 # AS20115 -[2600:8801:2f80:477::141c]:8333 # AS22773 -[2600:8801:8d00:3eb0:20c:29ff:fec3:d799]:8333 # AS22773 -[2600:8805:2400:14e:12dd:b1ff:fef2:3013]:8333 # AS22773 -[2601:184:300:156c:ba4c:30:9da:6c06]:8333 # AS7922 -[2601:346:d7f:fff7:18c6:4856:ef75:744c]:8333 # AS7922 -[2601:405:4a00:876:c8d3:f081:2ce8:ba8e]:8333 # AS7922 -[2602:24c:b8f:cd90::7840]:8333 # AS46375 +[2600:6c67:2100:670:b179:be4c:8cca:e8f0]:8333 # AS33588 +[2600:8801:2f80:ac::173e]:8333 # AS22773 +[2600:8806:2101:9a80:c2f5:5e1:445a:bb74]:8333 # AS22773 +[2601:147:4c80:c97:3eec:efff:fe79:3b74]:8333 # AS33657 +[2601:185:8301:d9d0:61a2:a7e4:bfc9:f771]:8333 # AS7015 +[2601:246:4d7f:83e9:d74b:87c9:b119:cf8b]:8333 # AS33491 +[2601:280:5c00:43d:4aba:4eff:fef8:6e5d]:8333 # AS33652 +[2601:41:c200:bf0b:92b1:1cff:fe96:b198]:8333 # AS33287 +[2601:41:c300:f109:2e44:fdff:fe0e:68ca]:8333 # AS33287 +[2601:602:d200:19f8:86a6:59a9:2976:2dfd]:8333 # AS33650 +[2601:603:5300:83b7:0:ff:fe00:4209]:8333 # AS33650 +[2601:645:c680:5be:e0a4:381d:a60:b498]:8333 # AS33651 +[2602:47:d441:5e01:52eb:f6ff:fe7f:f0db]:8333 # AS209 +[2602:61:7800:9300::1]:8333 # AS209 +[2602:f996:4:4000:be24:11ff:fee0:6f6a]:8333 # AS13717 +[2602:fa59:6:f6::1]:8333 # AS14956 +[2602:fc16:3:65::62b5]:8333 # AS203380 +[2602:fd23:3:1::1:213]:8333 # AS33185 +[2602:fd72:20e:9c00:213:efff:fef5:f172]:8333 # AS2740 [2602:fec3:0:1::69]:8333 # AS62563 -[2602:ff16:1:0:1:412:0:1]:8333 # AS29802 -[2603:3001:2618:c000:2ec1:df1f:a463:9119]:8333 # AS7922 -[2603:3003:11b:e100:20c:29ff:fe38:bbc0]:8333 # AS7922 -[2603:3004:6a1:3800:851f:584d:7aba:affb]:8333 # AS7922 -[2603:3004:6a1:3800::7bba]:8333 # AS7922 -[2603:3004:6a1:3800::f667]:8333 # AS7922 -[2603:3024:1606:1400::29ec]:8333 # AS7922 -[2603:3024:18ee:8000:20e:c4ff:fed1:ef15]:8333 # AS7922 -[2603:6000:a400:9300::2000]:8333 # AS7843 -[2603:6010:7001:4830::2:1]:8333 # AS7843 -[2603:8080:1f07:6fdd:7de2:d969:78c9:b7ea]:8333 # AS7843 -[2603:8080:d600:1800:7ce1:74a2:6a8a:4643]:8333 # AS7843 -[2603:8081:6c00:306e:215:5dff:fe02:150a]:8333 # AS7843 -[2604:3d09:7182:8700:bba9:cde6:5b37:a8df]:8333 # AS6327 -[2604:4080:1036:80b1::3be]:8333 # AS11404 -[2604:a00:3:1223:216:3eff:fe27:76e0]:8333 # AS19318 -[2604:a880:400:d0::261f:6001]:8333 # AS14061 -[2604:a880:4:1d0::13e:f000]:8333 # AS14061 -[2604:a880:4:1d0::17a:7000]:8333 # AS14061 -[2604:a880:4:1d0::c1:3000]:8333 # AS14061 -[2604:a880:4:1d0::e5:b000]:8333 # AS14061 -[2605:4a80:a302:7940:7254:1ed4:90d7:4f39]:8333 # AS11232 -[2605:4a80:a302:7940::2]:8333 # AS11232 +[2602:fec3:101:1::5:73]:8333 # AS62563 +[2602:ffb6:4:739e:f816:3eff:fe00:c2b3]:8333 # AS174 +[2602:ffb6:4:7b8e:f816:3eff:fe9d:9dc2]:8333 # AS174 +[2602:ffc5:200:1e01:241d:e589:9650:c773]:8333 # AS20473 +[2603:3003:11b:e100:20c:29ff:fe38:bbc0]:8333 # AS33657 +[2603:3003:4eac:100:4e5f:e7a6:2059:91d8]:8333 # AS33657 +[2603:3005:418e:8100:3af7:cdff:feca:1af8]:8333 # AS7015 +[2603:3005:418e:8100::9a8a]:8333 # AS7015 +[2603:3005:549d:2201:20b5:71ff:fedc:bc9a]:8333 # AS7015 +[2603:300a:912:627a:be24:11ff:fe7b:39c3]:8333 # AS33491 +[2603:3020:708:6e00:4f6:a091:350c:cbcb]:8333 # AS20214 +[2603:3024:1828:1ac1::83]:8333 # AS33651 +[2603:3024:18ee:8000:20e:c4ff:fed1:ef15]:8333 # AS33651 +[2603:3024:2005:8000:85f4:879d:4710:1110]:8333 # AS33651 +[2603:800c:700:6a43:5b80:9ce0:a54:8b95]:8333 # AS20001 +[2603:8080:1f07:6fdd:7de2:d969:78c9:b7ea]:8333 # AS11427 +[2603:8081:6c00:4bbc:215:5dff:fe02:1555]:8333 # AS11427 +[2603:80a0:700:1886::39]:8333 # AS11427 +[2603:9001:3600:1902::b]:8333 # AS33363 +[2604:2dc0:100:24ce::]:8333 # AS16276 +[2604:4500:6:285::18]:8333 # AS29802 +[2604:55c0:100:222::2]:8333 # AS4138 +[2604:86c0:3001:5::12:73]:8333 # AS63023 +[2604:a00:50:39:c514:becd:bece:ad3a]:8333 # AS19318 +[2604:a880:2:d1::63:4001]:8333 # AS14061 +[2604:a880:400:d1::849:6001]:8333 # AS14061 +[2604:a880:800:c1::233:1]:8333 # AS14061 +[2604:a880:cad:d0::75b2:3001]:8333 # AS14061 +[2604:a880:cad:d0::75b2:3002]:8333 # AS14061 +[2605:1080:0:f00::70]:8333 # AS23367 +[2605:21c0:2000:11:204:194:220:40]:8333 # AS20055 +[2605:3380:422e:1::50]:8333 # AS397444 +[2605:59c8:2666:1a00::113c]:8333 # AS14593 +[2605:59c8:325:b800:2efd:a1ff:fedc:f8d4]:8333 # AS14593 +[2605:59c8:788:5000:5054:ff:feb8:380]:8333 # AS14593 [2605:6400:30:f220::]:8333 # AS53667 -[2605:a140:3010:4014::1]:8333 # AS40021 +[2605:6440:d000:252:ae1f:6bff:fef5:2d86]:8333 # AS396356 +[2605:6f80:0:7:fc1b:ccff:fe8a:d822]:8333 # AS36114 +[2605:a140:2228:8423::1]:8333 # AS51167 +[2605:a143:2162:7067::1]:8333 # AS51167 [2605:ae00:203::203]:8333 # AS7819 -[2605:b40:14d0:5b00:7988:eb8:6bb6:66e2]:8333 # AS174 -[2605:c000:2a0a:1::102]:8333 # AS7393 -[2607:5300:61:854::1]:8333 # AS16276 +[2606:6d00:194:f03:3d2:f06a:c2e8:a54]:8333 # AS1403 +[2607:4480:2:1:38:102:69:70]:8333 # AS40470 +[2607:5300:203:293e::1]:8333 # AS16276 +[2607:5300:60:614::1]:8333 # AS16276 +[2607:5300:60:7477::]:8333 # AS16276 [2607:9280:b:73b:250:56ff:fe14:25b5]:8333 # AS395502 [2607:9280:b:73b:250:56ff:fe21:9c2f]:8333 # AS395502 [2607:9280:b:73b:250:56ff:fe21:bf32]:8333 # AS395502 [2607:9280:b:73b:250:56ff:fe33:4d1b]:8333 # AS395502 [2607:9280:b:73b:250:56ff:fe3d:401]:8333 # AS395502 +[2607:f2c0:e7b1:fac0::444b]:8333 # AS5645 +[2607:f2c0:f00e:300::54]:8333 # AS5645 +[2607:fe90:4:b6:a001:3fff:fef2:8770]:8333 # AS19237 +[2607:fea8:601e:7d01:be24:11ff:fe89:27f3]:8333 # AS812 +[2620:11c:5001:1118:d267:e5ff:fee9:e673]:8333 # AS13331 +[2620:11c:5001:2199:d267:e5ff:fee9:e673]:8333 # AS13331 +[2620:6:2003:105:67c:16ff:fe51:58bf]:8333 # AS395460 [2620:6e:a000:1:42:42:42:42]:8333 # AS397444 -[2620:a6:2000:1:1:0:5:1601]:8333 # AS27566 -[2620:a6:2000:1:2:0:9:900b]:8333 # AS27566 -[2620:a6:2000:1:2:0:b:300e]:8333 # AS27566 -[2800:150:11d:d2f:bdac:7807:2f5:4aa0]:8333 # AS22047 -[2803:9800:a007:82ba:650b:82b8:8377:d0]:8333 # AS19037 -[2804:14c:155:45e0:1e86:15a3:efd9:7287]:8333 # AS28573 -[2804:14c:657d:4030:28b4:eff:fe9b:8894]:8333 # AS28573 -[2804:14d:1087:9434::1002]:8333 # AS4230 -[2804:954:24:2:b390:d83b:358a:db53]:8333 # AS263073 -[2804:d57:554d:de00:3e7c:3fff:fe7b:80aa]:8333 # AS8167 -[2a00:1028:838c:563a:fd25:87b6:5a54:811]:8333 # AS5610 +[2620:a6:2000:1:1:0:d:7f1d]:8333 # AS27566 +[2800:150:11d:1093:c9e3:1ef4:bc4:250d]:8333 # AS22047 +[2800:40:17:ccb:abfd:6021:2e22:e11e]:8333 # AS16814 +[2800:40:38:cfef:a236:bcff:fe58:b6ec]:8333 # AS16814 +[2800:40:74:4b8b:f673:db63:6f6f:2310]:8333 # AS16814 +[2800:40:79:fa39:930c:ace4:77fa:a15f]:8333 # AS16814 +[2800:cd0:7b14:b400:c090:e030:50ea:5fee]:8333 # AS6568 +[2803:9800:9003:babc:1188:44f0:b55d:79e4]:8333 # AS11664 +[2803:9800:9447:84bb:325a:3aff:fe6b:f795]:8333 # AS11664 +[2803:9800:a007:8391:1fd7:c263:a55b:b9fb]:8333 # AS11664 +[2804:14c:87e0:8e2e:6aca:9e19:8c0d:bfd7]:8333 # AS28573 +[2804:431:e038:cd01:aaa1:59ff:fe0d:44b8]:8333 # AS27699 +[2804:d45:b01c:be00:797b:b8d2:fb39:45]:8333 # AS7738 +[2804:d4b:7d55:5800:32b9:6a01:dea3:7a4]:8333 # AS7738 +[2804:d56:e88:7300:fcf5:a432:eb7:c2d4]:8333 # AS8167 +[2806:267:148a:1d10:5e4:fde0:8744:8c17]:8333 # AS13999 +[2806:2f0:5680:fd99:1088:b524:75e3:49d5]:8333 # AS17072 +[2a00:1169:114:dc00::]:8333 # AS21499 +[2a00:1190:c013::be:1337]:8333 # AS16302 [2a00:1298:8001::6542]:8333 # AS5578 -[2a00:1398:4:2a03:215:5dff:fed6:1033]:8333 # AS34878 +[2a00:12d8:7005::1e]:8333 # AS12586 +[2a00:12e0:101:99:20c:29ff:fe29:d03f]:8333 # AS6798 +[2a00:1398:4:2a03:3eec:efff:fe05:d93e]:8333 # AS34878 [2a00:1398:4:2a03::bc03]:8333 # AS34878 +[2a00:13a0:3015:1:85:14:79:26]:8333 # AS31242 [2a00:1768:2001:27::ef6a]:8333 # AS43350 +[2a00:1a08:ffff:5::11]:8333 # AS25534 [2a00:1f40:5001:108:5d17:7703:b0f5:4133]:8333 # AS42864 [2a00:23c5:fe80:7301:d6ae:52ff:fed5:56a5]:8333 # AS2856 -[2a00:6020:13dc:bc00:5559:258:27d:b52b]:8333 # AS60294 -[2a00:6020:4503:3700:20c:29ff:fe61:4a4c]:8333 # AS60294 -[2a00:6020:b434:eb00:dea6:32ff:fe0d:a5c0]:8333 # AS60294 -[2a00:6020:b489:2000:5054:ff:fefc:5ed8]:8333 # AS60294 -[2a00:7c80:0:10c::2]:8333 # AS49981 -[2a00:7c80:0:25::e37a]:8333 # AS49981 -[2a00:8a60:e012:a00::21]:8333 # AS680 -[2a00:bbe0:cc:0:5a11:22ff:feb4:8f5c]:8333 # AS47605 -[2a00:bbe0:cc:0:62a4:4cff:fe23:7510]:8333 # AS47605 -[2a00:ca8:a15:9a5b:8b42:a886:7d48:7a21]:8333 # AS30764 -[2a00:ca8:a1f:f9b7:cb55:5766:524b:acaa]:8333 # AS30764 -[2a00:d4e0:ff:fc02:5e55:4a7c:b83b:e5a1]:8333 # AS15600 -[2a00:d520:9:9300:420b:544e:8019:6d3a]:8333 # AS15600 +[2a00:4d80::1]:8333 # AS43150 +[2a00:5980:93::135]:8333 # AS197869 +[2a00:6020:4722:8920:5054:ff:fe06:56cf]:8333 # AS60294 +[2a00:6020:4722:8920::1b05]:8333 # AS60294 +[2a00:6020:4914:5700:db31:ca50:797:c468]:8333 # AS60294 +[2a00:6020:4a80:6978::10]:8333 # AS60294 +[2a00:6020:509e:a400:211:32ff:fe5c:369c]:8333 # AS60294 +[2a00:6020:a79f:8700:52eb:f6ff:feef:6e1f]:8333 # AS60294 +[2a00:6020:b406:e00:79e:9ad6:9181:ebb8]:8333 # AS60294 +[2a00:6020:b489:2000:42:c0ff:fea8:b209]:8333 # AS60294 +[2a00:7c80:0:4e::2]:8333 # AS49981 +[2a00:7c80:0:4e:b7c0::2001]:8333 # AS49981 +[2a00:8a60:e012:a00::9001]:8333 # AS47610 +[2a00:bbe0:0:221f::246]:8333 # AS60414 +[2a00:c6c0:0:142:1::1]:8333 # AS47172 +[2a00:d420:8:5d00:69c2:164b:29d7:fa9e]:8333 # AS15600 +[2a00:d4e0:ff:fc02:7af2:9eff:fe90:31e0]:8333 # AS15600 [2a00:d880:5:c2::d329]:8333 # AS198203 -[2a00:ee2:1200:1900:8d3:d2ff:feb1:bc58]:8333 # AS5603 -[2a01:4f8:173:230a::2]:8333 # AS24940 -[2a01:4f8:200:7222::2]:8333 # AS24940 -[2a01:4f8:202:3e6::2]:8333 # AS24940 -[2a01:4f8:221:44d7::2]:8333 # AS24940 -[2a01:4f8:231:915::2]:8333 # AS24940 -[2a01:4f8:261:2bcd::2]:8333 # AS24940 -[2a01:4f8:261:3cae::2]:8333 # AS24940 -[2a01:4f8:261:420c::2]:8333 # AS24940 -[2a01:4f9:2b:29a::2]:8333 # AS24940 -[2a01:4f9:3a:2dd2::2]:8333 # AS24940 -[2a01:7a7:2:2804:ae1f:6bff:fe9d:6c94]:8333 # AS20773 +[2a01:238:425f:4600:bbb8:16d6:e907:cb6f]:8333 # AS6724 +[2a01:261:218:3f00:8d0f:2105:c657:4ae7]:8333 # AS34779 +[2a01:4b00:807c:3100:262f:d0ff:fef9:fdd9]:8333 # AS56478 +[2a01:4b00:8256:1110:d2bf:9cff:fe45:9a60]:8333 # AS56478 +[2a01:4b00:bf1b:7200:d826:7d6f:b13:276c]:8333 # AS56478 +[2a01:4f8:160:60aa:fee::1]:8333 # AS24940 +[2a01:4f8:171:210f::2]:8333 # AS24940 +[2a01:4f8:172:109b::2]:8333 # AS24940 +[2a01:4f8:172:2695::2]:8333 # AS24940 +[2a01:4f8:173:2742::2]:8333 # AS24940 +[2a01:4f8:1c0c:b00d::1]:8333 # AS24940 +[2a01:4f8:202:4205::2]:8333 # AS24940 +[2a01:4f8:c2c:7f8e::1]:8333 # AS24940 +[2a01:4f9:3080:1447::2]:8333 # AS24940 +[2a01:4f9:3b:1edc::2]:8333 # AS24940 +[2a01:4ff:1f0:8517::1]:8333 # AS212317 +[2a01:4ff:1f0:c3c1::1]:8333 # AS212317 +[2a01:4ff:f0:e4e9::1]:8333 # AS213230 +[2a01:5a8:302:ff6e::1]:8333 # AS8866 +[2a01:7a7:2:2804:ae1f:6bff:fe9d:6c94]:8333 # AS29066 +[2a01:7a7:2:3d3a:ae1f:6bff:fef2:e12]:8333 # AS29066 +[2a01:7c8:aaac:89:5054:ff:feb7:f5cb]:8333 # AS20857 [2a01:7c8:aac2:180:5054:ff:fe56:8d10]:8333 # AS20857 -[2a01:7c8:aac9:c9:5054:ff:fedf:ff95]:8333 # AS20857 -[2a01:7e01::f03c:93ff:fe49:2f5b]:8333 # AS63949 -[2a01:8740:1:753::e5cb]:8333 # AS57344 -[2a01:8740:1:ffc5::8c6a]:8333 # AS57344 -[2a01:cb00:b63:c000:227:eff:fe28:c565]:8333 # AS3215 -[2a01:cb19:688:e900:aa60:b6ff:fe29:bbae]:8333 # AS3215 -[2a01:e0a:163:c0b0:9da5:1690:a12b:bede]:8333 # AS12322 -[2a01:e0a:282:67b0:b4f4:aaff:fe7c:44a6]:8333 # AS12322 -[2a01:e0a:301:7010:b87d:e14b:cea9:b998]:8333 # AS12322 -[2a01:e0a:320:39a0:325a:3aff:fe02:3180]:8333 # AS12322 -[2a01:e0a:351:9fb0:6bf2:95d6:b7bd:b846]:8333 # AS12322 -[2a01:e0a:5fa:a0a0:ca1f:66ff:fece:b8a2]:8333 # AS12322 -[2a01:e0a:83d:dd30:3676:5d8e:8a6f:115a]:8333 # AS12322 -[2a01:e0a:9e9:c240:7b44:f32a:6ec0:a8af]:8333 # AS12322 -[2a01:e0a:b5:7f50:c257:a55b:4846:97e1]:8333 # AS12322 -[2a01:e11:100c:70:cbc8:9e31:4b77:1626]:8333 # AS12322 -[2a02:1210:2cdf:4600:2bc:e03e:43e8:4718]:8333 # AS3303 -[2a02:1210:86bf:f100:a9ac:d041:1f8e:6925]:8333 # AS3303 -[2a02:1210:94c3:3400:d8c3:743c:90f6:a48a]:8333 # AS3303 -[2a02:168:2000:96::12]:8333 # AS13030 +[2a01:8740:1:753::e5cb]:8333 # AS203380 +[2a01:cb00:1428:ea00:56bf:64ff:fe1e:3403]:8333 # AS3215 +[2a01:e0a:165:5d70:92e6:baff:fe9f:98b]:8333 # AS12322 +[2a01:e0a:316:d560:be24:11ff:fe28:5390]:8333 # AS12322 +[2a01:e0a:366:5920:e6b9:7aff:feea:d6c5]:8333 # AS12322 +[2a01:e0a:3bf:6aa0:1e69:7aff:fe06:a27c]:8333 # AS12322 +[2a01:e0a:57b:a0:7039:12e3:6547:2849]:8333 # AS12322 +[2a01:e0a:83d:dd30:246a:4af7:53f4:8d65]:8333 # AS12322 +[2a01:e0a:9a1:f240:f223:e414:342a:3263]:8333 # AS12322 +[2a01:e0a:b73:bcf0:803a:3a03:8f6b:a726]:8333 # AS12322 +[2a01:e0a:d:1840:59ee:9933:1350:59df]:8333 # AS12322 +[2a01:e0a:df:b9a0:b62e:99ff:fece:1395]:8333 # AS12322 +[2a01:e11:100c:70:39f3:e3c9:832f:37a]:8333 # AS29447 +[2a01:e11:1404:7870:d2:303d:bafd:c6e]:8333 # AS29447 +[2a02:1210:4aba:e800:21ec:346:a29f:90be]:8333 # AS3303 +[2a02:1210:60e0:800:8d6e:134d:a0ca:ef24]:8333 # AS3303 +[2a02:13b8:f000:101::a]:8333 # AS15614 +[2a02:168:2000:97::26]:8333 # AS13030 +[2a02:168:420b:7::7]:8333 # AS13030 [2a02:168:420b:a::20]:8333 # AS13030 -[2a02:168:676e:0:e65f:1ff:fe09:3591]:8333 # AS13030 -[2a02:1748:f39f:5872:216:3eff:fe21:266]:8333 # AS51184 -[2a02:180:1:1::517:10b6]:8333 # AS35366 -[2a02:2780:9000:70::7]:8333 # AS35434 +[2a02:168:62a7::b1c]:8333 # AS13030 +[2a02:168:66c1:0:3f6b:3380:5c04:41f5]:8333 # AS13030 +[2a02:168:b5cf:4::]:8333 # AS13030 +[2a02:1748:f7df:95b1:96c6:91ff:fe1d:e0b6]:8333 # AS51184 +[2a02:1748:fafe:d081:add:f1d7:6345:374c]:8333 # AS51184 +[2a02:180:6:1::3e]:8333 # AS35366 +[2a02:21b4:2089:9100:c7f8:bc95:5df1:cc2f]:8333 # AS57370 +[2a02:22a0:bbb3:dc10:50e1:57ff:fe70:9492]:8333 # AS28685 +[2a02:247a:215:3e00::1]:8333 # AS8560 +[2a02:247a:22d:c000:1::1]:8333 # AS8560 +[2a02:247a:243:7b00::1]:8333 # AS8560 [2a02:2780:9000:70::f]:8333 # AS35434 [2a02:2780::e01a]:8333 # AS35434 -[2a02:2f05:6008:ce00::1]:8333 # AS48571 +[2a02:2f0a:1022:4c00:d112:9624:fbb1:6e38]:8333 # AS8708 +[2a02:3102:4d5c:f000:dea6:32ff:febb:b9cb]:8333 # AS6805 [2a02:390:9000:0:aaa1:59ff:fe43:b57b]:8333 # AS12496 -[2a02:578:85ce:1600:1e1b:dff:fee3:774b]:8333 # AS9031 +[2a02:6ea0:d14a::a921:e257]:8333 # AS60068 [2a02:768:f92b:db46:5e46:772b:71d:29b7]:8333 # AS44489 -[2a02:7a01::91:228:45:130]:8333 # AS16019 -[2a02:7b40:50d0:e386::1]:8333 # AS62282 -[2a02:7b40:50d1:e35b::1]:8333 # AS62282 -[2a02:7b40:5928:89::1]:8333 # AS62282 -[2a02:7b40:b945:344d::1]:8333 # AS62282 +[2a02:7a01::91:228:45:130]:8333 # AS197895 +[2a02:7b40:50d1:e77e::1]:8333 # AS62282 +[2a02:7b40:b0df:8f88::1]:8333 # AS62282 +[2a02:7b40:b945:3599::1]:8333 # AS62282 [2a02:7b40:d418:6d9a::1]:8333 # AS62282 -[2a02:8070:b84:6ae0:f9c6:fbb9:1c41:81aa]:8333 # AS51185 -[2a02:8070:f186:38e0::d5a6]:8333 # AS51185 -[2a02:8084:103:6810:1e69:7aff:fea2:1acc]:8333 # AS6830 -[2a02:8308:8081:f300:3b8:7ec0:2837:1b57]:8333 # AS16019 +[2a02:7b40:d418:6dfe::1]:8333 # AS62282 +[2a02:8108:8126:4f00::2000]:8333 # AS3209 +[2a02:8108:8a8a:8a00:42:acff:fe10:6402]:8333 # AS3209 +[2a02:8108:8ab2:400:d250:99ff:fe9e:792a]:8333 # AS3209 +[2a02:810b:1800:3400:1616:fdd9:da09:e7fb]:8333 # AS3209 +[2a02:8308:8188:5100:ab4b:4802:166:fa84]:8333 # AS16019 [2a02:8388:e302:7980:6f85:a0b3:4b4d:8b0f]:8333 # AS8412 [2a02:8388:e5c3:4a80:201:2eff:fe82:b3cc]:8333 # AS8412 -[2a02:842a:1df:8a01:1e1b:dff:fe0b:236d]:8333 # AS15557 -[2a02:a210:28be:5f80::111]:8333 # AS6830 -[2a02:a44b:5cf9:1:b62e:99ff:fe49:d492]:8333 # AS1136 -[2a02:a44d:14d6:1:2c0:8ff:fe8f:b3b2]:8333 # AS1136 +[2a02:908:1a76:7900:7a01:da0c:ee2f:f04b]:8333 # AS3209 +[2a02:908:c200:6d00:caad:5e32:35e7:3157]:8333 # AS3209 +[2a02:a213:273d:8b00:596e:701f:1a74:6857]:8333 # AS33915 +[2a02:a313:21db:6780::5c25]:8333 # AS6830 [2a02:a45a:94cd:f00d::1]:8333 # AS1136 -[2a02:a45f:3b9d:31::199]:8333 # AS1136 -[2a02:a464:3d6b::1:2]:8333 # AS1136 -[2a02:a46c:7f8e:1:35bf:3aeb:137c:1d35]:8333 # AS1136 -[2a02:a46d:36f:1:20d:b9ff:fe4e:6398]:8333 # AS1136 -[2a02:c205:2021:4216::1]:8333 # AS51167 +[2a02:a461:40f8:2:cb28:93e5:28ab:6c55]:8333 # AS1136 +[2a02:a465:80f4:1:f369:4ef5:aa12:7566]:8333 # AS1136 +[2a02:a469:3eda:1:7e83:34ff:feb6:13f2]:8333 # AS1136 +[2a02:ab88:20b:ce00:223:24ff:fe56:6202]:8333 # AS21334 +[2a02:ab8:201:403::126]:8333 # AS48943 +[2a02:ab8:201:403:b87a:46a1:aece:21ed]:8333 # AS48943 [2a02:c206:2044:9826::1]:8333 # AS51167 -[2a02:c206:2075:3351::1]:8333 # AS51167 -[2a02:c207:0:3829::1]:8333 # AS51167 -[2a02:c207:2014:4199::1]:8333 # AS51167 -[2a02:c207:2014:8757::1]:8333 # AS51167 -[2a02:c207:2026:6682::1]:8333 # AS51167 -[2a02:c207:2034:7358::1]:8333 # AS51167 -[2a02:c207:3002:7468::1]:8333 # AS51167 -[2a02:c207:3008:4592::1]:8333 # AS51167 -[2a02:cb43:4000::178]:8333 # AS33891 +[2a02:c206:2129:6277::1]:8333 # AS51167 +[2a02:c206:2172:2852::1]:8333 # AS51167 +[2a02:c206:2179:6690::1]:8333 # AS51167 +[2a02:c206:2222:6547::1]:8333 # AS51167 +[2a02:c206:3013:5531::1]:8333 # AS51167 +[2a02:c206:3015:9030::1]:8333 # AS51167 +[2a02:c207:2043:5542::1]:8333 # AS51167 +[2a02:cb43:4000::178]:8333 # AS20546 [2a02:e5e:1:10::27]:8333 # AS25057 [2a02:e98:20:1504::1]:8333 # AS24641 -[2a03:4000:28:68:7411:53ff:fe4c:21d]:8333 # AS47147 -[2a03:4000:65:fdc:3462:66ff:fe05:ec5c]:8333 # AS47147 -[2a03:6000:870:0:46:23:87:218]:8333 # AS51088 +[2a03:1ac0:2e92:e7bb:4fa4:3148:829e:ca00]:8333 # AS12768 +[2a03:4000:21:251:28cf:6cff:fe9a:8efb]:8333 # AS197540 +[2a03:4000:2a:9f:a474:d5ff:feb2:3f72]:8333 # AS197540 +[2a03:4000:4d:f1:b4a7:38ff:fe8e:fd75]:8333 # AS197540 +[2a03:4000:5f:cfc:14c3:eff:feb5:1c1a]:8333 # AS197540 +[2a03:4000:63:dc7:d418:2dff:fef3:94d9]:8333 # AS197540 +[2a03:4000:6:3044:481:f8ff:fe11:f7fa]:8333 # AS197540 +[2a03:4000:6:e161:d844:adff:fe11:3f2]:8333 # AS197540 +[2a03:4000:6a:2b3:d88a:d2ff:fe23:ac21]:8333 # AS197540 +[2a03:4000:6b:c6:24e9:1dff:fefc:87d4]:8333 # AS197540 +[2a03:4000:9:7d9:c88f:1dff:fe4e:44d]:8333 # AS197540 +[2a03:6000:870:0:46:23:87:218]:8333 # AS60131 +[2a03:6f01:1:2::8c2e]:8333 # AS9123 [2a03:94e0:ffff:185:243:218:0:19]:8333 # AS56655 -[2a03:b0c0:1:e0::397:6001]:8333 # AS14061 -[2a03:b0c0:1:e0::794:9001]:8333 # AS14061 -[2a03:b0c0:2:f0::288:c001]:8333 # AS14061 -[2a03:b0c0:2:f0::30c:1]:8333 # AS14061 -[2a03:b0c0:3:d0::e3b:5001]:8333 # AS14061 -[2a03:cfc0:8000:7::5fd6:3557]:8333 # AS201814 -[2a04:2180:dc05:2::3b]:8333 # AS61272 -[2a04:2180:ffff:fffe::d]:8333 # AS61272 -[2a04:52c0:103:c455::1]:8333 # AS60404 -[2a04:bc40:1dc3:8d::2:1001]:8333 # AS35277 -[2a05:3580:dc0b:1600:def4:5a62:de42:324a]:8333 # AS20764 -[2a05:d014:a55:4000:8dde:69f:4ac7:b26]:8333 # AS16509 -[2a05:d016:98f:5201:6be0:a4de:80c7:32d5]:8333 # AS16509 -[2a05:d018:a75:6c03:75b:2c73:8caa:414b]:8333 # AS16509 -[2a05:f480:1800:697:5400:2ff:feb6:c36d]:8333 # AS20473 -[2a06:e040:7603:2918:c6ef:464e:9fe5:73ec]:8333 # AS198507 -[2a07:abc4::89:234:180:194]:8333 # AS62000 -[2a07:d884::127e]:8333 # AS6762 -[2a09:2681:1010:10::5]:8333 # AS61282 -[2a09:2681:102::210]:8333 # AS61282 +[2a03:b0c0:2:d0::df0:d001]:8333 # AS14061 +[2a03:b0c0:2:f0::1bed:9001]:8333 # AS14061 +[2a03:b0c0:3:f0::2cc5:3001]:8333 # AS14061 +[2a03:cfc0:8000:2a::9532:650b]:8333 # AS201814 +[2a03:cfc0:8000:2a::9532:6514]:8333 # AS201814 +[2a03:cfc0:8000:2a::9532:6521]:8333 # AS201814 +[2a03:cfc0:8000:2a::9532:6523]:8333 # AS201814 +[2a03:e2c0:4f9d:5555:29d6:7012:676d:1de]:8333 # AS205125 +[2a03:ec0:0:928::701:701]:8333 # AS199669 +[2a04:52c0:102:2219::1]:8333 # AS60404 +[2a04:52c0:102:49af::1]:8333 # AS60404 +[2a04:52c0:104:160c::1]:8333 # AS60404 +[2a04:9740:115:6e00:3e87:b950:5382:7ec]:8333 # AS196954 +[2a05:3580:d101:3700::]:8333 # AS35807 +[2a05:3580:dc0b:1600:9a5:3d0e:ed14:79ce]:8333 # AS35807 +[2a05:4cc0:0:321::2]:8333 # AS8772 +[2a05:6d40:b94e:d100:230:48ff:fedf:1432]:8333 # AS202128 +[2a05:d014:a55:4000:7705:3a9c:bd4f:aa38]:8333 # AS16509 +[2a05:d016:98f:5200:2110:bfc6:f5c:5009]:8333 # AS16509 +[2a05:d016:98f:5200:6ea8:d9cb:7cc8:17e6]:8333 # AS16509 +[2a05:d016:98f:5200:c7d5:4f51:fd31:d4f4]:8333 # AS16509 +[2a05:d01a:b7b:3c00:659c:239d:953b:23a8]:8333 # AS16509 +[2a05:d01a:b7b:3c00:766c:dbd4:f5be:2d61]:8333 # AS16509 +[2a05:d01c:672:9200:b4e5:d5f6:f633:a59a]:8333 # AS16509 +[2a05:f480:2c00:100c:5400:4ff:fed7:dead]:8333 # AS20473 +[2a05:f480:3000:2b4e:5400:4ff:fed7:4206]:8333 # AS20473 +[2a06:dd00:10:0:225:90ff:fe33:56e8]:8333 # AS56694 +[2a06:dd01::36:0:0:1]:8333 # AS42474 +[2a06:e881:3408:2::2]:8333 # AS205165 +[2a07:7200:ffff:0:3016:d5ff:fe5e:1114]:8333 # AS34197 +[2a07:7200:ffff:0:60d1:eff:fe09:3886]:8333 # AS34197 +[2a07:7200:ffff:0:c43e:80ff:fe3c:e0cd]:8333 # AS34197 +[2a07:7200:ffff:0:f4d3:aff:febe:ad99]:8333 # AS34197 +[2a07:9a07:3::2:1]:8333 # AS202605 +[2a07:b242:1000:1300:f250:8f0a:cdba:4d76]:8333 # AS202618 +[2a07:d884::127e]:8333 # AS23959 +[2a09:2681:1001::23]:8333 # AS61282 +[2a0a:4580:101d::1]:8333 # AS29670 +[2a0a:4cc0:0:21b1:400:e0ff:fe79:9797]:8333 # AS42473 +[2a0a:4cc0:1:1174:98f6:3cff:fe03:c19c]:8333 # AS42473 +[2a0a:a504:117:bf00:661a:85b2:5f5d:8738]:8333 # AS210619 +[2a0a:ef40:e51:d001:9d3d:f687:b0dd:3131]:8333 # AS5378 +[2a0b:3202:a:108::142]:8333 # AS201080 +[2a0b:4880::266e:96ff:fedb:7cdc]:8333 # AS48614 [2a0b:f300:2:6::2]:8333 # AS62240 -[2a0d:8340:24::2]:8333 # AS50113 -[2a0e:8f02:21d1:144::101]:8333 # AS20473 -[2a0e:b780::55d1:f05b]:8333 # AS205581 +[2a0b:f4c0:c1:920e:b25a:daff:fe87:77b4]:8333 # AS205100 +[2a0c:5a87:9206:2e00:6ebf:b5ff:fe02:cb4f]:8333 # AS57269 +[2a0c:b641:6f0:193::]:8333 # AS214379 +[2a0d:3002:2100:a001:4::]:8333 # AS205544 +[2a0d:3344:1d2:9100:428d:5cff:fe5f:902d]:8333 # AS14593 +[2a0e:8086:0:3ce:6972:c5a6:f5ab:c78d]:8333 # AS50340 +[2a0e:8f02:21d1:144::101]:8333 # AS203528 +[2a0e:cb01:63:d5ad:69:69:69:69]:8333 # AS60377 +[2a0e:e701:103e::4]:8333 # AS2027 +[2a0f:b780:300:1::2]:8333 # AS49095 [2a10:3781:2c19::1]:8333 # AS206238 -[2a10:d200:1:33:a6bf:1ff:fe6a:46a9]:8333 # AS212323 -[2a12:8e40:5668:e40a::1]:8333 # AS34465 -[2a12:8e40:5668:e40b::1]:8333 # AS34465 -[2a12:8e40:5668:e40c::1]:8333 # AS34465 -[2a12:8e40:5668:e40d::1]:8333 # AS34465 -[2a12:8e40:5668:e40e::1]:8333 # AS34465 -[2a12:8e40:5668:e40f::1]:8333 # AS34465 -[2a12:8e40:5668:e410::1]:8333 # AS34465 -[2a12:8e40:5668:e411::1]:8333 # AS34465 -[2a12:8e40:5668:e412::1]:8333 # AS34465 -[2a12:8e40:5668:e417::1]:8333 # AS34465 -[2c0f:f8f0:da51:0:3a45:fc57:5e30:2593]:8333 # AS30844 - -# manually updated 2023-04 for minimal torv3 bootstrap support - -2bqghnldu6mcug4pikzprwhtjjnsyederctvci6klcwzepnjd46ikjyd.onion:8333 -4lr3w2iyyl5u5l6tosizclykf5v3smqroqdn2i4h3kq6pfbbjb2xytad.onion:8333 -5g72ppm3krkorsfopcm2bi7wlv4ohhs4u4mlseymasn7g7zhdcyjpfid.onion:8333 -5sbmcl4m5api5tqafi4gcckrn3y52sz5mskxf3t6iw4bp7erwiptrgqd.onion:8333 -776aegl7tfhg6oiqqy76jnwrwbvcytsx2qegcgh2mjqujll4376ohlid.onion:8333 -77mdte42srl42shdh2mhtjr7nf7dmedqrw6bkcdekhdvmnld6ojyyiad.onion:8333 -azbpsh4arqlm6442wfimy7qr65bmha2zhgjg7wbaji6vvaug53hur2qd.onion:8333 -b64xcbleqmwgq2u46bh4hegnlrzzvxntyzbmucn3zt7cssm7y4ubv3id.onion:8333 -bsqbtcparrfihlwolt4xgjbf4cgqckvrvsfyvy6vhiqrnh4w6ghixoid.onion:8333 -bsqbtctulf2g4jtjsdfgl2ed7qs6zz5wqx27qnyiik7laockryvszqqd.onion:8333 -cwi3ekrwhig47dhhzfenr5hbvckj7fzaojygvazi2lucsenwbzwoyiqd.onion:8333 -devinbtcmwkuitvxl3tfi5of4zau46ymeannkjv6fpnylkgf3q5fa3id.onion:8333 -devinbtctu7uctl7hly2juu3thbgeivfnvw3ckj3phy6nyvpnx66yeyd.onion:8333 -devinbtcyk643iruzfpaxw3on2jket7rbjmwygm42dmdyub3ietrbmid.onion:8333 -dtql5vci4iaml4anmueftqr7bfgzqlauzfy4rc2tfgulldd3ekyijjyd.onion:8333 -emzybtc25oddoa2prol2znpz2axnrg6k77xwgirmhv7igoiucddsxiad.onion:8333 -emzybtc3ewh7zihpkdvuwlgxrhzcxy2p5fvjggp7ngjbxcytxvt4rjid.onion:8333 -emzybtc454ewbviqnmgtgx3rgublsgkk23r4onbhidcv36wremue4kqd.onion:8333 -emzybtc5bnpb2o6gh54oquiox54o4r7yn4a2wiiwzrjonlouaibm2zid.onion:8333 -fpz6r5ppsakkwypjcglz6gcnwt7ytfhxskkfhzu62tnylcknh3eq6pad.onion:8333 -hanvo3hzqbhcqm5vahhi5a3czxxdwc7vt56p5gr7bifcvelaqurv6iid.onion:8333 -hz7oqntvj4adrwtqappcgaxfribg5u4rvfkpwlo3xup5fcuyvylkxlqd.onion:8333 -ityrxhidvjnjnf6imzyuqqnkkwridjnebkbokx25so3suq3fzezmksid.onion:8333 -jto2jfbsxhb6yvhcrrjddrgbakte6tgsy3c3z3prss64gndgvovvosyd.onion:8333 -k7nb3r7hxi5exvr4xmvnilhfw6hei7sw4rwz2t6onh4py6wbora6tuyd.onion:8333 -kpgvmscirrdqpekbqjsvw5teanhatztpp2gl6eee4zkowvwfxwenqaid.onion:8333 -l7kw3vjs4cf5mnuejjgqcxrw6wwsjmabllq3h3amy4f5q33d6cgo2kyd.onion:8333 -m7cbpjolo662uel7rpaid46as2otcj44vvwg3gccodnvaeuwbm3anbyd.onion:8333 -mowb2qwpjgs2a6q3yj3xa7nxklfssul4w7ynonyycw3uyopfu3x6ujad.onion:8333 -mwmfluek4au6mxxpw6fy7sjhkm65bdfc7izc7lpz3trewfdghyrzsbid.onion:8333 -rfqmn3qe36uaptkxhdvi74p4hyrzhir6vhmzb2hqryxodig4gue2zbyd.onion:8333 -rsgwtnousfc7zyg4qsm3gvczjx7cihh2njyjbjl3qvcj3xg7wmvhddqd.onion:8333 -s2d52bbttuwcl3pdrwzhxpmhtxn3jg23havjqg5eygwhtiw6lgyelpqd.onion:8333 -upvthy74hgvgbqi6w3zd2mlchoi5tvvw7b5hpmmhcddd5fnnwrixneid.onion:8333 -who3qs4eqlqzoxhqqgan4mg54ua5uz3mk4lj33ag53ei4orvnznrjbad.onion:8333 -wizbit5555bsslwv4ctronnsgk5vh2w2pdx7v7eyuivlyuoteejk7lid.onion:8333 -yrmedr35tt4wqfnwgilltxh5bnukeukxjpgg3jzmmsyld5lgsn5amvyd.onion:8333 - -# manually updated 2023-04 for minimal i2p bootstrap support -255fhcp6ajvftnyo7bwz3an3t4a4brhopm3bamyh2iu5r3gnr2rq.b32.i2p:0 -27yrtht5b5bzom2w5ajb27najuqvuydtzb7bavlak25wkufec5mq.b32.i2p:0 -3gocb7wc4zvbmmebktet7gujccuux4ifk3kqilnxnj5wpdpqx2hq.b32.i2p:0 -4fcc23wt3hyjk3csfzcdyjz5pcwg5dzhdqgma6bch2qyiakcbboa.b32.i2p:0 -4osyqeknhx5qf3a73jeimexwclmt42cju6xdp7icja4ixxguu2hq.b32.i2p:0 -4umsi4nlmgyp4rckosg4vegd2ysljvid47zu7pqsollkaszcbpqq.b32.i2p:0 -6j2ezegd3e2e2x3o3pox335f5vxfthrrigkdrbgfbdjchm5h4awa.b32.i2p:0 -6n36ljyr55szci5ygidmxqer64qr24f4qmnymnbvgehz7qinxnla.b32.i2p:0 -72yjs6mvlby3ky6mgpvvlemmwq5pfcznrzd34jkhclgrishqdxva.b32.i2p:0 -a5qsnv3maw77mlmmzlcglu6twje6ttctd3fhpbfwcbpmewx6fczq.b32.i2p:0 -aovep2pco7v2k4rheofrgytbgk23eg22dczpsjqgqtxcqqvmxk6a.b32.i2p:0 -bitcoi656nll5hu6u7ddzrmzysdtwtnzcnrjd4rfdqbeey7dmn5a.b32.i2p:0 -brifkruhlkgrj65hffybrjrjqcgdgqs2r7siizb5b2232nruik3a.b32.i2p:0 -c4gfnttsuwqomiygupdqqqyy5y5emnk5c73hrfvatri67prd7vyq.b32.i2p:0 -day3hgxyrtwjslt54sikevbhxxs4qzo7d6vi72ipmscqtq3qmijq.b32.i2p:0 -du5kydummi23bjfp6bd7owsvrijgt7zhvxmz5h5f5spcioeoetwq.b32.i2p:0 -e55k6wu46rzp4pg5pk5npgbr3zz45bc3ihtzu2xcye5vwnzdy7pq.b32.i2p:0 -eciohu5nq7vsvwjjc52epskuk75d24iccgzmhbzrwonw6lx4gdva.b32.i2p:0 -ejlnngarmhqvune74ko7kk55xtgbz5i5ncs4vmnvjpy3l7y63xaa.b32.i2p:0 -fhzlp3xroabohnmjonu5iqazwhlbbwh5cpujvw2azcu3srqdceja.b32.i2p:0 -fx6np3oheacr3t7gluftrqo2qxldbbatgw4hepp7ulb4j5ry57ca.b32.i2p:0 -gehtac45oaghz54ypyopim64mql7oad2bqclla74l6tfeolzmodq.b32.i2p:0 -hhfi4yqkg2twqiwezrfksftjjofbyx3ojkmlnfmcwntgnrjjhkya.b32.i2p:0 -jz3s4eurm5vzjresf4mwo7oni4bk36daolwxh4iqtewakylgkxmq.b32.i2p:0 -liu75cvktv4icbctg72w7nxbk4eibt7wamizfdii4omz7gcke5vq.b32.i2p:0 -lrah7acdsgopybg43shadwwiv6igezaw64i6jb5muqdg7dmhj3la.b32.i2p:0 -lzuu6mjtu7vd55d2biphicihufipoa7vyym6xfnkmmlra3tiziia.b32.i2p:0 -m6bpynxkv2ktwxkg6p2gyudjfhdupb6kuzabeqdnckkdkf4kxjla.b32.i2p:0 -m6v454xd6p3bt5swujgmveklsp7lzbkqlqqfc2p36cjlwv5dbucq.b32.i2p:0 -mlgeizrroynuhpxbzeosajt5u4ddcvynxfmcbm6kwjpaufilxigq.b32.i2p:0 -o6t4fr5ayfadzieutstgwcllvwxeuzjlxmzsmpj3hpkvefhzfaea.b32.i2p:0 -ofubxr2ir7u2guzjwyrvujicivzmvinwa36nuzlrg7tnsmebal7a.b32.i2p:0 -oz2ia3flpm3du2tyusulrn7h7e2eo3juzkrmn34bvnrlcrugv7ia.b32.i2p:0 -pohfcrfc7prn4bvn4xstw6nt3e7hjmb7kuj4djtsfqsskwhmhnna.b32.i2p:0 -qd6jlsevsexww3wefpqs7iglxb3f63y4e6ydulfzrvwflpicmdqa.b32.i2p:0 -rfjkzdzv4cwpxo6hzuncicvuyui76wxqx3a23lynq72ktwqs7aja.b32.i2p:0 -rizfinyses2r3or4iubs5wx66gdy6mpf73w7uobfacm2l5cral3q.b32.i2p:0 -sedndhv5vpcgdmykyi5st4yqhdxl3hpdtglta4do435wupahhx6q.b32.i2p:0 -tugq6wa2ls2bv27pr2iy3da3k5ow3fzefbcvjcr22uc7w5vmevja.b32.i2p:0 -usztavbib756k5vqggzgkyswoj6mttihjvp3c2pa642t2mb4pvsa.b32.i2p:0 -vgu6llqbyjphml25umd5ztvyxrxuplz2g74fzbx75g3kkaetoyiq.b32.i2p:0 -wjrul5jwwb4vqdmkkrjbmly7osj6amecdpsac5xvaoqrti4nb3ha.b32.i2p:0 -wwbw7nqr3ahkqv62cuqfwgtneekvvpnuc4i4f6yo7tpoqjswvcwa.b32.i2p:0 -xfkarmvk43vfkfvhkehy7ioj2b6wtfdlezvmlakblz3q4r7mccfq.b32.i2p:0 -yc4xwin5ujenvcr6ynwkz7lnmmq3nmzxvfguele6ovqqpxgjvonq.b32.i2p:0 -zdoabsg7ugzothyawodjhq54nvlofa746rxfkxpnjzj6nukmha6a.b32.i2p:0 -zsxwyo6qcn3chqzwxnseusqgsnuw3maqnztkiypyfxtya4snkoka.b32.i2p:0 -zysrlpii5ftrzivfcyhdrwpeyyqddbrdefnfu5q6otk5gtugmh2a.b32.i2p:0 - -# manually updated 2023-04 for minimal cjdns bootstrap support -[fc32:17ea:e415:c3bf:9808:149d:b5a2:c9aa]:8333 -[fcc7:be49:ccd1:dc91:3125:f0da:457d:8ce]:8333 -[fcdc:73ae:b1a9:1bf8:d4c2:811:a4c7:c34e]:8333 +[2a10:3781:3a73:25::25]:8333 # AS206238 +[2a10:3781:3a73:25:a177:ad25:b14a:176a]:8333 # AS206238 +[2a10:3781:3fff::1]:8333 # AS206238 +[2a10:3781:84b:1:8002:99d3:191f:c738]:8333 # AS206238 +[2a10:c941:100:24::2:1001]:8333 # AS35277 +[2a11:d540:531:b00b::5]:8333 # AS207586 +[2a12:8e40:5668:e40a::1]:8333 # AS45021 +[2a12:8e40:5668:e40b::1]:8333 # AS45021 +[2a12:8e40:5668:e40f::1]:8333 # AS45021 +[2a12:8e40:5668:e410::1]:8333 # AS45021 +[2a12:8e40:5668:e412::1]:8333 # AS45021 +[2a12:8e40:5668:e418::1]:8333 # AS45021 +[2a12:8e40:5668:e41a::1]:8333 # AS45021 +[2a12:8e40:5668:e41d::1]:8333 # AS45021 +[2a12:8e40:5668:e41e::1]:8333 # AS45021 +[2a12:8e40:5668:e420::1]:8333 # AS45021 +[2c0f:2a80:2540:1ac4:73f0:cfa4:1821:d1bd]:8333 # AS14593 +[2c0f:fb18:402:5::3]:8333 # AS37199 +2aiycr24bdfx5s6yj4i2n2xbnha6rjn3pc23i4rbrwo5ays653xzygad.onion:8333 +2bj3dc3e6dh4f7fd5uta3qp32bbqxzyqjs7ixy4lwdkx3n5jisfc7uid.onion:8333 +2bpccmeaduwlo4t52pangngxdxp235teqe2cflkdwjcwjvyl5f63m4id.onion:8333 +2byffyqnely7vwuncdvodoo3ip6jdi2b32bxjtnlwcdurjipsxdktqid.onion:8333 +2d7uxq7ylxssdgonks6burn4lwcyiogrp4qkaxk5djbs52l3bvgxzuid.onion:8333 +2f2rq7wy2sm77re4diudcsrfzb7bje3rl52zkhkpr7k22je542r5mcid.onion:8333 +2ga7wdrdxpmuto3qprdabf7urx4rzr2ivwku3ee5ufit56qsqoi5vjid.onion:8333 +2hbr4fvgnvmesbsevctosba2fu5mx5ckbibhjphi4oxjlgowmcsqz6yd.onion:8333 +2jclw2ujx5qt6miolhjxfrxbrltr7vcw5zyctuhyofc366upqksvxhqd.onion:8333 +2kpblheyfrv5hxt7ird4r6fi7albfmyopcwk2eljmyzhqp3rfoodtwqd.onion:8333 +2tvfkr74olmbaqjsngyp442bvqgi6iqu6mmikrgf7bu6mmedkxdiveqd.onion:8333 +2v6izgcdz4lmmbw3wj6jzn7srwjlbxsf5czwew53qm677kc3rwilexqd.onion:8333 +36ps7lbzekepdlhmmyzfuajltjxljjaltkcdkwr44a7df5sl2sxokjad.onion:8333 +3747dbbz7ewdraacetcxl65fk5lqvcsf2ix4wndstbmx4k7rnfxidoad.onion:8333 +37gfddnf4zfnvfpbgebqq4i2v76lrtw3kf7xba5dymcwtxqunx36eqid.onion:8333 +37tyqqa4m4lkilvtcl6d2sedpxthemknrkriivmig47uv3ojql37nqyd.onion:8333 +3agbdvmp4iyo4rpdygeedidpbon5txv4efo2xxvqbzr22puwtjywtqid.onion:8333 +3alygctgneenzovtwcxz7ykn2i735yqro6d2sflkijdvnanots6vz5ad.onion:8333 +3daur2nkfusuli6utbrizb3gwcimduu4wch5iozzoros7wcvypjledqd.onion:8333 +3dp4nrdk4vvivichtplza4d6gtt5v3c5phwxihyh5gcqzhxlqa3jsxqd.onion:8333 +3efpmp6aeatzis3vyrw32fv6nwffcql43e4wkquifgt3eldw4qer6gid.onion:8333 +3erp3rwr5psstk5ruc7oau4boat6ey4vtqyrpy5dbagg7wnzqszgfkid.onion:8333 +3fivvsg6ccrbjx5nopgy7ryqvdvjjn6eqen4qosd6ghvj743camgemid.onion:8333 +3hu7ofcwhxx2rinbq2bprefd2fejed53ehqa4bm3daxd2qmlfugsyjyd.onion:8333 +3jyb2gfpv4mhbzhohvyig6bi3xqlvqurzzr7xqyv5epnxeru7a4ohbqd.onion:8333 +3lqycokbjq76rx4vmhhde2lz2awrnt3c5zu5t2av3nda5amxwinu2cyd.onion:8333 +3q7iq64qokniakeumucz5pgmrndtqixvdx5uto7svkcguabxbku56mid.onion:8333 +3v7wckih3yvx7monqrg7udkrqxrsvzpd3wry7kq66zgedezph2iozbqd.onion:8333 +3vcobxubomismocgkyhjl34nu5mt3ruzy2byrtf3q7pdn5zlommgwiid.onion:8333 +3walt7bg6swhhewgtd56lv3beglutkfkp7gxq7nj74emzu4wr7bxsyyd.onion:8333 +3xu65qtcywnuz63viyi2wuih3o7fb27bwo3uu2klaoj5b56prmegyvid.onion:8333 +3zfpnxo5n636stb22b7xaxb7qtmvjldqcnjdr5hemh3aljm4amlal2qd.onion:8333 +43syalmelgy76zzyoiamtmagfq2woaicmqyon42fno4lhm4vopja7qid.onion:8333 +44lptd6pipnpn3xfmzj54kyqvzuwv45fhiaiywijpshrtk3hlgedieyd.onion:8333 +45py5s2panediepr3aftali4tjsyfyu6y7ykzkadl2sqwtptxtkml6id.onion:8333 +46h53i2fa4ysbtngmxk2oegqfpool3a7glcps5ef5o4webpuq4ukmgid.onion:8333 +46xek5lgozwwt4ij7ymvbogulimsd6kan6yd23fwgd65kor7jio7cdad.onion:8333 +4a3vkisqwv6v46xsbv6rnr34zfph2tfvvtgmlzbymtru2ijv666augid.onion:8333 +4bxdjq6ixzcey3io6jhuapkwlfbcpfeesfmtcy4qb3bf7dlwbzktnxad.onion:8333 +4c5rrmtci7bg7ydyfh5shzvufy3c7prx5ryezc7cnx2jy7vsbhevnsyd.onion:8333 +4flszdgtvl7jlu2jioofb7wgmtbxwhqcmkhu522wphsdvr64yz67umyd.onion:8333 +4gggjxzg6do2ija6mjflubduvv3iqfmkdy4b7vw6tl3k7g7oa5msdlid.onion:8333 +4juzngo2n5fbxlqcfpcnstl3pexuzwtxocfutn3vtyhxtaztaa7axbyd.onion:8333 +4kle6afrjdhu6mranj33n2xw4aj3iqnysqmsc5letdhkthxyf5n35jyd.onion:8333 +4niu7lryc4pqoqvosaxt3bzmq7ulku2vevqxizzkstyisi772apsvjqd.onion:8333 +4nlcxxoygmvjbuqge3y2yhvk5c2525qwdnswhgpxrercggcb2pxy3cid.onion:8333 +4np5xojfk2ventfumyep7azy4rzu3inmpsre7vabfi66n2mgspcinxad.onion:8333 +4p5uvmwkpwu6wf373x4mg6zgwodrzytkd5nbsawc27gf6bhbtsh4b5qd.onion:8333 +4phsfbspp7cr7kzd7wapmgz3zxzobih46rw2a5v6qa4m6rdlphl4wrad.onion:8333 +4s3utndbk43f3npxvvgvekns25c5r3f6v5cfe7vhjso2qo2ru5wcmqqd.onion:8333 +4sijy5qfaw3sq5jku5qsufvxxconuzvdrixh64za6qzlv4l3kikaedyd.onion:8333 +4u3nymzyg52nzi2xaqws6abqgfwk6myc3pj3jr7aqtuac7cko7nr7fid.onion:8333 +4w3qj7as7qhnfuu2peyiiosgiudjc7rnptic6ynq6xp65onnbhrpd3id.onion:8333 +4x3lpzj7ptne45h5rdm5vnpyu4ch4m3u6ljd6dfialtne4cvnbhgjgyd.onion:8333 +574lyz5mrtwoewaejdzzase6iwapmvyfvrdbwn7iupcmf6wcxdorylqd.onion:8333 +5f2w5mff4ij5inqjjjmzwgrkegis4lknkbti7xrh3qg5xfps7q2lvnad.onion:8333 +5gxylibgass6p562vvpzx6zzbaxlru4r5en7ahvcu5nfigr57ytkaeyd.onion:8333 +5hdcmynihsr4r55a3gtxhz6ifmsg7quozgo4wx2bp7agcegwkj4ataid.onion:8333 +5j7z5fovfahxe3gwqt2lthhyxvotcveopld375l2k4rvqccc36lexbad.onion:8333 +5k7zlyo5qeqtbzl7khepw3pblxodcfyzvgdh25hh27bxgvauegnqq3qd.onion:8333 +5ktcl4ysombbuq7g7q6hwahdeafh6nootlpwj5yyt3bvfnizwmhrigyd.onion:8333 +5lijk4k3tzozjo62uj3heeh3nprtl5cibi3xdfp2xm4bahlboh7zjvid.onion:8333 +5mcxoegbgp7vwocusjxshwjncdcnzntzry5fwfk7v5xqylxqlpube2qd.onion:8333 +5nptruq2k5654ajq5h7f5ty3adkhs6gglkrbp6l2x2xlykpkj4cdjzyd.onion:8333 +5ntg7na72bods6fuegoymzboiufgebd4cbaztavi5xcqanohtx6kw6yd.onion:8333 +5p54wr7ppdfwjnapdylo6cysrrzd6shkzgk72y42rwt66fhbhypixjqd.onion:8333 +5piafwsopd7qywfp6gobskqtmxr4c7ndovsefuktml2xih7nnjsukzad.onion:8333 +5pn3tgpv2ldcmtrisda6okg2c3owgaoq776fzn74htqwbfcdzp23wpqd.onion:8333 +5pynehkenulugwn3dvzx7bwqfg7qplnu3vtye5mvlmxxhvkoenznk4ad.onion:8333 +5q7px73cw6egdz622ly524udqwiewdajvpkklrd2gji2uvyrccujvjid.onion:8333 +63en4ruxj3tfgm3ooyrli5ujhai4eygr5mncq7jvbqf7c5vqusrywayd.onion:8333 +65qyyjh7muzlq3poxjwxb43dvuxoulpo57z7rcpx57h7gfzq6gqghlad.onion:8333 +66m72tq6lbsm2y3yn3bwj2uk5ihjqvqkymf2t4pqevtnymqujwmynmid.onion:8333 +6es5e5uprvbtqiv7dxhvfaqb2zvzvvtv2h2ildvqbnikqg57py3nmkqd.onion:8333 +6f3d2ak44y6celpfy3pj22ak4ioitm4k3xfegej5mmeonm6xwg4dnvqd.onion:8333 +6f4mtuv4n5pwturdta3qruhqhuvwlzxyfxtfukydane7y6yuxklo23ad.onion:8333 +6fhojzpkw76kepjqogqf5ldmhs5avbmhrnjj4lnead3b447cgkzysbid.onion:8333 +6gpl5psk63ktxafvhi6guueyy2cgz2zuqwxckvzpi47pr2t5r7p4aqid.onion:8333 +6hg7kc6lmodjyrgq2557dauxibugbejgfynxlptacrmo2lzbcf2ylaad.onion:8333 +6jwjohqnlmk2dbz37dk2nqp3nelnd6xwrx6hjvsw72ujdcdqxsv5k3id.onion:8333 +6nwabl7vks2jieb74akgjmariirzchzeionxdwthsgjsenbfr3qgqzad.onion:8333 +6t3yyuem6d4a4cc5pparbksrjh426jpejo5jal32tcbx7zgz4achr6ad.onion:8333 +6t555fluey3jj3scizdz5fuiaseyqok4fkpm7hznvp2s4j7qjnbrzcad.onion:8333 +6t5nbr3td6jmr3aami2nrljlfpfvg25m3gbg6qcsana7r5cyug7553qd.onion:8333 +6udpyvm7hj2zgdbuga6r3cden2nwb2rokzejihn3sdpzolh3w4xwujyd.onion:8333 +6vncy3bxmb6wyiio7kxqvuoz34yityyullty2l7grqqv6qhfkkyg7mqd.onion:8333 +6vu6tncy3n4btqlizlgen67oktqwpu2qd452dvcgadbis2v7wwdrhcqd.onion:8333 +6wutlymogzxat6ltpht5wvdvujdpa5zqxpfkjfofaaesm7gfjxoabmqd.onion:8333 +6zkyfpp6el5e2ip2hlrdgzerwknqcpslkpdttiwfljcmcrtwqeticbyd.onion:8333 +6zvl2xxq5qejxblrr75jsqpvv7amdn6trvlqzapqn5nexl5x2ojefuqd.onion:8333 +766lviokylelmp3on5an3im2arnqakdj3jvw7mso6zfx47oi35l4ogid.onion:8333 +77bylqq6gq267jt4g4olprft3akdlpvztlgp7vfiw4xffrthm35x7byd.onion:8333 +7bjwdnx5umef3bchtn4coz4qawx2st4752ckrmwqr27ueg45w6mouaid.onion:8333 +7crojipnref3cqh2nguvcu6icypzpnqs7ijuybar6e454rphegmu4cyd.onion:8333 +7ecbffupljjuxl6lymosq5dv644nkxonwsnlkcglczpucp5rj5fhueqd.onion:8333 +7fbqlafzdcj3r4swjgzdi6wy23fm5iyenwgo52gz34ktg2whtremm7ad.onion:8333 +7gfywfzshst2fmwdmtjuooac4dsow5pj6rxrxohw7isklec4k75pksad.onion:8333 +7izddvivyjvdlcbccnkspcczvbupybsr72jnfcnu6saaehc6ltvtqcqd.onion:8333 +7jvf4xx3m4xxxvwwtei2abomezat4n6k7el7jq5ncot3jb6mdjvbdtid.onion:8333 +7mdm6ofk6kvgbceokc5ri53peq7o4rjgq2cv5ivzuemqgxfptzgtltyd.onion:8333 +7nitakbrzn53lgiju5eekd2b7a3txr7a4jb5c2wv3bi2rndsshoxrvid.onion:8333 +7ogrf4k24permd3plwfaeblheozyynk4rlxy4tpqvg3cvwibghppvoqd.onion:8333 +7p64efzhcxtpkbr3ji2cvhud74fremdrhgrgwkgnucn5a5mpcxxv7bad.onion:8333 +7rpbm65elgnrsavh77nhczathp2vwuik2cyrma5qby2fxft5jk77l4qd.onion:8333 +7rxvg4xgt6q6zyojbfpqecvkfpb76myiqnzndsive7uooxkk7m6jmcyd.onion:8333 +7stzoywo4sn5antnxihprap4phpsiplx4j576yneqy3nqejt62hrbhqd.onion:8333 +a63cg6bmbefpb7jckgijq3tlzzj5nvy6px2jyyvsy52gkyadwqfu5cad.onion:8333 +afgn5w7cpcb2p35a5boqbcv5c2lvxu3634tli5e5fnca3z3ay5yxtoad.onion:8333 +agpipxpyeyk2fboa6m6nvvt3m65p33hymmd3p5q3so5rccavidg4h3id.onion:8333 +aigknmwtshitht4oo7ohyixhbkvnxkwokrkz4ud76bgsipfb2tgmx5ad.onion:8333 +akufshjn2rz23kdcxeexxf7obw7vrlc6cwcobyjnelkdgyjtrcazetid.onion:8333 +ao3tuhoe7ay6cjqsibxk5jamg33ckjyutq5uspot24bdimajgkq7scid.onion:8333 +arlrtxrmw4npffxopvthsz37z3mbefc65svjk7mflxzzuprs4hc5jgqd.onion:8333 +atib3y336joeumqewfgeam6a7di3e3r6kmkmyh6ajcaktb6u7umlsaid.onion:8333 +au5ujsa3xd3tt7xttev5e7bandnio46gbdfzg7n4ad3hv7j5jkc2foad.onion:8333 +av5ezwtzojuzylip3gjhjxyzg3c5g46u7fx4dhp5o2s2j7wfwa2en2ad.onion:8333 +azpysq5tc3lnbx2rawenpjdyghi4prcvlhjdhyh6zlsrpuwlxwacktad.onion:8333 +b2fw3a52vmuu74evg5dezgfhpr4v6tnjzn7pm2ffoxpeyikceqefmiad.onion:8333 +b43cgetszokuo7sbbzwpevpeharvravm3fud7rbarm2sivll3upyekad.onion:8333 +be7bw6vrdr6ko6fbjb7a2buzibqx6thqxrv3mhqtlw3jqe7uhxrundqd.onion:8333 +bhhy5mgq57onfqtopw4kizm5rowugm37jrtfujs5avkcfafltay5huad.onion:8333 +bitcoin6twde6mauc5flogkenljfxk3bemqobjse73bf2bnfjaxnfgyd.onion:8333 +bjaqsd4v6376d2pp7ho3dmijblwipuzxbcac6aaxb7qnqxuzlsxbppyd.onion:8333 +bokoy72uqqlmltkiicvcukpi5wxeubl52aumyf4dhnacyghz53bepoqd.onion:8333 +bpi6oysws4nidjwmpadn7mtzma5jahbnhjgffcwdsjym2qq3zwhdjkad.onion:8333 +btx5ae2sxbezq6deplr74qlk7rjwu3cqnvw352huf2voqhtkqkav4jyd.onion:8333 +bumlvs3fdli4cagjnksntyxkrqz42c6tejeppz3k33yfeyw7z6m7u2id.onion:8333 +buz3ocrzjyiecbwtfpmoydn3c773jorlr37bw4kjoq6f6wpt6qn76aid.onion:8333 +bvikscuyoorgo57ifwh5jbdx3mmeyoumxtnyvjicjosce3egqegdefid.onion:8333 +bxpiyizma4j6xwg5lf7z7td3xbv7ffi4x3bntyftio3mszogl2a5v7qd.onion:8333 +byqslyvvxybu62i7w3yjh4aoim4go22g7gwdhbpcbnvyhhajrff5ktqd.onion:8333 +bz5v3ztsfl24gqxhc22x763icdrp6hbgqllx4oblnx7eduas7cdxubad.onion:8333 +bzhf6w2sajkk4lsty3hz64kygen4ty2lk4swo6fz3wzsr2uofsannpid.onion:8333 +c5gkqgv7br7xirqcpfbupyxyesx7fbif4gqr4hogirlngre46oewk4yd.onion:8333 +c6tktxgcu54pvdfw52bd6udbpydesdivyxlaveubanon3oay452r4lqd.onion:8333 +c6upbdl5ro7l4r6hqnzxy4spsye3wu2myop4ntzcw57zwjlrhzppihid.onion:8333 +c7hwtt7psq6rtcl4yfiuzkphrrjusicge7kfzs7i6bpdgpbf2as3egid.onion:8333 +chltdbogcrolm4wwhop3qizo4cxrn22wkhvgb5pcervzs3bzx7u2f7id.onion:8333 +cjm24gef2dpbnwznbv6ad5lrod4gvet4f4dm2su5vm6wpdpt2bnajryd.onion:8333 +cjzcwym4hv2ie6yhgqp5ex3hvwueoqvt2aqucvv5glodixw4ldbmtqyd.onion:8333 +cmm4777ii7j7y5ufu3k4izuhx54ldrq2lehaoaowim66tkbtkeolyhyd.onion:8333 +cmxivv7cbrdqneyxaii5bls6yvknpa7zbrridnyk3ztpwnxkjkoi5uyd.onion:8333 +cqm26nhpdlmfzpooozujsyuokqtuixjt2bdr26rdsilebntnighjliid.onion:8333 +crfh3vjreblr3tepu6lkpwkqagfom6k5gc3c2bn74atw5xiuxv53sdid.onion:8333 +cs2uedzkwwlhihdi2mm7popaiydm4wp6uwakut4or6mwjfbmrxjjrmid.onion:8333 +csjxou6mxjf2yljlg6zkqezsntvm5xzpgsg3ymnd4xhpj5zffmfip5id.onion:8333 +ctl5rsuuaakuz5zlcjpzj2y3wuba2apoasggznnrg63bqfdhjyeueoid.onion:8333 +d2klz5ggkyc6657hwi4xoyq7jbv5wj7vtlb5uqv6huihhw264esi6xqd.onion:8333 +d2lbtmbrdozfd3wsq5vbw632k6n6jjo3h45v5qigx2qcqfuclzifh6qd.onion:8333 +d4xkamq3szbc3tznyzjcdtvfbiaaq32dekaudma6dkzp2l5ogpy4uaid.onion:8333 +d6vg4wbrl2inoe6tfqf5fo4xivqoavxbzgd6qmduoap7k34hgomekiqd.onion:8333 +ddhrkj3l527e45tdqmfmm7olmisgrkisgx7243x2klax7h4jytmsjlqd.onion:8333 +dku2lusultkhvdh2nbnty7blcv3fdwqh3qblmzhydprdsnjjiwp7wpqd.onion:8333 +dnmb4ifydabk2n7dwy73xyc75mrksl6rnhidr2p7xsxgk64vcvghwxyd.onion:8333 +dnwbaxecn4xxupvtqvigoopzeys5cstvqv6u5zpfj2u37uqmq6s77kqd.onion:8333 +dwz5ycilgykv3npjcn55t5nqf6nkabtwmxqthvs3spsael2dlfrksoqd.onion:8333 +e47xwhzcnz3nakum3wbouqm2uhb6try5dn4hcdzfz65ie5kw3mnu3jqd.onion:8333 +e4khd6hsooslfwexrcwlpwba5uinfpvziv6sgigvkzymrlfzposj64id.onion:8333 +e5c2dam2twutxqsv6j2lhq5y7o7t3hcsiyfgqfe3qe73t3nhrqapddid.onion:8333 +e5ju4gc3jd2p56syoyci7etmyjg7tfbd4722nbtxr3rqhfm7eew7icyd.onion:8333 +eaertx5wvxzhlfjd3rskz2f6a3unblufagmadrtpycj3dpfrwopvs7qd.onion:8333 +eaix3x3rlogmpdnvwpwgsyj5fiuiwnsfpgxtmztacp7van64l7d4ebad.onion:8333 +eaui3zjivtoohv2hd2nupoe5ujpeksl4zvbgqxtvb3d6tbpin4tzhrid.onion:8333 +eebfo5fk3xzipldarvwyjsn2jchpl6calkine3gnvbrfyqkqndlnzhqd.onion:8333 +efvwrivcbtr7dk2vr7ofqpjerusgfxritkq4agqnsceh6qcpgjmp6cyd.onion:8333 +ehxiikephektrexse6hl3otmqgrfletdkkuop4ifufhe6sby2okkq5id.onion:8333 +eikoeq43vloeieb37nm4znqwll6kbmvuzmtdch4y2a7fw5icrrloeaid.onion:8333 +ej5sof7pylkojmz3fvmouzgzmrjkyhvvpy6lns7737djzuf77y3theyd.onion:8333 +ej6xgq5vapglcqtzf7gae6tmenhu4ve3twg4hdanbftii7k4f2x2k2ad.onion:8333 +ejmir5e6doj2k5upakum4koucthtw5dq3uledahecsdjq4bo75z3jsyd.onion:8333 +enchh7j5453cay2ygonpuot5bcikdc6flqy6mfd2wsw3z7sxv2ehouad.onion:8333 +enhp5lczc4mjig5t6hdcxkokdtzngejapxiuyw72soggajggyefn25ad.onion:8333 +eph75gzxeibberoljtyftb5jmawm7rxkvfqx2saxbu7z6eimo3xcn5ad.onion:8333 +er7exr6r5w77r4c3i5wb5r64d6wzwo2a7ndzze7ob5sgl3a5fgvlzoqd.onion:8333 +erzm3rr663nb5rjcwm4vejxhgbwt7ahkw5yywl7h7y52uyfk6p6gdqid.onion:8333 +eu5feoa7bdme6pfvcyp3rj6u4plarlpvsuzv5ux7sbd5cduygsdsyzqd.onion:8333 +evircgqqrc6vhdivhjpuathfpzmek5qp62gsf2ohoaiyeynffssdpgad.onion:8333 +evrts3xnjcmijzaokev3eiocbvqkberud7ugk5e3vgaotww2ihlxl2id.onion:8333 +f3kh5b3boak5zkwnpwyostmfxo63wna5rvmsh6r7mfdbaogeimtv2eyd.onion:8333 +fbh63e5uysamticqogfkd3f7yoo33pip2yloun7wc62zvexzoabltnad.onion:8333 +fckjnfmhw37jpevtexlcxr5v3lm43pdotlz42ajpmpu3zio6etv2qiid.onion:8333 +fdcthm6b3ltzjz7d6cvccltcwxvyoxaol3awjzghhbpotskzouuv2kqd.onion:8333 +ffycrr4d6pwyq5x4r5onwtyxtvd3iqj2mlf33srxdu6opezzpfofa2id.onion:8333 +fhh2tfv2rbqytnqprobxqp5fy6wlmfoge6punxj47k2dddpc2qgq2cqd.onion:8333 +fj4wuboarofhshcrkwqd7iponopb6wb3dn2fsmvj6finmgl6hicwpeqd.onion:8333 +fjgyfvbloy5aqcxmdtjq6qwngs42dzml7hodo5uivm4r2gji2grqpqyd.onion:8333 +fk6vmbqusfbphq6prkeugchlgssviohw6p2zki3osoc2c3jqhfx3rwad.onion:8333 +fkxtgwkswxdbmb5kmdblw4gautm7zh6mds4xyvzd3cyeygh33ggiooyd.onion:8333 +fmbxkhm3ykpjod4nnxrbk3jk4pn5bcv6ysmfaam36sepcb3vqwybfnqd.onion:8333 +fonc2zpwyprpa5i4wvcayeyezizvxom3jnbibdhs7vjg6xti7fohjkad.onion:8333 +fpt7t244pgquaqciv6s2kpm3dmifp6hajwlaenaotwpi3smuutxsaaqd.onion:8333 +fqczapitclhatilusvmsw5qkvg2nksjoju464dvrltvyqq5zy2kftsyd.onion:8333 +fqd7k2geb3klth3n3hzaywl2pc4akwkzo64vjofs5egqvq3okbrxlgid.onion:8333 +fqgtcdbevgyc2qs5lkxkxtdjkdbwbg5fpodlkx25peulsgzn7nqlxgyd.onion:8333 +frtcgu6iecmpkx5vsh3togf475oiwjlxpuh3rreetjkryh3ghahkjyid.onion:8333 +fugsghemfzgdgc7kgbs3nc5pysyicn2mqlnc6ah2uxfbls7rac3k5hid.onion:8333 +fvq4fy4ilsn2y6sktykb7qjdhpvylg2cayuhngxnyorprr4lcs7vgkqd.onion:8333 +g2b7vvsv5xf6jewazsoommk5zqbv7rlnu4m7wtvmhc76mpn7ho2ydsyd.onion:8333 +g4hhckbn3we7nkdprpb5vzdzgvrrrg7b3ubkf4t3g4c35yx5rqwrroyd.onion:8333 +g53laknf2qomk2npziez55ekrgutveojja4cdxx7bx4fqpjd5o4oahyd.onion:8333 +g65soedj325yp4y276egzf7tgexjom4diygzbmtxmlpqkunltpkb4hqd.onion:8333 +g73ujt2n2l3zbpwvcb757nalpfb5tkprqgh2m2sk3rpl7g6hjp4zu3ad.onion:8333 +gaeaun5gf5tc5dhhwp2uzs5r7zumr55jptp5gxxmcmwapnqv6rvkw2yd.onion:8333 +gbv2yflw7wyo4ivwcf5vtgjhdikewxahwpuw6zy2rykigsn4fq5shxqd.onion:8333 +gfo24oosqklizwom7nlok5i5ioi5yriqpp5vtgut3rtukndix22lsbad.onion:8333 +gfq2z63ggmeszsqpdzg5cfhsou6st3qhkj256beege6yyfodhmbc2iad.onion:8333 +gjyyjdpa6tryaikzun52iiyalsmeop7n6t5ss6aglo24it4ufbejeaqd.onion:8333 +gkxu3524ncgpml53cwdyhrxfpdyflrh2elwqmu765lccc4ckuobvmbid.onion:8333 +glhm6srmyanw4f5yjq4z5kultmpea6syepzgxtqechrn25lc3anpvlid.onion:8333 +glijfi4brh3zq2xvnzy5gaqkifoceuiyzyeyecojdlqe75nwoetcwpad.onion:8333 +gm2b3s5mqvccelokh47aypsu7wduyg3lkety6czu6k4phzfxczcoswqd.onion:8333 +gmjyc3qivk2bme4wimykhewlanx5z3sxli23nizo4kiuerptcytqsxid.onion:8333 +gmnoid5e7uhsjxw2uuwanm7k7tbyutbcpiacuxyqztqqy4onbofzuxyd.onion:8333 +goxkenocpqn3ibvslm5eccprmkcszelvpsrgrtd3fd43qr2xzl2la6id.onion:8333 +grbpww77jgvl52eyzjhrnx5dc2fqnb3dgxcm7fr6jjigc7aihvay2yqd.onion:8333 +gruccg4k5yq7wnkytjqndfbhc4pbdfiwuzlbsjwyjwzg3nfitb273lad.onion:8333 +h2jikhew7toufyhusvt33engo6bdvjdv4fvxsk7k5z7yfr6sjcb4giad.onion:8333 +h6mzk6q4mlf22npreupmfvuhukbrgsjlvrzilnuigyujmtfmi5ltiqyd.onion:8333 +h7nka6o3t7dn7mkvnhg62jfftvtsoi4f755xjheuxslklmei23fos4qd.onion:8333 +h7xyscykodwdzvyzluapacbe2dmpelmes6xjhqmbrwrza65utpyn2zid.onion:8333 +hbjqnzqygl4fdkjwyaxcizzwrnwl24dtjppy3vxqqii6ilpl3ysbtlyd.onion:8333 +hbqkqjt5y4c3sgwmg6mir2qv6z6anxrxr2riqj6x7r6jayc22gvbriid.onion:8333 +hc3ebdu3sgrqfz47yhh7gfupzgesxmdrmfcfaqr436nodujhysajapqd.onion:8333 +hc6a3ccuvdmtvgndynhzfuje2aqgpiyqzbm3s52rekbxmron6w7ckbqd.onion:8333 +hcqtdywbzpgp7hwbelbws5s3ykks6i34yu5gznitupfcli2t6og6qnad.onion:8333 +hd5rdhy2gjkjmqlxayeoqd2notpzsbf4zp3y5ndzpvimudia2zrqoqid.onion:8333 +hgk34cet3cktfevkakzwwlz4zzqcmpo75crlfmyddfr7ikg77iftmsad.onion:8333 +hj6feb7d6ovgutaflry4337kyyczirc6y67js4gn5lsdfqfbqeiodnid.onion:8333 +hjxcacppbndvot7klgy75xglwtfu2elxfwtt2esquzwsdxukklvl53yd.onion:8333 +hlcoisik6mlwnat3wbwfntkeh32yhymhq52tgo23bivrkuq2lmaqmxad.onion:8333 +hmr55kh2n4l65yrxpmje7yn6oyu3pdtutgvk6tgllkhodqxazlrmp6qd.onion:8333 +hryul5rtv327up2esowuvlip644udinwxr3f6tvo3vahffggkk3ogmqd.onion:8333 +hsce76s6kpkzlnechwpoiudlyygbr4s2ct3hcxi4icgiwk7kehwz6bad.onion:8333 +hujowynr3flk2zadfx2jbka42is7rsguxmp5npiaqpngpabvrakthrid.onion:8333 +hvwiqbxy5rfxvmq65dd4baitrt7e62a72so4myiacur2tirwavk4eaad.onion:8333 +hyddoxcoyckwa6lloendglu7rvlvwph4gf4xxgteb2hbmbfvk7zlabid.onion:8333 +hyiqykrejh2m5mchbuox7qcjpnctfa4t6t33xs3gt27gn2zdauub2qqd.onion:8333 +hzbrybvl7253k4ilw64bmow6xf6kcfjpluoyxcyxnzjhvkcwazm3dtid.onion:8333 +i6gsjwkdrj2jfyzd2vkb3auajfsj3kfopngtouipisk5n3ztpyj7iead.onion:8333 +ic7xuyb3vjewgcivsod5fylon2uefdrtbujm53aqeeiwsr66bn2qriyd.onion:8333 +ielfpoctimb6d76zfwe247ivufhlqixcmto3ajycx6jhc32au7nnjnqd.onion:8333 +iljvoqv6gthbhneadvnnngt75cmchef4e56emu2q2rkvyd6yvene3byd.onion:8333 +iqr6sqjcywscdns25gsizkaqngc3p4zjxmnsyj76aewnujp5yl47t6yd.onion:8333 +irstdqvwsgdbac2suvkdrv76yut3ronokffskydore6va2ucgqwqpcqd.onion:8333 +ivdhohrfnmupqpv2fdsrgocivsrfxeraxjl373v2ucprnf6nm4mj5ayd.onion:8333 +ixrkhtcfbads4dakl6dl4nlsv4f67ld7huogpp3crelpuufcpcwbusad.onion:8333 +ixxeuquydo5vzhs4t26svdpuogj57n3n4c2txtudumqcl72y7ppwwoqd.onion:8333 +j4j46tzv4rqkssjyz74ojbwr2er7gpsuwbplylt2yiuphla5jmg2wcyd.onion:8333 +j5bnioq3mo7au2hzknw7c4nlagtrovncwmanei46okq2e753dshti2qd.onion:8333 +j6klkyq5gqepr5fr366us5g6rprcq2k4wkszia4a5w4r5nkotajetvad.onion:8333 +jbfdgru6e2xkp6cs2vqcjin2rtlm3hdwfzc54iupupyugtbijurqc7yd.onion:8333 +jdzoeerhme3wt3msiabxho3aokqksecqtrbau7yldmmrcdl53vh4ntyd.onion:8333 +jjsfftvm3szpjr2clthujnniwmm7xpzn4eacipdsmne2nw7cotxejeqd.onion:8333 +jljo2fgeo3en24rfjsu5bhcuvgqc2kt3q6qpbdhcrmns56pepvrrdkyd.onion:8333 +jnvqw3jyfragx7vf2gvedjuqarblwmgzi2nvzncnqygxqkq3l3psi5yd.onion:8333 +jo436cjqpu5kho6jvnf53snalahyno2pkrezdiecrblzk2ndiicnulqd.onion:8333 +jxry2vsra3roinmemrv2t6r2gxgkr6r47dsyni6hda6pulutgp5gsryd.onion:8333 +jxwalubi4vmffetqrm62crkz2lyuwbq3m5jdanremtkift3ncmfmupad.onion:8333 +k42ycrbazmkne2eerker3pwvsrumjdc3nbocoppixhcslbtin6szxmyd.onion:8333 +k6xqminlvsasqfltb4pqccoodaye4dlpdcof2v7g5bhcc6z2hkqbo2id.onion:8333 +k7xabakio354gnlnfop4nb3hvwnonncjkiar55yqr5m6t55johp3ebid.onion:8333 +kbnqritxjzxijflvhybdyew3zfrd56qyhfv3j6kkujd6ageeg64h2qad.onion:8333 +kdyhkqz7hcnbq4yg262l7qscyhwm62klcomy7wim4ohd5gxp745yxgqd.onion:8333 +khi4dspqnbjqr6kuzo3vr4os3i4ucp3iqztjuvy6hmvc3pvenbkvpvqd.onion:8333 +khxoiv2fs6b5q6z7cdc2emq75xrxyv2k72qb7qiccx2ecqikkoevhkyd.onion:8333 +kj4ifgsla7bufutpr5pgfim3ukzc6odrqmxyaih3yht7bwolrvg7psqd.onion:8333 +kmamezicky3ssry3lnxwrsqo5edkx52vgklnvaxozk5sdpnjtohenjad.onion:8333 +koopg7cpbkyzt2xeii3blytcwzzbegdjulf2k27tkd6qpgtfa2ckqhyd.onion:8333 +kp4sx6yum3trevgiyftnr52z3v5tkoemjp3ja6ugbsp5fefyyv3jgxqd.onion:8333 +kpawddtnppkta5ldam3pkwsapk7bkpkv7euxgkh255kw7gcmuavlkvqd.onion:8333 +kqvdvecikfk3bvg2qt2supapuzci6yj3sz3jlremzydu34ty57imlbqd.onion:8333 +krthkvdasakdnocof45vpiybugof2ju2rqpvtwbns6udjlbodyluulyd.onion:8333 +kycmxoatbewdk2vfdd7gr6iyzpkqv4sua2i4p2qqfpepsna4bum3y7ad.onion:8333 +l4dlgqyla7dobxaa7hhrhe5mwbqw3stmwq4qqcsbly32qfc4stetq6ad.onion:8333 +lieapdss4vndhmtlb7t6afjwsrf52mdkxstrkfq6as65zxqlufa3aqyd.onion:8333 +ljlclqmyl5usdo546twyb3m4zfjwebfsx6suuibhkorcwhy4ufukycqd.onion:8333 +lllr3l5y3tlsbmlzlyr4g5znrer6g3riolkuxvwtajxqerm7yju3aeqd.onion:8333 +lptjkpwvnj4syw4zcv4v7wvzvkzi7nlnakfxag5uvfzdwud77ltn2pid.onion:8333 +lpzalkzwl7e7y7arsjspc6brbl4pxfhrkvo5vh3u2ioxiezuzkrnkvyd.onion:8333 +lqsqk3waohi3rmknfmed27lm6ofva33zngehz6oodil45zmtdnzhqxqd.onion:8333 +lwsayeaakdsfyw3lsycpc3d5lrcf6jbpkn43y23zr6nxjiwwstnefaad.onion:8333 +lx3c3ljioj2cgecp6de5kgxjayhd3wgm2er6xtrdxj3ndudvu3jyz3yd.onion:8333 +ly43npqw74bztp37tgkx6gqk3bs53lso5zmg6uwnuzlaqdlraecz5tqd.onion:8333 +lzyhfdkmvsutea4twa6zooefirubmalci7fu6h4wmo2nmztnntpslrad.onion:8333 +m22ni2zjfwlq5pfzbfothsk6fn2wthkbst6gpje6uqyz4nsjywm5fwqd.onion:8333 +m2j25j6quucpfwxlh57kdnv6ntsp5yr6s5ueimkdu3w2tvqko6ne2sid.onion:8333 +m2lkzmtdkabgckmn42pfncswyud7jqmxk2s3vxfnnnwqxclhxcbiccid.onion:8333 +m665l2x4zmaphdm4gd2qa72eerw2du2msfzxs6ia2znkyndy33elktyd.onion:8333 +mdb7aqlwyt4jqjuxgzmupfuxwktypj2tkrdfkds3d4wgviary7oykkid.onion:8333 +mgwp4j6bhbf4ez7753yy7o6keil6pmc2ie42dtdfm5zz4ky5jb5sldid.onion:8333 +mmooebax2ks5ucswdzilx4gaoff37a2qtvi2tfe36clnjtdgggundbad.onion:8333 +msrmkyfkgcztmcsi4ei4tsyeadaw4byzf7vcffrd45l5kxnyjycpixad.onion:8333 +mtdf23ghhwwtliy5cj2gyv5wb7gkpbwjyh45nqppnnb6jxncht5w5uqd.onion:8333 +mzu7hum45gvgbnqhfbkls4sgoo2pfildd6cev4wfkowwvu5gapr2xyid.onion:8333 +n3dcluaorh7u6ilie2dqpmtqf5gplvpuoxjo65655mlw2hqbn7mxqxqd.onion:8333 +n57bfzhlq23h3mx4zfhytwyrpgxy2vyw3qd766lb4ysvmbdmanrahhyd.onion:8333 +n6e3inyt7quzwk5sam7v27sw5kuc5zeleomzbfjmygkoitxsej4nusad.onion:8333 +n7fxhdsmopuvrweux6ms5bg35cmpmbhxwbk5ralq7mhjdml2s77genyd.onion:8333 +n7p7ed2ejwz2zr224azq2nov3zyqnvhosorpvhmu24pqwacshahpn7yd.onion:8333 +nb4a43pfqy7guc27ksfu524bznmkgsqsfpmwzhru6iqu4pulbgaigdyd.onion:8333 +nbjbv6epmsktqfsiw76mvpyonnkom5xvnogzeyyjgxnm3s2mjfgncnid.onion:8333 +nkpl5epgo47qiqya6ijwtohpnuyueym7ux3dt2ccnfbgvy3gqeyhy2id.onion:8333 +nqy3yoi3xuse2rxibk4vo5drjmeuuwnecaewbyxnt3ffg6gsebmarjqd.onion:8333 +nsgdxf3pwioxj5onc7kb3cwp5icbifc2x4obj65bekw7dnn534vjeoad.onion:8333 +nv4weo4xp3r37texgd4mxzknblovxnhcs2laswtump7vhjllgf3mvlqd.onion:8333 +o3nctwf7tmsoylnlreuwwrwpzpofwqurzpsk4cnotyg5uwyngce6nqid.onion:8333 +o4l6ihjktvg73rzkoiz3amxkszmpp5thfhr7otpvwqx72ii6tmuwqxyd.onion:8333 +o4vb2emnbbzob4yuwiiz533fd3dbnbhz2wjnmfqu3cp4gjo6d46sh4qd.onion:8333 +obhiondywyso46m5egizaum7fsqnwgi24tpd6phcizoytsjhro7bbpad.onion:8333 +oe4xlteqwjffy7ljpbrij5inbrrkni5v6fkr2efswqtnd5l6cw7ix2yd.onion:8333 +oex25ysc3h73aqxvp6rmh37s6v5ko7oybdeq6wf5zfvx4tuvgbno5fyd.onion:8333 +ogydkr7744s6yth76pphjha5jcsj7k64rdrhaqtqugqp56jpb2hn6ayd.onion:8333 +oklrf5acndz5gtpmtgnfvc6yo6kyadp3yjouehjgxhljwjtpmxqyjwid.onion:8333 +oms65ve4z7hcvlxnubwvfe33hhn5jwjzjtv4gmolqjeolzv2aq6a4xqd.onion:8333 +ooobxdrhewee5xn2mypadgsq7pysih2l4g4cfvf7ch6lp5qbzt7eipyd.onion:8333 +os54ay3mffzaf3ednkgyeuirayo4bothbmcvm275h6af3luszoxcd5qd.onion:8333 +os6eoqu4sjkya7xvedx4jrwlt72frbzw6p5w2rsswpw2dxmkfkxsibqd.onion:8333 +osfazvr657jukhdyj7rostfg57lzy6c7gvaxbh7ul3jakppktisckbyd.onion:8333 +ot4n2e4xwnxpvpva46swsxwxiiaumy7gohasuow7v2qvefdc4txej6yd.onion:8333 +ovazpzdtupsqfygs73we3wq4lpodegsh5eggomazb2kxigd4mjpyakad.onion:8333 +ovtx3d4svetdt7kav6jghbasol3fhq6zwuud4njngyrnhvkdwetko6qd.onion:8333 +oyavbcj33zt6abvjfwtjel7ac4jqaz5pjdu2xmcknudr4ul5fyjc5wad.onion:8333 +oyb7xtoiteb32pku7fwgl76pwe4gsc7gsk4hk4yi2fgyxissck2vxtad.onion:8333 +oyxipyliagkpfvhlgegfzye2oxmsdt7xjcy7dpq2xhp6j4ljld3xglid.onion:8333 +ozq7iyucv6squep2d2jn5zmozyy7yxbdmw72lv6i2jb2weq2vtn3czid.onion:8333 +p5lrtmxtzlrg66t763gjeosmwulxhniss7ct73nsqymujozepxpzo7ad.onion:8333 +p7xhbz4hkgc3h4t3sgqixxyaal76no42faet57znpmaorwafwi42ofqd.onion:8333 +pbhxzwdx7v5wtduqpmfoc72mxhwlyxg4unak3zyhfnuusfmizffvrbad.onion:8333 +pd7euoerq3yycf2bwpape5f2aubhqxxzu7a5dnrpukrzycs4zkr6goad.onion:8333 +pddjxch6t3f62isaxkrmtzblrlszlr3vpttplhwexfvcnxxx5u7wtbqd.onion:8333 +pdjfo2ehm7t2mkssadyneia6ftdb2tfuebeuxaqmnlkmvqv3urnj3yid.onion:8333 +peynxnxmdwdiqmmolcttpjyrlqorwexyv5hhkfclobetp6shtu37pcad.onion:8333 +pf2y6twnz6seo2pn3zzawyndgkqaibllnv4pzchvox3j7krcbathhpad.onion:8333 +pf4esnp4qy654vedxpfcxumznjasdqa3c2cnzdda6uqpcuxtd2o7fuyd.onion:8333 +pjbvklsqecs4gcfvq7wqicoeb5ir6ch3jwwavjth3xwg5ag7rem7sxqd.onion:8333 +pjte4dnxasrmst4nduwbcgm7mnd2qdrlnd7vq3c7mkxxmt47d6omf4qd.onion:8333 +pmb7nsm66jp6ewkjro6udhshkwcoc5tna67td7g2gx46bmuvtttkxkqd.onion:8333 +pookub6jfnna5nzonaruqzkjfekutzfunrppjuziqvnyfk3645ttrmqd.onion:8333 +prjdltjghrherdhw6ieu6lg5zgzzyx4ykc6ad57z5pz6uxmt7kop7jad.onion:8333 +pt2rsnb42lx4zlr54oomzj54dlbdeuiwmk6tac3ovkk4g734hawjyaqd.onion:8333 +pttgdou3m24yywbnky23b5qf63inr3ebi2fejjvjmltsd5l5f4hxtfqd.onion:8333 +pwiob4nt2tmpngmvdb6gzhaku5d44fjv55f76o7c4dudwofzr7ww5lid.onion:8333 +q3hnj7stbm5kdbekxy4vgmhalj5n67kftcrh6r3xz7o5lsxgwgqtbxqd.onion:8333 +q4dfybgsjoiqcngc2xbol7tohvppag6jqkkuu2rsp2a7idlobh35bqad.onion:8333 +qcb6bwlr27whuehk365cu6cjcjj7oww3vhosav3xx5ftnbhgoqrcfcqd.onion:8333 +qck7qr76h6yuc64zfn43toxkry7k3ts4jlhjssnkutzzxlc6v5qfuiqd.onion:8333 +qdgtqkxl4cxt4aqhh7vvwnxseyk3mvrwqanecfd2nxblqi3pfskiq5id.onion:8333 +qfpzcma5oslkrab4jelcudhpvllsnsiqpgxh4gctomslru34x72pl7yd.onion:8333 +qfxtc2jo4mx5r7ietkjekszkhobe3cqdcacynopjxykdvolsxhohpeyd.onion:8333 +qgin7f47k3qpomijhrtonrm5p4aliqfc7itbbc4pe52orxtqaqetmvid.onion:8333 +qhj64xgjcv54jdqerpjojhr3jcm5gluq7hqfgb37t3ycrmpwjhyx3uqd.onion:8333 +qk3fp73k77e6rj6t7wrpxigvfsgdqdwdbeglslviqdcrzp7ige4cuyyd.onion:8333 +qkx25lac74ejv3v7p2g3zabca5y2g2rxzo72wx5qhtmlom2ly4bdl2qd.onion:8333 +qlw4ciqorajhp27vglas4x3phn7nvpr7amqmqmfnvn2uhnm72k4pb7yd.onion:8333 +qmab7yqvjqsr5dc4rwthpufbfmmnrldq2efcysxom7677wusy2jg3hid.onion:8333 +qmi6hz2v4ivx4w5qtn4u5ud5mh4nayhautvfvynyebtpjyahr6pp43yd.onion:8333 +qpgdab6fgosymur4pmambbdpczizjp3zm65o7n7kdndgfqefigt5vpid.onion:8333 +qpjsvyu5odt6yib3bpu7pogt77frjzzmn5bdeik5qqgof2onf3ebg2id.onion:8333 +qsxyclpzutl4anwfkhthhmbd5oui6ec753vnzvncowabjuiu5r33myad.onion:8333 +qtma3kofgmj4x52kyejgh26n2defiziwgrc3pjumaewwu7sxh7xyvfyd.onion:8333 +qujnwayjsdllqelffiy67n23mb6u23mih3wbd2zdvjeoyo35mdzi3eid.onion:8333 +ra32r3e3tse5ogch6fxld66nu5am3kqmhw7b5c7yo2popvf2opl3wlad.onion:8333 +rbnzskapgz3zn6z3dpgbj6rxlrnml56cyrx22vw2exh4n5apx7rmhgid.onion:8333 +rjqrut64oo3tgpnsrmy4wrujlsufxifslx2bw6vqzfk3mhqsnchqimad.onion:8333 +rl35ajhf44k7jd2j3vajy7cnbmnylcvn7lx62avhhvdk2zvmhchfu2qd.onion:8333 +rlncglnpdcrywcjqj6wxkn63uzwzxl3gtgbzqvfcetzbwg2me54ediqd.onion:8333 +rludpttjgyegce6isc6nzkso5ysyhtlxni2p5j4uae5knbgs2xfakryd.onion:8333 +rlx42j3ymomkf4wq5lgenopcjkp76xpymlqg5kao7m4cecekcvx2akad.onion:8333 +rmkubfilpxxvf7w7csnpmx63hjz7hpvmodhu53cbliyqhun53jzl6wyd.onion:8333 +rpux6zj6wokq3kp27mc34gkdb6vk3kxly6imgqzukmzlhe2sc3l5kfyd.onion:8333 +rr3nr2ooywwa5r5k4eafo7lxkkee3piebceqlriciumwetdsrgoc7jid.onion:8333 +rrdo76cf6ctl6qgxzacogwabh7rohapfhg7z6wllyt2okw664wxytcqd.onion:8333 +rtfyx3pxozf36lan77kz4x2w6ixm7wvyqmvtnlmy3wosd7koe6xvttqd.onion:8333 +rzq2ys5wtk6qku23jbhplm5kp5wzebcfxv65uvk3zqtytrj3fa3t2cid.onion:8333 +s3ig5iv5eldufmzblnvfcfnqq7kgg7mlexwrawn3mk7it2bpgxfdcbqd.onion:8333 +s3ojmryuqyyxdbl3hygkboxz6lpnageat6zcz2leywrzsm3jr7w65wyd.onion:8333 +s46rmgxjd5stdldxdlb4sssdgmqrgoeksnybkfxugaw7vhrsdr2mzfyd.onion:8333 +s762tz3hwhnz7ock2wap76rndat3mckse24e2gaag75ko4wi3w7tjzid.onion:8333 +s7btvxgflc7cakgqar6dmknlqcqr5am3ebdtovei43bz4w3dkakk53yd.onion:8333 +sa4etkehfhzbksvlxwyf2iko52zgrhl6h66e27u2mhw2ayu3o5z6urid.onion:8333 +sacohs43bokospkyarsb5fclzpdsf3o2nrqqejcig3l56remrzz2dyad.onion:8333 +sancv2jnekemexmfxga4ktmt25yje2cb7ai4ywb5xxjthbzbonyephyd.onion:8333 +sf6qzwfh5aau2zt3iinynzwww6ika26tdj4spxws3jscdvssuohd4qqd.onion:8333 +simvzuopsv2h2xnwefu7jxbtghhnqtz73d4nsxcr4xdq2nxnt7tcksqd.onion:8333 +smle73emjpctbblug5gf3hkny77wyff4y6cvc2swnqrlsihjsgh46xqd.onion:8333 +sniximp2psj5i464i3d36nlmo73762h4jckszwqqx7kkuxppophnfeqd.onion:8333 +spevwedct5byy727a76ug3n3fjmod6we7tfqoecchbw2l47roitrncyd.onion:8333 +sxcohqssgaccsjfktizwrjgrv55eqx4zv6h6yqr6smnszllrli44utqd.onion:8333 +t25lvcr7nihqe7w653xtdnjumkg2ya3gpgvenqsbwxy4hs2tqyah7syd.onion:8333 +t2e3qzuaft25zolwmojp6r3p5g5nak4pxixh54tft4khvhheczfr6xid.onion:8333 +t3knwe6h4rrkbumb2foe4qszqf3prw7dqkm2i6zuyzbke7qin3ysjkid.onion:8333 +t45gsyqahwexyg7yjpv5xq3cgjdnk4ob633ly64kxo66h2oh2zq3coad.onion:8333 +t4t7otcbxphyz2mfb77h3zjpeo4av7xx6y4ryjigylec5nlhaof5hlid.onion:8333 +t65bcyf2eni3vxlqsdg57g3yjxtk2ruy57a2r542mwjnqdvxdaop32yd.onion:8333 +t74jhdmey6isfgyuyvdfmhxrbzhzs2fhj3mdvpox3da2nslkisazjkyd.onion:8333 +t7owetuja5t4cdb3fhznmiezndkc6ldvpbquszkf6gcipvo3sy5vkjqd.onion:8333 +tax3bgihfuogisukzr5ztu645xcxhnfjyqhvd7kurnmt7faelkutf7qd.onion:8333 +tckqucjlhho76dgrpc4iyuhmjzwddt46dzcergxaie5fxf7g4nrnj7ad.onion:8333 +tdhcehjcvo3yubiseyhtseu4mqomrpfyedbd2rmf3trcmxxr2iktvhyd.onion:8333 +tgupedfsi5g52wftxdefnnbzagzqgom7u54atpamqze3pcz52nu2raid.onion:8333 +thure4gzkkxo7f3gp4fcf2ay6mikepx6mcwql5xrotxanzxuro5dcfyd.onion:8333 +ti4yzr5lqyldgyu67nkii5pk2i6hi2qvq6p5qsjqkxly6imxu56o3cyd.onion:8333 +tjkqn2tsn5tvaazdxbfsgqna2ve5kx5ip46j3acmqqh45t4j3ikseiad.onion:8333 +tndqqjft7p7ouqvv7lz6y4sqcncero3lffrukzugkuoztgwubqfcbwid.onion:8333 +tseke6n4lykhvdezwkf3kwmxitgmrjjbyma6nol5eh2qnbk3ocvhnfyd.onion:8333 +twuhobnvoi27o6zk2uwyhc26vdnpvpqq6qgceioxc6sbtm36wo55udyd.onion:8333 +tyfxlylakchnkvbks7bypu2jq4bzexvxybzabxrenxgra6di3fjywgqd.onion:8333 +u2hd6xck2bpmuvaatgo5nmioejk2voaa6lmv3msbuvpo4xbirernxwad.onion:8333 +u3edrtzedv5tmzizamlj6n4kmpfrn4ekvxfjpzauxoy4jps3orzftiyd.onion:8333 +u4sovrilfl5zwq6vzekes7slvyzws2phc6r5dvibj5fnbqxdmmuci4yd.onion:8333 +u7phavksrlzphv5upw3nty3kh6rzmkxlg3uaa7hqadt7dhjgffkc2uqd.onion:8333 +u7wxfxdpptoj2dacj4h7ykahvturudanyirjpj3qpk2r726x6skj3sqd.onion:8333 +ufehxvatqb3pyfrdvcdibgfdribzmwvaf5xsxymeaq6l5a6nqukr4wad.onion:8333 +ufm43yp3x46sq7io44mi5sn5kizl4fcpnuxhwafgr4h3jn7hhjjf6byd.onion:8333 +uiobofaykuraqarsedt6ookshgmuxt7sefgiloixn5zgambnt4kfrdyd.onion:8333 +ujf2zphfaywzy36o5brby4ioberpv2tbu6ezyoi4qyojbfaio5pwrpad.onion:8333 +umesgylwjb6x57zhqnk7jozvblkbq3sovmffxxppfufg27kconydnwid.onion:8333 +uslbkjk7xdiug4zga56ybayvxttxttvnvj43yuomn36sn2iviattrmid.onion:8333 +uw5gml332m5mns3y63phwuj5trn5ojkrtb2shptzkas2ckdopzbbbzid.onion:8333 +uwavujkkmgl4kcyvyvfreuatkpfxh7giifug4pn6r2nuuoergp7vuoid.onion:8333 +uxahghkwzt2lty762rfbf3vn5xlehfhhjrawdrwkmuyw2o6yep4nxeid.onion:8333 +uygew6jxykss3v4byk2m54bdtqnftcpw7xdrtdudlvxjag66hgsrm5id.onion:8333 +v2ke6hp47qxkgkpifftjdr6qb3o7n7d2sribivrerskifefik3iar4id.onion:8333 +v4crdrenwd7tqirnxqcbf5w4r3cg6xaf3hfz3sgp5zej7haygxeiciad.onion:8333 +v4uf3ssnetuqduflgjroutwk6cvscqbhbsxdmhx733xcekudyovuxnid.onion:8333 +v67jkpeiaekszv4vyvt4r25xzh6dm2q2cl2bkrac74ltibuxabc7xmyd.onion:8333 +vbfx6jffhiynj7pmt5bwfmzzql5hkw3pfzlgg27l5j2mxu5e2oabbzid.onion:8333 +vd6azdeefrxp5crdqptbxcawff4w64mmtokmu6iwdwquscwlde5htaid.onion:8333 +vdjby26wyqioxkp5vrkb3ohsx7qp4kyavgq2ejjdakicvvff4bkyunyd.onion:8333 +veqxagt2ag5xv7tnogcueswb3e2likgy546ckjl5zzp6t37ibklkuoid.onion:8333 +vjbvzvngmdzxk4v5tohrtth7eragfoiuhkhpgifndap45qlhdiuprjqd.onion:8333 +vkjhzgxumv24pje46y6jcl6xul5v62nuwutgzhwqx3orm4fh62mzjdqd.onion:8333 +voaubwpvly2eghhrr7u23ylyele74t4u6r6x2tykhcoeo4ie4bflpcyd.onion:8333 +vobatph2s4eqchnexixgqsec7tg7enomdlqc33qlsx6futliyue6n4qd.onion:8333 +vqvipjsibngsr3jsuwhqr5zk6hv5ggfhshwxioefbg54j3y2vdpqo4ad.onion:8333 +vsfc6o36vi4dbctysdomxqs36mncamm7udtkvlxjyzplifpnqtrwlaad.onion:8333 +vsfexay3chere7t5rdr2hmv3lp3kyggurzorr63ustjog2zzgvozuryd.onion:8333 +vsgwevkqyxtcjqov4ybj76airaedrvenrcbjkhjpddoddhd52a7fysqd.onion:8333 +vvcnpfykwjgmtjxirwwacbiwzcdraatmwu4le3fy6ycyz6ud7eamtxad.onion:8333 +vw3gmeqdsxbluya3nnc4rivdrgdm56fuavkzyrnjcpeqic2wlcgr25qd.onion:8333 +w2blxbcvpl2jlq4rtk6qvvckzmqwyei3j4foe57up4cmfyeofupabpqd.onion:8333 +w4xrzo64lhnrjdojd3ae4fko3kqkwazo3yhb5yxymnuel7k6hafviaad.onion:8333 +w7lfx5wfof2w73umxulyffg4t7e7vr72zuej4i2ws7i4bhdxfmkbljad.onion:8333 +wadatcpr2zkcvbh4lgkn4rtfuufnz5qozftvgk35mqiojjjeqgjrapyd.onion:8333 +wf7pumlk4w2lm7rr5fp3b47yljuwraz3fl66mw2iozm4lmhkopoq24ad.onion:8333 +wflg2vztk4y73m44olz5qnbhzsvvjfi5tz3wmdnps7rf7tntlj2vpbyd.onion:8333 +wgy6iwuhf3kltbxoftaf3s4s5or3ewwzdla2ukfgecgqwjm6xtfva4qd.onion:8333 +wkmf7wnecgkz7giunadfmyslotwtry42y6hw42wxlc6qhpa46qoui5ad.onion:8333 +wlmymukrfjh2isrwats2ozbmoiavqklavfycq2ziht4fckpkodktasqd.onion:8333 +woiilwjxzciokmzx4rq4dbg36nhnocnapinq3v4pgpgmkpbxtugfv3qd.onion:8333 +woz3p5rshuz6zccjjjqn4bt6m6ri4pbh557pzdvbo247jmhejr5wmqad.onion:8333 +wpgzpf7mnaj7pqhvwyfjarekp2ojoc3hc3hudgii6dyhka7p3xqxf3id.onion:8333 +wrounxy4wxcj3ptznwfoainrjbiukff6vbxse3lvrgzg5cjfncfctnid.onion:8333 +wrs65mjvgzo5q5en7zz4fluwx4qjdn7pwm3twfrrviinqgzhs3vambyd.onion:8333 +wt5an3mgpzd6karuvzkiigm5h5rlla7gx4sfawzsx47aou5tghovc3yd.onion:8333 +wz5kfeeen5vnzoxknfu5p5ymrhid7gi4v5uloumo2kuiwj6q5legi7ad.onion:8333 +x6hsaqopoftbekwibf62a3y6ooy34i7dilkdgrbiwtu2fmnfhibr4tad.onion:8333 +xasfd2ui4djkzrblpj4dbf5senrren7jtqwcqwtda7kzx3cgud2pzeqd.onion:8333 +xekjpcli3gqh6anqr7txupvvavxmyghodw4vy6p4dnieu2kidqe56pad.onion:8333 +xf5rfb3ockyfcdklqrlqxdxsqhjn32gygiwtncqcsef7ve4e7h6exjad.onion:8333 +xgvwwaezo6tzt2fzshhrhis2e7qnkxegvljs3di4lxfim6l6imgpu7yd.onion:8333 +xk6keofl55jt6cwnjjntsdlt7gr3isfekponsblz2e66xujeuv5ew3yd.onion:8333 +xkkaspfulmvoz25vvsvuwwlzhbq252cvxeghqy6qxa4frf5pvn3ehfad.onion:8333 +xlghuegqlq4fzckjwizb2e5lxlsk76neok7rnxsutazqkkiakdk7riad.onion:8333 +xli6i7xjcx66s3lfq7u3zmewxydpo62bezeocplcsn6gd6zx43qi5zad.onion:8333 +xme4lbeqtbdepl7ghpzuelqqtutuw6lxlbu4vwhxeos7qdv5h7at7zad.onion:8333 +xohcyhfyr5yyljypqgz2ho64ban36pwy53hybsvwbtuadfoak3knqjyd.onion:8333 +xpqyiwgmabsxdmgtgiah7zceeseleklnnanb7g2ajgzktls75faz4iyd.onion:8333 +xuenjyogv6irymjv7muohv2455nncrkjv4mkopfs5dqgwk4q4rpfezid.onion:8333 +xunegc456hyc72rcfvrmmulqak3dgj64wcdjrjv5o7h3nvbsfs3vvuid.onion:8333 +xz463kgdshepjf7gtnsxibjaomtbuksh2wc447xgawmrl4bbfbzg4dyd.onion:8333 +y2ths7kf2pifp4ajoe5ii2ftk3wixcfqmsnmrphlh53jj3342c4hksid.onion:8333 +y36aipkodbtcjiyf5w3h6oo5dvfa7lptl2sbp2xwqlyqcojs7kypejyd.onion:8333 +y3v4djoqsoocvivs463yyif657s6mjcd2n4eztrkqrtte3i2aydi6uid.onion:8333 +y42vk3myp77lncrn6uvrixabdnvppb6ccwtkh3yxhqim7zrjrdo3saad.onion:8333 +y5ibjg4ub542wp6pwozwchkkfqfpu5kup3v6454pumverlvpfff467yd.onion:8333 +yftuiua74fspnqanvait246qn6vmab4aoympjd3omppu46jkq777axid.onion:8333 +yfzxfi6ceyx7ufvrket65o7klryiqsscrd4b7mjteb2yulv37bewumad.onion:8333 +ygv3engdifduzejgjy2qkx6wub2r73h3h3niuqv3chdlk2zm22qb5vqd.onion:8333 +yh5bggjwpbau6wtdvlbkyomtxrh3xf5y5cwd7fqi7ptzazw5c4lbglad.onion:8333 +yh5us7dk25ttxkt6miers3bazlm3jiums5nwz6mzd4i6kn5oizjccuqd.onion:8333 +yjc7fnkd3b4v4vkrdncyts3koskuetqhcgpzupbywwxea4bhhx3qmpid.onion:8333 +yjtnadoumitivwzl53lb5453t4ko24flrpfvtsiyd5dnf7jaqdgwjdid.onion:8333 +yksivr6h6qreccdtpe7uwji2hmgqy5acbqd7zrsdlixrbfijdmqxrgyd.onion:8333 +yojzhgbtxvnrzuqawvyfnpkjnxre6rzuih4etfe6dd2la3jrupc7qzad.onion:8333 +yorpx7sgfswvju3g2whr25s4mkbqihfqxxicuyrfavtjpp3holjopkid.onion:8333 +ypsy5kvuctqnjnvlels7dozlbpxltbtlczicswpz3fwstxupb4e2piid.onion:8333 +yq4bqleayx2ilaxhdxjhvidx3tdrr4m23g2oegfmnpog4b2libezwfad.onion:8333 +yrv6u2spxa5kyj224bu2leoswmqi2woocntt5stnab4e3ab5xai4kdad.onion:8333 +yxf7inhfo435bjotzmzaelgt7cnerf5eq67h4sb4ynurspl75ed6upad.onion:8333 +z2g55fvlczxsnuijx7e4p3bgxph2udp6x4kn6xjmqzrkpdne35tkoead.onion:8333 +z3ebnsxe6awfedmwqd5btg2zrdtjm6izaqsiodbo36tpxluujg45dsid.onion:8333 +z3gm6oghblimyiubqkiven73wgoytsq2jklwtz4sswukaeekihx4htyd.onion:8333 +zahrvinucuxpxu56h6nkiiw7cvutxrua65l4jynvwkzt2bzmeuvdpuqd.onion:8333 +zdnr3dc7b5lx4pph3cj73nmojgqy6h2kgcrf3xw7za2qdnh4ychb23yd.onion:8333 +zej7mizjlb26qecppzvgyswervt7ov6f4x6fwrot7obvab23xsv5jjid.onion:8333 +zgfkpi57f3hybfhh6vltjklxyqvfu2nzkpipqyiyurfccmkdwlatuqqd.onion:8333 +zgj5kqoqgccoccgysrygfeydfsn4z2qx42xjp6mdlbqfzqthj5z4vead.onion:8333 +zgrpshddeijmdp34xfyw2kz22la4jxgwce42pupjp3bo6xtchsorrxqd.onion:8333 +zifp76tjeur73gokktvwyy5lwh5vgjerokbv32carsizgfki3pbfuuad.onion:8333 +zkvdpnuo5gv3hvvlkit3vyyjoeq3vkg27ihqmbif32beoqf6ftcnf6id.onion:8333 +zlpztcqey4osd3omtpsm7micrh6jrxuqzeeendpngk25iyfhleieekqd.onion:8333 +zm2ox7js5spqbslqqgjags3mn53jalknoi3zlva3iihdvykmbjzcbpad.onion:8333 +zmerkoegw6pxcgimoezzhykpyhe62l4xurglh3lnqwknaciyos2qg5yd.onion:8333 +znb6fuo3hgbfmscgkyjvexukok2diyankdfzdt7pde5jnze5hhrdf5yd.onion:8333 +zujw742s3kqa3cqjkg5s624rfjpodtbnuguw2wyhdp7mnqngeeeqiaad.onion:8333 +zv63heoa7jstwhq3wg2nibip36bw4icd7jphccy3li3nut7gp2gojqqd.onion:8333 +zvnhw2gbxdyxhrjjmyxotvxaibgo34k2i5sw72ogtydi6sqsns5te5qd.onion:8333 +zwyshlkggvehzqs26clcvuskdxen2ry5zbl5axe36x4brzsk7b55ypyd.onion:8333 +zyetfkanxicfp6tt5tegkxlkoz5rl2i3zsc6hyyqizahywbktezfuwid.onion:8333 +zyku4bk6pdifla26hympigytlwsx4htajcn43hhobdbrv4tfojv3snqd.onion:8333 +zyphknlr4ogrknj5t64qya246kdaasgirn4iercvesggqplzzxsisbid.onion:8333 diff --git a/contrib/seeds/nodes_main_manual.txt b/contrib/seeds/nodes_main_manual.txt deleted file mode 100644 index 91a64c6e..00000000 --- a/contrib/seeds/nodes_main_manual.txt +++ /dev/null @@ -1,95 +0,0 @@ - -# manually updated 2023-04 for minimal torv3 bootstrap support - -2bqghnldu6mcug4pikzprwhtjjnsyederctvci6klcwzepnjd46ikjyd.onion:8333 -4lr3w2iyyl5u5l6tosizclykf5v3smqroqdn2i4h3kq6pfbbjb2xytad.onion:8333 -5g72ppm3krkorsfopcm2bi7wlv4ohhs4u4mlseymasn7g7zhdcyjpfid.onion:8333 -5sbmcl4m5api5tqafi4gcckrn3y52sz5mskxf3t6iw4bp7erwiptrgqd.onion:8333 -776aegl7tfhg6oiqqy76jnwrwbvcytsx2qegcgh2mjqujll4376ohlid.onion:8333 -77mdte42srl42shdh2mhtjr7nf7dmedqrw6bkcdekhdvmnld6ojyyiad.onion:8333 -azbpsh4arqlm6442wfimy7qr65bmha2zhgjg7wbaji6vvaug53hur2qd.onion:8333 -b64xcbleqmwgq2u46bh4hegnlrzzvxntyzbmucn3zt7cssm7y4ubv3id.onion:8333 -bsqbtcparrfihlwolt4xgjbf4cgqckvrvsfyvy6vhiqrnh4w6ghixoid.onion:8333 -bsqbtctulf2g4jtjsdfgl2ed7qs6zz5wqx27qnyiik7laockryvszqqd.onion:8333 -cwi3ekrwhig47dhhzfenr5hbvckj7fzaojygvazi2lucsenwbzwoyiqd.onion:8333 -devinbtcmwkuitvxl3tfi5of4zau46ymeannkjv6fpnylkgf3q5fa3id.onion:8333 -devinbtctu7uctl7hly2juu3thbgeivfnvw3ckj3phy6nyvpnx66yeyd.onion:8333 -devinbtcyk643iruzfpaxw3on2jket7rbjmwygm42dmdyub3ietrbmid.onion:8333 -dtql5vci4iaml4anmueftqr7bfgzqlauzfy4rc2tfgulldd3ekyijjyd.onion:8333 -emzybtc25oddoa2prol2znpz2axnrg6k77xwgirmhv7igoiucddsxiad.onion:8333 -emzybtc3ewh7zihpkdvuwlgxrhzcxy2p5fvjggp7ngjbxcytxvt4rjid.onion:8333 -emzybtc454ewbviqnmgtgx3rgublsgkk23r4onbhidcv36wremue4kqd.onion:8333 -emzybtc5bnpb2o6gh54oquiox54o4r7yn4a2wiiwzrjonlouaibm2zid.onion:8333 -fpz6r5ppsakkwypjcglz6gcnwt7ytfhxskkfhzu62tnylcknh3eq6pad.onion:8333 -hanvo3hzqbhcqm5vahhi5a3czxxdwc7vt56p5gr7bifcvelaqurv6iid.onion:8333 -hz7oqntvj4adrwtqappcgaxfribg5u4rvfkpwlo3xup5fcuyvylkxlqd.onion:8333 -ityrxhidvjnjnf6imzyuqqnkkwridjnebkbokx25so3suq3fzezmksid.onion:8333 -jto2jfbsxhb6yvhcrrjddrgbakte6tgsy3c3z3prss64gndgvovvosyd.onion:8333 -k7nb3r7hxi5exvr4xmvnilhfw6hei7sw4rwz2t6onh4py6wbora6tuyd.onion:8333 -kpgvmscirrdqpekbqjsvw5teanhatztpp2gl6eee4zkowvwfxwenqaid.onion:8333 -l7kw3vjs4cf5mnuejjgqcxrw6wwsjmabllq3h3amy4f5q33d6cgo2kyd.onion:8333 -m7cbpjolo662uel7rpaid46as2otcj44vvwg3gccodnvaeuwbm3anbyd.onion:8333 -mowb2qwpjgs2a6q3yj3xa7nxklfssul4w7ynonyycw3uyopfu3x6ujad.onion:8333 -mwmfluek4au6mxxpw6fy7sjhkm65bdfc7izc7lpz3trewfdghyrzsbid.onion:8333 -rfqmn3qe36uaptkxhdvi74p4hyrzhir6vhmzb2hqryxodig4gue2zbyd.onion:8333 -rsgwtnousfc7zyg4qsm3gvczjx7cihh2njyjbjl3qvcj3xg7wmvhddqd.onion:8333 -s2d52bbttuwcl3pdrwzhxpmhtxn3jg23havjqg5eygwhtiw6lgyelpqd.onion:8333 -upvthy74hgvgbqi6w3zd2mlchoi5tvvw7b5hpmmhcddd5fnnwrixneid.onion:8333 -who3qs4eqlqzoxhqqgan4mg54ua5uz3mk4lj33ag53ei4orvnznrjbad.onion:8333 -wizbit5555bsslwv4ctronnsgk5vh2w2pdx7v7eyuivlyuoteejk7lid.onion:8333 -yrmedr35tt4wqfnwgilltxh5bnukeukxjpgg3jzmmsyld5lgsn5amvyd.onion:8333 - -# manually updated 2023-04 for minimal i2p bootstrap support -255fhcp6ajvftnyo7bwz3an3t4a4brhopm3bamyh2iu5r3gnr2rq.b32.i2p:0 -27yrtht5b5bzom2w5ajb27najuqvuydtzb7bavlak25wkufec5mq.b32.i2p:0 -3gocb7wc4zvbmmebktet7gujccuux4ifk3kqilnxnj5wpdpqx2hq.b32.i2p:0 -4fcc23wt3hyjk3csfzcdyjz5pcwg5dzhdqgma6bch2qyiakcbboa.b32.i2p:0 -4osyqeknhx5qf3a73jeimexwclmt42cju6xdp7icja4ixxguu2hq.b32.i2p:0 -4umsi4nlmgyp4rckosg4vegd2ysljvid47zu7pqsollkaszcbpqq.b32.i2p:0 -6j2ezegd3e2e2x3o3pox335f5vxfthrrigkdrbgfbdjchm5h4awa.b32.i2p:0 -6n36ljyr55szci5ygidmxqer64qr24f4qmnymnbvgehz7qinxnla.b32.i2p:0 -72yjs6mvlby3ky6mgpvvlemmwq5pfcznrzd34jkhclgrishqdxva.b32.i2p:0 -a5qsnv3maw77mlmmzlcglu6twje6ttctd3fhpbfwcbpmewx6fczq.b32.i2p:0 -aovep2pco7v2k4rheofrgytbgk23eg22dczpsjqgqtxcqqvmxk6a.b32.i2p:0 -bitcoi656nll5hu6u7ddzrmzysdtwtnzcnrjd4rfdqbeey7dmn5a.b32.i2p:0 -brifkruhlkgrj65hffybrjrjqcgdgqs2r7siizb5b2232nruik3a.b32.i2p:0 -c4gfnttsuwqomiygupdqqqyy5y5emnk5c73hrfvatri67prd7vyq.b32.i2p:0 -day3hgxyrtwjslt54sikevbhxxs4qzo7d6vi72ipmscqtq3qmijq.b32.i2p:0 -du5kydummi23bjfp6bd7owsvrijgt7zhvxmz5h5f5spcioeoetwq.b32.i2p:0 -e55k6wu46rzp4pg5pk5npgbr3zz45bc3ihtzu2xcye5vwnzdy7pq.b32.i2p:0 -eciohu5nq7vsvwjjc52epskuk75d24iccgzmhbzrwonw6lx4gdva.b32.i2p:0 -ejlnngarmhqvune74ko7kk55xtgbz5i5ncs4vmnvjpy3l7y63xaa.b32.i2p:0 -fhzlp3xroabohnmjonu5iqazwhlbbwh5cpujvw2azcu3srqdceja.b32.i2p:0 -fx6np3oheacr3t7gluftrqo2qxldbbatgw4hepp7ulb4j5ry57ca.b32.i2p:0 -gehtac45oaghz54ypyopim64mql7oad2bqclla74l6tfeolzmodq.b32.i2p:0 -hhfi4yqkg2twqiwezrfksftjjofbyx3ojkmlnfmcwntgnrjjhkya.b32.i2p:0 -jz3s4eurm5vzjresf4mwo7oni4bk36daolwxh4iqtewakylgkxmq.b32.i2p:0 -liu75cvktv4icbctg72w7nxbk4eibt7wamizfdii4omz7gcke5vq.b32.i2p:0 -lrah7acdsgopybg43shadwwiv6igezaw64i6jb5muqdg7dmhj3la.b32.i2p:0 -lzuu6mjtu7vd55d2biphicihufipoa7vyym6xfnkmmlra3tiziia.b32.i2p:0 -m6bpynxkv2ktwxkg6p2gyudjfhdupb6kuzabeqdnckkdkf4kxjla.b32.i2p:0 -m6v454xd6p3bt5swujgmveklsp7lzbkqlqqfc2p36cjlwv5dbucq.b32.i2p:0 -mlgeizrroynuhpxbzeosajt5u4ddcvynxfmcbm6kwjpaufilxigq.b32.i2p:0 -o6t4fr5ayfadzieutstgwcllvwxeuzjlxmzsmpj3hpkvefhzfaea.b32.i2p:0 -ofubxr2ir7u2guzjwyrvujicivzmvinwa36nuzlrg7tnsmebal7a.b32.i2p:0 -oz2ia3flpm3du2tyusulrn7h7e2eo3juzkrmn34bvnrlcrugv7ia.b32.i2p:0 -pohfcrfc7prn4bvn4xstw6nt3e7hjmb7kuj4djtsfqsskwhmhnna.b32.i2p:0 -qd6jlsevsexww3wefpqs7iglxb3f63y4e6ydulfzrvwflpicmdqa.b32.i2p:0 -rfjkzdzv4cwpxo6hzuncicvuyui76wxqx3a23lynq72ktwqs7aja.b32.i2p:0 -rizfinyses2r3or4iubs5wx66gdy6mpf73w7uobfacm2l5cral3q.b32.i2p:0 -sedndhv5vpcgdmykyi5st4yqhdxl3hpdtglta4do435wupahhx6q.b32.i2p:0 -tugq6wa2ls2bv27pr2iy3da3k5ow3fzefbcvjcr22uc7w5vmevja.b32.i2p:0 -usztavbib756k5vqggzgkyswoj6mttihjvp3c2pa642t2mb4pvsa.b32.i2p:0 -vgu6llqbyjphml25umd5ztvyxrxuplz2g74fzbx75g3kkaetoyiq.b32.i2p:0 -wjrul5jwwb4vqdmkkrjbmly7osj6amecdpsac5xvaoqrti4nb3ha.b32.i2p:0 -wwbw7nqr3ahkqv62cuqfwgtneekvvpnuc4i4f6yo7tpoqjswvcwa.b32.i2p:0 -xfkarmvk43vfkfvhkehy7ioj2b6wtfdlezvmlakblz3q4r7mccfq.b32.i2p:0 -yc4xwin5ujenvcr6ynwkz7lnmmq3nmzxvfguele6ovqqpxgjvonq.b32.i2p:0 -zdoabsg7ugzothyawodjhq54nvlofa746rxfkxpnjzj6nukmha6a.b32.i2p:0 -zsxwyo6qcn3chqzwxnseusqgsnuw3maqnztkiypyfxtya4snkoka.b32.i2p:0 -zysrlpii5ftrzivfcyhdrwpeyyqddbrdefnfu5q6otk5gtugmh2a.b32.i2p:0 - -# manually updated 2023-04 for minimal cjdns bootstrap support -[fc32:17ea:e415:c3bf:9808:149d:b5a2:c9aa]:8333 -[fcc7:be49:ccd1:dc91:3125:f0da:457d:8ce]:8333 -[fcdc:73ae:b1a9:1bf8:d4c2:811:a4c7:c34e]:8333 diff --git a/contrib/seeds/nodes_signet.txt b/contrib/seeds/nodes_signet.txt new file mode 100644 index 00000000..e84fbcf6 --- /dev/null +++ b/contrib/seeds/nodes_signet.txt @@ -0,0 +1,140 @@ +[fc10:efa7:ca6:1548:f8c:6bb9:1cc4:63ae]:38333 +[fc1f:22c3:95dc:a3af:4a93:8251:beb9:1858]:38333 +[fc32:2c16:d0d0:f1fb:3b27:c187:8cb5:9201]:38333 +[fccb:248:11a6:1042:bca:1218:f7ce:7d3d]:38333 +3cxteqanevzjd5iufktxxh3l5abj6fs6udqg3bomphzofqjl4aqa.b32.i2p:0 +kmmq64ijxhaalfpatq7q6yyrf3rdfvjk3tsb5xc2rrmkgdqf3vwq.b32.i2p:0 +nmmoytmmcwq4aclmtrxk3askrv7mgy6l27uw67ozvyolwca2dr6a.b32.i2p:0 +qhlt7irano6s2pjfn2v4qrtynjj4peo7tfsnv2x6bm4e4vowptaq.b32.i2p:0 +qn7uwi6nx6tuakxvzhjnjeuxwpcq6wcv4diecrv63ugain2tdopa.b32.i2p:0 +regl2o33xgkhnuu5ywr7tw72dio46j6tylz7zpdl6pfaqsktboea.b32.i2p:0 +rkf5lugxqdjrxva2n5wl43okxrqmm6prlf7arci4bgg4md55oo2a.b32.i2p:0 +5.189.136.209:38333 # AS51167 +15.235.55.158:38333 # AS16276 +18.141.143.94:38333 # AS16509 +18.216.1.71:38333 # AS8987 +23.137.57.100:38333 # AS1002 +23.226.164.192:38333 # AS3801 +34.16.103.64:38333 # AS396982 +35.217.29.66:38333 # AS15169 +37.27.45.224:38333 # AS24940 +38.88.125.238:38333 # AS394256 +44.210.109.64:38333 # AS14618 +45.32.127.199:38333 # AS20473 +51.79.29.216:38333 # AS16276 +54.255.186.152:38333 # AS16509 +63.34.82.20:38333 # AS8987 +65.109.54.101:38333 # AS24940 +67.209.52.138:38333 # AS20326 +85.190.242.80:38333 # AS51167 +89.155.238.72:38333 # AS2860 +103.16.128.63:38333 # AS133159 +104.248.42.204:38333 # AS14061 +116.163.20.113:38333 # AS4837 +121.78.241.71:38333 # AS9286 +124.156.198.249:38333 # AS132203 +131.153.11.131:38333 # AS20454 +135.180.99.74:38333 # AS1299 +136.144.237.250:38333 # AS20857 +143.42.65.56:38333 # AS63949 +144.24.238.157:38333 # AS31898 +144.24.241.206:38333 # AS31898 +148.51.196.40:38333 # AS12025 +152.53.3.192:38333 # AS47147 +153.126.143.201:38333 # AS7684 +159.203.133.144:38333 # AS14061 +172.105.179.233:38333 # AS63949 +174.50.212.60:38333 # AS22909 +175.110.114.74:38333 # AS49981 +178.250.189.42:38333 # AS214379 +185.148.37.170:38333 # AS48347 +202.182.105.108:38333 # AS20473 +205.209.114.30:38333 # AS19318 +208.68.4.71:38333 # AS397444 +[2001:19f0:4400:63c7:5400:4ff:fecc:fc1e]:38333 # AS20473 +[2001:19f0:7001:48b2:5400:4ff:fecf:6e5]:38333 # AS20473 +[2001:41d0:304:400::d0a]:38333 # AS16276 +[2001:41d0:306:4505::]:38333 # AS16276 +[2001:41d0:347:e00::]:38333 # AS16276 +[2001:41d0:403:4ecb::]:38333 # AS16276 +[2001:41d0:800:330f::]:38333 # AS16276 +[2001:5a8:4164:7a00::506]:38333 # AS7065 +[2400:8907::f03c:92ff:fe6f:ee2b]:38333 # AS63949 +[2401:2500:102:3007:153:126:143:201]:38333 # AS7684 +[2604:a880:4:1d0::352:6000]:38333 # AS14061 +[2604:a880:800:14::3880:3000]:38333 # AS14061 +[2605:3380:422e:1::50]:38333 # AS397444 +[2607:5300:203:7467::]:38333 # AS16276 +[2607:5300:203:a29e::]:38333 # AS16276 +[2607:5300:205:300::1b0]:38333 # AS16276 +[2607:fdc0:1c1:5:632:1ff:fe54:ba56]:38333 # AS20326 +[2620:6e:a0a0:1::71]:38333 # AS397444 +[2a01:4f8:121:4072::2]:38333 # AS24940 +[2a01:4f8:13a:c56::2]:38333 # AS24940 +[2a01:4f8:2190:1692::2]:38333 # AS24940 +[2a01:4f8:2220:1a70::2]:38333 # AS24940 +[2a01:4f8:231:3d6f::2]:38333 # AS24940 +[2a01:4f8:c17:bff8::1]:38333 # AS24940 +[2a01:4f9:3080:3496::2]:38333 # AS24940 +[2a01:4f9:3a:2496::2]:38333 # AS24940 +[2a01:4f9:6b:301a::2]:38333 # AS24940 +[2a01:4f9:6b:47ce::2]:38333 # AS24940 +[2a01:7c8:d008:e9::3]:38333 # AS20857 +[2a0c:b641:6f1:6::2]:38333 # AS214379 +2ycyu2aba3xsqjr35beqporp5f64ntqs2sau2amn5ztq4j5q76amhqyd.onion:38333 +3qeedpzgciv65tdy2tsdmjxswhyep4aj65jtboznf5nnwcyo2lbmiyqd.onion:38333 +3xvum5nnvcchvfxwlbc2it7nbfxhml6ovt7xehjw2potempk2om4eoqd.onion:38333 +4n2rlrrnxcpnfrft4ivlsvsjiahk5ffxizcyfr5amjcqfwt4biitjpid.onion:38333 +5ofovtlx424wnxyoohnsxqjktwqd4i2kiqawox3srsdttsp2pdrx6yyd.onion:38333 +6fy45vxzgc6siecr7en4k6oft4k4ix47jvkxqyzopalzwyphqc3hv2ad.onion:38333 +6ivh4quupqu3w3glr2puyi5bitjapbbl6ehvbjsvleopyy2yzjgp4oqd.onion:38333 +7mgfpo4urwysuafbo6sb3u6vh5f7pkvgddrqohcobhbkblqrrozhn7ad.onion:38333 +a7mvea5xgpknsqaifyvfstdn2utjvph564i6ti3nbdr2cksby5jhykid.onion:38333 +b3sbqhjstq34ae7lsrw3syhxcjdu2ssuf3f3kvbnyrvbp7cvuuopmbqd.onion:38333 +ba3rwqombmuji3wxpmydrk7vcxfpq7pnn5bfw74wvvqyo6rrhwqrt6id.onion:38333 +bodh6zsjtn6kvdk36ukx6fns5hqiiw3zhkqmcmj54nrtkz5tdtb6yayd.onion:38333 +bux5jwkwzccba57zthctdgsuwp5mi3wocxndtuf6jg2qqab3vpnqnqqd.onion:38333 +ckbugjazj2iotosxah7odbxfozxivuk6zu5npf3iwfphvoh5brdjfqad.onion:38333 +cq3td34eu5xjymlxl7aq4rsskxjt4ag267i6mzhdqhdpfzcqctus6aid.onion:38333 +d27tvdmi6wjjlffjyhm5mogwsw3433jxkaiwhti32eagvljdzseilqqd.onion:38333 +dpzlvj7kmbifhbttfe7vwl6fgpy5os62iiznel6eocsaarssudtdzoyd.onion:38333 +e6xhvtrt2ppjfxckbinu7a4jxmy7usjnvjx6st2cipmvlnnhxg7krbid.onion:38333 +ecx2z3x4nwbzjh6dh6vyccljkhnxya2o2o2tz3pzvetxfjjmujxhctid.onion:38333 +ehnxcigc6t34smlk5lftfyb7rntcsbwhlu3pe7ltft76gl6y262ekdqd.onion:38333 +ejgeimjypsfuijpxzy5xpwmmjmkr4izwze6od5pw74csjglflib6nsid.onion:38333 +eqhrqtvxkyjcggbkmzgocynaskblynl2bqeuel4lqs4w3f3rgpfpnkad.onion:38333 +f7xfq5hijqptsdak6qjx3komxrff2hw3xa46d7cs3d7igvm5tylotbid.onion:38333 +fo7cekwzd3ibyoxuo53mfqoxffgfaupg5ydxbl3rofvwxtzbvgy3ciqd.onion:38333 +hztyx76iaz4h3emavmzbuizqfg3q37ehfwr2k3afadtcmcepjsxhmeqd.onion:38333 +immdwqfyz2hhcmxmyypstz7syq2cygaklr43mqjmqefnmtcyuspwkbad.onion:38333 +jahtu4veqnvjldtbyxjiibdrltqiiighauai7hmvknwxhptsb4xat4qd.onion:38333 +k4d6h4eyeqjn35b3x46f4s3g3eykn4bms52paxuxenkre6nmhfvy6bqd.onion:38333 +kklfzzodnlinc3toltn7dlft4vzjf2ckmdw2n3dn4lx3pzw5di2womyd.onion:38333 +litqgemqmpesu6gi2ctd4ubrpxdn4mcm2t6p7xhkfxnkk7lzpdx75vyd.onion:38333 +lkgnafoa5nfd34pzyxpz5gnmpwkbdk5a5h6h7hk3rs53soh6nkb3snqd.onion:38333 +lwiqghlmljzlarwn4gwdrvskd3nibtw63o5ok7ugx4nwuvh7b422ifad.onion:38333 +lxied2447sbmnoi64xbrdtcekdfyneoo3xb3m6vscj452orvdi2cjsqd.onion:38333 +n6tf5dfz25i4pprczevdkyo5bkpgfa3xigenn6skpjqqynbxpxzilfid.onion:38333 +o2fumu43ugk6xayo2nvadn7ohqlxharakt4flqh3hjgxdbwzrwignmyd.onion:38333 +oowqbk36g76cs37sk7myfoq62e7ly42etcfugol3p7haw6ewyn5qhiqd.onion:38333 +ouohm2bcplkfvzgg4f5ltvtqt2obzyvaadb3jep7bb4gasdusqkkupad.onion:38333 +oz5puzgtybzjisyw5kimddtmsnc32zwflkj5r43clfddawunk7wtsiad.onion:38333 +pkpiv6cqqba3mb5cpccdvz5v5p3u5acrjv2zj2u4auzznceqculjrkid.onion:38333 +pmjm644pzkp2khwixyis2c7mnfbte33bnmwxdx5lk6t6owvtmapdbhqd.onion:38333 +q3z526imdoo2pdujkfp5vslshni2niewlbxfokejfkddkezxutagezyd.onion:38333 +qpgnrxuwxc6474hvy3j5uk2hbm3ry4ikwrenoit6zjeqqqythsvjdvid.onion:38333 +qzf5vm2exowrli5ksuowrhshtnef43exhtha76qdxz357hdqfq65zhid.onion:38333 +r4y5pqyvdzq3bzg2fqu46ql4a32fadkftwejtxzckeyohd7wvqnnwtqd.onion:38333 +tev7cdwka3av6ektydsjfpofmcam3r6qcw7sxbpkohckjvihtzp7hgyd.onion:38333 +tgqpfwoxjidlwd5rgpj5zfuhctxrevsfueqndih4vx5hgxpmyg34jqyd.onion:38333 +tsq7clffbfe636zfszymheqgy6tyzbsjogad2qet7qeijua5c53ye6ad.onion:38333 +w7d4rwjt5igozi5v7z2m3in2wm3zsf2lhsizqqohkyrokbbie5equoad.onion:38333 +wevmujl2p6mckcwaxnmtusweros7bu3bxf2g3lzutnfdkjl5gwbu36yd.onion:38333 +ww4jycomjwnf7jtrrrngeahokqkcl32iufmjzvvk272svieavabjyiqd.onion:38333 +xbulvl2bb4wvnlafmq3j3fzrjhsmnfz7ubyvl6yy3syeded4tqiubkad.onion:38333 +xm4kxluodmeolmaugmaxnexnefrg3vsxnqo2ezu7rqmdct7i7xevcxad.onion:38333 +y5f4rtma4uneqrkzkoghoiec2sy3mee44xs466hhsi74w5roccqxlzqd.onion:38333 +yjhagyj65xcxu6b5yktu6ntkwsyd5rhjlrsb7sexq5lzchatdqmoqnqd.onion:38333 +ypi6qgnmabcqlmjfkcnqzpjdjihwmebxkd32tjwt6mrhgm2strfml6ad.onion:38333 +yrzulzu5xxcd2vio34ciyj5h7bpnevikslbunm6yb4tjkty62fxl7uid.onion:38333 +zgkvv542e4ewviremw3qp4bi52f2sxt4g4mrjrbwonbnfb5oujd44lid.onion:38333 diff --git a/contrib/seeds/nodes_test.txt b/contrib/seeds/nodes_test.txt index 5b04791d..2d6a0e1d 100644 --- a/contrib/seeds/nodes_test.txt +++ b/contrib/seeds/nodes_test.txt @@ -1,89 +1,219 @@ -# List of fixed seed nodes for testnet - -# Onion nodes, last verified 2022-08 for minimal torv3 bootstrap support -24j74ahq6ed4wmfrghdwroyfzimlkhnrb7zh4zw3vl2allzxbjrhaqid.onion:18333 -2fy74te65gm3c3gv3u5mhwdudvbdfh6k5fdz4gduimrltjjrxftbxrqd.onion:18333 +[fc10:efa7:ca6:1548:f8c:6bb9:1cc4:63ae]:18333 +[fc1f:22c3:95dc:a3af:4a93:8251:beb9:1858]:18333 +[fc2b:f62e:6a76:cdb5:dceb:2fdd:a0f8:3d88]:18333 +[fc32:2c16:d0d0:f1fb:3b27:c187:8cb5:9201]:18333 +[fccb:248:11a6:1042:bca:1218:f7ce:7d3d]:18333 +66lkz2cfzyrz3tde6gflrty63jqr4knyy6uv4dvldrsecpnfx4dq.b32.i2p:0 +hedmbfis4h4inqrwo2uzmku5xu6xaq74tg7sofnetqikdvndtvja.b32.i2p:0 +i7vrfdmgolc6dqfmsak5fvwgmn46y4ghtan44uhn2aw66cbk5nfa.b32.i2p:0 +nhla3xzibmhvav7meemluh2d2jxdrlwicq636a2sohwqhrfgqi4a.b32.i2p:0 +o6j3b33bv26vthoqzjy3h7a3qsuqbtbe3ulajmjzsl43vaqyieyq.b32.i2p:0 +ocqipbbxx4paopgkkbnj234ie7opzrtca5gtiwr6oda3h32rzgsa.b32.i2p:0 +xgctj4seo3ofstiymoyeuzq74bvddrbr6jtia6erodlf5va3cz5a.b32.i2p:0 +xy6ytjxel5ku4naqumj4f6hn4agrzh3w44gqcs6xkkzwm5s3jdgq.b32.i2p:0 +zklt7hncdrl2hupfwnlbt3qaayhjayjhvwvj2m3fok3z36tlnxhq.b32.i2p:0 +2.59.133.20:18333 # AS58212 +2.86.50.136:18333 # AS6799 +4.246.195.240:18333 # AS8075 +5.39.218.162:18333 # AS57043 +5.255.97.91:18333 # AS60404 +5.255.97.92:18333 # AS60404 +8.217.160.32:18333 # AS45102 +18.168.119.254:18333 # AS8987 +18.209.9.240:18333 # AS8987 +23.227.223.209:18333 # AS44486 +27.148.206.140:18333 # AS133774 +34.65.45.157:18333 # AS396982 +34.69.221.24:18333 # AS396982 +34.254.97.244:18333 # AS16509 +43.133.47.138:18333 # AS132203 +43.247.184.50:18333 # AS23724 +44.208.161.158:18333 # AS14618 +45.77.25.14:18333 # AS20473 +51.79.82.75:18333 # AS16276 +52.193.79.181:18333 # AS16509 +54.236.59.55:18333 # AS14618 +59.186.7.131:18333 # AS3786 +62.210.207.63:18333 # AS12876 +66.94.114.229:18333 # AS40021 +67.4.82.9:18333 # AS209 +69.61.32.242:18333 # AS141518 +69.197.185.106:18333 # AS32097 +70.114.196.140:18333 # AS11427 +72.211.1.222:18333 # AS22773 +73.22.9.231:18333 # AS33491 +74.118.136.46:18333 # AS20326 +85.203.53.149:18333 # AS39351 +85.208.69.12:18333 # AS42275 +85.208.69.13:18333 # AS42275 +89.58.9.219:18333 # AS197540 +89.155.238.72:18333 # AS2860 +90.79.184.226:18333 # AS3215 +91.109.204.214:18333 # AS199669 +91.123.182.164:18333 # AS51648 +92.115.99.159:18333 # AS8926 +122.208.117.197:18333 # AS17506 +124.236.16.91:18333 # AS134760 +129.153.149.46:18333 # AS31898 +129.213.114.91:18333 # AS31898 +129.226.198.211:18333 # AS132203 +134.195.89.130:18333 # AS63473 +135.180.99.74:18333 # AS1299 +137.184.2.124:18333 # AS14061 +141.98.219.199:18333 # AS20326 +147.182.251.92:18333 # AS14061 +148.51.196.40:18333 # AS12025 +148.251.4.19:18333 # AS24940 +149.202.79.199:18333 # AS16276 +161.97.119.128:18333 # AS51167 +162.55.243.11:18333 # AS24940 +169.155.171.252:18333 # AS44486 +176.108.193.97:18333 # AS47914 +185.28.96.16:18333 # AS59845 +185.44.206.111:18333 # AS44051 +185.107.68.135:18333 # AS43350 +185.130.224.146:18333 # AS57043 +185.186.208.124:18333 # AS206428 +185.210.125.33:18333 # AS205671 +186.154.207.228:18333 # AS19429 +188.117.132.82:18333 # AS31242 +188.213.90.149:18333 # AS206238 +193.30.123.70:18333 # AS197540 +194.9.6.11:18333 # AS58212 +194.95.66.129:18333 # AS680 +194.110.169.133:18333 # AS203576 +195.154.241.13:18333 # AS12876 +200.143.224.99:18333 # AS1916 +203.132.94.196:18333 # AS38195 +205.209.120.167:18333 # AS19318 +206.204.104.7:18333 # AS212947 +208.68.4.71:18333 # AS397444 +213.199.42.73:18333 # AS51167 +216.219.91.82:18333 # AS19318 +219.117.221.162:18333 # AS2514 +[2001:41d0:303:146e::]:18333 # AS16276 +[2001:41d0:306:4505::]:18333 # AS16276 +[2001:41d0:306:a3a::]:18333 # AS16276 +[2001:41d0:700:544c::]:18333 # AS16276 +[2001:41d0:800:1d55::]:18333 # AS16276 +[2001:41d0:800:3e7f::]:18333 # AS16276 +[2001:470:1f05:4e5::2020]:18333 # AS6939 +[2001:5a8:4164:7a00::506]:18333 # AS7065 +[2401:c080:1000:4cb2:3eec:efff:feb9:8604]:18333 # AS20473 +[2401:d002:3902:700:8708:37c4:e231:d3d8]:18333 # AS38195 +[2402:1f00:8101:713::]:18333 # AS16276 +[2604:1380:4531:1700::5]:18333 # AS54825 +[2604:a00:50:58:216:3eff:fe2c:8371]:18333 # AS19318 +[2605:3380:422e:1::50]:18333 # AS397444 +[2605:4840:3:2c23::1]:18333 # AS63473 +[2605:a141:2239:7674::1]:18333 # AS51167 +[2607:5300:205:300::1b0]:18333 # AS16276 +[2607:5300:60:85a9::]:18333 # AS16276 +[2607:5300:60:8702::]:18333 # AS16276 +[2620:6e:a000:1:43:43:43:43]:18333 # AS397444 +[2620:6e:a0a0:1::71]:18333 # AS397444 +[2804:431:e038:cd01:aaa1:59ff:fe0d:44b8]:18333 # AS27699 +[2a01:4f8:121:4072::2]:18333 # AS24940 +[2a01:4f8:160:1083::2]:18333 # AS24940 +[2a01:4f8:173:1ed8::2]:18333 # AS24940 +[2a01:4f8:173:230a::2]:18333 # AS24940 +[2a01:4f8:190:4026::2]:18333 # AS24940 +[2a01:4f9:2a:309d::2]:18333 # AS24940 +[2a01:4f9:3070:26e2::2]:18333 # AS24940 +[2a01:4f9:3071:2154::2]:18333 # AS24940 +[2a01:4f9:3071:219d::2]:18333 # AS24940 +[2a01:4f9:6b:2768::2]:18333 # AS24940 +[2a02:c202:2238:2255::1]:18333 # AS51167 +[2a02:c206:2239:7671::1]:18333 # AS51167 +[2a02:c206:2240:1506::1]:18333 # AS51167 +[2a03:4000:2a:514::]:18333 # AS197540 +[2a04:52c0:102:2219::1]:18333 # AS60404 +[2a04:52c0:102:49af::1]:18333 # AS60404 +[2a04:52c0:104:160c::1]:18333 # AS60404 2lsncqdflwk272dhydrxf7ikfy23ppnmm54dnynyxiym6lqf3wowrmqd.onion:18333 -33o6qaidta7s2pmltet6vynd337vamgcifhh44rehwwxqpflcjt2njid.onion:18333 -3oo6bsc5mvf6a6ypmoaikilta6ka7mbdhdwhrnqhuhjlbaxyedvfvaqd.onion:18333 -3pe3fyklipy4sppkkgnhc22kcxtt57uler5kv72t676bbrwmcseo5qad.onion:18333 -4u4mcz2sfvxs7pwcwncswgmmcdzqtzjx7ztfo332jv4pqucb22ikdhad.onion:18333 -5v3i2kfqiqwp75gznjoptss7qgrcgseceqxpzpqkd34qeqzrg726i7id.onion:18333 -5zlrxk6q24t4vz5k4ie7gtuasdjavhoelhinzimxbfhc77u7vafipsid.onion:18333 -67s3af64ehw7xnxv422axm7tns4d6kutrftc6bjq375n74q3kj4pp7ad.onion:18333 -6a4ony53julvnufo632ktgmwvhupz63wbdwx7n7qudjy32qyq6gm3bqd.onion:18333 -6ftyg3nhc6tn2hyzls6zfdsfbroczhkxtdqumqb5q4yafhy5rdpapbid.onion:18333 -7554uw5djruh34j5ddx3iprzgqgzypcjtptwoldymfbgoywqcw2wiwyd.onion:18333 -766lozlabxaqjpbqsvt6sn3c65n6gkwwhoxyvggj7nfwnmw4cpaoccad.onion:18333 -7blv5abnytdf47yvbhxmykprmvjryqob65i2jmdwq3rrajcn2iiysbqd.onion:18333 -7v2ja4igx4v5y2jr6jrr6gaxohjhlzhvgwe4avlraxchozf7ea3kruqd.onion:18333 -7zgbmtzxow2oevd5aaqtsormw7ujv4zprl3oi2355immhq4gk7cyw5ad.onion:18333 -adstabjz7ec2y3jt4w2dvummowzv7g6m2f3kajeejffuaz7ojwj6epqd.onion:18333 +2mvycpm7ni6ix2pr4lkkfkqlivgo77mt4jx3s3dmhdlg3ogq46s6qbyd.onion:18333 +36fwktckggarkclbpu2pumsdpck46ahe6cwpozd2gm6q7kgdqljclmad.onion:18333 +3dt6kgfrilc3nwliwy5wbmc6oa2b5y3t33nkxlrxrkunr2hoaj56kgyd.onion:18333 +3vnbi5o3hyzk4cm3hhnyo3h7tclr6pybmhmqwkbyclslfhqtg72pq2id.onion:18333 +44sgcv5dvpplt32enlneddyl4gd4z3tbezl2scedwccndyzrrp6lcgyd.onion:18333 +4w3f2mxe4ftodocermsazs3qlpo37igkdgne6ka2p6wnnrgwpzqw65yd.onion:18333 +5axx4qyub7qtgssrvbbqudu6uqjbuknbvbld2wdscv5p6kh2hsfzjxqd.onion:18333 +5qdgulsryjejkjinocpvknazwtnbqtuf4f4pui2at4jpedwwpg427qyd.onion:18333 +67l6l2k7mqbl2btyvo5h5lki3kxcrgbunlk7brcloyaoaftbs5mnsuad.onion:18333 +6bhop3n32rreiynu35epznhc2exxkhuleromdhnida2hgmu2bhczgmqd.onion:18333 +6fdbuqf2kgeweeoeikmwfezauys657lzezzus4nxmekkumouptg5ezad.onion:18333 +6rnqpqqcpllqhjoa4gwrtq5yi6fdch6uqzapdee2gq67gxgsl73v4uqd.onion:18333 +7ph7mrc24te57mvppajfkfj4mk7zuz4teukymt3wgpdpw6vpndeivtyd.onion:18333 +7poqajl6svz4vr3aqi7vdtar2t56crbrtj6yi75ydrt3ighyx7q6qvyd.onion:18333 +7zlqrihb5do5ebbmjwgspxigqfdmkfslkqtg2ngdc6ypsunzb4iootqd.onion:18333 aesy6tfufadkut6flu2bsqgnw2422ur2ynjalguxlzuzuktg3zehttqd.onion:18333 -alxo32b5edi3bn2e224qrgytgxxpic4knyipvpdvctfsrvcaiq5lgeyd.onion:18333 -aoeart34umoonvd2kbqr3bc4sweu6a4msh2gp4skyqvei3shzcxbgmyd.onion:18333 -aprzvj7hgctsde4mkj3ewq35gvykspjvkqiygg7bpnw5tkvse2n7rhid.onion:18333 -awpk6z3xghx6ozouhodcydaqtr6uzzbnw4creuix7mkupxoxlmhhspad.onion:18333 -ayynqazucyh2jd5rehcfggmhunqpdwzlbhzbqgy6lj4ctz2ocj7chpid.onion:18333 -b2ika53aqckv4gs7wmog3byrea2vfzm5p7ye33digcsmvvnpbyqmzoyd.onion:18333 -be7zx3hh6dlahorlvsrrgqm4oahfrgqm2tbwnbd4u53ntu5f765n6hyd.onion:18333 -bluk62wj24bsvdwh47muo54hhwsatkftiqxevt5kba7hstjoex6ueeyd.onion:18333 -bubm6fiopfzkxqrfx6vqpioe5ahlhyubz57ogsqqy4ha5pnngiqlh6id.onion:18333 -d3czabzjj57lgrsr5gawkjd7v3gznrqa7zyizqmk4lryascavmipnyad.onion:18333 -ddj4cuvb32ve5chtp6jattcdnnmxmpoofjthzi7thgxxht7yqoetj3yd.onion:18333 -dqhhlssfwmh3g6zhwxpcfbw64xz5rfikcglinbhoxv5ajv4qzicjyeid.onion:18333 -drthcyb4x4rdfekw5g7xjogxi7aqoluilgulbgwvsme3nw3oibvchbad.onion:18333 -dwb47cmqa2tjpmvjaear7gdcars2lez6niefhi4qf22qehtyta6577qd.onion:18333 -e7tkrf54ng3q5vcn5gn77zwjwm74lkfav4mwdux3pvon6yvqg3tf46qd.onion:18333 -etuymy47s3quepvdaoo72i5e5mc7uovrzu5m4jf5q6mwlwizoxy4xgid.onion:18333 +axaaplqtf4z22xfj2j2xn6fhtj6ksv74bs7vae6rfw67qofdnqoacbid.onion:18333 +ayx35r2mhwydczzoqu7b6dl3sup4oht74sgnlrjkxybzh2hmfnaix3qd.onion:18333 +bizdwmm7naqq5pehkbfggznqtena5eodz3kprvsbj4nkkax4fvxx53id.onion:18333 +bjqttlyt5kxcn7sitpiavf2cuhdf6rlwigericlh7um7gzkqyyefqnqd.onion:18333 +bkzo7mpxuar7rhsbiwdaxqcymixarcbdmb3sdaqtv6yb2svqttz2s6ad.onion:18333 +bzn63lsmsuvzlg4uqadyylxaggdcrzkb56muw2b43ft5qkynvzfopbyd.onion:18333 +c7zrq2yqt6rtn5dxkczp5bv62k2jncv3mscoo24c24rljbplr2dvhsid.onion:18333 +dskf46hfkefyr6nio5gtqp7em7rh6aqwrugdegfooaoxcux5ym6bkuqd.onion:18333 +euvmh5f637qwqgktjs5zwauvayybfdkiopnflnh5yjt7ouqat3427pqd.onion:18333 +f472j4pynbgltb63mr2lhyvhecfqdjdcfmr2s2id4rreemyn32xtjuid.onion:18333 fbimesnyhzubbzqc3uaufzkbyfmnkxvypoxaveaub7rzpzh2foxrn2yd.onion:18333 -fzbrwmgwmko7quelrhfuskt3ijabac76zx7g52dfrevmhdkj6ivh7qyd.onion:18333 +gggan3nuzxpd655lafnsunqfxgy56bvsxuuzucgmaowyvq3d7a7o7jad.onion:18333 +gsw6sn27quwf6u3swgra6o7lrp5qau6kt3ymuyoxgkth6wntzm2bjwyd.onion:18333 +guudgx24aokistytvm3hj7u5cbvdkr2b643r5t33pa536ekfn2lfykid.onion:18333 +gwtx5qluopwaxjhedlifnr6pptw2eihojzhq3stnv2gfbvqbgqdhi5qd.onion:18333 gy6nih4pmp5esyvvnhlj6qvk7zkbjuoswkxffyiip3dbkvsfxwz5zcqd.onion:18333 -ha62ziqzqdogd75zg7lfh4fqrg3bim3cpqzyupo43w5pw4fen6nr2pyd.onion:18333 -hacjjgj2mbqqrthzimmi6anvin7dljjhfl3ik6ebg3w3nmgsvr3ymmqd.onion:18333 -hbkp5xwpqo4qm75kpglfrclyiuuvdgv7mtiqfys7oqks4dmpqgpeoeid.onion:18333 -hqgoy62hoqjmz37brdfvoeov3cix5fixbqjoert4ydr6herg5oc3iwyd.onion:18333 +hj2txlxajdlh7jsfwqxtp3cltlptsr33ctjkbxhbzbyirkmcpfhsnyad.onion:18333 +hjwzovgwou3py6ncemgmzpvcihay5cuzuxvqdn74axndmll25p4mwjqd.onion:18333 +hqkdgpzzsv2qvafhdkdocszquj7o2ittxfmm5fc2arxqw7ikottozoid.onion:18333 +htkiqaqoql7pjstenmw6v4blm6l57d6hl6mewxkmfi3qumozflx3gzyd.onion:18333 hvbmmzvqrpgps2x5u4ip4ksf3e5m2fneac754gtnhjn2rsevni6cz3ad.onion:18333 -hw3vzp32w4h6giplue6ix445oi6wt7gmeksrznb7tdfwhkgit7gnbbad.onion:18333 -iddr66ewkhenivapgianudjkwqcp6dxtssg7ixrdot5az6uh7m5tmjqd.onion:18333 -imya36iexiiiqrkwuxxcehnv4kg5shtirwd2vg4cnjy6lfjlph3fusqd.onion:18333 -iuhhuocns7entrzlxsxktyz2ibs7hqgiggv6sauzqkzka6laslwz7oqd.onion:18333 -ji5wmshokuc63eiulzlwj2zdvnligvrwfvvc76bice3tu43wfzvpmkyd.onion:18333 -jjfuyj7krgzkmpxvn3b2j2hwlzkmze3ezy3ifwk7dnswwawgmzqhjrqd.onion:18333 -jn2p4sgfphkxpow7kjrubrbqat77kkibzqkvuwhxyalcrazwmcqeaqyd.onion:18333 -jrveyz4us6sog6e6czsvr5mvvhgzjgv4idbe4idrolmqeudvt5a2dgid.onion:18333 +hvtxymvdb55u7lhdw6775akqy46inunl3uup27gnsxm2bqmv55wbacqd.onion:18333 +i5fjp7ggx62zlfkibzn7s6glpjp3h2ypfom3lmqixig7qbdgej35wfyd.onion:18333 +i5gphw2d224tniqkjebxdwz5ygbbo5gcushoyevv7x7o454b6qlrzeid.onion:18333 +iysx2dl4tpojiclh32iyhel6z7h227c7o7buzk5wuqw6qhuytvsu66yd.onion:18333 +j53y5paeb7xcrptntut7epccjglduquldjlzjlho4lj2msabnygrljqd.onion:18333 jsc4frvvnl2d3bhzyofsc72xpztgm23nl4fnb4dwkzsxr6fhij2q5iyd.onion:18333 -klymxdvje7kccv3tznabo3udopsftkmjemkbi2urqxjm4hefaudejjyd.onion:18333 +jtvqgaccxbtzshtulk5xlsb4wkoil3psmpn5avqyp2i5vm4hqh5cicyd.onion:18333 +jun6gdmbgasr57bhr4zs3dfhc6pzpaw27nqb4dadbai7yrbq55zskeid.onion:18333 +kamanho5clcpn5l3sc6ih3vb4skmfhgxw3h2mgs7e5idfezu5dw5oxyd.onion:18333 kwjxlauwjtecjfsiwopbl5pvn5n6z5rz76uk6osmlurd3uyuymcw7aid.onion:18333 -lc7upz2srw2yhpcvwg4afy64ylcoo6mfwlttqj5ovuglqnhnohpi5iqd.onion:18333 -lf3mpxfyjuovcqdvinl52pvdmmda6xqyfeiarlfamdjpgy3ouzmmlbyd.onion:18333 -mc7k47ndjvvhcgs54wmjzxvate4rtuybbjoryikdssjhcxlx27psbyqd.onion:18333 -mjbg3ggeuelmc7ixty3zjccyo2urg2uyherfqe7ytkm2ejkwlec7h6ad.onion:18333 -nkyqozv6kdwi423s7s2mezzguf5bafot2a3hv4ed2dbvtblisdmad4qd.onion:18333 -nvvqo4xxiwgb3y246jmcbuuveurfdq2zs3a5y7veqkeqv5jfhang7gyd.onion:18333 -o6vfovqxz3oxszfppczpjejwouobztjrgvfojc3emvhan3bkyskzhuad.onion:18333 -oaiw2lnhzgp5ry7ivzneuufmh7lfploquu2rjv5rozmlbefedsnxe5qd.onion:18333 -oln7ybci53wk4g5n42nipyixvyjxbludsbrfsmhnirb6tk7ovlikd5id.onion:18333 -otmfnhc6wrrbf2tpdy6zkisqc3r3urnsuowsnmatoto6yixaocnkseid.onion:18333 -ovc6sajbqfcbwv3wrq7ylklu6q6prvisz4jr4lyycn4kgukzjfe4mjad.onion:18333 -pm57didyzg5ljuvn5ufr5uun2iencuk3af2gzqc5zvgfh452c3rxtjyd.onion:18333 -pmismhpwug34gnqzbutranvx2wjwbshyqj4un2dyzyuvak2eh55psfyd.onion:18333 -polarisultijjhaku6z6u7jyboho5epdsg44ttebfaxmgau2z5sqolad.onion:18333 -qe2jbe447he6panfvpyqhyntf7346gmuf55bxrmdzggmgwyjsyknhxyd.onion:18333 -qz6yd5lsgdajcteoareeptwnipxsezyx5kks6ukpk5tvqinffzunqmyd.onion:18333 -rp6pn3b3oesyr2giolbysbjhqeugxntsu7crnkth4y33ok4zvcl7yrqd.onion:18333 -ujdchuw3hz5gkbouiv4p6pwbfdn7v4k6gluwvd4wiukqc7y7ow754uad.onion:18333 +lka74booetkbmat2q64haawcytbwx7mnctvo63ww4jgi4yuqnl6p3kad.onion:18333 +lwfecq35ocqjfbdq4h2qmcwl3cfcyiyycxtvrz36ihdbuczehi3bmrad.onion:18333 +n23anw4zb7f3paroac626oc2sqy3yn5kjfpcqvb3lvdyx7dzzpovd3id.onion:18333 +n4e6fp6xoyo2glsafjwbaq3wirhldpjw4mskn5lzkm4o5lhh5n5k7uqd.onion:18333 +nmazvezejolohnbza4rmqrwvjcprhi7w22fqvlbxp5sw3c25xy3dunqd.onion:18333 +nyrekcbm2ici6wv2umogtmwg7o2ivu4vm7bpcge5fayos5l377zldlqd.onion:18333 +o4zdqfdoe4jfvn35twqtjkzmptmk3bsg45sp46wuxanceg3euqtwdjqd.onion:18333 +ohqcfz5kk6ufouxmhtq7nxyo2lyui4vjlhr2kftvra2ewgzxu3hsrxad.onion:18333 +oobwtn5csi4auevb2ns2b5rrjnxmhlzdmay4zxtzvkj7tayrgwfddiqd.onion:18333 +ppe2pepzphox3swftj5lbyi7ckigspbih5qnyuhrb3r6bn3g7k7bp4qd.onion:18333 +pqkhkpkvqmjcql5jccyxg5nahow6vixnjrvtsc6clnk7dab4weknvpqd.onion:18333 +q5qox756id5nfdu6ht4dghc35jezls4bgjcdnrds3pwndvdx32zmwlad.onion:18333 +qiep4hvuovedbbc36hl7nwslwi6ah6uw4nnseyjdtc73cc5rfdauvnad.onion:18333 +qzx5f2ig2rk2ssrbopz2zlljq5mkeh3izhhx3t3cepse5qnhvpo2tzid.onion:18333 +rfi2hdpjhhknalltbwdvyuhskh5yjs66rqzpy6ley7xtu4kvbeob6fqd.onion:18333 +rw6reu6rdetz6rnpzoyn2hfy7sxpbja4v5ktmaicqqgszi2eata5lhqd.onion:18333 +s3bxrurro4bmvsmntw74qf4vw3xl25xtnvqegayvlwj3b6t7d76kkwid.onion:18333 +slpigm5ep4zan3a65bybne67phjiyesbuk5s3bodefuhnx2cfdtit6qd.onion:18333 +sxm6kwrdp6f2ggaozhrl47xuy3es3sgm3ivppmh4xm3hfmetvwbyrcad.onion:18333 +t6hfkkujktjyzpepmphskoaivflu6fieyuxrshxfzwriwvoa2uccvvqd.onion:18333 +ueyykmnyqk2bnmbgvmqrb4jfbjvpgeew6cuq4gaqe7v2oiyxaubkx4qd.onion:18333 +urhagmjceyqbzhjitpa7j7mygivxw3wlwqzkibw6zezrxeantkikgcyd.onion:18333 vctlwaqgmu53eutz2hewuakcipfgtyljsd7czut4dd62xr3rp6fqezad.onion:18333 -vf5ur53tzmdtotvkndcgochklnuav7quqjvkc6mctqfvef6wnmn26mid.onion:18333 -wnxgjgjgplv5iu4mssyuunycvku4qnqr5t4q6cfdt47k7uwrfifuirad.onion:18333 -wpkbkdr7clw7zk3jkwiult6bf422j54u77ml4rgig2xq7icogyrcspid.onion:18333 -wzpdt24tdark26eugredddorik3tqwcj5ialtt2yim4ceiuiq7phkyqd.onion:18333 -xgapnikkbldoggjh5ewxkyauhuwnvf3xkspxroe3ojvfrk4lswkyx5yd.onion:18333 -xkvzdhcirontixbq6pjhru57bf4sgtqylvphk25csfrsy5p5ay3oc3yd.onion:18333 -xnipauenw5wnjb2zbx6v6umgvbb3g6xhf5kjo7pnyn5tdzvzaxtzicid.onion:18333 +vi3z4khdvopuiljdjdhpetnxztuzsct2aacuzcm5ba27h4j3cfwsvjad.onion:18333 +vqnkdmpmecc5kondj32jwbemmruhmd5gkmfngkscetibzozryp4elkad.onion:18333 +wgc4wp25gtnb54vd7x5h2xtetzrdoiizeyyh6fv3vxzp3bbalejbd3ad.onion:18333 +wpsahjbejxehpz772kzxonj777pejol2akcicduqov2r7ktm2b6l5pid.onion:18333 +wui5m2y5b7cms36ai6shzyqsg6qteejwmxsf26nyms6vcykxbvmh4uad.onion:18333 +xafcyh6mxwebvcsgw4wcbuw7n4v7vbqhcznhwqcpqcu6dww2mjuw4nad.onion:18333 +y5h652jz6sgmb4bkcfnfxnj24gnczqf7lhd5lqbvdhf5mpll4gye5kid.onion:18333 +ya6s7ov7myixz3ql23u45hty7moxo3r4d26qainw55z656vtau676xid.onion:18333 yda7kwpii33j2qpq32ftf6lp22znknswipjwaccvsqj7l337jvfesnid.onion:18333 -z3j5foswuhpmtrg3kb56stkzmuoaesvd5jz3eztq46c4cidapglcyuad.onion:18333 -zcep44k7unwjm2wxty4ijh2e4fv5zgbrvwlctzyaqnrqhltjfzrtodad.onion:18333 +zcsn3j6aswnrf56xj2n5jn4tlwmyoq4benjn5ujcgz46co2y5tm642id.onion:18333 +zefnna2a3ga4ez2nutvypma7my35prw3ycinbqwva7v4pf3aurqhjcyd.onion:18333 +zhiju2obxifqpjbcm6xtlgjdbof7jhoctvw3x57vhiftstb5hi3gmsqd.onion:18333 +zkqddzui5pkrqvjj2zwsf5kln7stlbmw5pmn6ut46fobvzyv2sn2ryid.onion:18333 zmvizz7fd5hdue6wt3lwqumd6qwt4ijymmmotfzh75curq3mzjm53hyd.onion:18333 -zoaa3x7quyuijggii5zl4uyeioodudsgtr2uyv2qtdsslac5ukiwlxid.onion:18333 -zovauxlorl5eswumbsoxv2m5y3sm3qlk7657dcpr2uld7xf35en46sqd.onion:18333 +zmxlrzoxg4fmso6l2xuq5tdxmlyakdqellzujh3a23iuzg4zlatnogqd.onion:18333 +zsmxmusdzrcqusk5h6syfq6a3ph6lwx3wpiltun4dmkrt3pa2fp7qaid.onion:18333 diff --git a/contrib/seeds/nodes_testnet4.txt b/contrib/seeds/nodes_testnet4.txt new file mode 100644 index 00000000..98608b29 --- /dev/null +++ b/contrib/seeds/nodes_testnet4.txt @@ -0,0 +1,151 @@ +[fc10:efa7:ca6:1548:f8c:6bb9:1cc4:63ae]:48333 +[fc1f:22c3:95dc:a3af:4a93:8251:beb9:1858]:48333 +[fc32:2c16:d0d0:f1fb:3b27:c187:8cb5:9201]:48333 +[fccb:248:11a6:1042:bca:1218:f7ce:7d3d]:48333 +7rn2pojst5aurdaes2qcwiigis55ewzjjhxfbxnua5calwuigxdq.b32.i2p:0 +a7jpzmbtvn5qgvnxez2zc4nvabso4xmllbrqmuoavxz537ttbdtq.b32.i2p:0 +augssnqnvo2w66vbrfzctc5rnhaxe3io7wnkvr5xp6wwkxmrggra.b32.i2p:0 +axxwcwzqlw42hjbpzupvffvdsjvniyt5apyt53sdxijqy6y6pdha.b32.i2p:0 +nl2qej33ywfqllz3exxce5jxmz35cnovhh6qobwvfc7igm2vdz2q.b32.i2p:0 +q376dmbdqpt4qgwf6za2ai7c4fs3va5tdmtb3ag6awk6wnv4mqcq.b32.i2p:0 +rdpe5wgl565yvgeialkhlf53akawdm7npy6bl7asl2ncntoyn7la.b32.i2p:0 +2.59.134.244:48333 # AS58212 +3.235.188.91:48333 # AS14618 +3.250.145.197:48333 # AS16509 +5.182.4.106:48333 # AS49505 +18.175.220.215:48333 # AS8987 +18.189.156.102:48333 # AS8987 +34.232.31.111:48333 # AS14618 +38.242.219.220:48333 # AS51167 +45.94.168.5:48333 # AS400810 +45.142.17.140:48333 # AS206238 +50.126.96.22:48333 # AS27017 +51.79.29.216:48333 # AS16276 +51.81.245.218:48333 # AS16276 +54.78.90.72:48333 # AS16509 +65.108.39.171:48333 # AS24940 +66.94.123.141:48333 # AS40021 +77.247.127.71:48333 # AS62240 +78.24.181.215:48333 # AS49505 +82.67.102.15:48333 # AS12322 +89.117.152.94:48333 # AS46475 +103.99.168.207:48333 # AS54415 +103.99.168.211:48333 # AS54415 +103.165.192.203:48333 # AS142052 +103.165.192.206:48333 # AS142052 +134.195.88.56:48333 # AS63473 +135.180.99.74:48333 # AS1299 +138.197.188.212:48333 # AS14061 +148.51.196.40:48333 # AS12025 +158.220.90.103:48333 # AS51167 +168.119.150.247:48333 # AS24940 +172.234.197.251:48333 # AS63949 +175.45.182.145:48333 # AS133159 +185.232.70.226:48333 # AS197540 +185.254.97.76:48333 # AS58212 +192.145.44.30:48333 # AS197540 +192.241.131.95:48333 # AS14061 +193.107.109.220:48333 # AS214379 +199.119.138.36:48333 # AS216382 +199.195.248.11:48333 # AS53667 +203.132.94.196:48333 # AS38195 +208.68.4.71:48333 # AS397444 +209.146.51.202:48333 # AS174 +209.146.51.203:48333 # AS174 +[2001:41d0:a:555c::1]:48333 # AS16276 +[2001:5a8:4164:7a00::506]:48333 # AS7065 +[2001:df6:7280::92:202]:48333 # AS142052 +[2001:df6:7280::92:203]:48333 # AS142052 +[2001:df6:7280::92:204]:48333 # AS142052 +[2001:df6:7280::92:205]:48333 # AS142052 +[2001:df6:7280::92:207]:48333 # AS142052 +[2001:df6:7280::92:208]:48333 # AS142052 +[2001:df6:7280::92:209]:48333 # AS142052 +[2001:df6:7280::92:210]:48333 # AS142052 +[2001:df6:7280::92:211]:48333 # AS142052 +[2001:df6:7280::92:212]:48333 # AS142052 +[2401:b140:4::92:202]:48333 # AS54415 +[2401:b140:4::92:204]:48333 # AS54415 +[2401:b140:4::92:205]:48333 # AS54415 +[2401:b140:4::92:206]:48333 # AS54415 +[2401:b140:4::92:207]:48333 # AS54415 +[2401:b140:4::92:208]:48333 # AS54415 +[2401:b140:4::92:209]:48333 # AS54415 +[2401:b140:4::92:210]:48333 # AS54415 +[2401:b140:4::92:211]:48333 # AS54415 +[2401:b140::92:204]:48333 # AS54415 +[2405:1204:c235:9700:605f:5035:d51b:b05b]:48333 # AS9824 +[2405:1204:c235:9700:9141:402c:de91:81c0]:48333 # AS9824 +[2405:1204:c235:9700::6c]:48333 # AS9824 +[2600:3c00::f03c:91ff:fe5b:4cf3]:48333 # AS63949 +[2602:ffb6:4:8185:f816:3eff:fe4a:acbf]:48333 # AS174 +[2602:ffb6:4:8185:f816:3eff:fe4d:6dae]:48333 # AS174 +[2602:ffb6:4:8185:f816:3eff:fe50:b078]:48333 # AS174 +[2602:ffb6:4:8185:f816:3eff:fe8a:3155]:48333 # AS174 +[2604:2dc0:200:13da::]:48333 # AS16276 +[2605:3380:422e:1::50]:48333 # AS397444 +[2605:a141:2240:4224::1]:48333 # AS51167 +[2607:5300:205:300::1b0]:48333 # AS16276 +[2607:5300:60:7f72::1]:48333 # AS16276 +[2620:6e:a0a0:1::71]:48333 # AS397444 +[2a01:4f8:172:33c1::2]:48333 # AS24940 +[2a01:4f8:2190:1692::2]:48333 # AS24940 +[2a01:4f8:262:139f::2]:48333 # AS24940 +[2a01:4f9:3080:3496::2]:48333 # AS24940 +[2a01:e0a:e6e:6bb0:2e0:4cff:fe68:232]:48333 # AS12322 +[2a02:c202:2234:7688::1]:48333 # AS51167 +[2a03:4000:42:22f:816:bbff:fe4c:d4a1]:48333 # AS197540 +[2a0a:8dc0:a000:40::2]:48333 # AS62240 +[2a0a:8dc0:a041::a]:48333 # AS62240 +[2a0c:b641:6f1:8c::2]:48333 # AS214379 +2sltzrq7ts5t4il5nimp75og2jksbwdjmgbdykz5ljeoqrxemzlakeyd.onion:48333 +4uzerod2wrqtjuaea6vr43uddq2sg3cgfuk4khqotqsqdsxpwdmcphqd.onion:48333 +57k43lgf2ciorl7gfz6qu3yo27zdkojd7lbzrwzcbksq3uujts5h6uid.onion:48333 +5fkz5ijh76cgfwvxz4pyl4br4hekqflijz7d467ldey3xme2trqrgjad.onion:48333 +5p6eqvrins6vj7q3tpdljhtomu6nqameilbuz5sjnu2i333ve2zpnhqd.onion:48333 +5sdzs2qu3ygb44jwo45y2kmbnqc6ijzpndaqn43zgngsiwq7mx6b7yyd.onion:48333 +6g6dwtby74ic2ggnzkbfqy7saslopho7or6z4uad737c2tq24fj3ltyd.onion:48333 +6po3e27t4nxgls3mwnostpy47crhtc3ae6fcsn4yyfh5dfcaq3q3q3yd.onion:48333 +7gcsfynynr26cya4uf2u74bx47jmzaidikh6lqo7nu5uwy7bra3roqyd.onion:48333 +7jd422hqevrz334ax3fh77wzww7clnr4kpyos25oe64nifg623bjqfqd.onion:48333 +7kwh7rg3a4e5lgjvybesixzhwzxvf6dqo3gc4h7k5vilwmdjvtzidtid.onion:48333 +7slxjz7hmpu6rpybl62egedth5c4zo6mwzm4sdbvqtwc5zikvx4e53id.onion:48333 +7xr2k6gg47calskl3emvqav42jf6l4dtgiwevy2vx7gej6d2osh4oiyd.onion:48333 +a6yijgwn4vtmmhl7uybtbuyvtl7mtj7arld5f4csqsx4syeii4gt3vqd.onion:48333 +aqabn424rm7qq5faw2ecckkzxfdw57oncivjrurrrn5wgjdqjqxvxjad.onion:48333 +c2u7kz2pv7vyufovwndoureyqijbd7kwpy7anulf4fxt3d3buf2yk2yd.onion:48333 +clqr2to2r6fn4jo6f7xy3dppxgn4ewvnmwbxsdrrhnesyacmw5noaeqd.onion:48333 +dnshzxr6osjf2l5gjsbattjtoefgkzmd3p3fdyatr5ltz243zspsilyd.onion:48333 +ebhtfcmjhilcqtuls437pxu65dznqkpt5qv3yeq6zipnqd7ichz5htyd.onion:48333 +ej4ozb3o5pzvvtvgaars5obzwvhrfs3chkmvb5pxmedykd4bgh6cpgyd.onion:48333 +ezbq3ydfxmgvgbbn7mrx5jzyig6tz2zjkaqdtkx7avnijrt5riv4j5yd.onion:48333 +fsijrllgzgeg4pa5ebq4qy3swmplxkzvuvji5swt36quy42dznq3t3ad.onion:48333 +fvbppnodd4dlxulzlvhikg2ijtnxemcjjpfhcg2rropun45aqhp5noid.onion:48333 +fwsrcrhnggi3qy5rsfiad3cwep3bf7uovcupgockbntjcfvoqxzr75id.onion:48333 +gc66muikqqzxwj2tdvvap6gpcbitthjvscawgkclim4vgmajrccjtmqd.onion:48333 +gujxforhwszry5falvnarfcyajjxxsuvqevx6gk6meou5ordrxw3mdad.onion:48333 +havkohvjhg5tglbdecf4ufhz5es3f33ctj3b6loebj4pi6qrtjemfbyd.onion:48333 +hb44egze5hjbi3n2rc6w4pwahr6zltc4ilfzin3kkdi2rmozvxlo65qd.onion:48333 +i22efh4itlcfthvaavcz2rvigu4x6jqvlwuksz44bukslhg76bsgrxqd.onion:48333 +i63l2yfy5e4kvm5c6la67qxpq6zn4xbdx6cdm474milv4dameu3z35qd.onion:48333 +irwyrdkcrcdgwtsltcrqexqylwc3ezjhhra7u4i3gkwktezcut36buqd.onion:48333 +jfyjcgithmk6fmndgg5kljttu5ctlokcvqjvsrxrxvnevhwx57xhpsqd.onion:48333 +kf6q2wza2ebo7cxln5ejcjjwvrew4vb2hf4vd5wo4nyzbnjv3yccduqd.onion:48333 +ko55e2ityiaqeckthmnnbcv6bbwll7rtdiv527muoqdpg4hye2it2pyd.onion:48333 +mavvwxts5f3axuz4cyjqpz75veijkdkdueavekb5hia67zk257eg7tqd.onion:48333 +mdiwdijucocysdvx5dk2iyo5wsav3ehyiggegzfk3ezfcce6nstp4nid.onion:48333 +nbq63hx63psrcqv26uadmcxkeap76un2xaombe4ivojkt3ysbgountid.onion:48333 +ns56enpcbigc2dovrj3agdbgudebmwtg43d27wtpvm5nwomectn2kmad.onion:48333 +ol5rcztxxugtup5mswhkt6hdf4pvcidimy3du6owufnja5lr3czk2zyd.onion:48333 +prilx36yi6wiz4ll77tapskzwzh5onphrnn6w5d56zrzdat4kjo3q3yd.onion:48333 +qmd5qvyhnanqj6wyf4klrvfqoypuz6xjajhx2n272vr5il7nlwyoosqd.onion:48333 +qmw73e4zh2i6pvmlgx5642vwtynibghgvjdoox574hjxxv7fvd2oxyid.onion:48333 +rah46hr3opyfbikrkub6g23idrml2ugmealjt4bcxlj6nonoxdqp4jqd.onion:48333 +riyvgzynuzj2vx2az6a7kvca5bythmj6rgb4asrecdw6vfmvt33uxqid.onion:48333 +rv7l5gtjqr5n5nlersakfuzwhfflyfizv5cmtiizlsn544qumvuekwqd.onion:48333 +vfqxysj7olxstghkohezoembjnsyvpp2ph7kc4jaatvszyx2ajz627ad.onion:48333 +we5rsalvz6fhp3345jydracg6wytxw5smsxzgusljvgcojadyfv2bzyd.onion:48333 +wkvaxtftpwmmvrptqavx6mwhrcwiecbodtshuenvot3cjgxsycuurcid.onion:48333 +x66at4pel4ody42wujl4upr2tbulbpn54nzvrk7gomzv4dwkhazfjdqd.onion:48333 +zjttaesjhj7ail437ag4emdufr775h5rtgoohlbca5rwc4re6dr5k7ad.onion:48333 +zmd4eq6svwn3qgm56dyodktagzi3xo4smxebgjdk2jbjkbmvn7gjm5qd.onion:48333 diff --git a/contrib/signet/README.md b/contrib/signet/README.md index 8112c7bf..49947985 100644 --- a/contrib/signet/README.md +++ b/contrib/signet/README.md @@ -7,11 +7,11 @@ getcoins.py A script to call a faucet to get Signet coins. -Syntax: `getcoins.py [-h|--help] [-c|--cmd=] [-f|--faucet=] [-a|--addr=] [-p|--password=] [--] []` +Syntax: `getcoins.py [-h|--help] [-c|--cmd=] [-f|--faucet=] [-a|--addr=] [-p|--password=] [--] []` -* `--cmd` lets you customize the coordinate-cli path. By default it will look for it in the PATH +* `--cmd` lets you customize the bitcoin-cli path. By default it will look for it in the PATH * `--faucet` lets you specify which faucet to use; the faucet is assumed to be compatible with https://github.com/kallewoof/bitcoin-faucet -* `--addr` lets you specify a Signet address; by default, the address must be a bech32 address. This and `--cmd` above complement each other (i.e. you do not need `coordinate-cli` if you use `--addr`) +* `--addr` lets you specify a Signet address; by default, the address must be a bech32 address. This and `--cmd` above complement each other (i.e. you do not need `bitcoin-cli` if you use `--addr`) * `--password` lets you specify a faucet password; this is handy if you are in a classroom and set up your own faucet for your students; (above faucet does not limit by IP when password is enabled) If using the default network, invoking the script with no arguments should be sufficient under normal @@ -23,9 +23,8 @@ miner You will first need to pick a difficulty target. Since signet chains are primarily protected by a signature rather than proof of work, there is no need to spend as much energy as possible mining, however you may wish to choose to spend more time than the absolute minimum. The calibrate subcommand can be used to pick a target appropriate for your hardware, eg: - cd src/ - MINER="../contrib/signet/miner" - GRIND="./coordinate-util grind" + MINER="./contrib/signet/miner" + GRIND="./build/bin/bitcoin-util grind" $MINER calibrate --grind-cmd="$GRIND" nbits=1e00f403 for 25s average mining time @@ -33,7 +32,7 @@ It defaults to estimating an nbits value resulting in 25s average time to find a To mine the first block in your custom chain, you can run: - CLI="./coordinate-cli -conf=mysignet.conf" + CLI="./build/bin/bitcoin-cli -conf=mysignet.conf" ADDR=$($CLI -signet getnewaddress) NBITS=1e00f403 $MINER --cli="$CLI" generate --grind-cmd="$GRIND" --address="$ADDR" --nbits=$NBITS @@ -81,3 +80,4 @@ These steps can instead be done explicitly: This is intended to allow you to replace part of the pipeline for further experimentation (eg, to sign the block with a hardware wallet). +For custom signets with a trivial challenge such as `OP_TRUE` and `OP_2` the walletprocesspsbt step can be skipped. diff --git a/contrib/signet/getcoins.py b/contrib/signet/getcoins.py index 86b0ee87..75430e5b 100755 --- a/contrib/signet/getcoins.py +++ b/contrib/signet/getcoins.py @@ -68,24 +68,24 @@ def print_image(img, threshold=128): line.append(chr(ch)) print(''.join(line)) -parser = argparse.ArgumentParser(description='Script to get coins from a faucet.', epilog='You may need to start with double-dash (--) when providing coordinate-cli arguments.') -parser.add_argument('-c', '--cmd', dest='cmd', default='coordinate-cli', help='coordinate-cli command to use') +parser = argparse.ArgumentParser(description='Script to get coins from a faucet.', epilog='You may need to start with double-dash (--) when providing bitcoin-cli arguments.') +parser.add_argument('-c', '--cmd', dest='cmd', default='bitcoin-cli', help='bitcoin-cli command to use') parser.add_argument('-f', '--faucet', dest='faucet', default=DEFAULT_GLOBAL_FAUCET, help='URL of the faucet') parser.add_argument('-g', '--captcha', dest='captcha', default=DEFAULT_GLOBAL_CAPTCHA, help='URL of the faucet captcha, or empty if no captcha is needed') parser.add_argument('-a', '--addr', dest='addr', default='', help='Bitcoin address to which the faucet should send') parser.add_argument('-p', '--password', dest='password', default='', help='Faucet password, if any') parser.add_argument('-n', '--amount', dest='amount', default='0.001', help='Amount to request (0.001-0.1, default is 0.001)') parser.add_argument('-i', '--imagemagick', dest='imagemagick', default=CONVERT, help='Path to imagemagick convert utility') -parser.add_argument('coordinate_cli_args', nargs='*', help='Arguments to pass on to coordinate-cli (default: -signet)') +parser.add_argument('bitcoin_cli_args', nargs='*', help='Arguments to pass on to bitcoin-cli (default: -signet)') args = parser.parse_args() -if args.coordinate_cli_args == []: - args.coordinate_cli_args = ['-signet'] +if args.bitcoin_cli_args == []: + args.bitcoin_cli_args = ['-signet'] -def coordinate_cli(rpc_command_and_params): - argv = [args.cmd] + args.coordinate_cli_args + rpc_command_and_params +def bitcoin_cli(rpc_command_and_params): + argv = [args.cmd] + args.bitcoin_cli_args + rpc_command_and_params try: return subprocess.check_output(argv).strip().decode() except FileNotFoundError: @@ -97,7 +97,7 @@ def coordinate_cli(rpc_command_and_params): if args.faucet.lower() == DEFAULT_GLOBAL_FAUCET: # Get the hash of the block at height 1 of the currently active signet chain - curr_signet_hash = coordinate_cli(['getblockhash', '1']) + curr_signet_hash = bitcoin_cli(['getblockhash', '1']) if curr_signet_hash != GLOBAL_FIRST_BLOCK_HASH: raise SystemExit('The global faucet cannot be used with a custom Signet network. Please use the global signet or setup your custom faucet to use this functionality.\n') else: @@ -107,7 +107,7 @@ def coordinate_cli(rpc_command_and_params): if args.addr == '': # get address for receiving coins - args.addr = coordinate_cli(['getnewaddress', 'faucet', 'bech32']) + args.addr = bitcoin_cli(['getnewaddress', 'faucet', 'bech32']) data = {'address': args.addr, 'password': args.password, 'amount': args.amount} @@ -152,7 +152,7 @@ def coordinate_cli(rpc_command_and_params): elif res.status_code == 404: print('The specified faucet URL does not exist. Please check for any server issues/typo.') elif res.status_code == 429: - print('The script does not allow for repeated transactions as the global faucet is rate-limitied to 1 request/IP/day. You can access the faucet website to get more coins manually') + print('The script does not allow for repeated transactions as the global faucet is rate-limited to 1 request/IP/day. You can access the faucet website to get more coins manually') else: print(f'Returned Error Code {res.status_code}\n{res.text}\n') print('Please check the provided arguments for their validity and/or any possible typo.') diff --git a/contrib/signet/miner b/contrib/signet/miner index f1397b76..8c7edc56 100755 --- a/contrib/signet/miner +++ b/contrib/signet/miner @@ -9,7 +9,7 @@ import logging import math import os import re -import struct +import shlex import sys import time import subprocess @@ -18,25 +18,18 @@ PATH_BASE_CONTRIB_SIGNET = os.path.abspath(os.path.dirname(os.path.realpath(__fi PATH_BASE_TEST_FUNCTIONAL = os.path.abspath(os.path.join(PATH_BASE_CONTRIB_SIGNET, "..", "..", "test", "functional")) sys.path.insert(0, PATH_BASE_TEST_FUNCTIONAL) -from test_framework.blocktools import get_witness_script, script_BIP34_coinbase_height # noqa: E402 -from test_framework.messages import CBlock, CBlockHeader, COutPoint, CTransaction, CTxIn, CTxInWitness, CTxOut, from_binary, from_hex, ser_string, ser_uint256, tx_from_hex # noqa: E402 +from test_framework.blocktools import get_witness_script, script_BIP34_coinbase_height, SIGNET_HEADER # noqa: E402 +from test_framework.messages import CBlock, CBlockHeader, COutPoint, CTransaction, CTxIn, CTxInWitness, CTxOut, from_binary, from_hex, ser_string, ser_uint256, tx_from_hex, MAX_SEQUENCE_NONFINAL # noqa: E402 from test_framework.psbt import PSBT, PSBTMap, PSBT_GLOBAL_UNSIGNED_TX, PSBT_IN_FINAL_SCRIPTSIG, PSBT_IN_FINAL_SCRIPTWITNESS, PSBT_IN_NON_WITNESS_UTXO, PSBT_IN_SIGHASH_TYPE # noqa: E402 -from test_framework.script import CScriptOp # noqa: E402 +from test_framework.script import CScript, CScriptOp # noqa: E402 logging.basicConfig( format='%(asctime)s %(levelname)s %(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S') -SIGNET_HEADER = b"\xec\xc7\xda\xa2" PSBT_SIGNET_BLOCK = b"\xfc\x06signetb" # proprietary PSBT global field holding the block being signed -RE_MULTIMINER = re.compile("^(\d+)(-(\d+))?/(\d+)$") - -def create_coinbase(height, value, spk): - cb = CTransaction() - cb.vin = [CTxIn(COutPoint(0, 0xffffffff), script_BIP34_coinbase_height(height), 0xffffffff)] - cb.vout = [CTxOut(value, spk)] - return cb +RE_MULTIMINER = re.compile(r"^(\d+)(-(\d+))?/(\d+)$") def signet_txs(block, challenge): # assumes signet solution has not been added yet so does not need @@ -47,76 +40,73 @@ def signet_txs(block, challenge): txs[0].vout[-1].scriptPubKey += CScriptOp.encode_op_pushdata(SIGNET_HEADER) hashes = [] for tx in txs: - tx.rehash() - hashes.append(ser_uint256(tx.sha256)) + hashes.append(ser_uint256(tx.txid_int)) mroot = block.get_merkle_root(hashes) sd = b"" - sd += struct.pack(" 0: + self.action_time += self.standby_delay + elif is_first_block: + # for non-standby, always mine immediately on startup, + # even if the next block shouldn't be ours + self.action_time = now + + # don't want fractional times so round down + self.mine_time = int(self.mine_time) + self.action_time = int(self.action_time) + + # can't mine a block 2h in the future; 1h55m for some safety + self.action_time = max(self.action_time, self.mine_time - 6900) + + def gbt(self, bcli, bestblockhash, now): + tmpl = json.loads(bcli("getblocktemplate", '{"rules":["signet","segwit"]}')) + if tmpl["previousblockhash"] != bestblockhash: + logging.warning("GBT based off unexpected block (%s not %s), retrying", tmpl["previousblockhash"], bci["bestblockhash"]) + time.sleep(1) + return None + + if tmpl["mintime"] > self.mine_time: + logging.info("Updating block time from %d to %d", self.mine_time, tmpl["mintime"]) + self.mine_time = tmpl["mintime"] + if self.mine_time > now: + logging.error("GBT mintime is in the future: %d is %d seconds later than %d", self.mine_time, (self.mine_time-now), now) + return None + + return tmpl + + def mine(self, bcli, grind_cmd, tmpl, reward_spk): + block = new_block(tmpl, reward_spk, blocktime=self.mine_time, poolid=self.poolid) + + signet_spk = tmpl["signet_challenge"] + if trivial_challenge(signet_spk): + signet_solution = None + else: + psbt = generate_psbt(block, signet_spk) + input_stream = os.linesep.join([psbt, "true", "ALL"]).encode('utf8') + psbt_signed = json.loads(bcli("-stdin", "walletprocesspsbt", input=input_stream)) + if not psbt_signed.get("complete",False): + logging.debug("Generated PSBT: %s" % (psbt,)) + sys.stderr.write("PSBT signing failed\n") + return None + psbt = decode_challenge_psbt(psbt_signed["psbt"]) + signet_solution = get_solution_from_psbt(psbt) + + return finish_block(block, signet_solution, grind_cmd) def do_generate(args): - if args.max_blocks is not None: - if args.ongoing: - logging.error("Cannot specify both --ongoing and --max-blocks") - return 1 + if args.set_block_time is not None: + max_blocks = 1 + elif args.max_blocks is not None: if args.max_blocks < 1: - logging.error("N must be a positive integer") + logging.error("--max_blocks must specify a positive integer") return 1 max_blocks = args.max_blocks elif args.ongoing: @@ -270,17 +378,11 @@ def do_generate(args): else: max_blocks = 1 - if args.set_block_time is not None and max_blocks != 1: - logging.error("Cannot specify --ongoing or --max-blocks > 1 when using --set-block-time") - return 1 if args.set_block_time is not None and args.set_block_time < 0: args.set_block_time = time.time() logging.info("Treating negative block time as current time (%d)" % (args.set_block_time)) if args.min_nbits: - if args.nbits is not None: - logging.error("Cannot specify --nbits and --min-nbits") - return 1 args.nbits = "1e0377ae" logging.info("Using nbits=%s" % (args.nbits)) @@ -312,8 +414,13 @@ def do_generate(args): logging.error("--max-interval must be at least 960 (16 minutes)") return 1 + poolid = get_poolid(args) + ultimate_target = nbits_to_target(int(args.nbits,16)) + gen = Generate(multiminer=my_blocks, ultimate_target=ultimate_target, poisson=args.poisson, max_interval=args.max_interval, + standby_delay=args.standby_delay, backup_delay=args.backup_delay, set_block_time=args.set_block_time, poolid=poolid) + mined_blocks = 0 bestheader = {"hash": None} lastheader = None @@ -328,110 +435,61 @@ def do_generate(args): if lastheader is None: lastheader = bestheader["hash"] elif bestheader["hash"] != lastheader: - next_delta = next_block_delta(int(bestheader["bits"], 16), bestheader["hash"], ultimate_target, args.poisson, args.max_interval) + next_delta = gen.next_block_delta(int(bestheader["bits"], 16), bestheader["hash"]) next_delta += bestheader["time"] - time.time() - next_is_mine = next_block_is_mine(bestheader["hash"], my_blocks) + next_is_mine = gen.next_block_is_mine(bestheader["hash"]) logging.info("Received new block at height %d; next in %s (%s)", bestheader["height"], seconds_to_hms(next_delta), ("mine" if next_is_mine else "backup")) lastheader = bestheader["hash"] # when is the next block due to be mined? now = time.time() - if args.set_block_time is not None: - logging.debug("Setting start time to %d", args.set_block_time) - mine_time = args.set_block_time - action_time = now - is_mine = True - elif bestheader["height"] == 0: - time_delta = next_block_delta(int(bestheader["bits"], 16), bci["bestblockhash"], ultimate_target, args.poisson, args.max_interval) - time_delta *= 100 # 100 blocks - logging.info("Backdating time for first block to %d minutes ago" % (time_delta/60)) - mine_time = now - time_delta - action_time = now - is_mine = True - else: - time_delta = next_block_delta(int(bestheader["bits"], 16), bci["bestblockhash"], ultimate_target, args.poisson, args.max_interval) - mine_time = bestheader["time"] + time_delta - - is_mine = next_block_is_mine(bci["bestblockhash"], my_blocks) - - action_time = mine_time - if not is_mine: - action_time += args.backup_delay - - if args.standby_delay > 0: - action_time += args.standby_delay - elif mined_blocks == 0: - # for non-standby, always mine immediately on startup, - # even if the next block shouldn't be ours - action_time = now - - # don't want fractional times so round down - mine_time = int(mine_time) - action_time = int(action_time) - - # can't mine a block 2h in the future; 1h55m for some safety - action_time = max(action_time, mine_time - 6900) + gen.next_block_time(now, bestheader, (mined_blocks == 0)) # ready to go? otherwise sleep and check for new block - if now < action_time: - sleep_for = min(action_time - now, 60) - if mine_time < now: + if now < gen.action_time: + sleep_for = min(gen.action_time - now, 60) + if gen.mine_time < now: # someone else might have mined the block, # so check frequently, so we don't end up late # mining the next block if it's ours sleep_for = min(20, sleep_for) - minestr = "mine" if is_mine else "backup" - logging.debug("Sleeping for %s, next block due in %s (%s)" % (seconds_to_hms(sleep_for), seconds_to_hms(mine_time - now), minestr)) + minestr = "mine" if gen.is_mine else "backup" + logging.debug("Sleeping for %s, next block due in %s (%s)" % (seconds_to_hms(sleep_for), seconds_to_hms(gen.mine_time - now), minestr)) time.sleep(sleep_for) continue # gbt - tmpl = json.loads(args.bcli("getblocktemplate", '{"rules":["signet","segwit"]}')) - if tmpl["previousblockhash"] != bci["bestblockhash"]: - logging.warning("GBT based off unexpected block (%s not %s), retrying", tmpl["previousblockhash"], bci["bestblockhash"]) - time.sleep(1) + tmpl = gen.gbt(args.bcli, bci["bestblockhash"], now) + if tmpl is None: continue logging.debug("GBT template: %s", tmpl) - if tmpl["mintime"] > mine_time: - logging.info("Updating block time from %d to %d", mine_time, tmpl["mintime"]) - mine_time = tmpl["mintime"] - if mine_time > now: - logging.error("GBT mintime is in the future: %d is %d seconds later than %d", mine_time, (mine_time-now), now) - return 1 - # address for reward reward_addr, reward_spk = get_reward_addr_spk(args, tmpl["height"]) # mine block - logging.debug("Mining block delta=%s start=%s mine=%s", seconds_to_hms(mine_time-bestheader["time"]), mine_time, is_mine) + logging.debug("Mining block delta=%s start=%s mine=%s", seconds_to_hms(gen.mine_time-bestheader["time"]), gen.mine_time, gen.is_mine) mined_blocks += 1 - psbt = generate_psbt(tmpl, reward_spk, blocktime=mine_time) - input_stream = os.linesep.join([psbt, "true", "ALL"]).encode('utf8') - psbt_signed = json.loads(args.bcli("-stdin", "walletprocesspsbt", input=input_stream)) - if not psbt_signed.get("complete",False): - logging.debug("Generated PSBT: %s" % (psbt,)) - sys.stderr.write("PSBT signing failed\n") + block = gen.mine(args.bcli, args.grind_cmd, tmpl, reward_spk) + if block is None: return 1 - block, signet_solution = do_decode_psbt(psbt_signed["psbt"]) - block = finish_block(block, signet_solution, args.grind_cmd) # submit block r = args.bcli("-stdin", "submitblock", input=block.serialize().hex().encode('utf8')) # report - bstr = "block" if is_mine else "backup block" + bstr = "block" if gen.is_mine else "backup block" - next_delta = next_block_delta(block.nBits, block.hash, ultimate_target, args.poisson, args.max_interval) + next_delta = gen.next_block_delta(block.nBits, block.hash_hex) next_delta += block.nTime - time.time() - next_is_mine = next_block_is_mine(block.hash, my_blocks) + next_is_mine = gen.next_block_is_mine(block.hash_hex) - logging.debug("Block hash %s payout to %s", block.hash, reward_addr) + logging.debug("Block hash %s payout to %s", block.hash_hex, reward_addr) logging.info("Mined %s at height %d; next in %s (%s)", bstr, tmpl["height"], seconds_to_hms(next_delta), ("mine" if next_is_mine else "backup")) if r != "": - logging.warning("submitblock returned %s for height %d hash %s", r, tmpl["height"], block.hash) - lastheader = block.hash + logging.warning("submitblock returned %s for height %d hash %s", r, tmpl["height"], block.hash_hex) + lastheader = block.hash_hex def do_calibrate(args): if args.nbits is not None and args.seconds is not None: @@ -454,7 +512,7 @@ def do_calibrate(args): header.nTime = i header.nNonce = 0 headhex = header.serialize().hex() - cmd = args.grind_cmd.split(" ") + [headhex] + cmd = shlex.split(args.grind_cmd) + [headhex] newheadhex = subprocess.run(cmd, stdout=subprocess.PIPE, input=b"", check=True).stdout.strip() avg = (time.time() - start) * 1.0 / TRIALS @@ -469,9 +527,9 @@ def do_calibrate(args): print("nbits=%08x for %ds average mining time" % (target_to_nbits(want_targ), want_time)) return 0 -def coordinate_cli(basecmd, args, **kwargs): +def bitcoin_cli(basecmd, args, **kwargs): cmd = basecmd + ["-signet"] + args - logging.debug("Calling coordinate-cli: %r", cmd) + logging.debug("Calling bitcoin-cli: %r", cmd) out = subprocess.run(cmd, stdout=subprocess.PIPE, **kwargs, check=True).stdout if isinstance(out, bytes): out = out.decode('utf8') @@ -479,7 +537,7 @@ def coordinate_cli(basecmd, args, **kwargs): def main(): parser = argparse.ArgumentParser() - parser.add_argument("--cli", default="coordinate-cli", type=str, help="coordinate-cli command") + parser.add_argument("--cli", default="bitcoin-cli", type=str, help="bitcoin-cli command") parser.add_argument("--debug", action="store_true", help="Print debugging info") parser.add_argument("--quiet", action="store_true", help="Only print warnings/errors") @@ -492,11 +550,13 @@ def main(): generate = cmds.add_parser("generate", help="Mine blocks") generate.set_defaults(fn=do_generate) - generate.add_argument("--ongoing", action="store_true", help="Keep mining blocks") - generate.add_argument("--max-blocks", default=None, type=int, help="Max blocks to mine (default=1)") - generate.add_argument("--set-block-time", default=None, type=int, help="Set block time (unix timestamp)") - generate.add_argument("--nbits", default=None, type=str, help="Target nBits (specify difficulty)") - generate.add_argument("--min-nbits", action="store_true", help="Target minimum nBits (use min difficulty)") + howmany = generate.add_mutually_exclusive_group() + howmany.add_argument("--ongoing", action="store_true", help="Keep mining blocks") + howmany.add_argument("--max-blocks", default=None, type=int, help="Max blocks to mine (default=1)") + howmany.add_argument("--set-block-time", default=None, type=int, help="Set block time (unix timestamp); implies --max-blocks=1") + nbit_target = generate.add_mutually_exclusive_group() + nbit_target.add_argument("--nbits", default=None, type=str, help="Target nBits (specify difficulty)") + nbit_target.add_argument("--min-nbits", action="store_true", help="Target minimum nBits (use min difficulty)") generate.add_argument("--poisson", action="store_true", help="Simulate randomised block times") generate.add_argument("--multiminer", default=None, type=str, help="Specify which set of blocks to mine (eg: 1-40/100 for the first 40%%, 2/3 for the second 3rd)") generate.add_argument("--backup-delay", default=300, type=int, help="Seconds to delay before mining blocks reserved for other miners (default=300)") @@ -505,27 +565,26 @@ def main(): calibrate = cmds.add_parser("calibrate", help="Calibrate difficulty") calibrate.set_defaults(fn=do_calibrate) - calibrate.add_argument("--nbits", type=str, default=None) - calibrate.add_argument("--seconds", type=int, default=None) + calibrate_by = calibrate.add_mutually_exclusive_group() + calibrate_by.add_argument("--nbits", type=str, default=None) + calibrate_by.add_argument("--seconds", type=int, default=None) for sp in [genpsbt, generate]: - sp.add_argument("--address", default=None, type=str, help="Address for block reward payment") - sp.add_argument("--descriptor", default=None, type=str, help="Descriptor for block reward payment") + payto = sp.add_mutually_exclusive_group(required=True) + payto.add_argument("--address", default=None, type=str, help="Address for block reward payment") + payto.add_argument("--descriptor", default=None, type=str, help="Descriptor for block reward payment") + pool = sp.add_mutually_exclusive_group() + pool.add_argument("--poolnum", default=None, type=int, help="Identify blocks that you mine") + pool.add_argument("--poolid", default=None, type=str, help="Identify blocks that you mine (eg: /signet:1/)") for sp in [solvepsbt, generate, calibrate]: sp.add_argument("--grind-cmd", default=None, type=str, required=(sp==calibrate), help="Command to grind a block header for proof-of-work") args = parser.parse_args(sys.argv[1:]) - args.bcli = lambda *a, input=b"", **kwargs: coordinate_cli(args.cli.split(" "), list(a), input=input, **kwargs) + args.bcli = lambda *a, input=b"", **kwargs: bitcoin_cli(shlex.split(args.cli), list(a), input=input, **kwargs) if hasattr(args, "address") and hasattr(args, "descriptor"): - if args.address is None and args.descriptor is None: - sys.stderr.write("Must specify --address or --descriptor\n") - return 1 - elif args.address is not None and args.descriptor is not None: - sys.stderr.write("Only specify one of --address or --descriptor\n") - return 1 args.derived_addresses = {} if args.debug: diff --git a/contrib/testgen/gen_key_io_test_vectors.py b/contrib/testgen/gen_key_io_test_vectors.py index 7bfb1d76..b358960b 100755 --- a/contrib/testgen/gen_key_io_test_vectors.py +++ b/contrib/testgen/gen_key_io_test_vectors.py @@ -62,42 +62,42 @@ # templates for valid bech32 sequences bech32_templates = [ # hrp, version, witprog_size, metadata, encoding, output_prefix - ('bc', 0, 20, (False, 'main', None, True), Encoding.BECH32, p2wpkh_prefix), - ('bc', 0, 32, (False, 'main', None, True), Encoding.BECH32, p2wsh_prefix), - ('bc', 1, 32, (False, 'main', None, True), Encoding.BECH32M, p2tr_prefix), - ('bc', 2, 2, (False, 'main', None, True), Encoding.BECH32M, (OP_2, 2)), - ('tb', 0, 20, (False, 'test', None, True), Encoding.BECH32, p2wpkh_prefix), - ('tb', 0, 32, (False, 'test', None, True), Encoding.BECH32, p2wsh_prefix), - ('tb', 1, 32, (False, 'test', None, True), Encoding.BECH32M, p2tr_prefix), - ('tb', 3, 16, (False, 'test', None, True), Encoding.BECH32M, (OP_3, 16)), - ('tb', 0, 20, (False, 'signet', None, True), Encoding.BECH32, p2wpkh_prefix), - ('tb', 0, 32, (False, 'signet', None, True), Encoding.BECH32, p2wsh_prefix), - ('tb', 1, 32, (False, 'signet', None, True), Encoding.BECH32M, p2tr_prefix), - ('tb', 3, 32, (False, 'signet', None, True), Encoding.BECH32M, (OP_3, 32)), - ('bcrt', 0, 20, (False, 'regtest', None, True), Encoding.BECH32, p2wpkh_prefix), - ('bcrt', 0, 32, (False, 'regtest', None, True), Encoding.BECH32, p2wsh_prefix), - ('bcrt', 1, 32, (False, 'regtest', None, True), Encoding.BECH32M, p2tr_prefix), - ('bcrt', 16, 40, (False, 'regtest', None, True), Encoding.BECH32M, (OP_16, 40)) + ('cc', 0, 20, (False, 'main', None, True), Encoding.BECH32, p2wpkh_prefix), + ('cc', 0, 32, (False, 'main', None, True), Encoding.BECH32, p2wsh_prefix), + ('cc', 1, 32, (False, 'main', None, True), Encoding.BECH32M, p2tr_prefix), + ('cc', 2, 2, (False, 'main', None, True), Encoding.BECH32M, (OP_2, 2)), + ('tc', 0, 20, (False, 'test', None, True), Encoding.BECH32, p2wpkh_prefix), + ('tc', 0, 32, (False, 'test', None, True), Encoding.BECH32, p2wsh_prefix), + ('tc', 1, 32, (False, 'test', None, True), Encoding.BECH32M, p2tr_prefix), + ('tc', 3, 16, (False, 'test', None, True), Encoding.BECH32M, (OP_3, 16)), + ('tc', 0, 20, (False, 'signet', None, True), Encoding.BECH32, p2wpkh_prefix), + ('tc', 0, 32, (False, 'signet', None, True), Encoding.BECH32, p2wsh_prefix), + ('tc', 1, 32, (False, 'signet', None, True), Encoding.BECH32M, p2tr_prefix), + ('tc', 3, 32, (False, 'signet', None, True), Encoding.BECH32M, (OP_3, 32)), + ('ccrt', 0, 20, (False, 'regtest', None, True), Encoding.BECH32, p2wpkh_prefix), + ('ccrt', 0, 32, (False, 'regtest', None, True), Encoding.BECH32, p2wsh_prefix), + ('ccrt', 1, 32, (False, 'regtest', None, True), Encoding.BECH32M, p2tr_prefix), + ('ccrt', 16, 40, (False, 'regtest', None, True), Encoding.BECH32M, (OP_16, 40)) ] # templates for invalid bech32 sequences bech32_ng_templates = [ # hrp, version, witprog_size, encoding, invalid_bech32, invalid_checksum, invalid_char - ('tc', 0, 20, Encoding.BECH32, False, False, False), - ('bt', 1, 32, Encoding.BECH32M, False, False, False), - ('tb', 17, 32, Encoding.BECH32M, False, False, False), - ('bcrt', 3, 1, Encoding.BECH32M, False, False, False), - ('bc', 15, 41, Encoding.BECH32M, False, False, False), - ('tb', 0, 16, Encoding.BECH32, False, False, False), - ('bcrt', 0, 32, Encoding.BECH32, True, False, False), - ('bc', 0, 16, Encoding.BECH32, True, False, False), - ('tb', 0, 32, Encoding.BECH32, False, True, False), - ('bcrt', 0, 20, Encoding.BECH32, False, False, True), - ('bc', 0, 20, Encoding.BECH32M, False, False, False), - ('tb', 0, 32, Encoding.BECH32M, False, False, False), - ('bcrt', 0, 20, Encoding.BECH32M, False, False, False), - ('bc', 1, 32, Encoding.BECH32, False, False, False), - ('tb', 2, 16, Encoding.BECH32, False, False, False), - ('bcrt', 16, 20, Encoding.BECH32, False, False, False), + ('cc', 0, 20, Encoding.BECH32, False, False, False), + ('ct', 1, 32, Encoding.BECH32M, False, False, False), + ('tc', 17, 32, Encoding.BECH32M, False, False, False), + ('ccrt', 3, 1, Encoding.BECH32M, False, False, False), + ('cc', 15, 41, Encoding.BECH32M, False, False, False), + ('tc', 0, 16, Encoding.BECH32, False, False, False), + ('ccrt', 0, 32, Encoding.BECH32, True, False, False), + ('cc', 0, 16, Encoding.BECH32, True, False, False), + ('tc', 0, 32, Encoding.BECH32, False, True, False), + ('ccrt', 0, 20, Encoding.BECH32, False, False, True), + ('cc', 0, 20, Encoding.BECH32M, False, False, False), + ('tc', 0, 32, Encoding.BECH32M, False, False, False), + ('ccrt', 0, 20, Encoding.BECH32M, False, False, False), + ('cc', 1, 32, Encoding.BECH32, False, False, False), + ('tc', 2, 16, Encoding.BECH32, False, False, False), + ('ccrt', 16, 20, Encoding.BECH32, False, False, False), ] def is_valid(v): @@ -119,7 +119,7 @@ def is_valid(v): def is_valid_bech32(v): '''Check vector v for bech32 validity''' - for hrp in ['bc', 'tb', 'bcrt']: + for hrp in ['cc', 'tc', 'ccrt']: if decode_segwit_address(hrp, v) != (None, None): return True return False diff --git a/contrib/tracing/README.md b/contrib/tracing/README.md index 0502afe3..252053e7 100644 --- a/contrib/tracing/README.md +++ b/contrib/tracing/README.md @@ -30,12 +30,12 @@ information. For development there exist a [bpftrace Reference Guide], a ## Examples -The bpftrace examples contain a relative path to the `coordinated` binary. By +The bpftrace examples contain a relative path to the `bitcoind` binary. By default, the scripts should be run from the repository-root and assume a -self-compiled `coordinated` binary. The paths in the examples can be changed, for +self-compiled `bitcoind` binary. The paths in the examples can be changed, for example, to point to release builds if needed. See the [Bitcoin Core USDT documentation] on how to list available tracepoints in your -`coordinated` binary. +`bitcoind` binary. [Bitcoin Core USDT documentation]: ../../doc/tracing.md#listing-available-tracepoints @@ -82,7 +82,7 @@ about the connection. Peers can be selected individually to view recent P2P messages. ``` -$ python3 contrib/tracing/p2p_monitor.py ./src/coordinated +$ python3 contrib/tracing/p2p_monitor.py $(pidof bitcoind) ``` Lists selectable peers and traffic and connection information. @@ -150,12 +150,12 @@ lost. BCC prints: `Possibly lost 2 samples` on lost messages. ``` -$ python3 contrib/tracing/log_raw_p2p_msgs.py ./src/coordinated +$ python3 contrib/tracing/log_raw_p2p_msgs.py $(pidof bitcoind) ``` ``` Logging raw P2P messages. -Messages larger that about 32kb will be cut off! +Messages larger than about 32kb will be cut off! Some messages might be lost! outbound msg 'inv' from peer 4 (outbound-full-relay, XX.XXX.XX.4:8333) with 253 bytes: 0705000000be2245c8f844c9f763748e1a7… … @@ -188,7 +188,7 @@ In a different terminal, starting Bitcoin Core in SigNet mode and with re-indexing enabled. ``` -$ ./src/coordinated -signet -reindex +$ ./build/bin/bitcoind -signet -reindex ``` This produces the following output. @@ -241,7 +241,7 @@ A BCC Python script to log the UTXO cache flushes. Based on the `utxocache:flush` tracepoint. ```bash -$ python3 contrib/tracing/log_utxocache_flush.py ./src/coordinated +$ python3 contrib/tracing/log_utxocache_flush.py $(pidof bitcoind) ``` ``` @@ -300,7 +300,7 @@ comprising a timestamp along with all event data available via the event's tracepoint. ```console -$ python3 contrib/tracing/mempool_monitor.py ./src/coordinated +$ python3 contrib/tracing/mempool_monitor.py $(pidof bitcoind) ``` ``` @@ -335,4 +335,25 @@ $ python3 contrib/tracing/mempool_monitor.py ./src/coordinated │ 13:10:32Z added c78e87be86c828137a6e7e00a177c03b52202ce4c39029b99904c2a094b9da87 with feerate 11.00 sat/vB (1562 sat, 142 vbytes) │ │ │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ + +### log_p2p_connections.bt + +A `bpftrace` script to log information about opened, closed, misbehaving, and +evicted P2P connections. Uses the `net:*_connection` tracepoints. + +```bash +$ bpftrace contrib/tracing/log_p2p_connections.bt +``` + +This should produce an output similar to the following. + +```bash +Attaching 6 probes... +Logging opened, closed, misbehaving, and evicted P2P connections +OUTBOUND conn to 127.0.0.1:15287: id=0, type=block-relay-only, network=0, total_out=1 +INBOUND conn from 127.0.0.1:45324: id=1, type=inbound, network=0, total_in=1 +MISBEHAVING conn id=1, score_before=0, score_increase=20, message='getdata message size = 50001', threshold_exceeded=false +CLOSED conn to 127.0.0.1:15287: id=0, type=block-relay-only, network=0, established=1231006505 +EVICTED conn to 127.0.0.1:45324: id=1, type=inbound, network=0, established=1612312312 +... ``` diff --git a/contrib/tracing/connectblock_benchmark.bt b/contrib/tracing/connectblock_benchmark.bt index 844981f3..c5d74309 100755 --- a/contrib/tracing/connectblock_benchmark.bt +++ b/contrib/tracing/connectblock_benchmark.bt @@ -14,15 +14,15 @@ over . - Threshold - This script requires a 'coordinated' binary compiled with eBPF support and the - 'validation:block_connected' USDT. By default, it's assumed that 'coordinated' is - located in './src/coordinated'. This can be modified in the script below. + This script requires a 'bitcoind' binary compiled with eBPF support and the + 'validation:block_connected' USDT. By default, it's assumed that 'bitcoind' is + located in './build/bin/bitcoind'. This can be modified in the script below. EXAMPLES: bpftrace contrib/tracing/connectblock_benchmark.bt 300000 680000 1000 - When run together 'coordinated -reindex', this benchmarks the time it takes to + When run together 'bitcoind -reindex', this benchmarks the time it takes to connect the blocks between height 300.000 and 680.000 (inclusive) and prints details about all blocks that take longer than 1000ms to connect. Prints a histogram with block connection times when the benchmark is finished. @@ -30,7 +30,7 @@ bpftrace contrib/tracing/connectblock_benchmark.bt 0 0 500 - When running together 'coordinated', all newly connected blocks that + When running together 'bitcoind', all newly connected blocks that take longer than 500ms to connect are logged. A histogram with block connection times is shown when the script is terminated. @@ -67,7 +67,7 @@ BEGIN connected block is between the start and end height (or the end height is unset). */ -usdt:./src/coordinated:validation:block_connected /arg1 >= $1 && (arg1 <= $2 || $2 == 0 )/ +usdt:./build/bin/bitcoind:validation:block_connected /arg1 >= $1 && (arg1 <= $2 || $2 == 0 )/ { $height = arg1; $transactions = arg2; @@ -82,7 +82,7 @@ usdt:./src/coordinated:validation:block_connected /arg1 >= $1 && (arg1 <= $2 || @inputs = @inputs + $inputs; @sigops = @sigops + $sigops; - @durations = hist($duration / 1000); + @durations = hist($duration / 1e6); if ($height == $1 && $height != 0) { @start = nsecs; @@ -92,7 +92,7 @@ usdt:./src/coordinated:validation:block_connected /arg1 >= $1 && (arg1 <= $2 || if ($2 > 0 && $height >= $2) { @end = nsecs; $duration = @end - @start; - printf("\nTook %d ms to connect the blocks between height %d and %d.\n", $duration / 1000000, $1, $2); + printf("\nTook %d ms to connect the blocks between height %d and %d.\n", $duration / 1e9, $1, $2); exit(); } } @@ -102,7 +102,7 @@ usdt:./src/coordinated:validation:block_connected /arg1 >= $1 && (arg1 <= $2 || blocks where the time it took to connect the block is above the . */ -usdt:./src/coordinated:validation:block_connected / (uint64) arg5 / 1000> $3 / +usdt:./build/bin/bitcoind:validation:block_connected / (uint64) arg5 / 1e6 > $3 / { $hash = arg0; $height = (int32) arg1; @@ -120,7 +120,7 @@ usdt:./src/coordinated:validation:block_connected / (uint64) arg5 / 1000> $3 / printf("%02x", $b); $p -= 1; } - printf(") %4d tx %5d ins %5d sigops took %4d ms\n", $transactions, $inputs, $sigops, (uint64) $duration / 1000); + printf(") %4d tx %5d ins %5d sigops took %4d ms\n", $transactions, $inputs, $sigops, (uint64) $duration / 1e6); } diff --git a/contrib/tracing/log_p2p_connections.bt b/contrib/tracing/log_p2p_connections.bt new file mode 100755 index 00000000..e04441e7 --- /dev/null +++ b/contrib/tracing/log_p2p_connections.bt @@ -0,0 +1,51 @@ +#!/usr/bin/env bpftrace + +BEGIN +{ + printf("Logging opened, closed, misbehaving, and evicted P2P connections\n") +} + +usdt:./build/bin/bitcoind:net:inbound_connection +{ + $id = (int64) arg0; + $addr = str(arg1); + $conn_type = str(arg2); + $network = (int32) arg3; + $existing = (uint64) arg4; + printf("INBOUND conn from %s: id=%ld, type=%s, network=%d, total=%d\n", $addr, $id, $conn_type, $network, $existing); +} + +usdt:./build/bin/bitcoind:net:outbound_connection +{ + $id = (int64) arg0; + $addr = str(arg1); + $conn_type = str(arg2); + $network = (int32) arg3; + $existing = (uint64) arg4; + printf("OUTBOUND conn to %s: id=%ld, type=%s, network=%d, total=%d\n", $addr, $id, $conn_type, $network, $existing); +} + +usdt:./build/bin/bitcoind:net:closed_connection +{ + $id = (int64) arg0; + $addr = str(arg1); + $conn_type = str(arg2); + $network = (int32) arg3; + printf("CLOSED conn to %s: id=%ld, type=%s, network=%d, established=%ld\n", $addr, $id, $conn_type, $network, arg4); +} + +usdt:./build/bin/bitcoind:net:evicted_inbound_connection +{ + $id = (int64) arg0; + $addr = str(arg1); + $conn_type = str(arg2); + $network = (int32) arg3; + printf("EVICTED conn to %s: id=%ld, type=%s, network=%d, established=%ld\n", $addr, $id, $conn_type, $network, arg4); +} + +usdt:./build/bin/bitcoind:net:misbehaving_connection +{ + $id = (int64) arg0; + $message = str(arg1); + printf("MISBEHAVING conn id=%ld, message='%s'\n", $id, $message); +} diff --git a/contrib/tracing/log_p2p_traffic.bt b/contrib/tracing/log_p2p_traffic.bt index ce851289..7b07dd5e 100755 --- a/contrib/tracing/log_p2p_traffic.bt +++ b/contrib/tracing/log_p2p_traffic.bt @@ -5,7 +5,7 @@ BEGIN printf("Logging P2P traffic\n") } -usdt:./src/coordinated:net:inbound_message +usdt:./build/bin/bitcoind:net:inbound_message { $peer_id = (int64) arg0; $peer_addr = str(arg1); @@ -15,7 +15,7 @@ usdt:./src/coordinated:net:inbound_message printf("inbound '%s' msg from peer %d (%s, %s) with %d bytes\n", $msg_type, $peer_id, $peer_type, $peer_addr, $msg_len); } -usdt:./src/coordinated:net:outbound_message +usdt:./build/bin/bitcoind:net:outbound_message { $peer_id = (int64) arg0; $peer_addr = str(arg1); diff --git a/contrib/tracing/log_raw_p2p_msgs.py b/contrib/tracing/log_raw_p2p_msgs.py index 7fd18798..1c0f03e1 100755 --- a/contrib/tracing/log_raw_p2p_msgs.py +++ b/contrib/tracing/log_raw_p2p_msgs.py @@ -41,7 +41,8 @@ program = """ #include -#define MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; }) +// A min() macro. Prefixed with _TRACEPOINT_TEST to avoid collision with other MIN macros. +#define _TRACEPOINT_TEST_MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; }) // Maximum possible allocation size // from include/linux/percpu.h in the Linux kernel @@ -77,6 +78,7 @@ int trace_inbound_message(struct pt_regs *ctx) { int idx = 0; struct p2p_message *msg = msg_arr.lookup(&idx); + void *paddr = NULL, *pconn_type = NULL, *pmsg_type = NULL, *pmsg = NULL; // lookup() does not return a NULL pointer. However, the BPF verifier // requires an explicit check that that the `msg` pointer isn't a NULL @@ -84,11 +86,15 @@ if (msg == NULL) return 1; bpf_usdt_readarg(1, ctx, &msg->peer_id); - bpf_usdt_readarg_p(2, ctx, &msg->peer_addr, MAX_PEER_ADDR_LENGTH); - bpf_usdt_readarg_p(3, ctx, &msg->peer_conn_type, MAX_PEER_CONN_TYPE_LENGTH); - bpf_usdt_readarg_p(4, ctx, &msg->msg_type, MAX_MSG_TYPE_LENGTH); + bpf_usdt_readarg(2, ctx, &paddr); + bpf_probe_read_user_str(&msg->peer_addr, sizeof(msg->peer_addr), paddr); + bpf_usdt_readarg(3, ctx, &pconn_type); + bpf_probe_read_user_str(&msg->peer_conn_type, sizeof(msg->peer_conn_type), pconn_type); + bpf_usdt_readarg(4, ctx, &pmsg_type); + bpf_probe_read_user_str(&msg->msg_type, sizeof(msg->msg_type), pmsg_type); bpf_usdt_readarg(5, ctx, &msg->msg_size); - bpf_usdt_readarg_p(6, ctx, &msg->msg, MIN(msg->msg_size, MAX_MSG_DATA_LENGTH)); + bpf_usdt_readarg(6, ctx, &pmsg); + bpf_probe_read_user(&msg->msg, _TRACEPOINT_TEST_MIN(msg->msg_size, MAX_MSG_DATA_LENGTH), pmsg); inbound_messages.perf_submit(ctx, msg, sizeof(*msg)); return 0; @@ -98,17 +104,23 @@ int idx = 0; struct p2p_message *msg = msg_arr.lookup(&idx); + void *paddr = NULL, *pconn_type = NULL, *pmsg_type = NULL, *pmsg = NULL; + // lookup() does not return a NULL pointer. However, the BPF verifier // requires an explicit check that that the `msg` pointer isn't a NULL // pointer. See https://github.com/iovisor/bcc/issues/2595 if (msg == NULL) return 1; bpf_usdt_readarg(1, ctx, &msg->peer_id); - bpf_usdt_readarg_p(2, ctx, &msg->peer_addr, MAX_PEER_ADDR_LENGTH); - bpf_usdt_readarg_p(3, ctx, &msg->peer_conn_type, MAX_PEER_CONN_TYPE_LENGTH); - bpf_usdt_readarg_p(4, ctx, &msg->msg_type, MAX_MSG_TYPE_LENGTH); + bpf_usdt_readarg(2, ctx, &paddr); + bpf_probe_read_user_str(&msg->peer_addr, sizeof(msg->peer_addr), paddr); + bpf_usdt_readarg(3, ctx, &pconn_type); + bpf_probe_read_user_str(&msg->peer_conn_type, sizeof(msg->peer_conn_type), pconn_type); + bpf_usdt_readarg(4, ctx, &pmsg_type); + bpf_probe_read_user_str(&msg->msg_type, sizeof(msg->msg_type), pmsg_type); bpf_usdt_readarg(5, ctx, &msg->msg_size); - bpf_usdt_readarg_p(6, ctx, &msg->msg, MIN(msg->msg_size, MAX_MSG_DATA_LENGTH)); + bpf_usdt_readarg(6, ctx, &pmsg); + bpf_probe_read_user(&msg->msg, _TRACEPOINT_TEST_MIN(msg->msg_size, MAX_MSG_DATA_LENGTH), pmsg); outbound_messages.perf_submit(ctx, msg, sizeof(*msg)); return 0; @@ -117,9 +129,9 @@ def print_message(event, inbound): - print(f"%s %s msg '%s' from peer %d (%s, %s) with %d bytes: %s" % - ( - f"Warning: incomplete message (only %d out of %d bytes)!" % ( + print("{} {} msg '{}' from peer {} ({}, {}) with {} bytes: {}".format( + + "Warning: incomplete message (only {} out of {} bytes)!".format( len(event.msg), event.msg_size) if len(event.msg) < event.msg_size else "", "inbound" if inbound else "outbound", event.msg_type.decode("utf-8"), @@ -132,15 +144,16 @@ def print_message(event, inbound): ) -def main(coordinated_path): - coordinated_with_usdts = USDT(path=str(coordinated_path)) +def main(pid): + print(f"Hooking into bitcoind with pid {pid}") + bitcoind_with_usdts = USDT(pid=int(pid)) # attaching the trace functions defined in the BPF program to the tracepoints - coordinated_with_usdts.enable_probe( + bitcoind_with_usdts.enable_probe( probe="inbound_message", fn_name="trace_inbound_message") - coordinated_with_usdts.enable_probe( + bitcoind_with_usdts.enable_probe( probe="outbound_message", fn_name="trace_outbound_message") - bpf = BPF(text=program, usdt_contexts=[coordinated_with_usdts]) + bpf = BPF(text=program, usdt_contexts=[bitcoind_with_usdts]) # BCC: perf buffer handle function for inbound_messages def handle_inbound(_, data, size): @@ -166,7 +179,7 @@ def handle_outbound(_, data, size): bpf["outbound_messages"].open_perf_buffer(handle_outbound) print("Logging raw P2P messages.") - print("Messages larger that about 32kb will be cut off!") + print("Messages larger than about 32kb will be cut off!") print("Some messages might be lost!") while True: try: @@ -176,8 +189,8 @@ def handle_outbound(_, data, size): if __name__ == "__main__": - if len(sys.argv) < 2: - print("USAGE:", sys.argv[0], "path/to/coordinated") + if len(sys.argv) != 2: + print("USAGE:", sys.argv[0], "") exit() - path = sys.argv[1] - main(path) + pid = sys.argv[1] + main(pid) diff --git a/contrib/tracing/log_utxocache_flush.py b/contrib/tracing/log_utxocache_flush.py index 3665c621..8ff9cd5e 100755 --- a/contrib/tracing/log_utxocache_flush.py +++ b/contrib/tracing/log_utxocache_flush.py @@ -10,7 +10,7 @@ """Example logging Bitcoin Core utxo set cache flushes utilizing the utxocache:flush tracepoint.""" -# USAGE: ./contrib/tracing/log_utxocache_flush.py path/to/coordinated +# USAGE: ./contrib/tracing/log_utxocache_flush.py path/to/bitcoind # BCC: The C program to be compiled to an eBPF program (by BCC) and loaded into # a sandboxed Linux kernel VM. @@ -70,14 +70,15 @@ def print_event(event): )) -def main(coordinated_path): - coordinated_with_usdts = USDT(path=str(coordinated_path)) +def main(pid): + print(f"Hooking into bitcoind with pid {pid}") + bitcoind_with_usdts = USDT(pid=int(pid)) # attaching the trace functions defined in the BPF program # to the tracepoints - coordinated_with_usdts.enable_probe( + bitcoind_with_usdts.enable_probe( probe="flush", fn_name="trace_flush") - b = BPF(text=program, usdt_contexts=[coordinated_with_usdts]) + b = BPF(text=program, usdt_contexts=[bitcoind_with_usdts]) def handle_flush(_, data, size): """ Coins Flush handler. @@ -99,9 +100,9 @@ def handle_flush(_, data, size): if __name__ == "__main__": - if len(sys.argv) < 2: - print("USAGE: ", sys.argv[0], "path/to/coordinated") + if len(sys.argv) != 2: + print("USAGE: ", sys.argv[0], "") exit(1) - path = sys.argv[1] - main(path) + pid = sys.argv[1] + main(pid) diff --git a/contrib/tracing/log_utxos.bt b/contrib/tracing/log_utxos.bt index d6d7184e..d309c029 100755 --- a/contrib/tracing/log_utxos.bt +++ b/contrib/tracing/log_utxos.bt @@ -6,9 +6,9 @@ bpftrace contrib/tracing/log_utxos.bt - This script requires a 'coordinated' binary compiled with eBPF support and the - 'utxocache' tracepoints. By default, it's assumed that 'coordinated' is - located in './src/coordinated'. This can be modified in the script below. + This script requires a 'bitcoind' binary compiled with eBPF support and the + 'utxocache' tracepoints. By default, it's assumed that 'bitcoind' is + located in './build/bin/bitcoind'. This can be modified in the script below. NOTE: requires bpftrace v0.12.0 or above. */ @@ -22,7 +22,7 @@ BEGIN /* Attaches to the 'utxocache:add' tracepoint and prints additions to the UTXO set cache. */ -usdt:./src/coordinated:utxocache:add +usdt:./build/bin/bitcoind:utxocache:add { $txid = arg0; $index = (uint32)arg1; @@ -44,7 +44,7 @@ usdt:./src/coordinated:utxocache:add /* Attaches to the 'utxocache:spent' tracepoint and prints spents from the UTXO set cache. */ -usdt:./src/coordinated:utxocache:spent +usdt:./build/bin/bitcoind:utxocache:spent { $txid = arg0; $index = (uint32)arg1; @@ -66,7 +66,7 @@ usdt:./src/coordinated:utxocache:spent /* Attaches to the 'utxocache:uncache' tracepoint and uncache UTXOs from the UTXO set cache. */ -usdt:./src/coordinated:utxocache:uncache +usdt:./build/bin/bitcoind:utxocache:uncache { $txid = arg0; $index = (uint32)arg1; diff --git a/contrib/tracing/mempool_monitor.py b/contrib/tracing/mempool_monitor.py index 95490b83..eb29b374 100755 --- a/contrib/tracing/mempool_monitor.py +++ b/contrib/tracing/mempool_monitor.py @@ -65,8 +65,9 @@ int trace_added(struct pt_regs *ctx) { struct added_event added = {}; - - bpf_usdt_readarg_p(1, ctx, &added.hash, HASH_LENGTH); + void *phash = NULL; + bpf_usdt_readarg(1, ctx, &phash); + bpf_probe_read_user(&added.hash, sizeof(added.hash), phash); bpf_usdt_readarg(2, ctx, &added.vsize); bpf_usdt_readarg(3, ctx, &added.fee); @@ -76,9 +77,11 @@ int trace_removed(struct pt_regs *ctx) { struct removed_event removed = {}; - - bpf_usdt_readarg_p(1, ctx, &removed.hash, HASH_LENGTH); - bpf_usdt_readarg_p(2, ctx, &removed.reason, MAX_REMOVAL_REASON_LENGTH); + void *phash = NULL, *preason = NULL; + bpf_usdt_readarg(1, ctx, &phash); + bpf_probe_read_user(&removed.hash, sizeof(removed.hash), phash); + bpf_usdt_readarg(2, ctx, &preason); + bpf_probe_read_user_str(&removed.reason, sizeof(removed.reason), preason); bpf_usdt_readarg(3, ctx, &removed.vsize); bpf_usdt_readarg(4, ctx, &removed.fee); bpf_usdt_readarg(5, ctx, &removed.entry_time); @@ -89,22 +92,25 @@ int trace_rejected(struct pt_regs *ctx) { struct rejected_event rejected = {}; - - bpf_usdt_readarg_p(1, ctx, &rejected.hash, HASH_LENGTH); - bpf_usdt_readarg_p(2, ctx, &rejected.reason, MAX_REJECT_REASON_LENGTH); - + void *phash = NULL, *preason = NULL; + bpf_usdt_readarg(1, ctx, &phash); + bpf_probe_read_user(&rejected.hash, sizeof(rejected.hash), phash); + bpf_usdt_readarg(2, ctx, &preason); + bpf_probe_read_user_str(&rejected.reason, sizeof(rejected.reason), preason); rejected_events.perf_submit(ctx, &rejected, sizeof(rejected)); return 0; } int trace_replaced(struct pt_regs *ctx) { struct replaced_event replaced = {}; - - bpf_usdt_readarg_p(1, ctx, &replaced.replaced_hash, HASH_LENGTH); + void *phash_replaced = NULL, *phash_replacement = NULL; + bpf_usdt_readarg(1, ctx, &phash_replaced); + bpf_probe_read_user(&replaced.replaced_hash, sizeof(replaced.replaced_hash), phash_replaced); bpf_usdt_readarg(2, ctx, &replaced.replaced_vsize); bpf_usdt_readarg(3, ctx, &replaced.replaced_fee); bpf_usdt_readarg(4, ctx, &replaced.replaced_entry_time); - bpf_usdt_readarg_p(5, ctx, &replaced.replacement_hash, HASH_LENGTH); + bpf_usdt_readarg(5, ctx, &phash_replacement); + bpf_probe_read_user(&replaced.replacement_hash, sizeof(replaced.replacement_hash), phash_replacement); bpf_usdt_readarg(6, ctx, &replaced.replacement_vsize); bpf_usdt_readarg(7, ctx, &replaced.replacement_fee); @@ -114,16 +120,17 @@ """ -def main(coordinated_path): - coordinated_with_usdts = USDT(path=str(coordinated_path)) +def main(pid): + print(f"Hooking into bitcoind with pid {pid}") + bitcoind_with_usdts = USDT(pid=int(pid)) # attaching the trace functions defined in the BPF program # to the tracepoints - coordinated_with_usdts.enable_probe(probe="mempool:added", fn_name="trace_added") - coordinated_with_usdts.enable_probe(probe="mempool:removed", fn_name="trace_removed") - coordinated_with_usdts.enable_probe(probe="mempool:replaced", fn_name="trace_replaced") - coordinated_with_usdts.enable_probe(probe="mempool:rejected", fn_name="trace_rejected") - bpf = BPF(text=PROGRAM, usdt_contexts=[coordinated_with_usdts]) + bitcoind_with_usdts.enable_probe(probe="mempool:added", fn_name="trace_added") + bitcoind_with_usdts.enable_probe(probe="mempool:removed", fn_name="trace_removed") + bitcoind_with_usdts.enable_probe(probe="mempool:replaced", fn_name="trace_replaced") + bitcoind_with_usdts.enable_probe(probe="mempool:rejected", fn_name="trace_rejected") + bpf = BPF(text=PROGRAM, usdt_contexts=[bitcoind_with_usdts]) events = [] @@ -365,8 +372,8 @@ def timestamp_age(timestamp): if __name__ == "__main__": if len(sys.argv) < 2: - print("USAGE: ", sys.argv[0], "path/to/coordinated") + print("USAGE: ", sys.argv[0], "") exit(1) - path = sys.argv[1] - main(path) + pid = sys.argv[1] + main(pid) diff --git a/contrib/tracing/p2p_monitor.py b/contrib/tracing/p2p_monitor.py index 193e2839..51af6037 100755 --- a/contrib/tracing/p2p_monitor.py +++ b/contrib/tracing/p2p_monitor.py @@ -3,7 +3,7 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -""" Interactive coordinated P2P network traffic monitor utilizing USDT and the +""" Interactive bitcoind P2P network traffic monitor utilizing USDT and the net:inbound_message and net:outbound_message tracepoints. """ # This script demonstrates what USDT for Bitcoin Core can enable. It uses BCC @@ -14,8 +14,9 @@ # outbound P2P messages. The eBPF program submits the P2P messages to # this script via a BPF ring buffer. -import sys import curses +import os +import sys from curses import wrapper, panel from bcc import BPF, USDT @@ -46,11 +47,15 @@ int trace_inbound_message(struct pt_regs *ctx) { struct p2p_message msg = {}; + void *paddr = NULL, *pconn_type = NULL, *pmsg_type = NULL; bpf_usdt_readarg(1, ctx, &msg.peer_id); - bpf_usdt_readarg_p(2, ctx, &msg.peer_addr, MAX_PEER_ADDR_LENGTH); - bpf_usdt_readarg_p(3, ctx, &msg.peer_conn_type, MAX_PEER_CONN_TYPE_LENGTH); - bpf_usdt_readarg_p(4, ctx, &msg.msg_type, MAX_MSG_TYPE_LENGTH); + bpf_usdt_readarg(2, ctx, &paddr); + bpf_probe_read_user_str(&msg.peer_addr, sizeof(msg.peer_addr), paddr); + bpf_usdt_readarg(3, ctx, &pconn_type); + bpf_probe_read_user_str(&msg.peer_conn_type, sizeof(msg.peer_conn_type), pconn_type); + bpf_usdt_readarg(4, ctx, &pmsg_type); + bpf_probe_read_user_str(&msg.msg_type, sizeof(msg.msg_type), pmsg_type); bpf_usdt_readarg(5, ctx, &msg.msg_size); inbound_messages.perf_submit(ctx, &msg, sizeof(msg)); @@ -59,11 +64,15 @@ int trace_outbound_message(struct pt_regs *ctx) { struct p2p_message msg = {}; + void *paddr = NULL, *pconn_type = NULL, *pmsg_type = NULL; bpf_usdt_readarg(1, ctx, &msg.peer_id); - bpf_usdt_readarg_p(2, ctx, &msg.peer_addr, MAX_PEER_ADDR_LENGTH); - bpf_usdt_readarg_p(3, ctx, &msg.peer_conn_type, MAX_PEER_CONN_TYPE_LENGTH); - bpf_usdt_readarg_p(4, ctx, &msg.msg_type, MAX_MSG_TYPE_LENGTH); + bpf_usdt_readarg(2, ctx, &paddr); + bpf_probe_read_user_str(&msg.peer_addr, sizeof(msg.peer_addr), paddr); + bpf_usdt_readarg(3, ctx, &pconn_type); + bpf_probe_read_user_str(&msg.peer_conn_type, sizeof(msg.peer_conn_type), pconn_type); + bpf_usdt_readarg(4, ctx, &pmsg_type); + bpf_probe_read_user_str(&msg.msg_type, sizeof(msg.msg_type), pmsg_type); bpf_usdt_readarg(5, ctx, &msg.msg_size); outbound_messages.perf_submit(ctx, &msg, sizeof(msg)); @@ -115,17 +124,17 @@ def add_message(self, message): self.total_outbound_msgs += 1 -def main(coordinated_path): +def main(pid): peers = dict() - - coordinated_with_usdts = USDT(path=str(coordinated_path)) + print(f"Hooking into bitcoind with pid {pid}") + bitcoind_with_usdts = USDT(pid=int(pid)) # attaching the trace functions defined in the BPF program to the tracepoints - coordinated_with_usdts.enable_probe( + bitcoind_with_usdts.enable_probe( probe="inbound_message", fn_name="trace_inbound_message") - coordinated_with_usdts.enable_probe( + bitcoind_with_usdts.enable_probe( probe="outbound_message", fn_name="trace_outbound_message") - bpf = BPF(text=program, usdt_contexts=[coordinated_with_usdts]) + bpf = BPF(text=program, usdt_contexts=[bitcoind_with_usdts]) # BCC: perf buffer handle function for inbound_messages def handle_inbound(_, data, size): @@ -170,7 +179,7 @@ def loop(screen, bpf, peers): info_panel = panel.new_panel(win) info_panel.hide() - ROWS_AVALIABLE_FOR_LIST = curses.LINES - 5 + ROWS_AVAILABLE_FOR_LIST = curses.LINES - 5 scroll = 0 while True: @@ -182,7 +191,7 @@ def loop(screen, bpf, peers): if (ch == curses.KEY_DOWN or ch == ord("j")) and cur_list_pos < len( peers.keys()) -1 and info_panel.hidden(): cur_list_pos += 1 - if cur_list_pos >= ROWS_AVALIABLE_FOR_LIST: + if cur_list_pos >= ROWS_AVAILABLE_FOR_LIST: scroll += 1 if (ch == curses.KEY_UP or ch == ord("k")) and cur_list_pos > 0 and info_panel.hidden(): cur_list_pos -= 1 @@ -194,14 +203,14 @@ def loop(screen, bpf, peers): else: info_panel.hide() screen.erase() - render(screen, peers, cur_list_pos, scroll, ROWS_AVALIABLE_FOR_LIST, info_panel) + render(screen, peers, cur_list_pos, scroll, ROWS_AVAILABLE_FOR_LIST, info_panel) curses.panel.update_panels() screen.refresh() except KeyboardInterrupt: exit() -def render(screen, peers, cur_list_pos, scroll, ROWS_AVALIABLE_FOR_LIST, info_panel): +def render(screen, peers, cur_list_pos, scroll, ROWS_AVAILABLE_FOR_LIST, info_panel): """ renders the list of peers and details panel This code is unrelated to USDT, BCC and BPF. @@ -214,7 +223,7 @@ def render(screen, peers, cur_list_pos, scroll, ROWS_AVALIABLE_FOR_LIST, info_pa 1, 0, (" Navigate with UP/DOWN or J/K and select a peer with ENTER or SPACE to see individual P2P messages"), curses.A_NORMAL) screen.addstr(3, 0, header_format % ("PEER", "OUTBOUND", "INBOUND", "TYPE", "ADDR"), curses.A_BOLD | curses.A_UNDERLINE) - peer_list = sorted(peers.keys())[scroll:ROWS_AVALIABLE_FOR_LIST+scroll] + peer_list = sorted(peers.keys())[scroll:ROWS_AVAILABLE_FOR_LIST+scroll] for i, peer_id in enumerate(peer_list): peer = peers[peer_id] screen.addstr(i + 4, 0, @@ -245,9 +254,14 @@ def render(screen, peers, cur_list_pos, scroll, ROWS_AVALIABLE_FOR_LIST, info_pa (msg.msg_type, msg.size), curses.A_NORMAL) +def running_as_root(): + return os.getuid() == 0 + if __name__ == "__main__": - if len(sys.argv) < 2: - print("USAGE:", sys.argv[0], "path/to/coordinated") + if len(sys.argv) != 2: + print("USAGE:", sys.argv[0], "") exit() - path = sys.argv[1] - main(path) + if not running_as_root(): + print("You might not have the privileges required to hook into the tracepoints!") + pid = sys.argv[1] + main(pid) diff --git a/contrib/utxo-tools/utxo_to_sqlite.py b/contrib/utxo-tools/utxo_to_sqlite.py new file mode 100755 index 00000000..4758fe39 --- /dev/null +++ b/contrib/utxo-tools/utxo_to_sqlite.py @@ -0,0 +1,195 @@ +#!/usr/bin/env python3 +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. +"""Tool to convert a compact-serialized UTXO set to a SQLite3 database. + +The input UTXO set can be generated by Bitcoin Core with the `dumptxoutset` RPC: +$ bitcoin-cli dumptxoutset ~/utxos.dat latest + +The created database contains a table `utxos` with the following schema: +(txid TEXT, vout INT, value INT, coinbase INT, height INT, scriptpubkey TEXT) +""" +import argparse +import os +import sqlite3 +import sys +import time + + +UTXO_DUMP_MAGIC = b'utxo\xff' +UTXO_DUMP_VERSION = 2 +NET_MAGIC_BYTES = { + b"\xf9\xbe\xb4\xd9": "Mainnet", + b"\x0a\x03\xcf\x40": "Signet", + b"\x0b\x11\x09\x07": "Testnet3", + b"\x1c\x16\x3f\x28": "Testnet4", + b"\xfa\xbf\xb5\xda": "Regtest", +} + + +def read_varint(f): + """Equivalent of `ReadVarInt()` (see serialization module).""" + n = 0 + while True: + dat = f.read(1)[0] + n = (n << 7) | (dat & 0x7f) + if (dat & 0x80) > 0: + n += 1 + else: + return n + + +def read_compactsize(f): + """Equivalent of `ReadCompactSize()` (see serialization module).""" + n = f.read(1)[0] + if n == 253: + n = int.from_bytes(f.read(2), "little") + elif n == 254: + n = int.from_bytes(f.read(4), "little") + elif n == 255: + n = int.from_bytes(f.read(8), "little") + return n + + +def decompress_amount(x): + """Equivalent of `DecompressAmount()` (see compressor module).""" + if x == 0: + return 0 + x -= 1 + e = x % 10 + x //= 10 + n = 0 + if e < 9: + d = (x % 9) + 1 + x //= 9 + n = x * 10 + d + else: + n = x + 1 + while e > 0: + n *= 10 + e -= 1 + return n + + +def decompress_script(f): + """Equivalent of `DecompressScript()` (see compressor module).""" + size = read_varint(f) # sizes 0-5 encode compressed script types + if size == 0: # P2PKH + return bytes([0x76, 0xa9, 20]) + f.read(20) + bytes([0x88, 0xac]) + elif size == 1: # P2SH + return bytes([0xa9, 20]) + f.read(20) + bytes([0x87]) + elif size in (2, 3): # P2PK (compressed) + return bytes([33, size]) + f.read(32) + bytes([0xac]) + elif size in (4, 5): # P2PK (uncompressed) + compressed_pubkey = bytes([size - 2]) + f.read(32) + return bytes([65]) + decompress_pubkey(compressed_pubkey) + bytes([0xac]) + else: # others (bare multisig, segwit etc.) + size -= 6 + assert size <= 10000, f"too long script with size {size}" + return f.read(size) + + +def decompress_pubkey(compressed_pubkey): + """Decompress pubkey by calculating y = sqrt(x^3 + 7) % p + (see functions `secp256k1_eckey_pubkey_parse` and `secp256k1_ge_set_xo_var`). + """ + P = 2**256 - 2**32 - 977 # secp256k1 field size + assert len(compressed_pubkey) == 33 and compressed_pubkey[0] in (2, 3) + x = int.from_bytes(compressed_pubkey[1:], 'big') + rhs = (x**3 + 7) % P + y = pow(rhs, (P + 1)//4, P) # get sqrt using Tonelli-Shanks algorithm (for p % 4 = 3) + assert pow(y, 2, P) == rhs, f"pubkey is not on curve ({compressed_pubkey.hex()})" + tag_is_odd = compressed_pubkey[0] == 3 + y_is_odd = (y & 1) == 1 + if tag_is_odd != y_is_odd: # fix parity (even/odd) if necessary + y = P - y + return bytes([4]) + x.to_bytes(32, 'big') + y.to_bytes(32, 'big') + + +def main(): + parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument('infile', help='filename of compact-serialized UTXO set (input)') + parser.add_argument('outfile', help='filename of created SQLite3 database (output)') + parser.add_argument('-v', '--verbose', action='store_true', help='show details about each UTXO') + args = parser.parse_args() + + if not os.path.exists(args.infile): + print(f"Error: provided input file '{args.infile}' doesn't exist.") + sys.exit(1) + + if os.path.exists(args.outfile): + print(f"Error: provided output file '{args.outfile}' already exists.") + sys.exit(1) + + # create database table + con = sqlite3.connect(args.outfile) + con.execute("CREATE TABLE utxos(txid TEXT, vout INT, value INT, coinbase INT, height INT, scriptpubkey TEXT)") + + # read metadata (magic bytes, version, network magic, block hash, UTXO count) + f = open(args.infile, 'rb') + magic_bytes = f.read(5) + version = int.from_bytes(f.read(2), 'little') + network_magic = f.read(4) + block_hash = f.read(32) + num_utxos = int.from_bytes(f.read(8), 'little') + if magic_bytes != UTXO_DUMP_MAGIC: + print(f"Error: provided input file '{args.infile}' is not an UTXO dump.") + sys.exit(1) + if version != UTXO_DUMP_VERSION: + print(f"Error: provided input file '{args.infile}' has unknown UTXO dump version {version} " + f"(only version {UTXO_DUMP_VERSION} supported)") + sys.exit(1) + network_string = NET_MAGIC_BYTES.get(network_magic, f"unknown network ({network_magic.hex()})") + print(f"UTXO Snapshot for {network_string} at block hash " + f"{block_hash[::-1].hex()[:32]}..., contains {num_utxos} coins") + + start_time = time.time() + write_batch = [] + coins_per_hash_left = 0 + prevout_hash = None + max_height = 0 + + for coin_idx in range(1, num_utxos+1): + # read key (COutPoint) + if coins_per_hash_left == 0: # read next prevout hash + prevout_hash = f.read(32)[::-1].hex() + coins_per_hash_left = read_compactsize(f) + prevout_index = read_compactsize(f) + # read value (Coin) + code = read_varint(f) + height = code >> 1 + is_coinbase = code & 1 + amount = decompress_amount(read_varint(f)) + scriptpubkey = decompress_script(f).hex() + write_batch.append((prevout_hash, prevout_index, amount, is_coinbase, height, scriptpubkey)) + if height > max_height: + max_height = height + coins_per_hash_left -= 1 + + if args.verbose: + print(f"Coin {coin_idx}/{num_utxos}:") + print(f" prevout = {prevout_hash}:{prevout_index}") + print(f" amount = {amount}, height = {height}, coinbase = {is_coinbase}") + print(f" scriptPubKey = {scriptpubkey}\n") + + if coin_idx % (16*1024) == 0 or coin_idx == num_utxos: + # write utxo batch to database + con.executemany("INSERT INTO utxos VALUES(?, ?, ?, ?, ?, ?)", write_batch) + con.commit() + write_batch.clear() + + if coin_idx % (1024*1024) == 0: + elapsed = time.time() - start_time + print(f"{coin_idx} coins converted [{coin_idx/num_utxos*100:.2f}%], " + + f"{elapsed:.3f}s passed since start") + con.close() + + print(f"TOTAL: {num_utxos} coins written to {args.outfile}, snapshot height is {max_height}.") + if f.read(1) != b'': # EOF should be reached by now + print(f"WARNING: input file {args.infile} has not reached EOF yet!") + sys.exit(1) + + +if __name__ == '__main__': + main() diff --git a/contrib/valgrind.supp b/contrib/valgrind.supp index ee91acd5..7960f9c8 100644 --- a/contrib/valgrind.supp +++ b/contrib/valgrind.supp @@ -2,57 +2,24 @@ # dependencies that cannot be fixed in-tree. # # Example use: -# $ valgrind --suppressions=contrib/valgrind.supp src/test/test_bitcoin +# $ valgrind --suppressions=contrib/valgrind.supp build/bin/test_bitcoin # $ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \ -# --show-leak-kinds=all src/test/test_bitcoin +# --show-leak-kinds=all build/bin/test_bitcoin # # To create suppressions for found issues, use the --gen-suppressions=all option: # $ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \ # --show-leak-kinds=all --gen-suppressions=all --show-reachable=yes \ -# --error-limit=no src/test/test_bitcoin +# --error-limit=no build/bin/test_bitcoin # # Note that suppressions may depend on OS and/or library versions. -# Tested on: -# * aarch64 (Debian Bookworm system libs, clang, without gui) -# * x86_64 (Debian Bookworm system libs, clang, without gui) -{ - Suppress libdb warning - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662917 - Memcheck:Cond - obj:*/libdb_cxx-*.so - fun:__log_put -} -{ - Suppress libdb warning - Memcheck:Param - pwrite64(buf) - fun:pwrite - fun:__os_io -} -{ - Suppress libdb warning - Memcheck:Cond - fun:__log_putr.isra.1 -} -{ - Suppress libdb warning - Memcheck:Param - pwrite64(buf) - ... - obj:*/libdb_cxx-*.so -} +# Tested on aarch64 and x86_64 with Ubuntu Noble system libs, using clang-16 +# and GCC, without gui. { Suppress uninitialized bytes warning in compat code Memcheck:Param ioctl(TCSET{S,SW,SF}) fun:tcsetattr } -{ - Suppress libdb warning - Memcheck:Leak - fun:malloc - ... - obj:*/libdb_cxx-*.so -} { Suppress leaks on shutdown Memcheck:Leak diff --git a/contrib/verify-binaries/README.md b/contrib/verify-binaries/README.md index 04d683e6..0f3e16a5 100644 --- a/contrib/verify-binaries/README.md +++ b/contrib/verify-binaries/README.md @@ -50,6 +50,7 @@ Get JSON output and don't prompt for user input (no auto key import): ```sh ./contrib/verify-binaries/verify.py --json pub 22.0-x86 +./contrib/verify-binaries/verify.py --json pub 23.0-rc5-linux-gnu ``` Rely only on local GPG state and manually specified keys, while requiring a @@ -57,14 +58,15 @@ threshold of at least 10 trusted signatures: ```sh ./contrib/verify-binaries/verify.py \ --trusted-keys 74E2DEF5D77260B98BC19438099BAD163C70FBFA,9D3CC86A72F8494342EA5FD10A41BDC3F4FAFF1C \ - --min-good-sigs 10 pub 22.0-x86 + --min-good-sigs 10 pub 22.0-linux ``` -If you only want to download the binaries for a certain platform, add the corresponding suffix, e.g.: +If you only want to download the binaries for a certain architecture and/or platform, add the corresponding suffix, e.g.: ```sh -./contrib/verify-binaries/verify.py pub 24.0.1-darwin -./contrib/verify-binaries/verify.py pub 23.1-rc1-win64 +./contrib/verify-binaries/verify.py pub 25.2-x86_64-linux +./contrib/verify-binaries/verify.py pub 24.1-rc1-darwin +./contrib/verify-binaries/verify.py pub 27.0-win64-setup.exe ``` If you do not want to keep the downloaded binaries, specify the cleanup option. diff --git a/contrib/verify-binaries/test.py b/contrib/verify-binaries/test.py index 22d718ec..875606ec 100755 --- a/contrib/verify-binaries/test.py +++ b/contrib/verify-binaries/test.py @@ -12,6 +12,21 @@ def main(): expect_code(run_verify("", "pub", '0.32.awefa.12f9h'), 11, "Malformed version should fail") expect_code(run_verify('--min-good-sigs 20', "pub", "22.0"), 9, "--min-good-sigs 20 should fail") + print("- testing verification (22.0-x86_64-linux-gnu.tar.gz)", flush=True) + _220_x86_64_linux_gnu = run_verify("--json", "pub", "22.0-x86_64-linux-gnu.tar.gz") + try: + result = json.loads(_220_x86_64_linux_gnu.stdout.decode()) + except Exception: + print("failed on 22.0-x86_64-linux-gnu.tar.gz --json:") + print_process_failure(_220_x86_64_linux_gnu) + raise + + expect_code(_220_x86_64_linux_gnu, 0, "22.0-x86_64-linux-gnu.tar.gz should succeed") + v = result['verified_binaries'] + assert result['good_trusted_sigs'] + assert len(v) == 1 + assert v['bitcoin-22.0-x86_64-linux-gnu.tar.gz'] == '59ebd25dd82a51638b7a6bb914586201e67db67b919b2a1ff08925a7936d1b16' + print("- testing verification (22.0)", flush=True) _220 = run_verify("--json", "pub", "22.0") try: diff --git a/contrib/verify-binaries/verify.py b/contrib/verify-binaries/verify.py index d0749f50..6c07b36c 100755 --- a/contrib/verify-binaries/verify.py +++ b/contrib/verify-binaries/verify.py @@ -97,23 +97,17 @@ def bool_from_env(key, default=False) -> bool: VERSION_FORMAT = ".[.][-rc[0-9]][-platform]" -VERSION_EXAMPLE = "22.0-x86_64 or 23.1-rc1-darwin" +VERSION_EXAMPLE = "22.0 or 23.1-rc1-darwin.dmg or 27.0-x86_64-linux-gnu" def parse_version_string(version_str): - parts = version_str.split('-') - version_base = parts[0] - version_rc = "" - version_os = "" - if len(parts) == 2: # "-rcN" or "version-platform" - if "rc" in parts[1]: - version_rc = parts[1] - else: - version_os = parts[1] - elif len(parts) == 3: # "-rcN-platform" - version_rc = parts[1] - version_os = parts[2] + # "[-rcN][-platform]" + version_base, _, platform = version_str.partition('-') + rc = "" + if platform.startswith("rc"): # "-rcN[-platform]" + rc, _, platform = platform.partition('-') + # else "" or "-platform" - return version_base, version_rc, version_os + return version_base, rc, platform def download_with_wget(remote_file, local_file): @@ -122,7 +116,7 @@ def download_with_wget(remote_file, local_file): return result.returncode == 0, result.stdout.decode().rstrip() -def download_lines_with_urllib(url) -> t.Tuple[bool, t.List[str]]: +def download_lines_with_urllib(url) -> tuple[bool, list[str]]: """Get (success, text lines of a file) over HTTP.""" try: return (True, [ @@ -138,7 +132,7 @@ def verify_with_gpg( filename, signature_filename, output_filename: t.Optional[str] = None -) -> t.Tuple[int, str]: +) -> tuple[int, str]: with tempfile.NamedTemporaryFile() as status_file: args = [ 'gpg', '--yes', '--verify', '--verify-options', 'show-primary-uid-only', "--status-file", status_file.name, @@ -177,12 +171,12 @@ def __repr__(self): def parse_gpg_result( - output: t.List[str] -) -> t.Tuple[t.List[SigData], t.List[SigData], t.List[SigData]]: + output: list[str] +) -> tuple[list[SigData], list[SigData], list[SigData]]: """Returns good, unknown, and bad signatures from GPG stdout.""" - good_sigs: t.List[SigData] = [] - unknown_sigs: t.List[SigData] = [] - bad_sigs: t.List[SigData] = [] + good_sigs: list[SigData] = [] + unknown_sigs: list[SigData] = [] + bad_sigs: list[SigData] = [] total_resolved_sigs = 0 # Ensure that all lines we match on include a prefix that prevents malicious input @@ -265,7 +259,7 @@ def files_are_equal(filename1, filename2): def get_files_from_hosts_and_compare( - hosts: t.List[str], path: str, filename: str, require_all: bool = False + hosts: list[str], path: str, filename: str, require_all: bool = False ) -> ReturnCode: """ Retrieve the same file from a number of hosts and ensure they have the same contents. @@ -326,7 +320,7 @@ def join_url(host: str) -> str: return ReturnCode.SUCCESS -def check_multisig(sums_file: str, sigfilename: str, args: argparse.Namespace) -> t.Tuple[int, str, t.List[SigData], t.List[SigData], t.List[SigData]]: +def check_multisig(sums_file: str, sigfilename: str, args: argparse.Namespace) -> tuple[int, str, list[SigData], list[SigData], list[SigData]]: # check signature # # We don't write output to a file because this command will almost certainly @@ -365,8 +359,8 @@ def prompt_yn(prompt) -> bool: def verify_shasums_signature( signature_file_path: str, sums_file_path: str, args: argparse.Namespace -) -> t.Tuple[ - ReturnCode, t.List[SigData], t.List[SigData], t.List[SigData], t.List[SigData] +) -> tuple[ + ReturnCode, list[SigData], list[SigData], list[SigData], list[SigData] ]: min_good_sigs = args.min_good_sigs gpg_allowed_codes = [0, 2] # 2 is returned when untrusted signatures are present. @@ -429,14 +423,14 @@ def verify_shasums_signature( return (ReturnCode.SUCCESS, good_trusted, good_untrusted, unknown, bad) -def parse_sums_file(sums_file_path: str, filename_filter: t.List[str]) -> t.List[t.List[str]]: +def parse_sums_file(sums_file_path: str, filename_filter: list[str]) -> list[list[str]]: # extract hashes/filenames of binaries to verify from hash file; # each line has the following format: " " with open(sums_file_path, 'r', encoding='utf8') as hash_file: return [line.split()[:2] for line in hash_file if len(filename_filter) == 0 or any(f in line for f in filename_filter)] -def verify_binary_hashes(hashes_to_verify: t.List[t.List[str]]) -> t.Tuple[ReturnCode, t.Dict[str, str]]: +def verify_binary_hashes(hashes_to_verify: list[list[str]]) -> tuple[ReturnCode, dict[str, str]]: offending_files = [] files_to_hashes = {} @@ -514,7 +508,9 @@ def cleanup(): # Extract hashes and filenames hashes_to_verify = parse_sums_file(SUMS_FILENAME, [os_filter]) if not hashes_to_verify: - log.error("no files matched the platform specified") + available_versions = ["-".join(line[1].split("-")[2:]) for line in parse_sums_file(SUMS_FILENAME, [])] + closest_match = difflib.get_close_matches(os_filter, available_versions, cutoff=0, n=1)[0] + log.error(f"No files matched the platform specified. Did you mean: {closest_match}") return ReturnCode.NO_BINARIES_MATCH # remove binaries that are known not to be hosted by bitcoincore.org diff --git a/contrib/windeploy/detached-sig-create.sh b/contrib/windeploy/detached-sig-create.sh index 82fcf2d4..4ec72653 100755 --- a/contrib/windeploy/detached-sig-create.sh +++ b/contrib/windeploy/detached-sig-create.sh @@ -8,9 +8,9 @@ if [ -z "$OSSLSIGNCODE" ]; then OSSLSIGNCODE=osslsigncode fi -if [ -z "$1" ]; then - echo "usage: $0 " - echo "example: $0 -key codesign.key" +if [ "$#" -ne 1 ]; then + echo "usage: $0 " + echo "example: $0 codesign.key" exit 1 fi @@ -22,12 +22,22 @@ OUTSUBDIR="${OUTDIR}/win" TIMESERVER=http://timestamp.comodoca.com CERTFILE="win-codesign.cert" +stty -echo +printf "Enter the passphrase for %s: " "$1" +read cs_key_pass +printf "\n" +stty echo + + mkdir -p "${OUTSUBDIR}" -# shellcheck disable=SC2046 -basename -a $(ls -1 "${SRCDIR}"/*-unsigned.exe) | while read UNSIGNED; do - echo Signing "${UNSIGNED}" - "${OSSLSIGNCODE}" sign -certs "${CERTFILE}" -t "${TIMESERVER}" -h sha256 -in "${SRCDIR}/${UNSIGNED}" -out "${WORKDIR}/${UNSIGNED}" "$@" - "${OSSLSIGNCODE}" extract-signature -pem -in "${WORKDIR}/${UNSIGNED}" -out "${OUTSUBDIR}/${UNSIGNED}.pem" && rm "${WORKDIR}/${UNSIGNED}" +find ${SRCDIR} -wholename "*.exe" -type f -exec realpath --relative-to=. {} \; | while read -r bin +do + echo Signing "${bin}" + bin_base="$(realpath --relative-to=${SRCDIR} "${bin}")" + mkdir -p "$(dirname ${WORKDIR}/"${bin_base}")" + "${OSSLSIGNCODE}" sign -certs "${CERTFILE}" -t "${TIMESERVER}" -h sha256 -in "${bin}" -out "${WORKDIR}/${bin_base}" -key "$1" -pass "${cs_key_pass}" + mkdir -p "$(dirname ${OUTSUBDIR}/"${bin_base}")" + "${OSSLSIGNCODE}" extract-signature -pem -in "${WORKDIR}/${bin_base}" -out "${OUTSUBDIR}/${bin_base}.pem" && rm "${WORKDIR}/${bin_base}" done rm -f "${OUT}" diff --git a/contrib/windeploy/win-codesign.cert b/contrib/windeploy/win-codesign.cert index 22f17296..ec60a301 100644 --- a/contrib/windeploy/win-codesign.cert +++ b/contrib/windeploy/win-codesign.cert @@ -1,8 +1,8 @@ -----BEGIN CERTIFICATE----- -MIIHfDCCBWSgAwIBAgIQCmVvdQal72U2QxbUTT3SRTANBgkqhkiG9w0BAQsFADBp +MIIHeTCCBWGgAwIBAgIQBzR46J2yq3g++NbQS/BBVDANBgkqhkiG9w0BAQsFADBp MQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xQTA/BgNVBAMT OERpZ2lDZXJ0IFRydXN0ZWQgRzQgQ29kZSBTaWduaW5nIFJTQTQwOTYgU0hBMzg0 -IDIwMjEgQ0ExMB4XDTIyMDUyNDAwMDAwMFoXDTI0MDUyOTIzNTk1OVowgYAxCzAJ +IDIwMjEgQ0ExMB4XDTI0MDUyMjAwMDAwMFoXDTI3MDUzMTIzNTk1OVowgYAxCzAJ BgNVBAYTAlVTMREwDwYDVQQIEwhEZWxhd2FyZTEOMAwGA1UEBxMFTGV3ZXMxJjAk BgNVBAoTHUJpdGNvaW4gQ29yZSBDb2RlIFNpZ25pbmcgTExDMSYwJAYDVQQDEx1C aXRjb2luIENvcmUgQ29kZSBTaWduaW5nIExMQzCCAiIwDQYJKoZIhvcNAQEBBQAD @@ -17,28 +17,28 @@ CDvScIgnQXmk+cbKMBtg9kM0F+aLWsN2xVf0uAj3U7sdXLrfJeW0DZIktWtTBQzX O/OE4Ka+1WFnDg0HJIih0cTjl9YYvfe53L4pCGy+qGt/XGBRqCMfXp3g+H9FGR5r pensVVcsrv3GbTfYdlpdmp9OHH5G57GTAZueobCZg7r7RKK0zPU9EiTLJxzyXuai v/Ksd8eIhHRjewMaQuAtQM1tO+oKAbLF0v2M7v7/aVT76X32JllYAizm3zjvAgMB -AAGjggIGMIICAjAfBgNVHSMEGDAWgBRoN+Drtjv4XxGG+/5hewiIZfROQjAdBgNV -HQ4EFgQUvCpU58PIuofv0kHJ3Ty0YDKEy3cwDgYDVR0PAQH/BAQDAgeAMBMGA1Ud -JQQMMAoGCCsGAQUFBwMDMIG1BgNVHR8Ega0wgaowU6BRoE+GTWh0dHA6Ly9jcmwz -LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFRydXN0ZWRHNENvZGVTaWduaW5nUlNBNDA5 -NlNIQTM4NDIwMjFDQTEuY3JsMFOgUaBPhk1odHRwOi8vY3JsNC5kaWdpY2VydC5j -b20vRGlnaUNlcnRUcnVzdGVkRzRDb2RlU2lnbmluZ1JTQTQwOTZTSEEzODQyMDIx -Q0ExLmNybDA+BgNVHSAENzA1MDMGBmeBDAEEATApMCcGCCsGAQUFBwIBFhtodHRw -Oi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwgZQGCCsGAQUFBwEBBIGHMIGEMCQGCCsG +AAGjggIDMIIB/zAfBgNVHSMEGDAWgBRoN+Drtjv4XxGG+/5hewiIZfROQjAdBgNV +HQ4EFgQUvCpU58PIuofv0kHJ3Ty0YDKEy3cwPgYDVR0gBDcwNTAzBgZngQwBBAEw +KTAnBggrBgEFBQcCARYbaHR0cDovL3d3dy5kaWdpY2VydC5jb20vQ1BTMA4GA1Ud +DwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzCBtQYDVR0fBIGtMIGqMFOg +UaBPhk1odHRwOi8vY3JsMy5kaWdpY2VydC5jb20vRGlnaUNlcnRUcnVzdGVkRzRD +b2RlU2lnbmluZ1JTQTQwOTZTSEEzODQyMDIxQ0ExLmNybDBToFGgT4ZNaHR0cDov +L2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0VHJ1c3RlZEc0Q29kZVNpZ25pbmdS +U0E0MDk2U0hBMzg0MjAyMUNBMS5jcmwwgZQGCCsGAQUFBwEBBIGHMIGEMCQGCCsG AQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wXAYIKwYBBQUHMAKGUGh0 dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFRydXN0ZWRHNENvZGVT -aWduaW5nUlNBNDA5NlNIQTM4NDIwMjFDQTEuY3J0MAwGA1UdEwEB/wQCMAAwDQYJ -KoZIhvcNAQELBQADggIBABhpTZufRws1vrtI0xB1/UWrSEJxdPHivfpXE708dzum -Jh3TFzpsEUCQX5BJJet1l7x92sKNeAL7votA+8O8YvMD64Kim7VKA2BB8AOHKQbp -r1c2iZBwwofInviRYvsrvQta6KBy2KOe1L/l0KnpUazL9Tv4VKvuWAw/Qc0/eTQr -NZRsmADORxnZ1qW+SpF+/WbazIYjod/Oqb1U3on+PzyiGD3SjzNhsdFRptqzrIaY -UVV+2XHG4fN6A8wkyQL5NIVXGiK7rqS5VrRAv58Lf1ZZTghdAL+5SySE0OsR9t0K -W73ZB9pxbuZZ6Zfxjotjw+IilCEm3ADbc7Eb2ijI4x8mix0XWMUrhL34s7/jRyDi -P+30aSgjWp611tp/EYRW5kpIaFR8AesDdM0DSSCCRXOMwQG2Tq2+CnqItB5oLNPp -2XySwlIWvmjbzsREfIpE3yh3bxmHY+vFIc2R0nNkbWNIT6AGtaEQ7oWkgpK8YMkA -QCf4EUC4Qa7qHiH6YSmYJhjApBLC7UDwevgwxuDrwimWAj+tDkzdnENMcBp4SAy6 -LwUuDi2IU6HRSXWdh2YEkDbc3FdwknnnEWaB4dlRL85YjHyLXN0KiE7SKTj1LfR4 -dGeDqVUlDj9D5+X4a7F89wLP/um40/52HUQv5t5WcNr/47r9aVkx9DHs1b8oUnLg +aWduaW5nUlNBNDA5NlNIQTM4NDIwMjFDQTEuY3J0MAkGA1UdEwQCMAAwDQYJKoZI +hvcNAQELBQADggIBADdniG9IY9oOfw1e3+uc2lR4hoZqquJQRrCnbWJ1npnCTavI +CfcEEMuQ5ztg4TR7tQNj2KcaHWKuPYxEz2bg8HpSPG27lnXaz4pLgfqvjdZWNH2v +W6DGRUAwuMQHSV0qhuRcJPZuhwSFx/8y4r++jIcBxCbt/Jprt/bqc8vZZZzTDPfG +M6cGaKMDvF//OkUPVzh4s557kV7+LoaX8CigiACZky3Zj3tkQfJYkEvdQseNvX49 +CMJ+cjN+fGweshbn/DszAT5oXW5l2PXeceyGrE+5Ex1ELXCPqNj8ZSn+S9IKZOag +zDFBA93RTVD438peXPz//xgusgnmSqSPS5tCp9KSvew81acu4v/+egg9EgSSx5Ho +9fkOX7JuygvN3r3UZqsddxdwf2dPvBDYlMdieF8qsR7H5DQPQoaTVrIhW4TFtJl/ +UPjVlnDwu+yvMC70F+CaVgQs01uZ0VKuG3KNkkEj6+V/SM54NVVgcY/Q7llKIFA8 +Qk8Ip8/83cVBptKW+OU+i2ZwoYskLbdfDE31X2knUIouNZgBBMhzc5WjJCEGXAPm +9xYZMn87cc+ejxCw6/WC4b6tDCziO8drq76Pl6LTNPOtRkEVqt12p8Uqi9PgznUB +bdHeoF5XHt1Ca2ySpSYuMz5djwIC2ws8kiMm44/AyTm6dwRcesiOTqnaRc+t -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIIGsDCCBJigAwIBAgIQCK1AsmDSnEyfXs2pvZOu2TANBgkqhkiG9w0BAQwFADBi diff --git a/contrib/zmq/zmq_sub.py b/contrib/zmq/zmq_sub.py index 638def29..b2290a6c 100755 --- a/contrib/zmq/zmq_sub.py +++ b/contrib/zmq/zmq_sub.py @@ -7,7 +7,7 @@ ZMQ example using python3's asyncio Bitcoin should be started with the command line arguments: - coordinated -testnet -daemon \ + bitcoind -testnet4 -daemon \ -zmqpubrawtx=tcp://127.0.0.1:28332 \ -zmqpubrawblock=tcp://127.0.0.1:28332 \ -zmqpubhashtx=tcp://127.0.0.1:28332 \ diff --git a/depends/.gitignore b/depends/.gitignore index 19c506ce..c53f7f61 100644 --- a/depends/.gitignore +++ b/depends/.gitignore @@ -2,8 +2,8 @@ SDKs/ work/ built/ sources/ -config.site x86_64* +amd64* i686* mips* arm* diff --git a/depends/Makefile b/depends/Makefile index 31691176..9767b8eb 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -36,23 +36,17 @@ NO_BOOST ?= NO_LIBEVENT ?= NO_QT ?= NO_QR ?= -NO_BDB ?= -NO_SQLITE ?= NO_WALLET ?= NO_ZMQ ?= -NO_UPNP ?= NO_USDT ?= -NO_NATPMP ?= MULTIPROCESS ?= LTO ?= -NO_HARDEN ?= FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources C_STANDARD ?= c11 -CXX_STANDARD ?= c++17 +CXX_STANDARD ?= c++20 BUILD = $(shell ./config.guess) -HOST ?= $(BUILD) PATCHES_PATH = $(BASEDIR)/patches BASEDIR = $(CURDIR) HASH_LENGTH:=11 @@ -61,11 +55,6 @@ DOWNLOAD_RETRIES:=3 HOST_ID_SALT ?= salt BUILD_ID_SALT ?= salt -host:=$(BUILD) -ifneq ($(HOST),) -host:=$(HOST) -endif - ifneq ($(DEBUG),) release_type=debug else @@ -75,9 +64,15 @@ endif base_build_dir=$(WORK_PATH)/build base_staging_dir=$(WORK_PATH)/staging base_download_dir=$(WORK_PATH)/download -canonical_host:=$(shell ./config.sub $(HOST)) build:=$(shell ./config.sub $(BUILD)) +host:=$(build) +ifneq ($(HOST),) +host:=$(HOST) +endif +HOST ?= $(BUILD) +canonical_host:=$(shell ./config.sub $(HOST)) + build_arch =$(firstword $(subst -, ,$(build))) build_vendor=$(word 2,$(subst -, ,$(build))) full_build_os:=$(subst $(build_arch)-$(build_vendor)-,,$(build)) @@ -101,10 +96,6 @@ host_os+=$(findstring netbsd,$(full_host_os)) host_os+=$(findstring openbsd,$(full_host_os)) host_os+=$(findstring mingw32,$(full_host_os)) -ifeq (android,$(findstring android,$(full_host_os))) -host_os:=android -endif - host_os:=$(strip $(host_os)) ifeq ($(host_os),) host_os=$(full_host_os) @@ -147,8 +138,16 @@ include packages/packages.mk # 2. Before including packages/*.mk (excluding packages/packages.mk), since # they rely on the build_id variables # -build_id:=$(shell env CC='$(build_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(build_CXX)' CXX_STANDARD='$(CXX_STANDARD)' AR='$(build_AR)' RANLIB='$(build_RANLIB)' STRIP='$(build_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' LTO='$(LTO)' NO_HARDEN='$(NO_HARDEN)' ./gen_id '$(BUILD_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))') -$(host_arch)_$(host_os)_id:=$(shell env CC='$(host_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(host_CXX)' CXX_STANDARD='$(CXX_STANDARD)' AR='$(host_AR)' RANLIB='$(host_RANLIB)' STRIP='$(host_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' LTO='$(LTO)' NO_HARDEN='$(NO_HARDEN)' ./gen_id '$(HOST_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))') +build_id:=$(shell env CC='$(build_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(build_CXX)' CXX_STANDARD='$(CXX_STANDARD)' \ + AR='$(build_AR)' NM='$(build_NM)' RANLIB='$(build_RANLIB)' STRIP='$(build_STRIP)' SHA256SUM='$(build_SHA256SUM)' \ + DEBUG='$(DEBUG)' \ + ./gen_id '$(BUILD_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))') + +$(host_arch)_$(host_os)_id:=$(shell env CC='$(host_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(host_CXX)' CXX_STANDARD='$(CXX_STANDARD)' \ + CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CXXFLAGS='$(CXXFLAGS)' LDFLAGS='$(LDFLAGS)' \ + AR='$(host_AR)' NM='$(host_NM)' RANLIB='$(host_RANLIB)' STRIP='$(host_STRIP)' SHA256SUM='$(build_SHA256SUM)' \ + DEBUG='$(DEBUG)' LTO='$(LTO)' \ + ./gen_id '$(HOST_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))') boost_packages_$(NO_BOOST) = $(boost_packages) @@ -157,20 +156,16 @@ libevent_packages_$(NO_LIBEVENT) = $(libevent_packages) qrencode_packages_$(NO_QR) = $(qrencode_$(host_os)_packages) qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages) $(qrencode_packages_) +qt_native_packages_$(NO_QT) = $(qt_native_packages) -bdb_packages_$(NO_BDB) = $(bdb_packages) -sqlite_packages_$(NO_SQLITE) = $(sqlite_packages) -wallet_packages_$(NO_WALLET) = $(bdb_packages_) $(sqlite_packages_) - -upnp_packages_$(NO_UPNP) = $(upnp_packages) -natpmp_packages_$(NO_NATPMP) = $(natpmp_packages) +wallet_packages_$(NO_WALLET) = $(sqlite_packages) zmq_packages_$(NO_ZMQ) = $(zmq_packages) multiprocess_packages_$(MULTIPROCESS) = $(multiprocess_packages) usdt_packages_$(NO_USDT) = $(usdt_$(host_os)_packages) -packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(boost_packages_) $(libevent_packages_) $(qt_packages_) $(wallet_packages_) $(upnp_packages_) $(natpmp_packages_) $(usdt_packages_) -native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages) +packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(boost_packages_) $(libevent_packages_) $(qt_packages_) $(wallet_packages_) $(usdt_packages_) +native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages) $(qt_native_packages_) ifneq ($(zmq_packages_),) packages += $(zmq_packages) @@ -183,14 +178,11 @@ endif all_packages = $(packages) $(native_packages) -meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk - -$(host_arch)_$(host_os)_native_binutils?=$($(host_os)_native_binutils) -$(host_arch)_$(host_os)_native_toolchain?=$($(host_os)_native_toolchain) +meta_depends = Makefile config.guess config.sub funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk include funcs.mk -final_build_id_long+=$(shell $(build_SHA256SUM) config.site.in) +final_build_id_long+=$(shell $(build_SHA256SUM) toolchain.cmake.in) final_build_id+=$(shell echo -n "$(final_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH)) $(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages) rm -rf $(@D) @@ -198,68 +190,51 @@ $(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages) echo copying packages: $^ echo to: $(@D) cd $(@D); $(foreach package,$^, $(build_TAR) xf $($(package)_cached); ) + echo To build Bitcoin Core with these packages, pass \'--toolchain $(@D)/toolchain.cmake\' to the first CMake invocation. touch $@ -# $PATH is not preserved between ./configure and make by convention. Its -# modification and overriding at ./configure time is (as I understand it) -# supposed to be captured by the AC_{PROG_{,OBJ}CXX,PATH_{PROG,TOOL}} macros, -# which will expand the program names to their full absolute paths. The notable -# exception is command line overriding: ./configure CC=clang, which skips the -# program name expansion step, and works because the user implicitly indicates -# with CC=clang that clang will be available in $PATH at all times, and is most -# likely part of the user's system. -# -# Therefore, when we "seed the autoconf cache"/"override well-known program -# vars" by setting AR= in our config.site, either one of two things needs -# to be true for the build system to work correctly: -# -# 1. If we refer to the program by name (e.g. AR=riscv64-gnu-linux-ar), the -# tool needs to be available in $PATH at all times. -# -# 2. If the tool is _**not**_ expected to be available in $PATH at all times -# (such as is the case for our native_cctools binutils tools), it needs to -# be referred to by its absolute path, such as would be output by the -# AC_PATH_{PROG,TOOL} macros. -# -# Minor note: it is also okay to refer to tools by their absolute path even if -# we expect them to be available in $PATH at all times, more specificity does -# not hurt. -$(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_build_id) +ifeq ($(host),$(build)) + crosscompiling=FALSE +else + crosscompiling=TRUE +endif + +$(host_prefix)/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(final_build_id) @mkdir -p $(@D) - sed -e 's|@HOST@|$(host)|' \ + sed -e 's|@depends_crosscompiling@|$(crosscompiling)|' \ + -e 's|@host@|$(host)|' \ + -e 's|@host_system_name@|$($(host_os)_cmake_system_name)|' \ + -e 's|@host_system_version@|$($(host_os)_cmake_system_version)|' \ + -e 's|@host_arch@|$(host_arch)|' \ -e 's|@CC@|$(host_CC)|' \ -e 's|@CXX@|$(host_CXX)|' \ + -e 's|@OSX_SDK@|$(OSX_SDK)|' \ -e 's|@AR@|$(host_AR)|' \ -e 's|@RANLIB@|$(host_RANLIB)|' \ - -e 's|@NM@|$(host_NM)|' \ -e 's|@STRIP@|$(host_STRIP)|' \ - -e 's|@OTOOL@|$(host_OTOOL)|' \ - -e 's|@INSTALL_NAME_TOOL@|$(host_INSTALL_NAME_TOOL)|' \ - -e 's|@DSYMUTIL@|$(host_DSYMUTIL)|' \ - -e 's|@build_os@|$(build_os)|' \ - -e 's|@host_os@|$(host_os)|' \ - -e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \ - -e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS) $(host_$(release_type)_CXXFLAGS))|' \ - -e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS) $(host_$(release_type)_CPPFLAGS))|' \ - -e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \ - -e 's|@allow_host_packages@|$(ALLOW_HOST_PACKAGES)|' \ - -e 's|@no_qt@|$(NO_QT)|' \ - -e 's|@no_qr@|$(NO_QR)|' \ - -e 's|@no_zmq@|$(NO_ZMQ)|' \ - -e 's|@no_wallet@|$(NO_WALLET)|' \ - -e 's|@no_bdb@|$(NO_BDB)|' \ - -e 's|@no_sqlite@|$(NO_SQLITE)|' \ - -e 's|@no_upnp@|$(NO_UPNP)|' \ - -e 's|@no_usdt@|$(NO_USDT)|' \ - -e 's|@no_natpmp@|$(NO_NATPMP)|' \ + -e 's|@OBJCOPY@|$(host_OBJCOPY)|' \ + -e 's|@OBJDUMP@|$(host_OBJDUMP)|' \ + -e 's|@CFLAGS@|$(strip $(host_CFLAGS))|' \ + -e 's|@CFLAGS_RELEASE@|$(strip $(host_release_CFLAGS))|' \ + -e 's|@CFLAGS_DEBUG@|$(strip $(host_debug_CFLAGS))|' \ + -e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS))|' \ + -e 's|@CXXFLAGS_RELEASE@|$(strip $(host_release_CXXFLAGS))|' \ + -e 's|@CXXFLAGS_DEBUG@|$(strip $(host_debug_CXXFLAGS))|' \ + -e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS))|' \ + -e 's|@CPPFLAGS_RELEASE@|$(strip $(host_release_CPPFLAGS))|' \ + -e 's|@CPPFLAGS_DEBUG@|$(strip $(host_debug_CPPFLAGS))|' \ + -e 's|@LDFLAGS@|$(strip $(host_LDFLAGS))|' \ + -e 's|@LDFLAGS_RELEASE@|$(strip $(host_release_LDFLAGS))|' \ + -e 's|@LDFLAGS_DEBUG@|$(strip $(host_debug_LDFLAGS))|' \ + -e 's|@qt_packages@|$(qt_packages_)|' \ + -e 's|@qrencode_packages@|$(qrencode_packages_)|' \ + -e 's|@zmq_packages@|$(zmq_packages_)|' \ + -e 's|@wallet_packages@|$(wallet_packages_)|' \ + -e 's|@usdt_packages@|$(usdt_packages_)|' \ -e 's|@multiprocess@|$(MULTIPROCESS)|' \ - -e 's|@lto@|$(LTO)|' \ - -e 's|@no_harden@|$(NO_HARDEN)|' \ - -e 's|@debug@|$(DEBUG)|' \ $< > $@ touch $@ - define check_or_remove_cached mkdir -p $(BASE_CACHE)/$(host)/$(package) && cd $(BASE_CACHE)/$(host)/$(package); \ $(build_SHA256SUM) -c $($(package)_cached_checksum) >/dev/null 2>/dev/null || \ @@ -279,7 +254,7 @@ check-packages: check-sources: @$(foreach package,$(all_packages),$(call check_or_remove_sources,$(package));) -$(host_prefix)/share/config.site: check-packages +$(host_prefix)/toolchain.cmake: check-packages check-packages: check-sources @@ -289,7 +264,7 @@ clean-all: clean clean: @rm -rf $(WORK_PATH) $(BASE_CACHE) $(BUILD) *.log -install: check-packages $(host_prefix)/share/config.site +install: check-packages $(host_prefix)/toolchain.cmake download-one: check-sources $(all_sources) diff --git a/depends/README.md b/depends/README.md index 8a964b25..db309892 100644 --- a/depends/README.md +++ b/depends/README.md @@ -1,69 +1,158 @@ -### Usage +# Depends build + +This is a system of building and caching dependencies necessary for building +Bitcoin Core. It supports cross-compilation. For more details see [description.md](description.md), +as well as [packages.md](packages.md) for how to add packages. + +## Usage + +### Ubuntu & Debian + + apt install cmake curl make patch + +Skip the following packages if you don't intend to use the GUI and will build with [`NO_QT=1`](#dependency-options): + + apt install bison g++ ninja-build pkgconf python3 xz-utils To build dependencies for the current arch+OS: make -To build for another arch/OS: +### macOS - make HOST=host-platform-triplet +Install Xcode Command Line Tools and Homebrew Package Manager, +see [build-osx.md](../doc/build-osx.md). -For example: + brew install cmake make ninja - make HOST=x86_64-w64-mingw32 -j4 +To build dependencies for the current arch+OS: + + gmake + +### FreeBSD + + pkg install bash cmake curl gmake + +Skip the following packages if you don't intend to use the GUI and will build with [`NO_QT=1`](#dependency-options): + + pkg install bison ninja pkgconf python3 + +To build dependencies for the current arch+OS: + + gmake + +### NetBSD + + pkgin install bash cmake curl gmake perl + +To build dependencies for the current arch+OS: + + gmake -**Bitcoin Core's `configure` script by default will ignore the depends output.** In +### OpenBSD + + pkg_add bash cmake curl gmake gtar + +To build dependencies for the current arch+OS: + + gmake + +### Alpine + + apk add bash build-base cmake curl make patch + +Skip the following packages if you don't intend to use the GUI and will build with [`NO_QT=1`](#dependency-options): + + apk add bison linux-headers samurai pkgconf python3 + +To build dependencies for the current arch+OS: + + make + +## Configuring Bitcoin Core + +**When configuring Bitcoin Core, CMake by default will ignore the depends output.** In order for it to pick up libraries, tools, and settings from the depends build, -you must set the `CONFIG_SITE` environment variable to point to a `config.site` settings file. -Make sure that `CONFIG_SITE` is an absolute path. -In the above example, a file named `depends/x86_64-w64-mingw32/share/config.site` will be -created. To use it during compilation: +you must specify the toolchain file. +In the above example for Ubuntu, a file named `depends/x86_64-pc-linux-gnu/toolchain.cmake` will be +created. To use it during configuring Bitcoin Core: + + cmake -B build --toolchain depends/x86_64-pc-linux-gnu/toolchain.cmake + +## Dependency Options + +The following can be set when running make: `make FOO=bar` + +- `SOURCES_PATH`: Downloaded sources will be placed here +- `BASE_CACHE`: Built packages will be placed here +- `SDK_PATH`: Path where SDKs can be found (used by macOS) +- `FALLBACK_DOWNLOAD_PATH`: If a source file can't be fetched, try here before giving up +- `C_STANDARD`: Set the C standard version used. Defaults to `c11`. +- `CXX_STANDARD`: Set the C++ standard version used. Defaults to `c++20`. +- `NO_BOOST`: Don't download/build/cache Boost +- `NO_LIBEVENT`: Don't download/build/cache Libevent +- `NO_QT`: Don't download/build/cache Qt and its dependencies +- `NO_QR`: Don't download/build/cache packages needed for enabling qrencode +- `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ +- `NO_WALLET`: Don't download/build/cache libs needed to enable the wallet (SQLite) +- `NO_USDT`: Don't download/build/cache packages needed for enabling USDT tracepoints +- `MULTIPROCESS`: Build libmultiprocess (experimental) +- `DEBUG`: Disable some optimizations and enable more runtime checking +- `HOST_ID_SALT`: Optional salt to use when generating host package ids +- `BUILD_ID_SALT`: Optional salt to use when generating build package ids +- `LOG`: Use file-based logging for individual packages. During a package build its log file + resides in the `depends` directory, and the log file is printed out automatically in case + of build error. After successful build log files are moved along with package archives +- `LTO`: Enable options needed for LTO. Does not add `-flto` related options to *FLAGS. - CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure +If some packages are not built, for example `make NO_WALLET=1`, the appropriate CMake cache +variables will be set when generating the Bitcoin Core buildsystem. In this case, `-DENABLE_WALLET=OFF`. -The default install prefix when using `config.site` is `--prefix=depends/`, -so depends build outputs will be installed in that location. +## Cross compilation + +To build for another arch/OS: + + make HOST=host-platform-triplet + +For example: + + make HOST=x86_64-w64-mingw32 -j4 Common `host-platform-triplet`s for cross compilation are: -- `i686-pc-linux-gnu` for Linux 32 bit -- `x86_64-pc-linux-gnu` for x86 Linux +- `i686-pc-linux-gnu` for Linux x86 32 bit +- `x86_64-pc-linux-gnu` for Linux x86 64 bit - `x86_64-w64-mingw32` for Win64 - `x86_64-apple-darwin` for macOS - `arm64-apple-darwin` for ARM macOS - `arm-linux-gnueabihf` for Linux ARM 32 bit - `aarch64-linux-gnu` for Linux ARM 64 bit -- `powerpc64-linux-gnu` for Linux POWER 64-bit (big endian) -- `powerpc64le-linux-gnu` for Linux POWER 64-bit (little endian) +- `powerpc64-linux-gnu` for Linux POWER 64 bit (big endian) +- `powerpc64le-linux-gnu` for Linux POWER 64 bit (little endian) - `riscv32-linux-gnu` for Linux RISC-V 32 bit - `riscv64-linux-gnu` for Linux RISC-V 64 bit - `s390x-linux-gnu` for Linux S390X -- `armv7a-linux-android` for Android ARM 32 bit -- `aarch64-linux-android` for Android ARM 64 bit -- `x86_64-linux-android` for Android x86 64 bit - -The paths are automatically configured and no other options are needed unless targeting [Android](../doc/build-android.md). -### Install the required dependencies: Ubuntu & Debian +The paths are automatically configured and no other options are needed. #### For macOS cross compilation - sudo apt-get install curl bsdmainutils cmake libz-dev python3-setuptools zip + apt install clang lld llvm zip -Note: You must obtain the macOS SDK before proceeding with a cross-compile. -Under the depends directory, create a subdirectory named `SDKs`. -Then, place the extracted SDK under this new directory. +Clang 18 or later is required. You must also obtain the macOS SDK before +proceeding with a cross-compile. Under the depends directory, create a +subdirectory named `SDKs`. Then, place the extracted SDK under this new directory. For more information, see [SDK Extraction](../contrib/macdeploy/README.md#sdk-extraction). #### For Win64 cross compilation -- see [build-windows.md](../doc/build-windows.md#cross-compilation-for-ubuntu-and-windows-subsystem-for-linux) + apt install g++-mingw-w64-x86-64-posix #### For linux (including i386, ARM) cross compilation Common linux dependencies: - sudo apt-get install make automake cmake curl g++-multilib libtool binutils bsdmainutils pkg-config python3 patch bison + sudo apt-get install g++-multilib binutils For linux ARM cross compilation: @@ -85,59 +174,9 @@ For linux S390X cross compilation: sudo apt-get install g++-s390x-linux-gnu binutils-s390x-linux-gnu -### Install the required dependencies: OpenBSD - - pkg_add bash gtar - -### Dependency Options - -The following can be set when running make: `make FOO=bar` - -- `SOURCES_PATH`: Downloaded sources will be placed here -- `BASE_CACHE`: Built packages will be placed here -- `SDK_PATH`: Path where SDKs can be found (used by macOS) -- `FALLBACK_DOWNLOAD_PATH`: If a source file can't be fetched, try here before giving up -- `C_STANDARD`: Set the C standard version used. Defaults to `c11`. -- `CXX_STANDARD`: Set the C++ standard version used. Defaults to `c++17`. -- `NO_BOOST`: Don't download/build/cache Boost -- `NO_LIBEVENT`: Don't download/build/cache Libevent -- `NO_QT`: Don't download/build/cache Qt and its dependencies -- `NO_QR`: Don't download/build/cache packages needed for enabling qrencode -- `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ -- `NO_WALLET`: Don't download/build/cache libs needed to enable the wallet -- `NO_BDB`: Don't download/build/cache BerkeleyDB -- `NO_SQLITE`: Don't download/build/cache SQLite -- `NO_UPNP`: Don't download/build/cache packages needed for enabling UPnP -- `NO_NATPMP`: Don't download/build/cache packages needed for enabling NAT-PMP -- `NO_USDT`: Don't download/build/cache packages needed for enabling USDT tracepoints -- `ALLOW_HOST_PACKAGES`: Packages that are missed in dependencies (due to `NO_*` option or - build script logic) are searched for among the host system packages using - `pkg-config`. It allows building with packages of other (newer) versions -- `MULTIPROCESS`: Build libmultiprocess (experimental, requires CMake) -- `DEBUG`: Disable some optimizations and enable more runtime checking -- `HOST_ID_SALT`: Optional salt to use when generating host package ids -- `BUILD_ID_SALT`: Optional salt to use when generating build package ids -- `FORCE_USE_SYSTEM_CLANG`: (EXPERTS ONLY) When cross-compiling for macOS, use Clang found in the - system's `$PATH` rather than the default prebuilt release of Clang - from llvm.org. Clang 8 or later is required -- `LOG`: Use file-based logging for individual packages. During a package build its log file - resides in the `depends` directory, and the log file is printed out automatically in case - of build error. After successful build log files are moved along with package archives -- `LTO`: Use LTO when building packages. -- `NO_HARDEN=1`: Don't use hardening options when building packages - -If some packages are not built, for example `make NO_WALLET=1`, the appropriate -options will be passed to bitcoin's configure. In this case, `--disable-wallet`. - ### Additional targets download: run 'make download' to fetch all sources without building them download-osx: run 'make download-osx' to fetch all sources needed for macOS builds download-win: run 'make download-win' to fetch all sources needed for win builds download-linux: run 'make download-linux' to fetch all sources needed for linux builds - - -### Other documentation - -- [description.md](description.md): General description of the depends system -- [packages.md](packages.md): Steps for adding packages diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk index 8ed82b27..2b59353e 100644 --- a/depends/builders/darwin.mk +++ b/depends/builders/darwin.mk @@ -3,26 +3,21 @@ build_darwin_CXX:=$(shell xcrun -f clang++) -isysroot$(shell xcrun --show-sdk-pa build_darwin_AR:=$(shell xcrun -f ar) build_darwin_RANLIB:=$(shell xcrun -f ranlib) build_darwin_STRIP:=$(shell xcrun -f strip) -build_darwin_OTOOL:=$(shell xcrun -f otool) +build_darwin_OBJDUMP:=$(shell xcrun -f objdump) build_darwin_NM:=$(shell xcrun -f nm) -build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool) build_darwin_DSYMUTIL:=$(shell xcrun -f dsymutil) build_darwin_SHA256SUM=shasum -a 256 build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o #darwin host on darwin builder. overrides darwin host preferences. -darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) -isysroot$(shell xcrun --show-sdk-path) -darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION) -stdlib=libc++ -isysroot$(shell xcrun --show-sdk-path) +darwin_CC=$(shell xcrun -f clang) -isysroot$(shell xcrun --show-sdk-path) +darwin_CXX:=$(shell xcrun -f clang++) -stdlib=libc++ -isysroot$(shell xcrun --show-sdk-path) darwin_AR:=$(shell xcrun -f ar) darwin_RANLIB:=$(shell xcrun -f ranlib) darwin_STRIP:=$(shell xcrun -f strip) -darwin_LIBTOOL:=$(shell xcrun -f libtool) -darwin_OTOOL:=$(shell xcrun -f otool) +darwin_OBJDUMP:=$(shell xcrun -f objdump) darwin_NM:=$(shell xcrun -f nm) -darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool) darwin_DSYMUTIL:=$(shell xcrun -f dsymutil) -darwin_native_binutils= -darwin_native_toolchain= x86_64_darwin_CFLAGS += -arch x86_64 x86_64_darwin_CXXFLAGS += -arch x86_64 diff --git a/depends/builders/default.mk b/depends/builders/default.mk index cc6dec66..2a1709d9 100644 --- a/depends/builders/default.mk +++ b/depends/builders/default.mk @@ -1,17 +1,19 @@ default_build_CC = gcc default_build_CXX = g++ default_build_AR = ar +default_build_OBJDUMP = objdump default_build_TAR = tar default_build_RANLIB = ranlib default_build_STRIP = strip default_build_NM = nm +default_build_TOUCH = touch -h -m -t 200001011200 define add_build_tool_func build_$(build_os)_$1 ?= $$(default_build_$1) build_$(build_arch)_$(build_os)_$1 ?= $$(build_$(build_os)_$1) build_$1=$$(build_$(build_arch)_$(build_os)_$1) endef -$(foreach var,CC CXX AR TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL DSYMUTIL,$(eval $(call add_build_tool_func,$(var)))) +$(foreach var,CC CXX AR TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OBJDUMP DSYMUTIL TOUCH,$(eval $(call add_build_tool_func,$(var)))) define add_build_flags_func build_$(build_arch)_$(build_os)_$1 += $(build_$(build_os)_$1) build_$1=$$(build_$(build_arch)_$(build_os)_$1) diff --git a/depends/builders/freebsd.mk b/depends/builders/freebsd.mk index 465f58e0..910de28b 100644 --- a/depends/builders/freebsd.mk +++ b/depends/builders/freebsd.mk @@ -1,5 +1,9 @@ build_freebsd_CC=clang build_freebsd_CXX=clang++ -build_freebsd_SHA256SUM = shasum -a 256 +build_freebsd_SHA256SUM = sha256sum build_freebsd_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o + +# freebsd host on freebsd builder: override freebsd host preferences. +freebsd_CC = clang +freebsd_CXX = clang++ diff --git a/depends/builders/openbsd.mk b/depends/builders/openbsd.mk index 44825d10..6aeb1431 100644 --- a/depends/builders/openbsd.mk +++ b/depends/builders/openbsd.mk @@ -1,7 +1,13 @@ build_openbsd_CC = clang build_openbsd_CXX = clang++ -build_openbsd_SHA256SUM = sha256 +build_openbsd_SHA256SUM = sha256 -r build_openbsd_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o build_openbsd_TAR = gtar +# openBSD touch doesn't understand -h +build_openbsd_TOUCH = touch -m -t 200001011200 + +# openbsd host on openbsd builder: override openbsd host preferences. +openbsd_CC = clang +openbsd_CXX = clang++ diff --git a/depends/config.guess b/depends/config.guess index 69188da7..48a68460 100755 --- a/depends/config.guess +++ b/depends/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2023 Free Software Foundation, Inc. +# Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2023-01-01' +timestamp='2024-07-27' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system \`$me' is run on. +Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit @@ -60,13 +60,13 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2023 Free Software Foundation, Inc. +Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -102,8 +102,8 @@ GUESS= # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. +# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still +# use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. @@ -123,7 +123,7 @@ set_cc_for_build() { dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" - for driver in cc gcc c89 c99 ; do + for driver in cc gcc c17 c99 c89 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD=$driver break @@ -155,6 +155,9 @@ Linux|GNU|GNU/*) set_cc_for_build cat <<-EOF > "$dummy.c" + #if defined(__ANDROID__) + LIBC=android + #else #include #if defined(__UCLIBC__) LIBC=uclibc @@ -162,6 +165,8 @@ Linux|GNU|GNU/*) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu + #elif defined(__LLVM_LIBC__) + LIBC=llvm #else #include /* First heuristic to detect musl libc. */ @@ -169,6 +174,7 @@ Linux|GNU|GNU/*) LIBC=musl #endif #endif + #endif EOF cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` eval "$cc_set_libc" @@ -459,7 +465,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like `4.1.3-JL'. + # Japanese Language versions have a version number like '4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; @@ -628,7 +634,8 @@ EOF sed 's/^ //' << EOF > "$dummy.c" #include - main() + int + main () { if (!__power_pc()) exit(1); @@ -712,7 +719,8 @@ EOF #include #include - int main () + int + main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); @@ -904,7 +912,7 @@ EOF fi ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` + UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; @@ -976,7 +984,27 @@ EOF GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __ARM_EABI__ + #ifdef __ARM_PCS_VFP + ABI=eabihf + #else + ABI=eabi + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; + esac + fi + GUESS=$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be @@ -1042,6 +1070,15 @@ EOF k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; + kvx:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:cos:*:*) + GUESS=$UNAME_MACHINE-unknown-cos + ;; + kvx:mbr:*:*) + GUESS=$UNAME_MACHINE-unknown-mbr + ;; loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; @@ -1197,7 +1234,7 @@ EOF GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility + # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; @@ -1338,7 +1375,7 @@ EOF GUESS=ns32k-sni-sysv fi ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; @@ -1560,6 +1597,9 @@ EOF *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; + *:Ironclad:*:*) + GUESS=$UNAME_MACHINE-unknown-ironclad + ;; esac # Do we have a guess based on uname results? @@ -1583,6 +1623,7 @@ cat > "$dummy.c" <." version="\ GNU config.sub ($timestamp) -Copyright 1992-2023 Free Software Foundation, Inc. +Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -120,7 +120,6 @@ case $# in esac # Split fields of configuration type -# shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 + echo "Invalid configuration '$1': more than four components" >&2 exit 1 ;; *-*-*-*) @@ -142,10 +141,21 @@ case $1 in # parts maybe_os=$field2-$field3 case $maybe_os in - nto-qnx* | linux-* | uclinux-uclibc* \ - | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ - | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova* | managarm-*) + cloudabi*-eabi* \ + | kfreebsd*-gnu* \ + | knetbsd*-gnu* \ + | kopensolaris*-gnu* \ + | linux-* \ + | managarm-* \ + | netbsd*-eabi* \ + | netbsd*-gnu* \ + | nto-qnx* \ + | os2-emx* \ + | rtmk-nova* \ + | storm-chaos* \ + | uclinux-gnu* \ + | uclinux-uclibc* \ + | windows-* ) basic_machine=$field1 basic_os=$maybe_os ;; @@ -160,8 +170,12 @@ case $1 in esac ;; *-*) - # A lone config we happen to match not fitting any pattern case $field1-$field2 in + # Shorthands that happen to contain a single dash + convex-c[12] | convex-c3[248]) + basic_machine=$field2-convex + basic_os= + ;; decstation-3100) basic_machine=mips-dec basic_os= @@ -169,28 +183,88 @@ case $1 in *-*) # Second component is usually, but not always the OS case $field2 in - # Prevent following clause from handling this valid os + # Do not treat sunos as a manufacturer sun*os*) basic_machine=$field1 basic_os=$field2 ;; - zephyr*) - basic_machine=$field1-unknown - basic_os=$field2 - ;; # Manufacturers - dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ - | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ - | unicom* | ibm* | next | hp | isi* | apollo | altos* \ - | convergent* | ncr* | news | 32* | 3600* | 3100* \ - | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ - | ultra | tti* | harris | dolphin | highlevel | gould \ - | cbm | ns | masscomp | apple | axis | knuth | cray \ - | microblaze* | sim | cisco \ - | oki | wec | wrs | winbond) + 3100* \ + | 32* \ + | 3300* \ + | 3600* \ + | 7300* \ + | acorn \ + | altos* \ + | apollo \ + | apple \ + | atari \ + | att* \ + | axis \ + | be \ + | bull \ + | cbm \ + | ccur \ + | cisco \ + | commodore \ + | convergent* \ + | convex* \ + | cray \ + | crds \ + | dec* \ + | delta* \ + | dg \ + | digital \ + | dolphin \ + | encore* \ + | gould \ + | harris \ + | highlevel \ + | hitachi* \ + | hp \ + | ibm* \ + | intergraph \ + | isi* \ + | knuth \ + | masscomp \ + | microblaze* \ + | mips* \ + | motorola* \ + | ncr* \ + | news \ + | next \ + | ns \ + | oki \ + | omron* \ + | pc533* \ + | rebel \ + | rom68k \ + | rombug \ + | semi \ + | sequent* \ + | siemens \ + | sgi* \ + | siemens \ + | sim \ + | sni \ + | sony* \ + | stratus \ + | sun \ + | sun[234]* \ + | tektronix \ + | tti* \ + | ultra \ + | unicom* \ + | wec \ + | winbond \ + | wrs) basic_machine=$field1-$field2 basic_os= ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 + ;; *) basic_machine=$field1 basic_os=$field2 @@ -271,26 +345,6 @@ case $1 in basic_machine=arm-unknown basic_os=cegcc ;; - convex-c1) - basic_machine=c1-convex - basic_os=bsd - ;; - convex-c2) - basic_machine=c2-convex - basic_os=bsd - ;; - convex-c32) - basic_machine=c32-convex - basic_os=bsd - ;; - convex-c34) - basic_machine=c34-convex - basic_os=bsd - ;; - convex-c38) - basic_machine=c38-convex - basic_os=bsd - ;; cray) basic_machine=j90-cray basic_os=unicos @@ -713,15 +767,26 @@ case $basic_machine in vendor=dec basic_os=tops20 ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) + delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300) cpu=m68k vendor=motorola ;; - dpx2*) + # This used to be dpx2*, but that gets the RS6000-based + # DPX/20 and the x86-based DPX/2-100 wrong. See + # https://oldskool.silicium.org/stations/bull_dpx20.htm + # https://www.feb-patrimoine.com/english/bull_dpx2.htm + # https://www.feb-patrimoine.com/english/unix_and_bull.htm + dpx2 | dpx2[23]00 | dpx2[23]xx) cpu=m68k vendor=bull - basic_os=sysv3 + ;; + dpx2100 | dpx21xx) + cpu=i386 + vendor=bull + ;; + dpx20) + cpu=rs6000 + vendor=bull ;; encore | umax | mmax) cpu=ns32k @@ -836,18 +901,6 @@ case $basic_machine in next | m*-next) cpu=m68k vendor=next - case $basic_os in - openstep*) - ;; - nextstep*) - ;; - ns2*) - basic_os=nextstep2 - ;; - *) - basic_os=nextstep3 - ;; - esac ;; np1) cpu=np1 @@ -936,14 +989,13 @@ case $basic_machine in ;; *-*) - # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read cpu vendor <&2 + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 exit 1 ;; esac @@ -1306,11 +1491,12 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if test x$basic_os != x +if test x"$basic_os" != x then # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. +obj= case $basic_os in gnu/linux*) kernel=linux @@ -1325,7 +1511,6 @@ case $basic_os in os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) - # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read kernel os <&2 + fi + ;; *) - echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 + exit 1 + ;; +esac + +case $obj in + aout* | coff* | elf* | pe*) + ;; + '') + # empty is fine + ;; + *) + echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 + exit 1 + ;; +esac + +# Here we handle the constraint that a (synthetic) cpu and os are +# valid only in combination with each other and nowhere else. +case $cpu-$os in + # The "javascript-unknown-ghcjs" triple is used by GHC; we + # accept it here in order to tolerate that, but reject any + # variations. + javascript-ghcjs) + ;; + javascript-* | *-ghcjs) + echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. -case $kernel-$os in - linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ - | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* ) +case $kernel-$os-$obj in + linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ + | linux-mlibc*- | linux-musl*- | linux-newlib*- \ + | linux-relibc*- | linux-uclibc*- | linux-ohos*- ) + ;; + uclinux-uclibc*- | uclinux-gnu*- ) ;; - uclinux-uclibc* ) + managarm-mlibc*- | managarm-kernel*- ) ;; - managarm-mlibc* | managarm-kernel* ) + windows*-msvc*-) ;; - -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) + -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ + | -uclibc*- ) # These are just libc implementations, not actual OSes, and thus # require a kernel. - echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 exit 1 ;; - -kernel* ) - echo "Invalid configuration \`$1': \`$os' needs explicit kernel." 1>&2 + -kernel*- ) + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 exit 1 ;; - *-kernel* ) - echo "Invalid configuration \`$1': \`$kernel' does not support \`$os'." 1>&2 + *-kernel*- ) + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 exit 1 ;; - kfreebsd*-gnu* | kopensolaris*-gnu*) + *-msvc*- ) + echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 + exit 1 ;; - vxworks-simlinux | vxworks-simwindows | vxworks-spe) + kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-) ;; - nto-qnx*) + vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) ;; - os2-emx) + nto-qnx*-) ;; - *-eabi* | *-gnueabi*) + os2-emx-) ;; - -*) + rtmk-nova-) + ;; + *-eabi*- | *-gnueabi*-) + ;; + none--*) + # None (no kernel, i.e. freestanding / bare metal), + # can be paired with an machine code file format + ;; + -*-) # Blank kernel with real OS is always fine. ;; - *-*) - echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + --*) + # Blank kernel and OS with real machine code file format is always fine. + ;; + *-*-*) + echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac @@ -1826,7 +2273,7 @@ case $vendor in *-riscix*) vendor=acorn ;; - *-sunos*) + *-sunos* | *-solaris*) vendor=sun ;; *-cnk* | *-aix*) @@ -1896,7 +2343,7 @@ case $vendor in ;; esac -echo "$cpu-$vendor-${kernel:+$kernel-}$os" +echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" exit # Local variables: diff --git a/depends/description.md b/depends/description.md index 0a6f2e64..fa345bfe 100644 --- a/depends/description.md +++ b/depends/description.md @@ -6,13 +6,12 @@ There are several features that make it different from most similar systems: In theory, binaries for any target OS/architecture can be created, from a builder running any OS/architecture. In practice, build-side tools must be specified when the defaults don't fit, and packages must be amended to work -on new hosts. For now, a build architecture of x86_64 is assumed, either on -Linux or macOS. +on new hosts. ### No reliance on timestamps File presence is used to determine what needs to be built. This makes the -results distributable and easily digestable by automated builders. +results distributable and easily digestible by automated builders. ### Each build only has its specified dependencies available at build-time. @@ -28,7 +27,7 @@ etc), and as well as a hash of the same data for each recursive dependency. If any portion of a package's build recipe changes, it will be rebuilt as well as any other package that depends on it. If any of the main makefiles (Makefile, funcs.mk, etc) are changed, all packages will be rebuilt. After building, the -results are cached into a tarball that can be re-used and distributed. +results are cached into a tarball that can be reused and distributed. ### Package build results are (relatively) deterministic. diff --git a/depends/funcs.mk b/depends/funcs.mk index 987be4e6..28baf471 100644 --- a/depends/funcs.mk +++ b/depends/funcs.mk @@ -6,12 +6,13 @@ $(1)_objc=$$($$($(1)_type)_OBJC) $(1)_objcxx=$$($$($(1)_type)_OBJCXX) $(1)_ar=$$($$($(1)_type)_AR) $(1)_ranlib=$$($$($(1)_type)_RANLIB) -$(1)_libtool=$$($$($(1)_type)_LIBTOOL) $(1)_nm=$$($$($(1)_type)_NM) $(1)_cflags=$$($$($(1)_type)_CFLAGS) \ - $$($$($(1)_type)_$$(release_type)_CFLAGS) + $$($$($(1)_type)_$$(release_type)_CFLAGS) \ + -pipe -std=$(C_STANDARD) $(1)_cxxflags=$$($$($(1)_type)_CXXFLAGS) \ - $$($$($(1)_type)_$$(release_type)_CXXFLAGS) + $$($$($(1)_type)_$$(release_type)_CXXFLAGS) \ + -pipe -std=$(CXX_STANDARD) $(1)_ldflags=$$($$($(1)_type)_LDFLAGS) \ $$($$($(1)_type)_$$(release_type)_LDFLAGS) \ -L$$($($(1)_type)_prefix)/lib @@ -40,34 +41,71 @@ define fetch_file $(call fetch_file_inner,$(1),$(FALLBACK_DOWNLOAD_PATH),$(3),$(4),$(5)))) endef +# Shell script to create a source tarball in $(1)_source from local directory +# $(1)_local_dir instead of downloading remote sources. Tarball is recreated if +# any paths in the local directory have a newer mtime, and checksum of the +# tarball is saved to $(1)_fetched and returned as output. +define fetch_local_dir_sha256 + if ! [ -f $($(1)_source) ] || [ -n "$$(find $($(1)_local_dir) -newer $($(1)_source) | head -n1)" ]; then \ + mkdir -p $(dir $($(1)_source)) && \ + $(build_TAR) -c -f $($(1)_source) -C $($(1)_local_dir) . && \ + rm -f $($(1)_fetched); \ + fi && \ + if ! [ -f $($(1)_fetched) ] || [ -n "$$(find $($(1)_source) -newer $($(1)_fetched))" ]; then \ + mkdir -p $(dir $($(1)_fetched)) && \ + cd $($(1)_source_dir) && \ + $(build_SHA256SUM) $($(1)_all_sources) > $($(1)_fetched); \ + fi && \ + cut -d" " -f1 $($(1)_fetched) +endef + define int_get_build_recipe_hash -$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)) | cut -d" " -f1)) +$(eval $(1)_patches_path?=$(PATCHES_PATH)/$(1)) +$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $($(1)_patches_path)/,$($(1)_patches)) | cut -d" " -f1)) +# If $(1)_local_dir is set, create a tarball of the local directory contents to +# use as the source of the package, and include a hash of the tarball in the +# package id, so if directory contents change, the package and packages +# depending on it will be rebuilt. +$(if $($(1)_local_dir),$(eval $(1)_sha256_hash:=$(shell $(call fetch_local_dir_sha256,$(1))))) +$(if $($(1)_local_dir),$(eval $(1)_all_file_checksums+=$($(1)_sha256_hash))) $(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1)) endef define int_get_build_id $(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies)) -$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($($(1)_type)_native_binutils) $($(1)_dependencies))) +$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($(1)_dependencies))) $(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash))) $(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps) $($($(1)_type)_id)) $(eval $(1)_build_id:=$(shell echo -n "$($(1)_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH))) final_build_id_long+=$($(package)_build_id_long) #compute package-specific paths -$(1)_build_subdir?=. -$(1)_download_file?=$($(1)_file_name) -$(1)_source_dir:=$(SOURCES_PATH) -$(1)_source:=$$($(1)_source_dir)/$($(1)_file_name) $(1)_staging_dir=$(base_staging_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id) $(1)_staging_prefix_dir:=$$($(1)_staging_dir)$($($(1)_type)_prefix) $(1)_extract_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id) -$(1)_download_dir:=$(base_download_dir)/$(1)-$($(1)_version) $(1)_build_dir:=$$($(1)_extract_dir)/$$($(1)_build_subdir) $(1)_cached_checksum:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz.hash $(1)_patch_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)/.patches-$($(1)_build_id) -$(1)_prefixbin:=$($($(1)_type)_prefix)/bin/ $(1)_cached:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz $(1)_build_log:=$(BASEDIR)/$(1)-$($(1)_version)-$($(1)_build_id).log +endef + +# Convert a string to a human-readable filename, replacing dot, slash, and space +# characters that could cause problems with dashes and collapsing them. +define int_friendly_file_name +$(subst $(null) $(null),-,$(strip $(subst ., ,$(subst /, ,$(1))))) +endef + +define int_get_build_properties +$(1)_build_subdir?=. +$(1)_download_file?=$($(1)_file_name) +$(1)_source_dir:=$(SOURCES_PATH) +# If $(1)_file_name is empty and $(1)_local_dir is nonempty, set file name to a +# .tar file with a friendly filename named after the directory path. +$(if $($(1)_file_name),,$(if $($(1)_local_dir),$(eval $(1)_file_name:=$(call int_friendly_file_name,$($(1)_local_dir)).tar))) +$(1)_source:=$$($(1)_source_dir)/$($(1)_file_name) +$(1)_download_dir:=$(base_download_dir)/$(1)-$($(1)_version) +$(1)_prefixbin:=$($($(1)_type)_prefix)/bin/ $(1)_all_sources=$($(1)_file_name) $($(1)_extra_sources) #stamps @@ -139,16 +177,16 @@ $(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig $(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig $(1)_config_env+=PKG_CONFIG_SYSROOT_DIR=/ $(1)_config_env+=CMAKE_MODULE_PATH=$($($(1)_type)_prefix)/lib/cmake -$(1)_config_env+=PATH=$(build_prefix)/bin:$(PATH) -$(1)_build_env+=PATH=$(build_prefix)/bin:$(PATH) -$(1)_stage_env+=PATH=$(build_prefix)/bin:$(PATH) +$(1)_config_env+=PATH="$(build_prefix)/bin:$(PATH)" +$(1)_build_env+=PATH="$(build_prefix)/bin:$(PATH)" +$(1)_stage_env+=PATH="$(build_prefix)/bin:$(PATH)" # Setting a --build type that differs from --host will explicitly enable # cross-compilation mode. Note that --build defaults to the output of # config.guess, which is what we set it too here. This also quells autoconf # warnings, "If you wanted to set the --build type, don't use --host.", # when using versions older than 2.70. -$(1)_autoconf=./configure --build=$(BUILD) --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)" +$(1)_autoconf=./configure --build=$(BUILD) --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) --with-pic $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)" ifneq ($($(1)_nm),) $(1)_autoconf += NM="$$($(1)_nm)" endif @@ -171,17 +209,30 @@ ifneq ($($(1)_ldflags),) $(1)_autoconf += LDFLAGS="$$($(1)_ldflags)" endif +# We hardcode the library install path to "lib" to match the PKG_CONFIG_PATH +# setting in depends/toolchain.cmake.in, which also hardcodes "lib". +# Without this setting, CMake by default would use the OS library +# directory, which might be "lib64" or something else, not "lib", on multiarch systems. $(1)_cmake=env CC="$$($(1)_cc)" \ CFLAGS="$$($(1)_cppflags) $$($(1)_cflags)" \ CXX="$$($(1)_cxx)" \ CXXFLAGS="$$($(1)_cppflags) $$($(1)_cxxflags)" \ LDFLAGS="$$($(1)_ldflags)" \ - cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" $$($(1)_config_opts) + cmake -G "Unix Makefiles" \ + -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" \ + -DCMAKE_AR=`which $$($(1)_ar)` \ + -DCMAKE_NM=`which $$($(1)_nm)` \ + -DCMAKE_RANLIB=`which $$($(1)_ranlib)` \ + -DCMAKE_INSTALL_LIBDIR=lib/ \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DCMAKE_VERBOSE_MAKEFILE:BOOL=$(V) \ + -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY:BOOL=TRUE \ + $$($(1)_config_opts) ifeq ($($(1)_type),build) $(1)_cmake += -DCMAKE_INSTALL_RPATH:PATH="$$($($(1)_type)_prefix)/lib" else ifneq ($(host),$(build)) -$(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system) +$(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system_name) $(1)_cmake += -DCMAKE_C_COMPILER_TARGET=$(host) $(1)_cmake += -DCMAKE_CXX_COMPILER_TARGET=$(host) endif @@ -208,7 +259,7 @@ $($(1)_extracted): | $($(1)_fetched) $($(1)_preprocessed): | $($(1)_extracted) echo Preprocessing $(1)... mkdir -p $$(@D) $($(1)_patch_dir) - $(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;) + $(foreach patch,$($(1)_patches),cd $($(1)_patches_path); cp $(patch) $($(1)_patch_dir) ;) { cd $$(@D); $($(1)_preprocess_cmds); } $$($(1)_logging) touch $$@ $($(1)_configured): | $($(1)_dependencies) $($(1)_preprocessed) @@ -235,7 +286,7 @@ $($(1)_postprocessed): | $($(1)_staged) $($(1)_cached): | $($(1)_dependencies) $($(1)_postprocessed) echo Caching $(1)... cd $$($(1)_staging_dir)/$(host_prefix); \ - find . ! -name '.stamp_postprocessed' -print0 | TZ=UTC xargs -0r touch -h -m -t 200001011200; \ + find . ! -name '.stamp_postprocessed' -print0 | TZ=UTC xargs -0r $(build_TOUCH); \ find . ! -name '.stamp_postprocessed' | LC_ALL=C sort | $(build_TAR) --numeric-owner --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T - mkdir -p $$(@D) rm -rf $$(@D) && mkdir -p $$(@D) @@ -276,6 +327,9 @@ $(foreach package,$(all_packages),$(eval $(call int_vars,$(package)))) $(foreach native_package,$(native_packages),$(eval include packages/$(native_package).mk)) $(foreach package,$(packages),$(eval include packages/$(package).mk)) +#set build properties for included package files +$(foreach package,$(all_packages),$(eval $(call int_get_build_properties,$(package)))) + #compute a hash of all files that comprise this package's build recipe $(foreach package,$(all_packages),$(eval $(call int_get_build_recipe_hash,$(package)))) @@ -287,6 +341,3 @@ $(foreach package,$(all_packages),$(eval $(call int_config_attach_build_config,$ #create build targets $(foreach package,$(all_packages),$(eval $(call int_add_cmds,$(package)))) - -#special exception: if a toolchain package exists, all non-native packages depend on it -$(foreach package,$(packages),$(eval $($(package)_extracted): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) $($($(host_arch)_$(host_os)_native_binutils)_cached) )) diff --git a/depends/gen_id b/depends/gen_id index 3341310e..5504deeb 100755 --- a/depends/gen_id +++ b/depends/gen_id @@ -1,8 +1,9 @@ #!/usr/bin/env bash # Usage: env [ CC=... ] [ C_STANDARD=...] [ CXX=... ] [CXX_STANDARD=...] \ -# [ AR=... ] [ RANLIB=... ] [ STRIP=... ] [ DEBUG=... ] \ -# [ LTO=... ] [ NO_HARDEN=... ] ./build-id [ID_SALT]... +# [ CPPFLAGS=... ] [CFLAGS=...] [CXXFLAGS=...] [LDFLAGS=...] \ +# [ AR=... ] [ NM=... ] [ RANLIB=... ] [ STRIP=... ] [ DEBUG=... ] \ +# [ LTO=... ] ./gen_id [ID_SALT]... # # Prints to stdout a SHA256 hash representing the current toolset, used by # depends/Makefile as a build id for caching purposes (detecting when the @@ -34,6 +35,13 @@ echo "$@" echo "END ID SALT" + echo "BEGIN FLAGS" + echo "CPPFLAGS=${CPPFLAGS}" + echo "CFLAGS=${CFLAGS}" + echo "CXXFLAGS=${CXXFLAGS}" + echo "LDFLAGS=${LDFLAGS}" + echo "END FLAGS" + # GCC only prints COLLECT_LTO_WRAPPER when invoked with just "-v", but we want # the information from "-v -E -" as well, so just include both. echo "BEGIN CC" @@ -50,12 +58,27 @@ echo "CXX_STANDARD=${CXX_STANDARD}" echo "END CXX" + # We use lld when cross-compiling for macOS, and it's version should + # be tied to LLVM. However someone compiling with GCC and -fuse-ld=lld + # would not see a cache bust if the LLVM toolchain was updated. + echo "BEGIN lld" + bash -c "ld.lld --version" + echo "END lld" + + echo "BEGIN mold" + bash -c "mold --version" + echo "END mold" + echo "BEGIN AR" bash -c "${AR} --version" env | grep '^AR_' - echo "ZERO_AR_DATE=${ZERO_AR_DATE}" echo "END AR" + echo "BEGIN NM" + bash -c "${NM} --version" + env | grep '^NM_' + echo "END NM" + echo "BEGIN RANLIB" bash -c "${RANLIB} --version" env | grep '^RANLIB_' @@ -70,10 +93,6 @@ echo "LTO=${LTO}" echo "END LTO" - echo "BEGIN NO_HARDEN" - echo "NO_HARDEN=${NO_HARDEN}" - echo "END NO_HARDEN" - echo "END ALL" ) | if [ -n "$DEBUG" ] && command -v tee > /dev/null 2>&1; then # When debugging and `tee` is available, output the preimage to stderr diff --git a/depends/hosts/android.mk b/depends/hosts/android.mk deleted file mode 100644 index b53966dc..00000000 --- a/depends/hosts/android.mk +++ /dev/null @@ -1,20 +0,0 @@ -ifeq ($(HOST),armv7a-linux-android) -android_CXX=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)eabi$(ANDROID_API_LEVEL)-clang++ -android_CC=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)eabi$(ANDROID_API_LEVEL)-clang -else -android_CXX=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang++ -android_CC=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang -endif - -android_CFLAGS=-std=$(C_STANDARD) -android_CXXFLAGS=-std=$(CXX_STANDARD) - -ifneq ($(LTO),) -android_CFLAGS += -flto -android_LDFLAGS += -flto -endif - -android_AR=$(ANDROID_TOOLCHAIN_BIN)/llvm-ar -android_RANLIB=$(ANDROID_TOOLCHAIN_BIN)/llvm-ranlib - -android_cmake_system=Android diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index ecd45540..7ec2fd96 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -1,30 +1,11 @@ -OSX_MIN_VERSION=11.0 -OSX_SDK_VERSION=11.0 -XCODE_VERSION=12.2 -XCODE_BUILD_ID=12B45b -LD64_VERSION=711 +OSX_MIN_VERSION=13.0 +OSX_SDK_VERSION=14.0 +XCODE_VERSION=15.0 +XCODE_BUILD_ID=15A240d +LLD_VERSION=711 OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers -darwin_native_binutils=native_cctools - -ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) -# FORCE_USE_SYSTEM_CLANG is empty, so we use our depends-managed, pinned clang -# from llvm.org - -# Clang is a dependency of native_cctools when FORCE_USE_SYSTEM_CLANG is empty -darwin_native_toolchain=native_cctools - -clang_prog=$(build_prefix)/bin/clang -clangxx_prog=$(clang_prog)++ -llvm_config_prog=$(build_prefix)/bin/llvm-config - -else -# FORCE_USE_SYSTEM_CLANG is non-empty, so we use the clang from the user's -# system - -darwin_native_toolchain= - # We can't just use $(shell command -v clang) because GNU Make handles builtins # in a special way and doesn't know that `command` is a POSIX-standard builtin # prior to 1af314465e5dfe3e8baa839a32a72e83c04f26ef, first released in v4.2.90. @@ -34,20 +15,14 @@ darwin_native_toolchain= # Source: https://lists.gnu.org/archive/html/bug-make/2017-11/msg00017.html clang_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang") clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++") -llvm_config_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-config") - -llvm_lib_dir=$(shell $(llvm_config_prog) --libdir) -endif -cctools_TOOLS=AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL DSYMUTIL - -# Make-only lowercase function -lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1)))))))))))))))))))))))))) - -# For well-known tools provided by cctools, make sure that their well-known -# variable is set to the full path of the tool, just like how AC_PATH_{TOO,PROG} -# would. -$(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$(host)-$(call lc,$(TOOL)))) +darwin_AR=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-ar") +darwin_DSYMUTIL=$(shell $(SHELL) $(.SHELLFLAGS) "command -v dsymutil") +darwin_NM=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-nm") +darwin_OBJCOPY=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-objcopy") +darwin_OBJDUMP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-objdump") +darwin_RANLIB=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-ranlib") +darwin_STRIP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-strip") # Flag explanations: # @@ -56,11 +31,6 @@ $(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$( # Ensures that modern linker features are enabled. See here for more # details: https://github.com/bitcoin/bitcoin/pull/19407. # -# -B$(build_prefix)/bin -# -# Explicitly point to our binaries (e.g. cctools) so that they are -# ensured to be found and preferred over other possibilities. -# # -isysroot$(OSX_SDK) -nostdlibinc # # Disable default include paths built into the compiler as well as @@ -71,37 +41,42 @@ $(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$( # # Adds the desired paths from the SDK # +# -platform_version +# +# Indicate to the linker the platform, the oldest supported version, +# and the SDK used. +# +# -no_adhoc_codesign +# +# Disable adhoc codesigning (for now) when using LLVM tooling, to avoid +# non-determinism issues with the Identifier field. -darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ - -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \ - -u LIBRARY_PATH \ - $(clang_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \ - -B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \ +darwin_CC=$(clang_prog) --target=$(host) \ -isysroot$(OSX_SDK) -nostdlibinc \ -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ - -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \ - -u LIBRARY_PATH \ - $(clangxx_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \ - -B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \ +darwin_CXX=$(clangxx_prog) --target=$(host) \ -isysroot$(OSX_SDK) -nostdlibinc \ -iwithsysroot/usr/include/c++/v1 \ -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -darwin_CFLAGS=-pipe -std=$(C_STANDARD) -darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD) +darwin_CFLAGS=-mmacos-version-min=$(OSX_MIN_VERSION) +darwin_CXXFLAGS=-mmacos-version-min=$(OSX_MIN_VERSION) +darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) -ifneq ($(LTO),) -darwin_CFLAGS += -flto -darwin_CXXFLAGS += -flto -darwin_LDFLAGS += -flto +ifneq ($(build_os),darwin) +darwin_CFLAGS += -mlinker-version=$(LLD_VERSION) +darwin_CXXFLAGS += -mlinker-version=$(LLD_VERSION) +darwin_LDFLAGS += -Wl,-no_adhoc_codesign -fuse-ld=lld endif darwin_release_CFLAGS=-O2 darwin_release_CXXFLAGS=$(darwin_release_CFLAGS) -darwin_debug_CFLAGS=-O1 +darwin_debug_CFLAGS=-O1 -g darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS) -darwin_cmake_system=Darwin +darwin_cmake_system_name=Darwin +# Darwin version, which corresponds to OSX_MIN_VERSION. +# See https://en.wikipedia.org/wiki/Darwin_(operating_system) +darwin_cmake_system_version=20.1 diff --git a/depends/hosts/default.mk b/depends/hosts/default.mk index bad4568b..22409c40 100644 --- a/depends/hosts/default.mk +++ b/depends/hosts/default.mk @@ -7,9 +7,9 @@ default_host_CXX = $(host_toolchain)g++ default_host_AR = $(host_toolchain)ar default_host_RANLIB = $(host_toolchain)ranlib default_host_STRIP = $(host_toolchain)strip -default_host_LIBTOOL = $(host_toolchain)libtool default_host_NM = $(host_toolchain)nm default_host_OBJCOPY = $(host_toolchain)objcopy +default_host_OBJDUMP = $(host_toolchain)objdump define add_host_tool_func ifneq ($(filter $(origin $1),undefined default),) @@ -29,8 +29,8 @@ endef define add_host_flags_func ifeq ($(filter $(origin $1),undefined default),) -$(host_arch)_$(host_os)_$1 = -$(host_arch)_$(host_os)_$(release_type)_$1 = $($1) +$(host_arch)_$(host_os)_$1 = $($1) +$(host_arch)_$(host_os)_$(release_type)_$1 = else $(host_arch)_$(host_os)_$1 += $($(host_os)_$1) $(host_arch)_$(host_os)_$(release_type)_$1 += $($(host_os)_$(release_type)_$1) @@ -39,5 +39,5 @@ host_$1 = $$($(host_arch)_$(host_os)_$1) host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1) endef -$(foreach tool,CC CXX AR RANLIB STRIP LIBTOOL NM OBJCOPY OTOOL INSTALL_NAME_TOOL DSYMUTIL,$(eval $(call add_host_tool_func,$(tool)))) +$(foreach tool,CC CXX AR RANLIB STRIP NM OBJCOPY OBJDUMP DSYMUTIL,$(eval $(call add_host_tool_func,$(tool)))) $(foreach flags,CFLAGS CXXFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags)))) diff --git a/depends/hosts/freebsd.mk b/depends/hosts/freebsd.mk index 5351d0b9..b69535cc 100644 --- a/depends/hosts/freebsd.mk +++ b/depends/hosts/freebsd.mk @@ -1,16 +1,10 @@ -freebsd_CFLAGS=-pipe -std=$(C_STANDARD) -freebsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD) - -ifneq ($(LTO),) -freebsd_CFLAGS += -flto -freebsd_CXXFLAGS += -flto -freebsd_LDFLAGS += -flto -endif +freebsd_CFLAGS= +freebsd_CXXFLAGS= freebsd_release_CFLAGS=-O2 freebsd_release_CXXFLAGS=$(freebsd_release_CFLAGS) -freebsd_debug_CFLAGS=-O1 +freebsd_debug_CFLAGS=-O1 -g freebsd_debug_CXXFLAGS=$(freebsd_debug_CFLAGS) ifeq (86,$(findstring 86,$(build_arch))) @@ -34,4 +28,4 @@ x86_64_freebsd_CC=$(default_host_CC) -m64 x86_64_freebsd_CXX=$(default_host_CXX) -m64 endif -freebsd_cmake_system=FreeBSD +freebsd_cmake_system_name=FreeBSD diff --git a/depends/hosts/linux.mk b/depends/hosts/linux.mk index 1f33640c..41958f99 100644 --- a/depends/hosts/linux.mk +++ b/depends/hosts/linux.mk @@ -1,11 +1,7 @@ -linux_CFLAGS=-pipe -std=$(C_STANDARD) -linux_CXXFLAGS=-pipe -std=$(CXX_STANDARD) +linux_CFLAGS= +linux_CXXFLAGS= ifneq ($(LTO),) -linux_CFLAGS += -flto -linux_CXXFLAGS += -flto -linux_LDFLAGS += -flto - linux_AR = $(host_toolchain)gcc-ar linux_NM = $(host_toolchain)gcc-nm linux_RANLIB = $(host_toolchain)gcc-ranlib @@ -14,10 +10,14 @@ endif linux_release_CFLAGS=-O2 linux_release_CXXFLAGS=$(linux_release_CFLAGS) -linux_debug_CFLAGS=-O1 +linux_debug_CFLAGS=-O1 -g linux_debug_CXXFLAGS=$(linux_debug_CFLAGS) -linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_LIBCPP_ENABLE_DEBUG_MODE=1 +# https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode.html +linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC + +# https://libcxx.llvm.org/Hardening.html +linux_debug_CPPFLAGS+=-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG ifeq (86,$(findstring 86,$(build_arch))) i686_linux_CC=gcc -m32 @@ -39,4 +39,7 @@ i686_linux_CXX=$(default_host_CXX) -m32 x86_64_linux_CC=$(default_host_CC) -m64 x86_64_linux_CXX=$(default_host_CXX) -m64 endif -linux_cmake_system=Linux + +linux_cmake_system_name=Linux +# Refer to doc/dependencies.md for the minimum required kernel. +linux_cmake_system_version=3.17.0 diff --git a/depends/hosts/mingw32.mk b/depends/hosts/mingw32.mk index fc1cc1af..7db6afae 100644 --- a/depends/hosts/mingw32.mk +++ b/depends/hosts/mingw32.mk @@ -1,15 +1,14 @@ +ifneq ($(shell $(SHELL) $(.SHELLFLAGS) "command -v $(host)-gcc-posix"),) +mingw32_CC := $(host)-gcc-posix +endif ifneq ($(shell $(SHELL) $(.SHELLFLAGS) "command -v $(host)-g++-posix"),) mingw32_CXX := $(host)-g++-posix endif -mingw32_CFLAGS=-pipe -std=$(C_STANDARD) -mingw32_CXXFLAGS=-pipe -std=$(CXX_STANDARD) +mingw32_CFLAGS= +mingw32_CXXFLAGS= ifneq ($(LTO),) -mingw32_CFLAGS += -flto -mingw32_CXXFLAGS += -flto -mingw32_LDFLAGS += -flto - mingw32_AR = $(host_toolchain)gcc-ar mingw32_NM = $(host_toolchain)gcc-nm mingw32_RANLIB = $(host_toolchain)gcc-ranlib @@ -18,9 +17,11 @@ endif mingw32_release_CFLAGS=-O2 mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS) -mingw32_debug_CFLAGS=-O1 +mingw32_debug_CFLAGS=-O1 -g mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS) mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -mingw32_cmake_system=Windows +mingw32_cmake_system_name=Windows +# Windows 10 +mingw32_cmake_system_version=10.0 diff --git a/depends/hosts/netbsd.mk b/depends/hosts/netbsd.mk index 14121dca..0e1256c3 100644 --- a/depends/hosts/netbsd.mk +++ b/depends/hosts/netbsd.mk @@ -1,22 +1,16 @@ -netbsd_CFLAGS=-pipe -std=$(C_STANDARD) -netbsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD) +netbsd_CFLAGS= +netbsd_CXXFLAGS= ifneq ($(LTO),) -netbsd_CFLAGS += -flto -netbsd_CXXFLAGS += -flto -netbsd_LDFLAGS += -flto - netbsd_AR = $(host_toolchain)gcc-ar netbsd_NM = $(host_toolchain)gcc-nm netbsd_RANLIB = $(host_toolchain)gcc-ranlib endif -netbsd_CXXFLAGS=$(netbsd_CFLAGS) - netbsd_release_CFLAGS=-O2 netbsd_release_CXXFLAGS=$(netbsd_release_CFLAGS) -netbsd_debug_CFLAGS=-O1 +netbsd_debug_CFLAGS=-O1 -g netbsd_debug_CXXFLAGS=$(netbsd_debug_CFLAGS) ifeq (86,$(findstring 86,$(build_arch))) @@ -40,4 +34,4 @@ x86_64_netbsd_CC=$(default_host_CC) -m64 x86_64_netbsd_CXX=$(default_host_CXX) -m64 endif -netbsd_cmake_system=NetBSD +netbsd_cmake_system_name=NetBSD diff --git a/depends/hosts/openbsd.mk b/depends/hosts/openbsd.mk index d330e94d..5ab3f53e 100644 --- a/depends/hosts/openbsd.mk +++ b/depends/hosts/openbsd.mk @@ -1,16 +1,10 @@ -openbsd_CFLAGS=-pipe -std=$(C_STANDARD) -openbsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD) - -ifneq ($(LTO),) -openbsd_CFLAGS += -flto -openbsd_CXXFLAGS += -flto -openbsd_LDFLAGS += -flto -endif +openbsd_CFLAGS= +openbsd_CXXFLAGS= openbsd_release_CFLAGS=-O2 openbsd_release_CXXFLAGS=$(openbsd_release_CFLAGS) -openbsd_debug_CFLAGS=-O1 +openbsd_debug_CFLAGS=-O1 -g openbsd_debug_CXXFLAGS=$(openbsd_debug_CFLAGS) ifeq (86,$(findstring 86,$(build_arch))) @@ -34,4 +28,4 @@ x86_64_openbsd_CC=$(default_host_CC) -m64 x86_64_openbsd_CXX=$(default_host_CXX) -m64 endif -openbsd_cmake_system=OpenBSD +openbsd_cmake_system_name=OpenBSD diff --git a/depends/packages.md b/depends/packages.md index 4158b46d..105fd90b 100644 --- a/depends/packages.md +++ b/depends/packages.md @@ -6,12 +6,13 @@ The package "mylib" will be used here as an example General tips: - mylib_foo is written as $(package)_foo in order to make recipes more similar. - Secondary dependency packages relative to the bitcoin binaries/libraries (i.e. - those not in `ALLOWED_LIBRARIES` in `contrib/devtools/symbol-check.py`) don't + those not in `ALLOWED_LIBRARIES` in `contrib/guix/symbol-check.py`) don't need to be shared and should be built statically whenever possible. See [below](#secondary-dependencies) for more details. ## Identifiers -Each package is required to define at least these variables: +If package does not define a `$(package)_local_dir` variable, it is required to +define these variables: $(package)_version: Version of the upstream library or program. If there is no version, a @@ -28,6 +29,9 @@ Each package is required to define at least these variables: $(package)_sha256_hash: The sha256 hash of the upstream file +If a package does define a `$(package)_local_dir` variable, the above variables +are not required and will be ignored. + These variables are optional: $(package)_build_subdir: @@ -48,6 +52,18 @@ These variables are optional: Any extra files that will be fetched via $(package)_fetch_cmds. These are specified so that they can be fetched and verified via 'make download'. +## Local packages + +If a package defines a `$(package)_local_dir` variable, the specified directory +will be treated as a download source, and a tarball of its contents will be +saved to `sources/`. A hash of the tarball will also become part of the package +build id, so if the directory contents change, the package and everything +depending on it will be rebuilt. For efficiency, the tarball is cached once it +has been created, but if the local directory is touched, it will be rebuilt. + +Local packages can be useful for using git submodules or subtrees to manage +package sources, or for testing local changes that are not available to +download from an external source. ## Build Variables: After defining the main identifiers, build variables may be added or customized @@ -74,7 +90,6 @@ These variables may be set to override or append their default values. $(package)_objcxx $(package)_ar $(package)_ranlib - $(package)_libtool $(package)_nm $(package)_cflags $(package)_cxxflags @@ -154,8 +169,8 @@ Most autotools projects can be properly staged using: ## Build outputs: In general, the output of a depends package should not contain any libtool -archives. Instead, the package should output `.pc` (`pkg-config`) files where -possible. +archives or `.pc` (`pkg-config`) files. Instead, the package should output +`.cmake` (CMake) files where possible. From the [Gentoo Wiki entry](https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Handling_Libtool_Archives): @@ -163,10 +178,13 @@ From the [Gentoo Wiki entry](https://wiki.gentoo.org/wiki/Project:Quality_Assura > creates. This leads to massive overlinking, which is toxic to the Gentoo > ecosystem, as it leads to a massive number of unnecessary rebuilds. +Where possible, packages are built with Position Independent Code. Either using +the Autotools `--with-pic` flag, or `CMAKE_POSITION_INDEPENDENT_CODE` with CMake. + ## Secondary dependencies: Secondary dependency packages relative to the bitcoin binaries/libraries (i.e. -those not in `ALLOWED_LIBRARIES` in `contrib/devtools/symbol-check.py`) don't +those not in `ALLOWED_LIBRARIES` in `contrib/guix/symbol-check.py`) don't need to be shared and should be built statically whenever possible. This improves general build reliability as illustrated by the following example: diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk deleted file mode 100644 index 9f5a9250..00000000 --- a/depends/packages/bdb.mk +++ /dev/null @@ -1,39 +0,0 @@ -package=bdb -$(package)_version=4.8.30 -$(package)_download_path=https://download.oracle.com/berkeley-db -$(package)_file_name=db-$($(package)_version).NC.tar.gz -$(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef -$(package)_build_subdir=build_unix -$(package)_patches=clang_cxx_11.patch - -define $(package)_set_vars -$(package)_config_opts=--disable-shared --enable-cxx --disable-replication --enable-option-checking -$(package)_config_opts_mingw32=--enable-mingw -$(package)_config_opts_linux=--with-pic -$(package)_config_opts_freebsd=--with-pic -$(package)_config_opts_netbsd=--with-pic -$(package)_config_opts_openbsd=--with-pic -$(package)_config_opts_android=--with-pic -$(package)_cflags+=-Wno-error=implicit-function-declaration -Wno-error=format-security -Wno-error=implicit-int -$(package)_cppflags_freebsd=-D_XOPEN_SOURCE=600 -D__BSD_VISIBLE=1 -$(package)_cppflags_netbsd=-D_XOPEN_SOURCE=600 -$(package)_cppflags_openbsd=-D_XOPEN_SOURCE=600 -$(package)_cppflags_mingw32=-DUNICODE -D_UNICODE -endef - -define $(package)_preprocess_cmds - patch -p1 < $($(package)_patch_dir)/clang_cxx_11.patch && \ - cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub dist -endef - -define $(package)_config_cmds - ../dist/$($(package)_autoconf) -endef - -define $(package)_build_cmds - $(MAKE) libdb_cxx-4.8.a libdb-4.8.a -endef - -define $(package)_stage_cmds - $(MAKE) DESTDIR=$($(package)_staging_dir) install_lib install_include -endef diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index ebc097d6..312f19e2 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -1,10 +1,29 @@ package=boost -$(package)_version=1.81.0 -$(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$($(package)_version)/source/ -$(package)_file_name=boost_$(subst .,_,$($(package)_version)).tar.bz2 -$(package)_sha256_hash=71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa +$(package)_version = 1.88.0 +$(package)_download_path = https://github.com/boostorg/boost/releases/download/boost-$($(package)_version) +$(package)_file_name = boost-$($(package)_version)-cmake.tar.gz +$(package)_sha256_hash = dcea50f40ba1ecfc448fdf886c0165cf3e525fef2c9e3e080b9804e8117b9694 +$(package)_patches = skip_compiled_targets.patch +$(package)_build_subdir = build + +define $(package)_set_vars + $(package)_config_opts = -DBOOST_INCLUDE_LIBRARIES="multi_index;signals2;test" + $(package)_config_opts += -DBOOST_TEST_HEADERS_ONLY=ON + $(package)_config_opts += -DBOOST_ENABLE_MPI=OFF + $(package)_config_opts += -DBOOST_ENABLE_PYTHON=OFF + $(package)_config_opts += -DBOOST_INSTALL_LAYOUT=system + $(package)_config_opts += -DBUILD_TESTING=OFF + $(package)_config_opts += -DCMAKE_DISABLE_FIND_PACKAGE_ICU=ON +endef + +define $(package)_preprocess_cmds + patch -p1 < $($(package)_patch_dir)/skip_compiled_targets.patch +endef + +define $(package)_config_cmds + $($(package)_cmake) -S .. -B . +endef define $(package)_stage_cmds - mkdir -p $($(package)_staging_prefix_dir)/include && \ - cp -r boost $($(package)_staging_prefix_dir)/include + $(MAKE) DESTDIR=$($(package)_staging_dir) install endef diff --git a/depends/packages/capnp.mk b/depends/packages/capnp.mk index f4778c1e..542bf126 100644 --- a/depends/packages/capnp.mk +++ b/depends/packages/capnp.mk @@ -4,17 +4,16 @@ $(package)_download_path=$(native_$(package)_download_path) $(package)_download_file=$(native_$(package)_download_file) $(package)_file_name=$(native_$(package)_file_name) $(package)_sha256_hash=$(native_$(package)_sha256_hash) -$(package)_dependencies=native_$(package) -define $(package)_set_vars := -$(package)_config_opts := --with-external-capnp -$(package)_config_opts += CAPNP="$$(native_capnp_prefixbin)/capnp" -$(package)_config_opts += CAPNP_CXX="$$(native_capnp_prefixbin)/capnp-c++" -$(package)_config_opts_android := --disable-shared +define $(package)_set_vars + $(package)_config_opts := -DBUILD_TESTING=OFF + $(package)_config_opts += -DWITH_OPENSSL=OFF + $(package)_config_opts += -DWITH_ZLIB=OFF + $(package)_cxxflags += -fdebug-prefix-map=$($(package)_extract_dir)=/usr -fmacro-prefix-map=$($(package)_extract_dir)=/usr endef define $(package)_config_cmds - $($(package)_autoconf) + $($(package)_cmake) . endef define $(package)_build_cmds @@ -24,3 +23,7 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef + +define $(package)_postprocess_cmds + rm -rf lib/pkgconfig +endef diff --git a/depends/packages/expat.mk b/depends/packages/expat.mk index bb203d06..fb7d5099 100644 --- a/depends/packages/expat.mk +++ b/depends/packages/expat.mk @@ -3,20 +3,25 @@ $(package)_version=2.4.8 $(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$($(package)_version))/ $(package)_file_name=$(package)-$($(package)_version).tar.xz $(package)_sha256_hash=f79b8f904b749e3e0d20afeadecf8249c55b2e32d4ebb089ae378df479dcaf25 +$(package)_build_subdir=build +$(package)_patches += cmake_minimum.patch # -D_DEFAULT_SOURCE defines __USE_MISC, which exposes additional # definitions in endian.h, which are required for a working -# endianess check in configure when building with -flto. +# endianness check in configure when building with -flto. define $(package)_set_vars - $(package)_config_opts=--disable-shared --without-docbook --without-tests --without-examples - $(package)_config_opts += --disable-dependency-tracking --enable-option-checking - $(package)_config_opts += --without-xmlwf - $(package)_config_opts_linux=--with-pic + $(package)_config_opts := -DCMAKE_BUILD_TYPE=None -DEXPAT_BUILD_TOOLS=OFF + $(package)_config_opts += -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF + $(package)_config_opts += -DBUILD_SHARED_LIBS=OFF $(package)_cppflags += -D_DEFAULT_SOURCE endef +define $(package)_preprocess_cmds + patch -p1 < $($(package)_patch_dir)/cmake_minimum.patch +endef + define $(package)_config_cmds - $($(package)_autoconf) + $($(package)_cmake) -S .. -B . endef define $(package)_build_cmds @@ -28,5 +33,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm -rf share lib/cmake lib/*.la + rm -rf share lib/cmake endef diff --git a/depends/packages/fontconfig.mk b/depends/packages/fontconfig.mk index 444acfe3..bd20d7c9 100644 --- a/depends/packages/fontconfig.mk +++ b/depends/packages/fontconfig.mk @@ -1,8 +1,8 @@ package=fontconfig $(package)_version=2.12.6 $(package)_download_path=https://www.freedesktop.org/software/fontconfig/release/ -$(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017 +$(package)_file_name=$(package)-$($(package)_version).tar.gz +$(package)_sha256_hash=064b9ebf060c9e77011733ac9dc0e2ce92870b574cca2405e11f5353a683c334 $(package)_dependencies=freetype expat $(package)_patches=gperf_header_regen.patch @@ -29,5 +29,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm -rf var lib/*.la + rm -rf bin etc share var lib/*.la endef diff --git a/depends/packages/freetype.mk b/depends/packages/freetype.mk index 6f5dbe0f..a97f82e7 100644 --- a/depends/packages/freetype.mk +++ b/depends/packages/freetype.mk @@ -3,15 +3,22 @@ $(package)_version=2.11.0 $(package)_download_path=https://download.savannah.gnu.org/releases/$(package) $(package)_file_name=$(package)-$($(package)_version).tar.xz $(package)_sha256_hash=8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48067bde7 +$(package)_build_subdir=build +$(package)_patches += cmake_minimum.patch define $(package)_set_vars - $(package)_config_opts=--without-zlib --without-png --without-harfbuzz --without-bzip2 --disable-static - $(package)_config_opts += --enable-option-checking --without-brotli - $(package)_config_opts_linux=--with-pic + $(package)_config_opts := -DCMAKE_BUILD_TYPE=None -DBUILD_SHARED_LIBS=TRUE + $(package)_config_opts += -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE + $(package)_config_opts += -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE + $(package)_config_opts += -DCMAKE_DISABLE_FIND_PACKAGE_BrotliDec=TRUE +endef + +define $(package)_preprocess_cmds + patch -p1 < $($(package)_patch_dir)/cmake_minimum.patch endef define $(package)_config_cmds - $($(package)_autoconf) + $($(package)_cmake) -S .. -B . endef define $(package)_build_cmds @@ -22,6 +29,3 @@ define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef -define $(package)_postprocess_cmds - rm -rf share/man lib/*.la -endef diff --git a/depends/packages/libXau.mk b/depends/packages/libXau.mk index b7e032c0..6bafc4f4 100644 --- a/depends/packages/libXau.mk +++ b/depends/packages/libXau.mk @@ -1,8 +1,8 @@ package=libXau $(package)_version=1.0.9 $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ -$(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=ccf8cbf0dbf676faa2ea0a6d64bcc3b6746064722b606c8c52917ed00dcb73ec +$(package)_file_name=$(package)-$($(package)_version).tar.gz +$(package)_sha256_hash=1f123d8304b082ad63a9e89376400a3b1d4c29e67e3ea07b3f659cccca690eea $(package)_dependencies=xproto # When updating this package, check the default value of @@ -10,7 +10,6 @@ $(package)_dependencies=xproto define $(package)_set_vars $(package)_config_opts=--disable-shared --disable-lint-library --without-lint $(package)_config_opts += --disable-dependency-tracking --enable-option-checking - $(package)_config_opts_linux=--with-pic endef define $(package)_preprocess_cmds diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index 9650f77d..e9153b71 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -3,32 +3,31 @@ $(package)_version=2.1.12-stable $(package)_download_path=https://github.com/libevent/libevent/releases/download/release-$($(package)_version)/ $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb +$(package)_patches=cmake_fixups.patch +$(package)_patches += netbsd_fixup.patch +$(package)_patches += winver_fixup.patch +$(package)_build_subdir=build # When building for Windows, we set _WIN32_WINNT to target the same Windows -# version as we do in configure. Due to quirks in libevents build system, this +# version as we do in releases. Due to quirks in libevents build system, this # is also required to enable support for ipv6. See #19375. define $(package)_set_vars - $(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples - $(package)_config_opts += --disable-dependency-tracking --enable-option-checking - $(package)_config_opts_release=--disable-debug-mode - $(package)_config_opts_linux=--with-pic - $(package)_config_opts_freebsd=--with-pic - $(package)_config_opts_netbsd=--with-pic - $(package)_config_opts_openbsd=--with-pic - $(package)_config_opts_android=--with-pic - $(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601 - - ifeq ($(NO_HARDEN),) - $(package)_cppflags+=-D_FORTIFY_SOURCE=3 - endif + $(package)_config_opts=-DCMAKE_BUILD_TYPE=None -DEVENT__DISABLE_BENCHMARK=ON -DEVENT__DISABLE_OPENSSL=ON + $(package)_config_opts+=-DEVENT__DISABLE_SAMPLES=ON -DEVENT__DISABLE_REGRESS=ON + $(package)_config_opts+=-DEVENT__DISABLE_TESTS=ON -DEVENT__LIBRARY_TYPE=STATIC + $(package)_cflags += -fdebug-prefix-map=$($(package)_extract_dir)=/usr -fmacro-prefix-map=$($(package)_extract_dir)=/usr + $(package)_cppflags += -D_GNU_SOURCE -D_FORTIFY_SOURCE=3 + $(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0A00 endef define $(package)_preprocess_cmds - cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux + patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch && \ + patch -p1 < $($(package)_patch_dir)/netbsd_fixup.patch && \ + patch -p1 < $($(package)_patch_dir)/winver_fixup.patch endef define $(package)_config_cmds - $($(package)_autoconf) + $($(package)_cmake) -S .. -B . endef define $(package)_build_cmds @@ -40,7 +39,8 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm lib/*.la && \ + rm -rf bin lib/pkgconfig && \ rm include/ev*.h && \ - rm include/event2/*_compat.h + rm include/event2/*_compat.h && \ + rm lib/libevent.a endef diff --git a/depends/packages/libmultiprocess.mk b/depends/packages/libmultiprocess.mk deleted file mode 100644 index 765d6493..00000000 --- a/depends/packages/libmultiprocess.mk +++ /dev/null @@ -1,28 +0,0 @@ -package=libmultiprocess -$(package)_version=$(native_$(package)_version) -$(package)_download_path=$(native_$(package)_download_path) -$(package)_file_name=$(native_$(package)_file_name) -$(package)_sha256_hash=$(native_$(package)_sha256_hash) -$(package)_dependencies=native_$(package) capnp -ifneq ($(host),$(build)) -$(package)_dependencies += native_capnp -endif - -define $(package)_set_vars := -ifneq ($(host),$(build)) -$(package)_config_opts := -DCAPNP_EXECUTABLE="$$(native_capnp_prefixbin)/capnp" -$(package)_config_opts += -DCAPNPC_CXX_EXECUTABLE="$$(native_capnp_prefixbin)/capnpc-c++" -endif -endef - -define $(package)_config_cmds - $($(package)_cmake) . -endef - -define $(package)_build_cmds - $(MAKE) -endef - -define $(package)_stage_cmds - $(MAKE) DESTDIR=$($(package)_staging_dir) install-lib -endef diff --git a/depends/packages/libnatpmp.mk b/depends/packages/libnatpmp.mk deleted file mode 100644 index 2eddc76d..00000000 --- a/depends/packages/libnatpmp.mk +++ /dev/null @@ -1,22 +0,0 @@ -package=libnatpmp -$(package)_version=07004b97cf691774efebe70404cf22201e4d330d -$(package)_download_path=https://github.com/miniupnp/libnatpmp/archive -$(package)_file_name=$($(package)_version).tar.gz -$(package)_sha256_hash=9321953ceb39d07c25463e266e50d0ae7b64676bb3a986d932b18881ed94f1fb - -define $(package)_set_vars - $(package)_build_opts=CC="$($(package)_cc)" - $(package)_build_opts_mingw32=CPPFLAGS=-DNATPMP_STATICLIB - $(package)_build_opts_darwin=LIBTOOL="$($(package)_libtool)" - $(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$($(package)_ar)" -endef - -define $(package)_build_cmds - $(MAKE) libnatpmp.a $($(package)_build_opts) -endef - -define $(package)_stage_cmds - mkdir -p $($(package)_staging_prefix_dir)/include $($(package)_staging_prefix_dir)/lib &&\ - install *.h $($(package)_staging_prefix_dir)/include &&\ - install libnatpmp.a $($(package)_staging_prefix_dir)/lib -endef diff --git a/depends/packages/libxcb_util.mk b/depends/packages/libxcb_util.mk index 6f1b9cd7..dc4456f8 100644 --- a/depends/packages/libxcb_util.mk +++ b/depends/packages/libxcb_util.mk @@ -1,14 +1,13 @@ package=libxcb_util $(package)_version=0.4.0 $(package)_download_path=https://xcb.freedesktop.org/dist -$(package)_file_name=xcb-util-$($(package)_version).tar.bz2 -$(package)_sha256_hash=46e49469cb3b594af1d33176cd7565def2be3fa8be4371d62271fabb5eae50e9 +$(package)_file_name=xcb-util-$($(package)_version).tar.gz +$(package)_sha256_hash=0ed0934e2ef4ddff53fcc70fc64fb16fe766cd41ee00330312e20a985fd927a7 $(package)_dependencies=libxcb define $(package)_set_vars $(package)_config_opts = --disable-shared --disable-devel-docs --without-doxygen $(package)_config_opts += --disable-dependency-tracking --enable-option-checking -$(package)_config_opts += --with-pic endef define $(package)_preprocess_cmds diff --git a/depends/packages/libxcb_util_cursor.mk b/depends/packages/libxcb_util_cursor.mk new file mode 100644 index 00000000..b3088906 --- /dev/null +++ b/depends/packages/libxcb_util_cursor.mk @@ -0,0 +1,31 @@ +package=libxcb_util_cursor +$(package)_version=0.1.5 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-cursor-$($(package)_version).tar.gz +$(package)_sha256_hash=0e9c5446dc6f3beb8af6ebfcc9e27bcc6da6fe2860f7fc07b99144dfa568e93b +$(package)_dependencies=libxcb libxcb_util_render libxcb_util_image + +define $(package)_set_vars +$(package)_config_opts = --disable-static +$(package)_config_opts += --disable-dependency-tracking --enable-option-checking +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm lib/*.la +endef diff --git a/depends/packages/libxcb_util_image.mk b/depends/packages/libxcb_util_image.mk index d12d67e8..2228250f 100644 --- a/depends/packages/libxcb_util_image.mk +++ b/depends/packages/libxcb_util_image.mk @@ -1,8 +1,8 @@ package=libxcb_util_image $(package)_version=0.4.0 $(package)_download_path=https://xcb.freedesktop.org/dist -$(package)_file_name=xcb-util-image-$($(package)_version).tar.bz2 -$(package)_sha256_hash=2db96a37d78831d643538dd1b595d7d712e04bdccf8896a5e18ce0f398ea2ffc +$(package)_file_name=xcb-util-image-$($(package)_version).tar.gz +$(package)_sha256_hash=cb2c86190cf6216260b7357a57d9100811bb6f78c24576a3a5bfef6ad3740a42 $(package)_dependencies=libxcb libxcb_util define $(package)_set_vars diff --git a/depends/packages/libxcb_util_keysyms.mk b/depends/packages/libxcb_util_keysyms.mk index d4f72ded..56bc33d2 100644 --- a/depends/packages/libxcb_util_keysyms.mk +++ b/depends/packages/libxcb_util_keysyms.mk @@ -1,8 +1,8 @@ package=libxcb_util_keysyms $(package)_version=0.4.0 $(package)_download_path=https://xcb.freedesktop.org/dist -$(package)_file_name=xcb-util-keysyms-$($(package)_version).tar.bz2 -$(package)_sha256_hash=0ef8490ff1dede52b7de533158547f8b454b241aa3e4dcca369507f66f216dd9 +$(package)_file_name=xcb-util-keysyms-$($(package)_version).tar.gz +$(package)_sha256_hash=0807cf078fbe38489a41d755095c58239e1b67299f14460dec2ec811e96caa96 $(package)_dependencies=libxcb xproto define $(package)_set_vars diff --git a/depends/packages/libxcb_util_render.mk b/depends/packages/libxcb_util_render.mk index 28f1fb07..ee2883fe 100644 --- a/depends/packages/libxcb_util_render.mk +++ b/depends/packages/libxcb_util_render.mk @@ -1,8 +1,8 @@ package=libxcb_util_render $(package)_version=0.3.9 $(package)_download_path=https://xcb.freedesktop.org/dist -$(package)_file_name=xcb-util-renderutil-$($(package)_version).tar.bz2 -$(package)_sha256_hash=c6e97e48fb1286d6394dddb1c1732f00227c70bd1bedb7d1acabefdd340bea5b +$(package)_file_name=xcb-util-renderutil-$($(package)_version).tar.gz +$(package)_sha256_hash=55eee797e3214fe39d0f3f4d9448cc53cffe06706d108824ea37bb79fcedcad5 $(package)_dependencies=libxcb define $(package)_set_vars diff --git a/depends/packages/libxcb_util_wm.mk b/depends/packages/libxcb_util_wm.mk index 3b905ba4..a68fd23f 100644 --- a/depends/packages/libxcb_util_wm.mk +++ b/depends/packages/libxcb_util_wm.mk @@ -1,8 +1,8 @@ package=libxcb_util_wm $(package)_version=0.4.1 $(package)_download_path=https://xcb.freedesktop.org/dist -$(package)_file_name=xcb-util-wm-$($(package)_version).tar.bz2 -$(package)_sha256_hash=28bf8179640eaa89276d2b0f1ce4285103d136be6c98262b6151aaee1d3c2a3f +$(package)_file_name=xcb-util-wm-$($(package)_version).tar.gz +$(package)_sha256_hash=038b39c4bdc04a792d62d163ba7908f4bb3373057208c07110be73c1b04b8334 $(package)_dependencies=libxcb define $(package)_set_vars diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk deleted file mode 100644 index 7ad2529e..00000000 --- a/depends/packages/miniupnpc.mk +++ /dev/null @@ -1,30 +0,0 @@ -package=miniupnpc -$(package)_version=2.2.2 -$(package)_download_path=https://miniupnp.tuxfamily.org/files/ -$(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=888fb0976ba61518276fe1eda988589c700a3f2a69d71089260d75562afd3687 -$(package)_patches=dont_leak_info.patch respect_mingw_cflags.patch - -# Next time this package is updated, ensure that _WIN32_WINNT is still properly set. -# See discussion in https://github.com/bitcoin/bitcoin/pull/25964. -define $(package)_set_vars -$(package)_build_opts=CC="$($(package)_cc)" -$(package)_build_opts_darwin=LIBTOOL="$($(package)_libtool)" -$(package)_build_opts_mingw32=-f Makefile.mingw CFLAGS="$($(package)_cflags) -D_WIN32_WINNT=0x0601" -$(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$($(package)_ar)" -endef - -define $(package)_preprocess_cmds - patch -p1 < $($(package)_patch_dir)/dont_leak_info.patch && \ - patch -p1 < $($(package)_patch_dir)/respect_mingw_cflags.patch -endef - -define $(package)_build_cmds - $(MAKE) libminiupnpc.a $($(package)_build_opts) -endef - -define $(package)_stage_cmds - mkdir -p $($(package)_staging_prefix_dir)/include/miniupnpc $($(package)_staging_prefix_dir)/lib &&\ - install *.h $($(package)_staging_prefix_dir)/include/miniupnpc &&\ - install libminiupnpc.a $($(package)_staging_prefix_dir)/lib -endef diff --git a/depends/packages/native_capnp.mk b/depends/packages/native_capnp.mk index ed5a6dee..a3a089d4 100644 --- a/depends/packages/native_capnp.mk +++ b/depends/packages/native_capnp.mk @@ -1,12 +1,18 @@ package=native_capnp -$(package)_version=0.7.0 +$(package)_version=1.2.0 $(package)_download_path=https://capnproto.org/ $(package)_download_file=capnproto-c++-$($(package)_version).tar.gz $(package)_file_name=capnproto-cxx-$($(package)_version).tar.gz -$(package)_sha256_hash=c9a4c0bd88123064d483ab46ecee777f14d933359e23bff6fb4f4dbd28b4cd41 +$(package)_sha256_hash=ed00e44ecbbda5186bc78a41ba64a8dc4a861b5f8d4e822959b0144ae6fd42ef + +define $(package)_set_vars + $(package)_config_opts := -DBUILD_TESTING=OFF + $(package)_config_opts += -DWITH_OPENSSL=OFF + $(package)_config_opts += -DWITH_ZLIB=OFF +endef define $(package)_config_cmds - $($(package)_autoconf) + $($(package)_cmake) . endef define $(package)_build_cmds @@ -16,3 +22,7 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef + +define $(package)_postprocess_cmds + rm -rf lib/pkgconfig +endef diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk deleted file mode 100644 index 3148e510..00000000 --- a/depends/packages/native_cctools.mk +++ /dev/null @@ -1,39 +0,0 @@ -package=native_cctools -$(package)_version=c74fafe86076713cb8e6f937af43b6df6da1f42d -$(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive -$(package)_file_name=$($(package)_version).tar.gz -$(package)_sha256_hash=e2c1588d505a69c32e079f4e616e0f117d5478429040e394f624f43f2796e6bc -$(package)_build_subdir=cctools -$(package)_dependencies=native_libtapi - -define $(package)_set_vars - $(package)_config_opts=--target=$(host) --enable-lto-support - $(package)_config_opts+=--with-llvm-config=$(llvm_config_prog) - $(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib - $(package)_cc=$(clang_prog) - $(package)_cxx=$(clangxx_prog) -endef - -ifneq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) -define $(package)_preprocess_cmds - mkdir -p $($(package)_staging_prefix_dir)/lib && \ - cp $(llvm_lib_dir)/libLTO.so $($(package)_staging_prefix_dir)/lib/ -endef -else -endif - -define $(package)_config_cmds - $($(package)_autoconf) -endef - -define $(package)_build_cmds - $(MAKE) -endef - -define $(package)_stage_cmds - $(MAKE) DESTDIR=$($(package)_staging_dir) install -endef - -define $(package)_postprocess_cmds - rm -rf share -endef diff --git a/depends/packages/native_clang.mk b/depends/packages/native_clang.mk deleted file mode 100644 index 661b9c2c..00000000 --- a/depends/packages/native_clang.mk +++ /dev/null @@ -1,24 +0,0 @@ -package=native_clang -$(package)_version=15.0.6 -$(package)_download_path=https://github.com/llvm/llvm-project/releases/download/llvmorg-$($(package)_version) -ifneq (,$(findstring aarch64,$(BUILD))) -$(package)_file_name=clang+llvm-$($(package)_version)-aarch64-linux-gnu.tar.xz -$(package)_sha256_hash=8ca4d68cf103da8331ca3f35fe23d940c1b78fb7f0d4763c1c059e352f5d1bec -else -$(package)_file_name=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-18.04.tar.xz -$(package)_sha256_hash=38bc7f5563642e73e69ac5626724e206d6d539fbef653541b34cae0ba9c3f036 -endif - -define $(package)_stage_cmds - mkdir -p $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include && \ - mkdir -p $($(package)_staging_prefix_dir)/bin && \ - mkdir -p $($(package)_staging_prefix_dir)/include/llvm-c && \ - cp bin/clang $($(package)_staging_prefix_dir)/bin/ && \ - cp -P bin/clang++ $($(package)_staging_prefix_dir)/bin/ && \ - cp bin/dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \ - cp bin/llvm-config $($(package)_staging_prefix_dir)/bin/ && \ - cp include/llvm-c/ExternC.h $($(package)_staging_prefix_dir)/include/llvm-c && \ - cp include/llvm-c/lto.h $($(package)_staging_prefix_dir)/include/llvm-c && \ - cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \ - cp -r lib/clang/$($(package)_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include/ -endef diff --git a/depends/packages/native_libmultiprocess.mk b/depends/packages/native_libmultiprocess.mk index e647afba..f494f6e8 100644 --- a/depends/packages/native_libmultiprocess.mk +++ b/depends/packages/native_libmultiprocess.mk @@ -1,8 +1,5 @@ package=native_libmultiprocess -$(package)_version=1af83d15239ccfa7e47b8764029320953dd7fdf1 -$(package)_download_path=https://github.com/chaincodelabs/libmultiprocess/archive -$(package)_file_name=$($(package)_version).tar.gz -$(package)_sha256_hash=e5587d3feedc7f8473f178a89b94163a11076629825d664964799bbbd5844da5 +$(package)_local_dir=../src/ipc/libmultiprocess $(package)_dependencies=native_capnp define $(package)_config_cmds diff --git a/depends/packages/native_libtapi.mk b/depends/packages/native_libtapi.mk deleted file mode 100644 index a855c393..00000000 --- a/depends/packages/native_libtapi.mk +++ /dev/null @@ -1,22 +0,0 @@ -package=native_libtapi -$(package)_version=eb33a59f2e30ff9724dc1ea8bee8b5229b0557c9 -$(package)_download_path=https://github.com/tpoechtrager/apple-libtapi/archive -$(package)_file_name=$($(package)_version).tar.gz -$(package)_sha256_hash=d4d46c64622f13d6938cecf989046d9561011bb59e8ee835f8f39825d67f578f -$(package)_patches=disable_zlib.patch - -ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) -$(package)_dependencies=native_clang -endif - -define $(package)_preprocess_cmds - patch -p1 < $($(package)_patch_dir)/disable_zlib.patch -endef - -define $(package)_build_cmds - CC=$(clang_prog) CXX=$(clangxx_prog) INSTALLPREFIX=$($(package)_staging_prefix_dir) ./build.sh -endef - -define $(package)_stage_cmds - ./install.sh -endef diff --git a/depends/packages/native_qt.mk b/depends/packages/native_qt.mk new file mode 100644 index 00000000..fc59c4d3 --- /dev/null +++ b/depends/packages/native_qt.mk @@ -0,0 +1,156 @@ +package=native_qt +include packages/qt_details.mk +$(package)_version=$(qt_details_version) +$(package)_download_path=$(qt_details_download_path) +$(package)_file_name=$(qt_details_qtbase_file_name) +$(package)_sha256_hash=$(qt_details_qtbase_sha256_hash) +$(package)_patches_path := $(qt_details_patches_path) +$(package)_patches := dont_hardcode_pwd.patch +$(package)_patches += qtbase-moc-ignore-gcc-macro.patch +$(package)_patches += qtbase_skip_tools.patch +$(package)_patches += rcc_hardcode_timestamp.patch +$(package)_patches += qttools_skip_dependencies.patch + +$(package)_qttranslations_file_name=$(qt_details_qttranslations_file_name) +$(package)_qttranslations_sha256_hash=$(qt_details_qttranslations_sha256_hash) + +$(package)_qttools_file_name=$(qt_details_qttools_file_name) +$(package)_qttools_sha256_hash=$(qt_details_qttools_sha256_hash) + +$(package)_extra_sources := $($(package)_qttranslations_file_name) +$(package)_extra_sources += $($(package)_qttools_file_name) + +$(package)_top_download_path=$(qt_details_top_download_path) +$(package)_top_cmakelists_file_name=$(qt_details_top_cmakelists_file_name) +$(package)_top_cmakelists_download_file=$(qt_details_top_cmakelists_download_file) +$(package)_top_cmakelists_sha256_hash=$(qt_details_top_cmakelists_sha256_hash) +$(package)_top_cmake_download_path=$(qt_details_top_cmake_download_path) +$(package)_top_cmake_ecmoptionaladdsubdirectory_file_name=$(qt_details_top_cmake_ecmoptionaladdsubdirectory_file_name) +$(package)_top_cmake_ecmoptionaladdsubdirectory_download_file=$(qt_details_top_cmake_ecmoptionaladdsubdirectory_download_file) +$(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash=$(qt_details_top_cmake_ecmoptionaladdsubdirectory_sha256_hash) +$(package)_top_cmake_qttoplevelhelpers_file_name=$(qt_details_top_cmake_qttoplevelhelpers_file_name) +$(package)_top_cmake_qttoplevelhelpers_download_file=$(qt_details_top_cmake_qttoplevelhelpers_download_file) +$(package)_top_cmake_qttoplevelhelpers_sha256_hash=$(qt_details_top_cmake_qttoplevelhelpers_sha256_hash) + +$(package)_extra_sources += $($(package)_top_cmakelists_file_name)-$($(package)_version) +$(package)_extra_sources += $($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version) +$(package)_extra_sources += $($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version) + +define $(package)_set_vars +# Build options. +$(package)_config_opts := -release +$(package)_config_opts += -make tools +$(package)_config_opts += -no-pkg-config +$(package)_config_opts += -no-reduce-relocations +$(package)_config_opts += -no-use-gold-linker +$(package)_config_opts += -prefix $(host_prefix) +$(package)_config_opts += -static + +# Modules. +$(package)_config_opts += -no-feature-concurrent +$(package)_config_opts += -no-feature-network +$(package)_config_opts += -no-feature-printsupport +$(package)_config_opts += -no-feature-sql +$(package)_config_opts += -no-feature-testlib +$(package)_config_opts += -no-feature-xml +$(package)_config_opts += -no-gui +$(package)_config_opts += -no-widgets + +$(package)_config_opts += -no-glib +$(package)_config_opts += -no-icu +$(package)_config_opts += -no-libudev +$(package)_config_opts += -no-openssl +$(package)_config_opts += -no-zstd +$(package)_config_opts += -qt-pcre +$(package)_config_opts += -qt-zlib +$(package)_config_opts += -no-feature-backtrace +$(package)_config_opts += -no-feature-permissions +$(package)_config_opts += -no-feature-process +$(package)_config_opts += -no-feature-settings + +# Core tools. +$(package)_config_opts += -no-feature-androiddeployqt +$(package)_config_opts += -no-feature-macdeployqt +$(package)_config_opts += -no-feature-windeployqt +$(package)_config_opts += -no-feature-qmake + +# Qt Tools module. +$(package)_config_opts += -feature-linguist +$(package)_config_opts += -no-feature-assistant +$(package)_config_opts += -no-feature-clang +$(package)_config_opts += -no-feature-clangcpp +$(package)_config_opts += -no-feature-designer +$(package)_config_opts += -no-feature-pixeltool +$(package)_config_opts += -no-feature-qdoc +$(package)_config_opts += -no-feature-qtattributionsscanner +$(package)_config_opts += -no-feature-qtdiag +$(package)_config_opts += -no-feature-qtplugininfo + +$(package)_config_env := CC="$$(build_CC)" +$(package)_config_env += CXX="$$(build_CXX)" +ifeq ($(build_os),darwin) +$(package)_config_env += OBJC="$$(build_CC)" +$(package)_config_env += OBJCXX="$$(build_CXX)" +endif + +$(package)_cmake_opts := -DCMAKE_EXE_LINKER_FLAGS="$$(build_LDFLAGS)" +ifneq ($(V),) +$(package)_cmake_opts += --log-level=STATUS +endif +endef + +define $(package)_fetch_cmds +$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \ +$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \ +$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash)) && \ +$(call fetch_file,$(package),$($(package)_top_download_path),$($(package)_top_cmakelists_download_file),$($(package)_top_cmakelists_file_name)-$($(package)_version),$($(package)_top_cmakelists_sha256_hash)) && \ +$(call fetch_file,$(package),$($(package)_top_cmake_download_path),$($(package)_top_cmake_ecmoptionaladdsubdirectory_download_file),$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version),$($(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash)) && \ +$(call fetch_file,$(package),$($(package)_top_cmake_download_path),$($(package)_top_cmake_qttoplevelhelpers_download_file),$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version),$($(package)_top_cmake_qttoplevelhelpers_sha256_hash)) +endef + +define $(package)_extract_cmds + mkdir -p $($(package)_extract_dir) && \ + echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + echo "$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + echo "$($(package)_top_cmakelists_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmakelists_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + echo "$($(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + echo "$($(package)_top_cmake_qttoplevelhelpers_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + $(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + mkdir qtbase && \ + $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \ + mkdir qttranslations && \ + $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \ + mkdir qttools && \ + $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools && \ + cp $($(package)_source_dir)/$($(package)_top_cmakelists_file_name)-$($(package)_version) ./$($(package)_top_cmakelists_file_name) && \ + mkdir cmake && \ + cp $($(package)_source_dir)/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version) cmake/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name) && \ + cp $($(package)_source_dir)/$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version) cmake/$($(package)_top_cmake_qttoplevelhelpers_file_name) +endef + +define $(package)_preprocess_cmds + patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \ + patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \ + patch -p1 -i $($(package)_patch_dir)/qtbase_skip_tools.patch && \ + patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \ + patch -p1 -i $($(package)_patch_dir)/qttools_skip_dependencies.patch +endef + +define $(package)_config_cmds + cd qtbase && \ + ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts) +endef + +define $(package)_build_cmds + cmake --build . -- $$(filter -j%,$$(MAKEFLAGS)) +endef + +define $(package)_stage_cmds + cmake --install . --prefix $($(package)_staging_prefix_dir) +endef + +define $(package)_postprocess_cmds + rm -rf doc/ && \ + mv translations/ .. +endef diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index dd55c939..b6f100f2 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -5,35 +5,22 @@ boost_packages = boost libevent_packages = libevent qrencode_linux_packages = qrencode -qrencode_android_packages = qrencode qrencode_darwin_packages = qrencode qrencode_mingw32_packages = qrencode -qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm -qt_android_packages=qt +qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig libxkbcommon libxcb_util libxcb_util_cursor libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm +qt_freebsd_packages:=$(qt_linux_packages) qt_darwin_packages=qt qt_mingw32_packages=qt +ifneq ($(host),$(build)) +qt_native_packages := native_qt +endif -bdb_packages=bdb sqlite_packages=sqlite zmq_packages=zeromq -upnp_packages=miniupnpc -natpmp_packages=libnatpmp - -multiprocess_packages = libmultiprocess capnp +multiprocess_packages = capnp multiprocess_native_packages = native_libmultiprocess native_capnp usdt_linux_packages=systemtap - -darwin_native_packages = - -ifneq ($(build_os),darwin) -darwin_native_packages += native_cctools native_libtapi - -ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) -darwin_native_packages+= native_clang -endif - -endif diff --git a/depends/packages/qrencode.mk b/depends/packages/qrencode.mk index 2afd95d7..e3f61409 100644 --- a/depends/packages/qrencode.mk +++ b/depends/packages/qrencode.mk @@ -1,24 +1,24 @@ package=qrencode $(package)_version=4.1.1 $(package)_download_path=https://fukuchi.org/works/qrencode/ -$(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=e455d9732f8041cf5b9c388e345a641fd15707860f928e94507b1961256a6923 +$(package)_file_name=$(package)-$($(package)_version).tar.gz +$(package)_sha256_hash=da448ed4f52aba6bcb0cd48cac0dd51b8692bccc4cd127431402fca6f8171e8e +$(package)_patches=cmake_fixups.patch define $(package)_set_vars -$(package)_config_opts=--disable-shared --without-tools --without-tests --without-png -$(package)_config_opts += --disable-gprof --disable-gcov --disable-mudflap -$(package)_config_opts += --disable-dependency-tracking --enable-option-checking -$(package)_config_opts_linux=--with-pic -$(package)_config_opts_android=--with-pic +$(package)_config_opts := -DWITH_TOOLS=NO -DWITH_TESTS=NO -DGPROF=OFF -DCOVERAGE=OFF +$(package)_config_opts += -DCMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE -DWITHOUT_PNG=ON +$(package)_config_opts += -DCMAKE_DISABLE_FIND_PACKAGE_ICONV=TRUE $(package)_cflags += -Wno-int-conversion -Wno-implicit-function-declaration endef define $(package)_preprocess_cmds - cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub use + patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch endef + define $(package)_config_cmds - $($(package)_autoconf) + $($(package)_cmake) -S . -B . endef define $(package)_build_cmds @@ -30,5 +30,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm lib/*.la + rm -rf share endef diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 047d1d5a..4daffeb1 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -1,120 +1,105 @@ package=qt -$(package)_version=5.15.10 -$(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules -$(package)_suffix=everywhere-opensource-src-$($(package)_version).tar.xz -$(package)_file_name=qtbase-$($(package)_suffix) -$(package)_sha256_hash=c0d06cb18d20f10bf7ad53552099e097ec39362d30a5d6f104724f55fa1c8fb9 -$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm -$(package)_qt_libs=corelib network widgets gui plugins testlib -$(package)_linguist_tools = lrelease lupdate lconvert -$(package)_patches = qt.pro -$(package)_patches += qttools_src.pro -$(package)_patches += mac-qmake.conf -$(package)_patches += fix_qt_pkgconfig.patch -$(package)_patches += no-xlib.patch -$(package)_patches += fix_android_jni_static.patch -$(package)_patches += dont_hardcode_pwd.patch +include packages/qt_details.mk +$(package)_version=$(qt_details_version) +$(package)_download_path=$(qt_details_download_path) +$(package)_file_name=$(qt_details_qtbase_file_name) +$(package)_sha256_hash=$(qt_details_qtbase_sha256_hash) +ifneq ($(host),$(build)) +$(package)_dependencies := native_$(package) +endif +$(package)_linux_dependencies := freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_cursor libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm +$(package)_freebsd_dependencies := $($(package)_linux_dependencies) +$(package)_patches_path := $(qt_details_patches_path) +$(package)_patches := dont_hardcode_pwd.patch $(package)_patches += qtbase-moc-ignore-gcc-macro.patch -$(package)_patches += use_android_ndk23.patch +$(package)_patches += qtbase_avoid_native_float16.patch +$(package)_patches += qtbase_avoid_qmain.patch +$(package)_patches += qtbase_platformsupport.patch +$(package)_patches += qtbase_plugins_cocoa.patch +$(package)_patches += qtbase_skip_tools.patch $(package)_patches += rcc_hardcode_timestamp.patch -$(package)_patches += duplicate_lcqpafonts.patch -$(package)_patches += fast_fixed_dtoa_no_optimize.patch -$(package)_patches += guix_cross_lib_path.patch -$(package)_patches += fix-macos-linker.patch -$(package)_patches += memory_resource.patch -$(package)_patches += windows_lto.patch +$(package)_patches += qttools_skip_dependencies.patch -$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix) -$(package)_qttranslations_sha256_hash=38b942bc7e62794dd072945c8a92bb9dfffed24070aea300327a3bb42f855609 +$(package)_qttranslations_file_name=$(qt_details_qttranslations_file_name) +$(package)_qttranslations_sha256_hash=$(qt_details_qttranslations_sha256_hash) -$(package)_qttools_file_name=qttools-$($(package)_suffix) -$(package)_qttools_sha256_hash=66f46c9729c831dce431778a9c561cca32daceaede1c7e58568d7a5898167dae +$(package)_qttools_file_name=$(qt_details_qttools_file_name) +$(package)_qttools_sha256_hash=$(qt_details_qttools_sha256_hash) -$(package)_extra_sources = $($(package)_qttranslations_file_name) +$(package)_extra_sources := $($(package)_qttranslations_file_name) $(package)_extra_sources += $($(package)_qttools_file_name) +$(package)_top_download_path=$(qt_details_top_download_path) +$(package)_top_cmakelists_file_name=$(qt_details_top_cmakelists_file_name) +$(package)_top_cmakelists_download_file=$(qt_details_top_cmakelists_download_file) +$(package)_top_cmakelists_sha256_hash=$(qt_details_top_cmakelists_sha256_hash) +$(package)_top_cmake_download_path=$(qt_details_top_cmake_download_path) +$(package)_top_cmake_ecmoptionaladdsubdirectory_file_name=$(qt_details_top_cmake_ecmoptionaladdsubdirectory_file_name) +$(package)_top_cmake_ecmoptionaladdsubdirectory_download_file=$(qt_details_top_cmake_ecmoptionaladdsubdirectory_download_file) +$(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash=$(qt_details_top_cmake_ecmoptionaladdsubdirectory_sha256_hash) +$(package)_top_cmake_qttoplevelhelpers_file_name=$(qt_details_top_cmake_qttoplevelhelpers_file_name) +$(package)_top_cmake_qttoplevelhelpers_download_file=$(qt_details_top_cmake_qttoplevelhelpers_download_file) +$(package)_top_cmake_qttoplevelhelpers_sha256_hash=$(qt_details_top_cmake_qttoplevelhelpers_sha256_hash) + +$(package)_extra_sources += $($(package)_top_cmakelists_file_name)-$($(package)_version) +$(package)_extra_sources += $($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version) +$(package)_extra_sources += $($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version) + define $(package)_set_vars -$(package)_config_env = QT_MAC_SDK_NO_VERSION_CHECK=1 -$(package)_config_opts_release = -release -$(package)_config_opts_release += -silent -$(package)_config_opts_debug = -debug -$(package)_config_opts_debug += -optimized-tools -$(package)_config_opts += -bindir $(build_prefix)/bin -$(package)_config_opts += -c++std c++17 -$(package)_config_opts += -confirm-license -$(package)_config_opts += -hostprefix $(build_prefix) -$(package)_config_opts += -no-compile-examples -$(package)_config_opts += -no-cups -$(package)_config_opts += -no-egl +$(package)_config_opts_release := -release +$(package)_config_opts_debug := -debug +$(package)_config_opts := -no-egl $(package)_config_opts += -no-eglfs $(package)_config_opts += -no-evdev $(package)_config_opts += -no-gif $(package)_config_opts += -no-glib $(package)_config_opts += -no-icu $(package)_config_opts += -no-ico -$(package)_config_opts += -no-iconv $(package)_config_opts += -no-kms $(package)_config_opts += -no-linuxfb $(package)_config_opts += -no-libjpeg $(package)_config_opts += -no-libproxy $(package)_config_opts += -no-libudev -$(package)_config_opts += -no-mimetype-database $(package)_config_opts += -no-mtdev +$(package)_config_opts += -no-opengl $(package)_config_opts += -no-openssl $(package)_config_opts += -no-openvg $(package)_config_opts += -no-reduce-relocations $(package)_config_opts += -no-schannel $(package)_config_opts += -no-sctp $(package)_config_opts += -no-securetransport -$(package)_config_opts += -no-sql-db2 -$(package)_config_opts += -no-sql-ibase -$(package)_config_opts += -no-sql-oci -$(package)_config_opts += -no-sql-tds -$(package)_config_opts += -no-sql-mysql -$(package)_config_opts += -no-sql-odbc -$(package)_config_opts += -no-sql-psql -$(package)_config_opts += -no-sql-sqlite -$(package)_config_opts += -no-sql-sqlite2 $(package)_config_opts += -no-system-proxies $(package)_config_opts += -no-use-gold-linker $(package)_config_opts += -no-zstd $(package)_config_opts += -nomake examples $(package)_config_opts += -nomake tests -$(package)_config_opts += -nomake tools -$(package)_config_opts += -opensource -$(package)_config_opts += -pkg-config $(package)_config_opts += -prefix $(host_prefix) +$(package)_config_opts += -qt-doubleconversion +$(package)_config_opts += -qt-harfbuzz +ifneq ($(host),$(build)) +$(package)_config_opts += -qt-host-path $(build_prefix) +endif $(package)_config_opts += -qt-libpng $(package)_config_opts += -qt-pcre -$(package)_config_opts += -qt-harfbuzz $(package)_config_opts += -qt-zlib $(package)_config_opts += -static -$(package)_config_opts += -v -$(package)_config_opts += -no-feature-bearermanagement +$(package)_config_opts += -no-feature-backtrace $(package)_config_opts += -no-feature-colordialog -$(package)_config_opts += -no-feature-commandlineparser $(package)_config_opts += -no-feature-concurrent $(package)_config_opts += -no-feature-dial -$(package)_config_opts += -no-feature-fontcombobox -$(package)_config_opts += -no-feature-ftp +$(package)_config_opts += -no-feature-gssapi $(package)_config_opts += -no-feature-http $(package)_config_opts += -no-feature-image_heuristic_mask $(package)_config_opts += -no-feature-keysequenceedit $(package)_config_opts += -no-feature-lcdnumber +$(package)_config_opts += -no-feature-libresolv $(package)_config_opts += -no-feature-networkdiskcache $(package)_config_opts += -no-feature-networkproxy -$(package)_config_opts += -no-feature-pdf -$(package)_config_opts += -no-feature-printdialog -$(package)_config_opts += -no-feature-printer -$(package)_config_opts += -no-feature-printpreviewdialog -$(package)_config_opts += -no-feature-printpreviewwidget +$(package)_config_opts += -no-feature-printsupport $(package)_config_opts += -no-feature-sessionmanager $(package)_config_opts += -no-feature-socks5 $(package)_config_opts += -no-feature-sql -$(package)_config_opts += -no-feature-sqlmodel -$(package)_config_opts += -no-feature-statemachine -$(package)_config_opts += -no-feature-syntaxhighlighter -$(package)_config_opts += -no-feature-textbrowser +$(package)_config_opts += -no-feature-textmarkdownreader $(package)_config_opts += -no-feature-textmarkdownwriter $(package)_config_opts += -no-feature-textodfwriter $(package)_config_opts += -no-feature-topleveldomain @@ -124,170 +109,178 @@ $(package)_config_opts += -no-feature-undogroup $(package)_config_opts += -no-feature-undostack $(package)_config_opts += -no-feature-undoview $(package)_config_opts += -no-feature-vnc -$(package)_config_opts += -no-feature-wizard -$(package)_config_opts += -no-feature-xml - -$(package)_config_opts_darwin = -no-dbus -$(package)_config_opts_darwin += -no-opengl -$(package)_config_opts_darwin += -pch -$(package)_config_opts_darwin += -no-feature-corewlan -$(package)_config_opts_darwin += -no-freetype -$(package)_config_opts_darwin += QMAKE_MACOSX_DEPLOYMENT_TARGET=$(OSX_MIN_VERSION) +$(package)_config_opts += -no-feature-vulkan -# Optimizing using > -O1 causes non-determinism when building across arches. -$(package)_config_opts_aarch64_darwin += "QMAKE_CFLAGS_OPTIMIZE_FULL = -O1" +# Core tools. +$(package)_config_opts += -no-feature-androiddeployqt +$(package)_config_opts += -no-feature-macdeployqt +$(package)_config_opts += -no-feature-qmake +$(package)_config_opts += -no-feature-windeployqt -ifneq ($(build_os),darwin) -$(package)_config_opts_darwin += -xplatform macx-clang-linux -$(package)_config_opts_darwin += -device-option MAC_SDK_PATH=$(OSX_SDK) -$(package)_config_opts_darwin += -device-option MAC_SDK_VERSION=$(OSX_SDK_VERSION) -$(package)_config_opts_darwin += -device-option CROSS_COMPILE="$(host)-" -$(package)_config_opts_darwin += -device-option MAC_TARGET=$(host) -$(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION) +ifeq ($(host),$(build)) +# Qt Tools module. +$(package)_config_opts += -feature-linguist +$(package)_config_opts += -no-feature-assistant +$(package)_config_opts += -no-feature-clang +$(package)_config_opts += -no-feature-clangcpp +$(package)_config_opts += -no-feature-designer +$(package)_config_opts += -no-feature-pixeltool +$(package)_config_opts += -no-feature-qdoc +$(package)_config_opts += -no-feature-qtattributionsscanner +$(package)_config_opts += -no-feature-qtdiag +$(package)_config_opts += -no-feature-qtplugininfo endif -ifneq ($(build_arch),$(host_arch)) -$(package)_config_opts_aarch64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=arm64 -$(package)_config_opts_x86_64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=x86_64 -endif +$(package)_config_opts_darwin := -no-dbus +$(package)_config_opts_darwin += -no-feature-printsupport +$(package)_config_opts_darwin += -no-freetype +$(package)_config_opts_darwin += -no-pkg-config -$(package)_config_opts_linux = -xcb -$(package)_config_opts_linux += -no-xcb-xlib +$(package)_config_opts_linux := -dbus-runtime +$(package)_config_opts_linux += -fontconfig +$(package)_config_opts_linux += -no-feature-process $(package)_config_opts_linux += -no-feature-xlib +$(package)_config_opts_linux += -no-xcb-xlib +$(package)_config_opts_linux += -pkg-config $(package)_config_opts_linux += -system-freetype -$(package)_config_opts_linux += -fontconfig -$(package)_config_opts_linux += -no-opengl -$(package)_config_opts_linux += -no-feature-vulkan -$(package)_config_opts_linux += -dbus-runtime +$(package)_config_opts_linux += -xcb ifneq ($(LTO),) $(package)_config_opts_linux += -ltcg endif +$(package)_config_opts_freebsd := $$($(package)_config_opts_linux) -ifneq (,$(findstring clang,$($(package)_cxx))) - ifneq (,$(findstring -stdlib=libc++,$($(package)_cxx))) - $(package)_config_opts_linux += -platform linux-clang-libc++ -xplatform linux-clang-libc++ - else - $(package)_config_opts_linux += -platform linux-clang -xplatform linux-clang - endif -else - $(package)_config_opts_linux += -platform linux-g++ -xplatform bitcoin-linux-g++ -endif - -$(package)_config_opts_mingw32 = -no-opengl -$(package)_config_opts_mingw32 += -no-dbus +$(package)_config_opts_mingw32 := -no-dbus $(package)_config_opts_mingw32 += -no-freetype -$(package)_config_opts_mingw32 += -xplatform win32-g++ -$(package)_config_opts_mingw32 += "QMAKE_CFLAGS = '$($(package)_cflags) $($(package)_cppflags)'" -$(package)_config_opts_mingw32 += "QMAKE_CXX = '$($(package)_cxx)'" -$(package)_config_opts_mingw32 += "QMAKE_CXXFLAGS = '$($(package)_cxxflags) $($(package)_cppflags)'" -$(package)_config_opts_mingw32 += "QMAKE_LFLAGS = '$($(package)_ldflags)'" -$(package)_config_opts_mingw32 += "QMAKE_LIB = '$($(package)_ar) rc'" -$(package)_config_opts_mingw32 += -device-option CROSS_COMPILE="$(host)-" -$(package)_config_opts_mingw32 += -pch -ifneq ($(LTO),) -$(package)_config_opts_mingw32 += -ltcg +$(package)_config_opts_mingw32 += -no-pkg-config + +# CMake build options. +$(package)_config_env := CC="$$($(package)_cc)" +$(package)_config_env += CXX="$$($(package)_cxx)" +$(package)_config_env_darwin := OBJC="$$($(package)_cc)" +$(package)_config_env_darwin += OBJCXX="$$($(package)_cxx)" + +$(package)_cmake_opts := -DCMAKE_PREFIX_PATH=$(host_prefix) +$(package)_cmake_opts += -DQT_FEATURE_cxx20=ON +$(package)_cmake_opts += -DQT_ENABLE_CXX_EXTENSIONS=OFF +ifneq ($(V),) +$(package)_cmake_opts += --log-level=STATUS endif -$(package)_config_opts_android = -xplatform android-clang -$(package)_config_opts_android += -android-sdk $(ANDROID_SDK) -$(package)_config_opts_android += -android-ndk $(ANDROID_NDK) -$(package)_config_opts_android += -android-ndk-platform android-$(ANDROID_API_LEVEL) -$(package)_config_opts_android += -egl -$(package)_config_opts_android += -no-dbus -$(package)_config_opts_android += -opengl es2 -$(package)_config_opts_android += -qt-freetype -$(package)_config_opts_android += -no-fontconfig -$(package)_config_opts_android += -L $(host_prefix)/lib -$(package)_config_opts_android += -I $(host_prefix)/include -$(package)_config_opts_android += -pch -$(package)_config_opts_android += -no-feature-vulkan +$(package)_cmake_opts += -DQT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS=ON +$(package)_cmake_opts += -DCMAKE_C_FLAGS="$$($(package)_cppflags) $$($$($(package)_type)_CFLAGS) -ffile-prefix-map=$$($(package)_extract_dir)=/usr" +$(package)_cmake_opts += -DCMAKE_C_FLAGS_RELEASE="$$($$($(package)_type)_release_CFLAGS)" +$(package)_cmake_opts += -DCMAKE_C_FLAGS_DEBUG="$$($$($(package)_type)_debug_CFLAGS)" +$(package)_cmake_opts += -DCMAKE_CXX_FLAGS="$$($(package)_cppflags) $$($$($(package)_type)_CXXFLAGS) -ffile-prefix-map=$$($(package)_extract_dir)=/usr" +$(package)_cmake_opts += -DCMAKE_CXX_FLAGS_RELEASE="$$($$($(package)_type)_release_CXXFLAGS)" +$(package)_cmake_opts += -DCMAKE_CXX_FLAGS_DEBUG="$$($$($(package)_type)_debug_CXXFLAGS)" +ifeq ($(host_os),darwin) +$(package)_cmake_opts += -DCMAKE_OBJC_FLAGS="$$($(package)_cppflags) $$($$($(package)_type)_CFLAGS) -ffile-prefix-map=$$($(package)_extract_dir)=/usr" +$(package)_cmake_opts += -DCMAKE_OBJC_FLAGS_RELEASE="$$($$($(package)_type)_release_CFLAGS)" +$(package)_cmake_opts += -DCMAKE_OBJC_FLAGS_DEBUG="$$($$($(package)_type)_debug_CFLAGS)" +$(package)_cmake_opts += -DCMAKE_OBJCXX_FLAGS="$$($(package)_cppflags) $$($$($(package)_type)_CXXFLAGS) -ffile-prefix-map=$$($(package)_extract_dir)=/usr" +$(package)_cmake_opts += -DCMAKE_OBJCXX_FLAGS_RELEASE="$$($$($(package)_type)_release_CXXFLAGS)" +$(package)_cmake_opts += -DCMAKE_OBJCXX_FLAGS_DEBUG="$$($$($(package)_type)_debug_CXXFLAGS)" +endif +$(package)_cmake_opts += -DCMAKE_EXE_LINKER_FLAGS="$$($$($(package)_type)_LDFLAGS)" +$(package)_cmake_opts += -DCMAKE_EXE_LINKER_FLAGS_RELEASE="$$($$($(package)_type)_release_LDFLAGS)" +$(package)_cmake_opts += -DCMAKE_EXE_LINKER_FLAGS_DEBUG="$$($$($(package)_type)_debug_LDFLAGS)" -$(package)_config_opts_aarch64_android += -android-arch arm64-v8a -$(package)_config_opts_armv7a_android += -android-arch armeabi-v7a -$(package)_config_opts_x86_64_android += -android-arch x86_64 +ifneq ($(host),$(build)) +$(package)_cmake_opts += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system_name) +$(package)_cmake_opts += -DCMAKE_SYSTEM_VERSION=$($(host_os)_cmake_system_version) +$(package)_cmake_opts += -DCMAKE_SYSTEM_PROCESSOR=$(host_arch) +# Native packages cannot be used during cross-compiling. However, +# Qt still unconditionally tries to find them, which causes issues +# in some cases, such as when cross-compiling from macOS to Windows. +# Explicitly disable this unnecessary Qt behaviour. +$(package)_cmake_opts += -DCMAKE_DISABLE_FIND_PACKAGE_Libb2=TRUE +$(package)_cmake_opts += -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemDoubleConversion=TRUE +$(package)_cmake_opts += -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemMd4c=TRUE +$(package)_cmake_opts += -DCMAKE_DISABLE_FIND_PACKAGE_WrapZSTD=TRUE +endif +ifeq ($(host_os),darwin) +$(package)_cmake_opts += -DCMAKE_INSTALL_NAME_TOOL=true +$(package)_cmake_opts += -DCMAKE_FRAMEWORK_PATH=$(OSX_SDK)/System/Library/Frameworks +$(package)_cmake_opts += -DQT_INTERNAL_APPLE_SDK_VERSION=$(OSX_SDK_VERSION) +$(package)_cmake_opts += -DQT_INTERNAL_XCODE_VERSION=$(XCODE_VERSION) +$(package)_cmake_opts += -DQT_NO_APPLE_SDK_MAX_VERSION_CHECK=ON +endif endef define $(package)_fetch_cmds $(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \ $(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \ -$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash)) +$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash)) && \ +$(call fetch_file,$(package),$($(package)_top_download_path),$($(package)_top_cmakelists_download_file),$($(package)_top_cmakelists_file_name)-$($(package)_version),$($(package)_top_cmakelists_sha256_hash)) && \ +$(call fetch_file,$(package),$($(package)_top_cmake_download_path),$($(package)_top_cmake_ecmoptionaladdsubdirectory_download_file),$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version),$($(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash)) && \ +$(call fetch_file,$(package),$($(package)_top_cmake_download_path),$($(package)_top_cmake_qttoplevelhelpers_download_file),$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version),$($(package)_top_cmake_qttoplevelhelpers_sha256_hash)) endef +ifeq ($(host),$(build)) define $(package)_extract_cmds mkdir -p $($(package)_extract_dir) && \ echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \ echo "$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + echo "$($(package)_top_cmakelists_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmakelists_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + echo "$($(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + echo "$($(package)_top_cmake_qttoplevelhelpers_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ $(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \ mkdir qtbase && \ $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \ mkdir qttranslations && \ $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \ mkdir qttools && \ - $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools + $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools && \ + cp $($(package)_source_dir)/$($(package)_top_cmakelists_file_name)-$($(package)_version) ./$($(package)_top_cmakelists_file_name) && \ + mkdir cmake && \ + cp $($(package)_source_dir)/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version) cmake/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name) && \ + cp $($(package)_source_dir)/$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version) cmake/$($(package)_top_cmake_qttoplevelhelpers_file_name) +endef +else +define $(package)_extract_cmds + mkdir -p $($(package)_extract_dir) && \ + echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + echo "$($(package)_top_cmakelists_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmakelists_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + echo "$($(package)_top_cmake_ecmoptionaladdsubdirectory_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + echo "$($(package)_top_cmake_qttoplevelhelpers_sha256_hash) $($(package)_source_dir)/$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + $(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + mkdir qtbase && \ + $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \ + cp $($(package)_source_dir)/$($(package)_top_cmakelists_file_name)-$($(package)_version) ./$($(package)_top_cmakelists_file_name) && \ + mkdir cmake && \ + cp $($(package)_source_dir)/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name)-$($(package)_version) cmake/$($(package)_top_cmake_ecmoptionaladdsubdirectory_file_name) && \ + cp $($(package)_source_dir)/$($(package)_top_cmake_qttoplevelhelpers_file_name)-$($(package)_version) cmake/$($(package)_top_cmake_qttoplevelhelpers_file_name) endef +endif -# Preprocessing steps work as follows: -# -# 1. Apply our patches to the extracted source. See each patch for more info. -# -# 2. Create a macOS-Clang-Linux mkspec using our mac-qmake.conf. -# -# 3. After making a copy of the mkspec for the linux-arm-gnueabi host, named -# bitcoin-linux-g++, replace tool names with $($($(package)_type)_TOOL). -# -# 4. Put our C, CXX and LD FLAGS into gcc-base.conf. Only used for non-host builds. -# -# 5. In clang.conf, swap out clang & clang++, for our compiler + flags. See #17466. define $(package)_preprocess_cmds - cp $($(package)_patch_dir)/qt.pro qt.pro && \ - cp $($(package)_patch_dir)/qttools_src.pro qttools/src/src.pro && \ - patch -p1 -i $($(package)_patch_dir)/fix-macos-linker.patch && \ patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch && \ - patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \ patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \ - patch -p1 -i $($(package)_patch_dir)/use_android_ndk23.patch && \ - patch -p1 -i $($(package)_patch_dir)/memory_resource.patch && \ - patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \ - patch -p1 -i $($(package)_patch_dir)/duplicate_lcqpafonts.patch && \ - patch -p1 -i $($(package)_patch_dir)/fast_fixed_dtoa_no_optimize.patch && \ - patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \ - patch -p1 -i $($(package)_patch_dir)/windows_lto.patch && \ - mkdir -p qtbase/mkspecs/macx-clang-linux &&\ - cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\ - cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \ - cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \ - sed -i.old "s|arm-linux-gnueabi-gcc|$($($(package)_type)_CC)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ - sed -i.old "s|arm-linux-gnueabi-g++|$($($(package)_type)_CXX)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ - sed -i.old "s|arm-linux-gnueabi-ar|$($($(package)_type)_AR)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ - sed -i.old "s|arm-linux-gnueabi-objcopy|$($($(package)_type)_OBJCOPY)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ - sed -i.old "s|arm-linux-gnueabi-nm|$($($(package)_type)_NM)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ - sed -i.old "s|arm-linux-gnueabi-strip|$($($(package)_type)_STRIP)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ - echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \ - echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \ - echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \ - sed -i.old "s|QMAKE_CC = \$$$$\$$$${CROSS_COMPILE}clang|QMAKE_CC = $($(package)_cc)|" qtbase/mkspecs/common/clang.conf && \ - sed -i.old "s|QMAKE_CXX = \$$$$\$$$${CROSS_COMPILE}clang++|QMAKE_CXX = $($(package)_cxx)|" qtbase/mkspecs/common/clang.conf + patch -p1 -i $($(package)_patch_dir)/qtbase_avoid_native_float16.patch && \ + patch -p1 -i $($(package)_patch_dir)/qtbase_avoid_qmain.patch && \ + patch -p1 -i $($(package)_patch_dir)/qtbase_platformsupport.patch && \ + patch -p1 -i $($(package)_patch_dir)/qtbase_plugins_cocoa.patch && \ + patch -p1 -i $($(package)_patch_dir)/qtbase_skip_tools.patch && \ + patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch endef +ifeq ($(host),$(build)) + $(package)_preprocess_cmds += && patch -p1 -i $($(package)_patch_dir)/qttools_skip_dependencies.patch +endif define $(package)_config_cmds cd qtbase && \ - ./configure -top-level $($(package)_config_opts) + ./configure -top-level $($(package)_config_opts) -- $($(package)_cmake_opts) endef define $(package)_build_cmds - $(MAKE) + cmake --build . -- $$(filter -j%,$$(MAKEFLAGS)) endef define $(package)_stage_cmds - $(MAKE) -C qtbase/src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && \ - $(MAKE) -C qttools/src/linguist INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_linguist_tools))) && \ - $(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets + cmake --install . --prefix $($(package)_staging_prefix_dir) endef define $(package)_postprocess_cmds - rm -rf native/mkspecs/ native/lib/ lib/cmake/ && \ - rm -f lib/lib*.la + rm -rf doc/ endef diff --git a/depends/packages/qt_details.mk b/depends/packages/qt_details.mk new file mode 100644 index 00000000..34144814 --- /dev/null +++ b/depends/packages/qt_details.mk @@ -0,0 +1,26 @@ +qt_details_version := 6.7.3 +qt_details_download_path := https://download.qt.io/archive/qt/6.7/$(qt_details_version)/submodules +qt_details_suffix := everywhere-src-$(qt_details_version).tar.xz + +qt_details_qtbase_file_name := qtbase-$(qt_details_suffix) +qt_details_qtbase_sha256_hash := 8ccbb9ab055205ac76632c9eeddd1ed6fc66936fc56afc2ed0fd5d9e23da3097 + +qt_details_qttranslations_file_name := qttranslations-$(qt_details_suffix) +qt_details_qttranslations_sha256_hash := dcc762acac043b9bb5e4d369b6d6f53e0ecfcf76a408fe0db5f7ef071c9d6dc8 + +qt_details_qttools_file_name := qttools-$(qt_details_suffix) +qt_details_qttools_sha256_hash := f03bb7df619cd9ac9dba110e30b7bcab5dd88eb8bdc9cc752563b4367233203f + +qt_details_patches_path := $(PATCHES_PATH)/qt + +qt_details_top_download_path := https://code.qt.io/cgit/qt/qt5.git/plain +qt_details_top_cmakelists_file_name := CMakeLists.txt +qt_details_top_cmakelists_download_file := $(qt_details_top_cmakelists_file_name)?h=$(qt_details_version) +qt_details_top_cmakelists_sha256_hash := 9fb720a633c0c0a21c31fe62a34bf617726fed72480d4064f29ca5d6973d513f +qt_details_top_cmake_download_path := $(qt_details_top_download_path)/cmake +qt_details_top_cmake_ecmoptionaladdsubdirectory_file_name := ECMOptionalAddSubdirectory.cmake +qt_details_top_cmake_ecmoptionaladdsubdirectory_download_file := $(qt_details_top_cmake_ecmoptionaladdsubdirectory_file_name)?h=$(qt_details_version) +qt_details_top_cmake_ecmoptionaladdsubdirectory_sha256_hash := 97ee8bbfcb0a4bdcc6c1af77e467a1da0c5b386c42be2aa97d840247af5f6f70 +qt_details_top_cmake_qttoplevelhelpers_file_name := QtTopLevelHelpers.cmake +qt_details_top_cmake_qttoplevelhelpers_download_file := $(qt_details_top_cmake_qttoplevelhelpers_file_name)?h=$(qt_details_version) +qt_details_top_cmake_qttoplevelhelpers_sha256_hash := 5ac2a7159ee27b5b86d26ecff44922e7b8f319aa847b7b5766dc17932fd4a294 diff --git a/depends/packages/sqlite.mk b/depends/packages/sqlite.mk index a8ec89c6..67b7719e 100644 --- a/depends/packages/sqlite.mk +++ b/depends/packages/sqlite.mk @@ -1,20 +1,17 @@ package=sqlite -$(package)_version=3380500 -$(package)_download_path=https://sqlite.org/2022/ +$(package)_version=3460100 +$(package)_download_path=https://sqlite.org/2024/ $(package)_file_name=sqlite-autoconf-$($(package)_version).tar.gz -$(package)_sha256_hash=5af07de982ba658fd91a03170c945f99c971f6955bc79df3266544373e39869c +$(package)_sha256_hash=67d3fe6d268e6eaddcae3727fce58fcc8e9c53869bdd07a0c61e38ddf2965071 define $(package)_set_vars $(package)_config_opts=--disable-shared --disable-readline --disable-dynamic-extensions --enable-option-checking $(package)_config_opts+= --disable-rtree --disable-fts4 --disable-fts5 -$(package)_config_opts_linux=--with-pic -$(package)_config_opts_freebsd=--with-pic -$(package)_config_opts_netbsd=--with-pic -$(package)_config_opts_openbsd=--with-pic -$(package)_config_opts_debug=--enable-debug -$(package)_cflags+=-DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DEPRECATED -$(package)_cflags+=-DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_JSON -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -$(package)_cflags+=-DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_AUTOINIT +# We avoid using `--enable-debug` because it overrides CFLAGS, a behavior we want to prevent. +$(package)_cppflags_debug += -DSQLITE_DEBUG +$(package)_cppflags+=-DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DEPRECATED +$(package)_cppflags+=-DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_JSON -DSQLITE_LIKE_DOESNT_MATCH_BLOBS +$(package)_cppflags+=-DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_AUTOINIT endef define $(package)_preprocess_cmds @@ -30,7 +27,7 @@ define $(package)_build_cmds endef define $(package)_stage_cmds - $(MAKE) DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-includeHEADERS install-pkgconfigDATA + $(MAKE) DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-includeHEADERS endef define $(package)_postprocess_cmds diff --git a/depends/packages/systemtap.mk b/depends/packages/systemtap.mk index 541ebeee..c912e18c 100644 --- a/depends/packages/systemtap.mk +++ b/depends/packages/systemtap.mk @@ -3,11 +3,10 @@ $(package)_version=4.8 $(package)_download_path=https://sourceware.org/ftp/systemtap/releases/ $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=cbd50a4eba5b261394dc454c12448ddec73e55e6742fda7f508f9fbc1331c223 -$(package)_patches=remove_SDT_ASM_SECTION_AUTOGROUP_SUPPORT_check.patch fix_variadic_warning.patch +$(package)_patches=remove_SDT_ASM_SECTION_AUTOGROUP_SUPPORT_check.patch define $(package)_preprocess_cmds patch -p1 < $($(package)_patch_dir)/remove_SDT_ASM_SECTION_AUTOGROUP_SUPPORT_check.patch && \ - patch -p1 < $($(package)_patch_dir)/fix_variadic_warning.patch && \ mkdir -p $($(package)_staging_prefix_dir)/include/sys && \ cp includes/sys/sdt.h $($(package)_staging_prefix_dir)/include/sys/sdt.h endef diff --git a/depends/packages/xproto.mk b/depends/packages/xproto.mk index 7a43c52f..0a534556 100644 --- a/depends/packages/xproto.mk +++ b/depends/packages/xproto.mk @@ -1,8 +1,8 @@ package=xproto $(package)_version=7.0.31 $(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto -$(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=c6f9747da0bd3a95f86b17fb8dd5e717c8f3ab7f0ece3ba1b247899ec1ef7747 +$(package)_file_name=$(package)-$($(package)_version).tar.gz +$(package)_sha256_hash=6d755eaae27b45c5cc75529a12855fed5de5969b367ed05003944cf901ed43c7 define $(package)_set_vars $(package)_config_opts=--without-fop --without-xmlto --without-xsltproc --disable-specs @@ -21,6 +21,8 @@ define $(package)_build_cmds $(MAKE) endef +# mkdir detection is broken on Alpine. Set MKDIRPROG to ensure we always +# use "mkdir -p", and avoid parallelism issues during install. define $(package)_stage_cmds - $(MAKE) DESTDIR=$($(package)_staging_dir) install + $(MAKE) MKDIRPROG="mkdir -p" DESTDIR=$($(package)_staging_dir) install endef diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk index d7152327..8bf84b1f 100644 --- a/depends/packages/zeromq.mk +++ b/depends/packages/zeromq.mk @@ -1,42 +1,49 @@ package=zeromq -$(package)_version=4.3.4 +$(package)_version=4.3.5 $(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/ $(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5 -$(package)_patches=remove_libstd_link.patch netbsd_kevent_void.patch +$(package)_sha256_hash=6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43 +$(package)_build_subdir=build +$(package)_patches = macos_mktemp_check.patch +$(package)_patches += builtin_sha1.patch +$(package)_patches += fix_have_windows.patch +$(package)_patches += openbsd_kqueue_headers.patch +$(package)_patches += cmake_minimum.patch +$(package)_patches += cacheline_undefined.patch +$(package)_patches += no_librt.patch define $(package)_set_vars - $(package)_config_opts = --without-docs --disable-shared --disable-valgrind - $(package)_config_opts += --disable-perf --disable-curve-keygen --disable-curve --disable-libbsd - $(package)_config_opts += --without-libsodium --without-libgssapi_krb5 --without-pgm --without-norm --without-vmci - $(package)_config_opts += --disable-libunwind --disable-radix-tree --without-gcov --disable-dependency-tracking - $(package)_config_opts += --disable-Werror --disable-drafts --enable-option-checking - $(package)_config_opts_linux=--with-pic - $(package)_config_opts_freebsd=--with-pic - $(package)_config_opts_netbsd=--with-pic - $(package)_config_opts_openbsd=--with-pic - $(package)_config_opts_android=--with-pic + $(package)_config_opts := -DCMAKE_BUILD_TYPE=None -DWITH_DOCS=OFF -DWITH_LIBSODIUM=OFF + $(package)_config_opts += -DWITH_LIBBSD=OFF -DENABLE_CURVE=OFF -DENABLE_CPACK=OFF + $(package)_config_opts += -DBUILD_SHARED=OFF -DBUILD_TESTS=OFF -DZMQ_BUILD_TESTS=OFF + $(package)_config_opts += -DENABLE_DRAFTS=OFF -DZMQ_BUILD_TESTS=OFF + $(package)_cxxflags += -fdebug-prefix-map=$($(package)_extract_dir)=/usr -fmacro-prefix-map=$($(package)_extract_dir)=/usr + $(package)_config_opts_mingw32 += -DZMQ_WIN32_WINNT=0x0A00 -DZMQ_HAVE_IPC=OFF endef define $(package)_preprocess_cmds - patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch && \ - patch -p1 < $($(package)_patch_dir)/netbsd_kevent_void.patch + patch -p1 < $($(package)_patch_dir)/macos_mktemp_check.patch && \ + patch -p1 < $($(package)_patch_dir)/builtin_sha1.patch && \ + patch -p1 < $($(package)_patch_dir)/cacheline_undefined.patch && \ + patch -p1 < $($(package)_patch_dir)/fix_have_windows.patch && \ + patch -p1 < $($(package)_patch_dir)/openbsd_kqueue_headers.patch && \ + patch -p1 < $($(package)_patch_dir)/cmake_minimum.patch && \ + patch -p1 < $($(package)_patch_dir)/no_librt.patch endef define $(package)_config_cmds - ./autogen.sh && \ - cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config && \ - $($(package)_autoconf) + $($(package)_cmake) -S .. -B . endef define $(package)_build_cmds - $(MAKE) src/libzmq.la + $(MAKE) endef define $(package)_stage_cmds - $(MAKE) DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-includeHEADERS install-pkgconfigDATA + $(MAKE) DESTDIR=$($(package)_staging_dir) install endef define $(package)_postprocess_cmds - rm -rf bin share lib/*.la + rm -rf share && \ + rm -rf lib/pkgconfig endef diff --git a/depends/patches/bdb/clang_cxx_11.patch b/depends/patches/bdb/clang_cxx_11.patch deleted file mode 100644 index 58f7ddc7..00000000 --- a/depends/patches/bdb/clang_cxx_11.patch +++ /dev/null @@ -1,147 +0,0 @@ -commit 3311d68f11d1697565401eee6efc85c34f022ea7 -Author: fanquake -Date: Mon Aug 17 20:03:56 2020 +0800 - - Fix C++11 compatibility - -diff --git a/dbinc/atomic.h b/dbinc/atomic.h -index 0034dcc..7c11d4a 100644 ---- a/dbinc/atomic.h -+++ b/dbinc/atomic.h -@@ -70,7 +70,7 @@ typedef struct { - * These have no memory barriers; the caller must include them when necessary. - */ - #define atomic_read(p) ((p)->value) --#define atomic_init(p, val) ((p)->value = (val)) -+#define atomic_init_db(p, val) ((p)->value = (val)) - - #ifdef HAVE_ATOMIC_SUPPORT - -@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val; - #define atomic_inc(env, p) __atomic_inc(p) - #define atomic_dec(env, p) __atomic_dec(p) - #define atomic_compare_exchange(env, p, o, n) \ -- __atomic_compare_exchange((p), (o), (n)) -+ __atomic_compare_exchange_db((p), (o), (n)) - static inline int __atomic_inc(db_atomic_t *p) - { - int temp; -@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p) - * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html - * which configure could be changed to use. - */ --static inline int __atomic_compare_exchange( -+static inline int __atomic_compare_exchange_db( - db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) - { - atomic_value_t was; -@@ -206,7 +206,7 @@ static inline int __atomic_compare_exchange( - #define atomic_dec(env, p) (--(p)->value) - #define atomic_compare_exchange(env, p, oldval, newval) \ - (DB_ASSERT(env, atomic_read(p) == (oldval)), \ -- atomic_init(p, (newval)), 1) -+ atomic_init_db(p, (newval)), 1) - #else - #define atomic_inc(env, p) __atomic_inc(env, p) - #define atomic_dec(env, p) __atomic_dec(env, p) -diff --git a/mp/mp_fget.c b/mp/mp_fget.c -index 5fdee5a..0b75f57 100644 ---- a/mp/mp_fget.c -+++ b/mp/mp_fget.c -@@ -617,7 +617,7 @@ alloc: /* Allocate a new buffer header and data space. */ - - /* Initialize enough so we can call __memp_bhfree. */ - alloc_bhp->flags = 0; -- atomic_init(&alloc_bhp->ref, 1); -+ atomic_init_db(&alloc_bhp->ref, 1); - #ifdef DIAGNOSTIC - if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) { - __db_errx(env, -@@ -911,7 +911,7 @@ alloc: /* Allocate a new buffer header and data space. */ - MVCC_MPROTECT(bhp->buf, mfp->stat.st_pagesize, - PROT_READ); - -- atomic_init(&alloc_bhp->ref, 1); -+ atomic_init_db(&alloc_bhp->ref, 1); - MUTEX_LOCK(env, alloc_bhp->mtx_buf); - alloc_bhp->priority = bhp->priority; - alloc_bhp->pgno = bhp->pgno; -diff --git a/mp/mp_mvcc.c b/mp/mp_mvcc.c -index 34467d2..f05aa0c 100644 ---- a/mp/mp_mvcc.c -+++ b/mp/mp_mvcc.c -@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp) - #else - memcpy(frozen_bhp, bhp, SSZA(BH, buf)); - #endif -- atomic_init(&frozen_bhp->ref, 0); -+ atomic_init_db(&frozen_bhp->ref, 0); - if (mutex != MUTEX_INVALID) - frozen_bhp->mtx_buf = mutex; - else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH, -@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp) - #endif - alloc_bhp->mtx_buf = mutex; - MUTEX_LOCK(env, alloc_bhp->mtx_buf); -- atomic_init(&alloc_bhp->ref, 1); -+ atomic_init_db(&alloc_bhp->ref, 1); - F_CLR(alloc_bhp, BH_FROZEN); - } - -diff --git a/mp/mp_region.c b/mp/mp_region.c -index e6cece9..ddbe906 100644 ---- a/mp/mp_region.c -+++ b/mp/mp_region.c -@@ -224,7 +224,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg) - MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0) - return (ret); - SH_TAILQ_INIT(&htab[i].hash_bucket); -- atomic_init(&htab[i].hash_page_dirty, 0); -+ atomic_init_db(&htab[i].hash_page_dirty, 0); - } - - /* -@@ -269,7 +269,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg) - hp->mtx_hash = (mtx_base == MUTEX_INVALID) ? MUTEX_INVALID : - mtx_base + i; - SH_TAILQ_INIT(&hp->hash_bucket); -- atomic_init(&hp->hash_page_dirty, 0); -+ atomic_init_db(&hp->hash_page_dirty, 0); - #ifdef HAVE_STATISTICS - hp->hash_io_wait = 0; - hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0; -diff --git a/mutex/mut_method.c b/mutex/mut_method.c -index 2588763..5c6d516 100644 ---- a/mutex/mut_method.c -+++ b/mutex/mut_method.c -@@ -426,7 +426,7 @@ atomic_compare_exchange(env, v, oldval, newval) - MUTEX_LOCK(env, mtx); - ret = atomic_read(v) == oldval; - if (ret) -- atomic_init(v, newval); -+ atomic_init_db(v, newval); - MUTEX_UNLOCK(env, mtx); - - return (ret); -diff --git a/mutex/mut_tas.c b/mutex/mut_tas.c -index f3922e0..e40fcdf 100644 ---- a/mutex/mut_tas.c -+++ b/mutex/mut_tas.c -@@ -46,7 +46,7 @@ __db_tas_mutex_init(env, mutex, flags) - - #ifdef HAVE_SHARED_LATCHES - if (F_ISSET(mutexp, DB_MUTEX_SHARED)) -- atomic_init(&mutexp->sharecount, 0); -+ atomic_init_db(&mutexp->sharecount, 0); - else - #endif - if (MUTEX_INIT(&mutexp->tas)) { -@@ -486,7 +486,7 @@ __db_tas_mutex_unlock(env, mutex) - F_CLR(mutexp, DB_MUTEX_LOCKED); - /* Flush flag update before zeroing count */ - MEMBAR_EXIT(); -- atomic_init(&mutexp->sharecount, 0); -+ atomic_init_db(&mutexp->sharecount, 0); - } else { - DB_ASSERT(env, sharecount > 0); - MEMBAR_EXIT(); diff --git a/depends/patches/boost/skip_compiled_targets.patch b/depends/patches/boost/skip_compiled_targets.patch new file mode 100644 index 00000000..32b69ce6 --- /dev/null +++ b/depends/patches/boost/skip_compiled_targets.patch @@ -0,0 +1,136 @@ +cmake: Add `BOOST_TEST_HEADERS_ONLY` configuration variable + +This change allows the build to be configured to install only the +Boost.Test headers required for using the headers-only variant of the +Unit Test Framework. + +Upstream commit: 097e97820e654ead9c477b47443a545cef5d3b12 + + +--- a/libs/test/CMakeLists.txt ++++ b/libs/test/CMakeLists.txt +@@ -30,60 +30,70 @@ set(_boost_test_dependencies + Boost::utility + ) + +-# Compiled targets ++option(BOOST_TEST_HEADERS_ONLY "Boost.Test: Only install headers" OFF) + +-function(boost_test_add_library name) ++set(_boost_test_libraries "") + +- add_library(boost_${name} ${ARGN}) +- add_library(Boost::${name} ALIAS boost_${name}) ++if (NOT BOOST_TEST_HEADERS_ONLY) + +- target_include_directories(boost_${name} PUBLIC include) +- target_link_libraries(boost_${name} PUBLIC ${_boost_test_dependencies}) ++ # Compiled targets + +- target_compile_definitions(boost_${name} +- PUBLIC BOOST_TEST_NO_LIB +- # Source files already define BOOST_TEST_SOURCE +- # PRIVATE BOOST_TEST_SOURCE +- ) ++ function(boost_test_add_library name) + +- if(BUILD_SHARED_LIBS) +- target_compile_definitions(boost_${name} PUBLIC BOOST_TEST_DYN_LINK) +- else() +- target_compile_definitions(boost_${name} PUBLIC BOOST_TEST_STATIC_LINK) +- endif() ++ add_library(boost_${name} ${ARGN}) ++ add_library(Boost::${name} ALIAS boost_${name}) + +-endfunction() ++ target_include_directories(boost_${name} PUBLIC include) ++ target_link_libraries(boost_${name} PUBLIC ${_boost_test_dependencies}) + +-boost_test_add_library(prg_exec_monitor +- src/cpp_main.cpp +- src/debug.cpp +- src/execution_monitor.cpp +-) ++ target_compile_definitions(boost_${name} ++ PUBLIC BOOST_TEST_NO_LIB ++ # Source files already define BOOST_TEST_SOURCE ++ # PRIVATE BOOST_TEST_SOURCE ++ ) + +-set(SOURCES +- src/compiler_log_formatter.cpp +- src/debug.cpp +- src/decorator.cpp +- src/execution_monitor.cpp +- src/framework.cpp +- src/junit_log_formatter.cpp +- src/plain_report_formatter.cpp +- src/progress_monitor.cpp +- src/results_collector.cpp +- src/results_reporter.cpp +- src/test_framework_init_observer.cpp +- src/test_tools.cpp +- src/test_tree.cpp +- src/unit_test_log.cpp +- src/unit_test_main.cpp +- src/unit_test_monitor.cpp +- src/unit_test_parameters.cpp +- src/xml_log_formatter.cpp +- src/xml_report_formatter.cpp +-) ++ if(BUILD_SHARED_LIBS) ++ target_compile_definitions(boost_${name} PUBLIC BOOST_TEST_DYN_LINK) ++ else() ++ target_compile_definitions(boost_${name} PUBLIC BOOST_TEST_STATIC_LINK) ++ endif() ++ ++ endfunction() + +-boost_test_add_library(test_exec_monitor STATIC ${SOURCES} src/test_main.cpp) +-boost_test_add_library(unit_test_framework ${SOURCES}) ++ boost_test_add_library(prg_exec_monitor ++ src/cpp_main.cpp ++ src/debug.cpp ++ src/execution_monitor.cpp ++ ) ++ ++ set(SOURCES ++ src/compiler_log_formatter.cpp ++ src/debug.cpp ++ src/decorator.cpp ++ src/execution_monitor.cpp ++ src/framework.cpp ++ src/junit_log_formatter.cpp ++ src/plain_report_formatter.cpp ++ src/progress_monitor.cpp ++ src/results_collector.cpp ++ src/results_reporter.cpp ++ src/test_framework_init_observer.cpp ++ src/test_tools.cpp ++ src/test_tree.cpp ++ src/unit_test_log.cpp ++ src/unit_test_main.cpp ++ src/unit_test_monitor.cpp ++ src/unit_test_parameters.cpp ++ src/xml_log_formatter.cpp ++ src/xml_report_formatter.cpp ++ ) ++ ++ boost_test_add_library(test_exec_monitor STATIC ${SOURCES} src/test_main.cpp) ++ boost_test_add_library(unit_test_framework ${SOURCES}) ++ ++ set(_boost_test_libraries boost_prg_exec_monitor boost_test_exec_monitor boost_unit_test_framework) ++ ++endif() + + # Header-only targets + +@@ -107,7 +117,7 @@ if(BOOST_SUPERPROJECT_VERSION AND NOT CMAKE_VERSION VERSION_LESS 3.13) + + boost_install( + TARGETS +- boost_prg_exec_monitor boost_test_exec_monitor boost_unit_test_framework ++ ${_boost_test_libraries} + boost_included_prg_exec_monitor boost_included_test_exec_monitor boost_included_unit_test_framework + VERSION ${BOOST_SUPERPROJECT_VERSION} + HEADER_DIRECTORY include diff --git a/depends/patches/expat/cmake_minimum.patch b/depends/patches/expat/cmake_minimum.patch new file mode 100644 index 00000000..a849a82a --- /dev/null +++ b/depends/patches/expat/cmake_minimum.patch @@ -0,0 +1,13 @@ +build: set minimum required CMake to 3.16 + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,7 +33,7 @@ + # Unlike most of Expat, + # this file is copyrighted under the BSD-license for buildsystem files of KDE. + +-cmake_minimum_required(VERSION 3.1.3) ++cmake_minimum_required(VERSION 3.16) + + # This allows controlling documented build time switches + # when Expat is pulled in using the add_subdirectory function, e.g. diff --git a/depends/patches/freetype/cmake_minimum.patch b/depends/patches/freetype/cmake_minimum.patch new file mode 100644 index 00000000..0a976f8a --- /dev/null +++ b/depends/patches/freetype/cmake_minimum.patch @@ -0,0 +1,13 @@ +build: set minimum required CMake to 3.12 + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -97,7 +97,7 @@ + # FreeType explicitly marks the API to be exported and relies on the compiler + # to hide all other symbols. CMake supports a C_VISBILITY_PRESET property + # starting with 2.8.12. +-cmake_minimum_required(VERSION 2.8.12) ++cmake_minimum_required(VERSION 3.12) + + if (NOT CMAKE_VERSION VERSION_LESS 3.3) + # Allow symbol visibility settings also on static libraries. CMake < 3.3 diff --git a/depends/patches/libevent/cmake_fixups.patch b/depends/patches/libevent/cmake_fixups.patch new file mode 100644 index 00000000..a8812afd --- /dev/null +++ b/depends/patches/libevent/cmake_fixups.patch @@ -0,0 +1,13 @@ +cmake: set minimum version to 3.5 + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,7 +19,7 @@ + # start libevent.sln + # + +-cmake_minimum_required(VERSION 3.1 FATAL_ERROR) ++cmake_minimum_required(VERSION 3.5 FATAL_ERROR) + + if (POLICY CMP0054) + cmake_policy(SET CMP0054 NEW) diff --git a/depends/patches/libevent/netbsd_fixup.patch b/depends/patches/libevent/netbsd_fixup.patch new file mode 100644 index 00000000..21d96aaf --- /dev/null +++ b/depends/patches/libevent/netbsd_fixup.patch @@ -0,0 +1,23 @@ +Improve portability on NetBSD + +According to GCC documentation, "the various `-std` options disable +certain keywords". +This change adheres to GCC's recommendation by replacing the `typeof` +keyword with its alternative, `__typeof__`. + +See https://github.com/libevent/libevent/commit/1759485e9a59147a47a674f5132fcfe764e7748c. + + +--- a/kqueue.c ++++ b/kqueue.c +@@ -52,8 +52,8 @@ + * intptr_t, whereas others define it as void*. There doesn't seem to be an + * easy way to tell them apart via autoconf, so we need to use OS macros. */ + #if defined(__NetBSD__) +-#define PTR_TO_UDATA(x) ((typeof(((struct kevent *)0)->udata))(x)) +-#define INT_TO_UDATA(x) ((typeof(((struct kevent *)0)->udata))(intptr_t)(x)) ++#define PTR_TO_UDATA(x) ((__typeof__(((struct kevent *)0)->udata))(x)) ++#define INT_TO_UDATA(x) ((__typeof__(((struct kevent *)0)->udata))(intptr_t)(x)) + #elif defined(EVENT__HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__) && !defined(__CloudABI__) + #define PTR_TO_UDATA(x) ((intptr_t)(x)) + #define INT_TO_UDATA(x) ((intptr_t)(x)) diff --git a/depends/patches/libevent/winver_fixup.patch b/depends/patches/libevent/winver_fixup.patch new file mode 100644 index 00000000..4995c356 --- /dev/null +++ b/depends/patches/libevent/winver_fixup.patch @@ -0,0 +1,122 @@ +Cherry-picked from a14ff91254f40cf36e0fee199e26fb11260fab49. + +move _WIN32_WINNT defintions before first #include + +_WIN32_WINNT and WIN32_LEAN_AND_MEAN need to be defined +before the windows.h is included for the first time. +Avoid the confusion of indirect #include by defining +before any. + +diff --git a/event_iocp.c b/event_iocp.c +index 6b2a2e15..4955e426 100644 +--- a/event_iocp.c ++++ b/event_iocp.c +@@ -23,12 +23,14 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +-#include "evconfig-private.h" + + #ifndef _WIN32_WINNT + /* Minimum required for InitializeCriticalSectionAndSpinCount */ + #define _WIN32_WINNT 0x0403 + #endif ++ ++#include "evconfig-private.h" ++ + #include + #include + #include +diff --git a/evthread_win32.c b/evthread_win32.c +index 2ec80560..8647f72b 100644 +--- a/evthread_win32.c ++++ b/evthread_win32.c +@@ -23,18 +23,21 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +-#include "event2/event-config.h" +-#include "evconfig-private.h" + + #ifdef _WIN32 + #ifndef _WIN32_WINNT + /* Minimum required for InitializeCriticalSectionAndSpinCount */ + #define _WIN32_WINNT 0x0403 + #endif +-#include + #define WIN32_LEAN_AND_MEAN ++#endif ++ ++#include "event2/event-config.h" ++#include "evconfig-private.h" ++ ++#ifdef _WIN32 ++#include + #include +-#undef WIN32_LEAN_AND_MEAN + #include + #endif + +diff --git a/evutil.c b/evutil.c +index 9817f086..8537ffe8 100644 +--- a/evutil.c ++++ b/evutil.c +@@ -24,6 +24,14 @@ + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#ifdef _WIN32 ++#ifndef _WIN32_WINNT ++/* For structs needed by GetAdaptersAddresses */ ++#define _WIN32_WINNT 0x0501 ++#endif ++#define WIN32_LEAN_AND_MEAN ++#endif ++ + #include "event2/event-config.h" + #include "evconfig-private.h" + +@@ -31,15 +39,10 @@ + #include + #include + #include +-#define WIN32_LEAN_AND_MEAN + #include +-#undef WIN32_LEAN_AND_MEAN + #include + #include + #include +-#undef _WIN32_WINNT +-/* For structs needed by GetAdaptersAddresses */ +-#define _WIN32_WINNT 0x0501 + #include + #include + #endif +diff --git a/listener.c b/listener.c +index f5c00c9c..d1080e76 100644 +--- a/listener.c ++++ b/listener.c +@@ -24,16 +24,19 @@ + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#ifdef _WIN32 ++#ifndef _WIN32_WINNT ++/* Minimum required for InitializeCriticalSectionAndSpinCount */ ++#define _WIN32_WINNT 0x0403 ++#endif ++#endif ++ + #include "event2/event-config.h" + #include "evconfig-private.h" + + #include + + #ifdef _WIN32 +-#ifndef _WIN32_WINNT +-/* Minimum required for InitializeCriticalSectionAndSpinCount */ +-#define _WIN32_WINNT 0x0403 +-#endif + #include + #include + #include diff --git a/depends/patches/miniupnpc/dont_leak_info.patch b/depends/patches/miniupnpc/dont_leak_info.patch deleted file mode 100644 index 512f9c50..00000000 --- a/depends/patches/miniupnpc/dont_leak_info.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit 8815452257437ba36607d0e2381c01142d1c7bb0 -Author: fanquake -Date: Thu Nov 19 10:51:19 2020 +0800 - - Don't leak OS and miniupnpc version info in User-Agent - -diff --git a//minisoap.c b/minisoap.c -index 7860667..775580b 100644 ---- a/minisoap.c -+++ b/minisoap.c -@@ -90,7 +90,7 @@ int soapPostSubmit(SOCKET fd, - headerssize = snprintf(headerbuf, sizeof(headerbuf), - "POST %s HTTP/%s\r\n" - "Host: %s%s\r\n" -- "User-Agent: " OS_STRING ", " UPNP_VERSION_STRING ", MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n" -+ "User-Agent: " UPNP_VERSION_STRING "\r\n" - "Content-Length: %d\r\n" - "Content-Type: text/xml\r\n" - "SOAPAction: \"%s\"\r\n" -diff --git a/miniwget.c b/miniwget.c -index d5b7970..05aeb9c 100644 ---- a/miniwget.c -+++ b/miniwget.c -@@ -444,7 +444,7 @@ miniwget3(const char * host, - "GET %s HTTP/%s\r\n" - "Host: %s:%d\r\n" - "Connection: Close\r\n" -- "User-Agent: " OS_STRING ", " UPNP_VERSION_STRING ", MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n" -+ "User-Agent: " UPNP_VERSION_STRING "\r\n" - - "\r\n", - path, httpversion, host, port); diff --git a/depends/patches/miniupnpc/respect_mingw_cflags.patch b/depends/patches/miniupnpc/respect_mingw_cflags.patch deleted file mode 100644 index a44580dd..00000000 --- a/depends/patches/miniupnpc/respect_mingw_cflags.patch +++ /dev/null @@ -1,23 +0,0 @@ -commit fec515a7ac9991a0ee91068fda046b54b191155e -Author: fanquake -Date: Wed Jul 27 15:52:37 2022 +0100 - - build: respect CFLAGS in makefile.mingw - - Similar to the other Makefile. - - Cherry-pick of https://github.com/miniupnp/miniupnp/pull/619. - -diff --git a/Makefile.mingw b/Makefile.mingw -index 2bff7bd..88430d2 100644 ---- a/Makefile.mingw -+++ b/Makefile.mingw -@@ -19,7 +19,7 @@ else - RM = rm -f - endif - #CFLAGS = -Wall -g -DDEBUG -D_WIN32_WINNT=0X501 --CFLAGS = -Wall -W -Wstrict-prototypes -Os -DNDEBUG -D_WIN32_WINNT=0X501 -+CFLAGS ?= -Wall -W -Wstrict-prototypes -Os -DNDEBUG -D_WIN32_WINNT=0X501 - LDLIBS = -lws2_32 -liphlpapi - # -lwsock32 - # -liphlpapi is needed for GetBestRoute() and GetIpAddrTable() diff --git a/depends/patches/native_libtapi/disable_zlib.patch b/depends/patches/native_libtapi/disable_zlib.patch deleted file mode 100644 index 6c769121..00000000 --- a/depends/patches/native_libtapi/disable_zlib.patch +++ /dev/null @@ -1,17 +0,0 @@ -build: disable zlib - -This isn't needed, and causes issues when clang-tblgen -is built, but trys to reach for a system libz.so. - -diff --git a/build.sh b/build.sh -index e25d2f732..ec8422621 100755 ---- a/build.sh -+++ b/build.sh -@@ -66,6 +66,7 @@ cmake ../src/llvm \ - -DCMAKE_INSTALL_PREFIX=$INSTALLPREFIX \ - -DTAPI_REPOSITORY_STRING=$TAPI_VERSION \ - -DTAPI_FULL_VERSION=$TAPI_VERSION \ -+ -DLLVM_ENABLE_ZLIB=OFF \ - $CMAKE_EXTRA_ARGS - - echo "" diff --git a/depends/patches/qrencode/cmake_fixups.patch b/depends/patches/qrencode/cmake_fixups.patch new file mode 100644 index 00000000..7518d756 --- /dev/null +++ b/depends/patches/qrencode/cmake_fixups.patch @@ -0,0 +1,23 @@ +cmake: set minimum version to 3.5 + +Correct some dev warning output. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 773e037..a558145 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.1.0) ++cmake_minimum_required(VERSION 3.5) + + project(QRencode VERSION 4.1.1 LANGUAGES C) + +@@ -20,7 +20,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + set(CMAKE_THREAD_PREFER_PTHREAD ON) + find_package(Threads) + find_package(PNG) +-find_package(Iconv) ++find_package(ICONV) + + if(CMAKE_USE_PTHREADS_INIT) + add_definitions(-DHAVE_LIBPTHREAD=1) diff --git a/depends/patches/qt/dont_hardcode_pwd.patch b/depends/patches/qt/dont_hardcode_pwd.patch index a74e9cb0..217b6bec 100644 --- a/depends/patches/qt/dont_hardcode_pwd.patch +++ b/depends/patches/qt/dont_hardcode_pwd.patch @@ -1,27 +1,51 @@ -commit 0e953866fc4672486e29e1ba6d83b4207e7b2f0b -Author: fanquake -Date: Tue Aug 18 15:09:06 2020 +0800 +Do not assume FHS in scripts - Don't hardcode pwd path +On systems that do not follow the Filesystem Hierarchy Standard, such as +guix, the hardcoded `/bin/pwd` will fail to be found so that the script +will fail. - Let a man use his builtins if he wants to! Also, removes the unnecessary - assumption that pwd lives under /bin/pwd. +Use `pwd`, instead, so that the command can be found through the normal +path search mechanism. - See #15581. +See https://github.com/qt/qtbase/commit/3388de698bfb9bbc456c08f03e83bf3e749df35c. diff --git a/qtbase/configure b/qtbase/configure index 08b49a8d..faea5b55 100755 --- a/qtbase/configure +++ b/qtbase/configure -@@ -36,9 +36,9 @@ - relconf=`basename $0` +@@ -9,9 +9,9 @@ + # the directory of this script is the "source tree" - relpath=`dirname $0` + relpath=`dirname "$0"` -relpath=`(cd "$relpath"; /bin/pwd)` +relpath=`(cd "$relpath"; pwd)` # the current directory is the "build tree" or "object tree" -outpath=`/bin/pwd` +outpath=`pwd` + outpathPrefix=$outpath + + # do this early so we don't store it in config.status - WHICH="which" +--- a/qtbase/bin/qt-cmake.in ++++ b/qtbase/bin/qt-cmake.in +@@ -2,7 +2,7 @@ + + # The directory of this script is the expanded absolute path of the "$qt_prefix/bin" directory. + script_dir_path=`dirname $0` +-script_dir_path=`(cd "$script_dir_path"; /bin/pwd)` ++script_dir_path=`(cd "$script_dir_path"; pwd)` + + # Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH. + original_cmake_path="@CMAKE_COMMAND@" +--- a/qtbase/bin/qt-configure-module.in ++++ b/qtbase/bin/qt-configure-module.in +@@ -2,7 +2,7 @@ + set -eu + + script_dir_path=`dirname $0` +-script_dir_path=`(cd "$script_dir_path"; /bin/pwd)` ++script_dir_path=`(cd "$script_dir_path"; pwd)` + + printUsage() + { diff --git a/depends/patches/qt/duplicate_lcqpafonts.patch b/depends/patches/qt/duplicate_lcqpafonts.patch deleted file mode 100644 index c460b51d..00000000 --- a/depends/patches/qt/duplicate_lcqpafonts.patch +++ /dev/null @@ -1,104 +0,0 @@ -QtGui: Fix duplication of logging category lcQpaFonts - -Move it to qplatformfontdatabase.h. - -Upstream commit: - - Qt 6.0: ab01885e48873fb2ad71841a3f1627fe4d9cd835 - ---- a/qtbase/src/gui/text/qplatformfontdatabase.cpp -+++ b/qtbase/src/gui/text/qplatformfontdatabase.cpp -@@ -52,6 +52,8 @@ - - QT_BEGIN_NAMESPACE - -+Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") -+ - void qt_registerFont(const QString &familyname, const QString &stylename, - const QString &foundryname, int weight, - QFont::Style style, int stretch, bool antialiased, - ---- a/qtbase/src/gui/text/qplatformfontdatabase.h -+++ b/qtbase/src/gui/text/qplatformfontdatabase.h -@@ -50,6 +50,7 @@ - // - - #include -+#include - #include - #include - #include -@@ -62,6 +63,7 @@ - - QT_BEGIN_NAMESPACE - -+Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) - - class QWritingSystemsPrivate; - - ---- a/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm -+++ b/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm -@@ -86,8 +86,6 @@ - - QT_BEGIN_NAMESPACE - --Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") -- - static float SYNTHETIC_ITALIC_SKEW = std::tan(14.f * std::acos(0.f) / 90.f); - - bool QCoreTextFontEngine::ct_getSfntTable(void *user_data, uint tag, uchar *buffer, uint *length) - ---- a/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h -+++ b/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h -@@ -64,8 +64,6 @@ - - QT_BEGIN_NAMESPACE - --Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) -- - class QCoreTextFontEngine : public QFontEngine - { - Q_GADGET - ---- a/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp -+++ b/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp -@@ -68,8 +68,6 @@ - - QT_BEGIN_NAMESPACE - --Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") -- - #ifndef QT_NO_DIRECTWRITE - // ### fixme: Consider direct linking of dwrite.dll once Windows Vista pre SP2 is dropped (QTBUG-49711) - - ---- a/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h -+++ b/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h -@@ -63,8 +63,6 @@ - - QT_BEGIN_NAMESPACE - --Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) -- - class QWindowsFontEngineData - { - Q_DISABLE_COPY_MOVE(QWindowsFontEngineData) - ---- a/qtbase/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp -+++ b/qtbase/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp -@@ -40,6 +40,7 @@ - #include "qgenericunixthemes_p.h" - - #include "qpa/qplatformtheme_p.h" -+#include "qpa/qplatformfontdatabase.h" - - #include - #include -@@ -76,7 +77,6 @@ - QT_BEGIN_NAMESPACE - - Q_DECLARE_LOGGING_CATEGORY(qLcTray) --Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") - - ResourceHelper::ResourceHelper() - { diff --git a/depends/patches/qt/fast_fixed_dtoa_no_optimize.patch b/depends/patches/qt/fast_fixed_dtoa_no_optimize.patch deleted file mode 100644 index d4d6539f..00000000 --- a/depends/patches/qt/fast_fixed_dtoa_no_optimize.patch +++ /dev/null @@ -1,20 +0,0 @@ -Modify the optimisation flags for FastFixedDtoa. -This fixes a non-determinism issue in the asm produced for -this function when cross-compiling on x86_64 and aarch64 for -the arm-linux-gnueabihf HOST. - ---- a/qtbase/src/3rdparty/double-conversion/fixed-dtoa.h -+++ b/qtbase/src/3rdparty/double-conversion/fixed-dtoa.h -@@ -48,9 +48,12 @@ namespace double_conversion { - // - // This method only works for some parameters. If it can't handle the input it - // returns false. The output is null-terminated when the function succeeds. -+#pragma GCC push_options -+#pragma GCC optimize ("-O1") - bool FastFixedDtoa(double v, int fractional_count, - Vector buffer, int* length, int* decimal_point); - -+#pragma GCC pop_options - } // namespace double_conversion - - #endif // DOUBLE_CONVERSION_FIXED_DTOA_H_ diff --git a/depends/patches/qt/fix-macos-linker.patch b/depends/patches/qt/fix-macos-linker.patch deleted file mode 100644 index e4396856..00000000 --- a/depends/patches/qt/fix-macos-linker.patch +++ /dev/null @@ -1,55 +0,0 @@ -qmake: Don't error out if QMAKE_DEFAULT_LIBDIRS is empty on macOS - -The new linker in Xcode 15 doesn't provide any default linker or -framework paths when requested via -v, but still seems to use the -default paths documented in the ld man page. - -We trust that linker will do the right thing, even if we don't -know of its default linker paths. - -We also need to opt out of the default fallback logic to -set the libdirs to /lib and /usr/lib. - -This may result in UnixMakefileGenerator::findLibraries finding -different libraries than expected, if additional paths are -passed with -L, which will then take precedence for qmake, -even if the linker itself will use the library from the -SDK's default paths. This should hopefully not be an issue -in practice, as we don't turn -lFoo into absolute paths in -qmake, so the only risk is that we're picking up the wrong -prl files and adding additional dependencies that the lib -in the SDK doesn't have. - -Upstream commits: - - Qt 5.15.16: Not yet publicly available. - - Qt dev: cdf64b0e47115cc473e1afd1472b4b09e130b2a5 - -For other Qt branches see -https://codereview.qt-project.org/q/I2347b26e2df0828471373b0e15b8c9089274c65d - ---- old/qtbase/mkspecs/features/toolchain.prf -+++ new/qtbase/mkspecs/features/toolchain.prf -@@ -288,9 +288,12 @@ isEmpty($${target_prefix}.INCDIRS) { - } - } - } -- isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS): \ -+ isEmpty(QMAKE_DEFAULT_INCDIRS): \ - !integrity: \ -- error("failed to parse default search paths from compiler output") -+ error("failed to parse default include paths from compiler output") -+ isEmpty(QMAKE_DEFAULT_LIBDIRS): \ -+ !integrity:!darwin: \ -+ error("failed to parse default library paths from compiler output") - QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS) - } else: ghs { - cmd = $$QMAKE_CXX $$QMAKE_CXXFLAGS -$${LITERAL_HASH} -o /tmp/fake_output /tmp/fake_input.cpp -@@ -412,7 +415,7 @@ isEmpty($${target_prefix}.INCDIRS) { - QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP) - } - -- unix:if(!cross_compile|host_build) { -+ unix:!darwin:if(!cross_compile|host_build) { - isEmpty(QMAKE_DEFAULT_INCDIRS): QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include - isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib - } diff --git a/depends/patches/qt/fix_android_jni_static.patch b/depends/patches/qt/fix_android_jni_static.patch deleted file mode 100644 index 7dbd68fe..00000000 --- a/depends/patches/qt/fix_android_jni_static.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- old/qtbase/src/plugins/platforms/android/androidjnimain.cpp -+++ new/qtbase/src/plugins/platforms/android/androidjnimain.cpp -@@ -980,6 +980,14 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/) - __android_log_print(ANDROID_LOG_FATAL, "Qt", "registerNatives failed"); - return -1; - } -+ -+ const jint ret = QT_PREPEND_NAMESPACE(QtAndroidPrivate::initJNI(vm, env)); -+ if (ret != 0) -+ { -+ __android_log_print(ANDROID_LOG_FATAL, "Qt", "initJNI failed"); -+ return ret; -+ } -+ - QWindowSystemInterfacePrivate::TabletEvent::setPlatformSynthesizesMouse(false); - - m_javaVM = vm; - diff --git a/depends/patches/qt/fix_qt_pkgconfig.patch b/depends/patches/qt/fix_qt_pkgconfig.patch deleted file mode 100644 index 73f4d89f..00000000 --- a/depends/patches/qt/fix_qt_pkgconfig.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- old/qtbase/mkspecs/features/qt_module.prf -+++ new/qtbase/mkspecs/features/qt_module.prf -@@ -269,7 +269,7 @@ load(qt_installs) - load(qt_targets) - - # this builds on top of qt_common --!internal_module:if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) { -+if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) { - CONFIG += create_pc - QMAKE_PKGCONFIG_DESTDIR = pkgconfig - host_build: \ diff --git a/depends/patches/qt/guix_cross_lib_path.patch b/depends/patches/qt/guix_cross_lib_path.patch deleted file mode 100644 index 7911dc21..00000000 --- a/depends/patches/qt/guix_cross_lib_path.patch +++ /dev/null @@ -1,17 +0,0 @@ -Facilitate guix building with CROSS_LIBRARY_PATH - -See discussion in https://github.com/bitcoin/bitcoin/pull/15277. - ---- a/qtbase/mkspecs/features/toolchain.prf -+++ b/qtbase/mkspecs/features/toolchain.prf -@@ -236,8 +236,8 @@ isEmpty($${target_prefix}.INCDIRS) { - add_libraries = false - for (line, output) { - line ~= s/^[ \\t]*// # remove leading spaces -- contains(line, "LIBRARY_PATH=.*") { -- line ~= s/^LIBRARY_PATH=// # remove leading LIBRARY_PATH= -+ contains(line, "(CROSS_)?LIBRARY_PATH=.*") { -+ line ~= s/^(CROSS_)?LIBRARY_PATH=// # remove leading (CROSS_)?LIBRARY_PATH= - equals(QMAKE_HOST.os, Windows): \ - paths = $$split(line, ;) - else: \ diff --git a/depends/patches/qt/mac-qmake.conf b/depends/patches/qt/mac-qmake.conf deleted file mode 100644 index cb94bf07..00000000 --- a/depends/patches/qt/mac-qmake.conf +++ /dev/null @@ -1,22 +0,0 @@ -MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental lib_version_first absolute_library_soname -QMAKE_INCREMENTAL_STYLE = sublib -include(../common/macx.conf) -include(../common/gcc-base-mac.conf) -include(../common/clang.conf) -include(../common/clang-mac.conf) -QMAKE_MAC_SDK_PATH=$${MAC_SDK_PATH} -QMAKE_XCODE_VERSION = $${XCODE_VERSION} -QMAKE_XCODE_DEVELOPER_PATH=/Developer -QMAKE_MAC_SDK=macosx -QMAKE_MAC_SDK.macosx.Path = $${MAC_SDK_PATH} -QMAKE_MAC_SDK.macosx.platform_name = macosx -QMAKE_MAC_SDK.macosx.SDKVersion = $${MAC_SDK_VERSION} -QMAKE_MAC_SDK.macosx.PlatformPath = /phony -!host_build: QMAKE_CFLAGS += -target $${MAC_TARGET} -!host_build: QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS -!host_build: QMAKE_CXXFLAGS += -target $${MAC_TARGET} -!host_build: QMAKE_LFLAGS += -target $${MAC_TARGET} -QMAKE_AR = $${CROSS_COMPILE}ar cq -QMAKE_RANLIB=$${CROSS_COMPILE}ranlib -load(qt_config) diff --git a/depends/patches/qt/memory_resource.patch b/depends/patches/qt/memory_resource.patch index 650c3285..14e25121 100644 --- a/depends/patches/qt/memory_resource.patch +++ b/depends/patches/qt/memory_resource.patch @@ -14,36 +14,3 @@ and https://bugreports.qt.io/browse/QTBUG-114316 # include # include #else - ---- a/qtbase/src/corelib/global/qcompilerdetection.h -+++ b/qtbase/src/corelib/global/qcompilerdetection.h -@@ -1050,16 +1050,22 @@ - # endif // !_HAS_CONSTEXPR - # endif // !__GLIBCXX__ && !_LIBCPP_VERSION - # endif // Q_OS_QNX --# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \ -- && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) -+# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) -+# if defined(__GNUC_LIBSTD__) && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) - // Apple has not updated libstdc++ since 2007, which means it does not have - // or std::move. Let's disable these features --# undef Q_COMPILER_INITIALIZER_LISTS --# undef Q_COMPILER_RVALUE_REFS --# undef Q_COMPILER_REF_QUALIFIERS -+# undef Q_COMPILER_INITIALIZER_LISTS -+# undef Q_COMPILER_RVALUE_REFS -+# undef Q_COMPILER_REF_QUALIFIERS - // Also disable , since it's clearly not there --# undef Q_COMPILER_ATOMICS --# endif -+# undef Q_COMPILER_ATOMICS -+# endif -+# if defined(__cpp_lib_memory_resource) \ -+ && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 140000) \ -+ || (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 170000)) -+# undef __cpp_lib_memory_resource // Only supported on macOS 14 and iOS 17 -+# endif -+# endif // (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) - # if defined(Q_CC_CLANG) && defined(Q_CC_INTEL) && Q_CC_INTEL >= 1500 - // ICC 15.x and 16.0 have their own implementation of std::atomic, which is activated when in Clang mode - // (probably because libc++'s on OS X failed to compile), but they're missing some diff --git a/depends/patches/qt/no-xlib.patch b/depends/patches/qt/no-xlib.patch deleted file mode 100644 index 0f7965d2..00000000 --- a/depends/patches/qt/no-xlib.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 9563cef873ae82e06f60708d706d054717e801ce Mon Sep 17 00:00:00 2001 -From: Carl Dong -Date: Thu, 18 Jul 2019 17:22:05 -0400 -Subject: [PATCH] Wrap xlib related code blocks in #if's - -They are not necessary to compile QT. - ---- a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp -+++ b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp -@@ -49,7 +49,9 @@ - #include - #include - #include -+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) - #include -+#endif - #include - #include - -@@ -391,6 +393,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *window) - xcb_flush(xcb_connection()); - } - -+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) - static int cursorIdForShape(int cshape) - { - int cursorId = 0; -@@ -444,6 +447,7 @@ static int cursorIdForShape(int cshape) - } - return cursorId; - } -+#endif - - xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape) - { -@@ -558,7 +562,9 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape) - xcb_cursor_t QXcbCursor::createFontCursor(int cshape) - { - xcb_connection_t *conn = xcb_connection(); -+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) - int cursorId = cursorIdForShape(cshape); -+#endif - xcb_cursor_t cursor = XCB_NONE; - - #if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) -@@ -590,6 +596,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) - // Non-standard X11 cursors are created from bitmaps - cursor = createNonStandardCursor(cshape); - -+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) - // Create a glpyh cursor if everything else failed - if (!cursor && cursorId) { - cursor = xcb_generate_id(conn); -@@ -597,6 +604,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) - cursorId, cursorId + 1, - 0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0); - } -+#endif - - if (cursor && cshape >= 0 && cshape < Qt::LastCursor && connection()->hasXFixes()) { - const char *name = cursorNames[cshape].front(); diff --git a/depends/patches/qt/qt.pro b/depends/patches/qt/qt.pro deleted file mode 100644 index 8f2e900a..00000000 --- a/depends/patches/qt/qt.pro +++ /dev/null @@ -1,16 +0,0 @@ -# Create the super cache so modules will add themselves to it. -cache(, super) - -!QTDIR_build: cache(CONFIG, add, $$list(QTDIR_build)) - -prl = no_install_prl -CONFIG += $$prl -cache(CONFIG, add stash, prl) - -TEMPLATE = subdirs -SUBDIRS = qtbase qttools qttranslations - -qttools.depends = qtbase -qttranslations.depends = qttools - -load(qt_configure) diff --git a/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch b/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch index f0c14a94..e5e7b126 100644 --- a/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch +++ b/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch @@ -7,7 +7,7 @@ Upstream report: https://bugreports.qt.io/browse/QTBUG-83160 diff --git a/qtbase/src/tools/moc/main.cpp b/qtbase/src/tools/moc/main.cpp --- a/qtbase/src/tools/moc/main.cpp +++ b/qtbase/src/tools/moc/main.cpp -@@ -238,6 +238,7 @@ int runMoc(int argc, char **argv) +@@ -186,6 +186,7 @@ int runMoc(int argc, char **argv) dummyVariadicFunctionMacro.arguments += Symbol(0, PP_IDENTIFIER, "__VA_ARGS__"); pp.macros["__attribute__"] = dummyVariadicFunctionMacro; pp.macros["__declspec"] = dummyVariadicFunctionMacro; diff --git a/depends/patches/qt/qtbase_avoid_native_float16.patch b/depends/patches/qt/qtbase_avoid_native_float16.patch new file mode 100644 index 00000000..ec03d140 --- /dev/null +++ b/depends/patches/qt/qtbase_avoid_native_float16.patch @@ -0,0 +1,37 @@ +Avoid using native float16 types in Qt's qfloat16 + +Using native float16 types may introduce compatibility issues +in release binaries for Linux platforms. + +See: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e42d2d2a20f2bb59928bc895ec9f46503a1b5c73 + +This patch can be dropped once the minimum required libgcc version +is updated to 12.x or newer. + + +--- a/qtbase/src/corelib/global/qtypes.h ++++ b/qtbase/src/corelib/global/qtypes.h +@@ -258,23 +258,8 @@ using qsizetype = QIntegerForSizeof::Signed; + + // Define a native float16 type + namespace QtPrivate { +-#if defined(__STDCPP_FLOAT16_T__) +-# define QFLOAT16_IS_NATIVE 1 +-using NativeFloat16Type = std::float16_t; +-#elif defined(Q_CC_CLANG) && defined(__FLT16_MAX__) && 0 +-// disabled due to https://github.com/llvm/llvm-project/issues/56963 +-# define QFLOAT16_IS_NATIVE 1 +-using NativeFloat16Type = decltype(__FLT16_MAX__); +-#elif defined(Q_CC_GNU_ONLY) && defined(__FLT16_MAX__) && defined(__ARM_FP16_FORMAT_IEEE) +-# define QFLOAT16_IS_NATIVE 1 +-using NativeFloat16Type = __fp16; +-#elif defined(Q_CC_GNU_ONLY) && defined(__FLT16_MAX__) && defined(__SSE2__) +-# define QFLOAT16_IS_NATIVE 1 +-using NativeFloat16Type = _Float16; +-#else + # define QFLOAT16_IS_NATIVE 0 + using NativeFloat16Type = void; +-#endif + } // QtPrivate + + #endif // __cplusplus diff --git a/depends/patches/qt/qtbase_avoid_qmain.patch b/depends/patches/qt/qtbase_avoid_qmain.patch new file mode 100644 index 00000000..45a54fe8 --- /dev/null +++ b/depends/patches/qt/qtbase_avoid_qmain.patch @@ -0,0 +1,21 @@ +Avoid defining QT_NEEDS_QMAIN macro + +Qt's QT_NEEDS_QMAIN macro renames our main() function to qMain(), +which breaks our assumptions regarding exported symbols. In particular, +the CONTROL_FLOW security check fails for Windows builds in Guix. + +The QT_NEEDS_QMAIN macro is required for linking to the Qt DLLs only, +so we can safely disable it. + + +--- a/qtbase/src/entrypoint/CMakeLists.txt ++++ b/qtbase/src/entrypoint/CMakeLists.txt +@@ -104,8 +104,6 @@ if(WIN32) + APPEND PROPERTY INTERFACE_QT_MODULE_LDFLAGS "-lmingw32" + ) + +- target_compile_definitions(EntryPointPrivate INTERFACE QT_NEEDS_QMAIN) +- qt_internal_extend_target(EntryPointImplementation DEFINES QT_NEEDS_QMAIN) + endif() + + qt_internal_add_sync_header_dependencies(EntryPointImplementation Core) diff --git a/depends/patches/qt/qtbase_platformsupport.patch b/depends/patches/qt/qtbase_platformsupport.patch new file mode 100644 index 00000000..45ccaea5 --- /dev/null +++ b/depends/patches/qt/qtbase_platformsupport.patch @@ -0,0 +1,34 @@ +CMake: Prevent creation of empty InputSupportPrivate module + +The combination of + -no-feature-evdev + -no-feature-tslib + -no-feature-libinput +led to the creation of the InputSupportPrivate module without source +files. + +This triggered CMake upstream issue 23464 when using CMake < 3.25. + +Fix this by adjusting the inexact condition that decides whether to +build InputSupportPrivate. + + +See: https://codereview.qt-project.org/c/qt/qtbase/+/633612 + + +--- a/qtbase/src/platformsupport/CMakeLists.txt ++++ b/qtbase/src/platformsupport/CMakeLists.txt +@@ -3,7 +3,12 @@ + + add_subdirectory(devicediscovery) + add_subdirectory(fbconvenience) +-if(QT_FEATURE_evdev OR QT_FEATURE_integrityhid OR QT_FEATURE_libinput OR QT_FEATURE_tslib OR QT_FEATURE_xkbcommon) ++if(QT_FEATURE_evdev ++ OR QT_FEATURE_vxworksevdev ++ OR QT_FEATURE_integrityhid ++ OR QT_FEATURE_libinput ++ OR QT_FEATURE_tslib ++ OR (QT_FEATURE_libinput AND QT_FEATURE_xkbcommon)) + add_subdirectory(input) + endif() + if(QT_FEATURE_kms) diff --git a/depends/patches/qt/qtbase_plugins_cocoa.patch b/depends/patches/qt/qtbase_plugins_cocoa.patch new file mode 100644 index 00000000..118a72d6 --- /dev/null +++ b/depends/patches/qt/qtbase_plugins_cocoa.patch @@ -0,0 +1,21 @@ +CMake: Fix macOS -no-feature-sessionmanager build with CMake < 3.25 + +Work around CMake issue 23464. + + +See: https://codereview.qt-project.org/c/qt/qtbase/+/634002 + + +--- a/qtbase/src/plugins/platforms/cocoa/CMakeLists.txt ++++ b/qtbase/src/plugins/platforms/cocoa/CMakeLists.txt +@@ -102,3 +102,10 @@ qt_internal_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_sessionma + SOURCES + qcocoasessionmanager.cpp qcocoasessionmanager.h + ) ++ ++# Work around CMake issue 23464 ++if(CMAKE_VERSION VERSION_LESS "3.25" AND NOT QT_FEATURE_sessionmanager) ++ set_target_properties(QCocoaIntegrationPlugin PROPERTIES ++ DISABLE_PRECOMPILE_HEADERS ON ++ ) ++endif() diff --git a/depends/patches/qt/qtbase_skip_tools.patch b/depends/patches/qt/qtbase_skip_tools.patch new file mode 100644 index 00000000..bbd87e86 --- /dev/null +++ b/depends/patches/qt/qtbase_skip_tools.patch @@ -0,0 +1,61 @@ +Skip building/installing unneeded tools: + +1. Wrapper CMake scripts. +2. CI support files. +3. tracepointgen and tracegen tools. +4. Qt Look Ahead LR Parser Generator (qlalr). +5. Qt Vulkan Header Generator (qvkgen). + + +--- a/qtbase/cmake/QtBaseGlobalTargets.cmake ++++ b/qtbase/cmake/QtBaseGlobalTargets.cmake +@@ -118,9 +118,6 @@ qt_generate_global_module_pri_file() + qt_generate_global_device_pri_file() + qt_generate_qmake_and_qtpaths_wrapper_for_target() + +-# Depends on the global features being evaluated. +-qt_internal_create_wrapper_scripts() +- + add_library(Qt::GlobalConfig ALIAS GlobalConfig) + + add_library(GlobalConfigPrivate INTERFACE) + +--- a/qtbase/cmake/QtBaseGlobalTargets.cmake ++++ b/qtbase/cmake/QtBaseGlobalTargets.cmake +@@ -349,12 +349,3 @@ elseif(WASM) + qt_install(PROGRAMS "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}/qt-wasmtestrunner.py" + DESTINATION "${INSTALL_LIBEXECDIR}") + endif() +- +-# Install CI support files to libexec. +-qt_path_join(__qt_libexec_install_dir "${QT_INSTALL_DIR}" "${INSTALL_LIBEXECDIR}") +-qt_copy_or_install(FILES coin/instructions/qmake/ensure_pro_file.cmake +- DESTINATION "${__qt_libexec_install_dir}") +-qt_copy_or_install(PROGRAMS "util/testrunner/qt-testrunner.py" +- DESTINATION "${__qt_libexec_install_dir}") +-qt_copy_or_install(PROGRAMS "util/testrunner/sanitizer-testrunner.py" +- DESTINATION "${__qt_libexec_install_dir}") + + +--- a/qtbase/src/CMakeLists.txt ++++ b/qtbase/src/CMakeLists.txt +@@ -21,8 +21,6 @@ function(find_or_build_bootstrap_names) + endif() + add_subdirectory(tools/moc) + add_subdirectory(tools/rcc) +- add_subdirectory(tools/tracepointgen) +- add_subdirectory(tools/tracegen) + add_subdirectory(tools/cmake_automoc_parser) + endfunction() + +--- a/qtbase/src/tools/CMakeLists.txt ++++ b/qtbase/src/tools/CMakeLists.txt +@@ -11,8 +11,6 @@ if (QT_FEATURE_dbus) + add_subdirectory(qdbuscpp2xml) + add_subdirectory(qdbusxml2cpp) + endif() +-add_subdirectory(qlalr) +-add_subdirectory(qvkgen) + if (QT_FEATURE_commandlineparser) + add_subdirectory(qtpaths) + endif() diff --git a/depends/patches/qt/qttools_skip_dependencies.patch b/depends/patches/qt/qttools_skip_dependencies.patch new file mode 100644 index 00000000..09f66f44 --- /dev/null +++ b/depends/patches/qt/qttools_skip_dependencies.patch @@ -0,0 +1,36 @@ +QtTools: Skip unnecessary dependencies: + +1. The LLVM installatiion. +2. Build only required tools. + + +--- a/qttools/configure.cmake ++++ b/qttools/configure.cmake +@@ -17,7 +17,7 @@ + # Presumably because 6.0 ClangConfig.cmake files are not good enough? + # In any case explicitly request a minimum version of 8.x for now, otherwise + # building with CMake will fail at compilation time. +-qt_find_package(WrapLibClang 8 PROVIDED_TARGETS WrapLibClang::WrapLibClang) ++#qt_find_package(WrapLibClang 8 PROVIDED_TARGETS WrapLibClang::WrapLibClang) + # special case end + + if(TARGET WrapLibClang::WrapLibClang) + +--- a/qttools/src/linguist/CMakeLists.txt ++++ b/qttools/src/linguist/CMakeLists.txt +@@ -9,15 +9,8 @@ if(NOT QT_FEATURE_linguist) + return() + endif() + add_subdirectory(lconvert) +-add_subdirectory(lprodump) + add_subdirectory(lrelease) +-add_subdirectory(lrelease-pro) + add_subdirectory(lupdate) +-add_subdirectory(lupdate-pro) +-if(QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton +- AND QT_FEATURE_png AND QT_FEATURE_printsupport AND TARGET Qt::Widgets) +- add_subdirectory(linguist) +-endif() + + # Create a fake module that would emulate the Qt5::LinguistTools CMake Config package + qt_internal_add_module(Linguist diff --git a/depends/patches/qt/qttools_src.pro b/depends/patches/qt/qttools_src.pro deleted file mode 100644 index 6ef71a09..00000000 --- a/depends/patches/qt/qttools_src.pro +++ /dev/null @@ -1,6 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS = linguist - -fb = force_bootstrap -CONFIG += $$fb -cache(CONFIG, add, fb) diff --git a/depends/patches/qt/rcc_hardcode_timestamp.patch b/depends/patches/qt/rcc_hardcode_timestamp.patch index 03f38979..e72f4bd0 100644 --- a/depends/patches/qt/rcc_hardcode_timestamp.patch +++ b/depends/patches/qt/rcc_hardcode_timestamp.patch @@ -6,11 +6,11 @@ the SOURCE_DATE_EPOCH variable set, e.g., for Guix builds. --- old/qtbase/src/tools/rcc/rcc.cpp +++ new/qtbase/src/tools/rcc/rcc.cpp -@@ -227,14 +227,7 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib) +@@ -201,14 +201,7 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib) if (lib.formatVersion() >= 2) { // last modified time stamp -- const QDateTime lastModified = m_fileInfo.lastModified(); +- const QDateTime lastModified = m_fileInfo.lastModified(QTimeZone::UTC); - quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0); - static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong(); - if (sourceDate != 0) diff --git a/depends/patches/qt/use_android_ndk23.patch b/depends/patches/qt/use_android_ndk23.patch deleted file mode 100644 index f22367d5..00000000 --- a/depends/patches/qt/use_android_ndk23.patch +++ /dev/null @@ -1,13 +0,0 @@ -Use Android NDK r23 LTS - ---- old/qtbase/mkspecs/features/android/default_pre.prf -+++ new/qtbase/mkspecs/features/android/default_pre.prf -@@ -76,7 +76,7 @@ else: equals(QT_ARCH, x86_64): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/x86_64-linux- - else: equals(QT_ARCH, arm64-v8a): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/aarch64-linux-android- - else: CROSS_COMPILE = $$NDK_LLVM_PATH/bin/arm-linux-androideabi- - --QMAKE_RANLIB = $${CROSS_COMPILE}ranlib -+QMAKE_RANLIB = $$NDK_LLVM_PATH/bin/llvm-ranlib - QMAKE_LINK_SHLIB = $$QMAKE_LINK - QMAKE_LFLAGS = - diff --git a/depends/patches/qt/windows_lto.patch b/depends/patches/qt/windows_lto.patch deleted file mode 100644 index ea379a60..00000000 --- a/depends/patches/qt/windows_lto.patch +++ /dev/null @@ -1,31 +0,0 @@ -Qt (for Windows) fails to build under LTO, due to multiple definition issues, i.e - -multiple definition of `QAccessibleLineEdit::~QAccessibleLineEdit()'; - -Possibly related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94156. - -diff --git a/qtbase/src/widgets/accessible/simplewidgets.cpp b/qtbase/src/widgets/accessible/simplewidgets.cpp -index 107fd729fe..0e61878f39 100644 ---- a/qtbase/src/widgets/accessible/simplewidgets.cpp -+++ b/qtbase/src/widgets/accessible/simplewidgets.cpp -@@ -109,6 +109,8 @@ QString qt_accHotKey(const QString &text); - \ingroup accessibility - */ - -+QAccessibleLineEdit::~QAccessibleLineEdit(){}; -+ - /*! - Creates a QAccessibleButton object for \a w. - */ -diff --git a/qtbase/src/widgets/accessible/simplewidgets_p.h b/qtbase/src/widgets/accessible/simplewidgets_p.h -index 73572e3059..658da86143 100644 ---- a/qtbase/src/widgets/accessible/simplewidgets_p.h -+++ b/qtbase/src/widgets/accessible/simplewidgets_p.h -@@ -155,6 +155,7 @@ class QAccessibleLineEdit : public QAccessibleWidget, public QAccessibleTextInte - public: - explicit QAccessibleLineEdit(QWidget *o, const QString &name = QString()); - -+ ~QAccessibleLineEdit(); - QString text(QAccessible::Text t) const override; - void setText(QAccessible::Text t, const QString &text) override; - QAccessible::State state() const override; diff --git a/depends/patches/systemtap/fix_variadic_warning.patch b/depends/patches/systemtap/fix_variadic_warning.patch deleted file mode 100644 index 93cc2d60..00000000 --- a/depends/patches/systemtap/fix_variadic_warning.patch +++ /dev/null @@ -1,16 +0,0 @@ -Could be dropped after a migration to C++20. -See: https://github.com/bitcoin/bitcoin/issues/26916. - -diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h -index 4075a5f..7c6138c 100644 ---- a/includes/sys/sdt.h -+++ b/includes/sys/sdt.h -@@ -276,7 +276,7 @@ __extension__ extern unsigned long long __sdt_unsp; - _SDT_ASM_1(.purgem _SDT_TYPE_) \ - _SDT_ASM_1(.purgem _SDT_TYPE) - --#define _SDT_ASM_BODY(provider, name, pack_args, args, ...) \ -+#define _SDT_ASM_BODY(provider, name, pack_args, args) \ - _SDT_DEF_MACROS \ - _SDT_ASM_1(990: _SDT_NOP) \ - _SDT_ASM_3( .pushsection .note.stapsdt,_SDT_ASM_AUTOGROUP,"note") \ diff --git a/depends/patches/zeromq/builtin_sha1.patch b/depends/patches/zeromq/builtin_sha1.patch new file mode 100644 index 00000000..5481c9db --- /dev/null +++ b/depends/patches/zeromq/builtin_sha1.patch @@ -0,0 +1,17 @@ +Don't use builtin sha1 if not using ws + +The builtin SHA1 (ZMQ_USE_BUILTIN_SHA1) is only used in the websocket +engine (ws_engine.cpp). +Upstreamed in https://github.com/zeromq/libzmq/pull/4670. + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -234,7 +234,7 @@ if(NOT ZMQ_USE_GNUTLS) + endif() + endif() + endif() +- if(NOT ZMQ_USE_NSS) ++ if(ENABLE_WS AND NOT ZMQ_USE_NSS) + list(APPEND sources ${CMAKE_CURRENT_SOURCE_DIR}/external/sha1/sha1.c + ${CMAKE_CURRENT_SOURCE_DIR}/external/sha1/sha1.h) + message(STATUS "Using builtin sha1") diff --git a/depends/patches/zeromq/cacheline_undefined.patch b/depends/patches/zeromq/cacheline_undefined.patch new file mode 100644 index 00000000..02bd2a5f --- /dev/null +++ b/depends/patches/zeromq/cacheline_undefined.patch @@ -0,0 +1,15 @@ +Use proper STREQUAL instead of EQUAL to compare strings.txt + +See: https://github.com/zeromq/libzmq/pull/4711. + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -476,7 +476,7 @@ execute_process( + if(CACHELINE_SIZE STREQUAL "" + OR CACHELINE_SIZE EQUAL 0 + OR CACHELINE_SIZE EQUAL -1 +- OR CACHELINE_SIZE EQUAL "undefined") ++ OR CACHELINE_SIZE STREQUAL "undefined") + set(ZMQ_CACHELINE_SIZE 64) + else() + set(ZMQ_CACHELINE_SIZE ${CACHELINE_SIZE}) diff --git a/depends/patches/zeromq/cmake_minimum.patch b/depends/patches/zeromq/cmake_minimum.patch new file mode 100644 index 00000000..d6b6b5fa --- /dev/null +++ b/depends/patches/zeromq/cmake_minimum.patch @@ -0,0 +1,18 @@ +Set a more sane cmake_minimum_required. + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,12 +1,7 @@ + # CMake build script for ZeroMQ ++cmake_minimum_required(VERSION 3.16) + project(ZeroMQ) + +-if(${CMAKE_SYSTEM_NAME} STREQUAL Darwin) +- cmake_minimum_required(VERSION 3.0.2) +-else() +- cmake_minimum_required(VERSION 2.8.12) +-endif() +- + include(CheckIncludeFiles) + include(CheckCCompilerFlag) + include(CheckCXXCompilerFlag) diff --git a/depends/patches/zeromq/fix_have_windows.patch b/depends/patches/zeromq/fix_have_windows.patch new file mode 100644 index 00000000..e77ef31a --- /dev/null +++ b/depends/patches/zeromq/fix_have_windows.patch @@ -0,0 +1,54 @@ +This fixes several instances where _MSC_VER was +used to determine whether to use afunix.h or not. + +See https://github.com/zeromq/libzmq/pull/4678. +--- a/src/ipc_address.hpp ++++ b/src/ipc_address.hpp +@@ -7,7 +7,7 @@ + + #include + +-#if defined _MSC_VER ++#if defined ZMQ_HAVE_WINDOWS + #include + #else + #include +diff --git a/src/ipc_connecter.cpp b/src/ipc_connecter.cpp +index 3f988745..ed2a0645 100644 +--- a/src/ipc_connecter.cpp ++++ b/src/ipc_connecter.cpp +@@ -16,7 +16,7 @@ + #include "ipc_address.hpp" + #include "session_base.hpp" + +-#ifdef _MSC_VER ++#if defined ZMQ_HAVE_WINDOWS + #include + #else + #include +diff --git a/src/ipc_listener.cpp b/src/ipc_listener.cpp +index 50126040..5428579b 100644 +--- a/src/ipc_listener.cpp ++++ b/src/ipc_listener.cpp +@@ -17,7 +17,7 @@ + #include "socket_base.hpp" + #include "address.hpp" + +-#ifdef _MSC_VER ++#ifdef ZMQ_HAVE_WINDOWS + #ifdef ZMQ_IOTHREAD_POLLER_USE_SELECT + #error On Windows, IPC does not work with POLLER=select, use POLLER=epoll instead, or disable IPC transport + #endif +diff --git a/tests/testutil.cpp b/tests/testutil.cpp +index bdc80283..6f21e8f6 100644 +--- a/tests/testutil.cpp ++++ b/tests/testutil.cpp +@@ -7,7 +7,7 @@ + + #if defined _WIN32 + #include "../src/windows.hpp" +-#if defined _MSC_VER ++#if defined ZMQ_HAVE_WINDOWS + #if defined ZMQ_HAVE_IPC + #include + #include diff --git a/depends/patches/zeromq/macos_mktemp_check.patch b/depends/patches/zeromq/macos_mktemp_check.patch new file mode 100644 index 00000000..c703abcd --- /dev/null +++ b/depends/patches/zeromq/macos_mktemp_check.patch @@ -0,0 +1,16 @@ +build: fix mkdtemp check on macOS + +On macOS, mkdtemp is in unistd.h. Fix the CMake check so that is works. +Upstreamed in https://github.com/zeromq/libzmq/pull/4668. + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -599,7 +599,7 @@ if(NOT MSVC) + + check_cxx_symbol_exists(fork unistd.h HAVE_FORK) + check_cxx_symbol_exists(gethrtime sys/time.h HAVE_GETHRTIME) +- check_cxx_symbol_exists(mkdtemp stdlib.h HAVE_MKDTEMP) ++ check_cxx_symbol_exists(mkdtemp "stdlib.h;unistd.h" HAVE_MKDTEMP) + check_cxx_symbol_exists(accept4 sys/socket.h HAVE_ACCEPT4) + check_cxx_symbol_exists(strnlen string.h HAVE_STRNLEN) + else() diff --git a/depends/patches/zeromq/netbsd_kevent_void.patch b/depends/patches/zeromq/netbsd_kevent_void.patch deleted file mode 100644 index 845c6bdd..00000000 --- a/depends/patches/zeromq/netbsd_kevent_void.patch +++ /dev/null @@ -1,57 +0,0 @@ -commit 129137d5182967dbfcfec66bad843df2a992a78f -Author: fanquake -Date: Mon Jan 3 20:13:33 2022 +0800 - - problem: kevent udata is now void* on NetBSD Current (10) - - solution: check for the intptr_t variant in configure. - -diff --git a/configure.ac b/configure.ac -index 1a571291..402f8b86 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -307,6 +307,27 @@ case "${host_os}" in - if test "x$libzmq_netbsd_has_atomic" = "xno"; then - AC_DEFINE(ZMQ_FORCE_MUTEXES, 1, [Force to use mutexes]) - fi -+ # NetBSD Current (to become 10) has changed the type of udata in it's -+ # kevent struct from intptr_t to void * to align with darwin and other -+ # BSDs, see upstream commit: -+ # https://github.com/NetBSD/src/commit/e5ead823eb916b56589d2c6c560dbcfe4a2d0afc -+ AC_MSG_CHECKING([whether kevent udata type is intptr_t]) -+ AC_LANG_PUSH([C++]) -+ AC_LINK_IFELSE([AC_LANG_PROGRAM( -+ [[#include -+ #include -+ #include ]], -+ [[struct kevent ev; -+ intptr_t udata; -+ EV_SET(&ev, 0, 0, EV_ADD, 0, 0, udata); -+ return 0;]])], -+ [libzmq_netbsd_kevent_udata_intptr_t=yes], -+ [libzmq_netbsd_kevent_udata_intptr_t=no]) -+ AC_LANG_POP([C++]) -+ AC_MSG_RESULT([$libzmq_netbsd_kevent_udata_intptr_t]) -+ if test "x$libzmq_netbsd_kevent_udata_intptr_t" = "xyes"; then -+ AC_DEFINE(ZMQ_NETBSD_KEVENT_UDATA_INTPTR_T, 1, [kevent udata type is intptr_t]) -+ fi - ;; - *openbsd*|*bitrig*) - # Define on OpenBSD to enable all library features -diff --git a/src/kqueue.cpp b/src/kqueue.cpp -index 53d82ac4..a6a7a7f2 100644 ---- a/src/kqueue.cpp -+++ b/src/kqueue.cpp -@@ -46,9 +46,9 @@ - #include "i_poll_events.hpp" - #include "likely.hpp" - --// NetBSD defines (struct kevent).udata as intptr_t, everyone else --// as void *. --#if defined ZMQ_HAVE_NETBSD -+// NetBSD up to version 9 defines (struct kevent).udata as intptr_t, -+// everyone else as void *. -+#if defined ZMQ_HAVE_NETBSD && defined(ZMQ_NETBSD_KEVENT_UDATA_INTPTR_T) - #define kevent_udata_t intptr_t - #else - #define kevent_udata_t void * diff --git a/depends/patches/zeromq/no_librt.patch b/depends/patches/zeromq/no_librt.patch new file mode 100644 index 00000000..b63854c9 --- /dev/null +++ b/depends/patches/zeromq/no_librt.patch @@ -0,0 +1,54 @@ +We don't use librt, so don't try and link against it. + +Related to: https://github.com/zeromq/libzmq/pull/4702. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 03462271..87ceab3c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -564,13 +564,6 @@ else() + check_cxx_symbol_exists(SO_BUSY_POLL sys/socket.h ZMQ_HAVE_BUSY_POLL) + endif() + +-if(NOT MINGW) +- find_library(RT_LIBRARY rt) +- if(RT_LIBRARY) +- set(pkg_config_libs_private "${pkg_config_libs_private} -lrt") +- endif() +-endif() +- + find_package(Threads) + + if(WIN32 AND NOT CYGWIN) +@@ -588,9 +581,7 @@ if(WIN32 AND NOT CYGWIN) + endif() + + if(NOT MSVC) +- set(CMAKE_REQUIRED_LIBRARIES rt) + check_cxx_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME) +- set(CMAKE_REQUIRED_LIBRARIES) + + check_cxx_symbol_exists(fork unistd.h HAVE_FORK) + check_cxx_symbol_exists(gethrtime sys/time.h HAVE_GETHRTIME) +@@ -1503,10 +1494,6 @@ if(BUILD_SHARED) + target_link_libraries(libzmq iphlpapi) + endif() + +- if(RT_LIBRARY) +- target_link_libraries(libzmq -lrt) +- endif() +- + if(norm_FOUND) + target_link_libraries(libzmq norm::norm) + endif() +@@ -1553,10 +1540,6 @@ if(BUILD_STATIC) + target_link_libraries(libzmq-static iphlpapi) + endif() + +- if(RT_LIBRARY) +- target_link_libraries(libzmq-static -lrt) +- endif() +- + if(CMAKE_SYSTEM_NAME MATCHES "QNX") + add_definitions(-DUNITY_EXCLUDE_MATH_H) + endif() diff --git a/depends/patches/zeromq/openbsd_kqueue_headers.patch b/depends/patches/zeromq/openbsd_kqueue_headers.patch new file mode 100644 index 00000000..7000e209 --- /dev/null +++ b/depends/patches/zeromq/openbsd_kqueue_headers.patch @@ -0,0 +1,24 @@ +commit ff231d267370493814f933d151441866bf1e200b +Author: Min RK +Date: Fri Feb 23 13:21:08 2024 +0100 + + Problem: cmake search for kqueue missing headers + + Solution: include sys/types.h and sys/time.h as documented by kqueue + and used in autotools + + fixes kqueue detection on openbsd + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f956f3fd..814d5d46 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -380,7 +380,7 @@ endif(WIN32) + + if(NOT MSVC) + if(POLLER STREQUAL "") +- check_cxx_symbol_exists(kqueue sys/event.h HAVE_KQUEUE) ++ check_cxx_symbol_exists(kqueue "sys/types.h;sys/event.h;sys/time.h" HAVE_KQUEUE) + if(HAVE_KQUEUE) + set(POLLER "kqueue") + endif() diff --git a/depends/patches/zeromq/remove_libstd_link.patch b/depends/patches/zeromq/remove_libstd_link.patch deleted file mode 100644 index ddf91e6a..00000000 --- a/depends/patches/zeromq/remove_libstd_link.patch +++ /dev/null @@ -1,25 +0,0 @@ -commit 47d4cd12a2c051815ddda78adebdb3923b260d8a -Author: fanquake -Date: Tue Aug 18 14:45:40 2020 +0800 - - Remove needless linking against libstdc++ - - This is broken for a number of reasons, including: - - g++ understands "static-libstdc++ -lstdc++" to mean "link against - whatever libstdc++ exists, probably shared", which in itself is buggy. - - another stdlib (libc++ for example) may be in use - - See #11981. - -diff --git a/src/libzmq.pc.in b/src/libzmq.pc.in -index 233bc3a..3c2bf0d 100644 ---- a/src/libzmq.pc.in -+++ b/src/libzmq.pc.in -@@ -7,6 +7,6 @@ Name: libzmq - Description: 0MQ c++ library - Version: @VERSION@ - Libs: -L${libdir} -lzmq --Libs.private: -lstdc++ @pkg_config_libs_private@ -+Libs.private: @pkg_config_libs_private@ - Requires.private: @pkg_config_names_private@ - Cflags: -I${includedir} @pkg_config_defines@ diff --git a/depends/toolchain.cmake.in b/depends/toolchain.cmake.in new file mode 100644 index 00000000..34984b85 --- /dev/null +++ b/depends/toolchain.cmake.in @@ -0,0 +1,175 @@ +# Copyright (c) 2023-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +# This file is expected to be highly volatile and may still change substantially. + +# If CMAKE_SYSTEM_NAME is set within a toolchain file, CMake will also +# set CMAKE_CROSSCOMPILING to TRUE, even if CMAKE_SYSTEM_NAME matches +# CMAKE_HOST_SYSTEM_NAME. To avoid potential misconfiguration of CMake, +# it is best not to touch CMAKE_SYSTEM_NAME unless cross-compiling is +# intended. +if(@depends_crosscompiling@) + set(CMAKE_SYSTEM_NAME @host_system_name@) + set(CMAKE_SYSTEM_VERSION @host_system_version@) + set(CMAKE_SYSTEM_PROCESSOR @host_arch@) + + set(CMAKE_C_COMPILER_TARGET @host@) + set(CMAKE_CXX_COMPILER_TARGET @host@) + set(CMAKE_OBJCXX_COMPILER_TARGET @host@) +endif() + +if(NOT DEFINED CMAKE_C_FLAGS_INIT) + set(CMAKE_C_FLAGS_INIT "@CFLAGS@") +endif() +if(NOT DEFINED CMAKE_C_FLAGS_RELWITHDEBINFO_INIT) + set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "@CFLAGS_RELEASE@") +endif() +if(NOT DEFINED CMAKE_C_FLAGS_DEBUG_INIT) + set(CMAKE_C_FLAGS_DEBUG_INIT "@CFLAGS_DEBUG@") +endif() + +if(NOT DEFINED CMAKE_C_COMPILER) + set(CMAKE_C_COMPILER @CC@) +endif() + +if(NOT DEFINED CMAKE_CXX_FLAGS_INIT) + set(CMAKE_CXX_FLAGS_INIT "@CXXFLAGS@") + set(CMAKE_OBJCXX_FLAGS_INIT "@CXXFLAGS@") +endif() +if(NOT DEFINED CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT) + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "@CXXFLAGS_RELEASE@") + set(CMAKE_OBJCXX_FLAGS_RELWITHDEBINFO_INIT "@CXXFLAGS_RELEASE@") +endif() +if(NOT DEFINED CMAKE_CXX_FLAGS_DEBUG_INIT) + set(CMAKE_CXX_FLAGS_DEBUG_INIT "@CXXFLAGS_DEBUG@") + set(CMAKE_OBJCXX_FLAGS_DEBUG_INIT "@CXXFLAGS_DEBUG@") +endif() + +if(NOT DEFINED CMAKE_CXX_COMPILER) + set(CMAKE_CXX_COMPILER @CXX@) + set(CMAKE_OBJCXX_COMPILER ${CMAKE_CXX_COMPILER}) +endif() + +# The DEPENDS_COMPILE_DEFINITIONS* variables are to be treated as lists. +set(DEPENDS_COMPILE_DEFINITIONS @CPPFLAGS@) +set(DEPENDS_COMPILE_DEFINITIONS_RELWITHDEBINFO @CPPFLAGS_RELEASE@) +set(DEPENDS_COMPILE_DEFINITIONS_DEBUG @CPPFLAGS_DEBUG@) + +if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT) + set(CMAKE_EXE_LINKER_FLAGS_INIT "@LDFLAGS@") +endif() +if(NOT DEFINED CMAKE_SHARED_LINKER_FLAGS_INIT) + set(CMAKE_SHARED_LINKER_FLAGS_INIT "@LDFLAGS@") +endif() +if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT) + set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "@LDFLAGS_RELEASE@") +endif() +if(NOT DEFINED CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT) + set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT "@LDFLAGS_RELEASE@") +endif() +if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT) + set(CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "@LDFLAGS_DEBUG@") +endif() +if(NOT DEFINED CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT) + set(CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT "@LDFLAGS_DEBUG@") +endif() + +set(CMAKE_AR "@AR@") +set(CMAKE_RANLIB "@RANLIB@") +set(CMAKE_STRIP "@STRIP@") +set(CMAKE_OBJCOPY "@OBJCOPY@") +set(CMAKE_OBJDUMP "@OBJDUMP@") + +# Using our own built dependencies should not be +# affected by a potentially random environment. +set(CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH OFF) + +set(CMAKE_FIND_ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}") +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) +set(QT_TRANSLATIONS_DIR "${CMAKE_CURRENT_LIST_DIR}/translations") + +# The following is only necessary when using cmake from Nix or NixOS, because +# Nix patches cmake to remove the root directory `/` from +# CMAKE_SYSTEM_PREFIX_PATH. Adding it back is harmless on other platforms and +# necessary on Nix because without it cmake find_path, find_package, etc +# functions do not know where to look in CMAKE_FIND_ROOT_PATH for dependencies +# (https://github.com/bitcoin/bitcoin/issues/32428). +# +# TODO: longer term, it may be possible to use a dependency provider, which +# would bring the find_package calls completely under our control, making this +# patch unnecessary. +# +# Make sure we only append once, as this file may be called repeatedly. +if(NOT "/" IN_LIST CMAKE_PREFIX_PATH) + list(APPEND CMAKE_PREFIX_PATH "/") +endif() + +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_HOST_APPLE) + # The find_package(Qt ...) function internally uses find_library() + # calls for all dependencies to ensure their availability. + # In turn, the find_library() inspects the well-known locations + # on the file system; therefore, a hint is required. + set(CMAKE_FRAMEWORK_PATH "@OSX_SDK@/System/Library/Frameworks") +endif() + + +if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|FreeBSD)$") + # Customize pkg-config behavior for finding dependencies + # of the xcb QPA platform plugin: + # 1. Restrict search paths to the depends. + # 2. Make output suitable for static linking. + cmake_path(APPEND CMAKE_CURRENT_LIST_DIR "lib" "pkgconfig" OUTPUT_VARIABLE pkg_config_path) + set(ENV{PKG_CONFIG_PATH} ${pkg_config_path}) + set(ENV{PKG_CONFIG_LIBDIR} ${pkg_config_path}) + unset(pkg_config_path) + set(PKG_CONFIG_ARGN --static) +endif() + + +# Set configuration options for the main build system. +# The depends/Makefile can generate values with "not-set" +# semantics as empty strings or strings containing only spaces. +# Therefore, MATCHES must be used rather than STREQUAL. +if("@qt_packages@" MATCHES "^[ ]*$") + set(BUILD_GUI OFF CACHE BOOL "") +else() + set(BUILD_GUI ON CACHE BOOL "") + set(Qt6_ROOT "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "") +endif() + +if("@qrencode_packages@" MATCHES "^[ ]*$") + set(WITH_QRENCODE OFF CACHE BOOL "") +else() + set(WITH_QRENCODE ON CACHE BOOL "") +endif() + +if("@zmq_packages@" MATCHES "^[ ]*$") + set(WITH_ZMQ OFF CACHE BOOL "") +else() + set(WITH_ZMQ ON CACHE BOOL "") +endif() + +if("@wallet_packages@" MATCHES "^[ ]*$") + set(ENABLE_WALLET OFF CACHE BOOL "") +else() + set(ENABLE_WALLET ON CACHE BOOL "") +endif() + +if("@usdt_packages@" MATCHES "^[ ]*$") + set(WITH_USDT OFF CACHE BOOL "") +else() + set(WITH_USDT ON CACHE BOOL "") +endif() + +if("@multiprocess@" STREQUAL "1") + set(ENABLE_IPC ON CACHE BOOL "") + set(MPGEN_EXECUTABLE "${CMAKE_CURRENT_LIST_DIR}/native/bin/mpgen" CACHE FILEPATH "") + set(CAPNP_EXECUTABLE "${CMAKE_CURRENT_LIST_DIR}/native/bin/capnp" CACHE FILEPATH "") + set(CAPNPC_CXX_EXECUTABLE "${CMAKE_CURRENT_LIST_DIR}/native/bin/capnpc-c++" CACHE FILEPATH "") +else() + set(ENABLE_IPC OFF CACHE BOOL "") +endif() diff --git a/doc/.gitignore b/doc/.gitignore deleted file mode 100644 index 38498103..00000000 --- a/doc/.gitignore +++ /dev/null @@ -1 +0,0 @@ -Doxyfile diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 00000000..310a9061 --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,25 @@ +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +find_package(Doxygen COMPONENTS dot) + +if(DOXYGEN_FOUND) + set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) + configure_file(Doxyfile.in ${doxyfile} USE_SOURCE_PERMISSIONS) + + # In CMake 3.27, The FindDoxygen module's doxygen_add_docs() + # command gained a CONFIG_FILE option to specify a custom doxygen + # configuration file. + # TODO: Consider using it. + add_custom_target(docs + COMMAND Doxygen::doxygen ${doxyfile} + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + COMMENT "Generating developer documentation" + VERBATIM USES_TERMINAL + ) +else() + add_custom_target(docs + COMMAND ${CMAKE_COMMAND} -E echo "Error: Doxygen not found" + ) +endif() diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index d8fd46d1..cbbb6551 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -38,7 +38,7 @@ PROJECT_NAME = "Bitcoin Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = @PACKAGE_VERSION@ +PROJECT_NUMBER = @CLIENT_VERSION_STRING@ # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a @@ -58,7 +58,7 @@ PROJECT_LOGO = doc/bitcoin_logo_doxygen.png # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = doc/doxygen +OUTPUT_DIRECTORY = @PROJECT_BINARY_DIR@/doc/doxygen # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and diff --git a/doc/JSON-RPC-interface.md b/doc/JSON-RPC-interface.md index 3fc1db61..e7f085a3 100644 --- a/doc/JSON-RPC-interface.md +++ b/doc/JSON-RPC-interface.md @@ -1,7 +1,7 @@ # JSON-RPC Interface -The headless daemon `coordinated` has the JSON-RPC API enabled by default, the GUI -`coordinate-qt` has it disabled by default. This can be changed with the `-server` +The headless daemon `bitcoind` has the JSON-RPC API enabled by default, the GUI +`bitcoin-qt` has it disabled by default. This can be changed with the `-server` option. In the GUI it is possible to execute RPC methods in the Debug Console Dialog. @@ -24,7 +24,7 @@ This endpoint is only activated when the wallet component has been compiled in. It can service both wallet and non-wallet requests. It MUST be used for wallet requests when two or more wallets are loaded. -This is the endpoint used by coordinate-cli when a `-rpcwallet=` parameter is passed in. +This is the endpoint used by bitcoin-cli when a `-rpcwallet=` parameter is passed in. Best practice would dictate using the `/wallet//` endpoint for ALL requests when multiple wallets are in use. @@ -33,10 +33,10 @@ requests when multiple wallets are in use. ```sh # Get block count from the / endpoint when rpcuser=alice and rpcport=38332 -$ curl --user alice --data-binary '{"jsonrpc": "1.0", "id": "0", "method": "getblockcount", "params": []}' -H 'content-type: text/plain;' localhost:38332/ +$ curl --user alice --data-binary '{"jsonrpc": "2.0", "id": "0", "method": "getblockcount", "params": []}' -H 'content-type: application/json' localhost:38332/ # Get balance from the /wallet/walletname endpoint when rpcuser=alice, rpcport=38332 and rpcwallet=desc-wallet -$ curl --user alice --data-binary '{"jsonrpc": "1.0", "id": "0", "method": "getbalance", "params": []}' -H 'content-type: text/plain;' localhost:38332/wallet/desc-wallet +$ curl --user alice --data-binary '{"jsonrpc": "2.0", "id": "0", "method": "getbalance", "params": []}' -H 'content-type: application/json' localhost:38332/wallet/desc-wallet ``` @@ -53,15 +53,17 @@ Examples: ```sh # "params": ["mywallet", false, false, "", false, false, true] -coordinate-cli createwallet mywallet false false "" false false true +bitcoin-cli createwallet mywallet false false "" false false true # "params": {"wallet_name": "mywallet", "load_on_startup": true} -coordinate-cli -named createwallet wallet_name=mywallet load_on_startup=true +bitcoin-cli -named createwallet wallet_name=mywallet load_on_startup=true # "params": {"args": ["mywallet"], "load_on_startup": true} -coordinate-cli -named createwallet mywallet load_on_startup=true +bitcoin-cli -named createwallet mywallet load_on_startup=true ``` +`bitcoin rpc` can also be substituted for `bitcoin-cli -named`, and is a newer alternative. + ## Versioning The RPC interface might change from one major version of Bitcoin Core to the @@ -74,6 +76,22 @@ major version via the `-deprecatedrpc=` command line option. The release notes of a new major release come with detailed instructions on what RPC features were deprecated and how to re-enable them temporarily. +## JSON-RPC 1.1 vs 2.0 + +The server recognizes [JSON-RPC v2.0](https://www.jsonrpc.org/specification) requests +and responds accordingly. A 2.0 request is identified by the presence of +`"jsonrpc": "2.0"` in the request body. If that key + value is not present in a request, +the legacy JSON-RPC v1.1 protocol is followed instead, which was the only available +protocol in v27.0 and prior releases. + +|| 1.1 | 2.0 | +|-|-|-| +| Request marker | `"version": "1.1"` (or none) | `"jsonrpc": "2.0"` | +| Response marker | (none) | `"jsonrpc": "2.0"` | +| `"error"` and `"result"` fields in response | both present | only one is present | +| HTTP codes in response | `200` unless there is any kind of RPC error (invalid parameters, method not found, etc) | Always `200` unless there is an actual HTTP server error (request parsing error, endpoint not found, etc) | +| Notifications: requests that get no reply | (not supported) | Supported for requests that exclude the "id" field. Returns HTTP status `204` "No Content" | + ## Security The RPC interface allows other programs to control Bitcoin Core, @@ -119,7 +137,7 @@ RPC interface will be abused. withstand arbitrary Internet traffic, so changing the above settings to expose it to the Internet (even using something like a Tor onion service) could expose you to unconsidered vulnerabilities. See - `coordinated -help` for more information about these settings and other + `bitcoind -help` for more information about these settings and other settings described in this document. Related, if you use Bitcoin Core inside a Docker container, you may @@ -128,7 +146,7 @@ RPC interface will be abused. Instead, expose it only on the host system's localhost, for example: `-p 127.0.0.1:8332:8332` -- **Secure authentication:** By default, Bitcoin Core generates unique +- **Secure authentication:** By default, when no `rpcpassword` is specified, Bitcoin Core generates unique login credentials each time it restarts and puts them into a file readable only by the user that started Bitcoin Core, allowing any of that user's RPC clients with read access to the file to login diff --git a/doc/README.md b/doc/README.md index c3ddeaff..0959c6c7 100644 --- a/doc/README.md +++ b/doc/README.md @@ -3,7 +3,7 @@ Bitcoin Core Setup --------------------- -Bitcoin Core is the original Bitcoin client and it builds the backbone of the network. It downloads and, by default, stores the entire history of Bitcoin transactions, which requires a few hundred gigabytes of disk space. Depending on the speed of your computer and network connection, the synchronization process can take anywhere from a few hours to a day or more. +Bitcoin Core is the original Bitcoin client and it builds the backbone of the network. It downloads and, by default, stores the entire history of Bitcoin transactions, which requires several hundred gigabytes or more of disk space. Depending on the speed of your computer and network connection, the synchronization process can take anywhere from a few hours to several days or more. To download Bitcoin Core, visit [bitcoincore.org](https://bitcoincore.org/en/download/). @@ -15,12 +15,15 @@ The following are some helpful notes on how to run Bitcoin Core on your native p Unpack the files into a directory and run: -- `bin/coordinate-qt` (GUI) or -- `bin/coordinated` (headless) +- `bin/bitcoin-qt` (GUI) or +- `bin/bitcoind` (headless) +- `bin/bitcoin` (wrapper command) + +The `bitcoin` command supports subcommands like `bitcoin gui`, `bitcoin node`, and `bitcoin rpc` exposing different functionality. Subcommands can be listed with `bitcoin help`. ### Windows -Unpack the files into a directory, and then run coordinate-qt.exe. +Unpack the files into a directory, and then run bitcoin-qt.exe. ### macOS @@ -41,11 +44,10 @@ The following are developer notes on how to build Bitcoin Core on your native pl - [Dependencies](dependencies.md) - [macOS Build Notes](build-osx.md) - [Unix Build Notes](build-unix.md) -- [Windows Build Notes](build-windows.md) +- [Windows Build Notes](build-windows-msvc.md) - [FreeBSD Build Notes](build-freebsd.md) - [OpenBSD Build Notes](build-openbsd.md) - [NetBSD Build Notes](build-netbsd.md) -- [Android Build Notes](build-android.md) Development --------------------- @@ -59,7 +61,6 @@ The Bitcoin repo's [root README](/README.md) contains relevant information on th - [Translation Strings Policy](translation_strings_policy.md) - [JSON-RPC Interface](JSON-RPC-interface.md) - [Unauthenticated REST Interface](REST-interface.md) -- [Shared Libraries](shared-libraries.md) - [BIPS](bips.md) - [Dnsseed Policy](dnsseed-policy.md) - [Benchmarking](benchmarking.md) @@ -79,6 +80,7 @@ The Bitcoin repo's [root README](/README.md) contains relevant information on th - [Init Scripts (systemd/upstart/openrc)](init.md) - [Managing Wallets](managing-wallets.md) - [Multisig Tutorial](multisig-tutorial.md) +- [Offline Signing Tutorial](offline-signing-tutorial.md) - [P2P bad ports definition and list](p2p-bad-ports.md) - [PSBT support](psbt.md) - [Reduce Memory](reduce-memory.md) diff --git a/doc/README_windows.txt b/doc/README_windows.txt index fb2db09a..07d61b3b 100644 --- a/doc/README_windows.txt +++ b/doc/README_windows.txt @@ -11,7 +11,7 @@ with each other, with the help of a P2P network to check for double-spending. Setup ----- -Unpack the files into a directory and run coordinate-qt.exe. +Unpack the files into a directory and run bitcoin-qt.exe. Bitcoin Core is the original Bitcoin client and it builds the backbone of the network. However, it downloads and stores the entire history of Bitcoin transactions; diff --git a/doc/REST-interface.md b/doc/REST-interface.md index 9bdf12e2..0fee7812 100644 --- a/doc/REST-interface.md +++ b/doc/REST-interface.md @@ -4,7 +4,7 @@ Unauthenticated REST Interface The REST API can be enabled with the `-rest` option. The interface runs on the same port as the JSON-RPC interface, by default port 8332 for mainnet, port 18332 for testnet, -port 38332 for signet, and port 18443 for regtest. +port 48332 for testnet4, port 38332 for signet, and port 18443 for regtest. REST Interface consistency guarantees ------------------------------------- @@ -79,6 +79,13 @@ Responds with 404 if the block doesn't exist. Given a height: returns hash of block in best-block-chain at height provided. Responds with 404 if block not found. +#### Spent transaction outputs +`GET /rest/spenttxouts/.` + +Given a block hash: returns a collection of spent transaction output lists, +one per transaction in the block. +Responds with 404 if the block doesn't exist or its undo data is not available. + #### Chaininfos `GET /rest/chaininfo.json` @@ -117,7 +124,7 @@ $ curl localhost:18332/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff76 "value" : 8.8687, "scriptPubKey" : { "asm" : "OP_DUP OP_HASH160 1c7cebb529b86a04c683dfa87be49de35bcf589e OP_EQUALVERIFY OP_CHECKSIG", - "desc" : "addr(mi7as51dvLJsizWnTMurtRmrP8hG2m1XvD)#gj9tznmy" + "desc" : "addr(mi7as51dvLJsizWnTMurtRmrP8hG2m1XvD)#gj9tznmy", "hex" : "76a9141c7cebb529b86a04c683dfa87be49de35bcf589e88ac", "type" : "pubkeyhash", "address" : "mi7as51dvLJsizWnTMurtRmrP8hG2m1XvD" @@ -146,4 +153,4 @@ Refer to the `getrawmempool` RPC help for details. Defaults to setting Risks ------------- -Running a web browser on the same node with a REST enabled coordinated can be a risk. Accessing prepared XSS websites could read out tx/block data of your node by placing links like `