diff --git a/.appveyor.yml b/.appveyor.yml index d95e9c0a3c..6cce176168 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,73 +5,46 @@ configuration: Release platform: x64 clone_depth: 5 environment: - APPVEYOR_SAVE_CACHE_ON_ERROR: true - CLCACHE_SERVER: 1 PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%' PYTHONUTF8: 1 - QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip' - QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21' + QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/qt598x64_vs2019_v1681/qt598_x64_vs2019_1681.zip' + QT_DOWNLOAD_HASH: '00cf7327818c07d74e0b1a4464ffe987c2728b00d49d4bf333065892af0515c3' QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019' - VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed' -cache: -- C:\tools\vcpkg\installed -> build_msvc\vcpkg-packages.txt -- C:\Users\appveyor\clcache -> .appveyor.yml, build_msvc\**, **\Makefile.am, **\*.vcxproj.in -- C:\Qt5.9.8_x64_static_vs2019 + VCPKG_TAG: '2020.11-1' install: -- cmd: pip install --quiet git+https://github.com/frerich/clcache.git@v4.2.0 # Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes. # - cmd: pip install zmq -# Powershell block below is to install the c++ dependencies via vcpkg. The pseudo code is: -# 1. Check whether the vcpkg install directory exists (note that updating the vcpkg-packages.txt file -# will cause the appveyor cache rules to invalidate the directory) -# 2. If the directory is missing: -# a. Update the vcpkg source (including port files) and build the vcpkg binary, -# b. Install the missing packages. +# The powershell block below is to set up vcpkg to install the c++ dependencies. The pseudo code is: +# a. Checkout the vcpkg source (including port files) for the specific checkout and build the vcpkg binary, +# b. Append a setting to the vcpkg cmake config file to only do release builds of dependencies (skipping deubg builds saves ~5 mins). +# Note originally this block also installed the dependencies using 'vcpkg install'. Dependencies are now installed +# as part of the msbuild command using vcpkg mainfests. - ps: | - $env:PACKAGES = Get-Content -Path build_msvc\vcpkg-packages.txt - Write-Host "vcpkg list: $env:PACKAGES" - if(!(Test-Path -Path ($env:VCPKG_INSTALL_PATH))) { - cd c:\tools\vcpkg - $env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead. - git pull origin master - .\bootstrap-vcpkg.bat - Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)" - .\vcpkg install --triplet $env:PLATFORM-windows-static $env:PACKAGES.split() > $null - cd "$env:APPVEYOR_BUILD_FOLDER" - } - else { - Write-Host "required vcpkg packages already installed." - } - c:\tools\vcpkg\vcpkg integrate install + cd c:\tools\vcpkg + $env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead. + git -c advice.detachedHead=false checkout $env:VCPKG_TAG + git pull origin $env:VCPKG_TAG + .\bootstrap-vcpkg.bat > $null + Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)" + cd "$env:APPVEYOR_BUILD_FOLDER" before_build: -- ps: clcache -M 536870912 # Powershell block below is to download and extract the Qt static libraries. The pseudo code is: -# 1. If the Qt destination directory exists assume it is correct and do nothing. To -# force a fresh install of the packages delete the job's appveyor cache. -# 2. Otherwise: # a. Download the zip file with the prebuilt Qt static libraries. # b. Check that the downloaded file matches the expected hash. # c. Extract the zip file to the specific destination path expected by the msbuild projects. - ps: | - if(!(Test-Path -Path ($env:QT_LOCAL_PATH))) { - Write-Host "Downloading Qt binaries."; - Invoke-WebRequest -Uri $env:QT_DOWNLOAD_URL -Out qtdownload.zip; - Write-Host "Qt binaries successfully downloaded, checking hash against $env:QT_DOWNLOAD_HASH..."; - if((Get-FileHash qtdownload.zip).Hash -eq $env:QT_DOWNLOAD_HASH) { - Expand-Archive qtdownload.zip -DestinationPath $env:QT_LOCAL_PATH; - Write-Host "Qt binary download matched the expected hash."; - } - else { - Write-Host "ERROR: Qt binary download did not match the expected hash."; - Exit-AppveyorBuild; - } + Write-Host "Downloading Qt binaries."; + Invoke-WebRequest -Uri $env:QT_DOWNLOAD_URL -Out qtdownload.zip; + Write-Host "Qt binaries successfully downloaded, checking hash against $env:QT_DOWNLOAD_HASH..."; + if((Get-FileHash qtdownload.zip).Hash -eq $env:QT_DOWNLOAD_HASH) { + Expand-Archive qtdownload.zip -DestinationPath $env:QT_LOCAL_PATH; + Write-Host "Qt binary download matched the expected hash."; } else { - Write-Host "Qt binaries already present."; + Write-Host "ERROR: Qt binary download did not match the expected hash."; + Exit-AppveyorBuild; } - cmd: python build_msvc\msvc-autogen.py -- ps: Start-Process clcache-server -- ps: fsutil behavior set disablelastaccess 0 # Enable Access time feature on Windows (for clcache) build_script: - cmd: msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\BGL.sln /m /v:q /nologo after_build: @@ -79,12 +52,15 @@ after_build: - ps: clcache -z #- 7z a BGL-%APPVEYOR_BUILD_VERSION%.zip %APPVEYOR_BUILD_FOLDER%\build_msvc\%platform%\%configuration%\*.exe test_script: -- cmd: src\test_BGL.exe -k stdout -e stdout 2> NUL -- cmd: src\bench_BGL.exe -evals=1 -scaling=0 > NUL +- cmd: src\test_BGL.exe -l test_suite +- cmd: src\bench_BGL.exe > NUL - ps: python test\util\BGL-util-test.py - cmd: python test\util\rpcauth-test.py # Fee estimation test failing on appveyor with: WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted. -- cmd: python test\functional\test_runner.py --ci --quiet --combinedlogslen=4000 --failfast --exclude feature_fee_estimation +# functional tests disabled for now. See +# https://github.com/BGL/BGL/pull/18626#issuecomment-613396202 +# https://github.com/BGL/BGL/issues/18623 +# - cmd: python test\functional\test_runner.py --ci --quiet --combinedlogslen=4000 --failfast --exclude feature_fee_estimation artifacts: #- path: BGL-%APPVEYOR_BUILD_VERSION%.zip deploy: off diff --git a/.cirrus.yml b/.cirrus.yml index f4a3878ed8..3a9e49b231 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,53 +1,161 @@ -task: - name: "FreeBsd 12.0 amd64 [GOAL: install] [no depends, only system libs]" - freebsd_instance: - image: freebsd-12-0-release-amd64 - cpu: 8 - memory: 8G - timeout_in: 60m - env: - MAKEJOBS: "-j9" - CONFIGURE_OPTS: "--disable-dependency-tracking" - GOAL: "install" - TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache - CCACHE_SIZE: "200M" - CCACHE_COMPRESS: 1 - CCACHE_DIR: "/tmp/ccache_dir" - ccache_cache: - folder: "/tmp/ccache_dir" - install_script: - - pkg install -y autoconf automake boost-libs git gmake libevent libtool pkgconf python3 ccache - - ./contrib/install_db4.sh $(pwd) - - ccache --max-size=${CCACHE_SIZE} - configure_script: - - ./autogen.sh - - ./configure ${CONFIGURE_OPTS} BDB_LIBS="-L$(pwd)/db4/lib -ldb_cxx-4.8" BDB_CFLAGS="-I$(pwd)/db4/include" || ( cat config.log && false) - make_script: - - gmake ${MAKEJOBS} ${GOAL} || ( echo "Build failure. Verbose build follows." && gmake ${GOAL} V=1 ; false ) - check_script: - - gmake check ${MAKEJOBS} VERBOSE=1 - functional_test_script: - - ./test/functional/test_runner.py --jobs 9 --ci --extended --exclude feature_dbcrash --combinedlogslen=1000 --quiet --failfast -task: - name: "x86_64 Linux [GOAL: install] [bionic] [Using ./ci/ system]" - container: - image: ubuntu:18.04 - cpu: 8 - memory: 8G - timeout_in: 60m - env: - MAKEJOBS: "-j9" - RUN_CI_ON_HOST: "1" - TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache - CCACHE_SIZE: "200M" - CCACHE_DIR: "/tmp/ccache_dir" +### Global defaults + +timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out +container: + # https://cirrus-ci.org/faq/#are-there-any-limits + # Each project has 16 CPU in total, assign 2 to each container, so that 8 tasks run in parallel + cpu: 2 + memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers + kvm: true # Use kvm to avoid spurious CI failures in the default virtualization cluster, see https://github.com/bitcoin/bitcoin/issues/20093 +env: + PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y" + MAKEJOBS: "-j4" + DANGER_RUN_CI_ON_HOST: "1" # Containers will be discarded after the run, so there is no risk that the ci scripts modify the system + TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache + CCACHE_SIZE: "200M" + CCACHE_DIR: "/tmp/ccache_dir" + +### Global task template + +# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks +global_task_template: &GLOBAL_TASK_TEMPLATE + skip: $CIRRUS_REPO_FULL_NAME == "bitcoin-core/gui" && $CIRRUS_PR == "" # No need to run on the read-only mirror, unless it is a PR. https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution ccache_cache: folder: "/tmp/ccache_dir" depends_built_cache: folder: "/tmp/cirrus-ci-build/depends/built" - install_script: - - apt-get update - - apt-get -y install git bash ccache - - ccache --max-size=${CCACHE_SIZE} + depends_sdk_cache: + folder: "/tmp/cirrus-ci-build/depends/sdk-sources" + depends_releases_cache: + folder: "/tmp/cirrus-ci-build/releases" + merge_base_script: + - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi + - bash -c "$PACKAGE_MANAGER_INSTALL git" + - git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH + - git config --global user.email "ci@ci.ci" + - git config --global user.name "ci" + - git merge FETCH_HEAD # Merge base to detect silent merge conflicts ci_script: - ./ci/test_run_all.sh + +#task: +# name: "Windows" +# windows_container: +# image: cirrusci/windowsservercore:2019 +# env: +# CIRRUS_SHELL: powershell +# PATH: 'C:\Python37;C:\Python37\Scripts;%PATH%' +# PYTHONUTF8: 1 +# QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip' +# QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21' +# QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019' +# VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed' +# VCPKG_COMMIT_ID: 'ed0df8ecc4ed7e755ea03e18aaf285fd9b4b4a74' +# install_script: +# - choco install python --version=3.7.7 -y + +task: + name: 'ARM [unit tests, no functional tests] [buster]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: debian:buster + env: + FILE_ENV: "./ci/test/00_setup_env_arm.sh" + +task: + name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [bionic]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:bionic + env: + FILE_ENV: "./ci/test/00_setup_env_win64.sh" + +task: + name: '32-bit + dash [gui] [CentOS 8]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: centos:8 + env: + PACKAGE_MANAGER_INSTALL: "yum install -y" + FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh" + +task: + name: '[previous releases, uses qt5 dev package and some depends packages] [unsigned char] [bionic]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:bionic + env: + FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh" + +task: + name: '[depends, sanitizers: thread (TSan), no gui] [focal]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:focal + cpu: 4 # Double CPU and increase Memory to avoid timeout + memory: 24G + env: + MAKEJOBS: "-j8" + FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh" + +task: + name: '[depends, sanitizers: memory (MSan)] [focal]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:focal + env: + FILE_ENV: "./ci/test/00_setup_env_native_msan.sh" + +task: + name: '[no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer] [focal]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:focal + env: + FILE_ENV: "./ci/test/00_setup_env_native_asan.sh" + +task: + name: '[no depends, only system libs, sanitizers: fuzzer,address,undefined] [focal]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:focal + env: + FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh" + +task: + name: '[multiprocess] [focal]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:focal + env: + FILE_ENV: "./ci/test/00_setup_env_native_multiprocess.sh" + +task: + name: '[no wallet] [bionic]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:bionic + env: + FILE_ENV: "./ci/test/00_setup_env_native_nowallet.sh" + +task: + name: 'macOS 10.14 [gui, no tests] [bionic]' + << : *GLOBAL_TASK_TEMPLATE + container: + image: ubuntu:bionic + env: + FILE_ENV: "./ci/test/00_setup_env_mac.sh" + +task: + name: 'macOS 10.15 native [gui] [no depends]' + macos_brew_addon_script: + - brew install boost libevent berkeley-db4 qt miniupnpc ccache zeromq qrencode sqlite libtool automake pkg-config gnu-getopt + << : *GLOBAL_TASK_TEMPLATE + osx_instance: + # Use latest image, but hardcode version to avoid silent upgrades (and breaks) + image: catalina-xcode-12.1 # https://cirrus-ci.org/guide/macOS + env: + DANGER_RUN_CI_ON_HOST: "true" + CI_USE_APT_INSTALL: "no" + PACKAGE_MANAGER_INSTALL: "echo" # Nothing to do + FILE_ENV: "./ci/test/00_setup_env_mac_host.sh" diff --git a/.fuzzbuzz.yml b/.fuzzbuzz.yml new file mode 100644 index 0000000000..d44ac27eb9 --- /dev/null +++ b/.fuzzbuzz.yml @@ -0,0 +1,16 @@ +base: ubuntu:16.04 +language: c++ +engine: libFuzzer +environment: + - CXXFLAGS=-fcoverage-mapping -fno-omit-frame-pointer -fprofile-instr-generate -gline-tables-only -O1 +setup: + - sudo apt-get update + - sudo apt-get install -y autoconf bsdmainutils clang git libboost-all-dev libboost-program-options-dev libc++1 libc++abi1 libc++abi-dev libc++-dev libclang1 libclang-dev libdb5.3++ libevent-dev libllvm-ocaml-dev libomp5 libomp-dev libprotobuf-dev libqt5core5a libqt5dbus5 libqt5gui5 libssl-dev libtool llvm llvm-dev llvm-runtime pkg-config protobuf-compiler qttools5-dev qttools5-dev-tools software-properties-common + - ./autogen.sh + - CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=address,fuzzer,undefined + - make + - git clone https://github.com/bitcoin-core/qa-assets +auto_targets: + find_targets_command: find src/test/fuzz/ -executable -type f ! -name "*.cpp" ! -name "*.h" + base_corpus_dir: qa-assets/fuzz_seed_corpus/ + memory_limit: none diff --git a/.github/ISSUE_TEMPLATE/gui_issue.md b/.github/ISSUE_TEMPLATE/gui_issue.md new file mode 100644 index 0000000000..37acc81e21 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/gui_issue.md @@ -0,0 +1,11 @@ +--- +name: An issue or feature request related to the GUI +about: Any report, issue or feature request related to the GUI should be reported at https://github.com/bitcoin-core/gui/issues/ +title: Any report, issue or feature request related to the GUI should be reported at https://github.com/bitcoin-core/gui/issues/ +labels: GUI +assignees: '' + +--- + +Any report, issue or feature request related to the GUI should be reported at +https://github.com/bitcoin-core/gui/issues/ diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d026a8ce69..b7c70d0834 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,8 +1,13 @@ ### Description what is the goal of the pull request -### Items done -item list of changes or additions +Pull requests without a rationale and clear improvement may be closed +immediately. + +GUI-related pull requests should be opened against +https://github.com/BGL-core/gui +first. See CONTRIBUTING.md +--> ### Notes implementation details, hints for reviewers diff --git a/.gitignore b/.gitignore index b8e6db68db..0ef77ff229 100644 --- a/.gitignore +++ b/.gitignore @@ -1,20 +1,52 @@ + + *.tar.gz +bench_inv +bench_ecdh +bench_ecmult +bench_schnorrsig +bench_sign +bench_verify +bench_recover +bench_internal +tests +exhaustive_tests +gen_context +valgrind_ctime_test *.exe *.pdb src/BGL src/BGLd src/BGL-cli +src/BGL-gui +src/BGL-node src/BGL-tx src/BGL-wallet +src/test/fuzz/* +!src/test/fuzz/*.* src/test/test_BGL -src/test/test_BGL_fuzzy src/qt/test/test_BGL-qt # autoreconf Makefile.in aclocal.m4 autom4te.cache/ +config.log +config.status +*.tar.gz +*.la +libtool +.deps/ +.dirstamp +*.lo +*.o +*~ +*.log +*.trs +src/libsecp256k1-config.h +src/libsecp256k1-config.h.in +src/ecmult_static_context.h build-aux/config.guess build-aux/config.sub build-aux/depcomp @@ -28,6 +60,7 @@ build-aux/m4/ltversion.m4 build-aux/missing build-aux/compile build-aux/test-driver +config.cache config.log config.status configure @@ -88,7 +121,7 @@ src/qt/BGL-qt.includes *.qm Makefile !depends/Makefile -BGL-qt +src/qt/BGL-qt BGL-Qt.app background.tiff* @@ -106,13 +139,19 @@ qrc_*.cpp .DS_Store build +# Previous releases +releases + #lcov *.gcno *.gcda /*.info test_BGL.coverage/ total.coverage/ +fuzz.coverage/ coverage_percent.txt +/cov_tool_wrapper.sh +qa-assets/ #build tests linux-coverage-build @@ -120,6 +159,7 @@ linux-build win32-build test/config.ini test/cache/* +test/.mypy_cache/ !src/leveldb*/Makefile diff --git a/.python-version b/.python-version index c49282585a..8b7b0b52e5 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.5.6 +3.6.12 diff --git a/.travis.yml b/.travis.yml index 6d4ba0adea..a4f81bac45 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ # are cached and re-used when possible. Changes in the dependency-generator # will trigger cache-invalidation and rebuilds as necessary. # -# These caches can be manually removed if necessary. This is one of the very +# Travis caches can be manually removed if necessary. This is one of the very # few manual operations that is possible with Travis, and it can be done by a # BGL Core GitHub member via the Travis web interface [0]. # @@ -25,133 +25,99 @@ # [1] https://docs.travis-ci.com/user/caching/#build-phases # [2] https://docs.travis-ci.com/user/customizing-the-build#build-timeouts -dist: xenial +version: ~> 1.0 + +dist: bionic os: linux language: minimal arch: amd64 cache: - ccache: true directories: - $TRAVIS_BUILD_DIR/depends/built - $TRAVIS_BUILD_DIR/depends/sdk-sources - $TRAVIS_BUILD_DIR/ci/scratch/.ccache - # macOS - - $HOME/Library/Caches/Homebrew - - /usr/local/Homebrew -before_cache: - - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi + - $TRAVIS_BUILD_DIR/releases/$HOST stages: - lint - test env: global: - - CI_RETRY_EXE="travis_retry" - - CI_WAIT="while sleep 500; do echo .; done" - - CACHE_ERR_MSG="Error! Initial build successful, but not enough time remains to run later build stages and tests. See https://docs.travis-ci.com/user/customizing-the-build#build-timeouts . Please manually re-run this job by using the travis restart button. The next run should not time out because the build cache has been saved." -before_install: - - set -o errexit; source ./ci/test/00_setup_env.sh - - set -o errexit; source ./ci/test/03_before_install.sh -install: - - set -o errexit; source ./ci/test/04_install.sh -before_script: - - set -o errexit; source ./ci/test/05_before_script.sh -script: - - export CONTINUE=1 - - if [ $SECONDS -gt 1200 ]; then export CONTINUE=0; fi # Likely the depends build took very long - - if [ $TRAVIS_REPO_SLUG = "BGL/BGL" ]; then export CONTINUE=1; fi # Whitelisted repo (90 minutes build time) - - if [ $CONTINUE = "1" ]; then set -o errexit; source ./ci/test/06_script_a.sh; else set +o errexit; echo "$CACHE_ERR_MSG"; false; fi - - if [ $SECONDS -gt 2000 ]; then export CONTINUE=0; fi # Likely the build took very long; The tests take about 1000s, so we should abort if we have less than 50*60-1000=2000s left - - if [ $TRAVIS_REPO_SLUG = "BGL/BGL" ]; then export CONTINUE=1; fi # Whitelisted repo (90 minutes build time) - - if [ $CONTINUE = "1" ]; then set -o errexit; source ./ci/test/06_script_b.sh; else set +o errexit; echo "$CACHE_ERR_MSG"; false; fi -after_script: - - echo $TRAVIS_COMMIT_RANGE -jobs: + - WIDEMUL=auto BIGNUM=auto STATICPRECOMPUTATION=yes ECMULTGENPRECISION=auto ASM=no BUILD=check WITH_VALGRIND=yes RUN_VALGRIND=no EXTRAFLAGS= HOST= ECDH=no RECOVERY=no SCHNORRSIG=no EXPERIMENTAL=no CTIMETEST=yes BENCH=yes ITERS=2 + matrix: + - WIDEMUL=int64 RECOVERY=yes + - WIDEMUL=int64 ECDH=yes EXPERIMENTAL=yes SCHNORRSIG=yes + - WIDEMUL=int128 + - WIDEMUL=int128 RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes + - WIDEMUL=int128 ECDH=yes EXPERIMENTAL=yes SCHNORRSIG=yes + - WIDEMUL=int128 ASM=x86_64 + - BIGNUM=no + - BIGNUM=no RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes + - BIGNUM=no STATICPRECOMPUTATION=no + - BUILD=distcheck WITH_VALGRIND=no CTIMETEST=no BENCH=no + - CPPFLAGS=-DDETERMINISTIC + - CFLAGS=-O0 CTIMETEST=no + - ECMULTGENPRECISION=2 + - ECMULTGENPRECISION=8 + - RUN_VALGRIND=yes BIGNUM=no ASM=x86_64 ECDH=yes RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes EXTRAFLAGS="--disable-openssl-tests" BUILD= +matrix: + fast_finish: true include: + - compiler: clang + os: linux + env: HOST=i686-linux-gnu + addons: + apt: + packages: + - gcc-multilib + - libgmp-dev:i386 + - valgrind + - libtool-bin + - libc6-dbg:i386 + - compiler: clang + env: HOST=i686-linux-gnu + os: linux + addons: + apt: + packages: + - gcc-multilib + - valgrind + - libtool-bin + - libc6-dbg:i386 + - compiler: gcc + env: HOST=i686-linux-gnu + os: linux + addons: + apt: + packages: + - gcc-multilib + - valgrind + - libtool-bin + - libc6-dbg:i386 + - compiler: gcc + os: linux + env: HOST=i686-linux-gnu + addons: + apt: + packages: + - gcc-multilib + - libgmp-dev:i386 + - valgrind + - libtool-bin + - libc6-dbg:i386 + # S390x build (big endian system) + - compiler: gcc + env: HOST=s390x-unknown-linux-gnu ECDH=yes RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes CTIMETEST= + arch: s390x - stage: lint name: 'lint' env: - cache: false + cache: pip language: python - python: '3.5' # Oldest supported version according to doc/dependencies.md + python: '3.6' # Oldest supported version according to doc/dependencies.md install: - set -o errexit; source ./ci/lint/04_install.sh before_script: - set -o errexit; source ./ci/lint/05_before_script.sh script: - set -o errexit; source ./ci/lint/06_script.sh - - - stage: test - name: 'ARM [GOAL: install] [bionic] [unit tests, functional tests]' - arch: arm64 - env: >- - FILE_ENV="./ci/test/00_setup_env_arm.sh" - QEMU_USER_CMD="" # Can run the tests natively without qemu - - - stage: test - name: 'S390x [GOAL: install] [bionic] [unit tests, functional tests]' - arch: s390x - env: >- - FILE_ENV="./ci/test/00_setup_env_s390x.sh" - QEMU_USER_CMD="" # Can run the tests natively without qemu - - - stage: test - name: 'Win64 [GOAL: deploy] [unit tests, no gui, no functional tests]' - env: >- - FILE_ENV="./ci/test/00_setup_env_win64.sh" - - - stage: test - name: '32-bit + dash [GOAL: install] [gui]' - env: >- - FILE_ENV="./ci/test/00_setup_env_i686.sh" - - - stage: test - name: 'x86_64 Linux [GOAL: install] [CentOS 7] [no depends, only system libs]' - env: >- - FILE_ENV="./ci/test/00_setup_env_native_centos.sh" - - - stage: test - name: 'x86_64 Linux [GOAL: install] [bionic] [uses qt5 dev package and some depends packages] [unsigned char]' - env: >- - FILE_ENV="./ci/test/00_setup_env_native_qt5.sh" - - - stage: test - name: 'x86_64 Linux [GOAL: install] [xenial] [no depends, only system libs, sanitizers: thread (TSan), no wallet]' - env: >- - FILE_ENV="./ci/test/00_setup_env_native_tsan.sh" - TEST_RUNNER_EXTRA="--exclude feature_block" # Not enough memory on travis machines - - - stage: test - name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer]' - env: >- - FILE_ENV="./ci/test/00_setup_env_native_asan.sh" - - - stage: test - name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, valgrind]' - env: >- - FILE_ENV="./ci/test/00_setup_env_native_valgrind.sh" - - - stage: test - name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: fuzzer,address,undefined]' - env: >- - FILE_ENV="./ci/test/00_setup_env_native_fuzz.sh" - - - stage: test - name: 'x86_64 Linux [GOAL: install] [bionic] [no wallet]' - env: >- - FILE_ENV="./ci/test/00_setup_env_native_nowallet.sh" - - - stage: test - name: 'macOS 10.12 [GOAL: deploy] [no functional tests]' - env: >- - FILE_ENV="./ci/test/00_setup_env_mac.sh" - - - stage: test - name: 'macOS 10.14 native [GOAL: install] [GUI] [no depends]' - os: osx - # Use the most recent version: - # Xcode 11.2.1, macOS 10.14, JDK 13.0.1, SDK 10.15 - # https://docs.travis-ci.com/user/reference/osx/#macos-version - osx_image: xcode11.2 - env: >- - FILE_ENV="./ci/test/00_setup_env_mac_host.sh" diff --git a/.tx/config b/.tx/config index 1b7e93fa83..642a4478cf 100644 --- a/.tx/config +++ b/.tx/config @@ -1,7 +1,7 @@ [main] host = https://www.transifex.com -[BGL.qt-translation-019x] +[BGL.qt-translation-021x] file_filter = src/qt/locale/BGL_.ts source_file = src/qt/locale/BGL_en.ts source_lang = en diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0ae88be5b2..4dd9a7aab0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,17 +6,52 @@ welcome to contribute towards development in the form of peer review, testing and patches. This document explains the practical process and guidelines for contributing. -Firstly in terms of structure, there is no particular concept of "Core +First, in terms of structure, there is no particular concept of "BGL Core developers" in the sense of privileged people. Open source often naturally -revolves around meritocracy where longer term contributors gain more trust from -the developer community. However, some hierarchy is necessary for practical -purposes. As such there are repository "maintainers" who are responsible for -merging pull requests as well as a "lead maintainer" who is responsible for the -release cycle, overall merging, moderation and appointment of maintainers. +revolves around a meritocracy where contributors earn trust from the developer +community over time. Nevertheless, some hierarchy is necessary for practical +purposes. As such, there are repository "maintainers" who are responsible for +merging pull requests, as well as a "lead maintainer" who is responsible for the +release cycle as well as overall merging, moderation and appointment of +maintainers. +Getting Started +--------------- + +New contributors are very welcome and needed. + +Reviewing and testing is highly valued and the most effective way you can contribute +as a new contributor. It also will teach you much more about the code and +process than opening pull requests. Please refer to the [peer review](#peer-review) +section below. + +Before you start contributing, familiarize yourself with the BGL Core build +system and tests. Refer to the documentation in the repository on how to build +BGL Core and how to run the unit tests, functional tests, and fuzz tests. + +There are many open issues of varying difficulty waiting to be fixed. If you're looking for somewhere to start contributing, check out the [good first issue](https://github.com/BGL/BGL/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) -list or participate in a weekly [BGL Core PR Review Club](https://BGLcore.reviews/) meeting. +list or changes that are +[up for grabs](https://github.com/BGL/BGL/issues?utf8=%E2%9C%93&q=label%3A%22Up+for+grabs%22). +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 +[BGL Core PR Review Club](https://BGLcore.reviews/) meeting. + +### Good First Issue Label + +The purpose of the `good first issue` label is to highlight which issues are +suitable for a new contributor without a deep understanding of the codebase. + +However, good first issues can be solved by anyone. If they remain unsolved +for a longer time, a frequent contributor might address them. + +You do not need to request permission to start working on an issue. However, +you are encouraged to leave a comment if you are planning to work on it. This +will help other contributors monitor which issues are actively being addressed +and is also an effective way to request assistance if and when you need it. Communication Channels ---------------------- @@ -28,7 +63,7 @@ history logs can be found on [http://www.erisian.com.au/BGL-core-dev/](http://www.erisian.com.au/BGL-core-dev/) and [http://gnusha.org/BGL-core-dev/](http://gnusha.org/BGL-core-dev/). -Discussion about code base improvements happens in GitHub issues and on pull +Discussion about codebase improvements happens in GitHub issues and pull requests. The developer @@ -41,22 +76,47 @@ Contributor Workflow -------------------- The codebase is maintained using the "contributor workflow" where everyone -without exception contributes patch proposals using "pull requests". This +without exception contributes patch proposals using "pull requests" (PRs). This facilitates social contribution, easy testing and peer review. To contribute a patch, the workflow is as follows: - 1. Fork repository ([only the first time](https://help.github.com/en/articles/fork-a-repo)). + 1. Fork repository ([only for the first time](https://help.github.com/en/articles/fork-a-repo)) 1. Create topic branch 1. Commit patches +For GUI-related issues or pull requests, the https://github.com/BGL-core/gui repository should be used. +For all other issues and pull requests, the https://github.com/BGL/BGL node repository should be used. + +The master branch for all monotree repositories is identical. + +As a rule of thumb, everything that only modifies `src/qt` is a GUI-only pull +request. However: + +* For global refactoring or other transversal changes the node repository + should be used. +* For GUI-related build system changes, the node repository should be used + because the change needs review by the build systems reviewers. +* Changes in `src/interfaces` need to go to the node repository because they + might affect other components like the wallet. + +For large GUI changes that include build system and interface changes, it is +recommended to first open a pull request against the GUI repository. When there +is agreement to proceed with the changes, a pull request with the build system +and interfaces changes can be submitted to the node repository. + The project coding conventions in the [developer notes](doc/developer-notes.md) -must be adhered to. +must be followed. -In general [commits should be atomic](https://en.wikipedia.org/wiki/Atomic_commit#Atomic_commit_convention) -and diffs should be easy to read. For this reason do not mix any formatting +### Committing Patches + +In general, [commits should be atomic](https://en.wikipedia.org/wiki/Atomic_commit#Atomic_commit_convention) +and diffs should be easy to read. For this reason, do not mix any formatting 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. + 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 "Corrected typo @@ -68,7 +128,7 @@ If a particular commit references another issue, please add the reference. For example: `refs #1234` or `fixes #4321`. Using the `fixes` or `closes` keywords will cause the corresponding issue to be closed when the pull request is merged. -Commit messages should never contain any `@` mentions. +Commit messages should never contain any `@` mentions (usernames prefixed with "@"). Please refer to the [Git manual](https://git-scm.com/doc) for more information about Git. @@ -76,6 +136,8 @@ about Git. - Push changes to your fork - Create pull request +### Creating the Pull Request + The title of the pull request should be prefixed by the component or area that the pull request affects. Valid areas as: @@ -88,41 +150,53 @@ the pull request affects. Valid areas as: - `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 - - `test` for changes to the BGL unit tests or QA tests + - `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, reproducible builds or CI code + - `build` for changes to the GNU Autotools or reproducible builds Examples: consensus: Add new opcode for BIP-XXXX OP_CHECKAWESOMESIG - net: Automatically create hidden service, listen on Tor + net: Automatically create onion service, listen on Tor qt: Add feed bump button log: Fix typo in log message -Note that translations should not be submitted as pull requests, please see -[Translation Process](https://github.com/BGL/BGL/blob/master/doc/translation_process.md) +The body of the pull request should contain sufficient description of *what* the +patch does, and even more importantly, *why*, with justification and reasoning. +You should include references to any discussions (for example, other issues or +mailing list discussions). + +The description for a new pull request should not contain any `@` mentions. The +PR description will be included in the commit message when the PR is merged and +any users mentioned in the description will be annoyingly notified each time a +fork of BGL Core copies the merge. Instead, make any username mentions in a +subsequent comment to the PR. + +### Translation changes + +Note that translations should not be submitted as pull requests. Please see +[Translation Process](https://github.com/wu-emma/bitgesell/blob/master/doc/translation_process.md) 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://help.github.com/articles/basic-writing-and-formatting-syntax/#task-lists) in the body of the pull request to indicate tasks are pending. -The body of the pull request should contain enough description about what the -patch does together with any justification/reasoning. You should include -references to any discussions (for example other tickets or mailing list -discussions). +### Address Feedback -At this stage one should expect comments and review from other contributors. You +At this stage, one should expect comments and review from other contributors. You can add more commits to your pull request by committing them locally and pushing to your fork until you have satisfied all feedback. -Note: Code review is a burdensome but important part of the development process, and as such, certain types of pull requests are rejected. In general, if the **improvements** do not warrant the **review effort** required, the PR has a high chance of being rejected. It is up to the PR author to convince the reviewers that the changes warrant the review effort, and if reviewers are "Concept NAK'ing" the PR, the author may need to present arguments and/or do research backing their suggested changes. +Note: Code review is a burdensome but important part of the development process, and as such, certain types of pull requests are rejected. In general, if the **improvements** do not warrant the **review effort** required, the PR has a high chance of being rejected. It is up to the PR author to convince the reviewers that the changes warrant the review effort, and if reviewers are "Concept NACK'ing" the PR, the author may need to present arguments and/or do research backing their suggested changes. + +### Squashing Commits -Squashing Commits ---------------------------- -If your pull request is accepted for merging, you may be asked by a maintainer -to squash and or [rebase](https://git-scm.com/docs/git-rebase) your commits +If your pull request contains fixup commits (commits that change the same line of code repeatedly) or too fine-grained +commits, you may be asked to [squash](https://git-scm.com/docs/git-rebase#_interactive_mode) your commits before it will be merged. The basic squashing workflow is shown below. git checkout your_branch_name @@ -133,13 +207,13 @@ before it will be merged. The basic squashing workflow is shown below. # Save and quit. git push -f # (force push to GitHub) -Please update the resulting commit message if needed, it should read as a -coherent message. In most cases this means that you should not just list the -interim commits. +Please update the resulting commit message, if needed. It should read as a +coherent message. In most cases, this means not just listing the interim +commits. -If you have problems with squashing (or other workflows with `git`), you can -alternatively enable "Allow edits from maintainers" in the right GitHub -sidebar and ask for help in the pull request. +If you have problems with squashing or other git workflows, you can enable +"Allow edits from maintainers" in the right-hand sidebar of the GitHub web +interface and ask for help in the pull request. Please refrain from creating several pull requests for the same change. Use the pull request that is already open (or was created earlier) to amend @@ -149,6 +223,20 @@ the respective change set. The length of time required for peer review is unpredictable and will vary from pull request to pull request. +### Rebasing Changes + +When a pull request conflicts with the target branch, you may be asked to rebase it on top of the current target branch. +The `git rebase` command will take care of rebuilding your commits on top of the new base. + +This project aims to have a clean git history, where code changes are only made in non-merge commits. This simplifies +auditability because merge commits can be assumed to not contain arbitrary code changes. Merge commits should be signed, +and the resulting git tree hash must be deterministic and reproducible. The script in +[/contrib/verify-commits](/contrib/verify-commits) checks that. + +After a rebase, reviewers are encouraged to sign off on the force push. This should be relatively straightforward with +the `git range-diff` tool explained in the [productivity +notes](/doc/productivity.md#diff-the-diffs-with-git-range-diff). To avoid needless review churn, maintainers will +generally merge pull requests that received the most review attention first. Pull Request Philosophy ----------------------- @@ -173,9 +261,9 @@ in the future, they may be removed by the Repository Maintainer. Refactoring is a necessary part of any software project's evolution. The following guidelines cover refactoring pull requests for the project. -There are three categories of refactoring, code only moves, code style fixes, -code refactoring. In general refactoring pull requests should not mix these -three kinds of activity in order to make refactoring pull requests easy to +There are three categories of refactoring: code-only moves, code style fixes, and +code refactoring. In general, refactoring pull requests should not mix these +three kinds of activities in order to make refactoring pull requests easy to review and uncontroversial. In all cases, refactoring PRs must not change the behaviour of code within the pull request (bugs must be preserved as is). @@ -209,8 +297,8 @@ In general, all pull requests must: - Have a clear use case, fix a demonstrable bug or serve the greater good of the project (for example refactoring for modularisation); - - Be well peer reviewed; - - Have unit tests and functional tests where appropriate; + - Be well peer-reviewed; + - Have unit tests, functional tests, and fuzz tests, where appropriate; - Follow code style guidelines ([C++](doc/developer-notes.md), [functional tests](test/functional/README.md)); - Not break the existing test suite; - Where bugs are fixed, where possible, there should be unit tests @@ -237,7 +325,7 @@ spread out over GitHub, mailing list and IRC discussions). #### Conceptual Review A review can be a conceptual review, where the reviewer leaves a comment - * `Concept (N)ACK`, meaning "I do (not) agree in the general goal of this pull + * `Concept (N)ACK`, meaning "I do (not) agree with the general goal of this pull request", * `Approach (N)ACK`, meaning `Concept ACK`, but "I do (not) agree with the approach of this change". @@ -247,30 +335,28 @@ NACKs without accompanying reasoning may be disregarded. #### Code Review -After conceptual agreement on the change, code review can be provided. It is -starting with `ACK BRANCH_COMMIT`, where `BRANCH_COMMIT` is the top of the -topic branch. The review is followed by a description of how the reviewer did -the review. The following -language is used within pull-request comments: +After conceptual agreement on the change, code review can be provided. A review +begins with `ACK BRANCH_COMMIT`, where `BRANCH_COMMIT` is the top of the PR +branch, followed by a description of how the reviewer did the review. The +following language is used within pull request comments: - - "I have tested the code", involving - change-specific manual testing in addition to running the unit and functional - tests, and in case it is not obvious how the manual testing was done, it should - be described; + - "I have tested the code", involving change-specific manual testing in + addition to running the unit, functional, or fuzz tests, and in case it is + not obvious how the manual testing was done, it should be described; - "I have not tested the code, but I have reviewed it and it looks OK, I agree it can be merged"; - - Nit refers to trivial, often non-blocking issues. + - A "nit" refers to a trivial, often non-blocking issue. Project maintainers reserve the right to weigh the opinions of peer reviewers -using common sense judgement and also may weight based on meritocracy: Those -that have demonstrated a deeper commitment and understanding towards the project -(over time) or have clear domain expertise may naturally have more weight, as -one would expect in all walks of life. +using common sense judgement and may also weigh based on merit. Reviewers that +have demonstrated a deeper commitment and understanding of the project over time +or who have clear domain expertise may naturally have more weight, as one would +expect in all walks of life. -Where a patch set affects consensus critical code, the bar will be set much +Where a patch set affects consensus-critical code, the bar will be much higher in terms of discussion and peer review requirements, keeping in mind that mistakes could be very costly to the wider community. This includes refactoring -of consensus critical code. +of consensus-critical code. Where a patch set proposes to change the BGL consensus, it must have been discussed extensively on the mailing list and IRC, be accompanied by a widely @@ -287,7 +373,7 @@ about: - It may be because of a feature freeze due to an upcoming release. During this time, only bug fixes are taken into consideration. If your pull request is a new feature, - it will not be prioritized until the release is over. Wait for release. + it will not be prioritized until after the release. Wait for the release. - It may be because the changes you are suggesting do not appeal to people. Rather than nits and critique, which require effort and means they care enough to spend time on your contribution, thundering silence is a good sign of widespread (mild) dislike of a given change @@ -297,17 +383,44 @@ about: [developer notes](doc/developer-notes.md), is dangerous or insecure, is messily written, etc. Identify and address any of the issues you find. Then ask e.g. on IRC if someone could give their opinion on the concept itself. - - It may be because your code is too complex for all but a few people. And those people + - 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://help.github.com/articles/tracing-changes-in-a-file/). Simply - find the person touching the code you are touching before you and see if you can find - them and give them a nudge. Don't be incessant about the nudging though. + 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 - a look. If you think you've been waiting an unreasonably long amount of time (month+) for - no particular reason (few lines changed, etc), this is totally fine. Try to return the favor - when someone else is asking for feedback on their code, and universe balances out. + a look. If you think you've been waiting for an unreasonably long time (say, + more than a month) for no particular reason (a few lines changed, etc.), + this is totally fine. Try to return the favor when someone else is asking + for feedback on their code, and the universe balances out. + - Remember that the best thing you can do while waiting is give review to others! + + +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 +when needed (the original author does not need to worry about it). + +A backport should contain the following metadata in the commit body: + +``` +Github-Pull: # +Rebased-From: +``` + +Have a look at [an example backport PR]( +https://github.com/BGL/BGL/pull/16189). +Also see the [backport.py script]( +https://github.com/BGL-core/BGL-maintainer-tools#backport). Release Policy -------------- diff --git a/COPYING b/COPYING index 0b941f5011..5c0a5be139 100644 --- a/COPYING +++ b/COPYING @@ -1,7 +1,7 @@ The MIT License (MIT) Copyright (c) 2009-2019 The Bitcoin Core developers -Copyright (c) 2009-2019 BGL Developers +Copyright (c) 2019-2020 BGL 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/Makefile.am b/Makefile.am index 09ad9cd7e8..2ce3019644 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (c) 2013-2016 The Bitcoin Core developers +# Copyright (c) 2013-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -41,18 +41,9 @@ OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/BGL.icns OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed -OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW - -DIST_DOCS = \ - README.md \ - $(wildcard doc/*.md) \ - $(wildcard doc/release-notes/*.md) -DIST_CONTRIB = $(top_srcdir)/contrib/BGL-cli.bash-completion \ - $(top_srcdir)/contrib/BGL-tx.bash-completion \ - $(top_srcdir)/contrib/BGLd.bash-completion \ - $(top_srcdir)/contrib/debian/copyright \ - $(top_srcdir)/contrib/init \ - $(top_srcdir)/contrib/install_db4.sh \ +OSX_QT_TRANSLATIONS = ar,bg,ca,cs,da,de,es,fa,fi,fr,gd,gl,he,hu,it,ja,ko,lt,lv,pl,pt,ru,sk,sl,sv,uk,zh_CN,zh_TW + +DIST_CONTRIB = \ $(top_srcdir)/contrib/linearize/linearize-data.py \ $(top_srcdir)/contrib/linearize/linearize-hashes.py @@ -74,10 +65,10 @@ OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \ $(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \ $(top_srcdir)/contrib/macdeploy/detached-sig-create.sh -COVERAGE_INFO = baseline.info \ +COVERAGE_INFO = $(COV_TOOL_WRAPPER) baseline.info \ test_BGL_filtered.info total_coverage.info \ baseline_filtered.info functional_test.info functional_test_filtered.info \ - test_BGL_coverage.info test_BGL.info + test_BGL_coverage.info test_BGL.info fuzz.info fuzz_filtered.info fuzz_coverage.info dist-hook: -$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf - @@ -89,7 +80,7 @@ $(BGL_WIN_INSTALLER): all-recursive STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BGL_CLI_BIN) $(top_builddir)/release STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BGL_TX_BIN) $(top_builddir)/release STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BGL_WALLET_BIN) $(top_builddir)/release - @test -f $(MAKENSIS) && $(MAKENSIS) -V2 $(top_builddir)/share/setup.nsi || \ + @test -f $(MAKENSIS) && echo 'OutFile "$@"' | cat $(top_builddir)/share/setup.nsi - | $(MAKENSIS) -V2 - || \ echo error: could not build $@ @echo built $@ @@ -190,23 +181,40 @@ $(BGL_WALLET_BIN): FORCE 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/univalue" \ -p "src/crypto/ctaes" \ -p "src/secp256k1" \ -p "depends" -baseline.info: +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_BGL.info: baseline_filtered.info $(MAKE) -C src/ check $(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src -t test_BGL -o $@ @@ -225,12 +233,19 @@ 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_BGL_coverage.info: baseline_filtered.info test_BGL_filtered.info $(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_BGL_filtered.info -o $@ total_coverage.info: test_BGL_filtered.info functional_test_filtered.info $(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_BGL_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_BGL.coverage/.dirstamp: test_BGL_coverage.info $(GENHTML) -s $(LCOV_OPTS) $< -o $(@D) @touch $@ @@ -239,13 +254,15 @@ total.coverage/.dirstamp: total_coverage.info $(GENHTML) -s $(LCOV_OPTS) $< -o $(@D) @touch $@ +cov_fuzz: fuzz.coverage/.dirstamp + cov: test_BGL.coverage/.dirstamp total.coverage/.dirstamp endif dist_noinst_SCRIPTS = autogen.sh -EXTRA_DIST = $(DIST_SHARE) $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS) +EXTRA_DIST = $(DIST_SHARE) $(DIST_CONTRIB) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS) EXTRA_DIST += \ test/functional \ @@ -300,6 +317,8 @@ EXTRA_DIST += \ test/util/data/txcreatescript3.json \ test/util/data/txcreatescript4.hex \ test/util/data/txcreatescript4.json \ + test/util/data/txcreatescript5.hex \ + test/util/data/txcreatescript6.hex \ test/util/data/txcreatesignv1.hex \ test/util/data/txcreatesignv1.json \ test/util/data/txcreatesignv2.hex \ @@ -327,6 +346,17 @@ clean-docs: rm -rf doc/doxygen clean-local: clean-docs - rm -rf coverage_percent.txt test_BGL.coverage/ total.coverage/ test/tmp/ cache/ $(OSX_APP) + rm -rf coverage_percent.txt test_BGL.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/ dpi36.background.tiff dpi72.background.tiff + +test-security-check: +if TARGET_DARWIN + $(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_MACHO +endif +if TARGET_WINDOWS + $(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_PE +endif +if TARGET_LINUX + $(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/test-security-check.py TestSecurityChecks.test_ELF +endif diff --git a/README.md b/README.md index 165ace91ec..0378e0cfab 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ BGL Core integration/staging tree -===================================== What is BGL? ---------------- @@ -12,18 +11,131 @@ software which enables the use of this currency. Specifications -Essentially this is a full bitcoin fork, but: +Essentially this is a full BGL fork, but: * Block Reward = nFees*0.1 + GetBlockSubsidy() // Burn rate is 90% of tx fees -* Block Weight <= 400,000; // 10 times smaller than bitcoin +* Block Weight <= 400,000; // 10 times smaller than BGL * 100% Segwit // Eliminates problems with legacy types of transactions -* Halving Interval = 210000 blocks / 4; // Halving is every year (bitcoin halving is every 4 years) +* Halving Interval = 210000 blocks / 4; // Halving is every year (BGL halving is every 4 years) * Block Subsidy = 50 * 4; // 21 000 000 coins max * Hashing algorithm for blocks is Keccak (sha-3). +The `master` branch is regularly built (see doc/build-*.md for instructions) and tested, but is not guaranteed to be +completely stable. [Tags](https://github.com/BGL/BGL/tags) are created +regularly to indicate new official, stable release versions of BGL Core. -Official thread: https://bitcointalk.org/index.php?topic=5238559.0 +The https://github.com/BGL-core/gui repository is used exclusively for the +development of the GUI. Its master branch is identical in all monotree +repositories. Release branches and tags do not exist, so please do not fork +that repository unless it is for development reasons. + +Official thread: https://BGLtalk.org/index.php?topic=5238559.0 License ------- BGL Core is released under the terms of the MIT license. See [COPYING](COPYING) for more information or see https://opensource.org/licenses/MIT. +======= +libsecp256k1 +============ + +[![Build Status](https://travis-ci.org/bitcoin-core/secp256k1.svg?branch=master)](https://travis-ci.org/bitcoin-core/secp256k1) + +Optimized C library for ECDSA signatures and secret/public key operations on curve secp256k1. + +This library is intended to be the highest quality publicly available library for cryptography on the secp256k1 curve. However, the primary focus of its development has been for usage in the Bitcoin system and usage unlike Bitcoin's may be less well tested, verified, or suffer from a less well thought out interface. Correct usage requires some care and consideration that the library is fit for your application's purpose. + +Features: +* secp256k1 ECDSA signing/verification and key generation. +* Additive and multiplicative tweaking of secret/public keys. +* Serialization/parsing of secret keys, public keys, signatures. +* Constant time, constant memory access signing and public key generation. +* Derandomized ECDSA (via RFC6979 or with a caller provided function.) +* Very efficient implementation. +* Suitable for embedded systems. +* Optional module for public key recovery. +* Optional module for ECDH key exchange. + +Experimental features have not received enough scrutiny to satisfy the standard of quality of this library but are made available for testing and review by the community. The APIs of these features should not be considered stable. + +Implementation details +---------------------- + +* General + * No runtime heap allocation. + * Extensive testing infrastructure. + * Structured to facilitate review and analysis. + * Intended to be portable to any system with a C89 compiler and uint64_t support. + * No use of floating types. + * Expose only higher level interfaces to minimize the API surface and improve application security. ("Be difficult to use insecurely.") +* Field operations + * Optimized implementation of arithmetic modulo the curve's field size (2^256 - 0x1000003D1). + * Using 5 52-bit limbs (including hand-optimized assembly for x86_64, by Diederik Huys). + * Using 10 26-bit limbs (including hand-optimized assembly for 32-bit ARM, by Wladimir J. van der Laan). + * Field inverses and square roots using a sliding window over blocks of 1s (by Peter Dettman). +* Scalar operations + * Optimized implementation without data-dependent branches of arithmetic modulo the curve's order. + * Using 4 64-bit limbs (relying on __int128 support in the compiler). + * Using 8 32-bit limbs. +* Group operations + * Point addition formula specifically simplified for the curve equation (y^2 = x^3 + 7). + * Use addition between points in Jacobian and affine coordinates where possible. + * Use a unified addition/doubling formula where necessary to avoid data-dependent branches. + * Point/x comparison without a field inversion by comparison in the Jacobian coordinate space. +* Point multiplication for verification (a*P + b*G). + * Use wNAF notation for point multiplicands. + * Use a much larger window for multiples of G, using precomputed multiples. + * Use Shamir's trick to do the multiplication with the public key and the generator simultaneously. + * Use secp256k1's efficiently-computable endomorphism to split the P multiplicand into 2 half-sized ones. +* Point multiplication for signing + * Use a precomputed table of multiples of powers of 16 multiplied with the generator, so general multiplication becomes a series of additions. + * Intended to be completely free of timing sidechannels for secret-key operations (on reasonable hardware/toolchains) + * Access the table with branch-free conditional moves so memory access is uniform. + * No data-dependent branches + * Optional runtime blinding which attempts to frustrate differential power analysis. + * The precomputed tables add and eventually subtract points for which no known scalar (secret key) is known, preventing even an attacker with control over the secret key used to control the data internally. + +Build steps +----------- + +libsecp256k1 is built using autotools: + + $ ./autogen.sh + $ ./configure + $ make + $ make check + $ sudo make install # optional + +Exhaustive tests +----------- + + $ ./exhaustive_tests + +With valgrind, you might need to increase the max stack size: + + $ valgrind --max-stackframe=2500000 ./exhaustive_tests + +Test coverage +----------- + +This library aims to have full coverage of the reachable lines and branches. + +To create a test coverage report, configure with `--enable-coverage` (use of GCC is necessary): + + $ ./configure --enable-coverage + +Run the tests: + + $ make check + +To create a report, `gcovr` is recommended, as it includes branch coverage reporting: + + $ gcovr --exclude 'src/bench*' --print-summary + +To create a HTML report with coloured and annotated source code: + + $ gcovr --exclude 'src/bench*' --html --html-details -o coverage.html + +Reporting a vulnerability +------------ + +See [SECURITY.md](SECURITY.md) diff --git a/REVIEWERS b/REVIEWERS new file mode 100644 index 0000000000..fa9a8f525f --- /dev/null +++ b/REVIEWERS @@ -0,0 +1,131 @@ +# ============================================================================== +# Bitcoin Core REVIEWERS +# ============================================================================== + +# Configuration of automated review requests for the bitcoin/bitcoin repo +# via DrahtBot. + +# Order is not important; if a modified file or directory matches a fnmatch, +# the reviewer will be mentioned in a PR comment requesting a review. + +# Regular contributors are free to add their names to specific directories or +# files provided that they are willing to provide a review. + +# Absence from this list should not be interpreted as a discouragement to +# review a pull request. Peer review is always welcome and is a critical +# component of the progress of the codebase. Information on peer review +# guidelines can be found in the CONTRIBUTING.md doc. + + +# Maintainers +# @fanquake +# @jonasschnelli +# @laanwj +# @marcofalke +# @meshcollider +# @sipa + +# Docs +/doc/*[a-zA-Z-].md @harding +/doc/Doxyfile.in @fanquake +/doc/REST-interface.md @jonasschnelli +/doc/benchmarking.md @ariard +/doc/bitcoin-conf.md @hebasto +/doc/build-freebsd.md @fanquake +/doc/build-netbsd.md @fanquake +/doc/build-openbsd.md @laanwj +/doc/build-osx.md @fanquake +/doc/build-unix.md @laanwj +/doc/build-windows.md @sipsorcery +/doc/dependencies.md @fanquake +/doc/developer-notes.md @laanwj +/doc/files.md @hebasto +/doc/gitian-building.md @laanwj +/doc/reduce-memory.md @fanquake +/doc/reduce-traffic.md @jonasschnelli +/doc/release-process.md @laanwj +/doc/translation_strings_policy.md @laanwj + +# Build aux +/build-aux/m4/bitcoin_qt.m4 @hebasto + +# MSVC build system +/build_msvc/ @sipsorcery + +# Settings +/src/util/settings.* @ryanofsky + +# Fuzzing +/src/test/fuzz/ @practicalswift +/doc/fuzzing.md @practicalswift + +# Test framework +/test/functional/mempool_updatefromblock.py @hebasto +/test/functional/feature_asmap.py @jonatack +/test/functional/interface_bitcoin_cli.py @jonatack +/test/functional/tool_wallet.py @jonatack + +# Translations +/src/util/translation.h @hebasto + +# Dev Tools +/contrib/devtools/security-check.py @fanquake +/contrib/devtools/test-security-check.py @fanquake +/contrib/devtools/symbol-check.py @fanquake + +# Gitian/Guix +/contrib/gitian-build.py @hebasto +/contrib/guix/ @dongcarl + +# Compatibility +/src/compat/glibc_* @fanquake + +# GUI +/src/qt/forms/ @hebasto + +# Wallet +/src/wallet/ @achow101 + +# CLI +/src/bitcoin-cli.cpp @jonatack + +# Coinstats +/src/node/coinstats.* @fjahr + +# Index +/src/index/ @fjahr + +# Descriptors +*descriptor* @achow101 @sipa + +# Interfaces +/src/interfaces/ @ryanofsky + +# DB +/src/txdb.* @jamesob +/src/dbwrapper.* @jamesob + +# Scripts/Linter +*.sh @practicalswift +/test/lint/ @practicalswift +/test/lint/lint-shell.sh @hebasto + +# Bech32 +/src/bech32.* @sipa +/src/bench/bech32.* @sipa + +# PSBT +/src/psbt* @achow101 +/src/node/psbt* @achow101 +/doc/psbt.md @achow101 + +# P2P +/src/net_processing.* @sipa +/src/protocol.* @sipa + +# Consensus +/src/coins.* @sipa @jamesob +/src/script/script.* @sipa +/src/script/interpreter.* @sipa +/src/validation.* @sipa +/src/consensus/ @sipa diff --git a/SECURITY.md b/SECURITY.md index e6207b27ab..bf7070bc6d 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -13,8 +13,8 @@ The following keys may be used to communicate sensitive information to developer | Name | Fingerprint | |------|-------------| -| Wladimir van der Laan | 71A3 B167 3540 5025 D447 E8F2 7481 0B01 2346 C9A6 | -| Jonas Schnelli | 32EE 5C4C 3FA1 5CCA DB46 ABE5 29D4 BCB6 416F 53EC | | Pieter Wuille | 133E AC17 9436 F14A 5CF1 B794 860F EB80 4E66 9320 | +| Andrew Poelstra | 699A 63EF C17A D3A9 A34C FFC0 7AD0 A91C 40BD 0091 | +| Tim Ruffing | 09E0 3F87 1092 E40E 106E 902B 33BC 86AB 80FF 5516 | You can import a key by running the following command with that individual’s fingerprint: `gpg --recv-keys ""` Ensure that you put quotes around fingerprints containing spaces. diff --git a/autogen.sh b/autogen.sh index 3e922e7e64..de16260b56 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2013-2016 The Bitcoin Core developers +# 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. diff --git a/build-aux/m4/BGL_find_bdb48.m4 b/build-aux/m4/BGL_find_bdb48.m4 index d77ebfc6e8..6e4710225f 100644 --- a/build-aux/m4/BGL_find_bdb48.m4 +++ b/build-aux/m4/BGL_find_bdb48.m4 @@ -6,7 +6,9 @@ AC_DEFUN([BGL_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 "x$BDB_CFLAGS" = "x"; then + if test "x$use_bdb" = "xno"; then + use_bdb=no + elif test "x$BDB_CFLAGS" = "x"; then AC_MSG_CHECKING([for Berkeley DB C++ headers]) BDB_CPPFLAGS= bdbpath=X @@ -44,25 +46,30 @@ AC_DEFUN([BGL_FIND_BDB48],[ ],[]) done if test "x$bdbpath" = "xX"; then + use_bdb=no AC_MSG_RESULT([no]) - AC_MSG_ERROR([libdb_cxx headers missing, ]AC_PACKAGE_NAME[ requires this library for wallet functionality (--disable-wallet to disable wallet functionality)]) + AC_MSG_ERROR([libdb_cxx headers missing, ]AC_PACKAGE_NAME[ requires this library for BDB wallet support (--without-bdb to disable BDB wallet support)]) elif test "x$bdb48path" = "xX"; then BGL_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; wallets opened by this build will not be portable!]) + AC_MSG_WARN([Found Berkeley DB other than 4.8; BDB wallets opened by this build will not be portable!]) ],[ - AC_MSG_ERROR([Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)]) + AC_MSG_ERROR([Found Berkeley DB other than 4.8, required for portable BDB wallets (--with-incompatible-bdb to ignore or --without-bdb to disable BDB wallet support)]) ]) + use_bdb=yes else BGL_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 "x$BDB_LIBS" = "x"; then + if test "x$use_bdb" = "xno"; then + use_bdb=no + elif test "x$BDB_LIBS" = "x"; 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],[ @@ -71,8 +78,12 @@ AC_DEFUN([BGL_FIND_BDB48],[ ]) done if test "x$BDB_LIBS" = "x"; then - AC_MSG_ERROR([libdb_cxx missing, ]AC_PACKAGE_NAME[ requires this library for wallet functionality (--disable-wallet to disable wallet functionality)]) + AC_MSG_ERROR([libdb_cxx missing, ]AC_PACKAGE_NAME[ requires this library for BDB wallet support (--without-bdb to disable BDB wallet support)]) fi fi - AC_SUBST(BDB_LIBS) + if test "x$use_bdb" != "xno"; then + AC_SUBST(BDB_LIBS) + AC_DEFINE([USE_BDB], [1], [Define if BDB support should be compiled in]) + use_bdb=yes + fi ]) diff --git a/build-aux/m4/ax_boost_base.m4 b/build-aux/m4/ax_boost_base.m4 index 16fa69b41f..2ae33f7140 100644 --- a/build-aux/m4/ax_boost_base.m4 +++ b/build-aux/m4/ax_boost_base.m4 @@ -33,7 +33,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 47 +#serial 48 # example boost program (need to pass version) m4_define([_AX_BOOST_BASE_PROGRAM], @@ -123,6 +123,7 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[ 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}"] ) diff --git a/build-aux/m4/ax_boost_chrono.m4 b/build-aux/m4/ax_boost_chrono.m4 deleted file mode 100644 index 4cd3b86041..0000000000 --- a/build-aux/m4/ax_boost_chrono.m4 +++ /dev/null @@ -1,118 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_boost_chrono.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_CHRONO -# -# DESCRIPTION -# -# Test for Chrono library from the Boost C++ libraries. The macro requires -# a preceding call to AX_BOOST_BASE. Further documentation is available at -# . -# -# This macro calls: -# -# AC_SUBST(BOOST_CHRONO_LIB) -# -# And sets: -# -# HAVE_BOOST_CHRONO -# -# LICENSE -# -# Copyright (c) 2012 Xiyue Deng -# -# 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 5 - -AC_DEFUN([AX_BOOST_CHRONO], -[ - AC_ARG_WITH([boost-chrono], - AS_HELP_STRING([--with-boost-chrono@<:@=special-lib@:>@], - [use the Chrono library from boost - it is possible to specify a certain library for the linker - e.g. --with-boost-chrono=boost_chrono-gcc-mt ]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_chrono_lib="" - else - want_boost="yes" - ax_boost_user_chrono_lib="$withval" - fi - ], - [want_boost="yes"] - ) - - if test "x$want_boost" = "xyes"; then - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_BUILD]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_CACHE_CHECK(whether the Boost::Chrono library is available, - ax_cv_boost_chrono, - [AC_LANG_PUSH([C++]) - CXXFLAGS_SAVE=$CXXFLAGS - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], - [[boost::chrono::system_clock::time_point* time = new boost::chrono::system_clock::time_point; delete time;]])], - ax_cv_boost_chrono=yes, ax_cv_boost_chrono=no) - CXXFLAGS=$CXXFLAGS_SAVE - AC_LANG_POP([C++]) - ]) - if test "x$ax_cv_boost_chrono" = "xyes"; then - AC_SUBST(BOOST_CPPFLAGS) - - AC_DEFINE(HAVE_BOOST_CHRONO,,[define if the Boost::Chrono library is available]) - BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` - - LDFLAGS_SAVE=$LDFLAGS - if test "x$ax_boost_user_chrono_lib" = "x"; then - for libextension in `ls $BOOSTLIBDIR/libboost_chrono*.so* $BOOSTLIBDIR/libboost_chrono*.dylib* $BOOSTLIBDIR/libboost_chrono*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_chrono.*\)\.so.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.a.*$;\1;'` ; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break], - [link_chrono="no"]) - done - if test "x$link_chrono" != "xyes"; then - for libextension in `ls $BOOSTLIBDIR/boost_chrono*.dll* $BOOSTLIBDIR/boost_chrono*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_chrono.*\)\.dll.*$;\1;' -e 's;^\(boost_chrono.*\)\.a.*$;\1;'` ; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break], - [link_chrono="no"]) - done - fi - - else - for ax_lib in $ax_boost_user_chrono_lib boost_chrono-$ax_boost_user_chrono_lib; do - AC_CHECK_LIB($ax_lib, exit, - [BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break], - [link_chrono="no"]) - done - - fi - if test "x$ax_lib" = "x"; then - AC_MSG_ERROR(Could not find a version of the Boost::Chrono library!) - fi - if test "x$link_chrono" = "xno"; then - AC_MSG_ERROR(Could not link against $ax_lib !) - fi - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi -]) diff --git a/build-aux/m4/ax_boost_process.m4 b/build-aux/m4/ax_boost_process.m4 new file mode 100644 index 0000000000..5d20e67464 --- /dev/null +++ b/build-aux/m4/ax_boost_process.m4 @@ -0,0 +1,121 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_boost_process.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_BOOST_PROCESS +# +# DESCRIPTION +# +# Test for Process library from the Boost C++ libraries. The macro +# requires a preceding call to AX_BOOST_BASE. Further documentation is +# available at . +# +# This macro calls: +# +# AC_SUBST(BOOST_PROCESS_LIB) +# +# And sets: +# +# HAVE_BOOST_PROCESS +# +# LICENSE +# +# Copyright (c) 2008 Thomas Porschberg +# Copyright (c) 2008 Michael Tindal +# Copyright (c) 2008 Daniel Casimiro +# +# 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 2 + +AC_DEFUN([AX_BOOST_PROCESS], +[ + AC_ARG_WITH([boost-process], + AS_HELP_STRING([--with-boost-process@<:@=special-lib@:>@], + [use the Process library from boost - it is possible to specify a certain library for the linker + e.g. --with-boost-process=boost_process-gcc-mt ]), + [ + if test "$withval" = "no"; then + want_boost_process="no" + elif test "$withval" = "yes"; then + want_boost_process="yes" + ax_boost_user_process_lib="" + else + want_boost_process="yes" + ax_boost_user_process_lib="$withval" + fi + ], + [want_boost_process="yes"] + ) + + if test "x$want_boost_process" = "xyes"; then + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_BUILD]) + CPPFLAGS_SAVED="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" + export CPPFLAGS + + LDFLAGS_SAVED="$LDFLAGS" + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" + export LDFLAGS + + AC_CACHE_CHECK(whether the Boost::Process library is available, + ax_cv_boost_process, + [AC_LANG_PUSH([C++]) + CXXFLAGS_SAVE=$CXXFLAGS + CXXFLAGS= + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], + [[boost::process::child* child = new boost::process::child; delete child;]])], + ax_cv_boost_process=yes, ax_cv_boost_process=no) + CXXFLAGS=$CXXFLAGS_SAVE + AC_LANG_POP([C++]) + ]) + if test "x$ax_cv_boost_process" = "xyes"; then + AC_SUBST(BOOST_CPPFLAGS) + + AC_DEFINE(HAVE_BOOST_PROCESS,,[define if the Boost::Process library is available]) + BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` + + LDFLAGS_SAVE=$LDFLAGS + if test "x$ax_boost_user_process_lib" = "x"; then + for libextension in `ls -r $BOOSTLIBDIR/libboost_process* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_PROCESS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROCESS_LIB) link_process="yes"; break], + [link_process="no"]) + done + if test "x$link_process" != "xyes"; then + for libextension in `ls -r $BOOSTLIBDIR/boost_process* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_PROCESS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROCESS_LIB) link_process="yes"; break], + [link_process="no"]) + done + fi + + else + for ax_lib in $ax_boost_user_process_lib boost_process-$ax_boost_user_process_lib; do + AC_CHECK_LIB($ax_lib, exit, + [BOOST_PROCESS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROCESS_LIB) link_process="yes"; break], + [link_process="no"]) + done + + fi + if test "x$ax_lib" = "x"; then + AC_MSG_ERROR(Could not find a version of the Boost::Process library!) + fi + if test "x$link_process" = "xno"; then + AC_MSG_ERROR(Could not link against $ax_lib !) + fi + fi + + CPPFLAGS="$CPPFLAGS_SAVED" + LDFLAGS="$LDFLAGS_SAVED" + fi +]) diff --git a/build-aux/m4/ax_boost_thread.m4 b/build-aux/m4/ax_boost_thread.m4 index e9dea43535..75e80e6e75 100644 --- a/build-aux/m4/ax_boost_thread.m4 +++ b/build-aux/m4/ax_boost_thread.m4 @@ -30,7 +30,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 32 +#serial 33 AC_DEFUN([AX_BOOST_THREAD], [ @@ -67,13 +67,24 @@ AC_DEFUN([AX_BOOST_THREAD], [AC_LANG_PUSH([C++]) CXXFLAGS_SAVE=$CXXFLAGS - if test "x$host_os" = "xsolaris" ; then - CXXFLAGS="-pthreads $CXXFLAGS" - elif test "x$host_os" = "xmingw32" ; then - CXXFLAGS="-mthreads $CXXFLAGS" - else - CXXFLAGS="-pthread $CXXFLAGS" - fi + case "x$host_os" in + xsolaris ) + CXXFLAGS="-pthreads $CXXFLAGS" + break; + ;; + xmingw32 ) + CXXFLAGS="-mthreads $CXXFLAGS" + break; + ;; + *android* ) + break; + ;; + * ) + CXXFLAGS="-pthread $CXXFLAGS" + break; + ;; + esac + AC_COMPILE_IFELSE([ AC_LANG_PROGRAM( [[@%:@include ]], @@ -84,13 +95,23 @@ AC_DEFUN([AX_BOOST_THREAD], AC_LANG_POP([C++]) ]) if test "x$ax_cv_boost_thread" = "xyes"; then - if test "x$host_os" = "xsolaris" ; then - BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS" - elif test "x$host_os" = "xmingw32" ; then - BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS" - else - BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS" - fi + case "x$host_os" in + xsolaris ) + BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS" + break; + ;; + xmingw32 ) + BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS" + break; + ;; + *android* ) + break; + ;; + * ) + BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS" + break; + ;; + esac AC_SUBST(BOOST_CPPFLAGS) @@ -148,6 +169,9 @@ AC_DEFUN([AX_BOOST_THREAD], xmingw32 ) break; ;; + *android* ) + break; + ;; * ) BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread" break; diff --git a/build-aux/m4/ax_cxx_compile_stdcxx.m4 b/build-aux/m4/ax_cxx_compile_stdcxx.m4 index f147cee3b1..43087b2e68 100644 --- a/build-aux/m4/ax_cxx_compile_stdcxx.m4 +++ b/build-aux/m4/ax_cxx_compile_stdcxx.m4 @@ -1,5 +1,5 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html +# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html # =========================================================================== # # SYNOPSIS @@ -33,21 +33,23 @@ # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov # Copyright (c) 2015 Paul Norman # Copyright (c) 2015 Moritz Klammler +# Copyright (c) 2016, 2018 Krzesimir Nowak +# Copyright (c) 2019 Enji Cooper # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 4 +#serial 11 dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro dnl (serial version number 13). AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl - m4_if([$1], [11], [], - [$1], [14], [], - [$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])], + m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"], + [$1], [14], [ax_cxx_compile_alternatives="14 1y"], + [$1], [17], [ax_cxx_compile_alternatives="17 1z"], [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl m4_if([$2], [], [], [$2], [ext], [], @@ -57,26 +59,13 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], [$3], [optional], [ax_cxx_compile_cxx$1_required=false], [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) - m4_if([$4], [], [ax_cxx_compile_cxx$1_try_default=true], - [$4], [default], [ax_cxx_compile_cxx$1_try_default=true], - [$4], [nodefault], [ax_cxx_compile_cxx$1_try_default=false], - [m4_fatal([invalid fourth argument `$4' to AX_CXX_COMPILE_STDCXX])]) AC_LANG_PUSH([C++])dnl ac_success=no - m4_if([$4], [nodefault], [], [dnl - AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, - ax_cv_cxx_compile_cxx$1, - [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [ax_cv_cxx_compile_cxx$1=yes], - [ax_cv_cxx_compile_cxx$1=no])]) - if test x$ax_cv_cxx_compile_cxx$1 = xyes; then - ac_success=yes - fi]) - m4_if([$2], [noext], [], [dnl if test x$ac_success = xno; then - for switch in -std=gnu++$1 -std=gnu++0x; do + for alternative in ${ax_cxx_compile_alternatives}; do + switch="-std=gnu++${alternative}" cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, $cachevar, @@ -102,22 +91,27 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl dnl HP's aCC needs +std=c++11 according to: dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf dnl Cray's crayCC needs "-h std=c++11" - for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, - $cachevar, - [ac_save_CXX="$CXX" - CXX="$CXX $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXX="$ac_save_CXX"]) - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" + for alternative in ${ax_cxx_compile_alternatives}; do + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, + [ac_save_CXX="$CXX" + CXX="$CXX $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXX="$ac_save_CXX"]) + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi + ac_success=yes + break fi - ac_success=yes + done + if test x$ac_success = xyes; then break fi done @@ -154,6 +148,11 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 ) +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 +) dnl Tests for new features in C++11 @@ -191,11 +190,13 @@ namespace cxx11 struct Base { + virtual ~Base() {} virtual void f() {} }; struct Derived : public Base { + virtual ~Derived() override {} virtual void f() override {} }; @@ -524,7 +525,7 @@ namespace cxx14 } - namespace test_digit_seperators + namespace test_digit_separators { constexpr auto ten_million = 100'000'000; @@ -566,3 +567,385 @@ 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 + +]]) diff --git a/build-aux/m4/ax_pthread.m4 b/build-aux/m4/ax_pthread.m4 index 4c4051ea37..1598d077ff 100644 --- a/build-aux/m4/ax_pthread.m4 +++ b/build-aux/m4/ax_pthread.m4 @@ -1,5 +1,5 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_pthread.html +# https://www.gnu.org/software/autoconf-archive/ax_pthread.html # =========================================================================== # # SYNOPSIS @@ -55,6 +55,7 @@ # # Copyright (c) 2008 Steven G. Johnson # Copyright (c) 2011 Daniel Richard G. +# Copyright (c) 2019 Marc Stevens # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -67,7 +68,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -82,7 +83,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 23 +#serial 27 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ @@ -123,10 +124,12 @@ fi # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. +# Create a list of thread flags to try. Items with a "," contain both +# C compiler flags (before ",") and linker flags (after ","). Other items +# starting with a "-" are C compiler flags, and remaining items are +# library names, except for "none" which indicates that we try without +# any flags at all, and "pthread-config" which is a program returning +# the flags for the Pth emulation library. ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" @@ -194,14 +197,47 @@ case $host_os in # that too in a future libc.) So we'll check first for the # standard Solaris way of linking pthreads (-mt -lpthread). - ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" + ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags" ;; esac +# Are we compiling with Clang? + +AC_CACHE_CHECK([whether $CC is Clang], + [ax_cv_PTHREAD_CLANG], + [ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], + [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif + ], + [ax_cv_PTHREAD_CLANG=yes]) + fi + ]) +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" + + # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) +# Note that for GCC and Clang -pthread generally implies -lpthread, +# except when -nostdlib is passed. +# This is problematic using libtool to build C++ shared libraries with pthread: +# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 +# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333 +# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 +# To solve this, first try -pthread together with -lpthread for GCC + AS_IF([test "x$GCC" = "xyes"], - [ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"]) + [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"]) + +# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first + +AS_IF([test "x$ax_pthread_clang" = "xyes"], + [ax_pthread_flags="-pthread,-lpthread -pthread"]) + # The presence of a feature test macro requesting re-entrant function # definitions is, on some systems, a strong hint that pthreads support is @@ -224,25 +260,86 @@ AS_IF([test "x$ax_pthread_check_macro" = "x--"], [ax_pthread_check_cond=0], [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) -# Are we compiling with Clang? -AC_CACHE_CHECK([whether $CC is Clang], - [ax_cv_PTHREAD_CLANG], - [ax_cv_PTHREAD_CLANG=no - # Note that Autoconf sets GCC=yes for Clang as well as GCC - if test "x$GCC" = "xyes"; then - AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], - [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ -# if defined(__clang__) && defined(__llvm__) - AX_PTHREAD_CC_IS_CLANG -# endif - ], - [ax_cv_PTHREAD_CLANG=yes]) - fi - ]) -ax_pthread_clang="$ax_cv_PTHREAD_CLANG" +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do + + case $ax_pthread_try_flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + *,*) + PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"` + PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"` + AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) + PTHREAD_CFLAGS="$ax_pthread_try_flag" + ;; + + pthread-config) + AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) + AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) + PTHREAD_LIBS="-l$ax_pthread_try_flag" + ;; + esac + + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void *some_global = NULL; + static void routine(void *a) + { + /* To avoid any unused-parameter or + unused-but-set-parameter warning. */ + some_global = a; + } + static void *start_routine(void *a) { return a; }], + [pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */])], + [ax_pthread_ok=yes], + []) + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + AC_MSG_RESULT([$ax_pthread_ok]) + AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi -ax_pthread_clang_warning=no # Clang needs special handling, because older versions handle the -pthread # option in a rather... idiosyncratic way @@ -261,11 +358,6 @@ if test "x$ax_pthread_clang" = "xyes"; then # -pthread does define _REENTRANT, and while the Darwin headers # ignore this macro, third-party headers might not.) - PTHREAD_CFLAGS="-pthread" - PTHREAD_LIBS= - - ax_pthread_ok=yes - # However, older versions of Clang make a point of warning the user # that, in an invocation where only linking and no compilation is # taking place, the -pthread option has no effect ("argument unused @@ -320,78 +412,7 @@ if test "x$ax_pthread_clang" = "xyes"; then fi # $ax_pthread_clang = yes -if test "x$ax_pthread_ok" = "xno"; then -for ax_pthread_try_flag in $ax_pthread_flags; do - - case $ax_pthread_try_flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -mt,pthread) - AC_MSG_CHECKING([whether pthreads work with -mt -lpthread]) - PTHREAD_CFLAGS="-mt" - PTHREAD_LIBS="-lpthread" - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) - PTHREAD_CFLAGS="$ax_pthread_try_flag" - ;; - - pthread-config) - AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) - AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - *) - AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) - PTHREAD_LIBS="-l$ax_pthread_try_flag" - ;; - esac - - ax_pthread_save_CFLAGS="$CFLAGS" - ax_pthread_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include -# if $ax_pthread_check_cond -# error "$ax_pthread_check_macro must be defined" -# endif - static void routine(void *a) { a = 0; } - static void *start_routine(void *a) { return a; }], - [pthread_t th; pthread_attr_t attr; - pthread_create(&th, 0, start_routine, 0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0) /* ; */])], - [ax_pthread_ok=yes], - []) - - CFLAGS="$ax_pthread_save_CFLAGS" - LIBS="$ax_pthread_save_LIBS" - - AC_MSG_RESULT([$ax_pthread_ok]) - AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi # Various other checks: if test "x$ax_pthread_ok" = "xyes"; then @@ -438,7 +459,8 @@ if test "x$ax_pthread_ok" = "xyes"; then AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], [ax_cv_PTHREAD_PRIO_INHERIT], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[int i = PTHREAD_PRIO_INHERIT;]])], + [[int i = PTHREAD_PRIO_INHERIT; + return i;]])], [ax_cv_PTHREAD_PRIO_INHERIT=yes], [ax_cv_PTHREAD_PRIO_INHERIT=no]) ]) diff --git a/build_msvc/.gitignore b/build_msvc/.gitignore index c65d4909dc..b377e1257c 100644 --- a/build_msvc/.gitignore +++ b/build_msvc/.gitignore @@ -8,7 +8,20 @@ packages/* */Release */x64 *.vcxproj.user -*.vcxproj + +# .vcxproj files that are auto-generated by the msvc-autogen.py script. +libBGL_cli/libBGL_cli.vcxproj +libBGL_common/libBGL_common.vcxproj +libBGL_crypto/libBGL_crypto.vcxproj +libBGL_server/libBGL_server.vcxproj +libBGL_util/libBGL_util.vcxproj +libBGL_wallet_tool/libBGL_wallet_tool.vcxproj +libBGL_wallet/libBGL_wallet.vcxproj +libBGL_zmq/libBGL_zmq.vcxproj +bench_BGL/bench_BGL.vcxproj +libtest_util/libtest_util.vcxproj + */Win32 libBGL_qt/QtGeneratedFiles/* test_BGL-qt/QtGeneratedFiles/* +vcpkg_installed diff --git a/build_msvc/BGL_config.h b/build_msvc/BGL_config.h index 54ecdb7f8e..67351547cd 100644 --- a/build_msvc/BGL_config.h +++ b/build_msvc/BGL_config.h @@ -1,3 +1,7 @@ +// 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 BGL_BGL_CONFIG_H #define BGL_BGL_CONFIG_H @@ -11,19 +15,16 @@ #define CLIENT_VERSION_IS_RELEASE true /* Major version */ -#define CLIENT_VERSION_MAJOR 0 +#define CLIENT_VERSION_MAJOR 21 /* Minor version */ -#define CLIENT_VERSION_MINOR 1 - -/* Build revision */ -#define CLIENT_VERSION_REVISION 1 +#define CLIENT_VERSION_MINOR 99 /* Copyright holder(s) before %s replacement */ #define COPYRIGHT_HOLDERS "The %s developers" /* Copyright holder(s) */ -#define COPYRIGHT_HOLDERS_FINAL "The Bitcoin Core developers / BGL Core developers" +#define COPYRIGHT_HOLDERS_FINAL "The BGL Core developers / BGL Core developers" /* Replacement for %s in copyright holders string */ #define COPYRIGHT_HOLDERS_SUBSTITUTION "BGL Core" @@ -34,23 +35,23 @@ /* 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 to 1 to enable ZMQ functions */ #define ENABLE_ZMQ 1 -/* parameter and return value type for __fdelt_chk */ -/* #undef FDELT_TYPE */ - /* define if the Boost library is available */ #define HAVE_BOOST /**/ -/* define if the Boost::Chrono library is available */ -#define HAVE_BOOST_CHRONO /**/ - /* define if the Boost::Filesystem library is available */ #define HAVE_BOOST_FILESYSTEM /**/ -/* define if the Boost::PROGRAM_OPTIONS library is available */ -#define HAVE_BOOST_PROGRAM_OPTIONS /**/ +/* define if the Boost::Process library is available */ +#define HAVE_BOOST_PROCESS /**/ /* define if the Boost::System library is available */ #define HAVE_BOOST_SYSTEM /**/ @@ -142,18 +143,6 @@ don't. */ #define HAVE_DECL_STRNLEN 1 -/* Define to 1 if you have the declaration of `__builtin_clz', and to 0 if you - don't. */ -//#define HAVE_DECL___BUILTIN_CLZ 1 - -/* Define to 1 if you have the declaration of `__builtin_clzl', and to 0 if - you don't. */ -//#define HAVE_DECL___BUILTIN_CLZL 1 - -/* Define to 1 if you have the declaration of `__builtin_clzll', and to 0 if - you don't. */ -//#define HAVE_DECL___BUILTIN_CLZLL 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_DLFCN_H */ @@ -179,75 +168,6 @@ /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 -/* Define to 1 if you have the `advapi32' library (-ladvapi32). */ -#define HAVE_LIBADVAPI32 1 - -/* Define to 1 if you have the `comctl32' library (-lcomctl32). */ -#define HAVE_LIBCOMCTL32 1 - -/* Define to 1 if you have the `comdlg32' library (-lcomdlg32). */ -#define HAVE_LIBCOMDLG32 1 - -/* Define to 1 if you have the `crypt32' library (-lcrypt32). */ -#define HAVE_LIBCRYPT32 1 - -/* Define to 1 if you have the `gdi32' library (-lgdi32). */ -#define HAVE_LIBGDI32 1 - -/* Define to 1 if you have the `imm32' library (-limm32). */ -#define HAVE_LIBIMM32 1 - -/* Define to 1 if you have the `iphlpapi' library (-liphlpapi). */ -#define HAVE_LIBIPHLPAPI 1 - -/* Define to 1 if you have the `kernel32' library (-lkernel32). */ -#define HAVE_LIBKERNEL32 1 - -/* Define to 1 if you have the `mingwthrd' library (-lmingwthrd). */ -#define HAVE_LIBMINGWTHRD 1 - -/* Define to 1 if you have the `mswsock' library (-lmswsock). */ -#define HAVE_LIBMSWSOCK 1 - -/* Define to 1 if you have the `ole32' library (-lole32). */ -#define HAVE_LIBOLE32 1 - -/* Define to 1 if you have the `oleaut32' library (-loleaut32). */ -#define HAVE_LIBOLEAUT32 1 - -/* Define to 1 if you have the `rpcrt4' library (-lrpcrt4). */ -#define HAVE_LIBRPCRT4 1 - -/* Define to 1 if you have the `rt' library (-lrt). */ -/* #undef HAVE_LIBRT */ - -/* Define to 1 if you have the `shell32' library (-lshell32). */ -#define HAVE_LIBSHELL32 1 - -/* Define to 1 if you have the `shlwapi' library (-lshlwapi). */ -#define HAVE_LIBSHLWAPI 1 - -/* Define to 1 if you have the `ssp' library (-lssp). */ -#define HAVE_LIBSSP 1 - -/* Define to 1 if you have the `user32' library (-luser32). */ -#define HAVE_LIBUSER32 1 - -/* Define to 1 if you have the `uuid' library (-luuid). */ -#define HAVE_LIBUUID 1 - -/* Define to 1 if you have the `winmm' library (-lwinmm). */ -#define HAVE_LIBWINMM 1 - -/* Define to 1 if you have the `winspool' library (-lwinspool). */ -#define HAVE_LIBWINSPOOL 1 - -/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ -#define HAVE_LIBWS2_32 1 - -/* Define to 1 if you have the `z ' library (-lz ). */ -#define HAVE_LIBZ_ 1 - /* Define this symbol if you have malloc_info */ /* #undef HAVE_MALLOC_INFO */ @@ -326,12 +246,6 @@ /* Define if the visibility attribute is supported. */ #define HAVE_VISIBILITY_ATTRIBUTE 1 -/* Define this symbol if boost sleep works */ -/* #undef HAVE_WORKING_BOOST_SLEEP */ - -/* Define this symbol if boost sleep_for works */ -#define HAVE_WORKING_BOOST_SLEEP_FOR 1 - /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" @@ -342,7 +256,7 @@ #define PACKAGE_NAME "BGL Core" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "BGL Core 0.19.99" +#define PACKAGE_STRING "BGL Core 21.99.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "BGL" @@ -351,7 +265,7 @@ #define PACKAGE_URL "https://BGLcore.org/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.19.99" +#define PACKAGE_VERSION "21.99.0" /* Define to necessary symbol if this constant uses a non-standard name on your system. */ @@ -381,9 +295,6 @@ /* Define this symbol to build in assembly routines */ //#define USE_ASM 1 -/* Define this symbol if coverage is enabled */ -/* #undef USE_COVERAGE */ - /* Define if dbus support should be compiled in */ /* #undef USE_DBUS */ diff --git a/build_msvc/README.md b/build_msvc/README.md index 5ca22b6302..ba992fc6be 100644 --- a/build_msvc/README.md +++ b/build_msvc/README.md @@ -12,9 +12,9 @@ Quick Start The minimal steps required to build BGL Core with the msbuild toolchain are below. More detailed instructions are contained in the following sections. ``` -vcpkg install --triplet x64-windows-static boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent zeromq berkeleydb rapidcheck double-conversion -py -3 build_msvc\msvc-autogen.py -msbuild /m build_msvc\BGL.sln /p:Platform=x64 /p:Configuration=Release /t:build +cd build_msvc +py -3 msvc-autogen.py +msbuild /m BGL.sln /p:Platform=x64 /p:Configuration=Release /t:build ``` Dependencies @@ -27,21 +27,15 @@ Options for installing the dependencies in a Visual Studio compatible manner are - Download the source code, build each dependency, add the required include paths, link libraries and binary tools to the Visual Studio project files. - Use [nuget](https://www.nuget.org/) packages with the understanding that any binary files have been compiled by an untrusted third party. -The [external dependencies](https://github.com/BGL/BGL/blob/master/doc/dependencies.md) required for building are: - -- Berkeley DB -- Boost -- DoubleConversion -- libevent -- Qt5 -- RapidCheck -- ZeroMQ +The [external dependencies](https://github.com/BGL/BGL/blob/master/doc/dependencies.md) required for building are listed in the `build_msvc/vcpkg.json` file. The `msbuild` project files are configured to automatically install the `vcpkg` dependencies. Qt --------------------- In order to build the BGL Core a static build of Qt is required. The runtime library version (e.g. v141, v142) and platform type (x86 or x64) must also match. -A prebuilt version of Qt can be downloaded from [here](https://github.com/sipsorcery/qt_win_binary/releases). Please be aware this download is NOT an officially sanctioned BGL Core distribution and is provided for developer convenience. It should NOT be used for builds that will be used in a production environment or with real funds. +Some prebuilt x64 versions of Qt can be downloaded from [here](https://github.com/sipsorcery/qt_win_binary/releases). Please be aware these downloads are NOT officially sanctioned by BGL Core and are provided for developer convenience only. They should NOT be used for builds that will be used in a production environment or with real funds. + +To determine which Qt prebuilt version to download open the `.appveyor.yml` file and note the `QT_DOWNLOAD_URL`. When extracting the zip file the destination path must be set to `C:\`. This is due to the way that Qt includes, libraries and tools use internal paths. To build BGL Core without Qt unload or disable the `BGL-qt`, `libBGL_qt` and `test_BGL-qt` projects. @@ -50,11 +44,6 @@ Building The instructions below use `vcpkg` to install the dependencies. - Install [`vcpkg`](https://github.com/Microsoft/vcpkg). -- Install the required packages (replace x64 with x86 as required). The list of required packages can be found in the `build_msvc\vcpkg-packages.txt` file. The PowerShell command below will work if run from the repository root directory and `vcpkg` is in the path. Alternatively the contents of the packages text file can be pasted in place of the `Get-Content` cmdlet. - -``` -PS >.\vcpkg install --triplet x64-windows-static $(Get-Content -Path build_msvc\vcpkg-packages.txt).split() -``` - Use Python to generate `*.vcxproj` from Makefile @@ -62,20 +51,22 @@ PS >.\vcpkg install --triplet x64-windows-static $(Get-Content -Path build_msvc\ PS >py -3 msvc-autogen.py ``` -- An optional step is to adjust the settings in the build_msvc directory and the common.init.vcxproj file. This project file contains settings that are common to all projects such as the runtime library version and target Windows SDK version. The Qt directories can also be set. +- An optional step is to adjust the settings in the `build_msvc` directory and the `common.init.vcxproj` file. This project file contains settings that are common to all projects such as the runtime library version and target Windows SDK version. The Qt directories can also be set. -- Build with Visual Studio 2017 or msbuild. +- To build from the command line with the Visual Studio 2017 toolchain use: ``` msbuild /m BGL.sln /p:Platform=x64 /p:Configuration=Release /p:PlatformToolset=v141 /t:build ``` -- Build with Visual Studio 2019 or msbuild. +- To build from the command line with the Visual Studio 2019 toolchain use: ``` msbuild /m BGL.sln /p:Platform=x64 /p:Configuration=Release /t:build ``` +- Alternatively open the `build_msvc\BGL.sln` file in Visual Studio. + AppVeyor --------------------- The .appveyor.yml in the root directory is suitable to perform builds on [AppVeyor](https://www.appveyor.com/) Continuous Integration servers. The simplest way to perform an AppVeyor build is to fork BGL Core and then configure a new AppVeyor Project pointing to the forked repository. diff --git a/build_msvc/common.init.vcxproj b/build_msvc/common.init.vcxproj new file mode 100644 index 0000000000..9c589bccbc --- /dev/null +++ b/build_msvc/common.init.vcxproj @@ -0,0 +1,114 @@ + + + + + + 16.0 + true + + + + true + true + true + true + true + $(Configuration) + x86-windows-static + x64-windows-static + + + + $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) + $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) + + $(WindowsTargetPlatformVersion_10).0 + $(WindowsTargetPlatformVersion_10) + + + + + Release + x64 + + + Debug + x64 + + + Release + Win32 + + + Debug + Win32 + + + + + false + false + v142 + Unicode + No + $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ + $(Platform)\$(Configuration)\$(ProjectName)\ + + + + true + true + v142 + 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 /std:c++17 %(AdditionalOptions) + 4018;4221;4244;4267;4334;4715;4805;4834 + true + _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + ..\..\src;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories) + + + Console + 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) + + + /ignore:4221 + + + + diff --git a/build_msvc/libBGL_util/libBGL_util.vcxproj.in b/build_msvc/libBGL_util/libBGL_util.vcxproj.in index adf4fa0354..6ec40461c2 100644 --- a/build_msvc/libBGL_util/libBGL_util.vcxproj.in +++ b/build_msvc/libBGL_util/libBGL_util.vcxproj.in @@ -8,6 +8,7 @@ StaticLibrary + @SOURCE_FILES@ diff --git a/build_msvc/libBGL_wallet/libBGL_wallet.vcxproj.in b/build_msvc/libBGL_wallet/libBGL_wallet.vcxproj.in index 9c8279c72a..613d5c7199 100644 --- a/build_msvc/libBGL_wallet/libBGL_wallet.vcxproj.in +++ b/build_msvc/libBGL_wallet/libBGL_wallet.vcxproj.in @@ -8,6 +8,9 @@ StaticLibrary + + + @SOURCE_FILES@ diff --git a/build_msvc/libleveldb/libleveldb.vcxproj b/build_msvc/libleveldb/libleveldb.vcxproj new file mode 100644 index 0000000000..cabc177557 --- /dev/null +++ b/build_msvc/libleveldb/libleveldb.vcxproj @@ -0,0 +1,61 @@ + + + + + {18430FEF-6B61-4C53-B396-718E02850F1B} + + + StaticLibrary + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HAVE_CRC32C=0;HAVE_SNAPPY=0;__STDC_LIMIT_MACROS;LEVELDB_IS_BIG_ENDIAN=0;_UNICODE;UNICODE;_CRT_NONSTDC_NO_DEPRECATE;LEVELDB_PLATFORM_WINDOWS;LEVELDB_ATOMIC_PRESENT;%(PreprocessorDefinitions) + 4244;4267;4312; + ..\..\src\leveldb;..\..\src\leveldb\include;%(AdditionalIncludeDirectories) + + + + + + diff --git a/build_msvc/libsecp256k1_config.h b/build_msvc/libsecp256k1_config.h index 81d9aca963..97b61b54f2 100644 --- a/build_msvc/libsecp256k1_config.h +++ b/build_msvc/libsecp256k1_config.h @@ -26,4 +26,7 @@ #define USE_FIELD_10X26 1 #define USE_SCALAR_8X32 1 +#define ECMULT_GEN_PREC_BITS 4 +#define ECMULT_WINDOW_SIZE 15 + #endif /* BGL_LIBSECP256K1_CONFIG_H */ diff --git a/build_msvc/msvc-autogen.py b/build_msvc/msvc-autogen.py index 7aa10a9017..d2ab71ae91 100644 --- a/build_msvc/msvc-autogen.py +++ b/build_msvc/msvc-autogen.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2016-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. import os import re diff --git a/build_msvc/test_bitcoin/test_bitcoin.vcxproj b/build_msvc/test_bitcoin/test_bitcoin.vcxproj new file mode 100644 index 0000000000..5c4b777d51 --- /dev/null +++ b/build_msvc/test_bitcoin/test_bitcoin.vcxproj @@ -0,0 +1,73 @@ + + + + + {A56B73DB-D46D-4882-8374-1FE3FFA08F07} + + + Application + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + + + + + + + + + + {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/testconsensus/testconsensus.cpp b/build_msvc/testconsensus/testconsensus.cpp index f0efaedf7f..8413c37225 100644 --- a/build_msvc/testconsensus/testconsensus.cpp +++ b/build_msvc/testconsensus/testconsensus.cpp @@ -1,3 +1,7 @@ +// Copyright (c) 2018-2019 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #include // BGL includes. diff --git a/build_msvc/vcpkg-packages.txt b/build_msvc/vcpkg-packages.txt deleted file mode 100644 index 27e2bbdcde..0000000000 --- a/build_msvc/vcpkg-packages.txt +++ /dev/null @@ -1 +0,0 @@ -berkeleydb boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent[thread] rapidcheck zeromq double-conversion \ No newline at end of file diff --git a/build_msvc/vcpkg.json b/build_msvc/vcpkg.json new file mode 100644 index 0000000000..dfd3929c44 --- /dev/null +++ b/build_msvc/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "bitcoin-core", + "version-string": "1", + "dependencies": [ + "berkeleydb", + "boost-filesystem", + "boost-multi-index", + "boost-process", + "boost-signals2", + "boost-test", + "boost-thread", + "sqlite3", + "double-conversion", + { + "name": "libevent", + "features": ["thread"] + }, + "zeromq" + ] +} diff --git a/ci/README.md b/ci/README.md index 880e49b459..3c5f04c39e 100644 --- a/ci/README.md +++ b/ci/README.md @@ -1,19 +1,15 @@ -## ci scripts +## CI Scripts This directory contains scripts for each build step in each build stage. -Currently three stages `lint`, `extended_lint` and `test` are defined. Each stage has its own lifecycle, similar to the -[Travis CI lifecycle](https://docs.travis-ci.com/user/job-lifecycle#the-job-lifecycle). Every script in here is named -and numbered according to which stage and lifecycle step it belongs to. - -### Running a stage locally +### Running a Stage Locally Be aware that the tests will be built and run in-place, so please run at your own risk. If the repository is not a fresh git clone, you might have to clean files from previous builds or test runs first. The ci needs to perform various sysadmin tasks such as installing packages or writing to the user's home directory. While most of the actions are done inside a docker container, this is not possible for all. Thus, cache directories, -such as the depends cache or ccache, are mounted as read-write into the docker container. While it should be fine to run +such as the depends cache, previous release binaries, or ccache, are mounted as read-write into the docker container. 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 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. @@ -36,3 +32,34 @@ To run the test stage with a specific configuration, ``` FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh ``` + +### Configurations + +The test files (`FILE_ENV`) are constructed to test a wide range of +configurations, rather than a single pass/fail. This helps to catch build +failures and logic errors that present on platforms other than the ones the +author has tested. + +Some builders use the dependency-generator in `./depends`, rather than using +the system package manager to install build dependencies. This guarantees that +the tester is using the same versions as the release builds, which also use +`./depends`. + +If no `FILE_ENV` has been specified or values are left out, `00_setup_env.sh` +is used as the default configuration with fallback values. + +It is also possible to force a specific configuration without modifying the +file. For example, + +``` +MAKEJOBS="-j1" FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh +``` + +The files starting with `0n` (`n` greater than 0) are the scripts that are run +in order. + +### Cache + +In order to avoid rebuilding all dependencies for each build, the binaries are +cached and re-used when possible. Changes in the dependency-generator will +trigger cache-invalidation and rebuilds as necessary. diff --git a/ci/lint/04_install.sh b/ci/lint/04_install.sh index 8b2d609504..fae424051d 100755 --- a/ci/lint/04_install.sh +++ b/ci/lint/04_install.sh @@ -6,10 +6,15 @@ export LC_ALL=C -travis_retry pip3 install codespell==1.15.0 -travis_retry pip3 install flake8==3.7.8 +travis_retry sudo apt update && sudo apt install -y clang-format-9 +sudo update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-9 ) 100 +sudo update-alternatives --install /usr/bin/clang-format-diff clang-format-diff $(which clang-format-diff-9) 100 + +travis_retry pip3 install codespell==1.17.1 +travis_retry pip3 install flake8==3.8.3 travis_retry pip3 install yq +travis_retry pip3 install mypy==0.781 -SHELLCHECK_VERSION=v0.6.0 -curl -s "https://storage.googleapis.com/shellcheck/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/ +SHELLCHECK_VERSION=v0.7.1 +curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/ export PATH="/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}" diff --git a/ci/lint/05_before_script.sh b/ci/lint/05_before_script.sh index 28bcbb47f7..2987812c8e 100755 --- a/ci/lint/05_before_script.sh +++ b/ci/lint/05_before_script.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2018 The Bitcoin Core developers +# Copyright (c) 2018-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/ci/lint/06_script.sh b/ci/lint/06_script.sh index 7f1dedc721..94279a8144 100755 --- a/ci/lint/06_script.sh +++ b/ci/lint/06_script.sh @@ -1,19 +1,24 @@ #!/usr/bin/env bash # -# Copyright (c) 2018 The Bitcoin Core developers +# Copyright (c) 2018-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then - test/lint/commit-script-check.sh $TRAVIS_COMMIT_RANGE + # TRAVIS_BRANCH will be present in a Travis environment. For builds triggered + # by a pull request this is the name of the branch targeted by the pull request. + # https://docs.travis-ci.com/user/environment-variables/ + COMMIT_RANGE="$TRAVIS_BRANCH..HEAD" + test/lint/commit-script-check.sh $COMMIT_RANGE fi test/lint/git-subtree-check.sh src/crypto/ctaes test/lint/git-subtree-check.sh src/secp256k1 test/lint/git-subtree-check.sh src/univalue test/lint/git-subtree-check.sh src/leveldb +test/lint/git-subtree-check.sh src/crc32c test/lint/check-doc.py test/lint/check-rpc-mappings.py . test/lint/lint-all.sh diff --git a/ci/test/00_setup_env.sh b/ci/test/00_setup_env.sh index d72ba1522c..d86f65a5f3 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 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8 # The root dir. # The ci system copies this folder. -# This is where the build is done (depends and dist). +# This is where the depends build is done. BASE_ROOT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../../ >/dev/null 2>&1 && pwd ) export BASE_ROOT_DIR @@ -24,20 +24,32 @@ echo "Fallback to default values in env (if not yet set)" export MAKEJOBS=${MAKEJOBS:--j4} # A folder for the ci system to put temporary files (ccache, datadirs for tests, ...) # This folder only exists on the ci host. -export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch/} +export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch} # What host to compile for. See also ./depends/README.md # Tests that need cross-compilation export the appropriate HOST. # Tests that run natively guess the host export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")} # Whether to prefer BusyBox over GNU utilities export USE_BUSY_BOX=${USE_BUSY_BOX:-false} + export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-true} export RUN_FUNCTIONAL_TESTS=${RUN_FUNCTIONAL_TESTS:-true} +export RUN_SECURITY_TESTS=${RUN_SECURITY_TESTS:-false} +# By how much to scale the test_runner timeouts (option --timeout-factor). +# This is needed because some ci machines have slow CPU or disk, so sanitizers +# might be slow or a reindex might be waiting on disk IO. +export TEST_RUNNER_TIMEOUT_FACTOR=${TEST_RUNNER_TIMEOUT_FACTOR:-40} +export TEST_RUNNER_ENV=${TEST_RUNNER_ENV:-} export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false} +export EXPECTED_TESTS_DURATION_IN_SECONDS=${EXPECTED_TESTS_DURATION_IN_SECONDS:-1000} + +export CONTAINER_NAME=${CONTAINER_NAME:-ci_unnamed} export DOCKER_NAME_TAG=${DOCKER_NAME_TAG:-ubuntu:18.04} # Randomize test order. # See https://www.boost.org/doc/libs/1_71_0/libs/test/doc/html/boost_test/utf_reference/rt_param_reference/random.html export BOOST_TEST_RANDOM=${BOOST_TEST_RANDOM:-1} +# See man 7 debconf +export DEBIAN_FRONTEND=noninteractive export CCACHE_SIZE=${CCACHE_SIZE:-100M} export CCACHE_TEMPDIR=${CCACHE_TEMPDIR:-/tmp/.ccache-temp} export CCACHE_COMPRESS=${CCACHE_COMPRESS:-1} @@ -47,12 +59,15 @@ export CCACHE_DIR=${CCACHE_DIR:-$BASE_SCRATCH_DIR/.ccache} # The depends dir. # This folder exists on the ci host and ci guest. Changes are propagated back and forth. export DEPENDS_DIR=${DEPENDS_DIR:-$BASE_ROOT_DIR/depends} -# Folder where the build is done (bin and lib). +# Folder where the build result is put (bin and lib). export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out/$HOST} +# Folder where the build is done (dist and out-of-tree build). +export BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build} +export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/releases/$HOST} export SDK_URL=${SDK_URL:-https://BGLcore.org/depends-sources/sdks} export WINEDEBUG=${WINEDEBUG:-fixme-all} -export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git} +export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps} export GOAL=${GOAL:-install} export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets} export PATH=${BASE_ROOT_DIR}/ci/retry:$PATH -export CI_RETRY_EXE=${CI_RETRY_EXE:retry} +export CI_RETRY_EXE=${CI_RETRY_EXE:-"retry --"} diff --git a/ci/test/00_setup_env_arm.sh b/ci/test/00_setup_env_arm.sh index ee3807e946..acef44bd4e 100644 --- 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 The Bitcoin Core developers +# Copyright (c) 2019-2020 The BGL Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -9,15 +9,20 @@ export LC_ALL=C.UTF-8 export HOST=arm-linux-gnueabihf # The host arch is unknown, so we run the tests through qemu. # If the host is arm and wants to run the tests natively, it can set QEMU_USER_CMD to the empty string. -export QEMU_USER_CMD="${QEMU_USER_CMD:"qemu-arm -L /usr/arm-linux-gnueabihf/"}" -# We don't know whether the host can run the cross compiled binaries. To run them, either qemu-user or libc6:armhf for -# the target is required, so install both. +if [ -z ${QEMU_USER_CMD+x} ]; then export QEMU_USER_CMD="${QEMU_USER_CMD:-"qemu-arm -L /usr/arm-linux-gnueabihf/"}"; fi export DPKG_ADD_ARCH="armhf" -export PACKAGES="python3 g++-arm-linux-gnueabihf busybox qemu-user libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf" +export PACKAGES="python3-zmq g++-arm-linux-gnueabihf busybox libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf" +if [ -n "$QEMU_USER_CMD" ]; then + # Likely cross-compiling, so install the needed gcc and qemu-user + export PACKAGES="$PACKAGES qemu-user" +fi +export CONTAINER_NAME=ci_arm_linux +# Use debian to avoid 404 apt errors when cross compiling +export DOCKER_NAME_TAG="debian:buster" export USE_BUSY_BOX=true export RUN_UNIT_TESTS=true -export RUN_FUNCTIONAL_TESTS=true +export RUN_FUNCTIONAL_TESTS=false export GOAL="install" # -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1" # This could be removed once the ABI change warning does not show up by default -export BGL_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CXXFLAGS=-Wno-psabi" +export BGL_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CXXFLAGS=-Wno-psabi --enable-werror --with-boost-process" diff --git a/ci/test/00_setup_env_i686.sh b/ci/test/00_setup_env_i686.sh deleted file mode 100644 index 4dee6a58f8..0000000000 --- a/ci/test/00_setup_env_i686.sh +++ /dev/null @@ -1,13 +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.UTF-8 - -export HOST=i686-pc-linux-gnu -export PACKAGES="g++-multilib python3-zmq" -export GOAL="install" -export BGL_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++" -export CONFIG_SHELL="/bin/dash" diff --git a/ci/test/00_setup_env_i686_centos.sh b/ci/test/00_setup_env_i686_centos.sh new file mode 100644 index 0000000000..1ec44a7a1a --- /dev/null +++ b/ci/test/00_setup_env_i686_centos.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2020 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +export LC_ALL=C.UTF-8 + +export HOST=i686-pc-linux-gnu +export CONTAINER_NAME=ci_i686_centos_8 +export DOCKER_NAME_TAG=centos:8 +export DOCKER_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python3 python3-zmq which patch lbzip2 dash rsync coreutils" +export GOAL="install" +export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-reduce-exports --with-boost-process" +export CONFIG_SHELL="/bin/dash" +export TEST_RUNNER_ENV="LC_ALL=en_US.UTF-8" diff --git a/ci/test/00_setup_env_mac.sh b/ci/test/00_setup_env_mac.sh index d2ee523fe8..25ce9d61d2 100644 --- a/ci/test/00_setup_env_mac.sh +++ b/ci/test/00_setup_env_mac.sh @@ -1,15 +1,18 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The BGL 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=x86_64-apple-darwin16 +export CONTAINER_NAME=ci_macos_cross +export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can cross-compile to macos (bionic is used in the gitian build as well) +export HOST=x86_64-apple-darwin18 export PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python3-dev python3-setuptools" -export OSX_SDK=10.11 +export XCODE_VERSION=11.3.1 +export XCODE_BUILD_ID=11C505 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false export GOAL="deploy" -export BGL_CONFIG="--enable-gui --enable-reduce-exports --enable-werror" +export BGL_CONFIG="--with-gui --enable-reduce-exports --enable-werror --with-boost-process" diff --git a/ci/test/00_setup_env_mac_host.sh b/ci/test/00_setup_env_mac_host.sh index d49d4b9978..56b40feb3b 100644 --- a/ci/test/00_setup_env_mac_host.sh +++ b/ci/test/00_setup_env_mac_host.sh @@ -1,19 +1,18 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 -export HOST=x86_64-apple-darwin16 -export BREW_PACKAGES="automake berkeley-db4 libtool boost miniupnpc pkg-config qt qrencode python3 ccache zeromq" +export HOST=x86_64-apple-darwin18 export PIP_PACKAGES="zmq" -export RUN_CI_ON_HOST=true -export RUN_UNIT_TESTS=true -export RUN_FUNCTIONAL_TESTS=false export GOAL="install" -export BGL_CONFIG="--enable-gui --enable-reduce-exports --enable-werror" -# Run without depends +export BGL_CONFIG="--with-gui --enable-reduce-exports --enable-werror --with-boost-process" +export CI_OS_NAME="macos" export NO_DEPENDS=1 export OSX_SDK="" +export CCACHE_SIZE=300M + +export RUN_SECURITY_TESTS="true" diff --git a/ci/test/00_setup_env_native_asan.sh b/ci/test/00_setup_env_native_asan.sh index d1705de6c1..3a8e73c6d8 100644 --- a/ci/test/00_setup_env_native_asan.sh +++ b/ci/test/00_setup_env_native_asan.sh @@ -1,13 +1,14 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The BGL 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 PACKAGES="clang-8 llvm-8 python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev" -# Use clang-8 instead of default clang (which is clang-6 on Bionic) to avoid spurious segfaults when running on ppc64le +export CONTAINER_NAME=ci_native_asan +export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev libsqlite3-dev" +export DOCKER_NAME_TAG=ubuntu:20.04 export NO_DEPENDS=1 export GOAL="install" -export BGL_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=address,integer,undefined CC=clang-8 CXX=clang++-8" +export BGL_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=address,integer,undefined CC=clang CXX=clang++ --with-boost-process" diff --git a/ci/test/00_setup_env_native_centos.sh b/ci/test/00_setup_env_native_centos.sh deleted file mode 100644 index 5d00a9bbdd..0000000000 --- a/ci/test/00_setup_env_native_centos.sh +++ /dev/null @@ -1,14 +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.UTF-8 - -export DOCKER_NAME_TAG=centos:7 -export DOCKER_PACKAGES="gcc-c++ libtool make git python3 python36-zmq" -export PACKAGES="boost-devel libevent-devel libdb4-devel libdb4-cxx-devel miniupnpc-devel zeromq-devel qt5-qtbase-devel qt5-qttools-devel qrencode-devel" -export NO_DEPENDS=1 -export GOAL="install" -export BGL_CONFIG="--enable-reduce-exports" diff --git a/ci/test/00_setup_env_native_fuzz.sh b/ci/test/00_setup_env_native_fuzz.sh index 954fb17575..b6f31cf9d2 100644 --- a/ci/test/00_setup_env_native_fuzz.sh +++ b/ci/test/00_setup_env_native_fuzz.sh @@ -1,16 +1,17 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The BGL 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 PACKAGES="clang-8 llvm-8 python3 libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev" +export CONTAINER_NAME=ci_native_fuzz +export PACKAGES="clang-8 llvm-8 python3 libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev" export NO_DEPENDS=1 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false export RUN_FUZZ_TESTS=true export GOAL="install" -export BGL_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,address,undefined CC=clang-8 CXX=clang++-8" -# Use clang-8, instead of default clang on bionic, which is clang-6 and does not come with libfuzzer on aarch64 +export BGL_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,address,undefined CC=clang CXX=clang++ --with-boost-process" +export CCACHE_SIZE=200M diff --git a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh new file mode 100644 index 0000000000..1fcd363c7a --- /dev/null +++ b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2019-2020 The BGL 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_fuzz_valgrind +export PACKAGES="clang-8 llvm-8 python3 libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-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" +export BGL_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang CXX=clang++" +export CCACHE_SIZE=200M diff --git a/ci/test/00_setup_env_native_msan.sh b/ci/test/00_setup_env_native_msan.sh new file mode 100644 index 0000000000..3ce50f816f --- /dev/null +++ b/ci/test/00_setup_env_native_msan.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2020 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +export LC_ALL=C.UTF-8 + +export DOCKER_NAME_TAG="ubuntu:20.04" +LIBCXX_DIR="${BASE_ROOT_DIR}/ci/scratch/msan/build/" +export MSAN_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer -g -O1 -fno-optimize-sibling-calls" +LIBCXX_FLAGS="-nostdinc++ -stdlib=libc++ -L${LIBCXX_DIR}lib -lc++abi -I${LIBCXX_DIR}include -I${LIBCXX_DIR}include/c++/v1 -lpthread -Wl,-rpath,${LIBCXX_DIR}lib -Wno-unused-command-line-argument" +export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}" +export BDB_PREFIX="${BASE_ROOT_DIR}/db4" + +export CONTAINER_NAME="ci_native_msan" +export PACKAGES="clang-9 llvm-9 cmake" +export DEP_OPTS="NO_BDB=1 NO_QT=1 CC='clang' CXX='clang++' CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}' boost_cxxflags='-std=c++17 -fvisibility=hidden -fPIC ${MSAN_AND_LIBCXX_FLAGS}' zeromq_cxxflags='-std=c++17 ${MSAN_AND_LIBCXX_FLAGS}'" +export GOAL="install" +export BITCOIN_CONFIG="--enable-wallet --with-sanitizers=memory --with-asm=no --prefix=${BASE_ROOT_DIR}/depends/x86_64-pc-linux-gnu/ CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}' BDB_LIBS='-L${BDB_PREFIX}/lib -ldb_cxx-4.8' BDB_CFLAGS='-I${BDB_PREFIX}/include'" +export USE_MEMORY_SANITIZER="true" +export RUN_FUNCTIONAL_TESTS="false" +export CCACHE_SIZE=250M diff --git a/ci/test/00_setup_env_native_multiprocess.sh b/ci/test/00_setup_env_native_multiprocess.sh new file mode 100644 index 0000000000..522a5d9fc2 --- /dev/null +++ b/ci/test/00_setup_env_native_multiprocess.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2020 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +export LC_ALL=C.UTF-8 + +export CONTAINER_NAME=ci_native_multiprocess +export DOCKER_NAME_TAG=ubuntu:20.04 +export PACKAGES="cmake python3" +export DEP_OPTS="MULTIPROCESS=1" +export GOAL="install" +export BITCOIN_CONFIG="--with-boost-process" +export TEST_RUNNER_ENV="BITCOIND=bitcoin-node" diff --git a/ci/test/00_setup_env_native_nowallet.sh b/ci/test/00_setup_env_native_nowallet.sh index 737d00aff6..65b8f2af80 100644 --- a/ci/test/00_setup_env_native_nowallet.sh +++ b/ci/test/00_setup_env_native_nowallet.sh @@ -1,12 +1,14 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 -export PACKAGES="python3-zmq" +export CONTAINER_NAME=ci_native_nowallet +export DOCKER_NAME_TAG=ubuntu:18.04 # Use bionic to have one config run the tests in python3.6, see doc/dependencies.md +export PACKAGES="python3-zmq clang-5.0 llvm-5.0" # Use clang-5 to test C++17 compatibility, see doc/dependencies.md export DEP_OPTS="NO_WALLET=1" export GOAL="install" -export BGL_CONFIG="--enable-glibc-back-compat --enable-reduce-exports" +export BGL_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CC=clang-5.0 CXX=clang++-5.0 --with-boost-process" diff --git a/ci/test/00_setup_env_native_qt5.sh b/ci/test/00_setup_env_native_qt5.sh index 94616aec09..e4dc829eac 100644 --- a/ci/test/00_setup_env_native_qt5.sh +++ b/ci/test/00_setup_env_native_qt5.sh @@ -1,13 +1,19 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 +export CONTAINER_NAME=ci_native_qt5 +export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic gcc-7 can compile our c++17 and run our functional tests in python3, see doc/dependencies.md export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev" export DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1" -export TEST_RUNNER_EXTRA="--coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash +export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash +export RUN_SECURITY_TESTS="true" +export RUN_UNIT_TESTS_SEQUENTIAL="true" +export RUN_UNIT_TESTS="false" export GOAL="install" -export BGL_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --enable-debug CFLAGS=\"-g0 -O2 -funsigned-char\" CXXFLAGS=\"-g0 -O2 -funsigned-char\"" +export PREVIOUS_RELEASES_TO_DOWNLOAD="v0.15.2 v0.16.3 v0.17.2 v0.18.1 v0.19.1" +export BGL_CONFIG="--enable-zmq --with-libs=no --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --enable-debug CFLAGS=\"-g0 -O2 -funsigned-char\" CXXFLAGS=\"-g0 -O2 -funsigned-char\" --with-boost-process" diff --git a/ci/test/00_setup_env_native_tsan.sh b/ci/test/00_setup_env_native_tsan.sh index 346852c28f..7588f24773 100644 --- a/ci/test/00_setup_env_native_tsan.sh +++ b/ci/test/00_setup_env_native_tsan.sh @@ -1,17 +1,14 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The BGL Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 -export DOCKER_NAME_TAG=ubuntu:16.04 -export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev" -export NO_DEPENDS=1 +export CONTAINER_NAME=ci_native_tsan +export DOCKER_NAME_TAG=ubuntu:20.04 +export PACKAGES="clang llvm libc++abi-dev libc++-dev python3-zmq" +export DEP_OPTS="CC=clang CXX='clang++ -stdlib=libc++'" export GOAL="install" -export BGL_CONFIG="--enable-zmq --disable-wallet --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=thread --disable-hardening --disable-asm CC=clang CXX=clang++" - -# xenial comes with old clang versions that can not parse the sanitizer suppressions files -# Remove unparseable lines as a hacky workaround -sed -i '/^implicit-/d' "${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan" +export BGL_CONFIG="--enable-zmq --with-gui=no CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' CXXFLAGS='-g' --with-sanitizers=thread CC=clang CXX='clang++ -stdlib=libc++' --with-boost-process" diff --git a/ci/test/00_setup_env_native_valgrind.sh b/ci/test/00_setup_env_native_valgrind.sh index e5d85019fc..323c9700da 100644 --- a/ci/test/00_setup_env_native_valgrind.sh +++ b/ci/test/00_setup_env_native_valgrind.sh @@ -1,15 +1,15 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 -export PACKAGES="valgrind clang llvm python3-zmq libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev" +export CONTAINER_NAME=ci_native_valgrind +export PACKAGES="valgrind clang llvm python3-zmq libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libsqlite3-dev" export USE_VALGRIND=1 export NO_DEPENDS=1 -export TEST_RUNNER_EXTRA="p2p_segwit.py" # Only run one test for now. TODO enable all and bump timeouts -export RUN_FUNCTIONAL_TESTS=true +export TEST_RUNNER_EXTRA="--exclude rpc_bind" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547 export GOAL="install" export BGL_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no CC=clang CXX=clang++" # TODO enable GUI diff --git a/ci/test/00_setup_env_s390x.sh b/ci/test/00_setup_env_s390x.sh index 3d94b42d58..ec330a2e7e 100644 --- a/ci/test/00_setup_env_s390x.sh +++ b/ci/test/00_setup_env_s390x.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The BGL Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -9,9 +9,18 @@ export LC_ALL=C.UTF-8 export HOST=s390x-linux-gnu # The host arch is unknown, so we run the tests through qemu. # If the host is s390x and wants to run the tests natively, it can set QEMU_USER_CMD to the empty string. -export QEMU_USER_CMD="${QEMU_USER_CMD:"qemu-s390x"}" -export PACKAGES="python3-zmq bsdmainutils qemu-user" +if [ -z ${QEMU_USER_CMD+x} ]; then export QEMU_USER_CMD="${QEMU_USER_CMD:-"qemu-s390x"}"; fi +export PACKAGES="python3-zmq" +if [ -n "$QEMU_USER_CMD" ]; then + # Likely cross-compiling, so install the needed gcc and qemu-user + export DPKG_ADD_ARCH="s390x" + export PACKAGES="$PACKAGES g++-s390x-linux-gnu qemu-user libc6:s390x libstdc++6:s390x libfontconfig1:s390x libxcb1:s390x" +fi +# Use debian to avoid 404 apt errors +export CONTAINER_NAME=ci_s390x +export DOCKER_NAME_TAG="debian:buster" export RUN_UNIT_TESTS=true +export TEST_RUNNER_ENV="LC_ALL=C" export RUN_FUNCTIONAL_TESTS=true export GOAL="install" -export BGL_CONFIG="--enable-reduce-exports --with-incompatible-bdb" +export BGL_CONFIG="--enable-reduce-exports --with-incompatible-bdb --with-boost-process" diff --git a/ci/test/00_setup_env_win64.sh b/ci/test/00_setup_env_win64.sh index 3a9555c9c9..25f7c1d04c 100644 --- a/ci/test/00_setup_env_win64.sh +++ b/ci/test/00_setup_env_win64.sh @@ -1,13 +1,16 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The BGL Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 +export CONTAINER_NAME=ci_win64 +export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can cross-compile to win64 (bionic is used in the gitian build as well) export HOST=x86_64-w64-mingw32 -export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64" +export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64 file" export RUN_FUNCTIONAL_TESTS=false +export RUN_SECURITY_TESTS="true" export GOAL="deploy" -export BGL_CONFIG="--enable-reduce-exports --disable-gui-tests" +export BGL_CONFIG="--enable-reduce-exports --disable-gui-tests --without-boost-process" diff --git a/ci/test/03_before_install.sh b/ci/test/03_before_install.sh index 5086114ba1..80806aab75 100755 --- a/ci/test/03_before_install.sh +++ b/ci/test/03_before_install.sh @@ -1,15 +1,11 @@ #!/usr/bin/env bash # -# Copyright (c) 2018 The Bitcoin Core developers +# Copyright (c) 2018-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 -# Add llvm-symbolizer directory to PATH. Needed to get symbolized stack traces from the sanitizers. -PATH=$PATH:/usr/lib/llvm-6.0/bin/ -export PATH - BEGIN_FOLD () { echo "" CURRENT_FOLD_NAME=$1 diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh index c3ba0165ff..35fc7a7615 100755 --- a/ci/test/04_install.sh +++ b/ci/test/04_install.sh @@ -1,56 +1,35 @@ #!/usr/bin/env bash # -# Copyright (c) 2018 The Bitcoin Core developers +# Copyright (c) 2018-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 -if [[ $DOCKER_NAME_TAG == centos* ]]; then - export LC_ALL=en_US.utf8 +if [[ $QEMU_USER_CMD == qemu-s390* ]]; then + export LC_ALL=C fi -if [ "$TRAVIS_OS_NAME" == "osx" ]; then - set +o errexit - pushd /usr/local/Homebrew || exit 1 - git reset --hard origin/master - popd || exit 1 - set -o errexit - ${CI_RETRY_EXE} brew update - # brew upgrade returns an error if any of the packages is already up to date - # Failure is safe to ignore, unless we really need an update. - brew upgrade $BREW_PACKAGES || true - - # install new packages (brew install returns an error if already installed) - for i in $BREW_PACKAGES; do - if ! brew list | grep -q $i; then - ${CI_RETRY_EXE} brew install $i - fi - done - - export PATH="/usr/local/opt/ccache/libexec:$PATH" - - ${CI_RETRY_EXE} pip3 install $PIP_PACKAGES - +if [ "$CI_OS_NAME" == "macos" ]; then + IN_GETOPT_BIN="/usr/local/opt/gnu-getopt/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES fi -mkdir -p "${BASE_SCRATCH_DIR}" +# Create folders that are mounted into the docker mkdir -p "${CCACHE_DIR}" +mkdir -p "${PREVIOUS_RELEASES_DIR}" export ASAN_OPTIONS="detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1" export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/lsan" -export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:log_path=${BASE_SCRATCH_DIR}/sanitizer-output/tsan" +export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1:log_path=${BASE_SCRATCH_DIR}/sanitizer-output/tsan" export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1" -env | grep -E '^(BGL_CONFIG|BASE_|CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS)' | tee /tmp/env -if [[ $HOST = *-mingw32 ]]; then - DOCKER_ADMIN="--cap-add SYS_ADMIN" -elif [[ $BGL_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764) +env | grep -E '^(BGL_CONFIG|BASE_|QEMU_|CCACHE_|LC_ALL|BOOST_TEST_RANDOM|DEBIAN_FRONTEND|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS|PREVIOUS_RELEASES_DIR)' | tee /tmp/env +if [[ $BGL_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764) DOCKER_ADMIN="--cap-add SYS_PTRACE" fi export P_CI_DIR="$PWD" -if [ -z "$RUN_CI_ON_HOST" ]; then +if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then echo "Creating $DOCKER_NAME_TAG container to run in" ${CI_RETRY_EXE} docker pull "$DOCKER_NAME_TAG" @@ -58,50 +37,62 @@ if [ -z "$RUN_CI_ON_HOST" ]; then --mount type=bind,src=$BASE_ROOT_DIR,dst=/ro_base,readonly \ --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR \ --mount type=bind,src=$DEPENDS_DIR,dst=$DEPENDS_DIR \ + --mount type=bind,src=$PREVIOUS_RELEASES_DIR,dst=$PREVIOUS_RELEASES_DIR \ -w $BASE_ROOT_DIR \ --env-file /tmp/env \ + --name $CONTAINER_NAME \ $DOCKER_NAME_TAG) - - DOCKER_EXEC () { - docker exec $DOCKER_ID bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $P_CI_DIR && $*" - } + export DOCKER_CI_CMD_PREFIX="docker exec $DOCKER_ID" else echo "Running on host system without docker wrapper" - DOCKER_EXEC () { - bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $P_CI_DIR && $*" - } fi -if [ "$TRAVIS_OS_NAME" == "osx" ]; then - top -l 1 -s 0 | awk ' /PhysMem/ {print}' - echo "Number of CPUs: $(sysctl -n hw.logicalcpu)" -else - DOCKER_EXEC free -m -h - DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\) - DOCKER_EXEC echo "Free disk space:" - DOCKER_EXEC df -h -fi +DOCKER_EXEC () { + $DOCKER_CI_CMD_PREFIX bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $P_CI_DIR && $*" +} +export -f DOCKER_EXEC if [ -n "$DPKG_ADD_ARCH" ]; then DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH" fi if [[ $DOCKER_NAME_TAG == centos* ]]; then - ${CI_RETRY_EXE} DOCKER_EXEC yum -y install epel-release - ${CI_RETRY_EXE} DOCKER_EXEC yum -y install $DOCKER_PACKAGES $PACKAGES -elif [ "$TRAVIS_OS_NAME" != "osx" ]; then + ${CI_RETRY_EXE} DOCKER_EXEC dnf -y install epel-release + ${CI_RETRY_EXE} DOCKER_EXEC dnf -y --allowerasing install $DOCKER_PACKAGES $PACKAGES +elif [ "$CI_USE_APT_INSTALL" != "no" ]; then ${CI_RETRY_EXE} DOCKER_EXEC apt-get update ${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $DOCKER_PACKAGES fi +if [ "$CI_OS_NAME" == "macos" ]; then + top -l 1 -s 0 | awk ' /PhysMem/ {print}' + echo "Number of CPUs: $(sysctl -n hw.logicalcpu)" +else + DOCKER_EXEC free -m -h + DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\) + DOCKER_EXEC echo $(lscpu | grep Endian) +fi +DOCKER_EXEC echo "Free disk space:" +DOCKER_EXEC df -h + if [ ! -d ${DIR_QA_ASSETS} ]; then - DOCKER_EXEC git clone https://github.com/BGL-core/qa-assets ${DIR_QA_ASSETS} + DOCKER_EXEC git clone --depth=1 https://github.com/BGL-core/qa-assets ${DIR_QA_ASSETS} fi export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/ +export DIR_UNIT_TEST_DATA=${DIR_QA_ASSETS}/unit_test_data/ DOCKER_EXEC mkdir -p "${BASE_SCRATCH_DIR}/sanitizer-output/" -if [ -z "$RUN_CI_ON_HOST" ]; then +if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then + DOCKER_EXEC "update-alternatives --install /usr/bin/clang++ clang++ \$(which clang++-9) 100" + DOCKER_EXEC "update-alternatives --install /usr/bin/clang clang \$(which clang-9) 100" + DOCKER_EXEC "mkdir -p ${BASE_SCRATCH_DIR}/msan/build/" + DOCKER_EXEC "git clone --depth=1 https://github.com/llvm/llvm-project -b llvmorg-10.0.0 ${BASE_SCRATCH_DIR}/msan/llvm-project" + DOCKER_EXEC "cd ${BASE_SCRATCH_DIR}/msan/build/ && cmake -DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi' -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=Memory -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=X86 ../llvm-project/llvm/" + DOCKER_EXEC "cd ${BASE_SCRATCH_DIR}/msan/build/ && make $MAKEJOBS cxx" +fi + +if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then echo "Create $BASE_ROOT_DIR" DOCKER_EXEC rsync -a /ro_base/ $BASE_ROOT_DIR fi diff --git a/ci/test/05_before_script.sh b/ci/test/05_before_script.sh index afeab1a768..6d48964db8 100755 --- a/ci/test/05_before_script.sh +++ b/ci/test/05_before_script.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash # -# Copyright (c) 2018 The Bitcoin Core developers +# Copyright (c) 2018-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 # Make sure default datadir does not exist and is never read by creating a dummy file -if [ "$TRAVIS_OS_NAME" == "osx" ]; then +if [ "$CI_OS_NAME" == "macos" ]; then echo > $HOME/Library/Application\ Support/BGL else DOCKER_EXEC echo \> \$HOME/.BGL @@ -15,15 +15,39 @@ fi DOCKER_EXEC mkdir -p ${DEPENDS_DIR}/SDKs ${DEPENDS_DIR}/sdk-sources -if [ -n "$OSX_SDK" ] && [ ! -f ${DEPENDS_DIR}/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then - curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o ${DEPENDS_DIR}/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz +OSX_SDK_BASENAME="Xcode-${XCODE_VERSION}-${XCODE_BUILD_ID}-extracted-SDK-with-libcxx-headers.tar.gz" +OSX_SDK_PATH="${DEPENDS_DIR}/sdk-sources/${OSX_SDK_BASENAME}" + +if [ -n "$XCODE_VERSION" ] && [ ! -f "$OSX_SDK_PATH" ]; then + curl --location --fail "${SDK_URL}/${OSX_SDK_BASENAME}" -o "$OSX_SDK_PATH" fi -if [ -n "$OSX_SDK" ] && [ -f ${DEPENDS_DIR}/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then - DOCKER_EXEC tar -C ${DEPENDS_DIR}/SDKs -xf ${DEPENDS_DIR}/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz + +if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then + # Use BDB compiled using install_db4.sh script to work around linking issue when using BDB + # from depends. See https://github.com/bitcoin/bitcoin/pull/18288#discussion_r433189350 for + # details. + DOCKER_EXEC "contrib/install_db4.sh \$(pwd) --enable-umrw CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'" +fi + +if [ -n "$XCODE_VERSION" ] && [ -f "$OSX_SDK_PATH" ]; then + DOCKER_EXEC tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH" fi if [[ $HOST = *-mingw32 ]]; then DOCKER_EXEC update-alternatives --set $HOST-g++ \$\(which $HOST-g++-posix\) fi if [ -z "$NO_DEPENDS" ]; then - DOCKER_EXEC CONFIG_SHELL= make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS + if [[ $DOCKER_NAME_TAG == centos* ]]; then + # CentOS has problems building the depends if the config shell is not explicitly set + # (i.e. for libevent a Makefile with an empty SHELL variable is generated, leading to + # an error as the first command is executed) + SHELL_OPTS="LC_ALL=en_US.UTF-8 CONFIG_SHELL=/bin/bash" + else + SHELL_OPTS="CONFIG_SHELL=" + fi + DOCKER_EXEC $SHELL_OPTS make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS +fi +if [ -n "$PREVIOUS_RELEASES_TO_DOWNLOAD" ]; then + BEGIN_FOLD previous-versions + DOCKER_EXEC test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" "${PREVIOUS_RELEASES_TO_DOWNLOAD}" + END_FOLD fi diff --git a/ci/test/06_script_a.sh b/ci/test/06_script_a.sh index 2c3a6458dc..e4fb049913 100755 --- a/ci/test/06_script_a.sh +++ b/ci/test/06_script_a.sh @@ -1,15 +1,13 @@ #!/usr/bin/env bash # -# Copyright (c) 2018 The Bitcoin Core developers +# Copyright (c) 2018-2020 The BGL 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 BGL_CONFIG_ALL="--disable-dependency-tracking --prefix=$DEPENDS_DIR/$HOST --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib" -if [ -z "$NO_DEPENDS" ]; then - DOCKER_EXEC ccache --max-size=$CCACHE_SIZE -fi +DOCKER_EXEC "ccache --zero-stats --max-size=$CCACHE_SIZE" BEGIN_FOLD autogen if [ -n "$CONFIG_SHELL" ]; then @@ -19,11 +17,11 @@ else fi END_FOLD -DOCKER_EXEC mkdir -p build -export P_CI_DIR="$P_CI_DIR/build" +DOCKER_EXEC mkdir -p "${BASE_BUILD_DIR}" +export P_CI_DIR="${BASE_BUILD_DIR}" BEGIN_FOLD configure -DOCKER_EXEC ../configure --cache-file=config.cache $BGL_CONFIG_ALL $BGL_CONFIG || ( (DOCKER_EXEC cat config.log) && false) +DOCKER_EXEC "${BASE_ROOT_DIR}/configure" --cache-file=config.cache $BGL_CONFIG_ALL $BGL_CONFIG || ( (DOCKER_EXEC cat config.log) && false) END_FOLD BEGIN_FOLD distdir @@ -32,7 +30,7 @@ mkdir -p "BGL-$HOST" DOCKER_EXEC make distdir VERSION=$HOST END_FOLD -export P_CI_DIR="$P_CI_DIR/BGL-$HOST" +export P_CI_DIR="${BASE_BUILD_DIR}/BGL-$HOST" BEGIN_FOLD configure DOCKER_EXEC ./configure --cache-file=../config.cache $BGL_CONFIG_ALL $BGL_CONFIG || ( (DOCKER_EXEC cat config.log) && false) @@ -41,6 +39,20 @@ END_FOLD set -o errtrace trap 'DOCKER_EXEC "cat ${BASE_SCRATCH_DIR}/sanitizer-output/* 2> /dev/null"' ERR +if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then + # MemorySanitizer (MSAN) does not support tracking memory initialization done by + # using the Linux getrandom syscall. Avoid using getrandom by undefining + # HAVE_SYS_GETRANDOM. See https://github.com/google/sanitizers/issues/852 for + # details. + DOCKER_EXEC 'grep -v HAVE_SYS_GETRANDOM src/config/bitcoin-config.h > src/config/bitcoin-config.h.tmp && mv src/config/bitcoin-config.h.tmp src/config/bitcoin-config.h' +fi + BEGIN_FOLD build DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false ) END_FOLD + +BEGIN_FOLD cache_stats +DOCKER_EXEC "ccache --version | head -n 1 && ccache --show-stats" +DOCKER_EXEC du -sh "${DEPENDS_DIR}"/*/ +DOCKER_EXEC du -sh "${PREVIOUS_RELEASES_DIR}" +END_FOLD diff --git a/ci/test/06_script_b.sh b/ci/test/06_script_b.sh index e641cef279..7aea21f257 100755 --- a/ci/test/06_script_b.sh +++ b/ci/test/06_script_b.sh @@ -1,26 +1,26 @@ #!/usr/bin/env bash # -# Copyright (c) 2018 The Bitcoin Core developers +# Copyright (c) 2018-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 +if [[ $HOST = *-mingw32 ]]; then + BEGIN_FOLD wrap-wine + # Generate all binaries, so that they can be wrapped + DOCKER_EXEC make $MAKEJOBS -C src/secp256k1 VERBOSE=1 + DOCKER_EXEC make $MAKEJOBS -C src/univalue VERBOSE=1 + DOCKER_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-wine.sh" + END_FOLD +fi + if [ -n "$QEMU_USER_CMD" ]; then BEGIN_FOLD wrap-qemu # Generate all binaries, so that they can be wrapped DOCKER_EXEC make $MAKEJOBS -C src/secp256k1 VERBOSE=1 DOCKER_EXEC make $MAKEJOBS -C src/univalue VERBOSE=1 - for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/univalue/{no_nul,test_json,unitester,object}}; do - # shellcheck disable=SC2044 - for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name $(basename $b_name)); do - echo "Wrap $b ..." - DOCKER_EXEC mv "$b" "${b}_orig" - DOCKER_EXEC echo "\#\!/usr/bin/env bash" \> "$b" - DOCKER_EXEC echo "$QEMU_USER_CMD \\\"${b}_orig\\\" \\\"\\\$@\\\"" \>\> "$b" - DOCKER_EXEC chmod +x "$b" - done - done + DOCKER_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-qemu.sh" END_FOLD fi @@ -32,19 +32,30 @@ fi if [ "$RUN_UNIT_TESTS" = "true" ]; then BEGIN_FOLD unit-tests - bash -c "${CI_WAIT}" & # Print dots in case the unit tests take a long time to run - DOCKER_EXEC LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib make $MAKEJOBS check VERBOSE=1 + DOCKER_EXEC ${TEST_RUNNER_ENV} DIR_UNIT_TEST_DATA=${DIR_UNIT_TEST_DATA} LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib make $MAKEJOBS check VERBOSE=1 + END_FOLD +fi + +if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then + BEGIN_FOLD unit-tests-seq + DOCKER_EXEC ${TEST_RUNNER_ENV} DIR_UNIT_TEST_DATA=${DIR_UNIT_TEST_DATA} LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib "${BASE_BUILD_DIR}/bitcoin-*/src/test/test_bitcoin*" --catch_system_errors=no -l test_suite END_FOLD fi if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then BEGIN_FOLD functional-tests - DOCKER_EXEC test/functional/test_runner.py --ci $MAKEJOBS --tmpdirprefix "${BASE_SCRATCH_DIR}/test_runner/" --ansi --combinedlogslen=4000 ${TEST_RUNNER_EXTRA} --quiet --failfast + DOCKER_EXEC LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib ${TEST_RUNNER_ENV} test/functional/test_runner.py --ci $MAKEJOBS --tmpdirprefix "${BASE_SCRATCH_DIR}/test_runner/" --ansi --combinedlogslen=4000 --timeout-factor=${TEST_RUNNER_TIMEOUT_FACTOR} ${TEST_RUNNER_EXTRA} --quiet --failfast + END_FOLD +fi + +if [ "$RUN_SECURITY_TESTS" = "true" ]; then + BEGIN_FOLD security-tests + DOCKER_EXEC make test-security-check END_FOLD fi if [ "$RUN_FUZZ_TESTS" = "true" ]; then BEGIN_FOLD fuzz-tests - DOCKER_EXEC test/fuzz/test_runner.py -l DEBUG ${DIR_FUZZ_IN} + DOCKER_EXEC LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib test/fuzz/test_runner.py ${FUZZ_TESTS_CONFIG} $MAKEJOBS -l DEBUG ${DIR_FUZZ_IN} END_FOLD fi diff --git a/ci/test/wrap-qemu.sh b/ci/test/wrap-qemu.sh new file mode 100755 index 0000000000..be7d7fcc1f --- /dev/null +++ b/ci/test/wrap-qemu.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2018-2019 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +export LC_ALL=C.UTF-8 + +for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/univalue/{no_nul,test_json,unitester,object}}; do + # shellcheck disable=SC2044 + for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name $(basename $b_name)); do + echo "Wrap $b ..." + mv "$b" "${b}_orig" + echo '#!/usr/bin/env bash' > "$b" + echo "$QEMU_USER_CMD \"${b}_orig\" \"\$@\"" >> "$b" + chmod +x "$b" + done +done diff --git a/ci/test/wrap-valgrind.sh b/ci/test/wrap-valgrind.sh index d2192061db..6b3e6eb7e7 100755 --- a/ci/test/wrap-valgrind.sh +++ b/ci/test/wrap-valgrind.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2018 The Bitcoin Core developers +# Copyright (c) 2018-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/ci/test/wrap-wine.sh b/ci/test/wrap-wine.sh new file mode 100755 index 0000000000..58a8983e6e --- /dev/null +++ b/ci/test/wrap-wine.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2020 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +export LC_ALL=C.UTF-8 + +for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/univalue/{no_nul,test_json,unitester,object}}.exe; do + # shellcheck disable=SC2044 + for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name "$(basename $b_name)"); do + if (file "$b" | grep "Windows"); then + echo "Wrap $b ..." + mv "$b" "${b}_orig" + echo '#!/usr/bin/env bash' > "$b" + echo "wine64 \"${b}_orig\" \"\$@\"" >> "$b" + chmod +x "$b" + fi + done +done diff --git a/configure.ac b/configure.ac index 0f1a9c4bf2..567d98ebea 100644 --- a/configure.ac +++ b/configure.ac @@ -1,19 +1,24 @@ AC_PREREQ([2.69]) -define(_CLIENT_VERSION_MAJOR, 0) -define(_CLIENT_VERSION_MINOR, 1) -define(_CLIENT_VERSION_REVISION, 1) +define(_CLIENT_VERSION_MAJOR, 21) +define(_CLIENT_VERSION_MINOR, 99) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_RC, 0) -define(_CLIENT_VERSION_IS_RELEASE, true) -define(_COPYRIGHT_YEAR, 2019) +define(_CLIENT_VERSION_IS_RELEASE, false) +define(_COPYRIGHT_YEAR, 2020) define(_COPYRIGHT_HOLDERS,[The %s developers]) define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[BGL Core]]) -AC_INIT([BGL Core],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_REVISION, m4_if(_CLIENT_VERSION_BUILD, [0], [], _CLIENT_VERSION_BUILD))m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC),[https://github.com/BGL/BGL/issues],[BGL],[https://BGLcore.org/]) +AC_INIT([BGL 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/BGL/BGL/issues],[BGL],[https://BGLcore.org/]) AC_CONFIG_SRCDIR([src/validation.cpp]) AC_CONFIG_HEADERS([src/config/BGL-config.h]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([build-aux/m4]) +m4_ifndef([PKG_PROG_PKG_CONFIG], [AC_MSG_ERROR([PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh])]) +PKG_PROG_PKG_CONFIG +if test "x$PKG_CONFIG" = x; then + AC_MSG_ERROR([pkg-config not found]) +fi + BGL_DAEMON_NAME=BGLd BGL_GUI_NAME=BGL-qt BGL_CLI_NAME=BGL-cli @@ -36,14 +41,14 @@ dnl faketime breaks configure and is only needed for make. Disable it here. unset FAKETIME dnl Automake init set-up and checks -AM_INIT_AUTOMAKE([no-define subdir-objects foreign]) +AM_INIT_AUTOMAKE([1.13 no-define subdir-objects foreign]) dnl faketime messes with timestamps and causes configure to be re-run. dnl --disable-maintainer-mode can be used to bypass this. AM_MAINTAINER_MODE([enable]) dnl make the compilation flags quiet unless V=1 is used -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +AM_SILENT_RULES([yes]) dnl Compiler checks (here before libtool). if test "x${CXXFLAGS+set}" = "xset"; then @@ -61,8 +66,10 @@ case $host in lt_cv_deplibs_check_method="pass_all" ;; esac -dnl Require C++11 compiler (no GNU extensions) -AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory], [nodefault]) + +dnl Require C++17 compiler (no GNU extensions) +AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory]) + dnl Check if -latomic is required for CHECK_ATOMIC @@ -87,9 +94,10 @@ AC_PATH_TOOL(AR, ar) AC_PATH_TOOL(RANLIB, ranlib) AC_PATH_TOOL(STRIP, strip) AC_PATH_TOOL(GCOV, gcov) +AC_PATH_TOOL(LLVM_COV, llvm-cov) AC_PATH_PROG(LCOV, lcov) -dnl Python 3.5 is specified in .python-version and should be used if available, see doc/dependencies.md -AC_PATH_PROGS([PYTHON], [python3.5 python3.6 python3.7 python3.8 python3 python]) +dnl Python 3.6 is specified in .python-version and should be used if available, see doc/dependencies.md +AC_PATH_PROGS([PYTHON], [python3.6 python3.7 python3.8 python3.9 python3 python]) AC_PATH_PROG(GENHTML, genhtml) AC_PATH_PROG([GIT], [git]) AC_PATH_PROG(CCACHE,ccache) @@ -99,9 +107,6 @@ AC_PATH_TOOL(READELF, readelf) AC_PATH_TOOL(CPPFILT, c++filt) AC_PATH_TOOL(OBJCOPY, objcopy) AC_PATH_PROG(DOXYGEN, doxygen) -if test -z "$DOXYGEN"; then - AC_MSG_WARN([Doxygen not found]) -fi AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) AC_ARG_VAR(PYTHONPATH, Augments the default search path for python module files) @@ -110,7 +115,19 @@ AC_ARG_ENABLE([wallet], [AS_HELP_STRING([--disable-wallet], [disable wallet (enabled by default)])], [enable_wallet=$enableval], - [enable_wallet=yes]) + [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_WITH([miniupnpc], [AS_HELP_STRING([--with-miniupnpc], @@ -118,13 +135,6 @@ AC_ARG_WITH([miniupnpc], [use_upnp=$withval], [use_upnp=auto]) -AC_ARG_ENABLE(libevent, - [AS_HELP_STRING([--disable-libevent], - [Disable using EVENT package (used for Debian packages)])],, - [enable_libevent=$enableval], - [enable_libevent=yes]) - - AC_ARG_ENABLE([upnp-default], [AS_HELP_STRING([--enable-upnp-default], [if UPNP is enabled, turn it on at startup (default is no)])], @@ -141,12 +151,6 @@ AC_ARG_ENABLE(gui-tests, [use_gui_tests=$enableval], [use_gui_tests=$use_tests]) -AC_ARG_WITH([rapidcheck], - [AS_HELP_STRING([--with-rapidcheck], - [enable RapidCheck property-based tests (default is yes if librapidcheck is found)])], - [use_rapidcheck=$withval], - [use_rapidcheck=auto]) - AC_ARG_ENABLE(bench, AS_HELP_STRING([--disable-bench],[do not compile benchmarks (default is to compile)]), [use_bench=$enableval], @@ -187,6 +191,16 @@ AC_ARG_ENABLE([ccache], [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 BGL Core warnings +dnl or if they cause a build failure with --enable-werror. +AC_ARG_ENABLE([suppress-external-warnings], + [AS_HELP_STRING([--enable-suppress-external-warnings], + [Suppress warnings from external headers (default is no)])], + [suppress_external_warnings=$enableval], + [suppress_external_warnings=no]) + AC_ARG_ENABLE([lcov], [AS_HELP_STRING([--enable-lcov], [enable lcov testing (default is no)])], @@ -233,15 +247,23 @@ AC_ARG_ENABLE([zmq], [use_zmq=$enableval], [use_zmq=yes]) -AC_ARG_ENABLE([bip70], - [AS_HELP_STRING([--enable-bip70], - [BIP70 (payment protocol) support in the GUI (no longer supported)])], - [enable_bip70=$enableval], - [enable_bip70=no]) +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]) -if test x$enable_bip70 != xno; then - AC_MSG_ERROR([BIP70 is no longer supported!]) -fi +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 BGL-node, BGL-wallet, and BGL-gui executables in addition to monolithic BGLd and BGL-qt executables. Requires libmultiprocess library. Experimental (default is no)])], + [enable_multiprocess=$enableval], + [enable_multiprocess=no]) AC_ARG_ENABLE(man, [AS_HELP_STRING([--disable-man], @@ -269,6 +291,13 @@ AC_ARG_ENABLE([gprof], [enable_gprof=$enableval], [enable_gprof=no]) +dnl Pass compiler & linker flags that make builds deterministic +AC_ARG_ENABLE([determinism], + [AS_HELP_STRING([--enable-determinism], + [Enable compilation flags that make builds deterministic (default is no)])], + [enable_determinism=$enableval], + [enable_determinism=no]) + dnl Turn warnings into errors AC_ARG_ENABLE([werror], [AS_HELP_STRING([--enable-werror], @@ -277,8 +306,30 @@ AC_ARG_ENABLE([werror], [enable_werror=no]) AC_LANG_PUSH([C++]) + +dnl Check for a flag to turn compiler warnings into errors. This is helpful for checks which may +dnl appear to succeed because by default they merely emit warnings when they fail. +dnl +dnl Note that this is not necessarily a check to see if -Werror is supported, but rather to see if +dnl a compile with -Werror can succeed. This is important because the compiler may already be +dnl warning about something unrelated, for example about some path issue. If that is the case, +dnl -Werror cannot be used because all of those warnings would be turned into errors. AX_CHECK_COMPILE_FLAG([-Werror],[CXXFLAG_WERROR="-Werror"],[CXXFLAG_WERROR=""]) +dnl Check for a flag to turn linker warnings into errors. When flags are passed to linkers via the +dnl compiler driver using a -Wl,-foo flag, linker warnings may be swallowed rather than bubbling up. +dnl See note above, the same applies here as well. +dnl +dnl LDFLAG_WERROR Should only be used when testing -Wl,* +case $host in + *darwin*) + AX_CHECK_LINK_FLAG([-Wl,-fatal_warnings],[LDFLAG_WERROR="-Wl,-fatal_warnings"],[LDFLAG_WERROR=""]) + ;; + *) + AX_CHECK_LINK_FLAG([-Wl,--fatal-warnings],[LDFLAG_WERROR="-Wl,--fatal-warnings"],[LDFLAG_WERROR=""]) + ;; +esac + if test "x$enable_debug" = xyes; then dnl Clear default -g -O2 flags if test "x$CXXFLAGS_overridden" = xno; then @@ -332,23 +383,47 @@ if test "x$enable_werror" = "xyes"; then if test "x$CXXFLAG_WERROR" = "x"; then AC_MSG_ERROR("enable-werror set but -Werror is not usable") fi + AX_CHECK_COMPILE_FLAG([-Werror=gnu],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=gnu"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Werror=vla],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=vla"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Werror=shadow-field],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=shadow-field"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Werror=switch],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=switch"],,[[$CXXFLAG_WERROR]]) - AX_CHECK_COMPILE_FLAG([-Werror=thread-safety-analysis],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=thread-safety-analysis"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Werror=thread-safety],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=thread-safety"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Werror=range-loop-analysis],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=range-loop-analysis"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Werror=unused-variable],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unused-variable"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Werror=date-time],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=date-time"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Werror=return-type],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=return-type"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Werror=conditional-uninitialized],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=conditional-uninitialized"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Werror=sign-compare],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=sign-compare"],,[[$CXXFLAG_WERROR]]) + dnl -Wsuggest-override is broken with GCC before 9.2 + dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78010 + AX_CHECK_COMPILE_FLAG([-Werror=suggest-override],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=suggest-override"],,[[$CXXFLAG_WERROR]], + [AC_LANG_SOURCE([[struct A { virtual void f(); }; struct B : A { void f() final; };]])]) + AX_CHECK_COMPILE_FLAG([-Werror=unreachable-code-loop-increment],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unreachable-code-loop-increment"],,[[$CXXFLAG_WERROR]]) fi if test "x$CXXFLAGS_overridden" = "xno"; then AX_CHECK_COMPILE_FLAG([-Wall],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wall"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wextra],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wextra"],,[[$CXXFLAG_WERROR]]) - AX_CHECK_COMPILE_FLAG([-Wformat],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wgnu],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wgnu"],,[[$CXXFLAG_WERROR]]) + dnl some compilers will ignore -Wformat-security without -Wformat, so just combine the two here. + AX_CHECK_COMPILE_FLAG([-Wformat -Wformat-security],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat -Wformat-security"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wvla],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wvla"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wshadow-field],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wshadow-field"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wswitch],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wswitch"],,[[$CXXFLAG_WERROR]]) - AX_CHECK_COMPILE_FLAG([-Wformat-security],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]]) - AX_CHECK_COMPILE_FLAG([-Wthread-safety-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety-analysis"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wthread-safety],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wrange-loop-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wrange-loop-analysis"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wredundant-decls],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wredundant-decls"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wunused-variable],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunused-variable"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wdate-time],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdate-time"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wconditional-uninitialized],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wconditional-uninitialized"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wsign-compare],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wsign-compare"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wduplicated-branches],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wduplicated-branches"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wduplicated-cond],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wduplicated-cond"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wlogical-op],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wlogical-op"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Woverloaded-virtual],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Woverloaded-virtual"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wsuggest-override],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wsuggest-override"],,[[$CXXFLAG_WERROR]], + [AC_LANG_SOURCE([[struct A { virtual void f(); }; struct B : A { void f() final; };]])]) + AX_CHECK_COMPILE_FLAG([-Wunreachable-code-loop-increment],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunreachable-code-loop-increment"],,[[$CXXFLAG_WERROR]]) dnl Some compilers (gcc) ignore unknown -Wno-* options, but warn about all dnl unknown options if any other warning is produced. Test the -Wfoo case, and @@ -358,9 +433,13 @@ if test "x$CXXFLAGS_overridden" = "xno"; then AX_CHECK_COMPILE_FLAG([-Wunused-local-typedef],[NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-unused-local-typedef"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wdeprecated-register],[NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-deprecated-register"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough],[NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-implicit-fallthrough"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wdeprecated-copy],[NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-deprecated-copy"],,[[$CXXFLAG_WERROR]]) fi -enable_hwcrc32=no +dnl Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review. +AX_CHECK_COMPILE_FLAG([-fno-extended-identifiers],[[CXXFLAGS="$CXXFLAGS -fno-extended-identifiers"]],,[[$CXXFLAG_WERROR]]) + +enable_sse42=no enable_sse41=no enable_avx2=no enable_shani=no @@ -370,6 +449,8 @@ if test "x$use_asm" = "xyes"; 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]]) @@ -377,7 +458,7 @@ AX_CHECK_COMPILE_FLAG([-msse4 -msha],[[SHANI_CXXFLAGS="-msse4 -msha"]],,[[$CXXFL TEMP_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $SSE42_CXXFLAGS" -AC_MSG_CHECKING(for assembler crc32 support) +AC_MSG_CHECKING(for SSE4.2 intrinsics) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #if defined(_MSC_VER) @@ -392,7 +473,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ l = _mm_crc32_u64(l, 0); return l; ]])], - [ AC_MSG_RESULT(yes); enable_hwcrc32=yes], + [ AC_MSG_RESULT(yes); enable_sse42=yes], [ AC_MSG_RESULT(no)] ) CXXFLAGS="$TEMP_CXXFLAGS" @@ -444,6 +525,24 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ) CXXFLAGS="$TEMP_CXXFLAGS" +# ARM +AX_CHECK_COMPILE_FLAG([-march=armv8-a+crc+crypto],[[ARM_CRC_CXXFLAGS="-march=armv8-a+crc+crypto"]],,[[$CXXFLAG_WERROR]]) + +TEMP_CXXFLAGS="$CXXFLAGS" +CXXFLAGS="$CXXFLAGS $ARM_CRC_CXXFLAGS" +AC_MSG_CHECKING(for ARM CRC32 intrinsics) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include + ]],[[ + __crc32cb(0, 0); __crc32ch(0, 0); __crc32cw(0, 0); __crc32cd(0, 0); + vmull_p64(0, 0); + ]])], + [ AC_MSG_RESULT(yes); enable_arm_crc=yes; ], + [ AC_MSG_RESULT(no)] +) +CXXFLAGS="$TEMP_CXXFLAGS" + fi CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS" @@ -484,33 +583,23 @@ AC_ARG_WITH([daemon], [build_BGLd=$withval], [build_BGLd=yes]) -use_pkgconfig=yes case $host in *mingw*) - - #pkgconfig does more harm than good with MinGW - use_pkgconfig=no - TARGET_OS=windows - AC_CHECK_LIB([mingwthrd], [main],, AC_MSG_ERROR(libmingwthrd missing)) - AC_CHECK_LIB([kernel32], [main],, AC_MSG_ERROR(libkernel32 missing)) - 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([winspool], [main],, AC_MSG_ERROR(libwinspool missing)) - AC_CHECK_LIB([winmm], [main],, AC_MSG_ERROR(libwinmm missing)) - AC_CHECK_LIB([shell32], [main],, AC_MSG_ERROR(libshell32 missing)) - AC_CHECK_LIB([comctl32], [main],, AC_MSG_ERROR(libcomctl32 missing)) - AC_CHECK_LIB([ole32], [main],, 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([rpcrt4], [main],, AC_MSG_ERROR(librpcrt4 missing)) - AC_CHECK_LIB([advapi32], [main],, AC_MSG_ERROR(libadvapi32 missing)) - AC_CHECK_LIB([ws2_32], [main],, AC_MSG_ERROR(libws2_32 missing)) - AC_CHECK_LIB([mswsock], [main],, AC_MSG_ERROR(libmswsock missing)) - AC_CHECK_LIB([shlwapi], [main],, AC_MSG_ERROR(libshlwapi missing)) - AC_CHECK_LIB([iphlpapi], [main],, AC_MSG_ERROR(libiphlpapi missing)) - AC_CHECK_LIB([crypt32], [main],, AC_MSG_ERROR(libcrypt32 missing)) + 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. @@ -526,11 +615,7 @@ case $host in AC_MSG_ERROR("windres not found") fi - CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0601" - LEVELDB_TARGET_FLAGS="-DOS_WINDOWS" - if test "x$CXXFLAGS_overridden" = "xno"; then - CXXFLAGS="$CXXFLAGS -w" - fi + CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN" 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 @@ -540,10 +625,11 @@ case $host in 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]],[LDFLAGS="$LDFLAGS -Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1"],,[[$LDFLAG_WERROR]]) ;; *darwin*) TARGET_OS=darwin - LEVELDB_TARGET_FLAGS="-DOS_MACOSX" if test x$cross_compiling != xyes; then BUILD_OS=darwin AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert) @@ -557,9 +643,10 @@ case $host in bdb_prefix=$($BREW --prefix berkeley-db4 2>/dev/null) qt5_prefix=$($BREW --prefix qt5 2>/dev/null) - if test x$bdb_prefix != x; then - CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include" - LIBS="$LIBS -L$bdb_prefix/lib" + if test x$bdb_prefix != x && test "x$BDB_CFLAGS" = "x" && test "x$BDB_LIBS" = "x" && test "$use_bdb" != "no"; then + dnl This must precede the call to BGL_FIND_BDB48 below. + BDB_CFLAGS="-I$bdb_prefix/include" + BDB_LIBS="-L$bdb_prefix/lib -ldb_cxx-4.8" fi if test x$qt5_prefix != x; then PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH" @@ -572,6 +659,7 @@ case $host in BUILD_OS=darwin ;; *) + AC_PATH_TOOL([DSYMUTIL], [dsymutil], dsymutil) AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], install_name_tool) AC_PATH_TOOL([OTOOL], [otool], otool) AC_PATH_PROGS([GENISOIMAGE], [genisoimage mkisofs],genisoimage) @@ -588,55 +676,19 @@ case $host in esac fi - AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"]) + AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"],, [[$LDFLAG_WERROR]]) CPPFLAGS="$CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0" OBJCXXFLAGS="$CXXFLAGS" ;; *android*) dnl make sure android stays above linux for hosts like *linux-android* TARGET_OS=android - LEVELDB_TARGET_FLAGS="-DOS_ANDROID" ;; *linux*) TARGET_OS=linux - LEVELDB_TARGET_FLAGS="-DOS_LINUX" - ;; - *kfreebsd*) - LEVELDB_TARGET_FLAGS="-DOS_KFREEBSD" - ;; - *freebsd*) - LEVELDB_TARGET_FLAGS="-DOS_FREEBSD" - ;; - *openbsd*) - LEVELDB_TARGET_FLAGS="-DOS_OPENBSD" - ;; - *netbsd*) - LEVELDB_TARGET_FLAGS="-DOS_NETBSD" - ;; - *dragonfly*) - LEVELDB_TARGET_FLAGS="-DOS_DRAGONFLYBSD" - ;; - *solaris*) - LEVELDB_TARGET_FLAGS="-DOS_SOLARIS" - ;; - *hpux*) - LEVELDB_TARGET_FLAGS="-DOS_HPUX" - ;; - *) - AC_MSG_ERROR(Cannot build leveldb for $host. Please file a bug report.) ;; esac -if test x$use_pkgconfig = xyes; then - m4_ifndef([PKG_PROG_PKG_CONFIG], [AC_MSG_ERROR(PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh.)]) - m4_ifdef([PKG_PROG_PKG_CONFIG], [ - PKG_PROG_PKG_CONFIG - if test x"$PKG_CONFIG" = "x"; then - AC_MSG_ERROR(pkg-config not found.) - fi - ]) -fi - if test x$use_extended_functional_tests != xno; then AC_SUBST(EXTENDED_FUNCTIONAL_TESTS, --extended) fi @@ -645,21 +697,41 @@ if test x$use_lcov = xyes; then if test x$LCOV = x; then AC_MSG_ERROR("lcov testing requested but lcov not found") fi - if test x$GCOV = x; then - AC_MSG_ERROR("lcov testing requested but gcov not found") - fi if test x$PYTHON = x; then AC_MSG_ERROR("lcov testing requested but python not found") fi if test x$GENHTML = x; then AC_MSG_ERROR("lcov testing requested but genhtml not found") fi - LCOV="$LCOV --gcov-tool=$GCOV" + + AC_MSG_CHECKING([whether compiler is Clang]) + AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ + #if defined(__clang__) && defined(__llvm__) + // Compiler is Clang + #else + # error Compiler is not Clang + #endif + ]])],[ + AC_MSG_RESULT([yes]) + if test x$LLVM_COV = x; then + AC_MSG_ERROR([lcov testing requested but llvm-cov not found]) + fi + COV_TOOL="$LLVM_COV gcov" + ],[ + AC_MSG_RESULT([no]) + if test x$GCOV = x; then + AC_MSG_ERROR([lcov testing requested but gcov not found]) + fi + COV_TOOL="$GCOV" + ]) + AC_SUBST(COV_TOOL) + AC_SUBST(COV_TOOL_WRAPPER, "cov_tool_wrapper.sh") + LCOV="$LCOV --gcov-tool $(pwd)/$COV_TOOL_WRAPPER" + AX_CHECK_LINK_FLAG([[--coverage]], [LDFLAGS="$LDFLAGS --coverage"], [AC_MSG_ERROR("lcov testing requested but --coverage linker flag does not work")]) AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage"], [AC_MSG_ERROR("lcov testing requested but --coverage flag does not work")]) - AC_DEFINE(USE_COVERAGE, 1, [Define this symbol if coverage is enabled]) CXXFLAGS="$CXXFLAGS -Og" fi @@ -692,31 +764,11 @@ if test x$ac_cv_sys_large_files != x && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files" fi -AX_CHECK_LINK_FLAG([[-Wl,--large-address-aware]], [LDFLAGS="$LDFLAGS -Wl,--large-address-aware"]) - AX_GCC_FUNC_ATTRIBUTE([visibility]) AX_GCC_FUNC_ATTRIBUTE([dllexport]) AX_GCC_FUNC_ATTRIBUTE([dllimport]) if test x$use_glibc_compat != xno; then - - dnl glibc absorbed clock_gettime in 2.17. librt (its previous location) is safe to link - dnl in anyway for back-compat. - AC_CHECK_LIB([rt],[clock_gettime],, AC_MSG_ERROR(librt missing)) - - dnl __fdelt_chk's params and return type have changed from long unsigned int to long int. - dnl See which one is present here. - AC_MSG_CHECKING(__fdelt_chk type) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef _FORTIFY_SOURCE - #undef _FORTIFY_SOURCE - #endif - #define _FORTIFY_SOURCE 2 - #include - extern "C" long unsigned int __fdelt_warn(long unsigned int);]],[[]])], - [ fdelt_type="long unsigned int"], - [ fdelt_type="long int"]) - AC_MSG_RESULT($fdelt_type) - AC_DEFINE_UNQUOTED(FDELT_TYPE, $fdelt_type,[parameter and return value type for __fdelt_chk]) AX_CHECK_LINK_FLAG([[-Wl,--wrap=__divmoddi4]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=__divmoddi4"]) AX_CHECK_LINK_FLAG([[-Wl,--wrap=log2f]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log2f"]) else @@ -754,6 +806,14 @@ if test x$use_hardening != xno; then AX_CHECK_COMPILE_FLAG([-Wstack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"]) AX_CHECK_COMPILE_FLAG([-fstack-protector-all],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"]) + AX_CHECK_COMPILE_FLAG([-fcf-protection=full],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fcf-protection=full"]) + + dnl stack-clash-protection does not work properly when building for Windows. + dnl We use the test case from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 + dnl to determine if it can be enabled. + AX_CHECK_COMPILE_FLAG([-fstack-clash-protection],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-clash-protection"],[],["-O0"], + [AC_LANG_SOURCE([[class D {public: unsigned char buf[32768];}; int main() {D d; return 0;}]])]) + dnl When enable_debug is yes, all optimizations are disabled. dnl However, FORTIFY_SOURCE requires that there is some level of optimization, otherwise it does nothing and just creates a compiler warning. dnl Since FORTIFY_SOURCE is a no-op without optimizations, do not enable it when enable_debug is yes. @@ -766,11 +826,12 @@ if test x$use_hardening != xno; then ]) fi - AX_CHECK_LINK_FLAG([[-Wl,--dynamicbase]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"]) - AX_CHECK_LINK_FLAG([[-Wl,--nxcompat]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"]) - AX_CHECK_LINK_FLAG([[-Wl,--high-entropy-va]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--high-entropy-va"]) - AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"]) - AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"]) + AX_CHECK_LINK_FLAG([[-Wl,--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 @@ -780,47 +841,22 @@ if test x$use_hardening != xno; then esac fi -dnl this flag screws up non-darwin gcc even when the check fails. special-case it. +dnl These flags are specific to ld64, and may cause issues with other linkers. +dnl For example: GNU ld will interpret -dead_strip as -de and then try and use +dnl "ad_strip" as the symbol for the entry point. if test x$TARGET_OS = xdarwin; then - AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"]) - AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"]) - AX_CHECK_LINK_FLAG([[-Wl,-bind_at_load]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-bind_at_load"]) + AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"],, [[$LDFLAG_WERROR]]) + AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"],, [[$LDFLAG_WERROR]]) + AX_CHECK_LINK_FLAG([[-Wl,-bind_at_load]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-bind_at_load"],, [[$LDFLAG_WERROR]]) fi -AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h]) +if test x$enable_determinism = xyes; then + if test x$TARGET_OS = xwindows; then + AX_CHECK_LINK_FLAG([[-Wl,--no-insert-timestamp]], [LDFLAGS="$LDFLAGS -Wl,--no-insert-timestamp"],, [[$LDFLAG_WERROR]]) + fi +fi -dnl FD_ZERO may be dependent on a declaration of memcpy, e.g. in SmartOS -dnl check that it fails to build without memcpy, then that it builds with -AC_MSG_CHECKING(FD_ZERO memcpy dependence) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #if HAVE_SYS_SELECT_H - #include - #endif - ]],[[ - #if HAVE_SYS_SELECT_H - fd_set fds; - FD_ZERO(&fds); - #endif - ]])], - [ AC_MSG_RESULT(no) ], - [ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #if HAVE_SYS_SELECT_H - #include - #endif - ]], [[ - #if HAVE_SYS_SELECT_H - fd_set fds; - FD_ZERO(&fds); - #endif - ]])], - [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CSTRING_DEPENDENT_FD_ZERO, 1, [Define this symbol if FD_ZERO is dependent of a memcpy declaration being available]) ], - [ AC_MSG_ERROR(failed with cstring include) ] - ) - ] -) +AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h]) AC_CHECK_DECLS([getifaddrs, freeifaddrs],,, [#include @@ -843,7 +879,21 @@ AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64],,, #include #endif]) -AC_CHECK_DECLS([__builtin_clz, __builtin_clzl, __builtin_clzll]) +AC_MSG_CHECKING(for __builtin_clzl) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ + (void) __builtin_clzl(0); + ]])], + [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_BUILTIN_CLZL, 1, [Define this symbol if you have __builtin_clzl])], + [ AC_MSG_RESULT(no)] +) + +AC_MSG_CHECKING(for __builtin_clzll) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ + (void) __builtin_clzll(0); + ]])], + [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_BUILTIN_CLZLL, 1, [Define this symbol if you have __builtin_clzll])], + [ AC_MSG_RESULT(no)] +) dnl Check for malloc_info (for memory statistics information in getmemoryinfo) AC_MSG_CHECKING(for getmemoryinfo) @@ -861,6 +911,22 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [ 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/system.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 visibility attribute]) AC_LINK_IFELSE([AC_LANG_SOURCE([ int foo_def( void ) __attribute__((visibility("default"))); @@ -878,6 +944,9 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ ] ) +dnl thread_local is currently disabled when building with glibc back compat. +dnl Our minimum supported glibc is 2.17, however support for thread_local +dnl did not arrive in glibc until 2.18. if test "x$use_thread_local" = xyes || { test "x$use_thread_local" = xauto && test "x$use_glibc_compat" = xno; }; then TEMP_LDFLAGS="$LDFLAGS" LDFLAGS="$TEMP_LDFLAGS $PTHREAD_CFLAGS" @@ -899,11 +968,6 @@ if test "x$use_thread_local" = xyes || { test "x$use_thread_local" = xauto && te dnl https://gist.github.com/jamesob/fe9a872051a88b2025b1aa37bfa98605 AC_MSG_RESULT(no) ;; - *darwin*) - dnl TODO enable thread_local on later versions of Darwin where it is - dnl supported (per https://stackoverflow.com/a/29929949) - 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) @@ -922,6 +986,22 @@ if test "x$use_thread_local" = xyes || { test "x$use_thread_local" = xauto && te 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 syscall) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include @@ -950,11 +1030,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include AC_MSG_CHECKING(for sysctl) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include ]], - [[ static const int name[2] = {CTL_KERN, KERN_VERSION}; - #ifdef __linux__ + [[ #ifdef __linux__ #error "Don't use sysctl on Linux, it's deprecated even when it works" #endif - sysctl(name, 2, nullptr, nullptr, nullptr, 0); ]])], + 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)] ) @@ -962,7 +1041,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include AC_MSG_CHECKING(for sysctl KERN_ARND) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include ]], - [[ static const int name[2] = {CTL_KERN, KERN_ARND}; + [[ #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)] @@ -976,6 +1058,72 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include [ 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 ] +) + +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 + #include + #include + ]], [[ + getauxval(AT_HWCAP); + ]])], + [ AC_MSG_RESULT(yes); HAVE_STRONG_GETAUXVAL=1 ], + [ AC_MSG_RESULT(no); HAVE_STRONG_GETAUXVAL=0 ] +) + +AC_MSG_CHECKING(for weak getauxval support in the compiler) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + unsigned long getauxval(unsigned long type) __attribute__((weak)); + #define AT_HWCAP 16 + ]], [[ + getauxval(AT_HWCAP); + ]])], + [ AC_MSG_RESULT(yes); HAVE_WEAK_GETAUXVAL=1 ], + [ AC_MSG_RESULT(no); HAVE_WEAK_GETAUXVAL=0 ] +) + dnl Check for reduced exports if test x$use_reduce_exports = xyes; then AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[RE_CXXFLAGS="-fvisibility=hidden"], @@ -1012,6 +1160,18 @@ AC_SUBST(LEVELDB_CPPFLAGS) AC_SUBST(LIBLEVELDB) AC_SUBST(LIBMEMENV) +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 "x$enable_fuzz" = "xyes"; then AC_MSG_WARN(enable-fuzz will disable all other targets) @@ -1028,16 +1188,69 @@ if test "x$enable_fuzz" = "xyes"; then use_bench=no use_upnp=no use_zmq=no + + AC_MSG_CHECKING([whether main function is needed]) + AX_CHECK_LINK_FLAG( + [[-fsanitize=$use_sanitizers]], + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([yes]) + CPPFLAGS="$CPPFLAGS -DPROVIDE_MAIN_FUNCTION"], + [], + [AC_LANG_PROGRAM([[ + #include + #include + extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { return 0; } + /* unterminated comment to remove the main function ... + ]],[[]])]) else BGL_QT_INIT dnl sets $BGL_enable_qt, $BGL_enable_qt_test, $BGL_enable_qt_dbus - BGL_QT_CONFIGURE([$use_pkgconfig]) + BGL_QT_CONFIGURE([5.5.1]) + + dnl Keep a copy of the original $QT_INCLUDES and use it when invoking qt's moc + QT_INCLUDES_UNSUPPRESSED=$QT_INCLUDES + if test x$suppress_external_warnings != xno ; 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 x$enable_wallet != xno; then dnl Check for libdb_cxx only if wallet enabled BGL_FIND_BDB48 + if test x$suppress_external_warnings != xno ; then + BDB_CPPFLAGS=SUPPRESS_WARNINGS($BDB_CPPFLAGS) + fi + + dnl Check for sqlite3 + if test "x$use_sqlite" != "xno"; then + PKG_CHECK_MODULES([SQLITE], [sqlite3 >= 3.7.17], [have_sqlite=yes], [have_sqlite=no]) + fi + AC_MSG_CHECKING([whether to build wallet with support for sqlite]) + if test "x$use_sqlite" = "xno"; then + use_sqlite=no + elif test "x$have_sqlite" = "xno"; then + if test "x$use_sqlite" = "xyes"; then + AC_MSG_ERROR([sqlite support requested but cannot be built. Use --without-sqlite]) + fi + use_sqlite=no + else + if test x$use_sqlite != xno; then + AC_DEFINE([USE_SQLITE],[1],[Define if sqlite support should be compiled in]) + use_sqlite=yes + fi + fi + AC_MSG_RESULT([$use_sqlite]) + + dnl Disable wallet if both --without-bdb and --without-sqlite + if test "x$use_bdb$use_sqlite" = "xnono"; then + if test "x$enable_wallet" = "xyes"; then + AC_MSG_ERROR([wallet functionality requested but no BDB or SQLite support available.]) + fi + enable_wallet=no + fi fi dnl Check for libminiupnpc (optional) @@ -1078,9 +1291,9 @@ fi if test x$use_boost = xyes; then dnl Minimum required Boost version -define(MINIMUM_REQUIRED_BOOST, 1.47.0) +define(MINIMUM_REQUIRED_BOOST, 1.58.0) -dnl Check for boost libs +dnl Check for Boost libs AX_BOOST_BASE([MINIMUM_REQUIRED_BOOST]) if test x$want_boost = xno; then AC_MSG_ERROR([[only libBGLconsensus can be built without boost]]) @@ -1088,37 +1301,25 @@ fi AX_BOOST_SYSTEM AX_BOOST_FILESYSTEM AX_BOOST_THREAD -AX_BOOST_CHRONO + +dnl Opt-in to boost-process +AS_IF([ test x$with_boost_process != x ], [ AX_BOOST_PROCESS ], [ ax_cv_boost_process=no ] ) + +if test x$suppress_external_warnings != xno; then + BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS) +fi dnl Boost 1.56 through 1.62 allow using std::atomic instead of its own atomic dnl counter implementations. In 1.63 and later the std::atomic approach is default. m4_pattern_allow(DBOOST_AC_USE_STD_ATOMIC) dnl otherwise it's treated like a macro BOOST_CPPFLAGS="-DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC $BOOST_CPPFLAGS" -if test x$use_reduce_exports = xyes; then - AC_MSG_CHECKING([for working boost reduced exports]) - TEMP_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS" - AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]], [[ - #if BOOST_VERSION >= 104900 - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[ - AC_MSG_RESULT(yes) - ],[ - AC_MSG_ERROR([boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduce-exports.]) - ]) - CPPFLAGS="$TEMP_CPPFLAGS" -fi +BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIB" fi if test x$use_reduce_exports = xyes; then CXXFLAGS="$CXXFLAGS $RE_CXXFLAGS" - AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]], [RELDFLAGS="-Wl,--exclude-libs,ALL"]) + AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]], [RELDFLAGS="-Wl,--exclude-libs,ALL"],, [[$LDFLAG_WERROR]]) fi if test x$use_tests = xyes; then @@ -1127,7 +1328,6 @@ if test x$use_tests = xyes; then AC_MSG_ERROR(hexdump is required for tests) fi - if test x$use_boost = xyes; then AX_BOOST_UNIT_TEST_FRAMEWORK @@ -1153,229 +1353,111 @@ if test x$use_tests = xyes; then fi fi -if test x$use_boost = xyes; then +dnl libevent check -BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIB $BOOST_CHRONO_LIB" - - -dnl If boost (prior to 1.57) was built without c++11, it emulated scoped enums -dnl using c++98 constructs. Unfortunately, this implementation detail leaked into -dnl the abi. This was fixed in 1.57. - -dnl When building against that installed version using c++11, the headers pick up -dnl on the native c++11 scoped enum support and enable it, however it will fail to -dnl link. This can be worked around by disabling c++11 scoped enums if linking will -dnl fail. -dnl BOOST_NO_SCOPED_ENUMS was changed to BOOST_NO_CXX11_SCOPED_ENUMS in 1.51. - -TEMP_LIBS="$LIBS" -LIBS="$BOOST_LIBS $LIBS" -TEMP_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" -AC_MSG_CHECKING([for mismatched boost c++11 scoped enums]) -AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - #if !defined(BOOST_NO_SCOPED_ENUMS) && !defined(BOOST_NO_CXX11_SCOPED_ENUMS) && BOOST_VERSION < 105700 - #define BOOST_NO_SCOPED_ENUMS - #define BOOST_NO_CXX11_SCOPED_ENUMS - #define CHECK - #endif - #include - ]],[[ - #if defined(CHECK) - boost::filesystem::copy_file("foo", "bar"); - #else - choke; - #endif - ]])], - [AC_MSG_RESULT(mismatched); BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_SCOPED_ENUMS -DBOOST_NO_CXX11_SCOPED_ENUMS"], [AC_MSG_RESULT(ok)]) -LIBS="$TEMP_LIBS" -CPPFLAGS="$TEMP_CPPFLAGS" - -dnl Boost >= 1.50 uses sleep_for rather than the now-deprecated sleep, however -dnl it was broken from 1.50 to 1.52 when backed by nanosleep. Use sleep_for if -dnl a working version is available, else fall back to sleep. sleep was removed -dnl after 1.56. -dnl If neither is available, abort. -TEMP_LIBS="$LIBS" -LIBS="$BOOST_LIBS $LIBS" -TEMP_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" -AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - ]],[[ - #if BOOST_VERSION >= 105000 && (!defined(BOOST_HAS_NANOSLEEP) || BOOST_VERSION >= 105200) - boost::this_thread::sleep_for(boost::chrono::milliseconds(0)); - #else - choke me - #endif - ]])], - [boost_sleep=yes; - AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])], - [boost_sleep=no]) -LIBS="$TEMP_LIBS" -CPPFLAGS="$TEMP_CPPFLAGS" - -if test x$boost_sleep != xyes; then -TEMP_LIBS="$LIBS" -LIBS="$BOOST_LIBS $LIBS" -TEMP_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" -AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - #include - ]],[[ - #if BOOST_VERSION <= 105600 - boost::this_thread::sleep(boost::posix_time::milliseconds(0)); - #else - choke me - #endif - ]])], - [boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP, 1, [Define this symbol if boost sleep works])], - [boost_sleep=no]) -LIBS="$TEMP_LIBS" -CPPFLAGS="$TEMP_CPPFLAGS" +if test x$build_BGL_cli$build_BGLd$BGL_enable_qt$use_tests$use_bench != xnonononono; then + PKG_CHECK_MODULES([EVENT], [libevent >= 2.0.21], [use_libevent=yes], [AC_MSG_ERROR([libevent version 2.0.21 or greater not found.])]) + if test x$TARGET_OS != xwindows; then + PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads >= 2.0.21],, [AC_MSG_ERROR([libevent_pthreads version 2.0.21 or greater not found.])]) + fi fi -if test x$boost_sleep != xyes; then - AC_MSG_ERROR(No working boost sleep implementation found.) -fi +dnl QR Code encoding library check +if test "x$use_qr" != xno; then + BGL_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])]) fi -if test x$use_pkgconfig = xyes; then - : dnl - m4_ifdef( - [PKG_CHECK_MODULES], - [ - if test x$use_qr != xno; then - BGL_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])]) - fi - if test x$build_BGL_cli$build_BGLd$BGL_enable_qt$use_tests != xnononono; then - if test x$enable_libevent != xno; then - PKG_CHECK_MODULES([EVENT], [libevent],, [AC_MSG_ERROR(libevent not found.)]) - if test x$TARGET_OS != xwindows; then - PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads],, [AC_MSG_ERROR(libevent_pthreads not found.)]) - fi - fi - fi +dnl ZMQ check - if test "x$use_zmq" = "xyes"; then - PKG_CHECK_MODULES([ZMQ],[libzmq >= 4], - [AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])], - [AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions]) - AC_MSG_WARN([libzmq version 4.x or greater not found, disabling]) - use_zmq=no]) - else - AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions]) - fi - ] - ) +if test "x$use_zmq" = xyes; then + PKG_CHECK_MODULES([ZMQ], [libzmq >= 4], + AC_DEFINE([ENABLE_ZMQ], [1], [Define to 1 to enable ZMQ functions]), + [AC_DEFINE([ENABLE_ZMQ], [0], [Define to 1 to enable ZMQ functions]) + AC_MSG_WARN([libzmq version 4.x or greater not found, disabling]) + use_zmq=no]) else - - if test x$build_BGL_cli$build_BGLd$BGL_enable_qt$use_tests != xnononono; then - AC_CHECK_HEADER([event2/event.h],, AC_MSG_ERROR(libevent headers missing),) - AC_CHECK_LIB([event],[main],EVENT_LIBS=-levent,AC_MSG_ERROR(libevent missing)) - if test x$TARGET_OS != xwindows; then - AC_CHECK_LIB([event_pthreads],[main],EVENT_PTHREADS_LIBS=-levent_pthreads,AC_MSG_ERROR(libevent_pthreads missing)) - fi - fi - - if test "x$use_zmq" = "xyes"; then - AC_CHECK_HEADER([zmq.h], - [AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])], - [AC_MSG_WARN([zmq.h not found, disabling zmq support]) - use_zmq=no - AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])]) - AC_CHECK_LIB([zmq],[zmq_ctx_shutdown],ZMQ_LIBS=-lzmq, - [AC_MSG_WARN([libzmq >= 4.0 not found, disabling zmq support]) - use_zmq=no - AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])]) - else - AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions]) - fi - - if test "x$use_zmq" = "xyes"; then - dnl Assume libzmq was built for static linking - case $host in - *mingw*) - ZMQ_CFLAGS="$ZMQ_CFLAGS -DZMQ_STATIC" - ;; - esac - fi - - if test x$use_qr != xno; then - BGL_QT_CHECK([AC_CHECK_LIB([qrencode], [main],[QR_LIBS=-lqrencode], [have_qrencode=no])]) - BGL_QT_CHECK([AC_CHECK_HEADER([qrencode.h],, have_qrencode=no)]) - fi + AC_DEFINE_UNQUOTED([ENABLE_ZMQ], [0], [Define to 1 to enable ZMQ functions]) fi -dnl RapidCheck property-based testing - -enable_property_tests=no -if test "x$use_rapidcheck" = xauto; then - AC_CHECK_HEADERS([rapidcheck.h], [enable_property_tests=yes]) -elif test "x$use_rapidcheck" != xno; then - enable_property_tests=yes -fi - -RAPIDCHECK_LIBS= -if test "x$enable_property_tests" = xyes; then - RAPIDCHECK_LIBS=-lrapidcheck +if test "x$use_zmq" = xyes; then + dnl Assume libzmq was built for static linking + case $host in + *mingw*) + ZMQ_CFLAGS="$ZMQ_CFLAGS -DZMQ_STATIC" + ;; + esac fi -AC_SUBST(RAPIDCHECK_LIBS) -AM_CONDITIONAL([ENABLE_PROPERTY_TESTS], [test x$enable_property_tests = xyes]) dnl univalue check need_bundled_univalue=yes - if test x$build_BGL_wallet$build_BGL_cli$build_BGL_tx$build_BGLd$BGL_enable_qt$use_tests$use_bench = xnonononononono; then need_bundled_univalue=no else - -if test x$system_univalue != xno ; then - found_univalue=no - if test x$use_pkgconfig = xyes; then - : #NOP - m4_ifdef( - [PKG_CHECK_MODULES], - [ - PKG_CHECK_MODULES([UNIVALUE],[libunivalue >= 1.0.4],[found_univalue=yes],[true]) - ] - ) - else - AC_CHECK_HEADER([univalue.h],[ - AC_CHECK_LIB([univalue], [main],[ - UNIVALUE_LIBS=-lunivalue - found_univalue=yes - ],[true]) - ],[true]) + if test x$system_univalue != xno; then + PKG_CHECK_MODULES([UNIVALUE], [libunivalue >= 1.0.4], [found_univalue=yes], [found_univalue=no]) + if test x$found_univalue = xyes; then + system_univalue=yes + need_bundled_univalue=no + elif test x$system_univalue = xyes; then + AC_MSG_ERROR([univalue not found]) + else + system_univalue=no + fi fi - if test x$found_univalue = xyes ; then - system_univalue=yes - need_bundled_univalue=no - elif test x$system_univalue = xyes ; then - AC_MSG_ERROR([univalue not found]) - else - system_univalue=no + if test x$need_bundled_univalue = xyes; then + UNIVALUE_CFLAGS='-I$(srcdir)/univalue/include' + UNIVALUE_LIBS='univalue/libunivalue.la' fi fi -if test x$need_bundled_univalue = xyes ; then - UNIVALUE_CFLAGS='-I$(srcdir)/univalue/include' - UNIVALUE_LIBS='univalue/libunivalue.la' +AM_CONDITIONAL([EMBEDDED_UNIVALUE],[test x$need_bundled_univalue = xyes]) +AC_SUBST(UNIVALUE_CFLAGS) +AC_SUBST(UNIVALUE_LIBS) + +dnl libmultiprocess library check + +libmultiprocess_found=no +if test "x$with_libmultiprocess" = xyes || test "x$with_libmultiprocess" = xauto; then + m4_ifdef([PKG_CHECK_MODULES], [PKG_CHECK_MODULES([LIBMULTIPROCESS], [libmultiprocess], [ + libmultiprocess_found=yes; + libmultiprocess_prefix=`$PKG_CONFIG --variable=prefix libmultiprocess`; + ], [true])]) +elif test "x$with_libmultiprocess" != xno; then + AC_MSG_ERROR([--with-libmultiprocess=$with_libmultiprocess value is not yes, auto, or no]) fi +AC_SUBST(LIBMULTIPROCESS_CFLAGS) +AC_SUBST(LIBMULTIPROCESS_LIBS) +dnl Enable multiprocess check + +if test "x$enable_multiprocess" = xyes; then + if test "x$libmultiprocess_found" != xyes; then + AC_MSG_ERROR([--enable-multiprocess=yes option specified but libmultiprocess library was not found. May need to install libmultiprocess library, or specify install path with PKG_CONFIG_PATH environment variable. Running 'pkg-config --debug libmultiprocess' may be helpful for debugging.]) + fi + build_multiprocess=yes +elif test "x$enable_multiprocess" = xauto; then + build_multiprocess=$libmultiprocess_found +else + build_multiprocess=no fi -AM_CONDITIONAL([EMBEDDED_UNIVALUE],[test x$need_bundled_univalue = xyes]) -AC_SUBST(UNIVALUE_CFLAGS) -AC_SUBST(UNIVALUE_LIBS) +AM_CONDITIONAL([BUILD_MULTIPROCESS],[test "x$build_multiprocess" = xyes]) +AM_CONDITIONAL([BUILD_BGL_NODE], [test "x$build_multiprocess" = xyes]) +AM_CONDITIONAL([BUILD_BGL_GUI], [test "x$build_multiprocess" = xyes]) + +dnl codegen tools check + +if test x$build_multiprocess != xno; then + if test "x$with_mpgen" = xyes || test "x$with_mpgen" = xauto; then + MPGEN_PREFIX="$libmultiprocess_prefix" + elif test "x$with_mpgen" != xno; then + MPGEN_PREFIX="$with_mpgen"; + fi + AC_SUBST(MPGEN_PREFIX) +fi AC_MSG_CHECKING([whether to build BGLd]) AM_CONDITIONAL([BUILD_BGLD], [test x$build_BGLd = xyes]) @@ -1418,15 +1500,13 @@ if test "x$use_ccache" != "xno"; then fi AC_MSG_RESULT($use_ccache) fi -if test "x$use_ccache" = "xyes"; then - AX_CHECK_PREPROC_FLAG([-Qunused-arguments],[CPPFLAGS="-Qunused-arguments $CPPFLAGS"]) -fi dnl enable wallet AC_MSG_CHECKING([if wallet should be enabled]) if test x$enable_wallet != xno; 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) @@ -1522,8 +1602,11 @@ fi AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin]) AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin]) +AM_CONDITIONAL([TARGET_LINUX], [test x$TARGET_OS = xlinux]) AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows]) AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes]) +AM_CONDITIONAL([USE_SQLITE], [test "x$use_sqlite" = "xyes"]) +AM_CONDITIONAL([USE_BDB], [test "x$use_bdb" = "xyes"]) AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes]) AM_CONDITIONAL([ENABLE_FUZZ],[test x$enable_fuzz = xyes]) AM_CONDITIONAL([ENABLE_QT],[test x$BGL_enable_qt = xyes]) @@ -1531,17 +1614,19 @@ AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$BUILD_TEST_QT = xyes]) AM_CONDITIONAL([ENABLE_BENCH],[test x$use_bench = xyes]) AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes]) AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes]) +AM_CONDITIONAL([USE_LIBEVENT],[test x$use_libevent = xyes]) AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes]) AM_CONDITIONAL([HARDEN],[test x$use_hardening = xyes]) -AM_CONDITIONAL([ENABLE_HWCRC32],[test x$enable_hwcrc32 = xyes]) +AM_CONDITIONAL([ENABLE_SSE42],[test x$enable_sse42 = xyes]) AM_CONDITIONAL([ENABLE_SSE41],[test x$enable_sse41 = xyes]) AM_CONDITIONAL([ENABLE_AVX2],[test x$enable_avx2 = xyes]) AM_CONDITIONAL([ENABLE_SHANI],[test x$enable_shani = xyes]) +AM_CONDITIONAL([ENABLE_ARM_CRC],[test x$enable_arm_crc = xyes]) AM_CONDITIONAL([USE_ASM],[test x$use_asm = xyes]) +AM_CONDITIONAL([WORDS_BIGENDIAN],[test x$ac_cv_c_bigendian = xyes]) AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version]) AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version]) -AC_DEFINE(CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION, [Build revision]) 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]) @@ -1551,7 +1636,6 @@ define(_COPYRIGHT_HOLDERS_FINAL, [patsubst(_COPYRIGHT_HOLDERS, [%s], [_COPYRIGHT 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_REVISION, _CLIENT_VERSION_REVISION) AC_SUBST(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD) AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE) AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR) @@ -1584,23 +1668,37 @@ AC_SUBST(SSE42_CXXFLAGS) AC_SUBST(SSE41_CXXFLAGS) AC_SUBST(AVX2_CXXFLAGS) AC_SUBST(SHANI_CXXFLAGS) +AC_SUBST(ARM_CRC_CXXFLAGS) AC_SUBST(LIBTOOL_APP_LDFLAGS) +AC_SUBST(USE_SQLITE) +AC_SUBST(USE_BDB) AC_SUBST(USE_UPNP) AC_SUBST(USE_QRCODE) AC_SUBST(BOOST_LIBS) +AC_SUBST(SQLITE_LIBS) AC_SUBST(TESTDEFS) -AC_SUBST(LEVELDB_TARGET_FLAGS) AC_SUBST(MINIUPNPC_CPPFLAGS) AC_SUBST(MINIUPNPC_LIBS) AC_SUBST(EVENT_LIBS) AC_SUBST(EVENT_PTHREADS_LIBS) AC_SUBST(ZMQ_LIBS) AC_SUBST(QR_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(HAVE_WEAK_GETAUXVAL) AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/config.ini]) AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh]) AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/Doxyfile])]) +AC_CONFIG_LINKS([contrib/devtools/security-check.py:contrib/devtools/security-check.py]) +AC_CONFIG_LINKS([contrib/devtools/test-security-check.py:contrib/devtools/test-security-check.py]) AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py]) AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py]) +AC_CONFIG_LINKS([test/fuzz/test_runner.py:test/fuzz/test_runner.py]) AC_CONFIG_LINKS([test/util/BGL-util-test.py:test/util/BGL-util-test.py]) AC_CONFIG_LINKS([test/util/rpcauth-test.py:test/util/rpcauth-test.py]) @@ -1631,7 +1729,7 @@ if test x$need_bundled_univalue = xyes; then AC_CONFIG_SUBDIRS([src/univalue]) fi -ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --with-bignum=no --enable-module-recovery --disable-jni" +ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --with-bignum=no --enable-module-recovery --enable-module-schnorrsig --enable-experimental" AC_CONFIG_SUBDIRS([src/secp256k1]) AC_OUTPUT @@ -1646,7 +1744,13 @@ esac echo echo "Options used to compile and link:" +echo " boost process = $ax_cv_boost_process" +echo " multiprocess = $build_multiprocess" echo " with wallet = $enable_wallet" +if test "x$enable_wallet" != "xno"; then + echo " with sqlite = $use_sqlite" + echo " with bdb = $use_bdb" +fi echo " with gui / qt = $BGL_enable_qt" if test x$BGL_enable_qt != xno; then echo " with qr = $use_qr" @@ -1654,7 +1758,6 @@ fi echo " with zmq = $use_zmq" echo " with test = $use_tests" if test x$use_tests != xno; then - echo " with prop = $enable_property_tests" echo " with fuzz = $enable_fuzz" fi echo " with bench = $use_bench" @@ -1666,13 +1769,13 @@ echo " gprof enabled = $enable_gprof" echo " werror = $enable_werror" echo echo " target os = $TARGET_OS" -echo " build os = $BUILD_OS" +echo " build os = $build_os" echo echo " CC = $CC" -echo " CFLAGS = $CFLAGS" +echo " CFLAGS = $PTHREAD_CFLAGS $CFLAGS" echo " CPPFLAGS = $DEBUG_CPPFLAGS $HARDENED_CPPFLAGS $CPPFLAGS" echo " CXX = $CXX" echo " CXXFLAGS = $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOWARN_CXXFLAGS $ERROR_CXXFLAGS $GPROF_CXXFLAGS $CXXFLAGS" -echo " LDFLAGS = $PTHREAD_CFLAGS $HARDENED_LDFLAGS $GPROF_LDFLAGS $LDFLAGS" +echo " LDFLAGS = $PTHREAD_LIBS $HARDENED_LDFLAGS $GPROF_LDFLAGS $LDFLAGS" echo " ARFLAGS = $ARFLAGS" echo diff --git a/contrib/BGL-cli.bash-completion b/contrib/BGL-cli.bash-completion index 2e1bab9c6c..030fe27421 100644 --- a/contrib/BGL-cli.bash-completion +++ b/contrib/BGL-cli.bash-completion @@ -1,5 +1,5 @@ # bash programmable completion for BGL-cli(1) -# Copyright (c) 2012-2016 The Bitcoin Core developers +# Copyright (c) 2012-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/contrib/BGLd.bash-completion b/contrib/BGLd.bash-completion index 11f6d68a88..a0525ee224 100644 --- a/contrib/BGLd.bash-completion +++ b/contrib/BGLd.bash-completion @@ -1,5 +1,5 @@ # bash programmable completion for BGLd(1) and BGL-qt(1) -# Copyright (c) 2012-2016 The Bitcoin Core developers +# Copyright (c) 2012-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/contrib/debian/copyright b/contrib/debian/copyright index 37b0472095..d714ab564d 100644 --- a/contrib/debian/copyright +++ b/contrib/debian/copyright @@ -5,7 +5,7 @@ Upstream-Contact: Satoshi Nakamoto Source: https://github.com/BGL/BGL Files: * -Copyright: 2009-2019, BGL Core Developers +Copyright: 2009-2020, BGL Core Developers License: Expat Comment: The BGL Core Developers encompasses the current developers listed on BGL.org, as well as the numerous contributors to the project. diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md index cba732eec3..2badfeac50 100644 --- a/contrib/devtools/README.md +++ b/contrib/devtools/README.md @@ -90,30 +90,34 @@ BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh ``` optimize-pngs.py -================ A script to optimize png files in the BGL repository (requires pngcrush). +======= security-check.py and test-security-check.py ============================================ -Perform basic ELF security checks on a series of executables. +Perform basic security checks on a series of executables. symbol-check.py =============== -A script to check that the (Linux) executables produced by gitian only contain -allowed gcc, glibc and libstdc++ version symbols. This makes sure they are -still compatible with the minimum supported Linux distribution versions. +A script to check that the executables produced by gitian 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 after a gitian build: find ../gitian-builder/build -type f -executable | xargs python3 contrib/devtools/symbol-check.py -If only supported symbols are used the return value will be 0 and the output will be empty. +If no errors occur the return value will be 0 and the output will be empty. -If there are 'unsupported' symbols, the return value will be 1 a list like this will be printed: +If there are any errors the return value will be 1 and output like this will be printed: .../64/test_BGL: symbol memcpy from unsupported version GLIBC_2.14 .../64/test_BGL: symbol __fdelt_chk from unsupported version GLIBC_2.15 diff --git a/contrib/devtools/circular-dependencies.py b/contrib/devtools/circular-dependencies.py index 2e4657f1dd..bc5f09a3e2 100755 --- a/contrib/devtools/circular-dependencies.py +++ b/contrib/devtools/circular-dependencies.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2018-2019 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. import sys import re diff --git a/contrib/devtools/copyright_header.py b/contrib/devtools/copyright_header.py index 3fc5cceae8..c8d66849e0 100755 --- a/contrib/devtools/copyright_header.py +++ b/contrib/devtools/copyright_header.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2016-2019 The Bitcoin Core developers +# Copyright (c) 2016-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -19,7 +19,10 @@ 'src/qt/BGLstrings.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', @@ -32,6 +35,7 @@ "src/leveldb/", "src/secp256k1/", "src/univalue/", + "src/crc32c/", ] INCLUDE = ['*.h', '*.cpp', '*.cc', '*.c', '*.mm', '*.py', '*.sh', '*.bash-completion'] @@ -455,14 +459,14 @@ def get_header_lines(header, start_year, end_year): def get_cpp_header_lines_to_insert(start_year, end_year): return reversed(get_header_lines(CPP_HEADER, start_year, end_year)) -PYTHON_HEADER = ''' +SCRIPT_HEADER = ''' # Copyright (c) %s The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' -def get_python_header_lines_to_insert(start_year, end_year): - return reversed(get_header_lines(PYTHON_HEADER, start_year, end_year)) +def get_script_header_lines_to_insert(start_year, end_year): + return reversed(get_header_lines(SCRIPT_HEADER, start_year, end_year)) ################################################################################ # query git for year of last change @@ -491,17 +495,18 @@ def file_has_hashbang(file_lines): return False return file_lines[0][:2] == '#!' -def insert_python_header(filename, file_lines, start_year, end_year): +def insert_script_header(filename, file_lines, start_year, end_year): if file_has_hashbang(file_lines): insert_idx = 1 else: insert_idx = 0 - header_lines = get_python_header_lines_to_insert(start_year, end_year) + header_lines = get_script_header_lines_to_insert(start_year, end_year) for line in header_lines: file_lines.insert(insert_idx, line) write_file_lines(filename, file_lines) def insert_cpp_header(filename, file_lines, start_year, end_year): + file_lines.insert(0, '\n') header_lines = get_cpp_header_lines_to_insert(start_year, end_year) for line in header_lines: file_lines.insert(0, line) @@ -513,8 +518,8 @@ def exec_insert_header(filename, style): sys.exit('*** %s already has a copyright by The Bitcoin Core developers' % (filename)) start_year, end_year = get_git_change_year_range(filename) - if style == 'python': - insert_python_header(filename, file_lines, start_year, end_year) + if style in ['python', 'shell']: + insert_script_header(filename, file_lines, start_year, end_year) else: insert_cpp_header(filename, file_lines, start_year, end_year) @@ -555,11 +560,13 @@ def insert_cmd(argv): if not os.path.isfile(filename): sys.exit("*** bad filename: %s" % filename) _, extension = os.path.splitext(filename) - if extension not in ['.h', '.cpp', '.cc', '.c', '.py']: + if extension not in ['.h', '.cpp', '.cc', '.c', '.py', '.sh']: sys.exit("*** cannot insert for file extension %s" % extension) if extension == '.py': style = 'python' + elif extension == '.sh': + style = 'shell' else: style = 'cpp' exec_insert_header(filename, style) diff --git a/contrib/devtools/gen-manpages.sh b/contrib/devtools/gen-manpages.sh index 6a48fb91ca..b295e09063 100755 --- a/contrib/devtools/gen-manpages.sh +++ b/contrib/devtools/gen-manpages.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) 2016-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 TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} @@ -15,6 +18,22 @@ BGLQT=${BGLQT:-$BINDIR/qt/BGL-qt} [ ! -x $BGLD ] && echo "$BGLD not found or not executable." && exit 1 +# Don't allow man pages to be generated for binaries built from a dirty tree +DIRTY="" +for cmd in $BITCOIND $BITCOINCLI $BITCOINTX $WALLET_TOOL $BITCOINQT; do + VERSION_OUTPUT=$($cmd --version) + if [[ $VERSION_OUTPUT == *"dirty"* ]]; then + DIRTY="${DIRTY}${cmd}\n" + fi +done +if [ -n "$DIRTY" ] +then + echo -e "WARNING: the following binaries were built from a dirty tree:\n" + echo -e $DIRTY + echo "man pages generated from dirty binaries should NOT be committed." + echo "To properly generate man pages, please commit your changes to the above binaries, rebuild them, then run this script again." +fi + # The autodetected version git tag can screw up manpage output a little bit read -r -a BTCVER <<< "$($BGLCLI --version | head -n1 | awk -F'[ -]' '{ print $6, $7 }')" diff --git a/contrib/devtools/optimize-pngs.py b/contrib/devtools/optimize-pngs.py deleted file mode 100755 index e9481dbbcf..0000000000 --- a/contrib/devtools/optimize-pngs.py +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2014-2018 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. -''' -Run this script every time you change one of the png files. Using pngcrush, it will optimize the png files, remove various color profiles, remove ancillary chunks (alla) and text chunks (text). -#pngcrush -brute -ow -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text -''' -import os -import sys -import subprocess -import hashlib -from PIL import Image # pip3 install Pillow - -def file_hash(filename): - '''Return hash of raw file contents''' - with open(filename, 'rb') as f: - return hashlib.sha256(f.read()).hexdigest() - -def content_hash(filename): - '''Return hash of RGBA contents of image''' - i = Image.open(filename) - i = i.convert('RGBA') - data = i.tobytes() - return hashlib.sha256(data).hexdigest() - -pngcrush = 'pngcrush' -git = 'git' -folders = ["src/qt/res/movies", "src/qt/res/icons", "share/pixmaps"] -basePath = subprocess.check_output([git, 'rev-parse', '--show-toplevel'], universal_newlines=True, encoding='utf8').rstrip('\n') -totalSaveBytes = 0 -noHashChange = True - -outputArray = [] -for folder in folders: - absFolder=os.path.join(basePath, folder) - for file in os.listdir(absFolder): - extension = os.path.splitext(file)[1] - if extension.lower() == '.png': - print("optimizing {}...".format(file), end =' ') - file_path = os.path.join(absFolder, file) - fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)} - fileMetaMap['contentHashPre'] = content_hash(file_path) - - try: - subprocess.call([pngcrush, "-brute", "-ow", "-rem", "gAMA", "-rem", "cHRM", "-rem", "iCCP", "-rem", "sRGB", "-rem", "alla", "-rem", "text", file_path], - stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) - except: - print("pngcrush is not installed, aborting...") - sys.exit(0) - - #verify - if "Not a PNG file" in subprocess.check_output([pngcrush, "-n", "-v", file_path], stderr=subprocess.STDOUT, universal_newlines=True, encoding='utf8'): - print("PNG file "+file+" is corrupted after crushing, check out pngcursh version") - sys.exit(1) - - fileMetaMap['sha256New'] = file_hash(file_path) - fileMetaMap['contentHashPost'] = content_hash(file_path) - - if fileMetaMap['contentHashPre'] != fileMetaMap['contentHashPost']: - print("Image contents of PNG file {} before and after crushing don't match".format(file)) - sys.exit(1) - - fileMetaMap['psize'] = os.path.getsize(file_path) - outputArray.append(fileMetaMap) - print("done") - -print("summary:\n+++++++++++++++++") -for fileDict in outputArray: - oldHash = fileDict['sha256Old'] - newHash = fileDict['sha256New'] - totalSaveBytes += fileDict['osize'] - fileDict['psize'] - noHashChange = noHashChange and (oldHash == newHash) - print(fileDict['file']+"\n size diff from: "+str(fileDict['osize'])+" to: "+str(fileDict['psize'])+"\n old sha256: "+oldHash+"\n new sha256: "+newHash+"\n") - -print("completed. Checksum stable: "+str(noHashChange)+". Total reduction: "+str(totalSaveBytes)+" bytes") diff --git a/contrib/devtools/security-check.py b/contrib/devtools/security-check.py index 44b7f6c7cc..02615edb54 100755 --- a/contrib/devtools/security-check.py +++ b/contrib/devtools/security-check.py @@ -1,89 +1,114 @@ #!/usr/bin/env python3 -# Copyright (c) 2015-2018 The Bitcoin Core developers +# Copyright (c) 2015-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' -Perform basic ELF security checks on a series of executables. +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. -Needs `readelf` (for ELF) and `objdump` (for PE). +Needs `readelf` (for ELF), `objdump` (for PE) and `otool` (for MACHO). ''' import subprocess import sys import os +from typing import List, Optional + READELF_CMD = os.getenv('READELF', '/usr/bin/readelf') OBJDUMP_CMD = os.getenv('OBJDUMP', '/usr/bin/objdump') -NONFATAL = {} # checks which are non-fatal for now but only generate a warning +OTOOL_CMD = os.getenv('OTOOL', '/usr/bin/otool') + +def run_command(command) -> str: + p = subprocess.run(command, stdout=subprocess.PIPE, check=True, universal_newlines=True) + return p.stdout -def check_ELF_PIE(executable): +def check_ELF_PIE(executable) -> bool: ''' Check for position independent executable (PIE), allowing for address space randomization. ''' - p = subprocess.Popen([READELF_CMD, '-h', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) - (stdout, stderr) = p.communicate() - if p.returncode: - raise IOError('Error opening file') + stdout = run_command([READELF_CMD, '-h', '-W', executable]) ok = False for line in stdout.splitlines(): - line = line.split() - if len(line)>=2 and line[0] == 'Type:' and line[1] == 'DYN': + tokens = line.split() + if len(line)>=2 and tokens[0] == 'Type:' and tokens[1] == 'DYN': ok = True return ok def get_ELF_program_headers(executable): '''Return type and flags for ELF program headers''' - p = subprocess.Popen([READELF_CMD, '-l', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) - (stdout, stderr) = p.communicate() - if p.returncode: - raise IOError('Error opening file') + stdout = run_command([READELF_CMD, '-l', '-W', executable]) + in_headers = False - count = 0 headers = [] for line in stdout.splitlines(): if line.startswith('Program Headers:'): in_headers = True + count = 0 if line == '': in_headers = False if in_headers: if count == 1: # header line - ofs_typ = line.find('Type') - ofs_offset = line.find('Offset') - ofs_flags = line.find('Flg') - ofs_align = line.find('Align') - if ofs_typ == -1 or ofs_offset == -1 or ofs_flags == -1 or ofs_align == -1: + header = [x.strip() for x in line.split()] + ofs_typ = header.index('Type') + ofs_flags = header.index('Flg') + # assert readelf output is what we expect + if ofs_typ == -1 or ofs_flags == -1: + raise ValueError('Cannot parse elfread -lW output') + elif count > 1: + splitline = [x.strip() for x in line.split()] + typ = splitline[ofs_typ] + if not typ.startswith('[R'): # skip [Requesting ...] + splitline = [x.strip() for x in line.split()] + flags = splitline[ofs_flags] + # check for 'R', ' E' + if splitline[ofs_flags + 1] == 'E': + flags += ' E' + headers.append((typ, flags, [])) + count += 1 + + if line.startswith(' Section to Segment mapping:'): + in_mapping = True + count = 0 + if line == '': + in_mapping = False + if in_mapping: + if count == 1: # header line + ofs_segment = line.find('Segment') + ofs_sections = line.find('Sections...') + if ofs_segment == -1 or ofs_sections == -1: raise ValueError('Cannot parse elfread -lW output') elif count > 1: - typ = line[ofs_typ:ofs_offset].rstrip() - flags = line[ofs_flags:ofs_align].rstrip() - headers.append((typ, flags)) + segment = int(line[ofs_segment:ofs_sections].strip()) + sections = line[ofs_sections:].strip().split() + headers[segment][2].extend(sections) count += 1 return headers -def check_ELF_NX(executable): +def check_ELF_NX(executable) -> bool: ''' Check that no sections are writable and executable (including the stack) ''' have_wx = False have_gnu_stack = False - for (typ, flags) in get_ELF_program_headers(executable): + for (typ, flags, _) in get_ELF_program_headers(executable): if typ == 'GNU_STACK': have_gnu_stack = True if 'W' in flags and 'E' in flags: # section is both writable and executable have_wx = True return have_gnu_stack and not have_wx -def check_ELF_RELRO(executable): +def check_ELF_RELRO(executable) -> bool: ''' Check for read-only relocations. GNU_RELRO program header must exist Dynamic section must have BIND_NOW flag ''' have_gnu_relro = False - for (typ, flags) in get_ELF_program_headers(executable): + for (typ, flags, _) in get_ELF_program_headers(executable): # Note: not checking flags == 'R': here as linkers set the permission differently - # This does not affect security: the permission flags of the GNU_RELRO program header are ignored, the PT_LOAD header determines the effective permissions. + # This does not affect security: the permission flags of the GNU_RELRO program + # header are ignored, the PT_LOAD header determines the effective permissions. # However, the dynamic linker need to write to this area so these are RW. # Glibc itself takes care of mprotecting this area R after relocations are finished. # See also https://marc.info/?l=binutils&m=1498883354122353 @@ -91,98 +116,221 @@ def check_ELF_RELRO(executable): have_gnu_relro = True have_bindnow = False - p = subprocess.Popen([READELF_CMD, '-d', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) - (stdout, stderr) = p.communicate() - if p.returncode: - raise IOError('Error opening file') + stdout = run_command([READELF_CMD, '-d', '-W', executable]) + for line in stdout.splitlines(): tokens = line.split() if len(tokens)>1 and tokens[1] == '(BIND_NOW)' or (len(tokens)>2 and tokens[1] == '(FLAGS)' and 'BIND_NOW' in tokens[2:]): have_bindnow = True return have_gnu_relro and have_bindnow -def check_ELF_Canary(executable): +def check_ELF_Canary(executable) -> bool: ''' Check for use of stack canary ''' - p = subprocess.Popen([READELF_CMD, '--dyn-syms', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) - (stdout, stderr) = p.communicate() - if p.returncode: - raise IOError('Error opening file') + stdout = run_command([READELF_CMD, '--dyn-syms', '-W', executable]) + ok = False for line in stdout.splitlines(): if '__stack_chk_fail' in line: ok = True return ok -def get_PE_dll_characteristics(executable): +def check_ELF_separate_code(executable): ''' - Get PE DllCharacteristics bits. - Returns a tuple (arch,bits) where arch is 'i386:x86-64' or 'i386' - and bits is the DllCharacteristics value. + 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. ''' - p = subprocess.Popen([OBJDUMP_CMD, '-x', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) - (stdout, stderr) = p.communicate() - if p.returncode: - raise IOError('Error opening file') - arch = '' + EXPECTED_FLAGS = { + # Read + execute + '.init': 'R E', + '.plt': 'R E', + '.plt.got': 'R E', + '.plt.sec': 'R E', + '.text': 'R E', + '.fini': 'R E', + # Read-only data + '.interp': 'R', + '.note.gnu.property': 'R', + '.note.gnu.build-id': 'R', + '.note.ABI-tag': 'R', + '.gnu.hash': 'R', + '.dynsym': 'R', + '.dynstr': 'R', + '.gnu.version': 'R', + '.gnu.version_r': 'R', + '.rela.dyn': 'R', + '.rela.plt': 'R', + '.rodata': 'R', + '.eh_frame_hdr': 'R', + '.eh_frame': 'R', + '.qtmetadata': 'R', + '.gcc_except_table': 'R', + '.stapsdt.base': 'R', + # Writable data + '.init_array': 'RW', + '.fini_array': 'RW', + '.dynamic': 'RW', + '.got': 'RW', + '.data': 'RW', + '.bss': 'RW', + } + # For all LOAD program headers get mapping to the list of sections, + # and for each section, remember the flags of the associated program header. + flags_per_section = {} + for (typ, flags, sections) in get_ELF_program_headers(executable): + if typ == 'LOAD': + for section in sections: + assert(section not in flags_per_section) + flags_per_section[section] = flags + # Spot-check ELF LOAD program header flags per section + # If these sections exist, check them against the expected R/W/E flags + for (section, flags) in flags_per_section.items(): + if section in EXPECTED_FLAGS: + if EXPECTED_FLAGS[section] != flags: + return False + return True + +def get_PE_dll_characteristics(executable) -> int: + '''Get PE DllCharacteristics bits''' + stdout = run_command([OBJDUMP_CMD, '-x', executable]) + bits = 0 for line in stdout.splitlines(): tokens = line.split() - if len(tokens)>=2 and tokens[0] == 'architecture:': - arch = tokens[1].rstrip(',') if len(tokens)>=2 and tokens[0] == 'DllCharacteristics': bits = int(tokens[1],16) - return (arch,bits) + return bits IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA = 0x0020 IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE = 0x0040 IMAGE_DLL_CHARACTERISTICS_NX_COMPAT = 0x0100 -def check_PE_DYNAMIC_BASE(executable): +def check_PE_DYNAMIC_BASE(executable) -> bool: '''PIE: DllCharacteristics bit 0x40 signifies dynamicbase (ASLR)''' - (arch,bits) = get_PE_dll_characteristics(executable) - reqbits = IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE - return (bits & reqbits) == reqbits + bits = get_PE_dll_characteristics(executable) + return (bits & IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE) == IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE -# On 64 bit, must support high-entropy 64-bit address space layout randomization in addition to DYNAMIC_BASE -# to have secure ASLR. -def check_PE_HIGH_ENTROPY_VA(executable): +# Must support high-entropy 64-bit address space layout randomization +# in addition to DYNAMIC_BASE to have secure ASLR. +def check_PE_HIGH_ENTROPY_VA(executable) -> bool: '''PIE: DllCharacteristics bit 0x20 signifies high-entropy ASLR''' - (arch,bits) = get_PE_dll_characteristics(executable) - if arch == 'i386:x86-64': - reqbits = IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA - else: # Unnecessary on 32-bit - assert(arch == 'i386') - reqbits = 0 - return (bits & reqbits) == reqbits - -def check_PE_NX(executable): + bits = get_PE_dll_characteristics(executable) + return (bits & IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA) == IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA + +def check_PE_RELOC_SECTION(executable) -> bool: + '''Check for a reloc section. This is required for functional ASLR.''' + stdout = run_command([OBJDUMP_CMD, '-h', executable]) + + for line in stdout.splitlines(): + if '.reloc' in line: + return True + return False + +def check_PE_NX(executable) -> bool: '''NX: DllCharacteristics bit 0x100 signifies nxcompat (DEP)''' - (arch,bits) = get_PE_dll_characteristics(executable) + bits = get_PE_dll_characteristics(executable) return (bits & IMAGE_DLL_CHARACTERISTICS_NX_COMPAT) == IMAGE_DLL_CHARACTERISTICS_NX_COMPAT +def get_MACHO_executable_flags(executable) -> List[str]: + stdout = run_command([OTOOL_CMD, '-vh', executable]) + + flags = [] + for line in stdout.splitlines(): + tokens = line.split() + # filter first two header lines + if 'magic' in tokens or 'Mach' in tokens: + continue + # filter ncmds and sizeofcmds values + flags += [t for t in tokens if not t.isdigit()] + return flags + +def check_MACHO_PIE(executable) -> bool: + ''' + Check for position independent executable (PIE), allowing for address space randomization. + ''' + flags = get_MACHO_executable_flags(executable) + if 'PIE' in flags: + return True + return False + +def check_MACHO_NOUNDEFS(executable) -> bool: + ''' + Check for no undefined references. + ''' + flags = get_MACHO_executable_flags(executable) + if 'NOUNDEFS' in flags: + return True + return False + +def check_MACHO_NX(executable) -> bool: + ''' + Check for no stack execution + ''' + flags = get_MACHO_executable_flags(executable) + if 'ALLOW_STACK_EXECUTION' in flags: + return False + return True + +def check_MACHO_LAZY_BINDINGS(executable) -> bool: + ''' + Check for no lazy bindings. + We don't use or check for MH_BINDATLOAD. See #18295. + ''' + stdout = run_command([OTOOL_CMD, '-l', executable]) + + for line in stdout.splitlines(): + tokens = line.split() + if 'lazy_bind_off' in tokens or 'lazy_bind_size' in tokens: + if tokens[1] != '0': + return False + return True + +def check_MACHO_Canary(executable) -> bool: + ''' + Check for use of stack canary + ''' + stdout = run_command([OTOOL_CMD, '-Iv', executable]) + + ok = False + for line in stdout.splitlines(): + if '___stack_chk_fail' in line: + ok = True + return ok + CHECKS = { 'ELF': [ ('PIE', check_ELF_PIE), ('NX', check_ELF_NX), ('RELRO', check_ELF_RELRO), - ('Canary', check_ELF_Canary) + ('Canary', check_ELF_Canary), + ('separate_code', check_ELF_separate_code), ], 'PE': [ ('DYNAMIC_BASE', check_PE_DYNAMIC_BASE), ('HIGH_ENTROPY_VA', check_PE_HIGH_ENTROPY_VA), - ('NX', check_PE_NX) + ('NX', check_PE_NX), + ('RELOC_SECTION', check_PE_RELOC_SECTION) +], +'MACHO': [ + ('PIE', check_MACHO_PIE), + ('NOUNDEFS', check_MACHO_NOUNDEFS), + ('NX', check_MACHO_NX), + ('LAZY_BINDINGS', check_MACHO_LAZY_BINDINGS), + ('Canary', check_MACHO_Canary) ] } -def identify_executable(executable): +def identify_executable(executable) -> Optional[str]: with open(filename, 'rb') as f: magic = f.read(4) if magic.startswith(b'MZ'): return 'PE' elif magic.startswith(b'\x7fELF'): return 'ELF' + elif magic.startswith(b'\xcf\xfa'): + return 'MACHO' return None if __name__ == '__main__': @@ -196,18 +344,12 @@ def identify_executable(executable): continue failed = [] - warning = [] for (name, func) in CHECKS[etype]: if not func(filename): - if name in NONFATAL: - warning.append(name) - else: - failed.append(name) + failed.append(name) if failed: print('%s: failed %s' % (filename, ' '.join(failed))) retval = 1 - if warning: - print('%s: warning %s' % (filename, ' '.join(warning))) except IOError: print('%s: cannot open' % filename) retval = 1 diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py index 3160e3bf3f..93ef7284d2 100755 --- a/contrib/devtools/symbol-check.py +++ b/contrib/devtools/symbol-check.py @@ -3,9 +3,8 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' -A script to check that the (Linux) executables produced by gitian only contain -allowed gcc and glibc version symbols. This makes sure they are still compatible -with the minimum supported Linux distribution versions. +A script to check that the executables produced by gitian only contain +certain symbols and are only linked against allowed libraries. Example usage: @@ -15,6 +14,7 @@ import re import sys import os +from typing import List, Optional, Tuple # Debian 8 (Jessie) EOL: 2020. https://wiki.debian.org/DebianReleases#Production_Releases # @@ -52,8 +52,11 @@ } READELF_CMD = os.getenv('READELF', '/usr/bin/readelf') CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt') +OBJDUMP_CMD = os.getenv('OBJDUMP', '/usr/bin/objdump') +OTOOL_CMD = os.getenv('OTOOL', '/usr/bin/otool') + # Allowed NEEDED libraries -ALLOWED_LIBRARIES = { +ELF_ALLOWED_LIBRARIES = { # BGLd and BGL-qt 'libgcc_s.so.1', # GCC base support 'libc.so.6', # C library @@ -79,6 +82,45 @@ 'AArch64':(2,17), 'RISC-V': (2,27) } + +MACHO_ALLOWED_LIBRARIES = { +# bitcoind and bitcoin-qt +'libc++.1.dylib', # C++ Standard Library +'libSystem.B.dylib', # libc, libm, libpthread, libinfo +# bitcoin-qt only +'AppKit', # user interface +'ApplicationServices', # common application tasks. +'Carbon', # deprecated c back-compat API +'CoreFoundation', # low level func, data types +'CoreGraphics', # 2D rendering +'CoreServices', # operating system services +'CoreText', # interface for laying out text and handling fonts. +'Foundation', # base layer functionality for apps/frameworks +'ImageIO', # read and write image file formats. +'IOKit', # user-space access to hardware devices and drivers. +'libobjc.A.dylib', # Objective-C runtime library +} + +PE_ALLOWED_LIBRARIES = { +'ADVAPI32.dll', # security & registry +'IPHLPAPI.DLL', # IP helper API +'KERNEL32.dll', # win32 base APIs +'msvcrt.dll', # C standard library for MSVC +'SHELL32.dll', # shell API +'USER32.dll', # user interface +'WS2_32.dll', # sockets +# bitcoin-qt only +'dwmapi.dll', # desktop window manager +'GDI32.dll', # graphics device interface +'IMM32.dll', # input method editor +'ole32.dll', # component object model +'OLEAUT32.dll', # OLE Automation API +'SHLWAPI.dll', # light weight shell API +'UxTheme.dll', +'VERSION.dll', # version checking +'WINMM.dll', # WinMM audio API +} + class CPPFilt(object): ''' Demangle C++ symbol names. @@ -98,15 +140,15 @@ def close(self): self.proc.stdout.close() self.proc.wait() -def read_symbols(executable, imports=True): +def read_symbols(executable, imports=True) -> List[Tuple[str, str, str]]: ''' - Parse an ELF executable and return a list of (symbol,version) tuples + Parse an ELF executable and return a list of (symbol,version, arch) tuples for dynamic, imported symbols. ''' p = subprocess.Popen([READELF_CMD, '--dyn-syms', '-W', '-h', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) (stdout, stderr) = p.communicate() if p.returncode: - raise IOError('Could not read symbols for %s: %s' % (executable, stderr.strip())) + raise IOError('Could not read symbols for {}: {}'.format(executable, stderr.strip())) syms = [] for line in stdout.splitlines(): line = line.split() @@ -121,7 +163,7 @@ def read_symbols(executable, imports=True): syms.append((sym, version, arch)) return syms -def check_version(max_versions, version, arch): +def check_version(max_versions, version, arch) -> bool: if '_' in version: (lib, _, ver) = version.rpartition('_') else: @@ -132,7 +174,7 @@ def check_version(max_versions, version, arch): return False return ver <= max_versions[lib] or lib == 'GLIBC' and ver <= ARCH_MIN_GLIBC_VER[arch] -def read_libraries(filename): +def elf_read_libraries(filename) -> List[str]: p = subprocess.Popen([READELF_CMD, '-d', '-W', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) (stdout, stderr) = p.communicate() if p.returncode: @@ -148,26 +190,117 @@ def read_libraries(filename): raise ValueError('Unparseable (NEEDED) specification') return libraries -if __name__ == '__main__': +def check_imported_symbols(filename) -> bool: + cppfilt = CPPFilt() + ok = True + for sym, version, arch in read_symbols(filename, True): + if version and not check_version(MAX_VERSIONS, version, arch): + print('{}: symbol {} from unsupported version {}'.format(filename, cppfilt(sym), version)) + ok = False + return ok + +def check_exported_symbols(filename) -> bool: cppfilt = CPPFilt() + ok = True + for sym,version,arch in read_symbols(filename, False): + if arch == 'RISC-V' or sym in IGNORE_EXPORTS: + continue + print('{}: export of symbol {} not allowed'.format(filename, cppfilt(sym))) + ok = False + return ok + +def check_ELF_libraries(filename) -> bool: + ok = True + for library_name in elf_read_libraries(filename): + if library_name not in ELF_ALLOWED_LIBRARIES: + print('{}: NEEDED library {} is not allowed'.format(filename, library_name)) + ok = False + return ok + +def macho_read_libraries(filename) -> List[str]: + p = subprocess.Popen([OTOOL_CMD, '-L', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) + (stdout, stderr) = p.communicate() + if p.returncode: + raise IOError('Error opening file') + libraries = [] + for line in stdout.splitlines(): + tokens = line.split() + if len(tokens) == 1: # skip executable name + continue + libraries.append(tokens[0].split('/')[-1]) + return libraries + +def check_MACHO_libraries(filename) -> bool: + ok = True + for dylib in macho_read_libraries(filename): + if dylib not in MACHO_ALLOWED_LIBRARIES: + print('{} is not in ALLOWED_LIBRARIES!'.format(dylib)) + ok = False + return ok + +def pe_read_libraries(filename) -> List[str]: + p = subprocess.Popen([OBJDUMP_CMD, '-x', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) + (stdout, stderr) = p.communicate() + if p.returncode: + raise IOError('Error opening file') + libraries = [] + for line in stdout.splitlines(): + if 'DLL Name:' in line: + tokens = line.split(': ') + libraries.append(tokens[1]) + return libraries + +def check_PE_libraries(filename) -> bool: + ok = True + for dylib in pe_read_libraries(filename): + if dylib not in PE_ALLOWED_LIBRARIES: + print('{} is not in ALLOWED_LIBRARIES!'.format(dylib)) + ok = False + return ok + +CHECKS = { +'ELF': [ + ('IMPORTED_SYMBOLS', check_imported_symbols), + ('EXPORTED_SYMBOLS', check_exported_symbols), + ('LIBRARY_DEPENDENCIES', check_ELF_libraries) +], +'MACHO': [ + ('DYNAMIC_LIBRARIES', check_MACHO_libraries) +], +'PE' : [ + ('DYNAMIC_LIBRARIES', check_PE_libraries) +] +} + +def identify_executable(executable) -> Optional[str]: + with open(filename, 'rb') as f: + magic = f.read(4) + if magic.startswith(b'MZ'): + return 'PE' + elif magic.startswith(b'\x7fELF'): + return 'ELF' + elif magic.startswith(b'\xcf\xfa'): + return 'MACHO' + return None + +if __name__ == '__main__': retval = 0 for filename in sys.argv[1:]: - # Check imported symbols - for sym,version,arch in read_symbols(filename, True): - if version and not check_version(MAX_VERSIONS, version, arch): - print('%s: symbol %s from unsupported version %s' % (filename, cppfilt(sym), version)) - retval = 1 - # Check exported symbols - if arch != 'RISC-V': - for sym,version,arch in read_symbols(filename, False): - if sym in IGNORE_EXPORTS: - continue - print('%s: export of symbol %s not allowed' % (filename, cppfilt(sym))) - retval = 1 - # Check dependency libraries - for library_name in read_libraries(filename): - if library_name not in ALLOWED_LIBRARIES: - print('%s: NEEDED library %s is not allowed' % (filename, library_name)) + try: + etype = identify_executable(filename) + if etype is None: + print('{}: unknown format'.format(filename)) retval = 1 + continue + failed = [] + for (name, func) in CHECKS[etype]: + if not func(filename): + failed.append(name) + if failed: + print('{}: failed {}'.format(filename, ' '.join(failed))) + retval = 1 + except IOError: + print('{}: cannot open'.format(filename)) + retval = 1 sys.exit(retval) diff --git a/contrib/devtools/test-security-check.py b/contrib/devtools/test-security-check.py index bb864bfc0c..09e1a73d7b 100755 --- a/contrib/devtools/test-security-check.py +++ b/contrib/devtools/test-security-check.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2015-2018 The Bitcoin Core developers +# Copyright (c) 2015-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' @@ -20,10 +20,9 @@ def write_testcode(filename): ''') def call_security_check(cc, source, executable, options): - subprocess.check_call([cc,source,'-o',executable] + options) - p = subprocess.Popen(['./security-check.py',executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True) - (stdout, stderr) = p.communicate() - return (p.returncode, stdout.rstrip()) + subprocess.run([cc,source,'-o',executable] + options, check=True) + p = subprocess.run(['./contrib/devtools/security-check.py',executable], stdout=subprocess.PIPE, universal_newlines=True) + return (p.returncode, p.stdout.rstrip()) class TestSecurityChecks(unittest.TestCase): def test_ELF(self): @@ -32,15 +31,17 @@ def test_ELF(self): cc = 'gcc' write_testcode(source) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE']), + 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']), + 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']), + 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']), + 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']), + 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, '')) def test_64bit_PE(self): @@ -49,10 +50,35 @@ def test_64bit_PE(self): cc = 'x86_64-w64-mingw32-gcc' write_testcode(source) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--no-nxcompat','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va']), (1, executable+': failed DYNAMIC_BASE HIGH_ENTROPY_VA NX')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va']), (1, executable+': failed DYNAMIC_BASE HIGH_ENTROPY_VA')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-Wl,--no-high-entropy-va']), (1, executable+': failed HIGH_ENTROPY_VA')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-Wl,--high-entropy-va']), (0, '')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--no-nxcompat','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va','-no-pie','-fno-PIE']), + (1, executable+': failed DYNAMIC_BASE HIGH_ENTROPY_VA NX RELOC_SECTION')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--no-dynamicbase','-Wl,--no-high-entropy-va','-no-pie','-fno-PIE']), + (1, executable+': failed DYNAMIC_BASE HIGH_ENTROPY_VA RELOC_SECTION')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-Wl,--no-high-entropy-va','-no-pie','-fno-PIE']), + (1, executable+': failed HIGH_ENTROPY_VA RELOC_SECTION')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-Wl,--high-entropy-va','-no-pie','-fno-PIE']), + (1, executable+': failed RELOC_SECTION')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase','-Wl,--high-entropy-va','-pie','-fPIE']), + (0, '')) + + def test_MACHO(self): + source = 'test1.c' + executable = 'test1' + cc = 'clang' + write_testcode(source) + + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector']), + (1, executable+': failed PIE NOUNDEFS NX LAZY_BINDINGS Canary')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fstack-protector-all']), + (1, executable+': failed PIE NOUNDEFS NX LAZY_BINDINGS')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-fstack-protector-all']), + (1, executable+': failed PIE NOUNDEFS LAZY_BINDINGS')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all']), + (1, executable+': failed PIE LAZY_BINDINGS')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all']), + (1, executable+': failed PIE')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-Wl,-bind_at_load','-fstack-protector-all']), + (0, '')) if __name__ == '__main__': unittest.main() diff --git a/contrib/devtools/test_deterministic_coverage.sh b/contrib/devtools/test_deterministic_coverage.sh index dd3353217f..83878a7325 100755 --- a/contrib/devtools/test_deterministic_coverage.sh +++ b/contrib/devtools/test_deterministic_coverage.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2019 The Bitcoin Core developers +# Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # @@ -16,13 +16,12 @@ GCOV_EXECUTABLE="gcov" NON_DETERMINISTIC_TESTS=( "blockfilter_index_tests/blockfilter_index_initial_sync" # src/checkqueue.h: In CCheckQueue::Loop(): while (queue.empty()) { ... } "coinselector_tests/knapsack_solver_test" # coinselector_tests.cpp: if (equal_sets(setCoinsRet, setCoinsRet2)) - "denialofservice_tests/DoS_mapOrphans" # denialofservice_tests.cpp: it = mapOrphanTransactions.lower_bound(InsecureRand256()); "fs_tests/fsbridge_fstream" # deterministic test failure? "miner_tests/CreateNewBlock_validity" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) "scheduler_tests/manythreads" # scheduler.cpp: CScheduler::serviceQueue() "scheduler_tests/singlethreadedscheduler_ordered" # scheduler.cpp: CScheduler::serviceQueue() - "tx_validationcache_tests/checkinputs_test" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) - "tx_validationcache_tests/tx_mempool_block_doublespend" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10) + "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) diff --git a/contrib/filter-lcov.py b/contrib/filter-lcov.py index df1db76e92..e005cb96da 100755 --- a/contrib/filter-lcov.py +++ b/contrib/filter-lcov.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2017-2019 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. import argparse diff --git a/contrib/gitian-build.py b/contrib/gitian-build.py index 065e98f065..360069046b 100755 --- a/contrib/gitian-build.py +++ b/contrib/gitian-build.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2018-2019 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. import argparse import os @@ -206,7 +209,7 @@ def main(): args.macos = 'm' in args.os # Disable for MacOS if no SDK found - if args.macos and not os.path.isfile('gitian-builder/inputs/MacOSX10.11.sdk.tar.gz'): + if args.macos and not os.path.isfile('gitian-builder/inputs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz'): print('Cannot build for MacOS, SDK does not exist. Will build for other OSes') args.macos = False diff --git a/contrib/gitian-descriptors/assign_DISTNAME b/contrib/gitian-descriptors/assign_DISTNAME new file mode 100755 index 0000000000..a2ca768aaa --- /dev/null +++ b/contrib/gitian-descriptors/assign_DISTNAME @@ -0,0 +1,12 @@ +# Copyright (c) 2020 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. +# +# A helper script to be sourced into the gitian descriptors + +if RECENT_TAG="$(git describe --exact-match HEAD)"; then + VERSION="${RECENT_TAG#v}" +else + VERSION="$(git rev-parse --short=12 HEAD)" +fi +DISTNAME="bitcoin-${VERSION}" diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 39f1d950a3..2123f45c6c 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -1,5 +1,6 @@ --- -name: "BGL-core-linux-0.20" + +name: "BGL-core-linux-22" enable_cache: true distro: "ubuntu" suites: @@ -7,31 +8,29 @@ suites: architectures: - "linux64" packages: -- "curl" -- "g++-aarch64-linux-gnu" -- "g++-8-aarch64-linux-gnu" -- "gcc-8-aarch64-linux-gnu" -- "binutils-aarch64-linux-gnu" -- "g++-arm-linux-gnueabihf" -- "g++-8-arm-linux-gnueabihf" -- "gcc-8-arm-linux-gnueabihf" -- "binutils-arm-linux-gnueabihf" -- "g++-riscv64-linux-gnu" -- "g++-8-riscv64-linux-gnu" -- "gcc-8-riscv64-linux-gnu" -- "binutils-riscv64-linux-gnu" -- "g++-8-multilib" -- "gcc-8-multilib" -- "binutils-gold" -- "git" -- "pkg-config" +# Common dependencies. - "autoconf" -- "libtool" - "automake" -- "faketime" +- "binutils" - "bsdmainutils" - "ca-certificates" +- "curl" +- "faketime" +- "git" +- "libtool" +- "patch" +- "pkg-config" - "python3" +# Cross compilation HOSTS: +# - arm-linux-gnueabihf +- "binutils-arm-linux-gnueabihf" +- "g++-8-arm-linux-gnueabihf" +# - aarch64-linux-gnu +- "binutils-aarch64-linux-gnu" +- "g++-8-aarch64-linux-gnu" +# - riscv64-linux-gnu +- "binutils-riscv64-linux-gnu" +- "g++-8-riscv64-linux-gnu" remotes: - "url": "https://github.com/BGL/BGL.git" "dir": "BGL" @@ -40,7 +39,7 @@ script: | set -e -o pipefail WRAP_DIR=$HOME/wrapped - HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu" + HOSTS="x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu" CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests" FAKETIME_HOST_PROGS="gcc g++" FAKETIME_PROGS="date ar ranlib nm" @@ -80,7 +79,7 @@ script: | echo "REAL=\`which -a ${i}-${prog}-8 | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${i}-${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog} - echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog} + echo "\$REAL \"\$@\"" >> $WRAP_DIR/${i}-${prog} chmod +x ${WRAP_DIR}/${i}-${prog} fi done @@ -93,45 +92,11 @@ script: | create_per-host_faketime_wrappers "2000-01-01 12:00:00" export PATH=${WRAP_DIR}:${PATH} - EXTRA_INCLUDES_BASE=$WRAP_DIR/extra_includes - mkdir -p $EXTRA_INCLUDES_BASE - - # x86 needs /usr/include/i386-linux-gnu/asm pointed to /usr/include/x86_64-linux-gnu/asm, - # but we can't write there. Instead, create a link here and force it to be included in the - # search paths by wrapping gcc/g++. - - mkdir -p $EXTRA_INCLUDES_BASE/i686-pc-linux-gnu - rm -f $WRAP_DIR/extra_includes/i686-pc-linux-gnu/asm - ln -s /usr/include/x86_64-linux-gnu/asm $EXTRA_INCLUDES_BASE/i686-pc-linux-gnu/asm - - for prog in gcc g++; do - rm -f ${WRAP_DIR}/${prog} - cat << EOF > ${WRAP_DIR}/${prog} - #!/usr/bin/env bash - REAL="$(which -a ${prog}-8 | grep -v ${WRAP_DIR}/${prog} | head -1)" - for var in "\$@" - do - if [ "\$var" = "-m32" ]; then - export C_INCLUDE_PATH="$EXTRA_INCLUDES_BASE/i686-pc-linux-gnu" - export CPLUS_INCLUDE_PATH="$EXTRA_INCLUDES_BASE/i686-pc-linux-gnu" - break - fi - done - \$REAL \$@ - EOF - chmod +x ${WRAP_DIR}/${prog} - done - cd BGL BASEPREFIX="${PWD}/depends" # Build dependencies for each host for i in $HOSTS; do - EXTRA_INCLUDES="$EXTRA_INCLUDES_BASE/$i" - if [ -d "$EXTRA_INCLUDES" ]; then - export HOST_ID_SALT="$EXTRA_INCLUDES" - fi make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}" - unset HOST_ID_SALT done # Faketime for binaries @@ -147,18 +112,23 @@ script: | SOURCEDIST=$(echo BGL-*.tar.gz) DISTNAME=${SOURCEDIST/%.tar.gz} - # Correct tar file order - mkdir -p temp - pushd temp - tar -xf ../$SOURCEDIST - find BGL-* | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST - popd - # Workaround for tarball not building with the bare tag version (prep) make -C src obj/build.h + # Create the git archive, and define DISTNAME and GIT_ARCHIVE variables. + # shellcheck source=contrib/gitian-descriptors/make_git_archive + source contrib/gitian-descriptors/make_git_archive + # Define DISTNAME variable. + # shellcheck source=contrib/gitian-descriptors/assign_DISTNAME + source contrib/gitian-descriptors/assign_DISTNAME + + GIT_ARCHIVE="${OUTDIR}/src/${DISTNAME}.tar.gz" + + # Create the source tarball + mkdir -p "$(dirname "$GIT_ARCHIVE")" + git archive --prefix="${DISTNAME}/" --output="$GIT_ARCHIVE" HEAD ORIGPATH="$PATH" - # Extract the release tarball into a dir for each host and build + # Extract the git archive into a dir for each host and build for i in ${HOSTS}; do export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH} if [ "${i}" = "riscv64-linux-gnu" ]; then @@ -172,13 +142,9 @@ script: | cd distsrc-${i} INSTALLPATH="${PWD}/installed/${DISTNAME}" mkdir -p ${INSTALLPATH} - tar --strip-components=1 -xf ../$SOURCEDIST - - # Workaround for tarball not building with the bare tag version - echo '#!/bin/true' >share/genbuild.sh - mkdir src/obj - cp ../src/obj/build.h src/obj/ + tar --strip-components=1 -xf "${GIT_ARCHIVE}" + ./autogen.sh CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}" make ${MAKEOPTS} make ${MAKEOPTS} -C src check-security @@ -196,5 +162,3 @@ script: | cd ../../ rm -rf distsrc-${i} done - mkdir -p $OUTDIR/src - mv $SOURCEDIST $OUTDIR/src diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml index 0ba5b391dc..2dc5b5f81d 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -1,5 +1,5 @@ --- -name: "BGL-core-osx-0.20" +name: "BGL-core-osx-0.22" enable_cache: true distro: "ubuntu" suites: @@ -32,12 +32,12 @@ remotes: - "url": "https://github.com/BGL/BGL.git" "dir": "BGL" files: -- "MacOSX10.11.sdk.tar.gz" +- "Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz" script: | set -e -o pipefail WRAP_DIR=$HOME/wrapped - HOSTS="x86_64-apple-darwin16" + HOSTS="x86_64-apple-darwin18" CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage" FAKETIME_HOST_PROGS="" FAKETIME_PROGS="ar ranlib date dmg genisoimage" @@ -90,7 +90,7 @@ script: | BASEPREFIX="${PWD}/depends" mkdir -p ${BASEPREFIX}/SDKs - tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.11.sdk.tar.gz + tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz # Build dependencies for each host for i in $HOSTS; do @@ -110,33 +110,36 @@ script: | SOURCEDIST=$(echo BGL-*.tar.gz) DISTNAME=${SOURCEDIST/%.tar.gz} - # Correct tar file order - mkdir -p temp - pushd temp - tar -xf ../$SOURCEDIST - find BGL-* | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST - popd - # Workaround for tarball not building with the bare tag version (prep) make -C src obj/build.h + # Create the git archive, and define DISTNAME and GIT_ARCHIVE variables. + # shellcheck source=contrib/gitian-descriptors/make_git_archive + source contrib/gitian-descriptors/make_git_archive + # Define DISTNAME variable. + # shellcheck source=contrib/gitian-descriptors/assign_DISTNAME + source contrib/gitian-descriptors/assign_DISTNAME + + GIT_ARCHIVE="${OUTDIR}/src/${DISTNAME}.tar.gz" + + # Create the source tarball + mkdir -p "$(dirname "$GIT_ARCHIVE")" + git archive --prefix="${DISTNAME}/" --output="$GIT_ARCHIVE" HEAD ORIGPATH="$PATH" - # Extract the release tarball into a dir for each host and build + # Extract the git archive into a dir for each host and build for i in ${HOSTS}; do export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH} mkdir -p distsrc-${i} cd distsrc-${i} INSTALLPATH="${PWD}/installed/${DISTNAME}" mkdir -p ${INSTALLPATH} - tar --strip-components=1 -xf ../$SOURCEDIST - - # Workaround for tarball not building with the bare tag version - echo '#!/bin/true' >share/genbuild.sh - mkdir src/obj - cp ../src/obj/build.h src/obj/ + tar --strip-components=1 -xf "${GIT_ARCHIVE}" + ./autogen.sh CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} make ${MAKEOPTS} + make ${MAKEOPTS} -C src check-security + make ${MAKEOPTS} -C src check-symbols make install-strip DESTDIR=${INSTALLPATH} make osx_volname @@ -164,6 +167,5 @@ script: | find ${DISTNAME} | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz cd ../../ done - mkdir -p $OUTDIR/src - mv $SOURCEDIST $OUTDIR/src + mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-osx64.tar.gz diff --git a/contrib/gitian-descriptors/gitian-win-signer.yml b/contrib/gitian-descriptors/gitian-win-signer.yml index 0206aed1c8..5ac63db171 100644 --- a/contrib/gitian-descriptors/gitian-win-signer.yml +++ b/contrib/gitian-descriptors/gitian-win-signer.yml @@ -8,6 +8,7 @@ architectures: packages: - "libssl-dev" - "autoconf" +- "automake" - "libtool" - "pkg-config" remotes: diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index c365e10f8c..552a08e6ff 100644 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -1,5 +1,5 @@ --- -name: "BGL-core-win-0.20" +name: "BGL-core-win-22" enable_cache: true distro: "ubuntu" suites: @@ -34,8 +34,8 @@ script: | CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests" FAKETIME_HOST_PROGS="ar ranlib nm windres strip objcopy" FAKETIME_PROGS="date makensis zip" - HOST_CFLAGS="-O2 -g" - HOST_CXXFLAGS="-O2 -g" + HOST_CFLAGS="-O2 -g -fno-ident" + HOST_CXXFLAGS="-O2 -g -fno-ident" export QT_RCC_TEST=1 export QT_RCC_SOURCE_DATE_OVERRIDE=1 @@ -76,14 +76,12 @@ script: | function create_per-host_compiler_wrapper { # -posix variant is required for c++11 threading. for i in $HOSTS; do - mkdir -p ${WRAP_DIR}/${i} for prog in gcc g++; do echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog} echo "REAL=\`which -a ${i}-${prog}-posix | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${i}-${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog} - echo "export COMPILER_PATH=${WRAP_DIR}/${i}" >> ${WRAP_DIR}/${i}-${prog} - echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog} + echo "\$REAL \"\$@\"" >> $WRAP_DIR/${i}-${prog} chmod +x ${WRAP_DIR}/${i}-${prog} done done @@ -117,37 +115,38 @@ script: | SOURCEDIST=$(echo BGL-*.tar.gz) DISTNAME=${SOURCEDIST/%.tar.gz} - # Correct tar file order - mkdir -p temp - pushd temp - tar -xf ../$SOURCEDIST - find BGL-* | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST - popd - # Workaround for tarball not building with the bare tag version (prep) make -C src obj/build.h + # Create the git archive, and define DISTNAME and GIT_ARCHIVE variables. + # shellcheck source=contrib/gitian-descriptors/make_git_archive + source contrib/gitian-descriptors/make_git_archive + # Define DISTNAME variable. + # shellcheck source=contrib/gitian-descriptors/assign_DISTNAME + source contrib/gitian-descriptors/assign_DISTNAME + + GIT_ARCHIVE="${OUTDIR}/src/${DISTNAME}.tar.gz" + + # Create the source tarball + mkdir -p "$(dirname "$GIT_ARCHIVE")" + git archive --prefix="${DISTNAME}/" --output="$GIT_ARCHIVE" HEAD ORIGPATH="$PATH" - # Extract the release tarball into a dir for each host and build + # Extract the git archive into a dir for each host and build for i in ${HOSTS}; do export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH} mkdir -p distsrc-${i} cd distsrc-${i} INSTALLPATH="${PWD}/installed/${DISTNAME}" mkdir -p ${INSTALLPATH} - tar --strip-components=1 -xf ../$SOURCEDIST - - # Workaround for tarball not building with the bare tag version - echo '#!/bin/true' >share/genbuild.sh - mkdir src/obj - cp ../src/obj/build.h src/obj/ + tar --strip-components=1 -xf "${GIT_ARCHIVE}" + ./autogen.sh CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}" make ${MAKEOPTS} make ${MAKEOPTS} -C src check-security - make deploy + make ${MAKEOPTS} -C src check-symbols + make deploy BGL_WIN_INSTALLER="${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe" make install DESTDIR=${INSTALLPATH} - cp -f --target-directory="${OUTDIR}" ./BGL-*-setup-unsigned.exe cd installed mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/ find . -name "lib*.la" -delete @@ -161,10 +160,9 @@ script: | cd ../../ rm -rf distsrc-${i} done - mkdir -p $OUTDIR/src - mv $SOURCEDIST $OUTDIR/src + cp -rf contrib/windeploy $BUILD_DIR cd $BUILD_DIR/windeploy mkdir unsigned - cp $OUTDIR/BGL-*setup-unsigned.exe unsigned/ + cp ${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe unsigned/ find . | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz diff --git a/contrib/gitian-keys/keys.txt b/contrib/gitian-keys/keys.txt index ba3036a89f..0a2c1302c8 100644 --- a/contrib/gitian-keys/keys.txt +++ b/contrib/gitian-keys/keys.txt @@ -13,6 +13,7 @@ D35176BE9264832E4ACA8986BF0792FBE95DC863 fivepiece 01CDF4627A3B88AAE4A571C87588242FBE38D3A8 Gavin Andresen D1DBF2C4B96F2DEBF4C16654410108112E7EA81F Hennadii Stepanov (hebasto) D3CC177286005BB8FF673294C5242A1AB3936517 jl2012 +82921A4B88FD454B7EB8CE3C796C4109063D4EAF Jon Atack 32EE5C4C3FA15CCADB46ABE529D4BCB6416F53EC Jonas Schnelli 4B4E840451149DD7FB0D633477DFAB5C3108B9A8 Jorge Timon C42AFF7C61B3E44A1454CD3557AF762DB3353322 Karl-Johan Alm (kallewoof) @@ -29,6 +30,7 @@ D762373D24904A3E42F33B08B9A408E71DAAC974 Pieter Wuille (Location: Leuven, Belgiu 133EAC179436F14A5CF1B794860FEB804E669320 Pieter Wuille A8FC55F3B04BA3146F3492E79303B33A305224CB Sebastian Kung (TheCharlatan) ED9BDF7AD6A55E232E84524257FF9BDBCC301009 Sjors Provoost +9EDAFF80E080659604F4A76B2EBB056FD847F8A7 Stephan Oeste (Emzy) AEC1884398647C47413C1C3FB1179EB7347DC10D Warren Togami 79D00BAC68B56D422F945A8F8E3A8F3247DBCBBF Willy Ko 71A3B16735405025D447E8F274810B012346C9A6 Wladimir J. van der Laan diff --git a/contrib/guix/README.md b/contrib/guix/README.md index 293931e101..291ce551a5 100644 --- a/contrib/guix/README.md +++ b/contrib/guix/README.md @@ -13,7 +13,6 @@ We achieve bootstrappability by using Guix as a functional package manager. Conservatively, a x86_64 machine with: -- 2 or more logical cores - 4GB of free disk space on the partition that /gnu/store will reside in - 24GB of free disk space on the partition that the BGL Core git repository resides in @@ -62,15 +61,16 @@ Likewise, to perform a bootstrapped build (takes even longer): export ADDITIONAL_GUIX_ENVIRONMENT_FLAGS='--bootstrap --no-substitutes' ``` -### Using the right Guix +### Using a version of Guix with `guix time-machine` capabilities -Once Guix is installed, deploy our patched version into your current Guix -profile. The changes there are slowly being upstreamed. +> Note: This entire section can be skipped if you are already using a version of +> Guix that has [the `guix time-machine` command][guix/time-machine]. + +Once Guix is installed, if it doesn't have the `guix time-machine` command, pull +the latest `guix`. ```sh -guix pull --url=https://github.com/dongcarl/guix.git \ - --commit=82c77e52b8b46e0a3aad2cb12307c2e30547deec \ - --max-jobs=4 # change accordingly +guix pull --max-jobs=4 # change number of jobs accordingly ``` Make sure that you are using your current profile. (You are prompted to do this @@ -80,9 +80,6 @@ at the end of the `guix pull`) export PATH="${HOME}/.config/guix/current/bin${PATH:+:}$PATH" ``` -> Note: There is ongoing work to eliminate this entire section using Guix -> [inferiors][guix/inferiors] and [channels][guix/channels]. - ## Usage ### As a Development Environment @@ -116,7 +113,7 @@ find output/ -type f -print0 | sort -z | xargs -r0 sha256sum * _**HOSTS**_ Override the space-separated list of platform triples for which to perform a - bootstrappable build. _(defaults to "i686-linux-gnu x86\_64-linux-gnu + bootstrappable build. _(defaults to "x86\_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu")_ > Windows and OS X platform triplet support are WIP. @@ -145,6 +142,11 @@ find output/ -type f -print0 | sort -z | xargs -r0 sha256sum If non-empty, will pass `V=1` to all `make` invocations, making `make` output verbose. + Note that any given value is ignored. The variable is only checked for + emptiness. More concretely, this means that `V=` (setting `V` to the empty + string) is interpreted the same way as not setting `V` at all, and that `V=0` + has the same effect as `V=1`. + * _**ADDITIONAL_GUIX_ENVIRONMENT_FLAGS**_ Additional flags to be passed to `guix environment`. For a fully-bootstrapped @@ -222,8 +224,7 @@ repository and will likely put one up soon. [guix/env-setup]: https://www.gnu.org/software/guix/manual/en/html_node/Build-Environment-Setup.html [guix/substitutes]: https://www.gnu.org/software/guix/manual/en/html_node/Substitutes.html [guix/substitute-server-auth]: https://www.gnu.org/software/guix/manual/en/html_node/Substitute-Server-Authorization.html -[guix/inferiors]: https://www.gnu.org/software/guix/manual/en/html_node/Inferiors.html -[guix/channels]: https://www.gnu.org/software/guix/manual/en/html_node/Channels.html +[guix/time-machine]: https://guix.gnu.org/manual/en/html_node/Invoking-guix-time_002dmachine.html [debian/guix-package]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850644 [fanquake/guix-docker]: https://github.com/fanquake/core-review/tree/master/guix diff --git a/contrib/guix/guix-build.sh b/contrib/guix/guix-build.sh index 858ea3e016..a40f87f64e 100755 --- a/contrib/guix/guix-build.sh +++ b/contrib/guix/guix-build.sh @@ -13,27 +13,107 @@ make -C "${PWD}/depends" -j"$MAX_JOBS" download ${V:+V=1} ${SOURCES_PATH:+SOURCE # Determine the reference time used for determinism (overridable by environment) SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git log --format=%at -1)}" -# Deterministically build BGL Core for HOSTs (overriable by environment) -for host in ${HOSTS=i686-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu}; do +# Execute "$@" in a pinned, possibly older version of Guix, for reproducibility +# across time. +time-machine() { + guix time-machine --url=https://github.com/dongcarl/guix.git \ + --commit=b066c25026f21fb57677aa34692a5034338e7ee3 \ + -- "$@" +} + +# Function to be called when building for host ${1} and the user interrupts the +# build +int_trap() { +cat << EOF +** INT received while building ${1}, you may want to clean up the relevant + output, deploy, and distsrc-* directories before rebuilding + +Hint: To blow everything away, you may want to use: + + $ git clean -xdff --exclude='/depends/SDKs/*' + +Specifically, this will remove all files without an entry in the index, +excluding the SDK directory. Practically speaking, this means that all ignored +and untracked files and directories will be wiped, allowing you to start anew. +EOF +} + +# Deterministically build Bitcoin Core for HOSTs (overridable by environment) +# shellcheck disable=SC2153 +for host in ${HOSTS=x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu x86_64-w64-mingw32}; do # Display proper warning when the user interrupts the build - trap 'echo "** INT received while building ${host}, you may want to clean up the relevant output and distsrc-* directories before rebuilding"' INT - - # Run the build script 'contrib/guix/libexec/build.sh' in the build - # container specified by 'contrib/guix/manifest.scm' - # shellcheck disable=SC2086 - guix environment --manifest="${PWD}/contrib/guix/manifest.scm" \ - --container \ - --pure \ - --no-cwd \ - --share="$PWD"=/BGL \ - ${SOURCES_PATH:+--share="$SOURCES_PATH"} \ - ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \ - -- env HOST="$host" \ - MAX_JOBS="$MAX_JOBS" \ - SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \ - ${V:+V=1} \ - ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} \ - bash -c "cd /BGL && bash contrib/guix/libexec/build.sh" + trap 'int_trap ${host}' INT + + ( + # Required for 'contrib/guix/manifest.scm' to output the right manifest + # for the particular $HOST we're building for + export HOST="$host" + + # Run the build script 'contrib/guix/libexec/build.sh' in the build + # container specified by 'contrib/guix/manifest.scm'. + # + # Explanation of `guix environment` flags: + # + # --container run command within an isolated container + # + # Running in an isolated container minimizes build-time differences + # between machines and improves reproducibility + # + # --pure unset existing environment variables + # + # Same rationale as --container + # + # --no-cwd do not share current working directory with an + # isolated container + # + # When --container is specified, the default behavior is to share + # the current working directory with the isolated container at the + # same exact path (e.g. mapping '/home/satoshi/bitcoin/' to + # '/home/satoshi/bitcoin/'). This means that the $PWD inside the + # container becomes a source of irreproducibility. --no-cwd disables + # this behaviour. + # + # --share=SPEC for containers, share writable host file system + # according to SPEC + # + # --share="$PWD"=/bitcoin + # + # maps our current working directory to /bitcoin + # inside the isolated container, which we later cd + # into. + # + # While we don't want to map our current working directory to the + # same exact path (as this introduces irreproducibility), we do want + # it to be at a _fixed_ path _somewhere_ inside the isolated + # container so that we have something to build. '/bitcoin' was + # chosen arbitrarily. + # + # ${SOURCES_PATH:+--share="$SOURCES_PATH"} + # + # make the downloaded depends sources path available + # inside the isolated container + # + # The isolated container has no network access as it's in a + # different network namespace from the main machine, so we have to + # make the downloaded depends sources available to it. The sources + # should have been downloaded prior to this invocation. + # + # shellcheck disable=SC2086 + time-machine environment --manifest="${PWD}/contrib/guix/manifest.scm" \ + --container \ + --pure \ + --no-cwd \ + --share="$PWD"=/bitcoin \ + --expose="$(git rev-parse --git-common-dir)" \ + ${SOURCES_PATH:+--share="$SOURCES_PATH"} \ + ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \ + -- env HOST="$host" \ + MAX_JOBS="$MAX_JOBS" \ + SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \ + ${V:+V=1} \ + ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} \ + bash -c "cd /BGL && bash contrib/guix/libexec/build.sh" + ) done diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index 854e66b908..b923a09e62 100644 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash export LC_ALL=C set -e -o pipefail +export TZ=UTC + +if [ -n "$V" ]; then + # Print both unexpanded (-v) and expanded (-x) forms of commands as they are + # read from this file. + set -vx + # Set VERBOSE for CMake-based builds + export VERBOSE="$V" +fi # Check that environment variables assumed to be set by the environment are set echo "Building for platform triple ${HOST:?not set} with reference timestamp ${SOURCE_DATE_EPOCH:?not set}..." @@ -36,23 +45,41 @@ store_path() { --expression='s|"[[:space:]]*$||' } -# Determine output paths to use in CROSS_* environment variables -CROSS_GLIBC="$(store_path glibc-cross-${HOST})" -CROSS_GLIBC_STATIC="$(store_path glibc-cross-${HOST} static)" -CROSS_KERNEL="$(store_path linux-libre-headers-cross-${HOST})" -CROSS_GCC="$(store_path gcc-cross-${HOST})" -CROSS_GCC_LIBS=( "${CROSS_GCC}/lib/gcc/${HOST}"/* ) # This expands to an array of directories... -CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one) - # Set environment variables to point Guix's cross-toolchain to the right # includes/libs for $HOST -# -# NOTE: CROSS_C_INCLUDE_PATH is missing ${CROSS_GCC_LIB}/include-fixed, because -# the limits.h in it is missing a '#include_next ' -# -export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GLIBC}/include:${CROSS_KERNEL}/include" -export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}" -export CROSS_LIBRARY_PATH="${CROSS_GCC}/lib:${CROSS_GCC}/${HOST}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib:${CROSS_GLIBC_STATIC}/lib" +case "$HOST" in + *mingw*) + # Determine output paths to use in CROSS_* environment variables + CROSS_GLIBC="$(store_path "mingw-w64-x86_64-winpthreads")" + CROSS_GCC="$(store_path "gcc-cross-${HOST}")" + CROSS_GCC_LIBS=( "${CROSS_GCC}/lib/gcc/${HOST}"/* ) # This expands to an array of directories... + CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one) + + NATIVE_GCC="$(store_path gcc-glibc-2.27-toolchain)" + export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC}/lib64" + export CPATH="${NATIVE_GCC}/include" + + export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include" + export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}" + export CROSS_LIBRARY_PATH="${CROSS_GCC}/lib:${CROSS_GCC}/${HOST}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib" + ;; + *linux*) + CROSS_GLIBC="$(store_path "glibc-cross-${HOST}")" + CROSS_GLIBC_STATIC="$(store_path "glibc-cross-${HOST}" static)" + CROSS_KERNEL="$(store_path "linux-libre-headers-cross-${HOST}")" + CROSS_GCC="$(store_path "gcc-cross-${HOST}")" + CROSS_GCC_LIBS=( "${CROSS_GCC}/lib/gcc/${HOST}"/* ) # This expands to an array of directories... + CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one) + + # NOTE: CROSS_C_INCLUDE_PATH is missing ${CROSS_GCC_LIB}/include-fixed, because + # the limits.h in it is missing a '#include_next ' + export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GLIBC}/include:${CROSS_KERNEL}/include" + export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}" + export CROSS_LIBRARY_PATH="${CROSS_GCC}/lib:${CROSS_GCC}/${HOST}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib:${CROSS_GLIBC_STATIC}/lib" + ;; + *) + exit 1 ;; +esac # Sanity check CROSS_*_PATH directories IFS=':' read -ra PATHS <<< "${CROSS_C_INCLUDE_PATH}:${CROSS_CPLUS_INCLUDE_PATH}:${CROSS_LIBRARY_PATH}" @@ -74,16 +101,20 @@ export GUIX_LD_WRAPPER_DISABLE_RPATH=yes [ -e /usr/bin/env ] || ln -s --no-dereference "$(command -v env)" /usr/bin/env # Determine the correct value for -Wl,--dynamic-linker for the current $HOST -glibc_dynamic_linker=$( - case "$HOST" in - i686-linux-gnu) echo /lib/ld-linux.so.2 ;; - x86_64-linux-gnu) echo /lib64/ld-linux-x86-64.so.2 ;; - arm-linux-gnueabihf) echo /lib/ld-linux-armhf.so.3 ;; - aarch64-linux-gnu) echo /lib/ld-linux-aarch64.so.1 ;; - riscv64-linux-gnu) echo /lib/ld-linux-riscv64-lp64d.so.1 ;; - *) exit 1 ;; - esac -) +case "$HOST" in + *linux*) + glibc_dynamic_linker=$( + case "$HOST" in + i686-linux-gnu) echo /lib/ld-linux.so.2 ;; + x86_64-linux-gnu) echo /lib64/ld-linux-x86-64.so.2 ;; + arm-linux-gnueabihf) echo /lib/ld-linux-armhf.so.3 ;; + aarch64-linux-gnu) echo /lib/ld-linux-aarch64.so.1 ;; + riscv64-linux-gnu) echo /lib/ld-linux-riscv64-lp64d.so.1 ;; + *) exit 1 ;; + esac + ) + ;; +esac # Environment variables for determinism export QT_RCC_TEST=1 @@ -111,7 +142,8 @@ make -C depends --jobs="$MAX_JOBS" HOST="$HOST" \ x86_64_linux_RANLIB=x86_64-linux-gnu-ranlib \ x86_64_linux_NM=x86_64-linux-gnu-nm \ x86_64_linux_STRIP=x86_64-linux-gnu-strip \ - qt_config_opts_i686_linux='-platform linux-g++ -xplatform BGL-linux-g++' + qt_config_opts_i686_linux='-platform linux-g++ -xplatform BGL-linux-g++' \ + mingw32_CFLAGS='-DMINGW_HAS_SECURE_API=1 -pipe' ########################### @@ -131,16 +163,43 @@ fi SOURCEDIST="$(find "${OUTDIR}/src" -name 'BGL-*.tar.gz')" # Determine our distribution name (e.g. BGL-0.18.0) DISTNAME="$(basename "$SOURCEDIST" '.tar.gz')" +# Define DISTNAME variable. +# shellcheck source=contrib/gitian-descriptors/assign_DISTNAME +source contrib/gitian-descriptors/assign_DISTNAME + +GIT_ARCHIVE="${OUTDIR}/src/${DISTNAME}.tar.gz" + +# Create the source tarball if not already there +if [ ! -e "$GIT_ARCHIVE" ]; then + mkdir -p "$(dirname "$GIT_ARCHIVE")" + git archive --prefix="${DISTNAME}/" --output="$GIT_ARCHIVE" HEAD +fi ########################### # Binary Tarball Building # ########################### -# Similar flags to Gitian -CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests" -HOST_CFLAGS="-O2 -g -ffile-prefix-map=${PWD}=." -HOST_CXXFLAGS="-O2 -g -ffile-prefix-map=${PWD}=." -HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$glibc_dynamic_linker -static-libstdc++" +# CONFIGFLAGS +CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests" +case "$HOST" in + *linux*) CONFIGFLAGS+=" --enable-glibc-back-compat" ;; +esac + +# CFLAGS +HOST_CFLAGS="-O2 -g" +case "$HOST" in + *linux*) HOST_CFLAGS+=" -ffile-prefix-map=${PWD}=." ;; + *mingw*) HOST_CFLAGS+=" -fno-ident" ;; +esac + +# CXXFLAGS +HOST_CXXFLAGS="$HOST_CFLAGS" + +# LDFLAGS +case "$HOST" in + *linux*) HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$glibc_dynamic_linker -static-libstdc++" ;; + *mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;; +esac # Make $HOST-specific native binaries from depends available in $PATH export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}" @@ -148,7 +207,9 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}" cd "$DISTSRC" # Extract the source tarball - tar --strip-components=1 -xf "${SOURCEDIST}" + tar --strip-components=1 -xf "${GIT_ARCHIVE}" + + ./autogen.sh # Configure this DISTSRC for $HOST # shellcheck disable=SC2086 @@ -160,7 +221,7 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}" ${CONFIGFLAGS} \ CFLAGS="${HOST_CFLAGS}" \ CXXFLAGS="${HOST_CXXFLAGS}" \ - LDFLAGS="${HOST_LDFLAGS}" + ${HOST_LDFLAGS:+LDFLAGS="${HOST_LDFLAGS}"} sed -i.old 's/-lstdc++ //g' config.status libtool src/univalue/config.status src/univalue/libtool @@ -169,9 +230,21 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}" # Perform basic ELF security checks on a series of executables. make -C src --jobs=1 check-security ${V:+V=1} - # Check that executables only contain allowed gcc, glibc and libstdc++ - # version symbols for Linux distro back-compatibility. - make -C src --jobs=1 check-symbols ${V:+V=1} + + case "$HOST" in + *linux*|*mingw*) + # Check that executables only contain allowed gcc, glibc and libstdc++ + # version symbols for Linux distro back-compatibility. + make -C src --jobs=1 check-symbols ${V:+V=1} + ;; + esac + + # Make the os-specific installers + case "$HOST" in + *mingw*) + make deploy ${V:+V=1} BITCOIN_WIN_INSTALLER="${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe" + ;; + esac # Setup the directory where our BGL Core build for HOST will be # installed. This directory will also later serve as the input for our @@ -180,9 +253,29 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}" mkdir -p "${INSTALLPATH}" # Install built BGL Core to $INSTALLPATH make install DESTDIR="${INSTALLPATH}" ${V:+V=1} + + case "$HOST" in + *mingw*) + # This step not only moves the unsigned NSIS executable to + # "${OUTDIR}", but also renames it + # + # from: + # BGL-@PACKAGE_VERSION@-win64-setup-unsigned.exe + # to: + # ${DISTNAME}-win64-setup-unsigned.exe + # + cp -f ./BGL-*-win64-setup-unsigned.exe "${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe" + ;; + 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 @@ -196,19 +289,60 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}" find "${DISTNAME}/lib" -type f -print0 } | xargs -0 -n1 -P"$MAX_JOBS" -I{} "${DISTSRC}/contrib/devtools/split-debug.sh" {} {} {}.dbg - cp "${DISTSRC}/doc/README.md" "${DISTNAME}/" + case "$HOST" in + *mingw*) + cp "${DISTSRC}/doc/README_windows.txt" "${DISTNAME}/readme.txt" + ;; + *linux*) + cp "${DISTSRC}/README.md" "${DISTNAME}/" + ;; + esac # Finally, deterministically produce {non-,}debug binary tarballs ready # for release - find "${DISTNAME}" -not -name "*.dbg" -print0 \ - | sort --zero-terminated \ - | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ - | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \ - || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 ) - find "${DISTNAME}" -name "*.dbg" -print0 \ - | sort --zero-terminated \ - | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ - | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" \ - || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" && exit 1 ) + case "$HOST" in + *mingw*) + find "${DISTNAME}" -not -name "*.dbg" -print0 \ + | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" + find "${DISTNAME}" -not -name "*.dbg" \ + | sort \ + | zip -X@ "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}.zip" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}.zip" && exit 1 ) + find "${DISTNAME}" -name "*.dbg" -print0 \ + | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" + find "${DISTNAME}" -name "*.dbg" \ + | sort \ + | zip -X@ "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}-debug.zip" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST//x86_64-w64-mingw32/win64}-debug.zip" && exit 1 ) + ;; + *linux*) + find "${DISTNAME}" -not -name "*.dbg" -print0 \ + | sort --zero-terminated \ + | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ + | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 ) + find "${DISTNAME}" -name "*.dbg" -print0 \ + | sort --zero-terminated \ + | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ + | gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-debug.tar.gz" && exit 1 ) + ;; + esac ) ) + +case "$HOST" in + *mingw*) + cp -rf --target-directory=. contrib/windeploy + ( + cd ./windeploy + mkdir unsigned + cp --target-directory=unsigned/ "${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe" + find . -print0 \ + | sort --zero-terminated \ + | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ + | gzip -9n > "${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz" \ + || ( rm -f "${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz" && exit 1 ) + ) + ;; +esac diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index 69ff7d4b20..ce4e69034a 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -10,11 +10,15 @@ (gnu packages file) (gnu packages gawk) (gnu packages gcc) + (gnu packages installers) (gnu packages linux) + (gnu packages mingw) (gnu packages perl) (gnu packages pkg-config) (gnu packages python) (gnu packages shells) + (gnu packages version-control) + (guix build-system gnu) (guix build-system trivial) (guix gexp) (guix packages) @@ -23,7 +27,10 @@ (define (make-ssp-fixed-gcc xgcc) "Given a XGCC package, return a modified package that uses the SSP function -from glibc instead of from libssp.so. Taken from: +from glibc instead of from libssp.so. Our `symbol-check' script will complain if +we link against libssp.so, and thus will ensure that this works properly. + +Taken from: http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html" (package (inherit xgcc) @@ -104,8 +111,7 @@ chain for " target " development.")) (base-gcc-for-libc gcc-5) (base-kernel-headers linux-libre-headers-4.19) (base-libc glibc-2.27) - (base-gcc (make-gcc-rpath-link - (make-ssp-fixed-gcc gcc-9)))) + (base-gcc (make-gcc-rpath-link gcc-9))) "Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values desirable for building BGL Core release binaries." (make-cross-toolchain target @@ -114,45 +120,79 @@ desirable for building BGL Core release binaries." base-libc base-gcc)) +(define (make-gcc-with-pthreads gcc) + (package-with-extra-configure-variable gcc "--enable-threads" "posix")) + +(define (make-mingw-pthreads-cross-toolchain target) + "Create a cross-compilation toolchain package for TARGET" + (let* ((xbinutils (cross-binutils target)) + (pthreads-xlibc mingw-w64-x86_64-winpthreads) + (pthreads-xgcc (make-gcc-with-pthreads + (cross-gcc target + #:xgcc (make-ssp-fixed-gcc gcc-9) + #:xbinutils xbinutils + #:libc pthreads-xlibc)))) + ;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and + ;; XGCC + (package + (name (string-append target "-posix-toolchain")) + (version (package-version pthreads-xgcc)) + (source #f) + (build-system trivial-build-system) + (arguments '(#:builder (begin (mkdir %output) #t))) + (propagated-inputs + `(("binutils" ,xbinutils) + ("libc" ,pthreads-xlibc) + ("gcc" ,pthreads-xgcc))) + (synopsis (string-append "Complete GCC tool chain for " target)) + (description (string-append "This package provides a complete GCC tool +chain for " target " development.")) + (home-page (package-home-page pthreads-xgcc)) + (license (package-license pthreads-xgcc))))) + + (packages->manifest - (list ;; The Basics - bash-minimal - which - coreutils - util-linux - ;; File(system) inspection - file - grep - diffutils - findutils - ;; File transformation - patch - gawk - sed - ;; Compression and archiving - tar - bzip2 - gzip - xz - zlib - ;; Build tools - gnu-make - libtool - autoconf - automake - pkg-config - ;; Scripting - perl - python-3.7 - ;; Native gcc 9 toolchain targeting glibc 2.27 - (make-gcc-toolchain gcc-9 glibc-2.27) - ;; Cross gcc 9 toolchains targeting glibc 2.27 - (make-BGL-cross-toolchain "i686-linux-gnu") - (make-BGL-cross-toolchain "x86_64-linux-gnu") - (make-BGL-cross-toolchain "aarch64-linux-gnu") - (make-BGL-cross-toolchain "arm-linux-gnueabihf") - ;; The glibc 2.27 for riscv64 needs gcc 7 to successfully build (see: - ;; https://www.gnu.org/software/gcc/gcc-7/changes.html#riscv). The final - ;; toolchain is still a gcc 9 toolchain targeting glibc 2.27. - (make-BGL-cross-toolchain "riscv64-linux-gnu" - #:base-gcc-for-libc gcc-7))) + (append + (list ;; The Basics + bash-minimal + which + coreutils + util-linux + ;; File(system) inspection + file + grep + diffutils + findutils + ;; File transformation + patch + gawk + sed + ;; Compression and archiving + tar + bzip2 + gzip + xz + zlib + ;; Build tools + gnu-make + libtool + autoconf + automake + pkg-config + ;; Scripting + perl + python-3.7 + ;; Git + git + ;; Native gcc 9 toolchain targeting glibc 2.27 + (make-gcc-toolchain gcc-9 glibc-2.27)) + (let ((target (getenv "HOST"))) + (cond ((string-suffix? "-mingw32" target) + ;; Windows + (list zip (make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32") nsis-x86_64)) + ((string-contains target "riscv64-linux-") + (list (make-BGL-cross-toolchain "riscv64-linux-gnu" + #:base-gcc-for-libc gcc-7))) + ((string-contains target "-linux-") + (list (make-BGL-cross-toolchain target))) + (else '()))))) diff --git a/contrib/install_db4.sh b/contrib/install_db4.sh index acd1809da6..ea0ceeab9a 100755 --- a/contrib/install_db4.sh +++ b/contrib/install_db4.sh @@ -1,4 +1,7 @@ #!/bin/sh +# Copyright (c) 2017-2019 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. # Install libdb4.8 (Berkeley DB). diff --git a/contrib/linearize/example-linearize.cfg b/contrib/linearize/example-linearize.cfg index 9418cb8b1f..9df2763a4c 100644 --- a/contrib/linearize/example-linearize.cfg +++ b/contrib/linearize/example-linearize.cfg @@ -13,6 +13,9 @@ port=8332 #regtest default #port=18443 +#signet default +#port=38332 + # bootstrap.dat hashlist settings (linearize-hashes) max_height=313000 @@ -28,6 +31,11 @@ input=/home/example/.BGL/blocks #genesis=000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943 #input=/home/example/.BGL/testnet3/blocks +# signet +#netmagic=0a03cf40 +#genesis=00000008819873e925422c1ff0f99f7cc9bbb232af63a077a480a3633bee1ef6 +#input=/home/example/.bitcoin/signet/blocks + # "output" option causes blockchain files to be written to the given location, # with "output_file" ignored. If not used, "output_file" is used instead. # output=/home/example/blockchain_directory diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py index 863b22f6b1..64cb767a08 100755 --- a/contrib/linearize/linearize-data.py +++ b/contrib/linearize/linearize-data.py @@ -2,7 +2,7 @@ # # linearize-data.py: Construct a linear, no-fork version of the chain. # -# Copyright (c) 2013-2018 The Bitcoin Core developers +# Copyright (c) 2013-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # diff --git a/contrib/linearize/linearize-hashes.py b/contrib/linearize/linearize-hashes.py index 24e85c8044..23a18dc3ce 100755 --- a/contrib/linearize/linearize-hashes.py +++ b/contrib/linearize/linearize-hashes.py @@ -2,7 +2,7 @@ # # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # -# Copyright (c) 2013-2018 The Bitcoin Core developers +# 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. # diff --git a/contrib/macdeploy/README.md b/contrib/macdeploy/README.md index b69a818ef9..6c3db2620b 100644 --- a/contrib/macdeploy/README.md +++ b/contrib/macdeploy/README.md @@ -1,15 +1,124 @@ -### MacDeploy ### +# MacOS Deployment -For Snow Leopard (which uses [Python 2.6](http://www.python.org/download/releases/2.6/)), you will need the param_parser package: +The `macdeployqtplus` script should not be run manually. Instead, after building as usual: - sudo easy_install argparse +```bash +make deploy +``` -This script should not be run manually, instead, after building as usual: +When complete, it will have produced `Bitcoin-Core.dmg`. - make deploy +## SDK Extraction -During the process, the disk image window will pop up briefly where the fancy -settings are applied. This is normal, please do not interfere. +### Step 1: Obtaining `Xcode.app` -When finished, it will produce `BGL-Qt.dmg`. +Our current macOS SDK +(`Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz`) can be +extracted from +[Xcode_11.3.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_11.3.1/Xcode_11.3.1.xip). +An Apple ID is needed to download this. +After Xcode version 7.x, Apple started shipping the `Xcode.app` in a `.xip` +archive. This makes the SDK less-trivial to extract on non-macOS machines. One +approach (tested on Debian Buster) is outlined below: + +```bash +# Install/clone tools needed for extracting Xcode.app +apt install cpio +git clone https://github.com/bitcoin-core/apple-sdk-tools.git + +# Unpack Xcode_11.3.1.xip and place the resulting Xcode.app in your current +# working directory +python3 apple-sdk-tools/extract_xcode.py -f Xcode_11.3.1.xip | cpio -d -i +``` + +On macOS the process is more straightforward: + +```bash +xip -x Xcode_11.3.1.xip +``` + +### Step 2: Generating `Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz` from `Xcode.app` + +To generate `Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz`, run +the script [`gen-sdk`](./gen-sdk) with the path to `Xcode.app` (extracted in the +previous stage) as the first argument. + +```bash +# Generate a Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz from +# the supplied Xcode.app +./contrib/macdeploy/gen-sdk '/path/to/Xcode.app' +``` + +## Deterministic macOS DMG Notes +Working macOS DMGs are created in Linux by combining a recent `clang`, the Apple +`binutils` (`ld`, `ar`, etc) and DMG authoring tools. + +Apple uses `clang` extensively for development and has upstreamed the necessary +functionality so that a vanilla clang can take advantage. It supports the use of `-F`, +`-target`, `-mmacosx-version-min`, and `--sysroot`, which are all necessary when +building for macOS. + +Apple's version of `binutils` (called `cctools`) contains lots of functionality missing in the +FSF's `binutils`. In addition to extra linker options for frameworks and sysroots, several +other tools are needed as well such as `install_name_tool`, `lipo`, and `nmedit`. These +do not build under Linux, so they have been patched to do so. The work here was used as +a starting point: [mingwandroid/toolchain4](https://github.com/mingwandroid/toolchain4). + +In order to build a working toolchain, the following source packages are needed from +Apple: `cctools`, `dyld`, and `ld64`. + +These tools inject timestamps by default, which produce non-deterministic binaries. The +`ZERO_AR_DATE` environment variable is used to disable that. + +This version of `cctools` has been patched to use the current version of `clang`'s headers +and its `libLTO.so` rather than those from `llvmgcc`, as it was originally done in `toolchain4`. + +To complicate things further, all builds must target an Apple SDK. These SDKs are free to +download, but not redistributable. To obtain it, register for an Apple Developer Account, +then download [Xcode_11.3.1](https://download.developer.apple.com/Developer_Tools/Xcode_11.3.1/Xcode_11.3.1.xip). + +This file is many gigabytes in size, but most (but not all) of what we need is +contained only in a single directory: + +```bash +Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk +``` + +See the SDK Extraction notes above for how to obtain it. + +The Gitian descriptors build 2 sets of files: Linux tools, then Apple binaries which are +created using these tools. The build process has been designed to avoid including the +SDK's files in Gitian's outputs. All interim tarballs are fully deterministic and may be freely +redistributed. + +`genisoimage` is used to create the initial DMG. It is not deterministic as-is, so it has been +patched. A system `genisoimage` will work fine, but it will not be deterministic because +the file-order will change between invocations. The patch can be seen here: [cdrkit-deterministic.patch](https://github.com/bitcoin/bitcoin/blob/master/depends/patches/native_cdrkit/cdrkit-deterministic.patch). +No effort was made to fix this cleanly, so it likely leaks memory badly, however it's only used for +a single invocation, so that's no real concern. + +`genisoimage` cannot compress DMGs, so afterwards, the DMG tool from the +`libdmg-hfsplus` project is used to compress it. There are several bugs in this tool and its +maintainer has seemingly abandoned the project. + +The DMG tool has the ability to create DMGs from scratch as well, but this functionality is +broken. Only the compression feature is currently used. Ideally, the creation could be fixed +and `genisoimage` would no longer be necessary. + +Background images and other features can be added to DMG files by inserting a +`.DS_Store` during creation. + +As of OS X 10.9 Mavericks, using an Apple-blessed key to sign binaries is a requirement in +order to satisfy the new Gatekeeper requirements. Because this private key cannot be +shared, we'll have to be a bit creative in order for the build process to remain somewhat +deterministic. Here's how it works: + +- Builders use Gitian to create an unsigned release. This outputs an unsigned DMG which + users may choose to bless and run. It also outputs an unsigned app structure in the form + of a tarball, which also contains all of the tools that have been previously (deterministically) + built in order to create a final DMG. +- The Apple keyholder uses this unsigned app to create a detached signature, using the + script that is also included there. Detached signatures are available from this [repository](https://github.com/bitcoin-core/bitcoin-detached-sigs). +- Builders feed the unsigned app + detached signature back into Gitian. It uses the + pre-built tools to recombine the pieces into a deterministic DMG. diff --git a/contrib/macdeploy/custom_dsstore.py b/contrib/macdeploy/custom_dsstore.py deleted file mode 100755 index 733220a726..0000000000 --- a/contrib/macdeploy/custom_dsstore.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2013-2018 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. -import biplist -from ds_store import DSStore -from mac_alias import Alias -import sys - -output_file = sys.argv[1] -package_name_ns = sys.argv[2] - -ds = DSStore.open(output_file, 'w+') -ds['.']['bwsp'] = { - 'ShowStatusBar': False, - 'WindowBounds': '{{300, 280}, {500, 343}}', - 'ContainerShowSidebar': False, - 'SidebarWidth': 0, - 'ShowTabView': False, - 'PreviewPaneVisibility': False, - 'ShowToolbar': False, - 'ShowSidebar': False, - 'ShowPathbar': True -} - -icvp = { - 'gridOffsetX': 0.0, - 'textSize': 12.0, - 'viewOptionsVersion': 1, - 'backgroundImageAlias': b'\x00\x00\x00\x00\x02\x1e\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd1\x94\\\xb0H+\x00\x05\x00\x00\x00\x98\x0fbackground.tiff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\xd19\xb0\xf8\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\r\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b.background\x00\x00\x10\x00\x08\x00\x00\xd1\x94\\\xb0\x00\x00\x00\x11\x00\x08\x00\x00\xd19\xb0\xf8\x00\x00\x00\x01\x00\x04\x00\x00\x00\x98\x00\x0e\x00 \x00\x0f\x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00.\x00t\x00i\x00f\x00f\x00\x0f\x00\x02\x00\x00\x00\x12\x00\x1c/.background/background.tiff\x00\x14\x01\x06\x00\x00\x00\x00\x01\x06\x00\x02\x00\x00\x0cMacintosh HD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\x97\xab\xc3H+\x00\x00\x01\x88[\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02u\xab\x8d\xd1\x94\\\xb0devrddsk\xff\xff\xff\xff\x00\x00\t \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07BGL\x00\x00\x10\x00\x08\x00\x00\xce\x97\xab\xc3\x00\x00\x00\x11\x00\x08\x00\x00\xd1\x94\\\xb0\x00\x00\x00\x01\x00\x14\x01\x88[\x88\x00\x16\xa9\t\x00\x08\xfaR\x00\x08\xfaQ\x00\x02d\x8e\x00\x0e\x00\x02\x00\x00\x00\x0f\x00\x1a\x00\x0c\x00M\x00a\x00c\x00i\x00n\x00t\x00o\x00s\x00h\x00 \x00H\x00D\x00\x13\x00\x01/\x00\x00\x15\x00\x02\x00\x14\xff\xff\x00\x00\xff\xff\x00\x00', - 'backgroundColorBlue': 1.0, - 'iconSize': 96.0, - 'backgroundColorGreen': 1.0, - 'arrangeBy': 'none', - 'showIconPreview': True, - 'gridSpacing': 100.0, - 'gridOffsetY': 0.0, - 'showItemInfo': False, - 'labelOnBottom': True, - 'backgroundType': 2, - 'backgroundColorRed': 1.0 -} -alias = Alias.from_bytes(icvp['backgroundImageAlias']) -alias.volume.name = package_name_ns -alias.volume.posix_path = '/Volumes/' + package_name_ns -alias.volume.disk_image_alias.target.filename = package_name_ns + '.temp.dmg' -alias.volume.disk_image_alias.target.carbon_path = 'Macintosh HD:Users:\x00BGLuser:\x00Documents:\x00BGL:\x00BGL:\x00' + package_name_ns + '.temp.dmg' -alias.volume.disk_image_alias.target.posix_path = 'Users/BGLuser/Documents/BGL/BGL/' + package_name_ns + '.temp.dmg' -alias.target.carbon_path = package_name_ns + ':.background:\x00background.tiff' -icvp['backgroundImageAlias'] = biplist.Data(alias.to_bytes()) -ds['.']['icvp'] = icvp - -ds['.']['vSrn'] = ('long', 1) - -ds['Applications']['Iloc'] = (370, 156) -ds['BGL-Qt.app']['Iloc'] = (128, 156) - -ds.flush() -ds.close() diff --git a/contrib/macdeploy/detached-sig-apply.sh b/contrib/macdeploy/detached-sig-apply.sh index af2b11fa0d..5c5a85d3fe 100755 --- a/contrib/macdeploy/detached-sig-apply.sh +++ b/contrib/macdeploy/detached-sig-apply.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2014-2015 The Bitcoin Core developers +# Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/contrib/macdeploy/detached-sig-create.sh b/contrib/macdeploy/detached-sig-create.sh index 24d2ea7559..86b941ce37 100755 --- a/contrib/macdeploy/detached-sig-create.sh +++ b/contrib/macdeploy/detached-sig-create.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2014-2015 The Bitcoin Core developers +# Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/contrib/macdeploy/extract-osx-sdk.sh b/contrib/macdeploy/extract-osx-sdk.sh index 4c175156f4..3c7bdf4217 100755 --- a/contrib/macdeploy/extract-osx-sdk.sh +++ b/contrib/macdeploy/extract-osx-sdk.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2016 The Bitcoin Core developers +# Copyright (c) 2016-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/contrib/macdeploy/gen-sdk b/contrib/macdeploy/gen-sdk new file mode 100755 index 0000000000..457d8f5e64 --- /dev/null +++ b/contrib/macdeploy/gen-sdk @@ -0,0 +1,94 @@ +#!/usr/bin/env python3 +import argparse +import plistlib +import pathlib +import sys +import tarfile +import gzip +import os +import contextlib + +@contextlib.contextmanager +def cd(path): + """Context manager that restores PWD even if an exception was raised.""" + old_pwd = os.getcwd() + os.chdir(str(path)) + try: + yield + finally: + os.chdir(old_pwd) + +def run(): + parser = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.RawTextHelpFormatter) + + parser.add_argument('xcode_app', metavar='XCODEAPP', nargs=1) + parser.add_argument("-o", metavar='OUTSDKTGZ', nargs=1, dest='out_sdktgz', required=False) + + args = parser.parse_args() + + xcode_app = pathlib.Path(args.xcode_app[0]).resolve() + assert xcode_app.is_dir(), "The supplied Xcode.app path '{}' either does not exist or is not a directory".format(xcode_app) + + xcode_app_plist = xcode_app.joinpath("Contents/version.plist") + with xcode_app_plist.open('rb') as fp: + pl = plistlib.load(fp) + xcode_version = pl['CFBundleShortVersionString'] + xcode_build_id = pl['ProductBuildVersion'] + print("Found Xcode (version: {xcode_version}, build id: {xcode_build_id})".format(xcode_version=xcode_version, xcode_build_id=xcode_build_id)) + + sdk_dir = xcode_app.joinpath("Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk") + sdk_plist = sdk_dir.joinpath("System/Library/CoreServices/SystemVersion.plist") + with sdk_plist.open('rb') as fp: + pl = plistlib.load(fp) + sdk_version = pl['ProductVersion'] + sdk_build_id = pl['ProductBuildVersion'] + print("Found MacOSX SDK (version: {sdk_version}, build id: {sdk_build_id})".format(sdk_version=sdk_version, sdk_build_id=sdk_build_id)) + + out_name = "Xcode-{xcode_version}-{xcode_build_id}-extracted-SDK-with-libcxx-headers".format(xcode_version=xcode_version, xcode_build_id=xcode_build_id) + + xcode_libcxx_dir = xcode_app.joinpath("Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1") + assert xcode_libcxx_dir.is_dir() + + if args.out_sdktgz: + out_sdktgz_path = pathlib.Path(args.out_sdktgz_path) + else: + # Construct our own out_sdktgz if not specified on the command line + out_sdktgz_path = pathlib.Path("./{}.tar.gz".format(out_name)) + + def tarfp_add_with_base_change(tarfp, dir_to_add, alt_base_dir): + """Add all files in dir_to_add to tarfp, but prepent MEMBERPREFIX to the files' + names + + e.g. if the only file under /root/bazdir is /root/bazdir/qux, invoking: + + tarfp_add_with_base_change(tarfp, "foo/bar", "/root/bazdir") + + would result in the following members being added to tarfp: + + foo/bar/ -> corresponding to /root/bazdir + foo/bar/qux -> corresponding to /root/bazdir/qux + + """ + def change_tarinfo_base(tarinfo): + if tarinfo.name and tarinfo.name.startswith("./"): + tarinfo.name = str(pathlib.Path(alt_base_dir, tarinfo.name)) + if tarinfo.linkname and tarinfo.linkname.startswith("./"): + tarinfo.linkname = str(pathlib.Path(alt_base_dir, tarinfo.linkname)) + return tarinfo + with cd(dir_to_add): + tarfp.add(".", recursive=True, filter=change_tarinfo_base) + + print("Creating output .tar.gz file...") + with out_sdktgz_path.open("wb") as fp: + with gzip.GzipFile(fileobj=fp, compresslevel=9, mtime=0) as gzf: + with tarfile.open(mode="w", fileobj=gzf) as tarfp: + print("Adding MacOSX SDK {} files...".format(sdk_version)) + tarfp_add_with_base_change(tarfp, sdk_dir, out_name) + print("Adding libc++ headers...") + tarfp_add_with_base_change(tarfp, xcode_libcxx_dir, "{}/usr/include/c++/v1".format(out_name)) + print("Done! Find the resulting gzipped tarball at:") + print(out_sdktgz_path.resolve()) + +if __name__ == '__main__': + run() diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus index 7581b3ef77..36d1965f33 100755 --- a/contrib/macdeploy/macdeployqtplus +++ b/contrib/macdeploy/macdeployqtplus @@ -16,9 +16,13 @@ # along with this program. If not, see . # -import subprocess, sys, re, os, shutil, stat, os.path, time -from string import Template +import plistlib +import sys, re, os, shutil, stat, os.path from argparse import ArgumentParser +from ds_store import DSStore +from mac_alias import Alias +from pathlib import Path +from subprocess import PIPE, run from typing import List, Optional # This is ported from the original macdeployqt with modifications @@ -49,28 +53,18 @@ class FrameworkInfo(object): return False def __str__(self): - return """ Framework name: {} - Framework directory: {} - Framework path: {} - Binary name: {} - Binary directory: {} - Binary path: {} - Version: {} - Install name: {} - Deployed install name: {} - Source file Path: {} - Deployed Directory (relative to bundle): {} -""".format(self.frameworkName, - self.frameworkDirectory, - self.frameworkPath, - self.binaryName, - self.binaryDirectory, - self.binaryPath, - self.version, - self.installName, - self.deployedInstallName, - self.sourceFilePath, - self.destinationDirectory) + return f""" Framework name: {frameworkName} + Framework directory: {self.frameworkDirectory} + Framework path: {self.frameworkPath} + Binary name: {self.binaryName} + Binary directory: {self.binaryDirectory} + Binary path: {self.binaryPath} + Version: {self.version} + Install name: {self.installName} + Deployed install name: {self.deployedInstallName} + Source file Path: {self.sourceFilePath} + Deployed Directory (relative to bundle): {self.destinationDirectory} +""" def isDylib(self): return self.frameworkName.endswith(".dylib") @@ -97,7 +91,7 @@ class FrameworkInfo(object): m = cls.reOLine.match(line) if m is None: - raise RuntimeError("otool line could not be parsed: " + line) + raise RuntimeError(f"otool line could not be parsed: {line}") path = m.group(1) @@ -117,7 +111,7 @@ class FrameworkInfo(object): info.version = "-" info.installName = path - info.deployedInstallName = "@executable_path/../Frameworks/" + info.binaryName + info.deployedInstallName = f"@executable_path/../Frameworks/{info.binaryName}" info.sourceFilePath = path info.destinationDirectory = cls.bundleFrameworkDirectory else: @@ -129,7 +123,7 @@ class FrameworkInfo(object): break i += 1 if i == len(parts): - raise RuntimeError("Could not find .framework or .dylib in otool line: " + line) + raise RuntimeError(f"Could not find .framework or .dylib in otool line: {line}") info.frameworkName = parts[i] info.frameworkDirectory = "/".join(parts[:i]) @@ -140,7 +134,7 @@ class FrameworkInfo(object): info.binaryPath = os.path.join(info.binaryDirectory, info.binaryName) info.version = parts[i+2] - info.deployedInstallName = "@executable_path/../Frameworks/" + os.path.join(info.frameworkName, info.binaryPath) + info.deployedInstallName = f"@executable_path/../Frameworks/{os.path.join(info.frameworkName, info.binaryPath)}" info.destinationDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, info.binaryDirectory) info.sourceResourcesDirectory = os.path.join(info.frameworkPath, "Resources") @@ -154,10 +148,10 @@ class FrameworkInfo(object): class ApplicationBundleInfo(object): def __init__(self, path: str): self.path = path - appName = "BGL-Qt" - self.binaryPath = os.path.join(path, "Contents", "MacOS", appName) + # for backwards compatibility reasons, this must remain as BGL-Qt + self.binaryPath = os.path.join(path, "Contents", "MacOS", "BGL-Qt") if not os.path.exists(self.binaryPath): - raise RuntimeError("Could not find bundle binary for " + path) + raise RuntimeError(f"Could not find bundle binary for {path}") self.resourcesPath = os.path.join(path, "Contents", "Resources") self.pluginPath = os.path.join(path, "Contents", "PlugIns") @@ -181,30 +175,26 @@ class DeploymentInfo(object): self.pluginPath = pluginPath def usesFramework(self, name: str) -> bool: - nameDot = "{}.".format(name) - libNameDot = "lib{}.".format(name) for framework in self.deployedFrameworks: if framework.endswith(".framework"): - if framework.startswith(nameDot): + if framework.startswith(f"{name}."): return True elif framework.endswith(".dylib"): - if framework.startswith(libNameDot): + if framework.startswith(f"lib{name}."): return True return False def getFrameworks(binaryPath: str, verbose: int) -> List[FrameworkInfo]: - if verbose >= 3: - print("Inspecting with otool: " + binaryPath) + if verbose: + print(f"Inspecting with otool: {binaryPath}") otoolbin=os.getenv("OTOOL", "otool") - otool = subprocess.Popen([otoolbin, "-L", binaryPath], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) - o_stdout, o_stderr = otool.communicate() + otool = run([otoolbin, "-L", binaryPath], stdout=PIPE, stderr=PIPE, universal_newlines=True) if otool.returncode != 0: - if verbose >= 1: - sys.stderr.write(o_stderr) - sys.stderr.flush() - raise RuntimeError("otool failed with return code {}".format(otool.returncode)) + sys.stderr.write(otool.stderr) + sys.stderr.flush() + raise RuntimeError(f"otool failed with return code {otool.returncode}") - otoolLines = o_stdout.split("\n") + otoolLines = otool.stdout.split("\n") otoolLines.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. @@ -214,7 +204,7 @@ def getFrameworks(binaryPath: str, verbose: int) -> List[FrameworkInfo]: line = line.replace("@loader_path", os.path.dirname(binaryPath)) info = FrameworkInfo.fromOtoolLibraryLine(line.strip()) if info is not None: - if verbose >= 3: + if verbose: print("Found framework:") print(info) libraries.append(info) @@ -223,10 +213,10 @@ def getFrameworks(binaryPath: str, verbose: int) -> List[FrameworkInfo]: def runInstallNameTool(action: str, *args): installnametoolbin=os.getenv("INSTALLNAMETOOL", "install_name_tool") - subprocess.check_call([installnametoolbin, "-"+action] + list(args)) + run([installnametoolbin, "-"+action] + list(args), check=True) def changeInstallName(oldName: str, newName: str, binaryPath: str, verbose: int): - if verbose >= 3: + if verbose: print("Using install_name_tool:") print(" in", binaryPath) print(" change reference", oldName) @@ -234,7 +224,7 @@ def changeInstallName(oldName: str, newName: str, binaryPath: str, verbose: int) runInstallNameTool("change", oldName, newName, binaryPath) def changeIdentification(id: str, binaryPath: str, verbose: int): - if verbose >= 3: + if verbose: print("Using install_name_tool:") print(" change identification in", binaryPath) print(" to", id) @@ -242,22 +232,22 @@ def changeIdentification(id: str, binaryPath: str, verbose: int): def runStrip(binaryPath: str, verbose: int): stripbin=os.getenv("STRIP", "strip") - if verbose >= 3: + if verbose: print("Using strip:") print(" stripped", binaryPath) - subprocess.check_call([stripbin, "-x", binaryPath]) + run([stripbin, "-x", binaryPath], check=True) def copyFramework(framework: FrameworkInfo, path: str, verbose: int) -> Optional[str]: if framework.sourceFilePath.startswith("Qt"): #standard place for Nokia Qt installer's frameworks - fromPath = "/Library/Frameworks/" + framework.sourceFilePath + fromPath = f"/Library/Frameworks/{framework.sourceFilePath}" else: fromPath = framework.sourceFilePath toDir = os.path.join(path, framework.destinationDirectory) toPath = os.path.join(toDir, framework.binaryName) if not os.path.exists(fromPath): - raise RuntimeError("No file at " + fromPath) + raise RuntimeError(f"No file at {fromPath}") if os.path.exists(toPath): return None # Already there @@ -266,7 +256,7 @@ def copyFramework(framework: FrameworkInfo, path: str, verbose: int) -> Optional os.makedirs(toDir) shutil.copy2(fromPath, toPath) - if verbose >= 3: + if verbose: print("Copied:", fromPath) print(" to:", toPath) @@ -280,13 +270,12 @@ def copyFramework(framework: FrameworkInfo, path: str, verbose: int) -> Optional linkto = framework.version if not os.path.exists(linkfrom): os.symlink(linkto, linkfrom) - if verbose >= 2: - print("Linked:", linkfrom, "->", linkto) + print("Linked:", linkfrom, "->", linkto) fromResourcesDir = framework.sourceResourcesDirectory if os.path.exists(fromResourcesDir): toResourcesDir = os.path.join(path, framework.destinationResourcesDirectory) shutil.copytree(fromResourcesDir, toResourcesDir, symlinks=True) - if verbose >= 3: + if verbose: print("Copied resources:", fromResourcesDir) print(" to:", toResourcesDir) fromContentsDir = framework.sourceVersionContentsDirectory @@ -295,7 +284,7 @@ def copyFramework(framework: FrameworkInfo, path: str, verbose: int) -> Optional if os.path.exists(fromContentsDir): toContentsDir = os.path.join(path, framework.destinationVersionContentsDirectory) shutil.copytree(fromContentsDir, toContentsDir, symlinks=True) - if verbose >= 3: + if verbose: print("Copied Contents:", fromContentsDir) print(" to:", toContentsDir) elif framework.frameworkName.startswith("libQtGui"): # Copy qt_menu.nib (applies to non-framework layout) @@ -303,7 +292,7 @@ def copyFramework(framework: FrameworkInfo, path: str, verbose: int) -> Optional qtMenuNibDestinationPath = os.path.join(path, "Contents", "Resources", "qt_menu.nib") if os.path.exists(qtMenuNibSourcePath) and not os.path.exists(qtMenuNibDestinationPath): shutil.copytree(qtMenuNibSourcePath, qtMenuNibDestinationPath, symlinks=True) - if verbose >= 3: + if verbose: print("Copied for libQtGui:", qtMenuNibSourcePath) print(" to:", qtMenuNibDestinationPath) @@ -317,16 +306,14 @@ def deployFrameworks(frameworks: List[FrameworkInfo], bundlePath: str, binaryPat framework = frameworks.pop(0) deploymentInfo.deployedFrameworks.append(framework.frameworkName) - if verbose >= 2: - print("Processing", framework.frameworkName, "...") + print("Processing", framework.frameworkName, "...") # Get the Qt path from one of the Qt frameworks if deploymentInfo.qtPath is None and framework.isQtFramework(): deploymentInfo.detectQtPath(framework.frameworkDirectory) if framework.installName.startswith("@executable_path") or framework.installName.startswith(bundlePath): - if verbose >= 2: - print(framework.frameworkName, "already deployed, skipping.") + print(framework.frameworkName, "already deployed, skipping.") continue # install_name_tool the new id into the binary @@ -357,8 +344,8 @@ def deployFrameworks(frameworks: List[FrameworkInfo], bundlePath: str, binaryPat def deployFrameworksForAppBundle(applicationBundle: ApplicationBundleInfo, strip: bool, verbose: int) -> DeploymentInfo: frameworks = getFrameworks(applicationBundle.binaryPath, verbose) - if len(frameworks) == 0 and verbose >= 1: - print("Warning: Could not find any external frameworks to deploy in {}.".format(applicationBundle.path)) + if len(frameworks) == 0: + print(f"Warning: Could not find any external frameworks to deploy in {applicationBundle.path}.") return DeploymentInfo() else: return deployFrameworks(frameworks, applicationBundle.path, applicationBundle.binaryPath, strip, verbose) @@ -477,8 +464,7 @@ def deployPlugins(appBundleInfo: ApplicationBundleInfo, deploymentInfo: Deployme plugins.append((pluginDirectory, pluginName)) for pluginDirectory, pluginName in plugins: - if verbose >= 2: - print("Processing plugin", os.path.join(pluginDirectory, pluginName), "...") + print("Processing plugin", os.path.join(pluginDirectory, pluginName), "...") sourcePath = os.path.join(deploymentInfo.pluginPath, pluginDirectory, pluginName) destinationDirectory = os.path.join(appBundleInfo.pluginPath, pluginDirectory) @@ -487,7 +473,7 @@ def deployPlugins(appBundleInfo: ApplicationBundleInfo, deploymentInfo: Deployme destinationPath = os.path.join(destinationDirectory, pluginName) shutil.copy2(sourcePath, destinationPath) - if verbose >= 3: + if verbose: print("Copied:", sourcePath) print(" to:", destinationPath) @@ -503,68 +489,37 @@ def deployPlugins(appBundleInfo: ApplicationBundleInfo, deploymentInfo: Deployme if dependency.frameworkName not in deploymentInfo.deployedFrameworks: deployFrameworks([dependency], appBundleInfo.path, destinationPath, strip, verbose, deploymentInfo) -qt_conf="""[Paths] -Translations=Resources -Plugins=PlugIns -""" - ap = ArgumentParser(description="""Improved version of macdeployqt. Outputs a ready-to-deploy app in a folder "dist" and optionally wraps it in a .dmg file. Note, that the "dist" folder will be deleted before deploying on each run. -Optionally, Qt translation files (.qm) and additional resources can be added to the bundle. - -Also optionally signs the .app bundle; set the CODESIGNARGS environment variable to pass arguments -to the codesign tool. -E.g. CODESIGNARGS='--sign "Developer ID Application: ..." --keychain /encrypted/foo.keychain'""") +Optionally, Qt translation files (.qm) can be added to the bundle.""") ap.add_argument("app_bundle", nargs=1, metavar="app-bundle", help="application bundle to be deployed") -ap.add_argument("-verbose", type=int, nargs=1, default=[1], metavar="<0-3>", help="0 = no output, 1 = error/warning (default), 2 = normal, 3 = debug") +ap.add_argument("appname", nargs=1, metavar="appname", help="name of the app being deployed") +ap.add_argument("-verbose", nargs="?", const=True, help="Output additional debugging information") ap.add_argument("-no-plugins", dest="plugins", action="store_false", default=True, help="skip plugin deployment") ap.add_argument("-no-strip", dest="strip", action="store_false", default=True, help="don't run 'strip' on the binaries") -ap.add_argument("-sign", dest="sign", action="store_true", default=False, help="sign .app bundle with codesign tool") -ap.add_argument("-dmg", nargs="?", const="", metavar="basename", help="create a .dmg disk image; if basename is not specified, a camel-cased version of the app name is used") -ap.add_argument("-fancy", nargs=1, metavar="plist", default=[], help="make a fancy looking disk image using the given plist file with instructions; requires -dmg to work") -ap.add_argument("-add-qt-tr", nargs=1, metavar="languages", default=[], help="add Qt translation files to the bundle's resources; the language list must be separated with commas, not with whitespace") -ap.add_argument("-translations-dir", nargs=1, metavar="path", default=None, help="Path to Qt's translation files") -ap.add_argument("-add-resources", nargs="+", metavar="path", default=[], help="list of additional files or folders to be copied into the bundle's resources; must be the last argument") +ap.add_argument("-dmg", nargs="?", const="", metavar="basename", help="create a .dmg disk image") +ap.add_argument("-translations-dir", nargs=1, metavar="path", default=None, help="Path to Qt's translations. Base translations will automatically be added to the bundle's resources.") ap.add_argument("-volname", nargs=1, metavar="volname", default=[], help="custom volume name for dmg") config = ap.parse_args() -verbose = config.verbose[0] +verbose = config.verbose # ------------------------------------------------ app_bundle = config.app_bundle[0] +appname = config.appname[0] if not os.path.exists(app_bundle): - if verbose >= 1: - sys.stderr.write("Error: Could not find app bundle \"{}\"\n".format(app_bundle)) + sys.stderr.write(f"Error: Could not find app bundle \"{app_bundle}\"\n") sys.exit(1) app_bundle_name = os.path.splitext(os.path.basename(app_bundle))[0] -# ------------------------------------------------ -translations_dir = None -if config.translations_dir and config.translations_dir[0]: - if os.path.exists(config.translations_dir[0]): - translations_dir = config.translations_dir[0] - else: - if verbose >= 1: - sys.stderr.write("Error: Could not find translation dir \"{}\"\n".format(translations_dir)) - sys.exit(1) -# ------------------------------------------------ - -for p in config.add_resources: - if verbose >= 3: - print("Checking for \"%s\"..." % p) - if not os.path.exists(p): - if verbose >= 1: - sys.stderr.write("Error: Could not find additional resource file \"{}\"\n".format(p)) - sys.exit(1) - # ------------------------------------------------ if len(config.fancy) == 1: @@ -586,7 +541,8 @@ if len(config.fancy) == 1: sys.exit(1) try: - fancy = plistlib.readPlist(p) + with open(p, 'rb') as fp: + fancy = plistlib.load(fp, fmt=plistlib.FMT_XML) except: if verbose >= 1: sys.stderr.write("Error: Could not parse fancy disk image plist at \"{}\"\n".format(p)) @@ -624,25 +580,19 @@ else: # ------------------------------------------------ if os.path.exists("dist"): - if verbose >= 2: - print("+ Removing old dist folder +") - + print("+ Removing existing dist folder +") shutil.rmtree("dist") -# ------------------------------------------------ - -if len(config.volname) == 1: - volname = config.volname[0] -else: - volname = app_bundle_name +if os.path.exists(appname + ".dmg"): + print("+ Removing existing DMG +") + os.unlink(appname + ".dmg") # ------------------------------------------------ target = os.path.join("dist", "BGL-Qt.app") -if verbose >= 2: - print("+ Copying source bundle +") -if verbose >= 3: +print("+ Copying source bundle +") +if verbose: print(app_bundle, "->", target) os.mkdir("dist") @@ -652,257 +602,110 @@ applicationBundle = ApplicationBundleInfo(target) # ------------------------------------------------ -if verbose >= 2: - print("+ Deploying frameworks +") +print("+ Deploying frameworks +") try: deploymentInfo = deployFrameworksForAppBundle(applicationBundle, config.strip, verbose) if deploymentInfo.qtPath is None: deploymentInfo.qtPath = os.getenv("QTDIR", None) if deploymentInfo.qtPath is None: - if verbose >= 1: - sys.stderr.write("Warning: Could not detect Qt's path, skipping plugin deployment!\n") + sys.stderr.write("Warning: Could not detect Qt's path, skipping plugin deployment!\n") config.plugins = False except RuntimeError as e: - if verbose >= 1: - sys.stderr.write("Error: {}\n".format(str(e))) + sys.stderr.write(f"Error: {str(e)}\n") sys.exit(1) # ------------------------------------------------ if config.plugins: - if verbose >= 2: - print("+ Deploying plugins +") + print("+ Deploying plugins +") try: deployPlugins(applicationBundle, deploymentInfo, config.strip, verbose) except RuntimeError as e: - if verbose >= 1: - sys.stderr.write("Error: {}\n".format(str(e))) + sys.stderr.write(f"Error: {str(e)}\n") sys.exit(1) # ------------------------------------------------ -if len(config.add_qt_tr) == 0: - add_qt_tr = [] -else: - if translations_dir is not None: - qt_tr_dir = translations_dir - else: - if deploymentInfo.qtPath is not None: - qt_tr_dir = os.path.join(deploymentInfo.qtPath, "translations") - else: - sys.stderr.write("Error: Could not find Qt translation path\n") - sys.exit(1) - add_qt_tr = ["qt_{}.qm".format(lng) for lng in config.add_qt_tr[0].split(",")] - for lng_file in add_qt_tr: - p = os.path.join(qt_tr_dir, lng_file) - if verbose >= 3: - print("Checking for \"{}\"...".format(p)) - if not os.path.exists(p): - if verbose >= 1: - sys.stderr.write("Error: Could not find Qt translation file \"{}\"\n".format(lng_file)) - sys.exit(1) +if config.translations_dir: + if not Path(config.translations_dir[0]).exists(): + sys.stderr.write(f"Error: Could not find translation dir \"{config.translations_dir[0]}\"\n") + sys.exit(1) + +print("+ Adding Qt translations +") + +translations = Path(config.translations_dir[0]) + +regex = re.compile('qt_[a-z]*(.qm|_[A-Z]*.qm)') + +lang_files = [x for x in translations.iterdir() if regex.match(x.name)] + +for file in lang_files: + if verbose: + print(file.as_posix(), "->", os.path.join(applicationBundle.resourcesPath, file.name)) + shutil.copy2(file.as_posix(), os.path.join(applicationBundle.resourcesPath, file.name)) # ------------------------------------------------ -if verbose >= 2: - print("+ Installing qt.conf +") +print("+ Installing qt.conf +") + +qt_conf="""[Paths] +Translations=Resources +Plugins=PlugIns +""" with open(os.path.join(applicationBundle.resourcesPath, "qt.conf"), "wb") as f: f.write(qt_conf.encode()) # ------------------------------------------------ -if len(add_qt_tr) > 0 and verbose >= 2: - print("+ Adding Qt translations +") +if config.dmg is not None: -for lng_file in add_qt_tr: - if verbose >= 3: - print(os.path.join(qt_tr_dir, lng_file), "->", os.path.join(applicationBundle.resourcesPath, lng_file)) - shutil.copy2(os.path.join(qt_tr_dir, lng_file), os.path.join(applicationBundle.resourcesPath, lng_file)) + print("+ Preparing .dmg disk image +") -# ------------------------------------------------ + if verbose: + print("Determining size of \"dist\"...") + size = 0 + for path, dirs, files in os.walk("dist"): + for file in files: + size += os.path.getsize(os.path.join(path, file)) + size += int(size * 0.15) -if len(config.add_resources) > 0 and verbose >= 2: - print("+ Adding additional resources +") + if verbose: + print("Creating temp image for modification...") -for p in config.add_resources: - t = os.path.join(applicationBundle.resourcesPath, os.path.basename(p)) - if verbose >= 3: - print(p, "->", t) - if os.path.isdir(p): - shutil.copytree(p, t, symlinks=True) - else: - shutil.copy2(p, t) + tempname = appname + ".temp.dmg" -# ------------------------------------------------ + run(["hdiutil", "create", tempname, "-srcfolder", "dist", "-format", "UDRW", "-size", str(size), "-volname", appname], check=True, universal_newlines=True) -if config.sign and 'CODESIGNARGS' not in os.environ: - print("You must set the CODESIGNARGS environment variable. Skipping signing.") -elif config.sign: - if verbose >= 1: - print("Code-signing app bundle {}".format(target)) - subprocess.check_call("codesign --force {} {}".format(os.environ['CODESIGNARGS'], target), shell=True) + if verbose: + print("Attaching temp image...") + output = run(["hdiutil", "attach", tempname, "-readwrite"], check=True, universal_newlines=True, stdout=PIPE).stdout -# ------------------------------------------------ + m = re.search(r"/Volumes/(.+$)", output) + disk_root = m.group(0) -if config.dmg is not None: + print("+ Applying fancy settings +") - def runHDIUtil(verb: str, image_basename: str, **kwargs) -> int: - hdiutil_args = ["hdiutil", verb, image_basename + ".dmg"] - if "capture_stdout" in kwargs: - del kwargs["capture_stdout"] - run = subprocess.check_output - else: - if verbose < 2: - hdiutil_args.append("-quiet") - elif verbose >= 3: - hdiutil_args.append("-verbose") - run = subprocess.check_call - - for key, value in kwargs.items(): - hdiutil_args.append("-" + key) - if value is not True: - hdiutil_args.append(str(value)) - - return run(hdiutil_args, universal_newlines=True) - - if verbose >= 2: - if fancy is None: - print("+ Creating .dmg disk image +") - else: - print("+ Preparing .dmg disk image +") - - if config.dmg != "": - dmg_name = config.dmg - else: - spl = app_bundle_name.split(" ") - dmg_name = spl[0] + "".join(p.capitalize() for p in spl[1:]) - - if fancy is None: - try: - runHDIUtil("create", dmg_name, srcfolder="dist", format="UDBZ", volname=volname, ov=True) - except subprocess.CalledProcessError as e: - sys.exit(e.returncode) - else: - if verbose >= 3: - print("Determining size of \"dist\"...") - size = 0 - for path, dirs, files in os.walk("dist"): - for file in files: - size += os.path.getsize(os.path.join(path, file)) - size += int(size * 0.15) - - if verbose >= 3: - print("Creating temp image for modification...") - try: - runHDIUtil("create", dmg_name + ".temp", srcfolder="dist", format="UDRW", size=size, volname=volname, ov=True) - except subprocess.CalledProcessError as e: - sys.exit(e.returncode) - - if verbose >= 3: - print("Attaching temp image...") - try: - output = runHDIUtil("attach", dmg_name + ".temp", readwrite=True, noverify=True, noautoopen=True, capture_stdout=True) - except subprocess.CalledProcessError as e: - sys.exit(e.returncode) - - m = re.search(r"/Volumes/(.+$)", output) - disk_root = m.group(0) - disk_name = m.group(1) - - if verbose >= 2: - print("+ Applying fancy settings +") - - if "background_picture" in fancy: - bg_path = os.path.join(disk_root, ".background", os.path.basename(fancy["background_picture"])) - os.mkdir(os.path.dirname(bg_path)) - if verbose >= 3: - print(fancy["background_picture"], "->", bg_path) - shutil.copy2(fancy["background_picture"], bg_path) - else: - bg_path = None - - if fancy.get("applications_symlink", False): - os.symlink("/Applications", os.path.join(disk_root, "Applications")) - - # The Python appscript package broke with OSX 10.8 and isn't being fixed. - # So we now build up an AppleScript string and use the osascript command - # to make the .dmg file pretty: - appscript = Template( """ - on run argv - tell application "Finder" - tell disk "$disk" - open - set current view of container window to icon view - set toolbar visible of container window to false - set statusbar visible of container window to false - set the bounds of container window to {$window_bounds} - set theViewOptions to the icon view options of container window - set arrangement of theViewOptions to not arranged - set icon size of theViewOptions to $icon_size - $background_commands - $items_positions - close -- close/reopen works around a bug... - open - update without registering applications - delay 5 - eject - end tell - end tell - end run - """) - - itemscript = Template('set position of item "${item}" of container window to {${position}}') - items_positions = [] - if "items_position" in fancy: - for name, position in fancy["items_position"].items(): - params = { "item" : name, "position" : ",".join([str(p) for p in position]) } - items_positions.append(itemscript.substitute(params)) - - params = { - "disk" : volname, - "window_bounds" : "300,300,800,620", - "icon_size" : "96", - "background_commands" : "", - "items_positions" : "\n ".join(items_positions) - } - if "window_bounds" in fancy: - params["window_bounds"] = ",".join([str(p) for p in fancy["window_bounds"]]) - if "icon_size" in fancy: - params["icon_size"] = str(fancy["icon_size"]) - if bg_path is not None: - # Set background file, then call SetFile to make it invisible. - # (note: making it invisible first makes set background picture fail) - bgscript = Template("""set background picture of theViewOptions to file ".background:$bgpic" - do shell script "SetFile -a V /Volumes/$disk/.background/$bgpic" """) - params["background_commands"] = bgscript.substitute({"bgpic" : os.path.basename(bg_path), "disk" : params["disk"]}) - - s = appscript.substitute(params) - if verbose >= 2: - print("Running AppleScript:") - print(s) - - p = subprocess.Popen(['osascript', '-'], stdin=subprocess.PIPE) - p.communicate(input=s.encode('utf-8')) - if p.returncode: - print("Error running osascript.") - - if verbose >= 2: - print("+ Finalizing .dmg disk image +") - time.sleep(5) - - try: - runHDIUtil("convert", dmg_name + ".temp", format="UDBZ", o=dmg_name + ".dmg", ov=True) - except subprocess.CalledProcessError as e: - sys.exit(e.returncode) - - os.unlink(dmg_name + ".temp.dmg") + bg_path = os.path.join(disk_root, ".background", os.path.basename('background.tiff')) + os.mkdir(os.path.dirname(bg_path)) + if verbose: + print('background.tiff', "->", bg_path) + shutil.copy2('background.tiff', bg_path) + + os.symlink("/Applications", os.path.join(disk_root, "Applications")) + + print("+ Finalizing .dmg disk image +") + + run(["hdiutil", "detach", "/Volumes/{}".format(appname)], universal_newlines=True) + + run(["hdiutil", "convert", tempname, "-format", "UDZO", "-o", appname, "-imagekey", "zlib-level=9"], check=True, universal_newlines=True) + + os.unlink(tempname) # ------------------------------------------------ -if verbose >= 2: - print("+ Done +") +print("+ Done +") sys.exit(0) diff --git a/contrib/qos/tc.sh b/contrib/qos/tc.sh index 7b8bd2c01c..253fd120e3 100644 --- a/contrib/qos/tc.sh +++ b/contrib/qos/tc.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2017 The Bitcoin Core developers +# Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/contrib/seeds/README.md b/contrib/seeds/README.md index 16602fee2e..fb5056e961 100644 --- a/contrib/seeds/README.md +++ b/contrib/seeds/README.md @@ -16,6 +16,12 @@ The seeds compiled into the release are created from sipa's DNS seed data, like ## Dependencies -Ubuntu: +Ubuntu, Debian: sudo apt-get install python3-dnspython + +and/or for other operating systems: + + pip install dnspython + +See https://dnspython.readthedocs.io/en/latest/installation.html for more information. diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py index 3fbe02e386..5731b1a287 100755 --- a/contrib/seeds/makeseeds.py +++ b/contrib/seeds/makeseeds.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2013-2018 The Bitcoin Core developers +# Copyright (c) 2013-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # @@ -19,13 +19,9 @@ # These are hosts that have been observed to be behaving strangely (e.g. # aggressively connecting to every node). -SUSPICIOUS_HOSTS = { - "130.211.129.106", "178.63.107.226", - "83.81.130.26", "88.198.17.7", "148.251.238.178", "176.9.46.6", - "54.173.72.127", "54.174.10.182", "54.183.64.54", "54.194.231.211", - "54.66.214.167", "54.66.220.137", "54.67.33.14", "54.77.251.214", - "54.94.195.96", "54.94.200.247" -} +with open("suspicious_hosts.txt", mode="r", encoding="utf-8") as f: + SUSPICIOUS_HOSTS = {s.strip() for s in f if s.strip()} + 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+)$") @@ -37,7 +33,8 @@ 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.99" + r"0.19.(0|1|99)|" + r"0.20.99" r")") def parseline(line): @@ -138,7 +135,7 @@ def lookup_asn(net, ip): ipaddr = res.rstrip('.') # 2.0.0.1.4.8.6.0.b.0.0.2.0.0.2.3 prefix = '.origin6' - asn = int([x.to_text() for x in dns.resolver.query('.'.join( + asn = int([x.to_text() for x in dns.resolver.resolve('.'.join( reversed(ipaddr.split('.'))) + prefix + '.asn.cymru.com', 'TXT').response.answer][0].split('\"')[1].split(' ')[0]) return asn diff --git a/contrib/seeds/nodes_main.txt b/contrib/seeds/nodes_main.txt index 1457caf0e6..75d0903006 100644 --- a/contrib/seeds/nodes_main.txt +++ b/contrib/seeds/nodes_main.txt @@ -1,645 +1,679 @@ -2.24.141.73:8333 +2.39.173.126:8333 +2.57.38.133:8333 +2.92.39.39:15426 +2.230.146.163:8333 +5.2.74.175:8333 5.8.18.29:8333 -5.43.228.99:8333 -5.145.10.122:8333 -5.166.35.47:8333 +5.39.222.39:8333 +5.103.137.146:9333 +5.128.87.126:8333 +5.149.250.76:8333 +5.182.39.200:8333 +5.187.55.242:8333 +5.188.62.24:8333 +5.188.62.33:8333 5.188.187.130:8333 +5.189.153.179:8333 +5.198.20.227:8333 5.199.133.193:8333 -5.206.226.216:8333 -5.206.226.231:8333 -13.92.254.226:8335 -13.125.188.128:8333 -18.228.144.20:8333 -23.175.0.200:8333 -23.226.90.172:8333 -23.233.107.28:8333 +5.254.82.130:8333 +13.237.147.15:8333 +18.27.79.17:8333 +20.184.15.116:8433 +23.17.160.159:8333 +23.175.0.212:8333 23.245.24.154:8333 -24.121.16.35:8333 -24.150.94.79:8333 -24.188.200.170:8333 +24.76.122.108:8333 +24.96.73.156:8333 +24.96.125.57:8333 +24.155.196.27:8333 +24.203.88.167:8333 +24.233.245.188:8333 24.246.31.205:8333 -27.102.102.157:8333 31.6.98.94:8333 -31.20.226.115:8333 -31.21.182.79:8333 +31.14.201.156:8333 +31.25.241.224:8335 31.43.140.190:8333 -31.132.135.134:8333 +31.134.121.223:8333 31.173.48.61:8333 -32.214.183.114:8333 -34.231.234.150:8333 -35.209.114.159:8333 -35.213.18.190:8333 -37.97.228.224:8333 -37.116.95.41:8333 -37.123.132.33:8333 -37.133.140.169:8334 -37.134.165.205:8333 -37.191.253.125:8333 -39.108.68.237:7781 -40.78.19.149:8333 -42.60.217.183:8333 +34.203.169.172:8333 +35.178.31.4:8333 +35.185.172.62:8333 +35.206.171.89:8333 +35.208.87.203:8333 +37.61.219.34:8333 +37.143.210.19:8333 +37.143.211.83:8333 +37.235.128.11:8333 +37.252.190.88:8333 +38.102.134.85:8333 +39.109.0.150:8333 +42.200.72.205:8333 43.229.132.102:8333 -45.58.126.138:8333 +45.36.184.6:8333 +45.58.49.35:8333 +45.76.18.47:8333 +45.115.239.108:8333 +46.23.87.218:8333 46.28.132.34:8333 +46.32.50.98:8333 +46.36.97.10:8333 +46.38.237.108:8333 +46.39.129.82:8333 +46.160.195.121:8333 46.166.162.45:20001 -46.166.176.137:8333 -46.227.68.104:8333 -46.227.68.105:8333 -47.74.32.190:8885 -47.89.19.134:30303 -47.97.117.250:8333 -50.2.13.166:8333 -50.5.163.139:8333 -50.34.65.217:8333 -50.66.209.54:8333 -50.67.179.36:8333 -51.15.166.138:8333 -51.15.239.164:8333 +46.188.30.118:8333 +46.229.238.187:8333 +46.254.217.169:8333 +47.52.114.198:8885 +47.88.84.126:8333 +47.108.29.152:8333 +47.108.30.165:8333 +47.222.103.234:8333 +49.245.50.224:8333 +50.53.250.162:8333 +50.225.198.67:6000 51.154.60.34:8333 -51.154.136.60:8333 -52.116.159.247:8333 -54.167.232.37:8333 -58.22.123.120:8333 +54.242.17.7:8333 +58.146.222.198:8333 58.158.0.86:8333 -62.45.159.66:8333 -62.75.191.166:8333 -62.75.210.81:8333 +59.149.205.197:8333 +60.251.129.61:8336 +61.155.5.4:8333 +62.45.4.139:8333 62.97.244.242:8333 -62.107.200.30:8333 +62.109.18.23:8333 +62.133.194.156:8333 62.138.0.217:8333 -62.213.214.207:8333 -64.98.18.21:8333 -65.79.145.209:8333 +62.152.58.16:9421 +63.143.34.98:8333 +63.211.111.122:8333 +63.224.249.240:8333 +64.182.119.36:8333 +64.229.105.111:8333 +65.27.104.112:8333 +65.183.76.73:8333 66.151.242.154:8335 -66.206.13.51:8333 -66.248.206.86:8333 -67.40.207.169:8333 -67.149.252.79:8333 -67.193.189.42:8333 +66.206.13.70:8333 +66.240.237.155:8333 +66.240.237.172:8333 +67.205.140.145:8333 67.210.228.203:8333 -67.220.22.78:8333 +67.221.193.55:8333 67.222.131.151:8333 -68.168.122.2:8333 +68.110.90.111:8333 +68.142.33.36:8333 +68.199.157.183:8333 68.202.128.19:8333 68.206.21.144:8333 69.30.215.42:8333 +69.55.234.74:8333 69.59.18.22:8333 -69.70.170.178:8333 -69.132.150.43:8333 69.145.122.160:8333 -70.26.149.104:8333 -70.51.142.43:8333 -70.63.170.86:8333 -71.57.73.173:8333 -71.237.255.140:8333 -72.24.235.10:8333 -72.95.104.94:8333 -72.231.187.25:8333 -72.253.239.246:8333 -74.78.140.178:8333 -74.83.234.97:8333 +69.175.49.230:8333 +70.64.48.41:8333 +71.33.232.126:8333 +71.73.18.32:8333 +71.146.114.111:8333 +72.53.134.182:8333 +73.126.97.99:8333 +74.83.126.150:8333 74.84.128.158:9333 -74.197.236.58:8333 -74.208.94.172:8333 +74.98.242.97:8333 +74.118.137.119:8333 74.220.255.190:8333 -75.101.96.6:8333 -75.157.77.34:8333 -76.93.183.209:8333 -76.174.129.203:8333 +75.45.51.41:8333 +75.158.39.231:8333 +76.11.17.187:8333 +76.84.79.211:8333 +76.167.179.75:8333 77.53.158.137:8333 -77.85.204.149:8333 -77.120.119.27:8433 -77.134.172.81:8333 -78.42.12.201:8333 -78.58.140.102:8333 -78.108.108.162:8333 -78.119.180.62:8333 +77.119.229.106:8333 +77.120.122.22:8433 +77.120.122.114:8433 +77.163.136.136:8333 +77.220.140.74:8333 +77.247.178.130:8333 78.128.62.52:8333 -78.130.148.218:8885 -78.130.161.76:8333 +78.128.79.22:8333 +78.141.123.99:8333 78.143.214.223:8333 -79.77.33.128:8333 +78.159.99.85:8333 +79.77.33.131:8333 +79.120.70.47:8333 +79.142.129.218:8333 79.175.125.210:8333 -79.175.154.228:8333 -80.79.114.34:8333 +80.47.156.43:8333 80.89.203.172:8001 -80.100.128.128:8333 -80.122.43.78:8333 -80.151.124.127:8333 -80.167.79.174:8333 +80.93.213.246:8333 +80.111.142.213:8333 +80.147.82.165:8333 80.211.191.11:8333 -80.229.151.187:8333 +80.211.245.151:8333 +80.229.28.60:8333 +80.229.168.1:8333 +80.253.94.252:8333 81.4.102.69:8333 -81.4.102.91:8333 -81.6.34.154:8333 -81.7.16.182:8333 -81.7.17.202:8333 -81.25.71.68:8444 +81.7.13.84:8333 +81.10.205.21:8333 +81.117.225.245:8333 +81.177.157.81:39993 81.235.185.150:8333 -82.23.106.56:8333 82.29.58.109:8333 82.117.166.77:8333 -82.145.41.24:8333 +82.118.20.37:8333 +82.146.50.143:8333 82.146.153.130:8333 82.149.97.25:17567 -82.150.180.30:8333 -82.177.176.24:8333 +82.169.130.61:8333 +82.181.179.230:8333 +82.181.218.229:8333 82.194.153.233:8333 -82.197.215.125:8333 +82.195.237.253:8333 82.197.218.97:8333 +82.199.102.10:8333 82.199.102.133:8333 -82.200.205.30:8333 +82.202.197.224:8333 +82.217.245.7:8333 82.221.111.136:8333 -83.32.70.197:8333 -83.58.134.138:8333 -83.85.131.168:8333 -83.163.211.75:8333 +83.89.27.50:8333 +83.89.250.69:8333 +83.167.27.4:8333 83.208.254.182:8333 -83.243.191.199:8333 -84.46.116.71:8333 -84.52.255.147:8333 -84.56.105.17:8333 -84.59.243.22:8333 -84.197.198.167:8333 -84.214.74.65:8333 -84.217.160.164:8333 -84.227.14.62:8333 -84.246.200.122:8333 -85.14.79.26:8333 +83.217.8.31:44420 +83.221.211.116:8335 +83.243.59.41:8333 +83.251.241.0:8333 +84.38.3.249:8333 +84.40.94.170:8333 +84.192.16.234:8333 +84.209.9.23:8333 +84.234.96.115:8333 +84.248.14.210:8333 85.119.83.25:8333 +85.144.119.222:8333 +85.145.238.93:8333 +85.184.138.108:8333 85.190.0.5:8333 -85.192.173.14:8333 -85.214.80.203:8333 -85.214.204.63:8333 -85.229.166.15:8333 -85.233.38.5:8333 +85.202.11.119:8333 +85.204.96.207:8333 +85.208.69.13:8333 +85.214.90.161:8333 +85.240.233.220:8333 +85.241.106.203:8333 +86.15.38.61:8333 86.76.7.132:8333 -86.80.62.194:8333 -86.107.204.50:8333 -86.139.248.102:8333 87.79.68.86:8333 87.79.94.221:8333 -87.99.79.123:8333 -87.104.127.153:8333 -87.117.19.226:8333 +87.118.116.237:8333 87.120.8.5:20008 -87.224.163.66:8333 +87.222.22.255:8333 87.233.181.146:8333 +87.246.46.132:8333 87.249.207.89:8333 88.86.116.140:8333 -88.86.116.141:8333 -88.86.243.241:8333 -88.87.93.52:1691 -88.98.198.130:8333 -88.99.109.66:8333 -88.119.128.36:8333 -88.129.253.46:8333 +88.86.116.142:8333 +88.88.13.249:8333 +88.147.244.250:8333 +88.150.230.95:8333 +88.202.202.221:8333 +88.208.3.195:8333 88.212.44.33:8333 -89.23.35.9:8333 -89.47.217.222:8333 +89.25.80.42:8333 +89.28.117.31:8333 89.106.199.38:8333 89.142.75.60:8333 -89.179.126.97:8333 +89.190.19.162:8333 89.212.9.96:8333 -89.218.198.46:8333 -89.230.96.42:8333 -90.125.157.153:8333 -90.146.97.100:8333 +89.212.75.6:8333 +89.248.250.12:8333 +90.94.83.26:8333 90.182.165.18:8333 -90.227.130.6:8333 -91.92.128.32:8333 -91.123.82.15:8333 -91.135.0.187:8333 -91.152.121.138:8333 -91.178.131.108:8333 91.185.198.234:8333 -91.193.237.88:8333 -91.202.133.75:8885 +91.193.237.116:8333 91.204.99.178:8333 91.204.149.5:8333 +91.210.24.30:8333 +91.211.88.33:8333 91.216.149.28:8333 -91.219.25.232:8333 91.222.128.59:8333 -92.62.231.253:8333 -92.63.192.206:8333 -92.63.197.243:8333 -92.63.197.245:8333 -92.119.112.59:8333 -92.243.244.101:8333 +92.18.180.225:8333 +92.53.89.123:8333 +92.240.69.195:8333 +92.249.143.44:8333 92.255.176.109:8333 -93.38.119.141:8333 -93.50.177.66:8333 -93.79.204.222:10333 -93.115.28.30:11100 -93.115.89.76:8333 +93.57.81.162:8333 +93.90.193.195:8330 +93.90.207.46:8333 +93.115.26.186:20004 93.115.240.26:8333 93.123.180.164:8333 -93.126.94.192:8333 -93.170.128.106:8333 -93.185.103.70:8333 -93.189.145.169:8333 -93.190.142.127:8333 -93.228.3.234:8333 -94.19.128.204:8333 -94.26.49.71:8333 -94.63.65.127:8333 -94.72.143.28:8333 -94.104.217.250:8333 -94.209.115.52:8333 -94.237.72.166:8333 +93.175.204.121:8333 +93.180.178.213:8333 +94.19.7.55:8333 +94.52.112.227:8333 +94.53.2.181:8333 +94.72.143.26:8333 +94.103.120.173:8333 +94.237.64.138:8333 +94.237.80.207:8333 94.242.255.31:8333 95.24.48.84:15426 +95.42.2.113:8333 95.69.249.63:8333 95.79.35.133:8333 95.87.226.56:8333 -95.91.80.140:8333 -95.102.60.168:8333 -95.154.90.99:8333 +95.90.3.210:8333 +95.110.234.93:8333 95.156.252.34:8333 -95.165.175.75:8333 -95.174.125.24:18333 -95.183.54.101:12853 95.211.189.3:8333 -95.213.143.13:8333 -95.213.184.109:778 +95.217.9.207:8333 96.9.80.109:8333 -96.47.122.171:8333 -97.81.244.191:8333 -97.99.13.150:8333 +96.245.218.247:8333 97.104.206.3:8333 -98.116.105.49:8333 -99.224.131.4:8333 -101.92.39.116:8333 -101.100.163.118:8327 +98.29.195.204:8333 +99.231.196.126:8333 101.100.174.24:8333 -101.251.68.146:12337 -102.132.229.253:8333 +101.100.174.240:8333 103.14.244.190:8333 -103.16.128.63:8333 -103.59.144.135:8333 -103.59.144.238:8333 +103.37.205.47:8333 +103.60.109.184:20008 +103.84.84.250:8335 +103.85.190.218:20000 103.99.168.100:8333 103.99.168.130:8333 -103.100.220.46:8333 -103.105.56.82:8333 -103.106.208.207:8333 -103.106.211.107:8333 -103.108.228.51:8333 -104.11.144.71:8333 -104.128.228.252:8333 -104.152.204.204:8333 -104.153.30.236:8333 -104.155.233.13:8333 -104.198.126.116:8333 -104.245.125.251:8333 -106.12.57.72:8333 -106.72.36.96:46289 -106.163.158.127:8333 -107.150.41.179:8333 -107.191.116.103:8333 -108.15.243.207:8333 +103.214.146.86:8333 +104.171.242.155:8333 +104.199.184.15:8333 +104.244.223.151:8333 +105.29.76.194:8333 +107.150.45.18:8333 +107.180.77.21:8333 108.58.252.82:8333 -108.160.202.208:8333 -108.213.205.103:8333 +108.183.77.12:8333 109.72.83.127:8333 109.99.63.159:8333 -109.104.8.48:8333 -109.183.251.77:8333 -109.198.191.22:8333 -109.236.90.122:58333 +109.109.36.19:8333 +109.110.81.90:8333 +109.173.112.224:8333 +109.202.107.125:8333 +109.205.109.56:8333 +109.236.84.141:8333 109.238.81.82:8333 109.248.206.13:8333 -109.252.133.57:8333 -111.90.145.57:8333 -111.90.159.184:50001 -113.35.179.149:8333 +111.40.4.103:8333 +111.90.140.217:8333 +111.90.158.212:8333 +112.213.103.98:8333 113.52.135.125:8333 115.47.141.250:8885 115.70.110.4:8333 -116.58.171.67:8333 -118.1.96.81:8333 -118.103.126.140:28333 -119.29.54.159:8333 -119.207.78.152:8333 -121.211.151.99:8333 +116.87.15.244:8333 +119.17.151.61:8333 +119.171.134.87:8333 +121.18.238.39:8333 +121.78.223.186:8333 +121.98.205.102:8333 122.112.148.153:8339 +122.116.42.140:8333 124.160.119.93:8333 -128.197.128.222:8333 +125.236.215.133:8333 129.13.189.212:8333 129.97.243.18:8333 130.185.77.105:8333 -130.255.187.86:8333 -131.114.10.236:8333 +131.114.10.233:8333 131.188.40.34:8333 132.249.239.163:8333 -133.18.1.114:8333 134.19.186.195:8333 -136.36.123.20:8333 -136.56.42.119:8333 +134.249.187.97:8333 +136.144.215.219:8333 137.226.34.46:8333 -138.68.20.137:8333 +139.9.249.234:8333 141.101.8.36:8333 -145.239.9.3:8333 -145.249.106.103:8333 -146.255.227.182:4033 -147.192.18.175:8333 -147.253.54.26:8333 -148.66.58.58:8333 -148.70.82.85:8333 -149.90.34.119:8333 -150.143.231.72:8333 +143.89.121.207:8333 +143.176.224.104:8333 +144.34.161.65:18333 +147.253.70.208:8333 +148.66.50.82:8335 153.92.127.216:8333 153.120.115.15:8333 -153.124.187.220:8333 -154.209.1.138:8333 -154.211.159.200:8333 -155.4.52.45:8333 +154.52.98.2:8444 +155.4.116.169:8333 156.19.19.90:8333 -157.7.211.107:8333 +156.34.178.138:8333 +157.13.61.66:8333 +157.13.61.67:8333 +158.181.226.33:8333 +159.100.242.254:8333 159.100.248.234:8333 -159.138.45.220:22235 +159.253.98.209:8333 160.16.0.30:8333 -162.154.207.147:8333 -163.158.243.230:8333 -166.62.82.103:32771 +160.20.145.62:8333 +162.62.18.226:8333 +162.62.26.218:8333 +162.209.88.174:8333 +162.244.80.208:8333 +163.158.202.112:8333 +163.172.181.191:8333 166.62.100.55:8333 -167.179.136.11:8333 +167.114.35.12:8333 +168.62.167.209:8200 168.235.74.110:8333 -169.55.182.185:8333 -171.33.177.9:8333 +168.235.90.188:8333 +170.249.37.243:8333 172.99.120.113:8333 -172.105.112.233:8333 -172.110.30.81:8333 173.21.218.95:8333 -173.23.103.30:8000 173.51.177.2:8333 -173.89.28.137:8333 +173.95.72.234:8333 173.208.128.10:8333 -173.249.11.207:18333 +173.209.44.34:8333 +173.231.57.194:8333 +173.255.204.124:8333 174.65.135.60:8333 -176.38.7.43:8333 -176.92.150.12:8333 +174.94.155.224:8333 +174.115.120.186:8333 +176.53.160.170:8333 +176.85.188.213:8333 176.99.2.207:8333 -176.126.167.10:8333 -176.212.185.153:8333 -176.223.136.171:8333 -177.52.173.62:8333 -178.33.136.162:8333 -178.128.39.110:8333 -178.143.50.8:8333 -178.198.60.155:8333 -178.236.137.63:8333 +176.121.14.157:8333 +176.122.157.173:8333 +176.126.85.34:8333 +176.198.120.197:8334 +178.61.141.198:8333 +178.119.183.34:8333 +178.234.29.184:8333 +178.255.42.126:8333 179.48.251.41:8333 -180.150.52.37:8333 +180.150.73.100:8333 +181.47.220.242:8333 +181.170.139.47:8333 +183.110.220.210:30301 183.230.93.139:8333 -184.80.255.250:8333 -184.95.58.166:8336 -184.180.129.98:8333 -185.19.28.195:8333 -185.25.48.184:8333 +184.95.58.164:8663 +184.164.147.82:41333 +185.15.92.18:20993 185.25.60.199:8333 -185.50.68.64:8333 -185.53.158.12:8333 -185.61.79.213:8333 +185.52.3.185:8333 +185.61.138.4:8333 185.64.116.15:8333 +185.83.110.53:8333 +185.83.214.123:8333 185.95.219.53:8333 -185.130.215.73:8333 -185.130.215.187:8333 -185.141.60.127:8333 -185.147.11.108:8333 -185.154.159.164:9992 -185.198.56.77:8333 +185.96.94.24:8333 +185.102.71.6:8333 +185.138.35.183:8333 +185.140.252.253:8333 +185.143.145.113:8333 +185.148.3.227:8333 +185.157.160.220:8333 +185.163.44.44:8333 +185.176.221.32:8333 +185.186.208.162:8333 +185.198.58.47:8333 185.198.59.183:8333 -185.216.140.33:8333 -185.217.241.142:8333 -185.249.199.106:8333 +185.215.224.22:8333 +185.232.28.254:8333 +185.239.236.116:8333 +185.251.161.54:8333 188.42.40.234:18333 188.65.212.138:8333 -188.65.212.211:8333 +188.65.212.157:8333 188.68.45.143:8333 -188.120.246.125:8333 -188.134.5.47:8333 -188.134.6.84:8333 -188.167.101.51:8333 -188.175.77.16:8333 -188.213.168.152:8333 -188.230.245.188:8333 -189.121.185.148:8333 +188.127.229.105:8333 +188.131.177.130:8333 +188.134.8.36:8333 +188.134.88.5:8333 +188.138.17.92:8333 +188.150.157.11:8333 +188.208.111.62:8333 +188.231.177.149:8333 +190.2.145.177:8333 190.104.249.44:8333 -190.184.198.34:8333 -190.210.234.38:8333 -190.218.190.85:8333 +191.209.21.188:8333 192.3.11.20:8333 192.3.11.24:8333 +192.34.56.59:8333 +192.65.170.15:8333 +192.65.170.50:8333 +192.146.137.18:8333 192.166.47.32:8333 -192.167.149.143:8333 192.169.94.29:8333 -192.169.94.70:8333 -192.198.90.98:8333 -192.254.89.134:8333 -192.254.89.220:8333 -193.41.78.125:8333 -193.46.83.8:8333 +192.227.80.83:8333 +192.254.65.126:8333 +193.10.203.23:8334 +193.29.57.4:8333 +193.58.196.212:8333 193.59.41.11:8333 -193.77.135.181:8333 193.84.116.22:8333 +193.108.131.43:8333 +193.148.71.10:8333 +193.169.244.190:8333 +193.194.163.35:8333 193.194.163.53:8333 -194.71.225.55:8333 +194.5.159.197:8333 +194.14.246.205:8333 +194.135.92.96:8333 194.135.135.69:8333 194.158.92.150:8333 -195.13.220.165:8333 +194.187.251.163:31239 +195.56.63.5:8333 195.56.63.10:8333 +195.67.139.54:8333 +195.95.225.17:8333 195.135.194.8:8333 -195.168.36.20:8333 -195.201.33.0:8333 -195.202.169.149:8333 -195.242.93.189:8333 +195.154.113.90:8333 +195.206.20.114:8333 +195.206.105.42:8333 +195.209.249.164:8333 +195.224.116.20:8333 198.1.231.6:8333 -198.44.231.160:6333 -198.54.113.59:8333 198.251.83.19:8333 -199.68.199.4:8333 -199.247.1.117:8333 -199.247.10.26:8333 +199.48.83.58:8333 +199.96.50.211:8333 +199.188.204.25:8333 +199.192.20.201:8333 200.76.194.7:8333 -201.241.2.85:8333 -202.185.45.110:8333 -203.86.207.53:8333 +200.87.116.213:8333 +202.28.194.82:8333 +202.55.87.45:8333 203.130.48.117:8885 +203.132.95.10:8333 204.14.245.180:8333 -204.111.241.195:8333 204.152.203.98:8333 -205.185.122.150:8333 -206.124.149.66:8333 -207.182.154.178:8333 -208.81.1.105:8333 -209.133.201.114:8333 -209.173.25.140:8333 -209.180.174.200:8333 -209.190.36.13:8333 -210.54.38.227:8333 -210.54.39.99:8333 -210.203.222.52:8223 -211.104.154.140:8333 -212.24.103.20:8333 -212.33.204.190:8333 -212.51.156.139:8333 -212.109.198.126:8333 -212.237.96.98:8333 +205.209.162.98:8333 +206.221.178.149:8333 +208.110.99.105:8333 +209.133.220.74:8333 +209.151.237.71:8333 +211.149.170.31:8333 +212.51.132.226:8333 212.241.70.213:8333 -213.37.92.163:8333 -213.89.98.199:8333 -213.89.150.13:8333 -213.174.156.72:8333 -213.209.123.165:8333 +213.21.15.22:8333 +213.136.83.8:8333 213.227.152.108:8333 -216.38.129.164:8333 -216.86.154.215:8333 -216.93.139.63:8333 -216.186.250.53:8333 +213.254.23.116:8333 +216.108.236.180:8333 216.194.165.98:8333 -217.22.132.220:8333 -217.43.72.105:8333 +216.236.164.82:8333 +217.16.185.165:8333 +217.21.24.146:8333 +217.26.32.10:8333 217.64.47.138:8333 -217.69.145.234:8333 -217.158.9.102:8333 -220.130.142.178:33389 +217.64.133.220:8333 +217.92.55.246:8333 +217.172.244.9:8333 +218.75.140.45:8333 +219.75.122.47:8333 220.233.138.130:8333 -[2001:1ba8:401:32:b842:3891:5915:c68f]:8333 +221.130.29.230:18421 +222.122.49.40:8333 +222.186.169.1:8333 +222.222.43.29:8333 +223.16.30.175:8333 [2001:1bc0:cc::a001]:8333 +[2001:1c02:2f18:d00:b62e:99ff:fe49:d492]:8333 [2001:250:200:7:d6a9:fcf4:e78d:2d82]:8333 -[2001:4128:6135:e001:5054:ff:fe37:e9eb]:8333 -[2001:41d0:fc63:9c00:1acc:d22f:3f5c:ef7f]:8333 +[2001:41c9:1:424::231]:8333 +[2001:41d0:1004:19b4::]:8333 [2001:44b8:4195:1801:5c73:5d67:d2a6:9910]:8333 +[2001:470:88ff:2e::1]:8333 +[2001:470:a:c13::2]:8333 [2001:4800:7821:101:be76:4eff:fe04:9f50]:8333 -[2001:4801:7819:74:b745:b9d5:ff10:a61a]:8333 -[2001:4801:7821:77:be76:4eff:fe10:c7f6]:8333 +[2001:4801:7819:74:b745:b9d5:ff10:aaec]:8333 [2001:48d0:1:2163:0:ff:febe:5a80]:8333 -[2001:48f8:1003::3ba]:8333 [2001:4ba0:fffa:5d::93]:8333 -[2001:4c48:2:a328:d8a7:e0ff:fe96:403a]:8333 -[2001:56b:dda9:4b00:49f9:121b:aa9e:de30]:8333 [2001:638:a000:4140::ffff:191]:8333 [2001:678:7dc:8::2]:8333 [2001:678:ec:1:250:56ff:fea7:47e9]:8333 +[2001:67c:10ec:2a49:8000::1082]:8333 [2001:67c:16dc:1201:5054:ff:fe17:4dac]:8333 [2001:67c:21ec:1000::a]:8333 -[2001:67c:22fc:1337::5]:8333 -[2001:67c:2824:8001:225:90ff:fe67:9830]:7777 -[2001:67c:2b5c:101:216:3eff:fea3:5234]:8333 -[2001:67c:2db8:13::83]:8333 +[2001:67c:26b4:12:7ae3:b5ff:fe04:6f9c]:8333 +[2001:67c:2db8:6::45]:8333 +[2001:700:300:1513:29c7:2430:190e:ab59]:8333 [2001:718:801:311:5054:ff:fe19:c483]:8333 -[2001:8003:d136:1001::11:ffd1]:8333 -[2001:8d8:96a:9300::ad:ae2c]:8333 -[2001:8f1:1602:700:1b28:a3e3:bb08:a708]:9444 -[2001:8f8:1327:1587:3f10:5ab:804d:4039]:8333 +[2001:818:e245:f800:4df:2bdf:ecf5:eb60]:8333 +[2001:8f1:1404:3700:8e49:715a:2e09:b634]:9444 [2001:ba8:1f1:f069::2]:8333 +[2001:bb8:4008:20:648c:5eff:fe74:ce4]:8333 +[2001:da8:d800:821:a7d5:f5a7:530d:b71e]:8333 [2001:e42:103:100::30]:8333 -[2400:2650:480:bc00:bcaf:7c49:8c9e:7cdf]:8333 +[2001:e68:7400:2:6854:419e:221c:82f3]:8333 +[2002:b610:1ca3::b610:1ca3]:8333 +[2002:b6ff:3dca::b6ff:3dca]:28364 +[2400:2651:42e0:3300:40b4:576d:d14c:65d4]:8333 [2400:4052:e20:4f00:69fe:bb33:7b1c:a1ca]:8333 -[2400:8902::f03c:91ff:fea5:ebb7]:8333 -[2401:1800:7800:102:be76:4eff:fe1c:a7d]:8333 [2401:2500:203:184::15]:8333 [2401:3900:2:1::2]:8333 -[2402:7340:1:56::d0d]:8333 -[2405:9800:ba01:251a:c53c:b80a:320d:5b41]:8333 +[2401:a400:3200:5600:14ee:f361:4bdc:1f7c]:8333 +[2401:d002:4402:0:8f28:591a:6ea0:c683]:8333 +[2402:cb40:1000:504::dead]:8333 [2405:aa00:2::40]:8333 [2409:10:ca20:1df0:224:e8ff:fe1f:60d9]:8333 -[2409:13:1200:d200:16da:e9ff:fee9:b19a]:8333 -[240d:1a:3c0:ab00:e9f1:87c:93ac:7687]:8333 -[2602:ffc5:1f::1f:9211]:8333 -[2604:2000:ffc0:0:5862:b6f8:fe72:762f]:8333 +[2409:8a15:4a1a:2830:7285:c2ff:fe70:60a4]:8333 +[2409:8a1e:6938:d2c0:2e0:70ff:fe86:cb59]:8333 +[2409:8a28:421:2580:2e0:70ff:fe8b:13e]:8333 +[2409:8a28:421:2770:2e0:70ff:fe87:fecb]:8333 +[240d:1a:759:6000:ddab:3141:4da0:8878]:8333 +[2600:3c01::f03c:91ff:fecd:1b95]:8333 +[2600:6c40:7980:27:20a:f7ff:fe69:f4d5]:8333 +[2602:ffc5::ffc5:b844]:8333 +[2604:2d80:c808:857b:8d6:9e1c:7131:4bea]:8333 [2604:4300:a:2e:21b:21ff:fe11:392]:8333 +[2604:5500:c134:4000::3fc]:32797 [2604:5500:c2a3:7b00:cc6:373b:44a8:caa4]:8333 -[2605:9880:201:17::4b7c]:8333 +[2604:6000:6e85:4a01:a82d:f9ff:fef5:28b9]:8333 +[2604:7780:303:80::80]:8333 +[2605:4d00::50]:8333 +[2605:9880:0:777:225:90ff:fefc:8958]:8333 [2605:ae00:203::203]:8333 [2605:c000:2a0a:1::102]:8333 +[2605:e000:1127:8fc:ec63:a191:32c2:633c]:8333 +[2605:e200:d202:300:20c:29ff:fef1:85ec]:8333 [2605:f700:100:400::131:5b54]:8333 [2606:c680:0:b:3830:34ff:fe66:6663]:8333 -[2607:9280:b:73b:250:56ff:fe21:bf32]:8333 +[2607:4480:2:1:38:102:69:70]:8333 +[2607:9280:b:73b:250:56ff:fe21:9c2f]:8333 [2607:f128:40:1703::2]:8333 -[2607:f3a0:1000:9:f82a:fdff:fea1:3315]:8333 -[2607:f470:8:1048:ae1f:6bff:fe68:5e42]:8333 -[2607:fd70:4a:babe:b00b:1e5:1bd5:f78]:8333 -[2607:ff50:0:71::13]:8333 +[2607:f188:0:4:eef4:bbff:fecc:6668]:8333 +[2607:f2c0:e1e2:11:1044:9b7a:b81e:1d74]:8333 +[2607:f470:8:1048:ae1f:6bff:fe70:7240]:8333 +[2620:11c:5001:1118:d267:e5ff:fee9:e673]:8333 [2620:6e:a000:1:42:42:42:42]:8333 +[2804:14d:baa7:9674:21e:67ff:fea8:d799]:8333 [2804:14d:baa7:9674:3615:9eff:fe23:d610]:8333 -[2a00:1328:e101:c00::163]:8333 +[2804:39e8:ff85:a600:7285:c2ff:feae:9925]:8333 +[2804:d41:aa01:1600:5a2d:3b27:3b83:2b45]:8333 +[2a00:12d8:7001:1:46e7:6915:75be:92f9]:8333 [2a00:1398:4:2a03:215:5dff:fed6:1033]:8333 -[2a00:13a0:3015:1:85:14:79:26]:8333 [2a00:1630:14::101]:8333 [2a00:1768:2001:27::ef6a]:8333 [2a00:1828:a004:2::666]:8333 -[2a00:1838:36:2c::3e95]:8333 -[2a00:1b60:2:4:40d0:eff:fe88:ebd4]:8333 +[2a00:1838:36:142::ec73]:8333 +[2a00:1838:36:7d::d3c6]:8333 +[2a00:1f40:2::1126]:8333 +[2a00:23a8:41d0:5800:20c:29ff:fe0d:6a75]:8333 +[2a00:23c5:fd01:9f00:6317:7c02:788f:88ea]:8333 +[2a00:6020:13c2:3800:be6a:a1c8:c9e7:65ec]:8333 +[2a00:63c2:8:88::2]:8333 +[2a00:7143:3::227]:8333 [2a00:7b80:452:2000::138]:8333 -[2a00:7b80:454:2000::101]:8333 [2a00:8a60:e012:a00::21]:8333 -[2a01:4240:5f52:9246::1]:8333 +[2a00:ca8:a1f:3025:f949:e442:c940:13e8]:8333 +[2a00:d70:0:15:f816:3eff:fe73:d819]:8333 +[2a00:d880:5:331::3978]:8333 +[2a01:238:420f:9200:fa5a:1a4b:1e6a:fadf]:8333 [2a01:430:17:1::ffff:1153]:8333 [2a01:488:66:1000:53a9:1573:0:1]:8333 -[2a01:6f0:ffff:120::8dcb]:8333 +[2a01:4f8:120:80cc::2]:8433 +[2a01:5f0:beef:5:0:3:0:1]:52101 +[2a01:79c:cebc:a630:9dd8:ef55:8374:92a1]:8333 [2a01:7a0:2:137a::11]:8333 -[2a01:7a7:2:131b:20c:29ff:fe9a:3922]:8333 -[2a01:7c8:d002:318:5054:ff:febe:cbb1]:8333 +[2a01:7a0:2:137c::3]:8333 +[2a01:7c8:aab6:db:5054:ff:feca:cfc8]:8333 +[2a01:8b81:6403:4700::1]:8333 +[2a01:cb00:7cd:b000:fa1f:bd1:fe0:62a6]:8333 [2a01:cb00:d3d:7700:227:eff:fe28:c565]:8333 -[2a01:d0:ffff:7368::2]:8333 -[2a01:e0a:182:1300:591e:529:b376:c654]:8333 +[2a01:d0:bef2::12]:8333 +[2a01:d0:f34f:1:1f67:e250:6aeb:b9c4]:8333 [2a01:e34:ee6b:2ab0:88c2:1c12:f4eb:c26c]:8333 -[2a02:1205:34c3:d890:c0e:741e:c45f:3605]:8333 -[2a02:2c8:1:400:34::184]:8333 -[2a02:2f0d:202:f900:5e9a:d8ff:fe57:8bc5]:8333 +[2a01:e35:2fba:2e90:1:0:b:1]:8333 +[2a02:1205:505d:eb50:beae:c5ff:fe42:a973]:8333 +[2a02:120b:2c3f:a90:10dd:31ff:fe42:5079]:8333 +[2a02:130:300:1520:1::2]:8333 +[2a02:13b8:4000:1000:216:e6ff:fe92:8619]:8333 +[2a02:180:1:1::5b8f:538c]:8333 +[2a02:2168:8062:db00:96de:80ff:fea3:fd00]:8333 +[2a02:2770:5:0:21a:4aff:fe44:8370]:8333 +[2a02:2788:864:fb3:5b8a:c8f7:9fff:ae2d]:8333 +[2a02:2f0d:607:bc00:5e9a:d8ff:fe57:8bc5]:8333 +[2a02:348:9a:83b1::1]:8333 [2a02:390:9000:0:218:7dff:fe10:be33]:8333 -[2a02:4780:9:0:2:f928:f280:9a6f]:8333 +[2a02:4780:8:6:2:354e:1256:7a04]:8333 [2a02:578:4f07:24:76ad:cef7:93c1:b9b9]:8333 -[2a02:7aa0:1619::590:eba2]:8333 +[2a02:6d40:30f6:e901:89b8:bb58:25a:6050]:8333 +[2a02:750:7:c11:5054:ff:fe43:eb81]:8333 [2a02:7aa0:1619::adc:8de0]:8333 +[2a02:7b40:4f62:19ae::1]:8333 [2a02:8108:95bf:eae3:211:32ff:fe8e:b5b8]:8333 -[2a02:c207:2014:9913::1]:18333 [2a02:e00:fff0:23f::1]:8333 -[2a02:f680:1:1100::5453]:8333 +[2a02:e00:fff0:23f::a]:8333 [2a03:1b20:1:f410:40::3e]:16463 -[2a03:2260:11e:301::8]:8333 -[2a03:2260:11e:302::3]:8333 -[2a03:4000:6:416c::43]:8333 +[2a03:6000:870:0:46:23:87:218]:8333 +[2a03:9da0:f6:1::2]:8333 +[2a03:e2c0:1ce::2]:8333 +[2a04:2180:0:2::f2]:8333 [2a04:2180:1:c:f000::15]:8333 -[2a04:3543:1000:2310:8492:b8ff:fe91:22e8]:8333 -[2a05:6d40:b94e:d100:225:90ff:fe0d:cfc2]:8333 -[2a05:fc87:4::6]:8333 +[2a04:52c0:101:97f::dcbe]:8333 +[2a04:ee41:83:50df:d908:f71d:2a86:b337]:8333 +[2a05:1700::100]:8333 +[2a05:fc87:4::2]:8333 +[2a05:fc87:4::7]:8333 +[2a07:5741:0:69d::1]:8333 +[2a07:5741:0:7cd::1]:8333 [2a07:7200:ffff:c53f::e1:17]:8333 -[2a0b:2ac0:1:0:d6ae:52ff:fe7b:741c]:8333 -[2a0b:2ac0:1:0:d6ae:52ff:fe7b:88eb]:8333 -25lhwv6jaqbtek5x.onion:8333 +[2a07:b400:1:34c::2:1002]:8333 +[2a0b:ae40:3:4a0a::15]:8333 +[2a0e:b780::55d1:f05b]:8333 +[2c0f:fce8:0:400:b7c::1]:8333 2empatdfea6vwete.onion:8333 -2hpjn6ndxjafgoej.onion:8333 34aqcwnnuiqh234f.onion:8333 -3frtobxxkgkhwjx7.onion:8333 3gxqibajrtysyp5o.onion:8333 -3lf37sdzhpxh6fpv.onion:8333 -3q5iydjrrutqjb2y.onion:8333 -3qzrkpxduf44jqg5.onion:8333 3sami4tg4yhctjyc.onion:8333 3w77hrilg6q64opl.onion:8333 46xh2sbjsjiyl4fu.onion:8333 4ee44qsamrjpywju.onion:8333 -4gwvtoppsaffaxg7.onion:8333 4haplrtkprjqhm2j.onion:8333 4u3y3zf2emynt6ui.onion:8333 -4wx34hn3kybujklg.onion:8333 -56czufbruq46sb2c.onion:8333 57dytizbai7o4kq7.onion:8333 5guaeulc7xm4g2mm.onion:8334 5mtvd4dk62ccdk4v.onion:8333 -5nsfm4nqqzzprjrp.onion:8333 5pmjz6mmikyabaw5.onion:8333 6eurcxoqsa4qpiqq.onion:8333 6ivvkeseojsmpby4.onion:8333 -6luc7owlbbaj52lr.onion:8333 6tlha6njtcuwpfa3.onion:8333 6ymgbvnn6d5nfmv4.onion:8333 -6z5cyaswulhxcvhj.onion:8333 72y2n5rary4mywkz.onion:8333 -7a354g25lnvry4ic.onion:8333 7b75ub5dapphemit.onion:8333 7xaqpr7exrtlnjbb.onion:8333 a64haiqsl76l25gv.onion:8333 @@ -654,99 +688,63 @@ b6vrxhrrle7jxiua.onion:8333 BGLranliixsu.onion:8333 blcktrgve5vetjsk.onion:8333 bowg4prf63givea4.onion:8333 -cj2nexmwocyy5unq.onion:8333 cjuek22p4vv4hzbu.onion:8333 cklaa2xdawrb75fg.onion:8333 coxiru76nnfw3vdj.onion:8333 -cqwcyvvk5xnqv3yw.onion:8333 cwq2fuc54mlp3ojc.onion:8333 dganr7dffsacayml.onion:8333 djbsspmvlc6ijiis.onion:8333 dmfwov5ycnpvulij.onion:8333 dp2ekfbxubpdfrt4.onion:8333 dw2ufbybrgtzssts.onion:4333 -dxv5u4xaeydpbrrp.onion:8333 edkmfeaapvavhtku.onion:8333 ejdoey3uay3cz7bs.onion:8333 eladlvwflaahxomr.onion:8333 ffhx6ttq7ejbodua.onion:8333 -fqdzxl4kjboae35b.onion:8333 hbnnzteon75un65y.onion:8333 hcyxhownxdv7yybw.onion:8333 hdfcxll2tqs2l4jc.onion:8333 hdld2bxyvzy45ds4.onion:8333 +hlnnhn2xj2qffqjs.onion:8333 hnqwmqikfmnkpdja.onion:8333 hvmjovdasoin43wn.onion:8333 hwzcbnenp6dsp6ow.onion:8333 -hz26wamjlbd7arrl.onion:8333 i5ellwzndjuke242.onion:8333 iapvpwzs4gpbl6fk.onion:8885 if7fsvgyqwowxkcn.onion:8333 ilukzjazxlxrbuwy.onion:8333 -ju5duo3r6p6diznc.onion:8333 -k3i3suxlg4w27uas.onion:8333 -k7omfveynnjg674e.onion:8333 -ko37ti7twplktxqu.onion:8333 kswfyurnglm65u7b.onion:8333 ldu2hbiorkvdymja.onion:8333 -lftugyhf6vnouikf.onion:8333 -ln3csnn6774nzgyn.onion:8333 -lvh7k53s62frc6ro.onion:8333 lvvgedppmpigudhz.onion:8333 -mbjkotfqcn5gnsrm.onion:8333 mk3bnep5ubou7i44.onion:8333 muhp42ytbwi6qf62.onion:8333 n5khsbd6whw7ooip.onion:8333 -na6otugfitr7pnlv.onion:8333 -nclrhbeertvin7cu.onion:8333 ndmbrjcvu2s6jcom.onion:8333 nf4iypnyjwfpcjm7.onion:8333 nkdw6ywzt3dqwxuf.onion:8333 -nqmxpgrpuysullkq.onion:8333 -ntml2aeumyglyjlk.onion:8333 o4sl5na6jeqgi3l6.onion:8333 opencubebqqx3buj.onion:8333 -oudab5q7ruclifdv.onion:8333 ovbkvgdllk3xxeah.onion:8333 pg2jeh62fkq3byps.onion:8333 -pgufebhe6mt7knqz.onion:8333 pkcgxf23ws3lwqvq.onion:8333 -po3j2hfkmf7sh36o.onion:8333 qdtau72ifwauot6b.onion:8333 qidnrqy2ozz3nzqq.onion:8333 -qpebweackyztorrm.onion:8333 -qsl3x63225alx4bt.onion:8333 readybit5veyche6.onion:8333 -rjw6vpw5ffoncxuh.onion:8333 s2epxac7ovy36ruj.onion:8333 -srkgyv5edn2pa7il.onion:8333 +satofxsc3xjadxsm.onion:8333 sv5oitfnsmfoc3wu.onion:8333 -tdlpmqnpfqehqj7c.onion:8333 -ttx7ddwltrixannm.onion:8333 uftbw4zi5wlzcwho.onion:8333 -uoailgcebjuws47e.onion:8333 -uqvucqhplwqbjrsb.onion:8333 uz3pvdhie3372vxw.onion:8333 v2x7gpj3shxfnl25.onion:8333 -vdhrg3k2akmf6kek.onion:8333 vov46htt6gyixdmb.onion:8333 -vrfs5jwtfzj2ss6n.onion:8333 -vwpcfguewxhky4iy.onion:8333 wg3b3qxcwcrraq2o.onion:8333 wgeecjm4w4ko66f7.onion:8333 wmxc6ask4a5xyaxh.onion:8333 wqrafn4zal3bbbhr.onion:8333 -xagzqmjgwgdvl2di.onion:8333 xhi5x5qc44elydk4.onion:8333 xk6bjlmgvwojvozj.onion:8333 xmgr7fsmp7bgburk.onion:8333 xocvz3dzyu2kzu6f.onion:8333 xv7pt6etwxiygss6.onion:8444 -xz563swdjd7yqymb.onion:8333 yumx7asj7feoozic.onion:8333 -yzmyolvp55rydnsm.onion:8333 -z3forfpyjyxxgfr5.onion:8333 -z5x2wes6mhbml2t5.onion:8333 zmaddsqelw2oywfb.onion:8444 -zqlojwtc4lsurgie.onion:8333 -zvwc7ad4m2dvc74x.onion:8333 diff --git a/contrib/seeds/suspicious_hosts.txt b/contrib/seeds/suspicious_hosts.txt new file mode 100644 index 0000000000..13385cc816 --- /dev/null +++ b/contrib/seeds/suspicious_hosts.txt @@ -0,0 +1,16 @@ +130.211.129.106 +148.251.238.178 +176.9.46.6 +178.63.107.226 +54.173.72.127 +54.174.10.182 +54.183.64.54 +54.194.231.211 +54.66.214.167 +54.66.220.137 +54.67.33.14 +54.77.251.214 +54.94.195.96 +54.94.200.247 +83.81.130.26 +88.198.17.7 \ No newline at end of file diff --git a/contrib/testgen/README.md b/contrib/testgen/README.md index e346d94bfa..dda27a8cf3 100644 --- a/contrib/testgen/README.md +++ b/contrib/testgen/README.md @@ -4,5 +4,5 @@ Utilities to generate test vectors for the data-driven BGL tests. Usage: - PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py valid 50 > ../../src/test/data/key_io_keys_valid.json - PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py invalid 50 > ../../src/test/data/key_io_keys_invalid.json + PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py valid 50 > ../../src/test/data/key_io_valid.json + PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py invalid 50 > ../../src/test/data/key_io_invalid.json diff --git a/contrib/testgen/base58.py b/contrib/testgen/base58.py index dff183528d..9915bfe6d7 100644 --- a/contrib/testgen/base58.py +++ b/contrib/testgen/base58.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2018 The Bitcoin Core developers +# Copyright (c) 2012-2018 The BGL Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' diff --git a/contrib/testgen/gen_key_io_test_vectors.py b/contrib/testgen/gen_key_io_test_vectors.py index a00acb1f41..49320d92e6 100755 --- a/contrib/testgen/gen_key_io_test_vectors.py +++ b/contrib/testgen/gen_key_io_test_vectors.py @@ -15,8 +15,7 @@ from itertools import islice from base58 import b58encode_chk, b58decode_chk, b58chars import random -from binascii import b2a_hex -from segwit_addr import bech32_encode, decode, convertbits, CHARSET +from segwit_addr import bech32_encode, decode_segwit_address, convertbits, CHARSET # key types PUBKEY_ADDRESS = 0 @@ -109,7 +108,7 @@ def is_valid(v): def is_valid_bech32(v): '''Check vector v for bech32 validity''' for hrp in ['bc', 'tb', 'bcrt']: - if decode(hrp, v) != (None, None): + if decode_segwit_address(hrp, v) != (None, None): return True return False @@ -141,9 +140,7 @@ def gen_valid_vectors(): rv, payload = valid_vector_generator(template) assert is_valid(rv) metadata = {x: y for x, y in zip(metadata_keys,template[3]) if y is not None} - hexrepr = b2a_hex(payload) - if isinstance(hexrepr, bytes): - hexrepr = hexrepr.decode('utf8') + hexrepr = payload.hex() yield (rv, hexrepr, metadata) def gen_invalid_base58_vector(template): diff --git a/contrib/travis.sh b/contrib/travis.sh new file mode 100755 index 0000000000..24cc9315cb --- /dev/null +++ b/contrib/travis.sh @@ -0,0 +1,68 @@ +#!/bin/sh + +set -e +set -x + +if [ "$HOST" = "i686-linux-gnu" ] +then + export CC="$CC -m32" +fi +if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$TRAVIS_COMPILER" = "gcc" ] +then + export CC="gcc-9" +fi + +./configure \ + --enable-experimental="$EXPERIMENTAL" \ + --with-test-override-wide-multiply="$WIDEMUL" --with-bignum="$BIGNUM" --with-asm="$ASM" \ + --enable-ecmult-static-precomputation="$STATICPRECOMPUTATION" --with-ecmult-gen-precision="$ECMULTGENPRECISION" \ + --enable-module-ecdh="$ECDH" --enable-module-recovery="$RECOVERY" \ + --enable-module-schnorrsig="$SCHNORRSIG" \ + --with-valgrind="$WITH_VALGRIND" \ + --host="$HOST" $EXTRAFLAGS + +if [ -n "$BUILD" ] +then + make -j2 "$BUILD" +fi +if [ "$RUN_VALGRIND" = "yes" ] +then + make -j2 + # the `--error-exitcode` is required to make the test fail if valgrind found errors, otherwise it'll return 0 (http://valgrind.org/docs/manual/manual-core.html) + valgrind --error-exitcode=42 ./tests 16 + valgrind --error-exitcode=42 ./exhaustive_tests +fi +if [ "$BENCH" = "yes" ] +then + if [ "$RUN_VALGRIND" = "yes" ] + then + # Using the local `libtool` because on macOS the system's libtool has nothing to do with GNU libtool + EXEC='./libtool --mode=execute valgrind --error-exitcode=42' + else + EXEC= + fi + # This limits the iterations in the benchmarks below to ITER(set in .travis.yml) iterations. + export SECP256K1_BENCH_ITERS="$ITERS" + { + $EXEC ./bench_ecmult + $EXEC ./bench_internal + $EXEC ./bench_sign + $EXEC ./bench_verify + } >> bench.log 2>&1 + if [ "$RECOVERY" = "yes" ] + then + $EXEC ./bench_recover >> bench.log 2>&1 + fi + if [ "$ECDH" = "yes" ] + then + $EXEC ./bench_ecdh >> bench.log 2>&1 + fi + if [ "$SCHNORRSIG" = "yes" ] + then + $EXEC ./bench_schnorrsig >> bench.log 2>&1 + fi +fi +if [ "$CTIMETEST" = "yes" ] +then + ./libtool --mode=execute valgrind --error-exitcode=42 ./valgrind_ctime_test > valgrind_ctime_test.log 2>&1 +fi diff --git a/contrib/valgrind.supp b/contrib/valgrind.supp index 03ae518374..5520281e28 100644 --- a/contrib/valgrind.supp +++ b/contrib/valgrind.supp @@ -123,7 +123,6 @@ Memcheck:Cond ... fun:_ZN5boost10filesystem6detail11unique_pathERKNS0_4pathEPNS_6system10error_codeE - fun:unique_path } { Suppress boost warning diff --git a/contrib/verify-commits/gpg.sh b/contrib/verify-commits/gpg.sh index c5da6ab524..005dd9db95 100755 --- a/contrib/verify-commits/gpg.sh +++ b/contrib/verify-commits/gpg.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2014-2016 The Bitcoin Core developers +# Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/contrib/verify-commits/pre-push-hook.sh b/contrib/verify-commits/pre-push-hook.sh index 5521c8080b..8cd1ef4050 100755 --- a/contrib/verify-commits/pre-push-hook.sh +++ b/contrib/verify-commits/pre-push-hook.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2014-2015 The Bitcoin Core developers +# Copyright (c) 2014-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/contrib/verify-commits/verify-commits.py b/contrib/verify-commits/verify-commits.py index 951fc5ba1c..0cab101495 100755 --- a/contrib/verify-commits/verify-commits.py +++ b/contrib/verify-commits/verify-commits.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2018 The Bitcoin Core developers +# Copyright (c) 2018-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Verify commits against a trusted keys list.""" diff --git a/contrib/verifybinaries/verify.sh b/contrib/verifybinaries/verify.sh index 64e5f6fe0c..410a5baff9 100755 --- a/contrib/verifybinaries/verify.sh +++ b/contrib/verifybinaries/verify.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2016 The Bitcoin Core developers +# Copyright (c) 2016-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/contrib/windeploy/detached-sig-create.sh b/contrib/windeploy/detached-sig-create.sh index cc42422b23..31720e72e7 100755 --- a/contrib/windeploy/detached-sig-create.sh +++ b/contrib/windeploy/detached-sig-create.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2014-2015 The Bitcoin Core developers +# Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/contrib/windeploy/win-codesign.cert b/contrib/windeploy/win-codesign.cert index 5bc5dc5809..4023a5b638 100644 --- a/contrib/windeploy/win-codesign.cert +++ b/contrib/windeploy/win-codesign.cert @@ -1,34 +1,34 @@ -----BEGIN CERTIFICATE----- -MIIFcTCCBFmgAwIBAgIRALWcUnSOxv9FQW3xdaMDO6swDQYJKoZIhvcNAQELBQAw +MIIFdDCCBFygAwIBAgIRAL98pqZb/N9LuNaNxKsHNGQwDQYJKoZIhvcNAQELBQAw fDELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G A1UEBxMHU2FsZm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMSQwIgYDVQQD -ExtTZWN0aWdvIFJTQSBDb2RlIFNpZ25pbmcgQ0EwHhcNMTkwMzI3MDAwMDAwWhcN -MjAwMzI2MjM1OTU5WjCBtDELMAkGA1UEBhMCQ0gxDTALBgNVBBEMBDgwMDUxCzAJ -BgNVBAgMAlpIMRAwDgYDVQQHDAdaw7xyaWNoMRcwFQYDVQQJDA5NYXR0ZW5nYXNz -ZSAyNzEuMCwGA1UECgwlQml0Y29pbiBDb3JlIENvZGUgU2lnbmluZyBBc3NvY2lh -dGlvbjEuMCwGA1UEAwwlQml0Y29pbiBDb3JlIENvZGUgU2lnbmluZyBBc3NvY2lh -dGlvbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK04VDwiY1wxcW3E -WTTGmnbciCwETwC96DG4qcoH2PPNsVy3dfwGh0C02Qj2vL64IfwIGUFSgREvyjZk -CNhEuJO2e0nO0rKNNH5v/JO+P7/VYPZkF5a3uUz9ulmihULXioieHB/q0l6BmiJL -+cYaMVfidL9Y+IJwgiTqjnpRhv1Ik083SPsu6GcfQT9MJfY/+xse2EP0l4GfdFE6 -DRcWjiC8UHpfpGYcImzSFZZpbFbqoAyhueCl28QU4f8QAbS6BqNfaAK9MMACWDcK -eTz3C5JK6CiUxOnGIxilXhljuybFUjR4jGl5eTRpuPWk95NTTYS36q+bx/1nYelx -0n4nnDMCAwEAAaOCAbMwggGvMB8GA1UdIwQYMBaAFA7hOqhTOjHVir7Bu61nGgOF -rTQOMB0GA1UdDgQWBBRbN7ECrPCdVvh58enwy3Dix46h2jAOBgNVHQ8BAf8EBAMC -B4AwDAYDVR0TAQH/BAIwADATBgNVHSUEDDAKBggrBgEFBQcDAzARBglghkgBhvhC -AQEEBAMCBBAwQAYDVR0gBDkwNzA1BgwrBgEEAbIxAQIBAwIwJTAjBggrBgEFBQcC -ARYXaHR0cHM6Ly9zZWN0aWdvLmNvbS9DUFMwQwYDVR0fBDwwOjA4oDagNIYyaHR0 -cDovL2NybC5zZWN0aWdvLmNvbS9TZWN0aWdvUlNBQ29kZVNpZ25pbmdDQS5jcmww -cwYIKwYBBQUHAQEEZzBlMD4GCCsGAQUFBzAChjJodHRwOi8vY3J0LnNlY3RpZ28u -Y29tL1NlY3RpZ29SU0FDb2RlU2lnbmluZ0NBLmNydDAjBggrBgEFBQcwAYYXaHR0 -cDovL29jc3Auc2VjdGlnby5jb20wKwYDVR0RBCQwIoEgam9uYXNAYml0Y29pbmNv -cmVjb2Rlc2lnbmluZy5vcmcwDQYJKoZIhvcNAQELBQADggEBAF/AIXcFBWCC2Red -SHN4Cvko5mdSkDNgzjVFc+OwAJ5RdOgbERde4PnHm3Qmrnx+uMetVnmrC8Fv1Iwb -kkR0bdbWBj6lF6zMsClIN6WJEfY+qfj1qi7wyucu+3OElYRC9bm5Lf0mEHQr8lJ1 -lGvAjPh+/hmxoVNbHFMZ1Ea+BrbjVwiSznt0gzdMh0CispBZKLWCIwRwi+hFjQrw -Z7RLH8HeCJ5Ojl/OTDQqh6AylQ7l9w9KHsUt4Jqy/AnCCyAj2/6xjdwnuo3tCZwb -g/9CydiAacD/83odphEeC2iBa+0wsj9bWmyYKY7S9n0u+wm3wBfZbSVMDDPk/la1 -3qCUDLk= +ExtTZWN0aWdvIFJTQSBDb2RlIFNpZ25pbmcgQ0EwHhcNMjAwMzI0MDAwMDAwWhcN +MjEwMzI0MjM1OTU5WjCBtzELMAkGA1UEBhMCQ0gxDTALBgNVBBEMBDgwMDUxDjAM +BgNVBAgMBVN0YXRlMRAwDgYDVQQHDAdaw7xyaWNoMRcwFQYDVQQJDA5NYXR0ZW5n +YXNzZSAyNzEuMCwGA1UECgwlQml0Y29pbiBDb3JlIENvZGUgU2lnbmluZyBBc3Nv +Y2lhdGlvbjEuMCwGA1UEAwwlQml0Y29pbiBDb3JlIENvZGUgU2lnbmluZyBBc3Nv +Y2lhdGlvbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMtxC8N4r/jE +OGOdFy/0UtiUvEczPZf9WYZz/7paAkc75XopHIE5/ssmoEX27gG9K00tf3Q62QAx +inZUPWkNTh8X0l+6uSGiIBFIV7dDgztIxnPcxaqw0k7Q2TEqKJvb5qm16zX6WfXJ +R2r6O5utUdQ3AarHnQq9fwdM1j5+ywS5u52te74ENgDMTMKUuB2J3KH1ASg5PAtO +CjPqPL+ZXJ7eT3M0Z+Lbu5ISZSqZB48BcCwOo/fOO0dAiLT9FE1iVtaCpBKHqGmd +glRjPzZdgDv8g28etRmk8wQ5pQmfL2gBjt/LtIgMPTdHHETKLxJO5H3y0CNx1vzL +ql7xNMxELxkCAwEAAaOCAbMwggGvMB8GA1UdIwQYMBaAFA7hOqhTOjHVir7Bu61n +GgOFrTQOMB0GA1UdDgQWBBSHBbl82FUJiUkXyyYJog1awYRsxjAOBgNVHQ8BAf8E +BAMCB4AwDAYDVR0TAQH/BAIwADATBgNVHSUEDDAKBggrBgEFBQcDAzARBglghkgB +hvhCAQEEBAMCBBAwQAYDVR0gBDkwNzA1BgwrBgEEAbIxAQIBAwIwJTAjBggrBgEF +BQcCARYXaHR0cHM6Ly9zZWN0aWdvLmNvbS9DUFMwQwYDVR0fBDwwOjA4oDagNIYy +aHR0cDovL2NybC5zZWN0aWdvLmNvbS9TZWN0aWdvUlNBQ29kZVNpZ25pbmdDQS5j +cmwwcwYIKwYBBQUHAQEEZzBlMD4GCCsGAQUFBzAChjJodHRwOi8vY3J0LnNlY3Rp +Z28uY29tL1NlY3RpZ29SU0FDb2RlU2lnbmluZ0NBLmNydDAjBggrBgEFBQcwAYYX +aHR0cDovL29jc3Auc2VjdGlnby5jb20wKwYDVR0RBCQwIoEgam9uYXNAYml0Y29p +bmNvcmVjb2Rlc2lnbmluZy5vcmcwDQYJKoZIhvcNAQELBQADggEBAAU59qJzQ2ED +aTMIQTsU01zIhZJ/xwQh78i0v2Mnr46RvzYrZOev+btF3SyUYD8veNnbYlY6yEYq +Vb+/PQnE3t1xlqR80qiTZCk/Wmxx/qKvQuWeRL5QQgvsCmWBpycQ7PNfwzOWxbPE +b0Hb2/VFFZfR9iltkfeInRUrzS96CJGYtm7dMf2JtnXYBcwpn1N8BSMH4nXVyN8g +VEE5KyjE7+/awYiSST7+e6Y7FE5AJ4f3FjqnRm+2XetTVqITwMLKZMoV283nSEeH +fA4FNAMGz9QeV38ol65NNqFP2vSSgVoPK79orqH9OOW2LSobt2qun+euddJIQeYV +CMP90b/2WPc= -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCB diff --git a/contrib/zmq/zmq_sub.py b/contrib/zmq/zmq_sub.py old mode 100644 new mode 100755 index d62a9ce4c9..7824e526e3 --- a/contrib/zmq/zmq_sub.py +++ b/contrib/zmq/zmq_sub.py @@ -11,7 +11,8 @@ -zmqpubrawtx=tcp://127.0.0.1:28332 \ -zmqpubrawblock=tcp://127.0.0.1:28332 \ -zmqpubhashtx=tcp://127.0.0.1:28332 \ - -zmqpubhashblock=tcp://127.0.0.1:28332 + -zmqpubhashblock=tcp://127.0.0.1:28332 \ + -zmqpubsequence=tcp://127.0.0.1:28332 We use the asyncio library here. `self.handle()` installs itself as a future at the end of the function. Since it never returns with the event @@ -47,16 +48,14 @@ def __init__(self): self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashtx") self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawblock") self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawtx") + self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "sequence") self.zmqSubSocket.connect("tcp://127.0.0.1:%i" % port) async def handle(self) : - msg = await self.zmqSubSocket.recv_multipart() - topic = msg[0] - body = msg[1] + topic, body, seq = await self.zmqSubSocket.recv_multipart() sequence = "Unknown" - if len(msg[-1]) == 4: - msgSequence = struct.unpack('/dev/null) $(host_arch)_$(host_os)_id_string+=$(shell $(host_RANLIB) --version 2>/dev/null) $(host_arch)_$(host_os)_id_string+=$(shell $(host_STRIP) --version 2>/dev/null) +ifneq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) +build_id_string+=system_clang +$(host_arch)_$(host_os)_id_string+=system_clang +endif + qrencode_packages_$(NO_QR) = $(qrencode_packages) qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages) $(qrencode_packages_) -wallet_packages_$(NO_WALLET) = $(wallet_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) zmq_packages_$(NO_ZMQ) = $(zmq_packages) - -rapidcheck_packages_$(RAPIDCHECK) = $(rapidcheck_packages) +multiprocess_packages_$(MULTIPROCESS) = $(multiprocess_packages) packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(wallet_packages_) $(upnp_packages_) native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages) @@ -118,19 +148,26 @@ ifneq ($(zmq_packages_),) packages += $(zmq_packages) endif -ifeq ($(rapidcheck_packages_),) -packages += $(rapidcheck_packages) +ifeq ($(multiprocess_packages_),) +packages += $(multiprocess_packages) +native_packages += $(multiprocess_native_packages) 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) include funcs.mk +binutils_path=$($($(host_arch)_$(host_os)_native_binutils)_prefixbin) +ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) toolchain_path=$($($(host_arch)_$(host_os)_native_toolchain)_prefixbin) +else +toolchain_path= +endif final_build_id_long+=$(shell $(build_SHA256SUM) config.site.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) @@ -146,10 +183,10 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_ $(AT)sed -e 's|@HOST@|$(host)|' \ -e 's|@CC@|$(toolchain_path)$(host_CC)|' \ -e 's|@CXX@|$(toolchain_path)$(host_CXX)|' \ - -e 's|@AR@|$(toolchain_path)$(host_AR)|' \ - -e 's|@RANLIB@|$(toolchain_path)$(host_RANLIB)|' \ - -e 's|@NM@|$(toolchain_path)$(host_NM)|' \ - -e 's|@STRIP@|$(toolchain_path)$(host_STRIP)|' \ + -e 's|@AR@|$(binutils_path)$(host_AR)|' \ + -e 's|@RANLIB@|$(binutils_path)$(host_RANLIB)|' \ + -e 's|@NM@|$(binutils_path)$(host_NM)|' \ + -e 's|@STRIP@|$(binutils_path)$(host_STRIP)|' \ -e 's|@build_os@|$(build_os)|' \ -e 's|@host_os@|$(host_os)|' \ -e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \ @@ -162,6 +199,7 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_ -e 's|@no_zmq@|$(NO_ZMQ)|' \ -e 's|@no_wallet@|$(NO_WALLET)|' \ -e 's|@no_upnp@|$(NO_UPNP)|' \ + -e 's|@multiprocess@|$(MULTIPROCESS)|' \ -e 's|@debug@|$(DEBUG)|' \ $< > $@ $(AT)touch $@ diff --git a/depends/README.md b/depends/README.md index abcf9e5d83..370506cba0 100644 --- a/depends/README.md +++ b/depends/README.md @@ -25,7 +25,7 @@ Common `host-platform-triplets` for cross compilation are: - `i686-pc-linux-gnu` for Linux 32 bit - `x86_64-pc-linux-gnu` for x86 Linux - `x86_64-w64-mingw32` for Win64 -- `x86_64-apple-darwin16` for macOS +- `x86_64-apple-darwin18` for 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) @@ -44,9 +44,9 @@ The paths are automatically configured and no other options are needed unless ta #### For macOS cross compilation - sudo apt-get install curl librsvg2-bin libtiff-tools bsdmainutils cmake imagemagick libcap-dev libz-dev libbz2-dev python3-setuptools + sudo apt-get install curl librsvg2-bin libtiff-tools bsdmainutils cmake imagemagick libcap-dev libz-dev libbz2-dev python3-setuptools libtinfo5 -#### For Win32/Win64 cross compilation +#### For Win64 cross compilation - see [build-windows.md](../doc/build-windows.md#cross-compilation-for-ubuntu-and-windows-subsystem-for-linux) @@ -80,21 +80,48 @@ For linux S390X cross compilation: sudo apt-get install g++-s390x-linux-gnu binutils-s390x-linux-gnu ### 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 sdk's can be found (used by macOS) - FALLBACK_DOWNLOAD_PATH: If a source file can't be fetched, try here before giving up - 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_UPNP: Don't download/build/cache packages needed for enabling upnp - DEBUG: disable some optimizations and enable more runtime checking - RAPIDCHECK: build rapidcheck (experimental, requires cmake) - HOST_ID_SALT: Optional salt to use when generating host package ids - BUILD_ID_SALT: Optional salt to use when generating build package ids +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 sdk's can be found (used by macOS)
+
FALLBACK_DOWNLOAD_PATH
+
If a source file can't be fetched, try here before giving up
+
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
+
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.
+
If some packages are not built, for example `make NO_WALLET=1`, the appropriate options will be passed to BGL's configure. In this case, `--disable-wallet`. diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk index eb587fca89..f4103fc1f2 100644 --- a/depends/builders/darwin.mk +++ b/depends/builders/darwin.mk @@ -1,5 +1,5 @@ -build_darwin_CC:=$(shell xcrun -f clang) -build_darwin_CXX:=$(shell xcrun -f clang++) +build_darwin_CC:=$(shell xcrun -f clang) --sysroot $(shell xcrun --show-sdk-path) +build_darwin_CXX:=$(shell xcrun -f clang++) --sysroot $(shell xcrun --show-sdk-path) build_darwin_AR:=$(shell xcrun -f ar) build_darwin_RANLIB:=$(shell xcrun -f ranlib) build_darwin_STRIP:=$(shell xcrun -f strip) @@ -19,4 +19,5 @@ darwin_LIBTOOL:=$(shell xcrun -f libtool) darwin_OTOOL:=$(shell xcrun -f otool) darwin_NM:=$(shell xcrun -f nm) darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool) +darwin_native_binutils= darwin_native_toolchain= diff --git a/depends/config.site.in b/depends/config.site.in index c5731e5269..f4531830c8 100644 --- a/depends/config.site.in +++ b/depends/config.site.in @@ -1,4 +1,14 @@ -depends_prefix="`dirname ${ac_site_file}`/.." +# shellcheck shell=sh disable=SC2034 # Many variables set will be used in + # ./configure but shellcheck doesn't know + # that, hence: disable=SC2034 + +true # Dummy command because shellcheck treats all directives before first + # command as file-wide, and we only want to disable for one line. + # + # See: https://github.com/koalaman/shellcheck/wiki/Directive + +# shellcheck disable=SC2154 +depends_prefix="$(cd "$(dirname ${ac_site_file})/.." && pwd)" cross_compiling=maybe host_alias=@HOST@ @@ -16,6 +26,9 @@ fi if test -z $with_qt_bindir && test -z "@no_qt@"; then with_qt_bindir=$depends_prefix/native/bin fi +if test -z $with_mpgen && test -n "@multiprocess@"; then + with_mpgen=$depends_prefix/native +fi if test -z $with_qrencode && test -n "@no_qr@"; then with_qrencode=no @@ -25,6 +38,10 @@ if test -z $enable_wallet && test -n "@no_wallet@"; then enable_wallet=no fi +if test -z $enable_multiprocess && test -n "@multiprocess@"; then + enable_multiprocess=yes +fi + if test -z $with_miniupnpc && test -n "@no_upnp@"; then with_miniupnpc=no fi @@ -42,24 +59,15 @@ if test x@host_os@ = xdarwin; then PORT=no fi -if test x@host_os@ = xmingw32; then - if test -z $with_qt_incdir; then - with_qt_incdir=$depends_prefix/include - fi - if test -z $with_qt_libdir; then - with_qt_libdir=$depends_prefix/lib - fi -fi - PATH=$depends_prefix/native/bin:$PATH -PKG_CONFIG="`which pkg-config` --static" +PKG_CONFIG="$(which pkg-config) --static" # These two need to remain exported because pkg-config does not see them # otherwise. That means they must be unexported at the end of configure.ac to # avoid ruining the cache. Sigh. export PKG_CONFIG_PATH=$depends_prefix/share/pkgconfig:$depends_prefix/lib/pkgconfig if test -z "@allow_host_packages@"; then - export PKGCONFIG_LIBDIR= + export PKG_CONFIG_LIBDIR=$depends_prefix/lib/pkgconfig fi CPPFLAGS="-I$depends_prefix/include/ $CPPFLAGS" @@ -71,7 +79,7 @@ fi if test -n "@CXX@" -a -z "${CXX}"; then CXX="@CXX@" fi -PYTHONPATH=$depends_prefix/native/lib/python3/dist-packages:$PYTHONPATH +PYTHONPATH="${depends_prefix}/native/lib/python3/dist-packages${PYTHONPATH:+${PATH_SEPARATOR}}${PYTHONPATH}" if test -n "@AR@"; then AR=@AR@ diff --git a/depends/funcs.mk b/depends/funcs.mk index a4434b5167..58d882eb05 100644 --- a/depends/funcs.mk +++ b/depends/funcs.mk @@ -41,7 +41,7 @@ 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)_dependencies))) +$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($($(1)_type)_native_binutils) $($(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_string)) $(eval $(1)_build_id:=$(shell echo -n "$($(1)_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH))) @@ -130,11 +130,11 @@ $(1)_config_env+=$($(1)_config_env_$(host_arch)_$(host_os)) $($(1)_config_env_$( $(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+=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)_autoconf=./configure --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)" - ifneq ($($(1)_nm),) $(1)_autoconf += NM="$$($(1)_nm)" endif @@ -156,6 +156,20 @@ endif ifneq ($($(1)_ldflags),) $(1)_autoconf += LDFLAGS="$$($(1)_ldflags)" endif + +$(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)" +ifneq ($($(1)_type),build) +ifneq ($(host),$(build)) +$(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system) +$(1)_cmake += -DCMAKE_C_COMPILER_TARGET=$(host) +$(1)_cmake += -DCMAKE_CXX_COMPILER_TARGET=$(host) +endif +endif endef define int_add_cmds @@ -251,4 +265,4 @@ $(foreach package,$(all_packages),$(eval $(call int_config_attach_build_config,$ $(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)_unpacked): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) )) +$(foreach package,$(packages),$(eval $($(package)_extracted): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) $($($(host_arch)_$(host_os)_native_binutils)_cached) )) diff --git a/depends/hosts/android.mk b/depends/hosts/android.mk index 969ec2a1cb..eabd84bbbe 100644 --- a/depends/hosts/android.mk +++ b/depends/hosts/android.mk @@ -9,3 +9,4 @@ android_CXX=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang++ android_CC=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang android_RANLIB=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)-ranlib endif +android_cmake_system=Android diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index 1f88c209cf..e9faeba336 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -1,9 +1,35 @@ -OSX_MIN_VERSION=10.12 -OSX_SDK_VERSION=10.11 -OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk -LD64_VERSION=253.9 -darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -stdlib=libc++ +OSX_MIN_VERSION=10.14 +OSX_SDK_VERSION=10.15.1 +XCODE_VERSION=11.3.1 +XCODE_BUILD_ID=11C505 +LD64_VERSION=530 + +OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers + +# Flag explanations: +# +# -mlinker-version +# +# 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. +# +# -nostdinc++ -isystem $(OSX_SDK)/usr/include/c++/v1 +# +# Forces clang to use the libc++ headers from our SDK and completely +# forget about the libc++ headers from the standard directories +# +# TODO: Once we start requiring a clang version that has the +# -stdlib++-isystem flag first introduced here: +# https://reviews.llvm.org/D64089, we should use that instead. Read the +# differential summary there for more details. +# +darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -B$(build_prefix)/bin +darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -stdlib=libc++ -mlinker-version=$(LD64_VERSION) -B$(build_prefix)/bin -nostdinc++ -isystem $(OSX_SDK)/usr/include/c++/v1 darwin_CFLAGS=-pipe darwin_CXXFLAGS=$(darwin_CFLAGS) @@ -14,4 +40,11 @@ darwin_release_CXXFLAGS=$(darwin_release_CFLAGS) darwin_debug_CFLAGS=-O1 darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS) +darwin_native_binutils=native_cctools +ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) darwin_native_toolchain=native_cctools +else +darwin_native_toolchain= +endif + +darwin_cmake_system=Darwin diff --git a/depends/hosts/default.mk b/depends/hosts/default.mk index 144e5f88b7..258619a9d0 100644 --- a/depends/hosts/default.mk +++ b/depends/hosts/default.mk @@ -13,9 +13,18 @@ default_host_OTOOL = $(host_toolchain)otool default_host_NM = $(host_toolchain)nm define add_host_tool_func +ifneq ($(filter $(origin $1),undefined default),) +# Do not consider the well-known var $1 if it is undefined or is taking a value +# that is predefined by "make" (e.g. the make variable "CC" has a predefined +# value of "cc") $(host_os)_$1?=$$(default_host_$1) $(host_arch)_$(host_os)_$1?=$$($(host_os)_$1) $(host_arch)_$(host_os)_$(release_type)_$1?=$$($(host_os)_$1) +else +$(host_os)_$1=$(or $($1),$($(host_os)_$1),$(default_host_$1)) +$(host_arch)_$(host_os)_$1=$(or $($1),$($(host_arch)_$(host_os)_$1),$$($(host_os)_$1)) +$(host_arch)_$(host_os)_$(release_type)_$1=$(or $($1),$($(host_arch)_$(host_os)_$(release_type)_$1),$$($(host_os)_$1)) +endif host_$1=$$($(host_arch)_$(host_os)_$1) endef diff --git a/depends/hosts/linux.mk b/depends/hosts/linux.mk index b13a0f1ad7..8ab448ce5f 100644 --- a/depends/hosts/linux.mk +++ b/depends/hosts/linux.mk @@ -29,3 +29,4 @@ 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 diff --git a/depends/hosts/mingw32.mk b/depends/hosts/mingw32.mk index dbfb62fdcf..be5fec570c 100644 --- a/depends/hosts/mingw32.mk +++ b/depends/hosts/mingw32.mk @@ -8,3 +8,5 @@ mingw32_debug_CFLAGS=-O1 mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS) mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC + +mingw_cmake_system=Windows diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk index b679438c6f..9e533cc61b 100644 --- a/depends/packages/bdb.mk +++ b/depends/packages/bdb.mk @@ -4,18 +4,19 @@ $(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)_cxxflags=-std=c++11 +$(package)_cflags+=-Wno-error=implicit-function-declaration +$(package)_cxxflags=-std=c++17 $(package)_cppflags_mingw32=-DUNICODE -D_UNICODE endef define $(package)_preprocess_cmds - sed -i.old 's/__atomic_compare_exchange/__atomic_compare_exchange_db/' dbinc/atomic.h && \ - sed -i.old 's/atomic_init/atomic_init_db/' dbinc/atomic.h mp/mp_region.c mp/mp_mvcc.c mp/mp_fget.c mutex/mut_method.c mutex/mut_tas.c && \ + patch -p1 < $($(package)_patch_dir)/clang_cxx_11.patch && \ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub dist endef diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index d360bb5ba6..ff8a252db9 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -1,45 +1,45 @@ package=boost -$(package)_version=1_70_0 -$(package)_download_path=https://dl.bintray.com/boostorg/release/1.70.0/source/ -$(package)_file_name=$(package)_$($(package)_version).tar.bz2 -$(package)_sha256_hash=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778 +$(package)_version=1_71_0 +$(package)_download_path=https://dl.bintray.com/boostorg/release/$(subst _,.,$($(package)_version))/source/ +$(package)_file_name=boost_$($(package)_version).tar.bz2 +$(package)_sha256_hash=d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee +$(package)_dependencies=native_b2 define $(package)_set_vars $(package)_config_opts_release=variant=release $(package)_config_opts_debug=variant=debug $(package)_config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam -$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1 -$(package)_config_opts_linux=threadapi=pthread runtime-link=shared -$(package)_config_opts_darwin=--toolset=clang-darwin runtime-link=shared -$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static -$(package)_config_opts_x86_64_mingw32=address-model=64 -$(package)_config_opts_i686_mingw32=address-model=32 -$(package)_config_opts_i686_linux=address-model=32 architecture=x86 -$(package)_config_opts_i686_android=address-model=32 -$(package)_config_opts_aarch64_android=address-model=64 -$(package)_config_opts_x86_64_android=address-model=64 -$(package)_config_opts_armv7a_android=address-model=32 +$(package)_config_opts+=threading=multi link=static -sNO_COMPRESSION=1 +$(package)_config_opts_linux=target-os=linux threadapi=pthread runtime-link=shared +$(package)_config_opts_darwin=target-os=darwin runtime-link=shared +$(package)_config_opts_mingw32=target-os=windows binary-format=pe threadapi=win32 runtime-link=static +$(package)_config_opts_x86_64=architecture=x86 address-model=64 +$(package)_config_opts_i686=architecture=x86 address-model=32 +$(package)_config_opts_aarch64=address-model=64 +$(package)_config_opts_armv7a=address-model=32 +ifneq (,$(findstring clang,$($(package)_cxx))) +$(package)_toolset_$(host_os)=clang +else $(package)_toolset_$(host_os)=gcc -$(package)_archiver_$(host_os)=$($(package)_ar) -$(package)_toolset_darwin=clang-darwin -$(package)_config_libraries=chrono,filesystem,system,thread,test -$(package)_cxxflags=-std=c++11 -fvisibility=hidden +endif +$(package)_config_libraries=filesystem,system,thread,test +$(package)_cxxflags=-std=c++17 -fvisibility=hidden $(package)_cxxflags_linux=-fPIC $(package)_cxxflags_android=-fPIC endef define $(package)_preprocess_cmds - echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$(boost_archiver_$(host_os))\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam + echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cflags)\" \"$($(package)_cxxflags)\" \"$($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$($(package)_ar)\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam endef define $(package)_config_cmds - ./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries) + ./bootstrap.sh --without-icu --with-libraries=$($(package)_config_libraries) --with-toolset=$($(package)_toolset_$(host_os)) --with-bjam=b2 endef define $(package)_build_cmds - ./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage + b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) stage endef define $(package)_stage_cmds - ./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install + b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) install endef diff --git a/depends/packages/capnp.mk b/depends/packages/capnp.mk new file mode 100644 index 0000000000..abeb26545f --- /dev/null +++ b/depends/packages/capnp.mk @@ -0,0 +1,18 @@ +package=capnp +$(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) + +define $(package)_config_cmds + $($(package)_autoconf) --with-external-capnp +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef diff --git a/depends/packages/fontconfig.mk b/depends/packages/fontconfig.mk index 128599ba77..0d5f94f380 100644 --- a/depends/packages/fontconfig.mk +++ b/depends/packages/fontconfig.mk @@ -4,23 +4,23 @@ $(package)_download_path=https://www.freedesktop.org/software/fontconfig/release $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3 $(package)_dependencies=freetype expat +$(package)_patches=remove_char_width_usage.patch gperf_header_regen.patch define $(package)_set_vars $(package)_config_opts=--disable-docs --disable-static --disable-libxml2 --disable-iconv $(package)_config_opts += --disable-dependency-tracking --enable-option-checking endef +define $(package)_preprocess_cmds + patch -p1 < $($(package)_patch_dir)/remove_char_width_usage.patch && \ + patch -p1 < $($(package)_patch_dir)/gperf_header_regen.patch +endef + define $(package)_config_cmds $($(package)_autoconf) endef -# 2.12.1 uses CHAR_WIDTH which is reserved and clashes with some glibc versions, but newer versions of fontconfig -# have broken makefiles which needlessly attempt to re-generate headers with gperf. -# Instead, change all uses of CHAR_WIDTH, and disable the rule that forces header re-generation. -# This can be removed once the upstream build is fixed. define $(package)_build_cmds - sed -i 's/CHAR_WIDTH/CHARWIDTH/g' fontconfig/fontconfig.h src/fcobjshash.gperf src/fcobjs.h src/fcobjshash.h && \ - sed -i 's/fcobjshash.h: fcobjshash.gperf/fcobjshash.h:/' src/Makefile && \ $(MAKE) endef diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index eb45e14f6f..1cd5a1749a 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -3,17 +3,23 @@ $(package)_version=2.1.11-stable $(package)_download_path=https://github.com/libevent/libevent/archive/ $(package)_file_name=release-$($(package)_version).tar.gz $(package)_sha256_hash=229393ab2bf0dc94694f21836846b424f3532585bac3468738b7bf752c03901e +$(package)_patches=0001-fix-windows-getaddrinfo.patch define $(package)_preprocess_cmds + patch -p1 < $($(package)_patch_dir)/0001-fix-windows-getaddrinfo.patch && \ ./autogen.sh endef +# 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 +# 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_android=--with-pic + $(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601 endef define $(package)_config_cmds diff --git a/depends/packages/libmultiprocess.mk b/depends/packages/libmultiprocess.mk new file mode 100644 index 0000000000..3e5cf5f160 --- /dev/null +++ b/depends/packages/libmultiprocess.mk @@ -0,0 +1,18 @@ +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) boost capnp + +define $(package)_config_cmds + $($(package)_cmake) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk index fdbe22cda6..49a584e462 100644 --- a/depends/packages/miniupnpc.mk +++ b/depends/packages/miniupnpc.mk @@ -3,6 +3,7 @@ $(package)_version=2.0.20180203 $(package)_download_path=https://miniupnp.tuxfamily.org/files/ $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=90dda8c7563ca6cd4a83e23b3c66dbbea89603a1675bfdb852897c2c9cc220b7 +$(package)_patches=dont_use_wingen.patch define $(package)_set_vars $(package)_build_opts=CC="$($(package)_cc)" @@ -14,7 +15,7 @@ endef define $(package)_preprocess_cmds mkdir dll && \ sed -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"$($(package)_version)\"|' -e 's|OS/version|$(host)|' miniupnpcstrings.h.in > miniupnpcstrings.h && \ - sed -i.old "s|miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings|miniupnpcstrings.h: miniupnpcstrings.h.in|" Makefile.mingw + patch -p1 < $($(package)_patch_dir)/dont_use_wingen.patch endef define $(package)_build_cmds diff --git a/depends/packages/native_b2.mk b/depends/packages/native_b2.mk new file mode 100644 index 0000000000..aaa37cdcfa --- /dev/null +++ b/depends/packages/native_b2.mk @@ -0,0 +1,20 @@ +package=native_b2 +$(package)_version=$(boost_version) +$(package)_download_path=$(boost_download_path) +$(package)_file_name=$(boost_file_name) +$(package)_sha256_hash=$(boost_sha256_hash) +$(package)_build_subdir=tools/build/src/engine +ifneq (,$(findstring clang,$($(package)_cxx))) +$(package)_toolset_$(host_os)=clang +else +$(package)_toolset_$(host_os)=gcc +endif + +define $(package)_build_cmds + CXX="$($(package)_cxx)" CXXFLAGS="$($(package)_cxxflags)" ./build.sh "$($(package)_toolset_$(host_os))" +endef + +define $(package)_stage_cmds + mkdir -p "$($(package)_staging_prefix_dir)"/bin/ && \ + cp b2 "$($(package)_staging_prefix_dir)"/bin/ +endef diff --git a/depends/packages/native_biplist.mk b/depends/packages/native_biplist.mk deleted file mode 100644 index c3054cbd1a..0000000000 --- a/depends/packages/native_biplist.mk +++ /dev/null @@ -1,15 +0,0 @@ -package=native_biplist -$(package)_version=1.0.3 -$(package)_download_path=https://bitbucket.org/wooster/biplist/downloads -$(package)_file_name=biplist-$($(package)_version).tar.gz -$(package)_sha256_hash=4c0549764c5fe50b28042ec21aa2e14fe1a2224e239a1dae77d9e7f3932aa4c6 -$(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages - -define $(package)_build_cmds - python3 setup.py build -endef - -define $(package)_stage_cmds - mkdir -p $($(package)_install_libdir) && \ - python3 setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir) -endef diff --git a/depends/packages/native_capnp.mk b/depends/packages/native_capnp.mk new file mode 100644 index 0000000000..ed5a6deee2 --- /dev/null +++ b/depends/packages/native_capnp.mk @@ -0,0 +1,18 @@ +package=native_capnp +$(package)_version=0.7.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 + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk index a065256c1c..d56b636695 100644 --- a/depends/packages/native_cctools.mk +++ b/depends/packages/native_cctools.mk @@ -1,45 +1,86 @@ package=native_cctools -$(package)_version=807d6fd1be5d2224872e381870c0a75387fe05e6 -$(package)_download_path=https://github.com/theuni/cctools-port/archive +$(package)_version=55562e4073dea0fbfd0b20e0bf69ffe6390c7f97 +$(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive $(package)_file_name=$($(package)_version).tar.gz -$(package)_sha256_hash=a09c9ba4684670a0375e42d9d67e7f12c1f62581a27f28f7c825d6d7032ccc6a +$(package)_sha256_hash=e51995a843533a3dac155dd0c71362dd471597a2d23f13dff194c6285362f875 $(package)_build_subdir=cctools -$(package)_clang_version=3.7.1 -$(package)_clang_download_path=https://llvm.org/releases/$($(package)_clang_version) +$(package)_patches=ld64_disable_threading.patch + +ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) +$(package)_clang_version=8.0.0 +$(package)_clang_download_path=https://releases.llvm.org/$($(package)_clang_version) $(package)_clang_download_file=clang+llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz $(package)_clang_file_name=clang-llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz -$(package)_clang_sha256_hash=99b28a6b48e793705228a390471991386daa33a9717cd9ca007fcdde69608fd9 -$(package)_extra_sources=$($(package)_clang_file_name) +$(package)_clang_sha256_hash=9ef854b71949f825362a119bf2597f744836cb571131ae6b721cd102ffea8cd0 +endif + +$(package)_libtapi_version=3efb201881e7a76a21e0554906cf306432539cef +$(package)_libtapi_download_path=https://github.com/tpoechtrager/apple-libtapi/archive +$(package)_libtapi_download_file=$($(package)_libtapi_version).tar.gz +$(package)_libtapi_file_name=$($(package)_libtapi_version).tar.gz +$(package)_libtapi_sha256_hash=380c1ca37cfa04a8699d0887a8d3ee1ad27f3d08baba78887c73b09485c0fbd3 +$(package)_extra_sources=$($(package)_libtapi_file_name) +ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) +$(package)_extra_sources += $($(package)_clang_file_name) +endif + +ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) +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)_clang_download_path),$($(package)_clang_download_file),$($(package)_clang_file_name),$($(package)_clang_sha256_hash)) && \ +$(call fetch_file,$(package),$($(package)_libtapi_download_path),$($(package)_libtapi_download_file),$($(package)_libtapi_file_name),$($(package)_libtapi_sha256_hash)) +endef +else 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)_clang_download_path),$($(package)_clang_download_file),$($(package)_clang_file_name),$($(package)_clang_sha256_hash)) +$(call fetch_file,$(package),$($(package)_libtapi_download_path),$($(package)_libtapi_download_file),$($(package)_libtapi_file_name),$($(package)_libtapi_sha256_hash)) endef +endif +ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) define $(package)_extract_cmds mkdir -p $($(package)_extract_dir) && \ echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \ echo "$($(package)_clang_sha256_hash) $($(package)_source_dir)/$($(package)_clang_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + echo "$($(package)_libtapi_sha256_hash) $($(package)_source_dir)/$($(package)_libtapi_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ $(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \ - mkdir -p toolchain/bin toolchain/lib/clang/3.5/include && \ + mkdir -p toolchain/bin toolchain/lib/clang/$($(package)_clang_version)/include && \ + mkdir -p libtapi && \ + tar --no-same-owner --strip-components=1 -C libtapi -xf $($(package)_source_dir)/$($(package)_libtapi_file_name) && \ tar --no-same-owner --strip-components=1 -C toolchain -xf $($(package)_source_dir)/$($(package)_clang_file_name) && \ rm -f toolchain/lib/libc++abi.so* && \ - echo "#!/bin/sh" > toolchain/bin/$(host)-dsymutil && \ - echo "exit 0" >> toolchain/bin/$(host)-dsymutil && \ - chmod +x toolchain/bin/$(host)-dsymutil && \ tar --no-same-owner --strip-components=1 -xf $($(package)_source) 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)_libtapi_sha256_hash) $($(package)_source_dir)/$($(package)_libtapi_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + $(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + mkdir -p libtapi && \ + tar --no-same-owner --strip-components=1 -C libtapi -xf $($(package)_source_dir)/$($(package)_libtapi_file_name) && \ + tar --no-same-owner --strip-components=1 -xf $($(package)_source) +endef +endif define $(package)_set_vars -$(package)_config_opts=--target=$(host) --disable-lto-support -$(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib -$(package)_cc=$($(package)_extract_dir)/toolchain/bin/clang -$(package)_cxx=$($(package)_extract_dir)/toolchain/bin/clang++ + $(package)_config_opts=--target=$(host) --with-libtapi=$($(package)_extract_dir) + $(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib + ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) + $(package)_config_opts+=--enable-lto-support --with-llvm-config=$($(package)_extract_dir)/toolchain/bin/llvm-config + $(package)_cc=$($(package)_extract_dir)/toolchain/bin/clang + $(package)_cxx=$($(package)_extract_dir)/toolchain/bin/clang++ + else + $(package)_cc=clang + $(package)_cxx=clang++ + endif endef define $(package)_preprocess_cmds - cd $($(package)_build_subdir); ./autogen.sh && \ - sed -i.old "/define HAVE_PTHREADS/d" ld64/src/ld/InputFiles.h + CC=$($(package)_cc) CXX=$($(package)_cxx) INSTALLPREFIX=$($(package)_extract_dir) ./libtapi/build.sh && \ + CC=$($(package)_cc) CXX=$($(package)_cxx) INSTALLPREFIX=$($(package)_extract_dir) ./libtapi/install.sh && \ + patch -p1 < $($(package)_patch_dir)/ld64_disable_threading.patch endef define $(package)_config_cmds @@ -50,8 +91,12 @@ define $(package)_build_cmds $(MAKE) endef +ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install && \ + mkdir -p $($(package)_staging_prefix_dir)/lib/ && \ + cd $($(package)_extract_dir) && \ + cp lib/libtapi.so.6 $($(package)_staging_prefix_dir)/lib/ && \ cd $($(package)_extract_dir)/toolchain && \ mkdir -p $($(package)_staging_prefix_dir)/lib/clang/$($(package)_clang_version)/include && \ mkdir -p $($(package)_staging_prefix_dir)/bin $($(package)_staging_prefix_dir)/include && \ @@ -59,7 +104,13 @@ define $(package)_stage_cmds cp -P bin/clang++ $($(package)_staging_prefix_dir)/bin/ &&\ cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \ cp -rf lib/clang/$($(package)_clang_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_clang_version)/include/ && \ - cp bin/llvm-dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \ - if `test -d include/c++/`; then cp -rf include/c++/ $($(package)_staging_prefix_dir)/include/; fi && \ - if `test -d lib/c++/`; then cp -rf lib/c++/ $($(package)_staging_prefix_dir)/lib/; fi + cp bin/dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil +endef +else +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install && \ + mkdir -p $($(package)_staging_prefix_dir)/lib/ && \ + cd $($(package)_extract_dir) && \ + cp lib/libtapi.so.6 $($(package)_staging_prefix_dir)/lib/ endef +endif diff --git a/depends/packages/native_cdrkit.mk b/depends/packages/native_cdrkit.mk index 8243458ec8..7bdf2d7dfd 100644 --- a/depends/packages/native_cdrkit.mk +++ b/depends/packages/native_cdrkit.mk @@ -9,8 +9,10 @@ define $(package)_preprocess_cmds patch -p1 < $($(package)_patch_dir)/cdrkit-deterministic.patch endef +# Starting with 10.1, GCC defaults to -fno-common, resulting in linking errors. +# Pass -fcommon to retain the legacy behaviour. define $(package)_config_cmds - cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix) + $($(package)_cmake) -DCMAKE_C_FLAGS="$$($(1)_cflags) -fcommon" endef define $(package)_build_cmds diff --git a/depends/packages/native_ds_store.mk b/depends/packages/native_ds_store.mk index f99b689ecd..44108925a4 100644 --- a/depends/packages/native_ds_store.mk +++ b/depends/packages/native_ds_store.mk @@ -1,10 +1,9 @@ package=native_ds_store -$(package)_version=1.1.2 +$(package)_version=1.3.0 $(package)_download_path=https://github.com/al45tair/ds_store/archive/ $(package)_file_name=v$($(package)_version).tar.gz -$(package)_sha256_hash=3b3ecb7bf0a5157f5b6010bc3af7c141fb0ad3527084e63336220d22744bc20c +$(package)_sha256_hash=76b3280cd4e19e5179defa23fb594a9dd32643b0c80d774bd3108361d94fb46d $(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages -$(package)_dependencies=native_biplist define $(package)_build_cmds python3 setup.py build diff --git a/depends/packages/native_libdmg-hfsplus.mk b/depends/packages/native_libdmg-hfsplus.mk index 8493f1d979..035b767188 100644 --- a/depends/packages/native_libdmg-hfsplus.mk +++ b/depends/packages/native_libdmg-hfsplus.mk @@ -12,7 +12,7 @@ define $(package)_preprocess_cmds endef define $(package)_config_cmds - cmake -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix) .. + $($(package)_cmake) -DCMAKE_C_FLAGS="$$($(1)_cflags) -Wl,--build-id=none" .. endef define $(package)_build_cmds diff --git a/depends/packages/native_libmultiprocess.mk b/depends/packages/native_libmultiprocess.mk new file mode 100644 index 0000000000..c50fdc3f6b --- /dev/null +++ b/depends/packages/native_libmultiprocess.mk @@ -0,0 +1,18 @@ +package=native_libmultiprocess +$(package)_version=5741d750a04e644a03336090d8979c6d033e32c0 +$(package)_download_path=https://github.com/chaincodelabs/libmultiprocess/archive +$(package)_file_name=$($(package)_version).tar.gz +$(package)_sha256_hash=ac848db49a6ed53e423c62d54bd87f1f08cbb0326254a8667e10bbfe5bf032a4 +$(package)_dependencies=native_capnp + +define $(package)_config_cmds + $($(package)_cmake) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef diff --git a/depends/packages/native_mac_alias.mk b/depends/packages/native_mac_alias.mk index e60b99dccc..5fe027fb8a 100644 --- a/depends/packages/native_mac_alias.mk +++ b/depends/packages/native_mac_alias.mk @@ -1,8 +1,8 @@ package=native_mac_alias -$(package)_version=2.0.7 +$(package)_version=2.1.1 $(package)_download_path=https://github.com/al45tair/mac_alias/archive/ $(package)_file_name=v$($(package)_version).tar.gz -$(package)_sha256_hash=6f606d3b6bccd2112aeabf1a063f5b5ece87005a5d7e97c8faca23b916e88838 +$(package)_sha256_hash=c0ffceee14f7d04a6eb323fb7b8217dc3f373b346198d2ca42300a8362db7efa $(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages define $(package)_build_cmds diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index d8ccb208cc..4b4cc7d9ff 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -7,18 +7,22 @@ qrencode_packages = qrencode qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig qt_android_packages=qt -rapidcheck_packages = rapidcheck - qt_darwin_packages=qt qt_mingw32_packages=qt -wallet_packages=bdb +bdb_packages=bdb +sqlite_packages=sqlite zmq_packages=zeromq upnp_packages=miniupnpc -darwin_native_packages = native_biplist native_ds_store native_mac_alias +multiprocess_packages = libmultiprocess capnp +multiprocess_native_packages = native_libmultiprocess native_capnp + +darwin_native_packages = native_ds_store native_mac_alias + +$(host_arch)_$(host_os)_native_packages += native_b2 ifneq ($(build_os),darwin) darwin_native_packages += native_cctools native_cdrkit native_libdmg-hfsplus diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 37c1afe93c..61f39337e4 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -8,7 +8,11 @@ $(package)_dependencies=zlib $(package)_linux_dependencies=freetype fontconfig libxcb $(package)_build_subdir=qtbase $(package)_qt_libs=corelib network widgets gui plugins testlib -$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_rcc_determinism.patch fix_riscv64_arch.patch xkb-default.patch no-xlib.patch fix_android_qmake_conf.patch fix_android_jni_static.patch +$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch +$(package)_patches+= fix_rcc_determinism.patch fix_riscv64_arch.patch xkb-default.patch no-xlib.patch +$(package)_patches+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch +$(package)_patches+= freetype_back_compat.patch drop_lrelease_dependency.patch fix_powerpc_libpng.patch +$(package)_patches+= fix_mingw_cross_compile.patch fix_qpainter_non_determinism.patch $(package)_qttranslations_file_name=qttranslations-$($(package)_suffix) $(package)_qttranslations_sha256_hash=fb5a47799754af73d3bf501fe513342cfe2fc37f64e80df5533f6110e804220c @@ -21,9 +25,10 @@ $(package)_extra_sources += $($(package)_qttools_file_name) define $(package)_set_vars $(package)_config_opts_release = -release +$(package)_config_opts_release += -silent $(package)_config_opts_debug = -debug $(package)_config_opts += -bindir $(build_prefix)/bin -$(package)_config_opts += -c++std c++11 +$(package)_config_opts += -c++std c++1z $(package)_config_opts += -confirm-license $(package)_config_opts += -hostprefix $(build_prefix) $(package)_config_opts += -no-compile-examples @@ -64,7 +69,6 @@ $(package)_config_opts += -nomake examples $(package)_config_opts += -nomake tests $(package)_config_opts += -opensource $(package)_config_opts += -optimized-tools -$(package)_config_opts += -pch $(package)_config_opts += -pkg-config $(package)_config_opts += -prefix $(host_prefix) $(package)_config_opts += -qt-libpng @@ -72,14 +76,12 @@ $(package)_config_opts += -qt-pcre $(package)_config_opts += -qt-harfbuzz $(package)_config_opts += -system-zlib $(package)_config_opts += -static -$(package)_config_opts += -silent $(package)_config_opts += -v $(package)_config_opts += -no-feature-bearermanagement $(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-filesystemwatcher $(package)_config_opts += -no-feature-fontcombobox $(package)_config_opts += -no-feature-ftp $(package)_config_opts += -no-feature-http @@ -113,6 +115,7 @@ $(package)_config_opts += -no-feature-xml $(package)_config_opts_darwin = -no-dbus $(package)_config_opts_darwin += -no-opengl +$(package)_config_opts_darwin += -pch ifneq ($(build_os),darwin) $(package)_config_opts_darwin += -xplatform macx-clang-linux @@ -121,9 +124,12 @@ $(package)_config_opts_darwin += -device-option MAC_SDK_VERSION=$(OSX_SDK_VERSIO $(package)_config_opts_darwin += -device-option CROSS_COMPILE="$(host)-" $(package)_config_opts_darwin += -device-option MAC_MIN_VERSION=$(OSX_MIN_VERSION) $(package)_config_opts_darwin += -device-option MAC_TARGET=$(host) -$(package)_config_opts_darwin += -device-option MAC_LD64_VERSION=$(LD64_VERSION) +$(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION) endif +# for macOS on Apple Silicon (ARM) see https://bugreports.qt.io/browse/QTBUG-85279 +$(package)_config_opts_arm_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=arm64 + $(package)_config_opts_linux = -qt-xkbcommon-x11 $(package)_config_opts_linux += -qt-xcb $(package)_config_opts_linux += -no-xcb-xlib @@ -145,6 +151,7 @@ $(package)_config_opts_mingw32 = -no-opengl $(package)_config_opts_mingw32 += -no-dbus $(package)_config_opts_mingw32 += -xplatform win32-g++ $(package)_config_opts_mingw32 += -device-option CROSS_COMPILE="$(host)-" +$(package)_config_opts_mingw32 += -pch $(package)_config_opts_android = -xplatform android-clang $(package)_config_opts_android += -android-sdk $(ANDROID_SDK) @@ -160,6 +167,7 @@ $(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_aarch64_android += -android-arch arm64-v8a $(package)_config_opts_armv7a_android += -android-arch armeabi-v7a @@ -190,33 +198,55 @@ define $(package)_extract_cmds tar --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools endef +# Preprocessing steps work as follows: +# +# 1. Apply our patches to the extracted source. See each patch for more info. +# +# 2. Point to lrelease in qttools/bin/lrelease; otherwise Qt will look for it in +# $(host)/native/bin/lrelease and not find it. +# +# 3. Create a macOS-Clang-Linux mkspec using our mac-qmake.conf. +# +# 4. After making a copy of the mkspec for the linux-arm-gnueabi host, named +# BGL-linux-g++, replace instances of linux-arm-gnueabi with $(host). This +# way we can generically support hosts like riscv64-linux-gnu, which Qt doesn't +# ship a mkspec for. See it's usage in config_opts_* above. +# +# 5. Put our C, CXX and LD FLAGS into gcc-base.conf. Only used for non-host builds. +# +# 6. Do similar for the win32-g++ mkspec. +# +# 7. In clang.conf, swap out clang & clang++, for our compiler + flags. See #17466. +# +# 8. Adjust a regex in toolchain.prf, to accomodate Guix's usage of +# CROSS_LIBRARY_PATH. See #15277. define $(package)_preprocess_cmds - sed -i.old "s|FT_Get_Font_Format|FT_Get_X11_Font_Format|" qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp && \ + patch -p1 -i $($(package)_patch_dir)/freetype_back_compat.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix_powerpc_libpng.patch && \ + patch -p1 -i $($(package)_patch_dir)/drop_lrelease_dependency.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_configure_mac.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix_rcc_determinism.patch && \ + patch -p1 -i $($(package)_patch_dir)/xkb-default.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix_android_qmake_conf.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix_riscv64_arch.patch && \ + patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix_mingw_cross_compile.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix_qpainter_non_determinism.patch &&\ sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \ - sed -i.old "/updateqm.depends =/d" qttranslations/translations/translations.pro && \ - sed -i.old "s/src_plugins.depends = src_sql src_network/src_plugins.depends = src_network/" qtbase/src/src.pro && \ - sed -i.old -e 's/if \[ "$$$$XPLATFORM_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/if \[ "$$$$BUILD_ON_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/' -e 's|/bin/pwd|pwd|' qtbase/configure && \ mkdir -p qtbase/mkspecs/macx-clang-linux &&\ - cp -f qtbase/mkspecs/macx-clang/Info.plist.lib qtbase/mkspecs/macx-clang-linux/ &&\ - cp -f qtbase/mkspecs/macx-clang/Info.plist.app 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/BGL-linux-g++ && \ sed -i.old "s/arm-linux-gnueabi-/$(host)-/g" qtbase/mkspecs/BGL-linux-g++/qmake.conf && \ - patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch &&\ - patch -p1 -i $($(package)_patch_dir)/fix_configure_mac.patch &&\ - patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch &&\ - patch -p1 -i $($(package)_patch_dir)/fix_rcc_determinism.patch &&\ - patch -p1 -i $($(package)_patch_dir)/xkb-default.patch &&\ - patch -p1 -i $($(package)_patch_dir)/fix_android_qmake_conf.patch &&\ - patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch &&\ + 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 && \ - patch -p1 -i $($(package)_patch_dir)/fix_riscv64_arch.patch &&\ - patch -p1 -i $($(package)_patch_dir)/no-xlib.patch &&\ - echo "QMAKE_LINK_OBJECT_MAX = 10" >> qtbase/mkspecs/win32-g++/qmake.conf &&\ - echo "QMAKE_LINK_OBJECT_SCRIPT = object_script" >> qtbase/mkspecs/win32-g++/qmake.conf &&\ sed -i.old "s|QMAKE_CFLAGS += |!host_build: QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \ sed -i.old "s|QMAKE_CXXFLAGS += |!host_build: QMAKE_CXXFLAGS = $($(package)_cxxflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \ sed -i.old "0,/^QMAKE_LFLAGS_/s|^QMAKE_LFLAGS_|!host_build: QMAKE_LFLAGS = $($(package)_ldflags)\n&|" qtbase/mkspecs/win32-g++/qmake.conf && \ diff --git a/depends/packages/rapidcheck.mk b/depends/packages/rapidcheck.mk deleted file mode 100644 index a16fee270e..0000000000 --- a/depends/packages/rapidcheck.mk +++ /dev/null @@ -1,21 +0,0 @@ -package=rapidcheck -$(package)_version=d9482c683429fe79122e3dcab14c9655874aeb8e -$(package)_download_path=https://github.com/emil-e/rapidcheck/archive -$(package)_file_name=$($(package)_version).tar.gz -$(package)_sha256_hash=b9ee8955b175fd3c0757ebd887bb075541761af08b0c28391b7c6c0685351f6b - -define $(package)_config_cmds - cmake -DCMAKE_INSTALL_PREFIX=$($(package)_staging_dir)$(host_prefix) -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true -DRC_ENABLE_BOOST_TEST=ON -B . -endef - -define $(package)_preprocess_cmds - sed -i.old 's/ -Wall//' CMakeLists.txt -endef - -define $(package)_build_cmds - $(MAKE) rapidcheck -endef - -define $(package)_stage_cmds - $(MAKE) rapidcheck install -endef diff --git a/depends/packages/sqlite.mk b/depends/packages/sqlite.mk new file mode 100644 index 0000000000..5b3a61b239 --- /dev/null +++ b/depends/packages/sqlite.mk @@ -0,0 +1,26 @@ +package=sqlite +$(package)_version=3320100 +$(package)_download_path=https://sqlite.org/2020/ +$(package)_file_name=sqlite-autoconf-$($(package)_version).tar.gz +$(package)_sha256_hash=486748abfb16abd8af664e3a5f03b228e5f124682b0c942e157644bf6fff7d10 + +define $(package)_set_vars +$(package)_config_opts=--disable-shared --disable-readline --disable-dynamic-extensions --enable-option-checking +$(package)_config_opts_linux=--with-pic +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) libsqlite3.la +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-includeHEADERS install-pkgconfigDATA +endef + +define $(package)_postprocess_cmds + rm lib/*.la +endef diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk index 6f35ede248..3b7f3690a4 100644 --- a/depends/packages/zeromq.mk +++ b/depends/packages/zeromq.mk @@ -3,7 +3,7 @@ $(package)_version=4.3.1 $(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/ $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=bcbabe1e2c7d0eec4ed612e10b94b112dd5f06fcefa994a0c79a45d835cd21eb -$(package)_patches=0001-fix-build-with-older-mingw64.patch 0002-disable-pthread_set_name_np.patch +$(package)_patches=remove_libstd_link.patch define $(package)_set_vars $(package)_config_opts=--without-docs --disable-shared --disable-curve --disable-curve-keygen --disable-perf @@ -12,13 +12,12 @@ define $(package)_set_vars $(package)_config_opts += --disable-Werror --disable-drafts --enable-option-checking $(package)_config_opts_linux=--with-pic $(package)_config_opts_android=--with-pic - $(package)_cxxflags=-std=c++11 + $(package)_cxxflags=-std=c++17 endef define $(package)_preprocess_cmds - patch -p1 < $($(package)_patch_dir)/0001-fix-build-with-older-mingw64.patch && \ - patch -p1 < $($(package)_patch_dir)/0002-disable-pthread_set_name_np.patch && \ - cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config + patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch && \ + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config endef define $(package)_config_cmds @@ -34,6 +33,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - sed -i.old "s/ -lstdc++//" lib/pkgconfig/libzmq.pc && \ rm -rf bin share lib/*.la endef diff --git a/depends/patches/bdb/clang_cxx_11.patch b/depends/patches/bdb/clang_cxx_11.patch new file mode 100644 index 0000000000..58f7ddc7d5 --- /dev/null +++ b/depends/patches/bdb/clang_cxx_11.patch @@ -0,0 +1,147 @@ +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/fontconfig/gperf_header_regen.patch b/depends/patches/fontconfig/gperf_header_regen.patch new file mode 100644 index 0000000000..7401b83d84 --- /dev/null +++ b/depends/patches/fontconfig/gperf_header_regen.patch @@ -0,0 +1,24 @@ +commit 7b6eb33ecd88768b28c67ce5d2d68a7eed5936b6 +Author: fanquake +Date: Tue Aug 25 14:34:53 2020 +0800 + + Remove rule that causes inadvertant header regeneration + + Otherwise the makefile will needlessly attempt to re-generate the + headers with gperf. This can be dropped once the upstream build is fixed. + + See #10851. + +diff --git a/src/Makefile.in b/src/Makefile.in +index f4626ad..4ae1b00 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -903,7 +903,7 @@ fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h + ' - > $@.tmp && \ + mv -f $@.tmp $@ || ( $(RM) $@.tmp && false ) + +-fcobjshash.h: fcobjshash.gperf ++fcobjshash.h: + $(AM_V_GEN) $(GPERF) -m 100 $< > $@.tmp && \ + mv -f $@.tmp $@ || ( $(RM) $@.tmp && false ) + diff --git a/depends/patches/fontconfig/remove_char_width_usage.patch b/depends/patches/fontconfig/remove_char_width_usage.patch new file mode 100644 index 0000000000..9f69081890 --- /dev/null +++ b/depends/patches/fontconfig/remove_char_width_usage.patch @@ -0,0 +1,62 @@ +commit 28165a9b078583dc8e9e5c344510e37582284cef +Author: fanquake +Date: Mon Aug 17 20:35:42 2020 +0800 + + Remove usage of CHAR_WIDTH + + CHAR_WIDTH which is reserved and clashes with glibc 2.25+ + + See #10851. + +diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h +index 5c72b22..843c532 100644 +--- a/fontconfig/fontconfig.h ++++ b/fontconfig/fontconfig.h +@@ -128,7 +128,7 @@ typedef int FcBool; + #define FC_USER_CACHE_FILE ".fonts.cache-" FC_CACHE_VERSION + + /* Adjust outline rasterizer */ +-#define FC_CHAR_WIDTH "charwidth" /* Int */ ++#define FC_CHARWIDTH "charwidth" /* Int */ + #define FC_CHAR_HEIGHT "charheight"/* Int */ + #define FC_MATRIX "matrix" /* FcMatrix */ + +diff --git a/src/fcobjs.h b/src/fcobjs.h +index 1fc4f65..d27864b 100644 +--- a/src/fcobjs.h ++++ b/src/fcobjs.h +@@ -51,7 +51,7 @@ FC_OBJECT (DPI, FcTypeDouble, NULL) + FC_OBJECT (RGBA, FcTypeInteger, NULL) + FC_OBJECT (SCALE, FcTypeDouble, NULL) + FC_OBJECT (MINSPACE, FcTypeBool, NULL) +-FC_OBJECT (CHAR_WIDTH, FcTypeInteger, NULL) ++FC_OBJECT (CHARWIDTH, FcTypeInteger, NULL) + FC_OBJECT (CHAR_HEIGHT, FcTypeInteger, NULL) + FC_OBJECT (MATRIX, FcTypeMatrix, NULL) + FC_OBJECT (CHARSET, FcTypeCharSet, FcCompareCharSet) +diff --git a/src/fcobjshash.gperf b/src/fcobjshash.gperf +index 80a0237..eb4ad84 100644 +--- a/src/fcobjshash.gperf ++++ b/src/fcobjshash.gperf +@@ -44,7 +44,7 @@ int id; + "rgba",FC_RGBA_OBJECT + "scale",FC_SCALE_OBJECT + "minspace",FC_MINSPACE_OBJECT +-"charwidth",FC_CHAR_WIDTH_OBJECT ++"charwidth",FC_CHARWIDTH_OBJECT + "charheight",FC_CHAR_HEIGHT_OBJECT + "matrix",FC_MATRIX_OBJECT + "charset",FC_CHARSET_OBJECT +diff --git a/src/fcobjshash.h b/src/fcobjshash.h +index 5a4d1ea..4e66bb0 100644 +--- a/src/fcobjshash.h ++++ b/src/fcobjshash.h +@@ -284,7 +284,7 @@ FcObjectTypeLookup (register const char *str, register unsigned int len) + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str43,FC_CHARSET_OBJECT}, + {-1}, + #line 47 "fcobjshash.gperf" +- {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHAR_WIDTH_OBJECT}, ++ {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHARWIDTH_OBJECT}, + #line 48 "fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str46,FC_CHAR_HEIGHT_OBJECT}, + #line 55 "fcobjshash.gperf" diff --git a/depends/patches/libevent/0001-fix-windows-getaddrinfo.patch b/depends/patches/libevent/0001-fix-windows-getaddrinfo.patch new file mode 100644 index 0000000000..a98cd90bd5 --- /dev/null +++ b/depends/patches/libevent/0001-fix-windows-getaddrinfo.patch @@ -0,0 +1,15 @@ +diff -ur libevent-2.1.8-stable.orig/configure.ac libevent-2.1.8-stable/configure.ac +--- libevent-2.1.8-stable.orig/configure.ac 2017-01-29 17:51:00.000000000 +0000 ++++ libevent-2.1.8-stable/configure.ac 2020-03-07 01:11:16.311335005 +0000 +@@ -389,6 +389,10 @@ + #ifdef HAVE_NETDB_H + #include + #endif ++#ifdef _WIN32 ++#include ++#include ++#endif + ]], + [[ + getaddrinfo; +Only in libevent-2.1.8-stable: configure.ac~ diff --git a/depends/patches/miniupnpc/dont_use_wingen.patch b/depends/patches/miniupnpc/dont_use_wingen.patch new file mode 100644 index 0000000000..a1cc9b50d1 --- /dev/null +++ b/depends/patches/miniupnpc/dont_use_wingen.patch @@ -0,0 +1,26 @@ +commit e8077044df239bcf0d9e9980b0e1afb9f1f5c446 +Author: fanquake +Date: Tue Aug 18 20:50:19 2020 +0800 + + Don't use wingenminiupnpcstrings when generating miniupnpcstrings.h + + The wingenminiupnpcstrings tool is used on Windows to generate version + information. This information is irrelevant for us, and trying to use + wingenminiupnpcstrings would cause builds to fail, so just don't use it. + + We should be able to drop this once we are using 2.1 or later. See + upstream commit: 9663c55c61408fdcc39a82987d2243f816b22932. + +diff --git a/Makefile.mingw b/Makefile.mingw +index 574720e..fcc17bb 100644 +--- a/Makefile.mingw ++++ b/Makefile.mingw +@@ -74,7 +74,7 @@ wingenminiupnpcstrings: wingenminiupnpcstrings.o + + wingenminiupnpcstrings.o: wingenminiupnpcstrings.c + +-miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings ++miniupnpcstrings.h: miniupnpcstrings.h.in + wingenminiupnpcstrings $< $@ + + minixml.o: minixml.c minixml.h diff --git a/depends/patches/native_cctools/ld64_disable_threading.patch b/depends/patches/native_cctools/ld64_disable_threading.patch new file mode 100644 index 0000000000..d6c58c102f --- /dev/null +++ b/depends/patches/native_cctools/ld64_disable_threading.patch @@ -0,0 +1,26 @@ +commit 584668415039adeed073decee7e04de28248afd3 +Author: fanquake +Date: Tue Aug 18 01:20:24 2020 +0000 + + Disable threading to fix non-determinism + + A bug in the file parser can cause dependencies to be calculated + differently based on which files have already been parsed. This is more + likely to occur on systems with more CPUs. + + Just disable threading for now. There is no noticable slowdown. + + See #9891. + +diff --git a/cctools/ld64/src/ld/InputFiles.h b/cctools/ld64/src/ld/InputFiles.h +index ef9c756..90a70b6 100644 +--- a/cctools/ld64/src/ld/InputFiles.h ++++ b/cctools/ld64/src/ld/InputFiles.h +@@ -25,7 +25,6 @@ + #ifndef __INPUT_FILES_H__ + #define __INPUT_FILES_H__ + +-#define HAVE_PTHREADS 1 + + #include + #include diff --git a/depends/patches/qt/dont_hardcode_pwd.patch b/depends/patches/qt/dont_hardcode_pwd.patch new file mode 100644 index 0000000000..a74e9cb098 --- /dev/null +++ b/depends/patches/qt/dont_hardcode_pwd.patch @@ -0,0 +1,27 @@ +commit 0e953866fc4672486e29e1ba6d83b4207e7b2f0b +Author: fanquake +Date: Tue Aug 18 15:09:06 2020 +0800 + + Don't hardcode pwd path + + Let a man use his builtins if he wants to! Also, removes the unnecessary + assumption that pwd lives under /bin/pwd. + + See #15581. + +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` + # the directory of this script is the "source tree" + 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` + + WHICH="which" + diff --git a/depends/patches/qt/drop_lrelease_dependency.patch b/depends/patches/qt/drop_lrelease_dependency.patch new file mode 100644 index 0000000000..f6b2c9fc80 --- /dev/null +++ b/depends/patches/qt/drop_lrelease_dependency.patch @@ -0,0 +1,20 @@ +commit 67b3ed7406e1d0762188dbad2c44a06824ba0778 +Author: fanquake +Date: Tue Aug 18 15:24:01 2020 +0800 + + Drop dependency on lrelease + + Qts buildsystem insists on using the installed lrelease, but gets + confused about how to find it. Since we manually control the build + order, just drop the dependency. + + See #9469 + +diff --git a/qttranslations/translations/translations.pro b/qttranslations/translations/translations.pro +index 694544c..eff339d 100644 +--- a/qttranslations/translations/translations.pro ++++ b/qttranslations/translations/translations.pro +@@ -109,3 +109,2 @@ updateqm.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} + silent:updateqm.commands = @echo lrelease ${QMAKE_FILE_IN} && $$updateqm.commands +-updateqm.depends = $$LRELEASE_EXE + updateqm.name = LRELEASE ${QMAKE_FILE_IN} diff --git a/depends/patches/qt/fix_mingw_cross_compile.patch b/depends/patches/qt/fix_mingw_cross_compile.patch new file mode 100644 index 0000000000..67f76f1d85 --- /dev/null +++ b/depends/patches/qt/fix_mingw_cross_compile.patch @@ -0,0 +1,25 @@ +commit 5a992a549adfe5a587bbcd6cd2b2cee47d236e27 +Author: fanquake +Date: Fri Sep 4 08:13:44 2020 +0800 + + Work around broken mingw cross-compilation + + See upstream issues: + https://bugreports.qt.io/browse/QTBUG-63637 + https://bugreports.qt.io/browse/QTBUG-63659 + https://codereview.qt-project.org/q/8bebded9 + + We should be able to drop this once we are building qt 5.10.1 or later. + + Added in #12971. + +diff --git a/qtbase/mkspecs/win32-g++/qmake.conf b/qtbase/mkspecs/win32-g++/qmake.conf +index e071a0d1..ad229b10 100644 +--- a/qtbase/mkspecs/win32-g++/qmake.conf ++++ b/qtbase/mkspecs/win32-g++/qmake.conf +@@ -87,3 +87,5 @@ QMAKE_NM = $${CROSS_COMPILE}nm -P + include(../common/angle.conf) + + load(qt_config) ++QMAKE_LINK_OBJECT_MAX = 10 ++QMAKE_LINK_OBJECT_SCRIPT = object_script diff --git a/depends/patches/qt/fix_powerpc_libpng.patch b/depends/patches/qt/fix_powerpc_libpng.patch new file mode 100644 index 0000000000..d37b6c7776 --- /dev/null +++ b/depends/patches/qt/fix_powerpc_libpng.patch @@ -0,0 +1,23 @@ +commit 6f9feb773a43c5abfa3455da2e324180e789285b +Author: fanquake +Date: Tue Sep 15 21:44:31 2020 +0800 + + Fix PowerPC build of libpng + + See https://bugreports.qt.io/browse/QTBUG-66388. + + Can be dropped when we are building qt 5.12.0 or later. + +diff --git a/qtbase/src/3rdparty/libpng/libpng.pro b/qtbase/src/3rdparty/libpng/libpng.pro +index 577b61d8..a2f56669 100644 +--- a/qtbase/src/3rdparty/libpng/libpng.pro ++++ b/qtbase/src/3rdparty/libpng/libpng.pro +@@ -10,7 +10,7 @@ MODULE_INCLUDEPATH = $$PWD + + load(qt_helper_lib) + +-DEFINES += PNG_ARM_NEON_OPT=0 ++DEFINES += PNG_ARM_NEON_OPT=0 PNG_POWERPC_VSX_OPT=0 + SOURCES += \ + png.c \ + pngerror.c \ diff --git a/depends/patches/qt/fix_qpainter_non_determinism.patch b/depends/patches/qt/fix_qpainter_non_determinism.patch new file mode 100644 index 0000000000..3cfcc22f03 --- /dev/null +++ b/depends/patches/qt/fix_qpainter_non_determinism.patch @@ -0,0 +1,63 @@ +commit 2a8f7dc6ddfc414a66491522501c1574a1343ee1 +Author: Andrew Chow +Date: Sat Nov 21 01:11:04 2020 -0500 + + build: Fix determinism issue when building with Clang 8 + + When building Qt with LLVM/Clang 8 under -O3 (the default), we run into + a determinism issue in `qt_interset_spans`. The issue has been fixed for + LLVM/Clang 9, see + https://github.com/llvm/llvm-project/commit/db101864bdc938deb1d63fe4f7da761bd38e5cae + and https://reviews.llvm.org/D64601, however this fix was not backported + to 8.x. Once LLVM/Clang 9 is used, this patch can be dropped. + + The particular issue appears to be an optimization done by -O3 which + adds a temporary variable for `spans->y` in `qt_intersect_spans`. When + it does this, sometimes it chooses to use a 32-bit movs instruction + (movswl), and other times it chooses a 64-bit movs instruction (movswq). + By patching `qt_intersect_spans` to always make a temporary variable for + `spans->y`, we are able to sidestep this problem. + +diff --git a/qtbase/src/gui/painting/qpaintengine_raster.cpp b/qtbase/src/gui/painting/qpaintengine_raster.cpp +index 92ab6e8375..f018009e0b 100644 +--- a/qtbase/src/gui/painting/qpaintengine_raster.cpp ++++ b/qtbase/src/gui/painting/qpaintengine_raster.cpp +@@ -3971,22 +3971,23 @@ static const QSpan *qt_intersect_spans(const QClipData *clip, int *currentClip, + const QSpan *clipEnd = clip->m_spans + clip->count; + + while (available && spans < end ) { ++ const short spans_y = spans->y; + if (clipSpans >= clipEnd) { + spans = end; + break; + } +- if (clipSpans->y > spans->y) { ++ if (clipSpans->y > spans_y) { + ++spans; + continue; + } +- if (spans->y != clipSpans->y) { +- if (spans->y < clip->count && clip->m_clipLines[spans->y].spans) +- clipSpans = clip->m_clipLines[spans->y].spans; ++ if (spans_y != clipSpans->y) { ++ if (spans_y < clip->count && clip->m_clipLines[spans_y].spans) ++ clipSpans = clip->m_clipLines[spans_y].spans; + else + ++clipSpans; + continue; + } +- Q_ASSERT(spans->y == clipSpans->y); ++ Q_ASSERT(spans_y == clipSpans->y); + + int sx1 = spans->x; + int sx2 = sx1 + spans->len; +@@ -4005,7 +4006,7 @@ static const QSpan *qt_intersect_spans(const QClipData *clip, int *currentClip, + if (len) { + out->x = qMax(sx1, cx1); + out->len = qMin(sx2, cx2) - out->x; +- out->y = spans->y; ++ out->y = spans_y; + out->coverage = qt_div_255(spans->coverage * clipSpans->coverage); + ++out; + --available; + diff --git a/depends/patches/qt/fix_qt_pkgconfig.patch b/depends/patches/qt/fix_qt_pkgconfig.patch index 34302a9f2d..8c722ffb46 100644 --- a/depends/patches/qt/fix_qt_pkgconfig.patch +++ b/depends/patches/qt/fix_qt_pkgconfig.patch @@ -1,11 +1,23 @@ --- old/qtbase/mkspecs/features/qt_module.prf +++ new/qtbase/mkspecs/features/qt_module.prf -@@ -245,7 +245,7 @@ +@@ -264,7 +264,7 @@ load(qt_targets) # this builds on top of qt_common -!internal_module:!lib_bundle:if(unix|mingw) { -+unix|mingw { ++if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) { CONFIG += create_pc QMAKE_PKGCONFIG_DESTDIR = pkgconfig host_build: \ +@@ -274,9 +274,9 @@ + QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw] + QMAKE_PKGCONFIG_CFLAGS = -I${includedir}/$$MODULE_INCNAME + QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ") +- QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION) ++ QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION)$$qtPlatformTargetSuffix() + for(i, MODULE_DEPENDS): \ +- QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0)) ++ QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0))$$qtPlatformTargetSuffix() + isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \ + QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module + pclib_replace.match = $$lib_replace.match diff --git a/depends/patches/qt/freetype_back_compat.patch b/depends/patches/qt/freetype_back_compat.patch new file mode 100644 index 0000000000..b0f1c98aa6 --- /dev/null +++ b/depends/patches/qt/freetype_back_compat.patch @@ -0,0 +1,28 @@ +commit 14bc77db61bf9d56f9b6c8b84aa02573605c19c6 +Author: fanquake +Date: Tue Aug 18 15:15:08 2020 +0800 + + Fix backwards compatibility with older Freetype versions at runtime + + A few years ago, libfreetype introduced FT_Get_Font_Format() as an alias + for FT_Get_X11_Font_Format(), but FT_Get_X11_Font_Format() was kept for abi + backwards-compatibility. + + Qt 5.9 introduced a call to FT_Get_Font_Format(). Replace it with FT_Get_X11_Font_Format() + in order to remain compatibile with older freetype, which is still used by e.g. Ubuntu Trusty. + + See #14348. + +diff --git a/qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp b/qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp +index 3f543755..8ecc1c8c 100644 +--- a/qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp ++++ b/qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp +@@ -898,7 +898,7 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format, + } + } + #if defined(FT_FONT_FORMATS_H) +- const char *fmt = FT_Get_Font_Format(face); ++ const char *fmt = FT_Get_X11_Font_Format(face); + if (fmt && qstrncmp(fmt, "CFF", 4) == 0) { + FT_Bool no_stem_darkening = true; + FT_Error err = FT_Property_Get(qt_getFreetype(), "cff", "no-stem-darkening", &no_stem_darkening); diff --git a/depends/patches/qt/mac-qmake.conf b/depends/patches/qt/mac-qmake.conf index 337d0eb9ca..0142667547 100644 --- a/depends/patches/qt/mac-qmake.conf +++ b/depends/patches/qt/mac-qmake.conf @@ -1,12 +1,12 @@ MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname absolute_library_soname +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=4.3 +QMAKE_XCODE_VERSION = $${XCODE_VERSION} QMAKE_XCODE_DEVELOPER_PATH=/Developer QMAKE_MACOSX_DEPLOYMENT_TARGET = $${MAC_MIN_VERSION} QMAKE_MAC_SDK=macosx @@ -18,7 +18,7 @@ QMAKE_APPLE_DEVICE_ARCHS=x86_64 !host_build: QMAKE_CFLAGS += -target $${MAC_TARGET} !host_build: QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS !host_build: QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -!host_build: QMAKE_LFLAGS += -target $${MAC_TARGET} -mlinker-version=$${MAC_LD64_VERSION} +!host_build: QMAKE_LFLAGS += -target $${MAC_TARGET} QMAKE_AR = $${CROSS_COMPILE}ar cq QMAKE_RANLIB=$${CROSS_COMPILE}ranlib QMAKE_LIBTOOL=$${CROSS_COMPILE}libtool diff --git a/depends/patches/zeromq/0001-fix-build-with-older-mingw64.patch b/depends/patches/zeromq/0001-fix-build-with-older-mingw64.patch deleted file mode 100644 index b911ac5672..0000000000 --- a/depends/patches/zeromq/0001-fix-build-with-older-mingw64.patch +++ /dev/null @@ -1,30 +0,0 @@ -From f6866b0f166ad168618aae64c7fbee8775d3eb23 Mon Sep 17 00:00:00 2001 -From: mruddy <6440430+mruddy@users.noreply.github.com> -Date: Sat, 30 Jun 2018 09:44:58 -0400 -Subject: [PATCH] fix build with older mingw64 - ---- - src/windows.hpp | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/src/windows.hpp b/src/windows.hpp -index 6c3839fd..2c32ec79 100644 ---- a/src/windows.hpp -+++ b/src/windows.hpp -@@ -58,6 +58,13 @@ - #include - #include - #include -+ -+#if defined __MINGW64_VERSION_MAJOR && __MINGW64_VERSION_MAJOR < 4 -+// Workaround for mingw-w64 < v4.0 which did not include ws2ipdef.h in iphlpapi.h. -+// Fixed in mingw-w64 by 9bd8fe9148924840d315b4c915dd099955ea89d1. -+#include -+#include -+#endif - #include - - #if !defined __MINGW32__ --- -2.17.1 - diff --git a/depends/patches/zeromq/0002-disable-pthread_set_name_np.patch b/depends/patches/zeromq/0002-disable-pthread_set_name_np.patch deleted file mode 100644 index b1c6f78a70..0000000000 --- a/depends/patches/zeromq/0002-disable-pthread_set_name_np.patch +++ /dev/null @@ -1,35 +0,0 @@ -From c9bbdd6581d07acfe8971e4bcebe278a3676cf03 Mon Sep 17 00:00:00 2001 -From: mruddy <6440430+mruddy@users.noreply.github.com> -Date: Sat, 30 Jun 2018 09:57:18 -0400 -Subject: [PATCH] disable pthread_set_name_np - -pthread_set_name_np adds a Glibc requirement on >= 2.12. ---- - src/thread.cpp | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/thread.cpp b/src/thread.cpp -index a1086b0c..9943f354 100644 ---- a/src/thread.cpp -+++ b/src/thread.cpp -@@ -308,7 +308,7 @@ void zmq::thread_t::setThreadName (const char *name_) - */ - if (!name_) - return; -- -+#if 0 - #if defined(ZMQ_HAVE_PTHREAD_SETNAME_1) - int rc = pthread_setname_np (name_); - if (rc) -@@ -324,6 +324,8 @@ void zmq::thread_t::setThreadName (const char *name_) - #elif defined(ZMQ_HAVE_PTHREAD_SET_NAME) - pthread_set_name_np (_descriptor, name_); - #endif -+#endif -+ return; - } - - #endif --- -2.17.1 - diff --git a/depends/patches/zeromq/remove_libstd_link.patch b/depends/patches/zeromq/remove_libstd_link.patch new file mode 100644 index 0000000000..ddf91e6abf --- /dev/null +++ b/depends/patches/zeromq/remove_libstd_link.patch @@ -0,0 +1,25 @@ +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/doc/Doxyfile.in b/doc/Doxyfile.in index 464be27adc..5b07000417 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -861,7 +861,8 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = src/leveldb \ +EXCLUDE = src/crc32c \ + src/leveldb \ src/json \ src/test \ src/qt/test @@ -2072,7 +2073,7 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = +PREDEFINED = HAVE_BOOST_PROCESS # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/doc/JSON-RPC-interface.md b/doc/JSON-RPC-interface.md index d13779c5fb..f16781be19 100644 --- a/doc/JSON-RPC-interface.md +++ b/doc/JSON-RPC-interface.md @@ -60,7 +60,7 @@ RPC interface will be abused. are sent as clear text that can be read by anyone on your network path. Additionally, the RPC interface has not been hardened to withstand arbitrary Internet traffic, so changing the above settings - to expose it to the Internet (even using something like a Tor hidden + to expose it to the Internet (even using something like a Tor onion service) could expose you to unconsidered vulnerabilities. See `BGLd -help` for more information about these settings and other settings described in this document. diff --git a/doc/REST-interface.md b/doc/REST-interface.md index a9792c4048..59dc767a38 100644 --- a/doc/REST-interface.md +++ b/doc/REST-interface.md @@ -30,7 +30,7 @@ To query for a confirmed transaction, enable the transaction index via "txindex= Given a block hash: returns a block, in binary, hex-encoded binary or JSON formats. Responds with 404 if the block doesn't exist. -The HTTP request and response are both handled entirely in-memory, thus making maximum memory usage at least 2.66MB (1 MB max block, plus hex encoding) per request. +The HTTP request and response are both handled entirely in-memory. With the /notxdetails/ option JSON response will only contain the transaction hash instead of the complete transaction details. The option only affects the JSON response. @@ -61,7 +61,6 @@ Only supports JSON as output format. * pruned : (boolean) if the blocks are subject to pruning * pruneheight : (numeric) highest block available * softforks : (array) status of softforks in progress -* bip9_softforks : (object) status of BIP9 softforks in progress #### Query UTXO set `GET /rest/getutxos//-/-/.../-.` @@ -79,7 +78,6 @@ $ curl localhost:18332/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff76 "bitmap": "1", "utxos" : [ { - "txvers" : 1 "height" : 2147483647, "value" : 8.8687, "scriptPubKey" : { diff --git a/doc/benchmarking.md b/doc/benchmarking.md index d70f59278b..36e1f78f34 100644 --- a/doc/benchmarking.md +++ b/doc/benchmarking.md @@ -19,8 +19,10 @@ After compiling BGL-core, the benchmarks can be run with: The output will look similar to: ``` -# Benchmark, evals, iterations, total, min, max, median -AssembleBlock, 5, 700, 1.79954, 0.000510913, 0.000517018, 0.000514497 +| ns/byte | byte/s | error % | benchmark +|--------------------:|--------------------:|--------:|:---------------------------------------------- +| 64.13 | 15,592,356.01 | 0.1% | `Base58CheckEncode` +| 24.56 | 40,722,672.68 | 0.2% | `Base58Decode` ... ``` diff --git a/doc/bips.md b/doc/bips.md index 97200ed9d1..156a3cac8d 100644 --- a/doc/bips.md +++ b/doc/bips.md @@ -1,44 +1,48 @@ -BIPs that are implemented by BGL Core (up-to-date up to **v0.19.0**): +BIPs that are implemented by BGL Core (up-to-date up to **v0.21.0**): -* [`BIP 9`](https://github.com/BGL/bips/blob/master/bip-0009.mediawiki): The changes allowing multiple soft-forks to be deployed in parallel have been implemented since **v0.12.1** ([PR #7575](https://github.com/BGL/BGL/pull/7575)) -* [`BIP 11`](https://github.com/BGL/bips/blob/master/bip-0011.mediawiki): Multisig outputs are standard since **v0.6.0** ([PR #669](https://github.com/BGL/BGL/pull/669)). -* [`BIP 13`](https://github.com/BGL/bips/blob/master/bip-0013.mediawiki): The address format for P2SH addresses has been implemented since **v0.6.0** ([PR #669](https://github.com/BGL/BGL/pull/669)). -* [`BIP 14`](https://github.com/BGL/bips/blob/master/bip-0014.mediawiki): The subversion string is being used as User Agent since **v0.6.0** ([PR #669](https://github.com/BGL/BGL/pull/669)). -* [`BIP 16`](https://github.com/BGL/bips/blob/master/bip-0016.mediawiki): The pay-to-script-hash evaluation rules have been implemented since **v0.6.0**, and took effect on *April 1st 2012* ([PR #748](https://github.com/BGL/BGL/pull/748)). -* [`BIP 21`](https://github.com/BGL/bips/blob/master/bip-0021.mediawiki): The URI format for BGL payments has been implemented since **v0.6.0** ([PR #176](https://github.com/BGL/BGL/pull/176)). -* [`BIP 22`](https://github.com/BGL/bips/blob/master/bip-0022.mediawiki): The 'getblocktemplate' (GBT) RPC protocol for mining has been implemented since **v0.7.0** ([PR #936](https://github.com/BGL/BGL/pull/936)). -* [`BIP 23`](https://github.com/BGL/bips/blob/master/bip-0023.mediawiki): Some extensions to GBT have been implemented since **v0.10.0rc1**, including longpolling and block proposals ([PR #1816](https://github.com/BGL/BGL/pull/1816)). -* [`BIP 30`](https://github.com/BGL/bips/blob/master/bip-0030.mediawiki): The evaluation rules to forbid creating new transactions with the same txid as previous not-fully-spent transactions were implemented since **v0.6.0**, and the rule took effect on *March 15th 2012* ([PR #915](https://github.com/BGL/BGL/pull/915)). -* [`BIP 31`](https://github.com/BGL/bips/blob/master/bip-0031.mediawiki): The 'pong' protocol message (and the protocol version bump to 60001) has been implemented since **v0.6.1** ([PR #1081](https://github.com/BGL/BGL/pull/1081)). -* [`BIP 32`](https://github.com/BGL/bips/blob/master/bip-0032.mediawiki): Hierarchical Deterministic Wallets has been implemented since **v0.13.0** ([PR #8035](https://github.com/BGL/BGL/pull/8035)). -* [`BIP 34`](https://github.com/BGL/bips/blob/master/bip-0034.mediawiki): The rule that requires blocks to contain their height (number) in the coinbase input, and the introduction of version 2 blocks has been implemented since **v0.7.0**. The rule took effect for version 2 blocks as of *block 224413* (March 5th 2013), and version 1 blocks are no longer allowed since *block 227931* (March 25th 2013) ([PR #1526](https://github.com/BGL/BGL/pull/1526)). -* [`BIP 35`](https://github.com/BGL/bips/blob/master/bip-0035.mediawiki): The 'mempool' protocol message (and the protocol version bump to 60002) has been implemented since **v0.7.0** ([PR #1641](https://github.com/BGL/BGL/pull/1641)). As of **v0.13.0**, this is only available for `NODE_BLOOM` (BIP 111) peers. -* [`BIP 37`](https://github.com/BGL/bips/blob/master/bip-0037.mediawiki): The bloom filtering for transaction relaying, partial Merkle trees for blocks, and the protocol version bump to 70001 (enabling low-bandwidth SPV clients) has been implemented since **v0.8.0** ([PR #1795](https://github.com/BGL/BGL/pull/1795)). Disabled by default since **v0.19.0**, can be enabled by the `-peerbloomfilters` option. -* [`BIP 42`](https://github.com/BGL/bips/blob/master/bip-0042.mediawiki): The bug that would have caused the subsidy schedule to resume after block 13440000 was fixed in **v0.9.2** ([PR #3842](https://github.com/BGL/BGL/pull/3842)). -* [`BIP 61`](https://github.com/BGL/bips/blob/master/bip-0061.mediawiki): The 'reject' protocol message (and the protocol version bump to 70002) was added in **v0.9.0** ([PR #3185](https://github.com/BGL/BGL/pull/3185)). Starting **v0.17.0**, whether to send reject messages can be configured with the `-enablebip61` option, and support is deprecated (disabled by default) as of **v0.18.0**. Support was removed in **v0.20.0** ([PR #15437](https://github.com/BGL/BGL/pull/15437)). -* [`BIP 65`](https://github.com/BGL/bips/blob/master/bip-0065.mediawiki): The CHECKLOCKTIMEVERIFY softfork was merged in **v0.12.0** ([PR #6351](https://github.com/BGL/BGL/pull/6351)), and backported to **v0.11.2** and **v0.10.4**. Mempool-only CLTV was added in [PR #6124](https://github.com/BGL/BGL/pull/6124). -* [`BIP 66`](https://github.com/BGL/bips/blob/master/bip-0066.mediawiki): The strict DER rules and associated version 3 blocks have been implemented since **v0.10.0** ([PR #5713](https://github.com/BGL/BGL/pull/5713)). -* [`BIP 68`](https://github.com/BGL/bips/blob/master/bip-0068.mediawiki): Sequence locks have been implemented as of **v0.12.1** ([PR #7184](https://github.com/BGL/BGL/pull/7184)), and have been *buried* since **v0.19.0** ([PR #16060](https://github.com/BGL/BGL/pull/16060)). -* [`BIP 70`](https://github.com/BGL/bips/blob/master/bip-0070.mediawiki) [`71`](https://github.com/BGL/bips/blob/master/bip-0071.mediawiki) [`72`](https://github.com/BGL/bips/blob/master/bip-0072.mediawiki): - Payment Protocol support has been available in BGL Core GUI since **v0.9.0** ([PR #5216](https://github.com/BGL/BGL/pull/5216)). - Support can be optionally disabled at build time since **v0.18.0** ([PR 14451](https://github.com/BGL/BGL/pull/14451)), - and it is disabled by default at build time since **v0.19.0** ([PR #15584](https://github.com/BGL/BGL/pull/15584)). - It has been removed as of **v0.20.0** ([PR 17165](https://github.com/BGL/BGL/pull/17165)). -* [`BIP 90`](https://github.com/BGL/bips/blob/master/bip-0090.mediawiki): Trigger mechanism for activation of BIPs 34, 65, and 66 has been simplified to block height checks since **v0.14.0** ([PR #8391](https://github.com/BGL/BGL/pull/8391)). -* [`BIP 111`](https://github.com/BGL/bips/blob/master/bip-0111.mediawiki): `NODE_BLOOM` service bit added, and enforced for all peer versions as of **v0.13.0** ([PR #6579](https://github.com/BGL/BGL/pull/6579) and [PR #6641](https://github.com/BGL/BGL/pull/6641)). -* [`BIP 112`](https://github.com/BGL/bips/blob/master/bip-0112.mediawiki): The CHECKSEQUENCEVERIFY opcode has been implemented since **v0.12.1** ([PR #7524](https://github.com/BGL/BGL/pull/7524)), and has been *buried* since **v0.19.0** ([PR #16060](https://github.com/BGL/BGL/pull/16060)). -* [`BIP 113`](https://github.com/BGL/bips/blob/master/bip-0113.mediawiki): Median time past lock-time calculations have been implemented since **v0.12.1** ([PR #6566](https://github.com/BGL/BGL/pull/6566)), and has been *buried* since **v0.19.0** ([PR #16060](https://github.com/BGL/BGL/pull/16060)). -* [`BIP 125`](https://github.com/BGL/bips/blob/master/bip-0125.mediawiki): Opt-in full replace-by-fee signaling honoured in mempool and mining as of **v0.12.0** ([PR 6871](https://github.com/BGL/BGL/pull/6871)). Enabled by default in the wallet GUI as of **v0.18.1** ([PR #11605](https://github.com/BGL/BGL/pull/11605)) -* [`BIP 130`](https://github.com/BGL/bips/blob/master/bip-0130.mediawiki): direct headers announcement is negotiated with peer versions `>=70012` as of **v0.12.0** ([PR 6494](https://github.com/BGL/BGL/pull/6494)). -* [`BIP 133`](https://github.com/BGL/bips/blob/master/bip-0133.mediawiki): feefilter messages are respected and sent for peer versions `>=70013` as of **v0.13.0** ([PR 7542](https://github.com/BGL/BGL/pull/7542)). -* [`BIP 141`](https://github.com/BGL/bips/blob/master/bip-0141.mediawiki): Segregated Witness (Consensus Layer) as of **v0.13.0** ([PR 8149](https://github.com/BGL/BGL/pull/8149)), defined for mainnet as of **v0.13.1** ([PR 8937](https://github.com/BGL/BGL/pull/8937)), and *buried* since **v0.19.0** ([PR #16060](https://github.com/BGL/BGL/pull/16060)). -* [`BIP 143`](https://github.com/BGL/bips/blob/master/bip-0143.mediawiki): Transaction Signature Verification for Version 0 Witness Program as of **v0.13.0** ([PR 8149](https://github.com/BGL/BGL/pull/8149)), defined for mainnet as of **v0.13.1** ([PR 8937](https://github.com/BGL/BGL/pull/8937)), and *buried* since **v0.19.0** ([PR #16060](https://github.com/BGL/BGL/pull/16060)). -* [`BIP 144`](https://github.com/BGL/bips/blob/master/bip-0144.mediawiki): Segregated Witness as of **0.13.0** ([PR 8149](https://github.com/BGL/BGL/pull/8149)). -* [`BIP 145`](https://github.com/BGL/bips/blob/master/bip-0145.mediawiki): getblocktemplate updates for Segregated Witness as of **v0.13.0** ([PR 8149](https://github.com/BGL/BGL/pull/8149)). -* [`BIP 147`](https://github.com/BGL/bips/blob/master/bip-0147.mediawiki): NULLDUMMY softfork as of **v0.13.1** ([PR 8636](https://github.com/BGL/BGL/pull/8636) and [PR 8937](https://github.com/BGL/BGL/pull/8937)), *buried* since **v0.19.0** ([PR #16060](https://github.com/BGL/BGL/pull/16060)). -* [`BIP 152`](https://github.com/BGL/bips/blob/master/bip-0152.mediawiki): Compact block transfer and related optimizations are used as of **v0.13.0** ([PR 8068](https://github.com/BGL/BGL/pull/8068)). -- [`BIP 158`](https://github.com/BGL/bips/blob/master/bip-0158.mediawiki): Compact Block Filters for Light Clients can be indexed as of **v0.19.0** ([PR #14121](https://github.com/BGL/BGL/pull/14121)). -* [`BIP 159`](https://github.com/BGL/bips/blob/master/bip-0159.mediawiki): The `NODE_NETWORK_LIMITED` service bit is signalled as of **v0.16.0** ([PR 11740](https://github.com/BGL/BGL/pull/11740)), and such nodes are connected to as of **v0.17.0** ([PR 10387](https://github.com/BGL/BGL/pull/10387)). -* [`BIP 173`](https://github.com/BGL/bips/blob/master/bip-0173.mediawiki): Bech32 addresses for native Segregated Witness outputs are supported as of **v0.16.0** ([PR 11167](https://github.com/BGL/BGL/pull/11167)). Bech32 addresses are generated by default as of **v0.20.0** ([PR 16884](https://github.com/BGL/BGL/pull/16884)). -* [`BIP 174`](https://github.com/BGL/bips/blob/master/bip-0174.mediawiki): RPCs to operate on Partially Signed BGL Transactions (PSBT) are present as of **v0.17.0** ([PR 13557](https://github.com/BGL/BGL/pull/13557)). -* [`BIP 176`](https://github.com/BGL/bips/blob/master/bip-0176.mediawiki): Bits Denomination [QT only] is supported as of **v0.16.0** ([PR 12035](https://github.com/BGL/BGL/pull/12035)). +* [`BIP 9`](https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki): The changes allowing multiple soft-forks to be deployed in parallel have been implemented since **v0.12.1** ([PR #7575](https://github.com/bitcoin/bitcoin/pull/7575)) +* [`BIP 11`](https://github.com/bitcoin/bips/blob/master/bip-0011.mediawiki): Multisig outputs are standard since **v0.6.0** ([PR #669](https://github.com/bitcoin/bitcoin/pull/669)). +* [`BIP 13`](https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki): The address format for P2SH addresses has been implemented since **v0.6.0** ([PR #669](https://github.com/bitcoin/bitcoin/pull/669)). +* [`BIP 14`](https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki): The subversion string is being used as User Agent since **v0.6.0** ([PR #669](https://github.com/bitcoin/bitcoin/pull/669)). +* [`BIP 16`](https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki): The pay-to-script-hash evaluation rules have been implemented since **v0.6.0**, and took effect on *April 1st 2012* ([PR #748](https://github.com/bitcoin/bitcoin/pull/748)). +* [`BIP 21`](https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki): The URI format for Bitcoin payments has been implemented since **v0.6.0** ([PR #176](https://github.com/bitcoin/bitcoin/pull/176)). +* [`BIP 22`](https://github.com/bitcoin/bips/blob/master/bip-0022.mediawiki): The 'getblocktemplate' (GBT) RPC protocol for mining has been implemented since **v0.7.0** ([PR #936](https://github.com/bitcoin/bitcoin/pull/936)). +* [`BIP 23`](https://github.com/bitcoin/bips/blob/master/bip-0023.mediawiki): Some extensions to GBT have been implemented since **v0.10.0rc1**, including longpolling and block proposals ([PR #1816](https://github.com/bitcoin/bitcoin/pull/1816)). +* [`BIP 30`](https://github.com/bitcoin/bips/blob/master/bip-0030.mediawiki): The evaluation rules to forbid creating new transactions with the same txid as previous not-fully-spent transactions were implemented since **v0.6.0**, and the rule took effect on *March 15th 2012* ([PR #915](https://github.com/bitcoin/bitcoin/pull/915)). +* [`BIP 31`](https://github.com/bitcoin/bips/blob/master/bip-0031.mediawiki): The 'pong' protocol message (and the protocol version bump to 60001) has been implemented since **v0.6.1** ([PR #1081](https://github.com/bitcoin/bitcoin/pull/1081)). +* [`BIP 32`](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki): Hierarchical Deterministic Wallets has been implemented since **v0.13.0** ([PR #8035](https://github.com/bitcoin/bitcoin/pull/8035)). +* [`BIP 34`](https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki): The rule that requires blocks to contain their height (number) in the coinbase input, and the introduction of version 2 blocks has been implemented since **v0.7.0**. The rule took effect for version 2 blocks as of *block 224413* (March 5th 2013), and version 1 blocks are no longer allowed since *block 227931* (March 25th 2013) ([PR #1526](https://github.com/bitcoin/bitcoin/pull/1526)). +* [`BIP 35`](https://github.com/bitcoin/bips/blob/master/bip-0035.mediawiki): The 'mempool' protocol message (and the protocol version bump to 60002) has been implemented since **v0.7.0** ([PR #1641](https://github.com/bitcoin/bitcoin/pull/1641)). As of **v0.13.0**, this is only available for `NODE_BLOOM` (BIP 111) peers. +* [`BIP 37`](https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki): The bloom filtering for transaction relaying, partial Merkle trees for blocks, and the protocol version bump to 70001 (enabling low-bandwidth SPV clients) has been implemented since **v0.8.0** ([PR #1795](https://github.com/bitcoin/bitcoin/pull/1795)). Disabled by default since **v0.19.0**, can be enabled by the `-peerbloomfilters` option. +* [`BIP 42`](https://github.com/bitcoin/bips/blob/master/bip-0042.mediawiki): The bug that would have caused the subsidy schedule to resume after block 13440000 was fixed in **v0.9.2** ([PR #3842](https://github.com/bitcoin/bitcoin/pull/3842)). +* [`BIP 61`](https://github.com/bitcoin/bips/blob/master/bip-0061.mediawiki): The 'reject' protocol message (and the protocol version bump to 70002) was added in **v0.9.0** ([PR #3185](https://github.com/bitcoin/bitcoin/pull/3185)). Starting **v0.17.0**, whether to send reject messages can be configured with the `-enablebip61` option, and support is deprecated (disabled by default) as of **v0.18.0**. Support was removed in **v0.20.0** ([PR #15437](https://github.com/bitcoin/bitcoin/pull/15437)). +* [`BIP 65`](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki): The CHECKLOCKTIMEVERIFY softfork was merged in **v0.12.0** ([PR #6351](https://github.com/bitcoin/bitcoin/pull/6351)), and backported to **v0.11.2** and **v0.10.4**. Mempool-only CLTV was added in [PR #6124](https://github.com/bitcoin/bitcoin/pull/6124). +* [`BIP 66`](https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki): The strict DER rules and associated version 3 blocks have been implemented since **v0.10.0** ([PR #5713](https://github.com/bitcoin/bitcoin/pull/5713)). +* [`BIP 68`](https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki): Sequence locks have been implemented as of **v0.12.1** ([PR #7184](https://github.com/bitcoin/bitcoin/pull/7184)), and have been *buried* since **v0.19.0** ([PR #16060](https://github.com/bitcoin/bitcoin/pull/16060)). +* [`BIP 70`](https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki) [`71`](https://github.com/bitcoin/bips/blob/master/bip-0071.mediawiki) [`72`](https://github.com/bitcoin/bips/blob/master/bip-0072.mediawiki): + Payment Protocol support has been available in Bitcoin Core GUI since **v0.9.0** ([PR #5216](https://github.com/bitcoin/bitcoin/pull/5216)). + Support can be optionally disabled at build time since **v0.18.0** ([PR 14451](https://github.com/bitcoin/bitcoin/pull/14451)), + and it is disabled by default at build time since **v0.19.0** ([PR #15584](https://github.com/bitcoin/bitcoin/pull/15584)). + It has been removed as of **v0.20.0** ([PR 17165](https://github.com/bitcoin/bitcoin/pull/17165)). +* [`BIP 90`](https://github.com/bitcoin/bips/blob/master/bip-0090.mediawiki): Trigger mechanism for activation of BIPs 34, 65, and 66 has been simplified to block height checks since **v0.14.0** ([PR #8391](https://github.com/bitcoin/bitcoin/pull/8391)). +* [`BIP 111`](https://github.com/bitcoin/bips/blob/master/bip-0111.mediawiki): `NODE_BLOOM` service bit added, and enforced for all peer versions as of **v0.13.0** ([PR #6579](https://github.com/bitcoin/bitcoin/pull/6579) and [PR #6641](https://github.com/bitcoin/bitcoin/pull/6641)). +* [`BIP 112`](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki): The CHECKSEQUENCEVERIFY opcode has been implemented since **v0.12.1** ([PR #7524](https://github.com/bitcoin/bitcoin/pull/7524)), and has been *buried* since **v0.19.0** ([PR #16060](https://github.com/bitcoin/bitcoin/pull/16060)). +* [`BIP 113`](https://github.com/bitcoin/bips/blob/master/bip-0113.mediawiki): Median time past lock-time calculations have been implemented since **v0.12.1** ([PR #6566](https://github.com/bitcoin/bitcoin/pull/6566)), and has been *buried* since **v0.19.0** ([PR #16060](https://github.com/bitcoin/bitcoin/pull/16060)). +* [`BIP 125`](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki): Opt-in full replace-by-fee signaling honoured in mempool and mining as of **v0.12.0** ([PR 6871](https://github.com/bitcoin/bitcoin/pull/6871)). Enabled by default in the wallet GUI as of **v0.18.1** ([PR #11605](https://github.com/bitcoin/bitcoin/pull/11605)) +* [`BIP 130`](https://github.com/bitcoin/bips/blob/master/bip-0130.mediawiki): direct headers announcement is negotiated with peer versions `>=70012` as of **v0.12.0** ([PR 6494](https://github.com/bitcoin/bitcoin/pull/6494)). +* [`BIP 133`](https://github.com/bitcoin/bips/blob/master/bip-0133.mediawiki): feefilter messages are respected and sent for peer versions `>=70013` as of **v0.13.0** ([PR 7542](https://github.com/bitcoin/bitcoin/pull/7542)). +* [`BIP 141`](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki): Segregated Witness (Consensus Layer) as of **v0.13.0** ([PR 8149](https://github.com/bitcoin/bitcoin/pull/8149)), defined for mainnet as of **v0.13.1** ([PR 8937](https://github.com/bitcoin/bitcoin/pull/8937)), and *buried* since **v0.19.0** ([PR #16060](https://github.com/bitcoin/bitcoin/pull/16060)). +* [`BIP 143`](https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki): Transaction Signature Verification for Version 0 Witness Program as of **v0.13.0** ([PR 8149](https://github.com/bitcoin/bitcoin/pull/8149)), defined for mainnet as of **v0.13.1** ([PR 8937](https://github.com/bitcoin/bitcoin/pull/8937)), and *buried* since **v0.19.0** ([PR #16060](https://github.com/bitcoin/bitcoin/pull/16060)). +* [`BIP 144`](https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki): Segregated Witness as of **0.13.0** ([PR 8149](https://github.com/bitcoin/bitcoin/pull/8149)). +* [`BIP 145`](https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki): getblocktemplate updates for Segregated Witness as of **v0.13.0** ([PR 8149](https://github.com/bitcoin/bitcoin/pull/8149)). +* [`BIP 147`](https://github.com/bitcoin/bips/blob/master/bip-0147.mediawiki): NULLDUMMY softfork as of **v0.13.1** ([PR 8636](https://github.com/bitcoin/bitcoin/pull/8636) and [PR 8937](https://github.com/bitcoin/bitcoin/pull/8937)), *buried* since **v0.19.0** ([PR #16060](https://github.com/bitcoin/bitcoin/pull/16060)). +* [`BIP 152`](https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki): Compact block transfer and related optimizations are used as of **v0.13.0** ([PR 8068](https://github.com/bitcoin/bitcoin/pull/8068)). +* [`BIP 155`](https://github.com/bitcoin/bips/blob/master/bip-0155.mediawiki): The 'addrv2' and 'sendaddrv2' messages which enable relay of Tor V3 addresses (and other networks) are supported as of **v0.21.0** ([PR 19954](https://github.com/bitcoin/bitcoin/pull/19954)). +* [`BIP 158`](https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki): Compact Block Filters for Light Clients can be indexed as of **v0.19.0** ([PR #14121](https://github.com/bitcoin/bitcoin/pull/14121)). +* [`BIP 159`](https://github.com/bitcoin/bips/blob/master/bip-0159.mediawiki): The `NODE_NETWORK_LIMITED` service bit is signalled as of **v0.16.0** ([PR 11740](https://github.com/bitcoin/bitcoin/pull/11740)), and such nodes are connected to as of **v0.17.0** ([PR 10387](https://github.com/bitcoin/bitcoin/pull/10387)). +* [`BIP 173`](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki): Bech32 addresses for native Segregated Witness outputs are supported as of **v0.16.0** ([PR 11167](https://github.com/bitcoin/bitcoin/pull/11167)). Bech32 addresses are generated by default as of **v0.20.0** ([PR 16884](https://github.com/bitcoin/bitcoin/pull/16884)). +* [`BIP 174`](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki): RPCs to operate on Partially Signed Bitcoin Transactions (PSBT) are present as of **v0.17.0** ([PR 13557](https://github.com/bitcoin/bitcoin/pull/13557)). +* [`BIP 176`](https://github.com/bitcoin/bips/blob/master/bip-0176.mediawiki): Bits Denomination [QT only] is supported as of **v0.16.0** ([PR 12035](https://github.com/bitcoin/bitcoin/pull/12035)). +* [`BIP 325`](https://github.com/bitcoin/bips/blob/master/bip-0325.mediawiki): Signet test network is supported as of **v0.21.0** ([PR 18267](https://github.com/bitcoin/bitcoin/pull/18267)). +* [`BIP 339`](https://github.com/bitcoin/bips/blob/master/bip-0339.mediawiki): Relay of transactions by wtxid is supported as of **v0.21.0** ([PR 18044](https://github.com/bitcoin/bitcoin/pull/18044)). +* [`BIP 340`](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki) [`341`](https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki) [`342`](https://github.com/bitcoin/bips/blob/master/bip-0342.mediawiki): Validation rules for Taproot (including Schnorr signatures and Tapscript leaves) are implemented as of **v0.21.0** ([PR 19953](https://github.com/bitcoin/bitcoin/pull/19953)), without mainnet activation. diff --git a/doc/build-freebsd.md b/doc/build-freebsd.md index 90e680b594..3ba28050c2 100644 --- a/doc/build-freebsd.md +++ b/doc/build-freebsd.md @@ -10,7 +10,7 @@ This guide does not contain instructions for building the GUI. You will need the following dependencies, which can be installed as root via pkg: -```shell +```bash pkg install autoconf automake boost-libs git gmake libevent libtool pkgconf git clone https://github.com/BGL/BGL.git @@ -18,7 +18,7 @@ git clone https://github.com/BGL/BGL.git In order to run the test suite (recommended), you will need to have Python 3 installed: -```shell +```bash pkg install python3 ``` @@ -29,32 +29,33 @@ See [dependencies.md](dependencies.md) for a complete overview. BerkeleyDB is only necessary for the wallet functionality. To skip this, pass `--disable-wallet` to `./configure` and skip to the next section. -```shell +```bash ./contrib/install_db4.sh `pwd` export BDB_PREFIX="$PWD/db4" ``` ## Building BGL Core -**Important**: Use `gmake` (the non-GNU `make` will exit with an error): +**Important**: Use `gmake` (the non-GNU `make` will exit with an error). With wallet: -```shell +```bash ./autogen.sh ./configure --with-gui=no \ BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" \ - BDB_CFLAGS="-I${BDB_PREFIX}/include" + BDB_CFLAGS="-I${BDB_PREFIX}/include" \ + MAKE=gmake ``` Without wallet: -```shell +```bash ./autogen.sh -./configure --with-gui=no --disable-wallet +./configure --with-gui=no --disable-wallet MAKE=gmake ``` followed by: -```shell +```bash gmake # use -jX here for parallelism gmake check # Run tests if Python 3 is available ``` diff --git a/doc/build-netbsd.md b/doc/build-netbsd.md index b8c2d224fb..fa6a96f707 100644 --- a/doc/build-netbsd.md +++ b/doc/build-netbsd.md @@ -37,13 +37,13 @@ from ports, for the same reason as boost above (g++/libstd++ incompatibility). If you have to build it yourself, you can use [the installation script included in contrib/](/contrib/install_db4.sh) like so: -```shell +```bash ./contrib/install_db4.sh `pwd` ``` from the root of the repository. Then set `BDB_PREFIX` for the next section: -```shell +```bash export BDB_PREFIX="$PWD/db4" ``` @@ -52,24 +52,26 @@ export BDB_PREFIX="$PWD/db4" **Important**: Use `gmake` (the non-GNU `make` will exit with an error). With wallet: -``` +```bash ./autogen.sh ./configure --with-gui=no CPPFLAGS="-I/usr/pkg/include" \ LDFLAGS="-L/usr/pkg/lib" \ BOOST_CPPFLAGS="-I/usr/pkg/include" \ BOOST_LDFLAGS="-L/usr/pkg/lib" \ BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" \ - BDB_CFLAGS="-I${BDB_PREFIX}/include" + BDB_CFLAGS="-I${BDB_PREFIX}/include" \ + MAKE=gmake ``` Without wallet: -``` +```bash ./autogen.sh ./configure --with-gui=no --disable-wallet \ CPPFLAGS="-I/usr/pkg/include" \ LDFLAGS="-L/usr/pkg/lib" \ BOOST_CPPFLAGS="-I/usr/pkg/include" \ - BOOST_LDFLAGS="-L/usr/pkg/lib" + BOOST_LDFLAGS="-L/usr/pkg/lib" \ + MAKE=gmake ``` Build and run the tests: diff --git a/doc/build-openbsd.md b/doc/build-openbsd.md index 5b8b5fb831..fffad88a72 100644 --- a/doc/build-openbsd.md +++ b/doc/build-openbsd.md @@ -1,10 +1,9 @@ OpenBSD build guide ====================== -(updated for OpenBSD 6.4) +(updated for OpenBSD 6.7) -This guide describes how to build BGLd and command-line utilities on OpenBSD. -OpenBSD is most commonly used as a server OS, so this guide does not contain instructions for building the GUI. +This guide describes how to build BGLd, BGL-qt, and command-line utilities on OpenBSD. Preparation ------------- @@ -13,9 +12,11 @@ Run the following as root to install the base dependencies for building: ```bash pkg_add git gmake libevent libtool boost +pkg_add qt5 # (optional for enabling the GUI) pkg_add autoconf # (select highest version, e.g. 2.69) pkg_add automake # (select highest version, e.g. 1.16) -pkg_add python # (select highest version, e.g. 3.6) +pkg_add python # (select highest version, e.g. 3.8) +pkg_add bash git clone https://github.com/BGL/BGL.git ``` @@ -23,10 +24,10 @@ git clone https://github.com/BGL/BGL.git See [dependencies.md](dependencies.md) for a complete overview. **Important**: From OpenBSD 6.2 onwards a C++11-supporting clang compiler is -part of the base image, and while building it is necessary to make sure that this -compiler is used and not ancient g++ 4.2.1. This is done by appending -`CC=cc CXX=c++` to configuration commands. Mixing different compilers -within the same executable will result in linker errors. +part of the base image, and while building it is necessary to make sure that +this compiler is used and not ancient g++ 4.2.1. This is done by appending +`CC=cc CC_FOR_BUILD=cc CXX=c++` to configuration commands. Mixing different +compilers within the same executable will result in errors. ### Building BerkeleyDB @@ -38,19 +39,19 @@ from ports, for the same reason as boost above (g++/libstd++ incompatibility). If you have to build it yourself, you can use [the installation script included in contrib/](/contrib/install_db4.sh) like so: -```shell +```bash ./contrib/install_db4.sh `pwd` CC=cc CXX=c++ ``` from the root of the repository. Then set `BDB_PREFIX` for the next section: -```shell +```bash export BDB_PREFIX="$PWD/db4" ``` ### Building BGL Core -**Important**: use `gmake`, not `make`. The non-GNU `make` will exit with a horrible error. +**Important**: Use `gmake` (the non-GNU `make` will exit with an error). Preparation: ```bash @@ -70,12 +71,22 @@ Make sure `BDB_PREFIX` is set to the appropriate path from the above steps. To configure with wallet: ```bash ./configure --with-gui=no CC=cc CXX=c++ \ - BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" + BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" \ + BDB_CFLAGS="-I${BDB_PREFIX}/include" \ + MAKE=gmake ``` To configure without wallet: ```bash -./configure --disable-wallet --with-gui=no CC=cc CXX=c++ +./configure --disable-wallet --with-gui=no CC=cc CC_FOR_BUILD=cc CXX=c++ MAKE=gmake +``` + +To configure with GUI: +```bash +./configure --with-gui=yes CC=cc CXX=c++ \ + BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" \ + BDB_CFLAGS="-I${BDB_PREFIX}/include" \ + MAKE=gmake ``` Build and run the tests: diff --git a/doc/build-osx.md b/doc/build-osx.md index 473e72b6ac..5c59fc9196 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -19,9 +19,10 @@ Then install [Homebrew](https://brew.sh). ## Dependencies ```shell -brew install automake berkeley-db4 libtool boost miniupnpc pkg-config python qt libevent qrencode +brew install automake berkeley-db4 libtool boost miniupnpc pkg-config python qt libevent qrencode sqlite ``` +If you run into issues, check [Homebrew's troubleshooting page](https://docs.brew.sh/Troubleshooting). See [dependencies.md](dependencies.md) for a complete overview. If you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG: @@ -78,7 +79,7 @@ compiled in `disable-wallet` mode with: ./configure --disable-wallet ``` -In this case there is no dependency on Berkeley DB 4.8. +In this case there is no dependency on Berkeley DB 4.8 and SQLite. Mining is also possible in disable-wallet mode using the `getblocktemplate` RPC call. @@ -110,99 +111,6 @@ tail -f $HOME/Library/Application\ Support/BGL/debug.log ``` ## Notes -* Tested on OS X 10.12 Sierra through macOS 10.15 Catalina on 64-bit Intel +* Tested on OS X 10.14 Mojave through macOS 11 Big Sur on 64-bit Intel processors only. -* Building with downloaded Qt binaries is not officially supported. See the notes in [#7714](https://github.com/BGL/BGL/issues/7714). - -## Deterministic macOS DMG Notes -Working macOS DMGs are created in Linux by combining a recent `clang`, the Apple -`binutils` (`ld`, `ar`, etc) and DMG authoring tools. - -Apple uses `clang` extensively for development and has upstreamed the necessary -functionality so that a vanilla clang can take advantage. It supports the use of `-F`, -`-target`, `-mmacosx-version-min`, and `--sysroot`, which are all necessary when -building for macOS. - -Apple's version of `binutils` (called `cctools`) contains lots of functionality missing in the -FSF's `binutils`. In addition to extra linker options for frameworks and sysroots, several -other tools are needed as well such as `install_name_tool`, `lipo`, and `nmedit`. These -do not build under Linux, so they have been patched to do so. The work here was used as -a starting point: [mingwandroid/toolchain4](https://github.com/mingwandroid/toolchain4). - -In order to build a working toolchain, the following source packages are needed from -Apple: `cctools`, `dyld`, and `ld64`. - -These tools inject timestamps by default, which produce non-deterministic binaries. The -`ZERO_AR_DATE` environment variable is used to disable that. - -This version of `cctools` has been patched to use the current version of `clang`'s headers -and its `libLTO.so` rather than those from `llvmgcc`, as it was originally done in `toolchain4`. - -To complicate things further, all builds must target an Apple SDK. These SDKs are free to -download, but not redistributable. To obtain it, register for an Apple Developer Account, -then download the [Xcode 7.3.1 dmg](https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/Xcode_7.3.1/Xcode_7.3.1.dmg). - -This file is several gigabytes in size, but only a single directory inside is needed: -``` -Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -``` - -Unfortunately, the usual Linux tools (7zip, hpmount, loopback mount) are incapable of -opening this file. To create a tarball suitable for Gitian input, there are two options: - -Using macOS, you can mount the DMG, and then create it with: -```shell -hdiutil attach Xcode_7.3.1.dmg -tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.11.sdk.tar.gz MacOSX10.11.sdk -``` - -Alternatively, you can use 7zip and SleuthKit to extract the files one by one. The script -[`extract-osx-sdk.sh`](./../contrib/macdeploy/extract-osx-sdk.sh) automates this. First -ensure the DMG file is in the current directory, and then run the script. You may wish to -delete the `intermediate 5.hfs` file and `MacOSX10.11.sdk` (the directory) when you've -confirmed the extraction succeeded. - -```shell -apt-get install p7zip-full sleuthkit -contrib/macdeploy/extract-osx-sdk.sh -rm -rf 5.hfs MacOSX10.11.sdk -``` - -The Gitian descriptors build 2 sets of files: Linux tools, then Apple binaries which are -created using these tools. The build process has been designed to avoid including the -SDK's files in Gitian's outputs. All interim tarballs are fully deterministic and may be freely -redistributed. - -`genisoimage` is used to create the initial DMG. It is not deterministic as-is, so it has been -patched. A system `genisoimage` will work fine, but it will not be deterministic because -the file-order will change between invocations. The patch can be seen here: [theuni/osx-cross-depends](https://raw.githubusercontent.com/theuni/osx-cross-depends/master/patches/cdrtools/genisoimage.diff). -No effort was made to fix this cleanly, so it likely leaks memory badly. But it's only used for -a single invocation, so that's no real concern. - -`genisoimage` cannot compress DMGs, so afterwards, the DMG tool from the -`libdmg-hfsplus` project is used to compress it. There are several bugs in this tool and its -maintainer has seemingly abandoned the project. It has been forked and is available -(with fixes) here: [theuni/libdmg-hfsplus](https://github.com/theuni/libdmg-hfsplus). - -The DMG tool has the ability to create DMGs from scratch as well, but this functionality is -broken. Only the compression feature is currently used. Ideally, the creation could be fixed -and `genisoimage` would no longer be necessary. - -Background images and other features can be added to DMG files by inserting a -`.DS_Store` before creation. This is generated by the script -`contrib/macdeploy/custom_dsstore.py`. - -As of OS X 10.9 Mavericks, using an Apple-blessed key to sign binaries is a requirement in -order to satisfy the new Gatekeeper requirements. Because this private key cannot be -shared, we'll have to be a bit creative in order for the build process to remain somewhat -deterministic. Here's how it works: - -- Builders use Gitian to create an unsigned release. This outputs an unsigned DMG which - users may choose to bless and run. It also outputs an unsigned app structure in the form - of a tarball, which also contains all of the tools that have been previously (deterministically) - built in order to create a final DMG. -- The Apple keyholder uses this unsigned app to create a detached signature, using the - script that is also included there. Detached signatures are available from this [repository](https://github.com/BGL-core/BGL-detached-sigs). -- Builders feed the unsigned app + detached signature back into Gitian. It uses the - pre-built tools to recombine the pieces into a deterministic DMG. - +* Building with downloaded Qt binaries is not officially supported. See the notes in [#7714](https://github.com/bitcoin/bitcoin/issues/7714). diff --git a/doc/build-unix.md b/doc/build-unix.md index 77ab54aef1..3a8fd813d1 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -41,11 +41,12 @@ Optional dependencies: Library | Purpose | Description ------------|------------------|---------------------- miniupnpc | UPnP Support | Firewall-jumping support - libdb4.8 | Berkeley DB | Wallet storage (only needed when wallet enabled) + libdb4.8 | Berkeley DB | Optional, wallet storage (only needed when wallet enabled) qt | GUI | GUI toolkit (only needed when GUI enabled) libqrencode | QR codes in GUI | Optional for generating QR codes (only needed when GUI enabled) univalue | Utility | JSON parsing and encoding (bundled version will be used unless --with-system-univalue passed to configure) libzmq3 | ZMQ notification | Optional, allows generating ZMQ notifications (requires ZMQ version >= 4.0.0) + sqlite3 | SQLite DB | Optional, wallet storage (only needed when wallet enabled) For the versions used, see [dependencies.md](dependencies.md) @@ -80,7 +81,7 @@ Build requirements: Now, you can either build from self-compiled [depends](/depends/README.md) or install the required dependencies: - sudo apt-get install libevent-dev libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev + sudo apt-get install libevent-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev BerkeleyDB is required for the wallet. @@ -91,9 +92,15 @@ pass `--with-incompatible-bdb` to configure. Otherwise, you can build from self-compiled `depends` (see above). + +SQLite is required for the wallet: + + sudo apt install libsqlite3-dev + To build BGL Core without wallet, see [*Disable-wallet mode*](/doc/build-unix.md#disable-wallet-mode) + Optional (see `--with-miniupnpc` and `--enable-upnp-default`): sudo apt-get install libminiupnpc-dev @@ -144,6 +151,10 @@ libqrencode (optional) can be installed with: sudo dnf install qrencode-devel +SQLite can be installed with: + + sudo dnf install sqlite-devel + Notes ----- The release is built with GCC and then "strip BGLd" to strip the debug @@ -238,7 +249,7 @@ disable-wallet mode with: ./configure --disable-wallet -In this case there is no dependency on Berkeley DB 4.8. +In this case there is no dependency on Berkeley DB 4.8 and SQLite. Mining is also possible in disable-wallet mode using the `getblocktemplate` RPC call. diff --git a/doc/build-windows.md b/doc/build-windows.md index 46c2dc6355..46269399f6 100644 --- a/doc/build-windows.md +++ b/doc/build-windows.md @@ -9,7 +9,7 @@ The options known to work for building BGL Core on Windows are: and is the platform used to build the BGL Core Windows release binaries. * On Windows, using [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/windows/wsl/about) and the Mingw-w64 cross compiler tool chain. -* On Windows, using a native compiler tool chain such as [Visual Studio](https://www.visualstudio.com). +* On Windows, using a native compiler tool chain such as [Visual Studio](https://www.visualstudio.com). See [README.md](/build_msvc/README.md). Other options which may work, but which have not been extensively tested are (please contribute instructions): @@ -91,15 +91,22 @@ Note that for WSL the BGL Core source path MUST be somewhere in the default moun example /usr/src/BGL, AND not under /mnt/d/. If this is not the case the dependency autoconf scripts will fail. This means you cannot use a directory that is located directly on the host Windows file system to perform the build. +Additional WSL Note: WSL support for [launching Win32 applications](https://docs.microsoft.com/en-us/archive/blogs/wsl/windows-and-ubuntu-interoperability#launching-win32-applications-from-within-wsl) +results in `Autoconf` configure scripts being able to execute Windows Portable Executable files. This can cause +unexpected behaviour during the build, such as Win32 error dialogs for missing libraries. The recommended approach +is to temporarily disable WSL support for Win32 applications. + Build using: PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g') # strip out problematic Windows %PATH% imported var + sudo bash -c "echo 0 > /proc/sys/fs/binfmt_misc/status" # Disable WSL support for Win32 applications. cd depends make HOST=x86_64-w64-mingw32 cd .. ./autogen.sh # not required when building from tarball CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/ make + sudo bash -c "echo 1 > /proc/sys/fs/binfmt_misc/status" # Enable WSL support for Win32 applications. ## Depends system diff --git a/doc/code-sync/README.md b/doc/code-sync/README.md new file mode 100644 index 0000000000..f360ac8a0c --- /dev/null +++ b/doc/code-sync/README.md @@ -0,0 +1,103 @@ +### The task of syncing the code + +To sync code of BGL (which was based, but not forked) to BTC code base. +It is unclear if the full compatibility regarding RPC and code would stay, but +for now it is the case. Original change history is not present, so the procedure would include batch picking of commits to include. + +- we are syncing with the bitcoin master branch; +- all merge commits are skipped (merge commits can include commits from long ago and those already processed, processing them would be very non-linear and complicated), picking all non-merge commits will result in the changes coming the same way as they are present in the bitcoin master branch; + +The log of sync is kept in file sync_log.txt in this folder. + +### Flow of making synchronization + +- Check out latest BGL repo, the commits would go to `bitcoinsync` branch; +- Add bitcoin main repository as remote and fetch it: + ``` + git remote add btcrepo https://github.com/bitcoin/bitcoin/ + git fetch btcrepo + ``` +- Get the list of commits to process (for example, from current point of 31st of March): + ``` + git log btcrepo/master --pretty=format:'%cd %H %s' --since="2020-03-31" --date=iso-local | sort -r + ``` + (it will sort them in the order of them being merged) +- While switched to `bitcoinsync` branch, start cherry-picking commits in chronological order one by one + ``` + git cherry-pick + ``` +- if a commit is a PR merged (merge commit), having Merge #number in the name, skip it; + +There could be several possible outcomes: +- Commit merges cleanly: + - make the mark that it had been processed and move to the next; +- Commit has merge conflicts: + - check that commit is not for the submodule (such as leveldb), otherwise, skip it; + - resolve conflicts: + - mostly accept all incoming changes; + - in the incoming changes rename bitcoin to BGL where applicable in class names, etc.; + - check also section below 'Changes to keep'; + - when conflicts resolved, merge cherry-pick as + ```git add -A && git commit``` + - mark that commit had been processed and move to the next; +- Commit has zero changes + - it should occur pretty rarely, mostly when such file has already been deleted; + - make empty commit with + ```git commit --allow-empty``` + - make the mark that commit had been processed and move to the next; + +After a chunk of commits had been processed, before pushing the changes: +- Search for `bitcoin` in source files and perform checks/replaces where needed; +- Check for compilation and running from scratch (from autogen to running `BGLd` executable); +- if some files got damaged or broken, get them from BTC repository and perform replacements + (use file version for the proper commit state on which the process is now); +- Commit any changes if present too; + +### Notes and possible pitfalls + +- File renames are usually picked up nicely, but some files with 'bitcoin' in the name are renamed + to 'BGL' in the name, and may have to be manually moved/renamed; + - file renames that are not detected; + - file moves in folder tree that are not detected (rare case, occurence wasn't observed); +- The ordering of the commits, merged to bitcoin master branch in the same second may be wrong, + if first cannot me auto-merged cleanly, check the second one; + +- Merge commits are skipped + - even if merge conflicts would be before merging a PR, conflict resolve is a separate commit + - squash-commits would be as a single commit (not merge commit) + - we are tracking master branch from a point in time, when PRs are merged they contain single commits (in appropriate times), + so if we merging all of them, the code should follow the original master branch + +### Changes to keep + +Remember to keep changes related to: +- burning of tx fees; +- chain parameters (most of the chainparams.cpp); +- hashing of block or transaction (sha3-keccak); + e.g. to avoid ambiguity, the function name explicitly stating the hash is used: + `SerializeHash` -> `SerializeHashSHA256` or `SerializeHashKeccak` +- naming (BGL); + +Important files: +- chainparams.cpp +- validation.cpp +- hash.cpp +- consensus.h (block size) + +### Useful tools + +Very convenient to use not only regular textual, but also 2-panel graphical diff (Meld, Windiff, etc.), especially after larger commits or after a chunk has been processed before test build of the resulted code. + +### Current status + +All commits are merged from Dec 2019 up to 31 March 2020 (around 30% of all commits that BGL is behind BTC). Additional commit is created to close some of the changes that were not included (e.g. due to being present in +merge commit with changes earlier than those from 15 Dec 2019, there are changes year and more earlier). +We would sync those with re-checking the files and there should be less of those when moving forward with the task. +The BGL binaries were successfully built (except Qt wallet, it could be checked after all other commits synced) and node checked to be running and syncing. + +### Completion + +After all the changes are synced, we should check tests state, check node and wallet functions, diff files significantly changing in size and fix discrepancies found. Properly integrate submodules (leveldb, etc.) + +In addition, areas of interest would be Windows/Mac versions, and overall packaging, as the next step would be provision of automated builds (and pipeline/tooling may differ from used in BTC). + diff --git a/doc/code-sync/sync_log.txt b/doc/code-sync/sync_log.txt new file mode 100644 index 0000000000..a1935f56fe --- /dev/null +++ b/doc/code-sync/sync_log.txt @@ -0,0 +1,6023 @@ +Bitcoin master branch sync log +============================== + +- "v" means commit was merged; +- "cr" means commit was merged after resolving conflicts; +- "pr" means commit is merge commit (usually a pull request merge) and was skipped; +- "s" means commit was skipped for a reason specified +- "ff" means fatal failure + +Commits on Dec 16, 2019 +https://github.com/bitcoin/bitcoin/commit/19267cbc82c1a09b37a0266b7bd930e9a62d1288 v +https://github.com/bitcoin/bitcoin/commit/7965e0b41ae03110ad784a1b374f831600c0cca1 v +https://github.com/bitcoin/bitcoin/commit/7aab8d1024996c7c422bd34a8226df0117b813f7 v +https://github.com/bitcoin/bitcoin/commit/ec8dcb0199c6d6ae47a13abbd158f59532554adb v +https://github.com/bitcoin/bitcoin/commit/893aa207e84b74e7623243967d29f03570fdfd6f v +https://github.com/bitcoin/bitcoin/commit/a5089f62bda9a39c1d6cbba285477670f1aa1f3f v +https://github.com/bitcoin/bitcoin/commit/ccc53e43c5464058171d6291da861a88184b230e v +https://github.com/bitcoin/bitcoin/commit/93cc18b0f6fa5fa8144079a4f51904d8b3087e94 v +https://github.com/bitcoin/bitcoin/commit/a6fc26da55dea3b76bd89fbbca24ded170238674 v +https://github.com/bitcoin/bitcoin/commit/137c80d579502e329964d7d1028a9507d4667774 v +https://github.com/bitcoin/bitcoin/commit/c3628e448315c95c2f3ca227eb7003a17162a299 v +https://github.com/bitcoin/bitcoin/commit/5e4912f99096e9955b332df004662f83885b322f v +https://github.com/bitcoin/bitcoin/commit/6b51cce65afd9a6357277c4339d7cf56814e476e v +https://github.com/bitcoin/bitcoin/commit/806a2c602cdf1df17b0b92258bb0d7dca2ee1ee9 v +https://github.com/bitcoin/bitcoin/commit/fa8e650b525e9493bdfa393c0c3e34cb22c78c08 v +https://github.com/bitcoin/bitcoin/commit/988eaf2fcb71284c5fc57c7ef755bdafa4b929a0 v + +Commits on Dec 17, 2019 +https://github.com/bitcoin/bitcoin/commit/abc147de95fb294a2c0a3105695e708517010322 v +https://github.com/bitcoin/bitcoin/commit/48d64d73c06f4d5db3ad35bed87388ff0795d511 v +https://github.com/bitcoin/bitcoin/commit/f9fd3a27fda3da3eb45de4e46e7145506e27d96b v +https://github.com/bitcoin/bitcoin/commit/94c6f2bba45100abeaf310057a989f8644115eaf v +https://github.com/bitcoin/bitcoin/commit/22d9bae36f2a164acf35765231f1d93364c1c4a9 v +https://github.com/bitcoin/bitcoin/commit/32e27129ff26c7cc10321652d5d2678876081983 v +https://github.com/bitcoin/bitcoin/commit/526dd78bedcebcf170ce13349eb3e9fc7fbf39bb v +https://github.com/bitcoin/bitcoin/commit/c18405732e38eadb2c47533c3f982f4605fbfd9a v +https://github.com/bitcoin/bitcoin/commit/03dfa36641077033ffebf8b431945bfc503632a9 v +https://github.com/bitcoin/bitcoin/commit/419ef3b7cc04e3ab26252d7024da847dfd5ab1a3 v +https://github.com/bitcoin/bitcoin/commit/529d332fbfe633d60845a97e1a06f552bd63d0d4 v +https://github.com/bitcoin/bitcoin/commit/4d88c3dcb61e7c075ed3dd442044e0eff4e3c8de v +https://github.com/bitcoin/bitcoin/commit/7df6a7ea98121997af2dcc57a69046ae252a9ec6 v +https://github.com/bitcoin/bitcoin/commit/a54c16cdb6522b55cf25c1ef568a9a691c46fabb v +https://github.com/bitcoin/bitcoin/commit/890eac8f8286496bbae664792cd2a1e56991c669 v +https://github.com/bitcoin/bitcoin/commit/faede70882b4fd54390f5205dbe1dbcf019195c8 v +https://github.com/bitcoin/bitcoin/commit/e6acd9f72c61bf535d9413854b1434ec40633ca0 v +https://github.com/bitcoin/bitcoin/commit/ab4e6ad7629430d02d101417e010228c1099f0ae v +https://github.com/bitcoin/bitcoin/commit/6094222de7820d235e6e8c66e589aa71db08c077 v + +Commits on Dec 18, 2019 +https://github.com/bitcoin/bitcoin/commit/47f45b677653c496a40acff00d11bd0e175ee058 v +https://github.com/bitcoin/bitcoin/commit/6fef85bfa3cd7f76e83b8b57f9e4acd63eb664ec v +https://github.com/bitcoin/bitcoin/commit/75a5e478b631d3d0821d003300c4eae3c8433973 v +https://github.com/bitcoin/bitcoin/commit/e9b4f9419cc778b5164708991a55014abef6c5f9 v +https://github.com/bitcoin/bitcoin/commit/091a876664af4427db670ea8244d713b1b840048 v +https://github.com/bitcoin/bitcoin/commit/34d826ea5f900b6320f6ff070c3632155acb716e v + +Commits on Dec 19, 2019 +https://github.com/bitcoin/bitcoin/commit/f41d58966995fe69df433fa684117fae74a56e66 v +https://github.com/bitcoin/bitcoin/commit/8feb4e4b667361bf23344149c01594abebd56fdb v +https://github.com/bitcoin/bitcoin/commit/4f4ae6f97e210fa0a2aa274bcd2a77a226fe6a7e v +https://github.com/bitcoin/bitcoin/commit/7f9fbb89e82f78846b9e6592a1def6648802de49 v +https://github.com/bitcoin/bitcoin/commit/6020ce3c01fe5ee15a236c47da23342005b63055 v +https://github.com/bitcoin/bitcoin/commit/3e949380725ca32be6c9812a926727b0a45723a9 v + +Commits on Dec 20, 2019 +https://github.com/bitcoin/bitcoin/commit/6677be64f69b3d6f60f5a675ff9746def27a2de8 v +https://github.com/bitcoin/bitcoin/commit/bcad0144eff3192cb54f65fa7737be53e03f8b0f v +https://github.com/bitcoin/bitcoin/commit/3f95fb085e73b5537dda6d7258bfdab72d695fa9 cr +https://github.com/bitcoin/bitcoin/commit/900d8f6f70859f528e84c5c38d0332f81d19df55 v +https://github.com/bitcoin/bitcoin/commit/6666ef13f167cfe880c2e94c09d003594d010cf3 v + +Commits on Dec 21, 2019 +https://github.com/bitcoin/bitcoin/commit/0cda5573405d75d695aba417e8f22f1301ded001 v + +Commits on Dec 23, 2019 +https://github.com/bitcoin/bitcoin/commit/faa92a2297b4a6aebdd58d1818c428f1c0346078 v + +Commits on Dec 24, 2019 +https://github.com/bitcoin/bitcoin/commit/b6fa752bc7c68ef5b2f839b6101c86241d3af85c s, we don't have CI currently +https://github.com/bitcoin/bitcoin/commit/0b5a366bd70119b34b112825d69804057141535f s, we don't have CI currently +https://github.com/bitcoin/bitcoin/commit/1dbf3350c683f93d7fc9b861400724f6fd2b2f1d pr + +Commits on Dec 25, 2019 +https://github.com/bitcoin/bitcoin/commit/ec45646de9e62b3d42c85716bfeb06d8f2b507dc v + +Commits on Dec 27, 2019 +https://github.com/bitcoin/bitcoin/commit/8dc9aa90c3c7990dd5b491937ddc0e39bc929d1c ce + +Commits on Dec 28, 2019 +https://github.com/bitcoin/bitcoin/commit/6cb80a068dc198832febe456139bed3ae7a1145c v +https://github.com/bitcoin/bitcoin/commit/90df92206cfce4e61eff9d584112643512f6b91c v + +Commits on Dec 29, 2019 +https://github.com/bitcoin/bitcoin/commit/0661a3c4a6ac7e9aa24812dcd1c3ca9053248aff v +https://github.com/bitcoin/bitcoin/commit/7851f14ccf2bcd1e9b2ad48e5e08881be06d9d21 v +https://github.com/bitcoin/bitcoin/commit/b931f61b9ab098ea4ea8fbe4cbf0b03c566c3f63 pr +https://github.com/bitcoin/bitcoin/commit/42ec4994892e67e3430f867af069aafcc2e08593 cr +https://github.com/bitcoin/bitcoin/commit/df97e592078a33f6bf535979e05967c563de317b cr + +Commits on Dec 30, 2019 +https://github.com/bitcoin/bitcoin/commit/aaaaad6ac95b402fe18d019d67897ced6b316ee0 cr +https://github.com/bitcoin/bitcoin/commit/155a11f897c7dfdc891587cc7ddd7c153cbc2a8f cr +https://github.com/bitcoin/bitcoin/commit/8830cb58abc888144a1edb9b2fba427716cc45d8 v + +Commits on Dec 31, 2019 +https://github.com/bitcoin/bitcoin/commit/27fc6a38f813b65e5110c77925a335214aec756a pr +https://github.com/bitcoin/bitcoin/commit/99813a9745fe10a58bedd7a4cb721faf14f907a4 pr + +Commits on Jan 1, 2020 +https://github.com/bitcoin/bitcoin/commit/35fff5be60e853455abc24713481544e91adfedb pr +https://github.com/bitcoin/bitcoin/commit/c0bc453135b3f549f800545075cb7bdb310c3ad4 v +https://github.com/bitcoin/bitcoin/commit/f7453dcc0386a4a1162ced1a490c096afa13178a v + +Commits on Jan 2, 2020 +https://github.com/bitcoin/bitcoin/commit/4ca92dc6d3f3e487d63286d8871d1829b3d279ff v +https://github.com/bitcoin/bitcoin/commit/7c9e821c4e6cb186208ead9c8df616d1f393a49a v +https://github.com/bitcoin/bitcoin/commit/0655c7a94cc9bf54d43eceed805e83f1b59e2409 pr +https://github.com/bitcoin/bitcoin/commit/87744b16b02cb9e4f6e97509facf6cc781e60b98 v +https://github.com/bitcoin/bitcoin/commit/3f8dbcd655479ce2e564a8b17139aca19888ca79 pr + +Commits on Jan 3, 2020 +https://github.com/bitcoin/bitcoin/commit/52900a764c4213f960d2b9c95d54f64753fcfedd pr +https://github.com/bitcoin/bitcoin/commit/ca33451535dc29f64d37c49af8b22142d7716d0d v +https://github.com/bitcoin/bitcoin/commit/9250a087d2f450f37342010aea0a5d583eea508b v +https://github.com/bitcoin/bitcoin/commit/4bdd68f301a9cee3360deafc7531c638e923226b v +https://github.com/bitcoin/bitcoin/commit/190a4051fde736faf99681d107f0b38dd385e90c pr +https://github.com/bitcoin/bitcoin/commit/1f0adb3dac461b3f24f2a98b736d972e9713d67e cr +https://github.com/bitcoin/bitcoin/commit/17e14ac92fced92457945859463eda5d435bdd49 pr +https://github.com/bitcoin/bitcoin/commit/fa37e0a68bea65979f9f8f2e5258fe608acf2bdf cr +https://github.com/bitcoin/bitcoin/commit/71af793512100ee7d508c3fb815af47925fe80ba v +https://github.com/bitcoin/bitcoin/commit/fa5d709fb266c97d4db15006bf855e887a6c123b v +https://github.com/bitcoin/bitcoin/commit/faba4672b64fb5ba89e5cb6299479887494b571a cr +https://github.com/bitcoin/bitcoin/commit/fabb946090be2f604da3d7d4b1bbe93b79baf23e v +https://github.com/bitcoin/bitcoin/commit/fa3d77623ecb25dde6b5f4be11626ed16966eb29 v +https://github.com/bitcoin/bitcoin/commit/fa569e1a9c5ad1bf8bdf866235b21aff56112224 v +https://github.com/bitcoin/bitcoin/commit/77ef48d53263deaf89290c1cbadb6d90e688575d cr +https://github.com/bitcoin/bitcoin/commit/071f2fc204f542c5a287ca8835115a2ee0bf2f50 v +https://github.com/bitcoin/bitcoin/commit/1998152f15fd2b0e83f5068c375a34feaf73db8c v +https://github.com/bitcoin/bitcoin/commit/6fde9d5e47fc9a1042b3fb68031eab5bf55e508d v + +Commits on Jan 4, 2020 +https://github.com/bitcoin/bitcoin/commit/60aba1f2f11529add115d963d05599130288ae28 cr +https://github.com/bitcoin/bitcoin/commit/8bb405bbadf11391ccba7b334b4cfe66dc85b390 v +https://github.com/bitcoin/bitcoin/commit/8925df86c4df16b1070343fef8e4d238f3cc3bd1 v +https://github.com/bitcoin/bitcoin/commit/428ac70095253225f64462ee15c595644747f376 v +https://github.com/bitcoin/bitcoin/commit/72f3227c83810936e7a334304e5fd7c6dab8e91b v +https://github.com/bitcoin/bitcoin/commit/6edebacb2191373e76d79a4972d6192300976096 v +https://github.com/bitcoin/bitcoin/commit/f9abf4ab6d3d3e4d4b7e90723020b5422a141a6f v +https://github.com/bitcoin/bitcoin/commit/816464198c34a373229e865d76f4bc0ca8f127dc pr +https://github.com/bitcoin/bitcoin/commit/09502452bbbe21bb974f1de8cf53196373921ab9 v +https://github.com/bitcoin/bitcoin/commit/76bf97213f4b153dd3ccf1314088a73c4804601d v +https://github.com/bitcoin/bitcoin/commit/c491368d8cfddf3a5b6d574f10ed67492fcecbed v +https://github.com/bitcoin/bitcoin/commit/9a4cc52d734d56d781aaedc6679e1a70a74439c2 pr +https://github.com/bitcoin/bitcoin/commit/392edbd49abec4a8c587979dbb1f44e8605b7ce1 pr +https://github.com/bitcoin/bitcoin/commit/7754d7ab1e4f1918fcc31396cd3e7507f936477f v +https://github.com/bitcoin/bitcoin/commit/593f5e239f277e3fd917737122c2aed3c615430c pr + +Commits on Jan 5, 2020 +https://github.com/bitcoin/bitcoin/commit/fac86ac7b3ceac2f884412c7a9f4bd5bab5e3916 cr +https://github.com/bitcoin/bitcoin/commit/da279fe0eef91402329f270cfdf74065fed7eb11 pr +https://github.com/bitcoin/bitcoin/commit/b949ac9697a6cfe087f60a16c063ab9c5bf1e81f pr +https://github.com/bitcoin/bitcoin/commit/c902c4c0c6a26de8cb69a469503bf4a0bd73903c v + +Commits on Jan 6, 2020 +https://github.com/bitcoin/bitcoin/commit/a004673c54d4c015775e0baced21f3fa961bf754 v +https://github.com/bitcoin/bitcoin/commit/b0a254019c3bc8a353c1304ee65a55cfb3d4ecac v +https://github.com/bitcoin/bitcoin/commit/e8e79958a7b2a0bf1b02adcce9f4d811eac37dfc pr +https://github.com/bitcoin/bitcoin/commit/2a6bce482c13cff37c1af00231265de4656a454b v +https://github.com/bitcoin/bitcoin/commit/deaa6dd144f5650b385658a0c4f9a014aff8dde2 cr + +Commits on Jan 7, 2020 +https://github.com/bitcoin/bitcoin/commit/44f15cfdcfc64d5a0c36fded39e4aef49415b11b v +https://github.com/bitcoin/bitcoin/commit/e1c582cbaa4c094d204da34c3b1fdd0d4c557519 v +https://github.com/bitcoin/bitcoin/commit/63bf06afc387a9aba7e9933d7970ff88da26dc29 cr + +Commits on Jan 8, 2020 +https://github.com/bitcoin/bitcoin/commit/bcb4cdcca321b9dd9e754c68add4cfcdf0439a70 pr +https://github.com/bitcoin/bitcoin/commit/45f151913ef5c7d4f7fb0f81e442fb6377dad353 pr +https://github.com/bitcoin/bitcoin/commit/e3b19d869612b637f8bb702add0c363afe8adb8f v +https://github.com/bitcoin/bitcoin/commit/68c9bbe9bc91f882404556998666b1b5acea60e4 cr +https://github.com/bitcoin/bitcoin/commit/b0bfbe50282877a1eee87118902901a280d6656d cr +https://github.com/bitcoin/bitcoin/commit/af112ab62895b145660f4cd7ff842e9cfea2a530 cr +https://github.com/bitcoin/bitcoin/commit/7ea3b85ecf7bcd8933c8e89985fdde9a3c57d7af pr +https://github.com/bitcoin/bitcoin/commit/cab3859a356d1fbce67c45ccaf2b7f233397ae55 pr +https://github.com/bitcoin/bitcoin/commit/fcef6dbc15ef9630832697b9ebf80f05f20efda8 pr +https://github.com/bitcoin/bitcoin/commit/8b2f471a1bff753cc4df29805ef38c3623f64f6e v +https://github.com/bitcoin/bitcoin/commit/9574de86ad703ad942cdd0eca79f48c0d42b102b v +https://github.com/bitcoin/bitcoin/commit/fefb9165f23fe9d10ad092ec31715f906e0d2ee7 v +https://github.com/bitcoin/bitcoin/commit/7a046cdc1423963bdcbcf9bb98560af61fa90b37 v +https://github.com/bitcoin/bitcoin/commit/6dd982aa9eeb7f29aeb210894e1c490eef22978e pr +https://github.com/bitcoin/bitcoin/commit/07efb3fe2ba4c54ba49840af3a7510d5d3baae79 pr +https://github.com/bitcoin/bitcoin/commit/b065df803ce2969193ff273457cceb781b433177 pr +https://github.com/bitcoin/bitcoin/commit/40a495a38a265a86f5a73381635870865d5aa048 pr +https://github.com/bitcoin/bitcoin/commit/7f3675b3ce2a67e09e5d43c2c42a91112c26bdad pr +https://github.com/bitcoin/bitcoin/commit/295211e668290d7741eb0fd46223087c21fc7c59 pr +https://github.com/bitcoin/bitcoin/commit/6196e930018181301b5972842ae384ea4288ff34 pr +https://github.com/bitcoin/bitcoin/commit/e35e4b2ba052c9a533626286026dbe0a2d546c5b cr +https://github.com/bitcoin/bitcoin/commit/2bede28cd9ec638d8bb32c187ccf12d89345218e cr + +Commits on Jan 9, 2020 +https://github.com/bitcoin/bitcoin/commit/ef63f5fc1136ad2a2cd080d44142a2ee3945c238 v +https://github.com/bitcoin/bitcoin/commit/0874a109da5463699199cf732b974635b97643dd cr +https://github.com/bitcoin/bitcoin/commit/c7654af6f830577a54df12b5d65df93532db0dc2 v +https://github.com/bitcoin/bitcoin/commit/dc0cabeda49a7edbfa71df22846721b6f6224aea v +https://github.com/bitcoin/bitcoin/commit/d48875fa20d0b71b978cb3d1f85dd9ec14e664cc v +https://github.com/bitcoin/bitcoin/commit/72af93f36479dc12d795f1d05fa3d8fbd9b293bd v + +Commits on Jan 10, 2020 +https://github.com/bitcoin/bitcoin/commit/e7f84503571c171a7e6728cd2d77dd4103bd7a6f pr +https://github.com/bitcoin/bitcoin/commit/96cb597325f64cadb3cf43e2cdb3d7c1e2e49891 v +https://github.com/bitcoin/bitcoin/commit/9dd58ca611f6f2b59c25d727a4e955333525d345 v + +Commits on Jan 11, 2020 +https://github.com/bitcoin/bitcoin/commit/8313fa8e8112e429e104b7e7fd48e5e6e359b82e v +https://github.com/bitcoin/bitcoin/commit/62b189b91d4fc08f7da893d7874f17553f7e27b3 pr +https://github.com/bitcoin/bitcoin/commit/f8c69677a1a899a662e02cff20b79dbe924f05dd pr +https://github.com/bitcoin/bitcoin/commit/498cdbb42616bc1e6c44492c907678b4dce41870 v +https://github.com/bitcoin/bitcoin/commit/e258ce792a4849927a6db51786732d71cbbb65fc pr +https://github.com/bitcoin/bitcoin/commit/d3bc18408146e91b3836f72360ff6fa2420b6887 v + +Commits on Jan 12, 2020 +https://github.com/bitcoin/bitcoin/commit/831e1220bc151b1016412359775406b34cb8f52c v + +Commits on Jan 13, 2020 +https://github.com/bitcoin/bitcoin/commit/f2645c26017591f819344d24dc0a88dc32dde6fd v +https://github.com/bitcoin/bitcoin/commit/3d5d7aad269c7afe7e36677d3e76c6579e1b8aba v +https://github.com/bitcoin/bitcoin/commit/f2f9fdf5794ebfc76603054c551f2dd02995a5bb pr +https://github.com/bitcoin/bitcoin/commit/2ed74a43a05a47129d56117deeb489addbcaf05f pr +https://github.com/bitcoin/bitcoin/commit/6fc554f591d8ea1681b8bb25aa12da8d4f023f66 v +https://github.com/bitcoin/bitcoin/commit/ca62563df341786d1d1809a037d8b592924e78c4 v +https://github.com/bitcoin/bitcoin/commit/2f1b2f4ed044fe005e5a6c1b55e95822e83c16df v +https://github.com/bitcoin/bitcoin/commit/9b66083788581c264a097e26795561cb3eac455d v + +Commits on Jan 14, 2020 +https://github.com/bitcoin/bitcoin/commit/a4a93a0badb328c4e54c3ceb7cc29a740bce5e43 pr +https://github.com/bitcoin/bitcoin/commit/ceb789cf3a9075729efa07f5114ce0369d8606c3 pr +https://github.com/bitcoin/bitcoin/commit/e4caa82a03df5c6a6d5d29f34ab006d732c6dac1 cr +https://github.com/bitcoin/bitcoin/commit/daa3f3fa9071a229275dd6a1b8445237ddc3fa97 cr +https://github.com/bitcoin/bitcoin/commit/4824a7d36cf47e766865e0fefe952ec860eb82dd v +https://github.com/bitcoin/bitcoin/commit/4f7127d1e3a51f0f55d42a08439c516dcc8d1a26 v + +Commits on Jan 15, 2020 +https://github.com/bitcoin/bitcoin/commit/7f5db163a4ebc607d441e2457af10942be511d2c cr +https://github.com/bitcoin/bitcoin/commit/5855cc564fd456463e6d335830526675626923c6 cr +https://github.com/bitcoin/bitcoin/commit/4b8f1e989f3b969dc628b0801d5c31ebd373719c v +https://github.com/bitcoin/bitcoin/commit/6cbe6209646db8914b87bf6edbc18c6031a16f1e v +https://github.com/bitcoin/bitcoin/commit/e09c701e0110350f78366fb837308c086b6503c0 v +https://github.com/bitcoin/bitcoin/commit/6dd59d2e491bc11ab26498668543e65440a3a931 v +https://github.com/bitcoin/bitcoin/commit/75163f4729c10c40d2843da28a8c79ab89193f6a v +https://github.com/bitcoin/bitcoin/commit/2ccb7cca4ac67198ac89bd58f5b4ae41a5163ceb v +https://github.com/bitcoin/bitcoin/commit/bd5a02692853f7240a4fdc593d7d0123d7916e45 v +https://github.com/bitcoin/bitcoin/commit/af05bd9e1e362c3148e3b434b7fac96a9a5155a1 pr +https://github.com/bitcoin/bitcoin/commit/002f9e9b4041e9b5bf8a91680ce980bf9ff15074 pr +https://github.com/bitcoin/bitcoin/commit/ac61ec9da6793f00b29ba11f784b9b1c3ae662e9 pr +https://github.com/bitcoin/bitcoin/commit/9a5b5ee81f15b1d89cb25ff3e137a672536cdc46 v +https://github.com/bitcoin/bitcoin/commit/f117fb00da747147cddfb071c1427a2754c278cd v +https://github.com/bitcoin/bitcoin/commit/3c30d7118a5d5cb40c3686e0da884d3928caaeba v + +Commits on Jan 16, 2020 +https://github.com/bitcoin/bitcoin/commit/486f51099ff4e68b67c5bb7ea428c56f3ea1bd55 v +https://github.com/bitcoin/bitcoin/commit/4e8b564df0d4ff2bc2463aa072b15471361d9e7d pr +https://github.com/bitcoin/bitcoin/commit/22c5a986e95d2bd14273465ca0e15fbe3772252d v +https://github.com/bitcoin/bitcoin/commit/c279a81e9c7dc3386e929ff8b635e7a0de9c20c5 v +https://github.com/bitcoin/bitcoin/commit/a9c789ed964dbfae59585e3b56c35816afc3d95e pr +https://github.com/bitcoin/bitcoin/commit/4537ba5f21ad8afb705325cd8e15dd43877eb28f v + +Commits on Jan 17, 2020 +https://github.com/bitcoin/bitcoin/commit/f018d0c9cd7f408dac016b6bfc873670de713d27 pr +https://github.com/bitcoin/bitcoin/commit/7d0a8f4f530885cbf3870291f10f667326373bd1 cr +https://github.com/bitcoin/bitcoin/commit/1a53b0da60097cd7fd423c519f01ceca0fd0aa14 cr +https://github.com/bitcoin/bitcoin/commit/218274de7d1f3aeebc86dcacb4ffaaff32bd237f pr +https://github.com/bitcoin/bitcoin/commit/ec9b964cc998160f9836663d3d4706edb0deb25c pr +https://github.com/bitcoin/bitcoin/commit/2aaeca50b22d541ed2cf44a67a3a5a256515873f pr +https://github.com/bitcoin/bitcoin/commit/95ca6aeec7b8d9dbf39e3a036a5c238634ce3793 pr +https://github.com/bitcoin/bitcoin/commit/2b1641492fbf81e2c5a95f3e580811ca8700adc5 v +https://github.com/bitcoin/bitcoin/commit/7fb94c0ed418202ba0b49f5886bcf0c9cac22552 pr +https://github.com/bitcoin/bitcoin/commit/297e09855793feb94c3229ed989bef8b1eac864e v +https://github.com/bitcoin/bitcoin/commit/2abe8cc3b760219cfa434e4c96e9f8d3611d0037 v +https://github.com/bitcoin/bitcoin/commit/412d5fe8791c417bf46fc55a5bb8d59be98a33db v +https://github.com/bitcoin/bitcoin/commit/2ddf041a8d5e2c9251da19c4b14259c1d318a442 pr +https://github.com/bitcoin/bitcoin/commit/c20fbb7be864bb7652280d5855be89b6b04cdfd1 pr +https://github.com/bitcoin/bitcoin/commit/0deba680646fc5c2bd4ead59933605970ae80995 pr +https://github.com/bitcoin/bitcoin/commit/a654626f076a72416a3d354218d7107571d6caaf pr +https://github.com/bitcoin/bitcoin/commit/c4ea501e96363e937200bc97b8e2d78162bdb699 cr +https://github.com/bitcoin/bitcoin/commit/ca34c5cba5fbb9b046b074a234f06ecf6ed5d610 v + +Commits on Jan 19, 2020 +https://github.com/bitcoin/bitcoin/commit/219417b388a0373f9eb71446e1b0499ab55dd3e2 cr +https://github.com/bitcoin/bitcoin/commit/70e4706093fd7b08a32f9638dace178852a9d249 cr +https://github.com/bitcoin/bitcoin/commit/7e841f3f9b6c43f0fe84dc5ac4b922e4d7edc636 pr +https://github.com/bitcoin/bitcoin/commit/5d2ff75e207021467160aec5986d7d6d54a2b708 pr +https://github.com/bitcoin/bitcoin/commit/daae6403d8bd1d03b108d0517bd74e3197e315a8 pr +https://github.com/bitcoin/bitcoin/commit/631df3ee87ec93e1fc748715671cdb5cff7308e6 pr +https://github.com/bitcoin/bitcoin/commit/e80317be5fc6f6a04ea3b35bfe9991b3a5d29f7a v + +Commits on Jan 22, 2020 +https://github.com/bitcoin/bitcoin/commit/742f84d0de79fcaf17578f9c3376be248c3259bc pr +https://github.com/bitcoin/bitcoin/commit/4de934b9b5b4be1bac8fe205f4ee9a79e772dc34 cr +https://github.com/bitcoin/bitcoin/commit/a5a2654bbc43b5c208418872e5d4c0acbadda5de v +https://github.com/bitcoin/bitcoin/commit/e45463a06abef44e9fff0f9bb19435283fd568df pr +https://github.com/bitcoin/bitcoin/commit/a51aa2880d123fc0bcbc0ccd930dbf98e4d29863 pr +https://github.com/bitcoin/bitcoin/commit/4a7fd7a7124f84e010b01d0769ef0572bf031ee8 v +https://github.com/bitcoin/bitcoin/commit/2f63ffd15caeb79867e56c8cedbe2c702952db9e cr +https://github.com/bitcoin/bitcoin/commit/0a8b68cdf7d25f3a08290fdd05595dc1a063ec7c pr +https://github.com/bitcoin/bitcoin/commit/0038e536de6ecbdcf027f07cb14af420d52033c2 pr +https://github.com/bitcoin/bitcoin/commit/04f78b818f02279d32c3ad3a1140e9410bfb26bf pr + +Commits on Jan 23, 2020 +https://github.com/bitcoin/bitcoin/commit/1ae46dce60a187740ec78b5a3cee8baad0fa539d pr +https://github.com/bitcoin/bitcoin/commit/a3d198c93cbed085e5327d99a4fd635e9a8e6b35 pr +https://github.com/bitcoin/bitcoin/commit/16d6113f4faa901e248adb693d4768a9e5019a16 v +https://github.com/bitcoin/bitcoin/commit/4a072330763b3ff2d1b5c5b8d30a9517873ac6de pr +https://github.com/bitcoin/bitcoin/commit/7a311fa54a936ea611d47204ba4530ffd4529981 pr +https://github.com/bitcoin/bitcoin/commit/2525c096b002a89d4c561e1474800496ad8ebd7e cr +https://github.com/bitcoin/bitcoin/commit/faf40810d7b7f42f3588bfa8a663095aa24001b1 v +https://github.com/bitcoin/bitcoin/commit/fa6b57bcaaf4dc65d78316353033b03d171a3beb cr +https://github.com/bitcoin/bitcoin/commit/aaaae4d0ebd5ef34d81997a73ab9839ba7b4b9e4 cr +https://github.com/bitcoin/bitcoin/commit/2fa8dc545417ab8ff54676ff22a93674d1a54797 v +https://github.com/bitcoin/bitcoin/commit/fa0545901daad32b09511cc61c4af1400c48088d v +https://github.com/bitcoin/bitcoin/commit/faff5a60ed328d4c5fdef253e8935a351cb57bd0 v +https://github.com/bitcoin/bitcoin/commit/fa9dec7c395897e8dbbb6de7a16ec5185a609d41 v +https://github.com/bitcoin/bitcoin/commit/fa04cd6cfc0330b62058ed169d621e08108dc87e v +https://github.com/bitcoin/bitcoin/commit/fab63111bec73859597e6ce0986f76e5e9959091 v + +-- new format with names -- + +v 2020-01-23 16:23:30 fa5c6622c8ecf1954e7177888ad8c97a77b16fb7 doc: Use proper RPC help syntax in importmulti +pr 2020-01-23 16:52:53 fe3b58b95955644f5b8e1cd9080d414378f14755 Merge #17992: doc: Correct a small typo in help / manpage +v 2020-01-23 20:22:56 e4658aa8eaf1629dd5af8cf7b9717a8e72028251 Return mapped AS in RPC call getpeerinfo +v 2020-01-23 20:23:06 3c1bc40205a3fcab606e70b0e3c13d68b2860e34 Add extra logging of asmap use and bucketing +cr 2020-01-23 22:34:28 eb81fc3ee58d3e88af36d8091b9e4017a8603b3c Refactor: Allow LegacyScriptPubKeyMan to be null +v 2020-01-23 22:34:28 f5be479694d4dbaf59eef562d80fbeacb3bb7dc1 wallet: Improve CWallet:MarkDestinationsDirty +cr 2020-01-23 22:34:28 fadc08ad944cad42e805228cdd58e0332f4d7184 Locking: Lock cs_KeyStore instead of cs_wallet in legacy keyman +v 2020-01-23 22:35:06 81610eddbc57c46ae243f45d73e715d509f53a6c List output types in an array in order to be iterated over +v 2020-01-23 22:35:08 01b4511206e399981a77976deb15785d18db46ae Make UpgradeKeyMetadata work only on LegacyScriptPubKeyMan +v 2020-01-23 22:35:08 3afe53c4039103670cec5f9cace897ead76e20a8 Cleanup: Drop unused GUI learnRelatedScripts method +cr 2020-01-23 22:35:08 3f373659d732a5b1e5fdc692a45b2b8179f66bec Refactor: Replace SigningProvider pointers with unique_ptrs +v 2020-01-23 22:35:08 415afcccd3e5583defdb76e3a280f48e98983301 HD Split: Avoid redundant upgrades +v 2020-01-23 22:35:08 4977c30d59e88a3e5ee248144bcc023debcd895b refactor: define a UINT256_ONE global constant +v 2020-01-23 22:35:08 4a7e43e8460127a40a7895519587399feff3b682 Store p2sh scripts in AddAndGetDestinationForScript +v 2020-01-23 22:35:08 501acb5538008d98abe79288b92040bc186b93f3 Always try to sign for all pubkeys in multisig +cr 2020-01-23 22:35:08 c729afd0a3b74a3943e4c359270beaf3e6ff8a7b Box the wallet: Add multiple keyman maps and loops +v 2020-01-23 22:35:08 e2f02aa59e3402048269362ff692d49a6df35cfd Refactor: Copy CWallet signals and print function to LegacyScriptPubKeyMan +pr 2020-01-24 08:35:57 28fbe68fdcac2a06f359b1e48555a3d23015c2b7 Merge #17740: build: remove configure checks for win libraries we don't link against +v 2020-01-24 20:27:49 1a638e11055743ac089973b92f46c376466fe621 gui: Shortcut to close ModalOverlay +v 2020-01-25 08:51:35 2d23082cbe4641175d752a5969f67cdadf1afcea bump test timeouts so that functional tests run in valgrind +pr 2020-01-25 17:20:47 c26b05c2b78f1df45652caf38972d849af9551d0 Merge #17770: test: bump test timeouts so that functional tests run in valgrind +v 2020-01-25 20:07:03 2bcc70531ac88e29a7d59a1ab8c787c55e7f88f5 Updated appveyor job to checkout a specific vcpkg commit ID. +pr 2020-01-26 02:42:30 b4f832e24e779980e5dbf1ea67b41e478feb9022 Merge #18001: Updated appveyor job to checkout a specific vcpkg commit ID +v 2020-01-26 03:43:10 acd644b83d789a6cdfbeda19732119534d10058e build: remove --large-address-aware linker flag +v 2020-01-26 23:55:10 4c524f0aad11b44baa56d2b2e432bbddffff74c2 Bugfix: GUI: Hide the HD/encrypt icons earlier so they get re-shown if another wallet is open +pr 2020-01-27 11:14:13 36ded99717592c122c3df3e32fa98023851fbd4b Merge #17998: gui: Shortcut to close ModalOverlay +pr 2020-01-27 11:31:09 3253b5dcf4d5997dc7918e9bc82aa64ee5d3ce53 Merge #17096: gui: rename debug window +pr 2020-01-27 15:21:57 ef8e2cee9f5d157eeb3139b64e9c3a5fa4bf36f3 Merge #18007: Bugfix: GUI: Hide the HD/encrypt icons earlier so they get re-shown if another wallet is open +pr 2020-01-27 18:15:45 b89f2d05993701736c84f1e0966814333f9684b3 Merge #17453: gui: Fix intro dialog labels when the prune button is toggled +v 2020-01-27 22:31:42 6ef04912af7f216f3112e0e9919f67e36415a792 tests: Update FuzzedDataProvider.h from upstream (LLVM) +v 2020-01-27 22:31:42 cc668d06fb71463fd406df761b0e89e25d4de968 tests: Add fuzzing harness for strprintf(...) +v 2020-01-27 22:31:42 ccc3c76e2b5d28a2372ae5752c08256396bf43e6 tests: Add fuzzer strprintf to FUZZERS_MISSING_CORPORA (temporarily) +cr 2020-01-27 22:38:07 e6050884fdabfa6e51e6afce2041d91e60a5adec guix: Pin Guix using `guix time-machine` +v 2020-01-27 22:41:20 88c83636d5a56bd9551577139786bdd3e74852c2 guix: Update documentation for time-machine +v 2020-01-27 22:44:02 b3c4d9bac6910f6c28f6008c5ca7064a315fd2a5 test: rename test suite name "tx_validationcache_tests" to match filename +pr 2020-01-28 10:14:50 3774281327c83023fdd5a1e61bdc3673b21d7c79 Merge #17933: guix: Pin Guix using `guix time-machine` +pr 2020-01-28 11:25:54 2755b2b1092d0286022cf3cc3028e96f6bee2b34 Merge #18010: test: rename test suite name "tx_validationcache_tests" to match filename +v 2020-01-28 16:10:15 0dae5a5c34ef54ad912382836d12688813745bc5 Fix benchmarks filters + +submodules commits skipped: +s 2020-01-28 16:59:07 20a6babfa9a66f5432ef19c6c433b4357560f853 Update to leveldb upstream using subtree merge +s 2020-01-28 16:59:07 66480821b36c839ab7615cb9309850015bceadb0 Squashed 'src/leveldb/' changes from f545dfabff4c2e9836efed094dba99a34fbc6b88..f8ae182c1e5176d12e816fb2217ae33a5472fdd7 +s 2020-01-28 16:59:58 2e1819311a59fb5cb26e3ca50a510bfe01358350 Squashed 'src/crc32c/' content from commit 224988680f7673cd7c769963d4035cb315aa3388 +pr 2020-01-28 17:00:01 3acaa13b157509e81f0eba6c1e16938816439e7b Import crc32c using subtree merge as as 'src/crc32c' + +v 2020-01-28 17:01:48 24d02a9ac00a82d172b171f73554a882df264c80 build: Update build system for new leveldb +v 2020-01-28 17:01:48 3a037d0067c2c12a1c2c800fb85613a0a2911253 test: Add crc32c exception to various linters and generation scripts +v 2020-01-28 17:01:48 402252a8081e25f22aa1a5c60708714cf1d84ec4 build: Add LCOV exception for crc32c +v 2020-01-28 17:01:48 677fb8e92380d4deb6a3753047c01f7cf7b5af91 test: Add ubsan surpression for crc32c +v 2020-01-28 17:01:48 7cf13a513409c18d18dff2f6203b3630937b487d doc: Add crc32c subtree to developer notes +v 2020-01-28 17:01:48 84ff1b2076ef91ce688930d0aa0a7f4078ef3e1d test: Add crc32c to subtree check linter +v 2020-01-28 17:01:48 8e68bb1ddeca504bedd40aee8492b5478a88c1e5 build: Disable msvc warning 4722 for leveldb build +v 2020-01-28 17:01:48 9ebdf047578f0da7e6578d0c51c32f55e84ac157 build: CRC32C build system integration +v 2020-01-28 17:01:48 be23949765e1b2e050574c6c2a136658a89dee5d build: MSVC changes for leveldb update +pr 2020-01-28 20:02:13 fe48ac8580ae7ddf38575f958dcf9d6ea316e90d Merge #18013: bench: Fix benchmarks filters +v 2020-01-29 00:46:21 b6c3e84e87055be311347d7b636d68a6a828f563 doc: Improve fuzzing docs for macOS users +v 2020-01-29 01:18:22 b35567fe0ba3e6f8d8f9525088eb8ee62065ad01 test: only declare a main() when fuzzing with AFL +pr 2020-01-29 12:39:50 1326092e6cef8c58353c1d6438870c9a35266fd1 Merge #17156: psbt: check that various indexes and amounts are within bounds +pr 2020-01-29 13:16:00 e061b8dc8fba9831db1f674bc1965244d3c11c19 Merge #17971: refactor: Remove redundant conditional +pr 2020-01-29 13:48:30 c434282d2cb816fd92f7e229385169e783c84fdd Merge #18008: test: only declare a main() when fuzzing with AFL +pr 2020-01-29 13:55:43 01fc5891fb5702a744184af362da2850fd38038e Merge #16702: p2p: supplying and using asmap to improve IP bucketing in addrman +pr 2020-01-29 14:45:09 3b5b27673414f622c6211c345781e41ce736f99f Merge #17942: doc: Improve fuzzing docs for macOS users +pr 2020-01-29 15:10:59 c1607b5df4877e5f799d861784cb91dba3ea5887 Merge #17957: Serialization improvements step 3 (compression.h) +v 2020-01-29 15:37:21 a029e18c2bf67dd00552b0f4bbc85fa2fa5b973b Use rolling bloom filter of recent block tx's for AlreadyHave() check +pr 2020-01-29 21:10:15 aabec94541e23a67a9f30dc2c80dab3383a01737 Merge #17719: Document better -keypool as a look-ahead safety mechanism +cr 2020-01-29 22:57:41 fa1a46e7f4631a001bc28d415f27aae5ee324ccc build: Fix appveyor test_bitcoin build of *.raw +v 2020-01-29 23:44:00 b951b0973cfd4e0db4607a00d434a04afb0d6199 on startup, write config options to debug.log +pr 2020-01-30 00:12:29 638239de7502eed57f3b800d9b488de85f00d391 Merge #18022: test: Fix appveyor test_bitcoin build of *.raw +v 2020-01-30 01:41:24 1b96a3cd1ebe725896f59614903184289fe62cf8 tests: reset fIsBareMultisigStd after bare-multisig tests +pr 2020-01-30 05:21:21 2d6e76af240969aa284cd4c3d376493988e218c2 Merge #17261: Make ScriptPubKeyMan an actual interface and the wallet to have multiple +v 2020-01-30 05:56:05 37d800bea016d5cba5635db036f53a486614ed30 Add a constant for the maximum vector allocation (5 Mbyte) +v 2020-01-30 07:09:13 1115ba693b6f6e216cd8417aa499fd018a7c016e psbt_wallet_tests: use unique_ptr for GetSigningProvider +pr 2020-01-30 08:23:53 44c2400bccbc6e77416e9debbeedbeed5cdc0eac Merge #18026: psbt_wallet_tests: use unique_ptr for GetSigningProvider +v 2020-01-30 12:31:07 ac3d10777d65b68862c6deb57594c8fc4d21ca77 gui: Add transactionClicked and coinsSent signals to WalletView +v 2020-01-30 12:38:06 cb8a86d9f952401eaad68b2e3818ce50f7befd91 gui: Remove WalletView and BitcoinGUI circular dependency +pr 2020-01-30 14:50:47 0130abbdb7f5e2a290901064b5ae09097afe2139 Merge #18018: tests: reset fIsBareMultisigStd after bare-multisig tests +pr 2020-01-30 14:56:49 7fcaa8291c6e155e6f5fba42e2ee8ec0bee046a3 Merge #18009: tests: Add fuzzing harness for strprintf(…) +pr 2020-01-30 15:41:59 3b69310beb172b2b56fbfc38c45898a1b627ac54 Merge #17984: test: Add p2p test for forcerelay permission +cr 2020-01-30 17:04:38 8d07706985a72b105b63efa289121d17d31607a1 tests: Add fuzzing harness for AS-mapping (asmap) +cr 2020-01-30 17:06:02 4d2aceaad8d28a54246b6639966e2278d2d795e3 tests: Add fuzzer asmap to FUZZERS_MISSING_CORPORA (temporarily) +v 2020-01-30 19:45:28 085423b978c4cb6a2d1385e091e8e4151599d5e0 Remove GitHub Actions CI workflow. +v 2020-01-30 20:42:50 a8334f7ac39532528c5f8bd3b0eea05aa63e8794 Read and write a checksum for encrypted keys +v 2020-01-30 20:44:22 c9a9ddb4142af0af5f7b1a5ccd13f8e585007089 Set fDecryptionThoroughlyChecked based on whether crypted key checksums are valid +v 2020-01-30 20:44:22 d67055e00dd90f504384e5c3f229fc95306d5aac Upgrade or rewrite encrypted key checksums +pr 2020-01-30 23:10:56 1d1f8bbf57118e01904448108a104e20f50d2544 Merge #16115: On bitcoind startup, write config args to debug.log +v 2020-01-31 00:34:25 c7ec9a18888e040a2e1de2cc740a6ef0372d336d Add missing supported rpcs to doc/descriptors.md +pr 2020-01-31 01:21:26 d176aeafde2944f026c4045aadfd3a74726308dd Merge #18031: Remove GitHub Actions CI workflow. +pr 2020-01-31 01:43:58 3e1bf71064ccb98d0684753e844c80d6da421287 Merge #18025: doc: Add missing supported rpcs to doc/descriptors.md +cr 2020-01-31 05:55:36 19a354b11f85a3c6c81ff83bf702bf7a40cf5046 Output a descriptor in createmultisig and addmultisigaddress +cr 2020-01-31 09:18:27 61eb058cc10592cfa314ba2209fb370706100e8b gui: Drop BanTableModel dependency to ClientModel +v 2020-01-31 10:38:04 5bad7921d0b33b62c0a59a478c2e8c869fc5e3b5 [test] PSBT RPC: check that bip32_derivs are present by default +cr 2020-01-31 12:49:51 3aee10b80b9d9a0f5172fc2ee75f03a37d5c3863 gui: Drop ShutdownWindow dependency to BitcoinGUI +cr 2020-01-31 13:36:13 3c82b92d2e01e409cc46261bffcf3643102f0b94 tests: Add fuzzing harness for functions taking floating-point types as input +v 2020-01-31 13:36:13 c2bd5888607d283a229c9361747a93c83dfea0de Add missing includes +pr 2020-01-31 14:42:59 d104aa0ace36f5c2a125d8ae80f2e7e746f9eab8 Merge #17951: Use rolling bloom filter of recent block txs for AlreadyHave() check +v 2020-01-31 23:43:26 4e9efac678a9c0ea4e4c7dd956ea036ae6cf17ec test: Check wallet name in -walletnotify script +v 2020-01-31 23:51:37 38c2395d7a905c87dc4630031849fd8e403e61bf Use ASNs for mapped IPv4 addresses correctly +v 2020-01-31 23:51:37 6f8c93731203c111f86c39eaf2102f9a825d1706 Mark asmap const in statistics code +v 2020-01-31 23:51:37 c86bc144081f960347232546f7d22deb65d27deb Make asmap Interpret tolerant of malicious map data +v 2020-01-31 23:51:37 d58bcdc4b569a667b6974c3547b7ff6f665afce9 Avoid asmap copies in initialization +pr 2020-02-01 10:07:42 cadb9d33421d44e4c8b78897a1276ab5b5871425 Merge #18036: gui: Break trivial circular dependencies +pr 2020-02-01 10:11:24 f05c1ac444e0c893516535bfdf07c5c8cd9bce16 Merge #17937: gui: Remove WalletView and BitcoinGUI circular dependency +v 2020-02-01 12:32:32 0e519fe28425b0148fe0d026bd084ecd244f5669 build: Fix behavior when ALLOW_HOST_PACKAGES unset +v 2020-02-01 22:07:19 e9434ee03efdfc0a5a54cf46561e95fd93cba007 Remove false positive GCC warning +pr 2020-02-02 09:35:46 6d0e532ae029cb687258f8cdd43d7f9f3cfaa900 Merge #17585: rpc: deprecate getaddressinfo label +v 2020-02-02 10:27:47 9a299a59cc8a9ab516e047356c5bc0e93774b557 net: reference instead of copy in BlockConnected range loop +pr 2020-02-03 05:02:23 365c83e6a8399913cec5f0383978c28f8418fa3b Merge #18054: net: reference instead of copy in BlockConnected range loop +pr 2020-02-03 11:54:34 b2df21b32ca95f5a24ae8ebaa840aefce6301da6 Merge #17925: Improve UpdateTransactionsFromBlock with Epochs +pr 2020-02-03 12:28:38 651e34388832149402fea0d26f3dc13bbe197f5a Merge #16974: Walk pindexBestHeader back to ChainActive().Tip() if it is invalid +v 2020-02-03 12:49:46 1de8c067c74cd171144c8a900a8a20efe3072c43 depends: clang 6.0.1 +v 2020-02-03 12:49:46 7e2104433cd0905ccf94632511b3ca0ce5b0463b build: use macOS 10.14 SDK +v 2020-02-03 12:49:46 ca5055a5aa07aba81a87cf12f6f0526a63c423b5 depends: native_cctools 921, ld64 409.12, libtapi 1000.10.8 +cr 2020-02-03 15:48:40 ff59bcd3213ef61f2167c0aa60fcaf5afbc20c61 gui: Drop PeerTableModel dependency to ClientModel +v 2020-02-03 21:05:04 acf8abc7f3cf7efa418a46f9f69f23f1a5035582 gui: Fix unintialized WalletView::progressDialog +v 2020-02-04 03:46:47 6c223152238d2e818e38357b03f38a4dbe9de016 build: add additional attributes to Win installer +pr 2020-02-04 07:57:53 02fafdd12ccad91d4fdebb010134d84a31c055f3 Merge #18060: gui: Drop PeerTableModel dependency to ClientModel +v 2020-02-04 11:18:02 5efc25f9638866941028454cfa9bae27f1519cb4 [wallet] translate "Keypool ran out" message +v 2020-02-04 11:20:25 709f8685ac37510aa145ac259753583c82280038 [wallet] CreateTransaction: simplify change address check +v 2020-02-04 11:20:25 92bcd70808b9cac56b184903aa6d37baf9641b37 [wallet] allow transaction without change if keypool is empty +pr 2020-02-04 21:55:26 f32564f0a73c5ad1a107dd112e40516f39d1a51e Merge #16681: Tests: Use self.chain instead of 'regtest' in all current tests +pr 2020-02-05 01:45:06 8625446b4d86880be9e218f3cd136de1e382101d Merge #17336: scripts: search for first block file for linearize-data with some block files pruned +pr 2020-02-05 04:16:06 a064e005fa6b2b9f2c7f01e45a04a4d740f4605d Merge #18059: build: add missing attributes to Win installer +v 2020-02-05 04:28:40 eca56f89293b74f11ca631ff2a0793e970e65841 test: replace 'regtest' leftovers by self.chain +v 2020-02-05 07:13:01 f5a3a5b9ab362c58fa424261f313aa9cf46d2a98 gui: Add close window shortcut +pr 2020-02-05 11:40:22 554d89fb295efe5c8adc81583d5ded1acbd98305 Merge #18029: tests: Add fuzzing harness for AS-mapping (asmap) +pr 2020-02-05 11:41:40 bd5c4c69716e4236d2959bd733a2170afbc715f6 Merge #18069: test: replace 'regtest' leftovers by self.chain +pr 2020-02-05 13:59:42 adea5e1b54cf5155b56bffe08af16538d5789c38 Merge #18023: Fix some asmap issues +pr 2020-02-05 14:26:00 01668839de3693736c29be61c4330aea00bb0136 Merge #17660: build: remove deprecated key from macOS Info.plist +pr 2020-02-05 14:27:32 c8ce2632ebff53aea721301b87b48ed1f98c40d4 Merge #16392: build: macOS toolchain update +pr 2020-02-05 14:43:28 b30a1f3e39aae7c5828d508fcd12d107afaa5a6d Merge #18052: Remove false positive GCC warning +pr 2020-02-05 14:54:42 712b7d9b479dd68c0b410cf45407f11de0b64f79 Merge #17804: doc: Misc RPC help fixes +pr 2020-02-05 16:23:53 8a56f79d491271120abc3843c46e9dda44edd308 Merge #17482: util: Disallow network-qualified command line options +v 2020-02-06 01:24:13 dc9305b6162ec615ff5fb2876e4f312051b543af random: don't special case clock usage on macOS +v 2020-02-06 05:02:09 cb9e88e73a042ff4e1c83289a6f8fa1db03fb093 build: don't embed a build-id when building libdmg-hfsplus +v 2020-02-06 05:21:00 d76894987d0277e8011932ab7dfd77c537f8ea6e logging: enable thread_local usage on macOS +pr 2020-02-06 07:29:59 4d211c8da11253d39f10b56d23fc91fb29f485f5 Merge #18003: build: remove --large-address-aware linker flag +pr 2020-02-06 07:43:38 23fab1a3dfe6f308880197dbe2bd7ce70866f13c Merge #18062: gui: Fix unintialized WalletView::progressDialog +v 2020-02-06 13:24:40 b837b334db5dd6232725fd2350928ff4fbd3feee net: Fail instead of truncate command name in CMessageHeader +v 2020-02-06 13:43:15 ff9c671b11d40e5d0623eff3dd12e48cbaafb34e refactor: Work around GCC 9 `-Wredundant-move` warning +v 2020-02-06 18:05:55 63ce882760e1ceb4114c716851aedaf911ebb93b doc: link to homebrew's troubleshooting page +v 2020-02-07 03:58:44 abf86243568af380c1384ac4e0bfcdcfd4dab085 Add custom vector-element formatter +v 2020-02-07 04:06:09 3cd8ab9d11e4c0ea47e56be4f6f2fdd48806796c Make std::vector and prevector reuse the VectorFormatter logic +v 2020-02-07 04:08:11 3c94b0039d2ca2a8c41fd6127ff5019a2afc304e Convert undo.h to new serialization framework +v 2020-02-07 18:40:38 2af3e16ca917acd85c2d4f709f6d486519d6af0d Qt: pass clientmodel changes from walletframe to walletviews +pr 2020-02-09 13:55:45 75fb37ce68289eb7e00e2ccdd2ef7f9271332545 Merge #18032: rpc: Output a descriptor in createmultisig and addmultisigaddress +v 2020-02-09 14:12:43 fad027fb0ce019f31b20861c37e802d4e29e6931 scripted-diff: Add missing spaces in RPCResult, Fix type names + +submodule update skipped: +s 2020-02-09 16:43:12 97aa5740c0e9ef433cbedafe689b641297b50f5e Squashed 'src/univalue/' changes from 5a58a46671..98261b1e7b +s 2020-02-09 16:44:29 fad9ea8fdb0a7269a3fcc472fd948669d74f7aa7 Update univalue subtree + +v 2020-02-09 17:59:14 ac57859e53167f4ff3da467b616b0902c93701a9 qt: Fix deprecated QCharRef usage +v 2020-02-09 22:22:29 fa55a2554c2661b8f2a759044d5ac85c9979d9ca depends: Remove reference to win32 +cr 2020-02-09 22:22:53 fae9084ac5b10f94bdee54853d307838c4254e9c build: Skip i686 build by default in guix and gitian +pr 2020-02-10 11:36:09 22d11187ee3c7abfe9d43c9eb68f102498cc2b9a Merge #17398: build: Update leveldb to 1.22+ +pr 2020-02-10 12:22:32 0193fd766bdef4913aab5e098b59871e6be71f1c Merge #18082: logging: enable thread_local usage on macOS +pr 2020-02-10 12:24:15 407d7c831aab92aaf80b1d7609835347bd72011a Merge #18091: Qt: pass clientmodel changes from walletframe to walletviews +pr 2020-02-10 12:30:28 9e77726fb7371022862449ab35f3d7f7eac223eb Merge #18101: qt: Fix deprecated QCharRef usage +v 2020-02-10 12:44:35 b0a01299ed8cc2026e91a8dcad880b700e462cee test: Disable s390 build on travis +pr 2020-02-10 12:57:35 657c5e5f1cd92169b5a3c880f01376b7ed0fd9b3 Merge #18099: Update univalue subtree +v 2020-02-10 13:03:52 9e111db088e4137865ae068d206c769994ea0a29 test: set a name for CI Docker containers +pr 2020-02-10 13:49:40 ab7915f804b776c68ae017d55506c66af533f5a0 Merge #18106: test: Disable s390 build on travis +v 2020-02-10 14:34:11 faf2c5aca01643eb560287e08f9c0a7ca0ac9c88 build: Remove unused USE_COVERAGE +v 2020-02-10 14:34:45 fac71e364e4bbaeffc35e45aff8c8c2c6f2b5c67 build: link fuzz/test_runner.py for out-of-tree builds +cr 2020-02-10 14:41:34 faf7d4fa86b700ec272806cd2bd8666a92405619 build: Add cov_fuzz target +pr 2020-02-10 14:52:51 b063cb690f5735db87e760afc6ace30a7a219447 Merge #18081: test: set a name for CI Docker containers +pr 2020-02-10 16:10:34 4c2578706c70148fc001f42a0918a2fb10252b43 Merge #18021: Serialization improvements step 4 (undo.h) +v 2020-02-10 16:48:15 2a95c7c95690112a03b14ccb0fb8f66db12cb75b ci: Check for submodules +cr 2020-02-10 17:42:13 79c811ca2b922e19c4e6289bfd57481e587cd024 Specify ignored bitcoin-qt file precisely +v 2020-02-10 17:47:26 dcb7af053da8f4ce479db7e776802cea26e84434 Ignore only auto-generated .vcxproj files +pr 2020-02-10 17:59:50 ceb3d45f7d86731a700b2851602bca9be9b8703a Merge #17947: test: add unit test for non-standard txs with too large tx size +pr 2020-02-10 18:11:49 646f0ada0205ae4b3952107e3b1542f06adda32b Merge #18051: build: Fix behavior when ALLOW_HOST_PACKAGES unset +v 2020-02-10 21:00:10 0e0fa27acb74b4f0075afcf59a0dff51a21baddb Get rid of VARINT default argument +pr 2020-02-11 08:26:31 35b7a8e539fae30b0d0bc0ae4a3a994091626cbe Merge #18087: Get rid of VARINT default argument +pr 2020-02-11 09:32:17 98264e2ccb177a6603fe957f7e263fb413b50d04 Merge #18104: build: Skip i686 build by default in guix and gitian +v 2020-02-11 16:44:12 facb71576cd4d2e90fd03e09d29b42fa3d730e8c net: Remove forcerelay of rejected txs +v 2020-02-11 19:23:51 7e80f646b24a2abf3c031a649bcc706a695f80da Get the OutputType for a descriptor +v 2020-02-11 19:37:37 ae379cf7d12943fc192d58176673bcfe7d53da53 [scripts] build earlier releases +v 2020-02-11 21:46:21 8b1460dbd1b732f06d4cebe1fa6844286c7a0056 [tests] check v0.17.1 and v0.18.1 backwards compatibility +v 2020-02-11 21:46:22 c7ca6308968b29a0e0edc485cd06e68e5edb7c7d [scripts] support release candidates of earlier releases +v 2020-02-11 21:46:23 9d9390dab716f07057c94e8e21f3c7dd06192f35 [tests] add wallet backwards compatility tests +v 2020-02-11 21:46:23 b769cd142deda74fe46e231cc7b687a86514f2f1 [test] add v0.17.1 wallet upgrade test +v 2020-02-11 21:46:23 c456145b2c65f580683df03bf10cd39000cf24d5 [test] add 0.19 backwards compatibility tests +v 2020-02-11 22:53:53 bf36a3ccc212ad4d7c5cb8f26d7a22e279fe3cec gui: Fix race in WalletModel::pollBalanceChanged +pr 2020-02-12 01:50:07 73a396e0280a40be55bf1acf9abef2f81999a440 Merge #18004: build: don't embed a build-id when building libdmg-hfsplus +v 2020-02-12 02:42:28 53234fd0c7107e8bf4dfb5d44fb8d31359c80bbc doc: remove PPA note from release-process.md +pr 2020-02-12 15:20:12 caa2f3af2928f5840a38496cf787777293bde717 Merge #12134: Build previous releases and run functional tests +v 2020-02-12 15:27:19 470e2ac602ed2d6e62e5c80f27cd0a60c7cf6bce tests: Avoid hitting some known minor tinyformat issues when fuzzing strprintf(...) +pr 2020-02-12 16:45:17 d4fc9aeb8b6a66d8d40ab93547c8b1390458d638 Merge #18125: doc: remove PPA note from release-process.md +v 2020-02-12 17:48:30 005f8a92ccb5bc10c8daa106d75e1c21390461d3 wallet: Improve LegacyScriptPubKeyMan::CanProvide script recognition +pr 2020-02-12 17:48:30 2bdc476d4d23256d8396bb9051a511f540d87392 Merge #17708: prevector: avoid misaligned member accesses +v 2020-02-12 17:48:30 a304a3632f0437f4d0f04589a2200e2da91624a7 Revert "Store p2sh scripts in AddAndGetDestinationForScript" +v 2020-02-12 17:48:30 eb7d8a5b07e89133a5fb465ad1b793362e7439f7 [test] check for addmultisigaddress regression +v 2020-02-12 20:20:38 c8e24ddce31a8de6255b23c19d958c1cd44a8847 [REFACTOR] Abstract out script execution out of VerifyWitnessProgram() +v 2020-02-12 22:51:41 c9fe61291e9b23f37cf66194c2dad28e4d4a8954 gui: Throttle GUI update pace when -reindex +pr 2020-02-13 08:44:36 b6a16fa44ef27cb597dae7e264a7028352740bd5 Merge #18123: gui: Fix race in WalletModel::pollBalanceChanged +pr 2020-02-13 08:48:07 0c20809da85ac708386fa1ca80f7242917f90761 Merge #18121: gui: Throttle GUI update pace when -reindex +v 2020-02-13 11:20:43 530d02addbfea01ab24a2acd17af456a1e7b798a build: pass -fno-ident in Windows gitian descriptor +v 2020-02-13 12:57:37 7f1475c7119e8c72bce39a63386a6ca859066b80 rpc: update validateaddress RPCExamples to bech32 +v 2020-02-13 16:43:35 25bc17fceb08ee9625c5e09e2579117ec6f7a1c5 refactor: rpc: Remove vector copy from listtransactions +v 2020-02-13 17:59:51 1cd43e83c6e8d81e950aaaede7a8a51505d0a2bc [test] unit test for new MockForward scheduler method +v 2020-02-13 17:59:51 930d8375421451c8c4127608c360b0f6a0a62127 [test] add chainparams property to indicate chain allows time mocking +v 2020-02-13 17:59:51 a6f63598adb880a75e1571aac58338c17fa7ad53 [util] allow scheduler to be mocked +pr 2020-02-13 18:50:02 470664f2b788e2cce9202991d11476a6fef00ef4 Merge #17746: refactor: rpc: Remove vector copy from listtransactions +v 2020-02-14 10:40:23 6ba617dbe2b79d13ceec7d452e44ecab3bb814e7 build: add Wreturn-type to Werror flags +v 2020-02-14 10:40:23 c98c26ee992f204b17bf17d271512b36c40ad8c5 ci: use --enable-werror on more hosts +cr 2020-02-14 10:45:40 2ce3447eb1e25ec7aec4b300dabf6c1e394f1906 Deduplicate the message verifying code +v 2020-02-14 10:45:40 f8f0d9893d7969bdaa870fadb94ec5d0dfa8334d Deduplicate the message signing code +v 2020-02-14 10:45:41 e193a84fb28068e38d5f54fbfd6208428c5bb655 Refactor message hashing into a utility function +v 2020-02-15 04:22:39 3ca574cef0b4423f21b2c3efd8f5c9f71d52f219 Convert CCompactSize to proper formatter +pr 2020-02-15 19:40:44 2a2631fb0dc781504df0f3fe8b42f21cbdb6f20d Merge #18108: Fix .gitignore policy in build_msvc directory +v 2020-02-16 04:49:24 10633398f2dddf929d3f535aa48d138ad5e6c50f Add DifferenceFormatter +v 2020-02-16 04:49:24 56dd9f04c701aa3ac340e95065bf83de20373c8b Make VectorFormatter support stateful formatters +v 2020-02-16 12:11:54 1b068c50dd1522990cc33e1aca444741c7e5a747 tests: Add --valgrind option to test/fuzz/test_runner.py for running fuzzing test cases under valgrind +v 2020-02-16 12:38:49 0933a37078e1ce3a3d70983c3e7f4b3ac6c3fa37 gui: Avoid Wallet::GetBalance in WalletModel::pollBalanceChanged +pr 2020-02-16 18:22:06 33861a836727cc0514f9ec8de0e692b89f98c410 Merge #18145: build: add Wreturn-type to Werror flags, check on more Travis machines +pr 2020-02-16 18:47:54 94c0287aec9a250f58c4c633dabaf405d82cecd2 Merge #18159: tests: Add --valgrind option to test/fuzz/test_runner.py for running fuzzing test cases under valgrind +pr 2020-02-17 02:26:21 263f53e2d07acfbb5c301b654cab7ba63fd96784 Merge #18098: scripted-diff: Add missing spaces in RPCResult, Normalize type names +pr 2020-02-17 11:59:23 051439813e2cfcbba69c9b0c0eb00b43f9dde825 Merge #13339: wallet: Replace %w by wallet name in -walletnotify script +pr 2020-02-17 12:05:44 179504ccb6f4e5a4418b064a184ba37b04491a31 Merge #17948: build: pass -fno-ident in Windows gitian descriptor +v 2020-02-17 20:53:50 be94096dfb0c4862e2314cbae4120d7360b08ef2 Fix a violation of C++ standard rules that unions cannot be switched. +v 2020-02-17 23:49:34 7c8b6e5b5206a98f86675d0107ad99ea1d080466 [lib] add scheduler to node context +v 2020-02-17 23:49:34 8bca30ea17cd4c1dacee28eaa27e5fa3493b021d [rpc] expose ability to mock scheduler via the rpc +pr 2020-02-18 02:01:50 36f42e1bf43f2c9f3b4642814051cedf66f05a5e Merge #18037: Util: Allow scheduler to be mocked +cr 2020-02-18 04:32:35 7ba962276e3e540a15eb0bdbbaaa101958229bd4 doc: Minor grammatical changes and flow improvements +v 2020-02-18 07:56:26 a3b539a924f8611abb3096f2bd9d35094b5577e3 ci: Run fuzz testing test cases under valgrind +v 2020-02-18 08:29:35 aff2748f8aee72f03b5fb6f6f97f0d0f66391755 httpserver: use own HTTP status codes +pr 2020-02-19 02:28:41 68e841e0af223a220d1f037e4c5680c1b228aa3e Merge #18067: wallet: Improve LegacyScriptPubKeyMan::CanProvide script recognition +v 2020-02-19 10:03:48 d6d2602a32251c1017da88b47c801b7283c66ce3 add: test that transactions expire from mempool +v 2020-02-19 14:36:03 555236f769c13518db70f5df36e5688d63486bd5 tests: Remove -detect_leaks=0 from test/fuzz/test_runner.py - no longer needed +v 2020-02-19 15:10:22 5ea81449f30a6fe6db3b6df5e8009f21a782ff44 tests: Add support for excluding fuzz targets using -x/--exclude +v 2020-02-19 15:11:54 733bbec34fbec85574cc456832b2b2f807e5dce9 tests: Add --exclude integer,parse_iso8601 (temporarily) to make Travis pass until uninitialized read issue in FormatISO8601DateTime is fixed +v 2020-02-19 15:27:19 f2472f64604a0c583f950c56e8753d0bee246388 tests: Improve test runner output in case of target errors +pr 2020-02-19 17:20:38 eddcbfb109e592fdf39ea2c38c4d7ba183de3e34 Merge #18166: ci: Run fuzz testing test cases (bitcoin-core/qa-assets) under valgrind to catch memory errors +v 2020-02-19 18:44:46 0653939ac130eddffe40c53ac418bea305d3bf82 Add static_asserts to ser_X_to_Y() methods +cr 2020-02-19 20:51:40 fa31eebfe9107e14dc1d6b588f5b4c878d1010de test: Tabs to spaces in all tests +pr 2020-02-19 20:52:25 faca8eff39876cc8c0ee609a89bdcebc21976d47 test: Remove incorrect assumptions in validation_flush_tests +v 2020-02-19 23:41:06 12a2f377185a413b740460db36812de22ee2e041 util: Avoid potential uninitialized read in FormatISO8601DateTime(int64_t nTime) by checking gmtime_s/gmtime_r return value +v 2020-02-20 01:14:50 fac52dafa013047b051ca7163cc30ac69ad35531 test: Set catch_system_errors=no on boost unit tests +pr 2020-02-20 13:28:46 56fc2dfcc3e61a05f6e54c2479897162c8ae4c75 Merge #18122: rpc: update validateaddress RPCExamples to bech32 +pr 2020-02-20 13:56:41 eb3c6b0912349873113bfd49baf1c505bb48d9cf Merge #18070: doc: add note about `brew doctor` +v 2020-02-21 18:49:37 fa4620be782c2bf6b5ffddf4f671194fdd1536f3 util: Add UnintrruptibleSleep +v 2020-02-21 19:06:21 fa9af06d91e9357e86863781746f0e78a509967e scripted-diff: Replace MilliSleep with UninterruptibleSleep +v 2020-02-21 19:06:27 fae86c38bca5c960462e53975314a0749db5d17d util: Remove unused MilliSleep +pr 2020-02-21 19:23:20 e9fc8f6e7f572224d2bd4577eee6d538331ef663 Merge #18172: test: Transaction expiry from mempool +pr 2020-02-21 20:02:52 9dd7bd47be2f046ea4b114ab86a099ec483d9f3a Merge #18034: Get the OutputType for a descriptor +v 2020-02-21 20:10:04 c31bc5bcfddf440e9a1713f7ba2ca2bf9cfa8e2e Consolidate service flag bit-to-name conversion to a shared serviceFlagToStr function +v 2020-02-21 20:10:04 cea91a1e40e12029140ebfba969ce3ef2965029c Bugfix: GUI: Use unsigned long long type to avoid implicit conversion of MSB check +v 2020-02-21 22:16:40 bca8665d0895c450e552c357a036d9e9579e3678 scripted-diff: Wallet: Rename incorrectly named *UsedDestination +pr 2020-02-22 00:00:22 36e507227ed6b7006227eabb13475177359cbc04 Merge #18183: test: Set catch_system_errors=no on boost unit tests +pr 2020-02-22 16:18:46 ab9de435880c9d77e4137b65050591ef2d14f809 Merge #18181: test: Remove incorrect assumptions in validation_flush_tests +v 2020-02-22 18:11:09 c72a11a1a030036eb1fe4472086a9733731961ce test: Add cost_of_change parameter assertions to bnb_search_test +pr 2020-02-24 17:01:24 225aa5d6d51968919d0d3a1abc13d37f7e83c7d2 Merge #18193: scripted-diff: Wallet: Rename incorrectly named *UsedDestination +pr 2020-02-25 03:06:38 a674e89d2771a076d9e9dd182a05b60662ef9cf4 Merge #18162: util: Avoid potential uninitialized read in FormatISO8601DateTime(int64_t) by checking gmtime_s/gmtime_r return value +pr 2020-02-25 11:29:54 03f98b15ad4f910d25b0fa9024c1880af70d44f5 Merge #17577: refactor: deduplicate the message sign/verify code +v 2020-02-25 11:50:39 1dde238f2c21a0cc9bada10a2449cf9c6b2178ad Add ChainClient setMockTime, getWallets methods +pr 2020-02-25 11:50:39 31c0006a6cd5ecbabd119eaf9dae6978aa54f150 Merge #17264: rpc: set default bip32derivs to true for psbt methods +v 2020-02-25 11:50:39 3ce16ad2f91d1e2edc7e7bdc5a19f72aa8c3e739 refactor: Use psbt forward declaration +v 2020-02-25 16:33:01 fa7d0503d320900e14c4d9bc016d65c7431070bb rpc: Move OuterType enum to header +cr 2020-02-25 16:35:58 fa6b061fc118995eec41766519a11bc0dd1a901d rpc: Auto-format RPCResult +v 2020-02-25 18:00:29 fa45d606461dbf5bf1017d6ab15e89c1bcf821a6 test: Reduce unneeded whitelist permissions in tests +cr 2020-02-25 18:04:03 2a6a6ea0f5b97cba95b5678268d638c81764b9b1 tests: Add fuzzing harness for bloom filter class CBloomFilter +cr 2020-02-25 18:04:03 eabbbe409f397e97b1e6fad7385d9d1813ae2880 tests: Add fuzzing harness for rolling bloom filter class CRollingBloomFilter +pr 2020-02-25 20:37:43 c3b471592346b98ae9aedf7cbc2a4058061b1ad8 Merge #18206: tests: Add fuzzing harness for bloom filter classes (CBloomFilter + CRollingBloomFilter) +v 2020-02-25 23:10:38 e574fff53eec4a27c83b765cb69e31d8399047ea Add CustomUintFormatter +v 2020-02-25 23:10:44 353f376277ad9b87e03c9ccbc1028c4b6d12e8ea Convert blockencodings.h to new serialization framework +v 2020-02-26 18:19:16 fab2527515e8db944ae044bea8580e2cd9414bcd test: Disable mockforward scheduler unit test for now +pr 2020-02-26 18:46:05 89a97a71f2eeb5cd99cd77f31cdc64e194f16ab6 Merge #17985: net: Remove forcerelay of rejected txs +pr 2020-02-26 19:00:24 e5d47ed8fd3724cc5295fca70573f1edf552ff62 Merge #18167: Fix a violation of C++ standard rules where unions are used for type-punning +v 2020-02-27 00:24:33 b902bd66b0f35c5016dc5d7aaf501940935edd62 test: check custom descendant limit in mempool_packages.py +pr 2020-02-27 02:42:13 4502ed7cd1b3f0478dd2fdf048ad36cd87a8e2df Merge #18211: test: Disable mockforward scheduler unit test for now +v 2020-02-27 05:12:18 3d9b41ecc02a69daa19df2bc850d60bf9917b724 build: add --enable-determinism configure flag +v 2020-02-27 15:11:30 76445677586a4c2fa72606b662269a4390c2e71f Add missing step in win deployment instructions +pr 2020-02-27 20:35:14 324a6dfeafcbee8d92231d23f15064edf12715b4 Merge #17771: tests: Add fuzzing harness for V1TransportDeserializer (P2P transport) +pr 2020-02-27 21:02:24 1615043935ef9c185eb1dc5d2365d0460424bc7b Merge #17461: test: check custom descendant limit in mempool_packages.py +v 2020-02-27 21:26:36 fa2cf85e6f366d62ebf173bf0bd51af45806afe1 test: Fix race in p2p_segwit +pr 2020-02-28 01:37:03 fe63d79eabf1a9a0084d43802620d34f383aa358 Merge #18212: doc: add missing step in win deployment instructions +pr 2020-02-28 02:59:07 0aed17ef2892478c28cd660e53223c6dd1dc0187 Refactor FormatStateMessage into ValidationState +v 2020-02-28 02:59:21 10e85d4adc9b7dbbda63e00195e0a962f51e4d2c Remove ValidationState's constructor +v 2020-02-28 02:59:21 10efc0487c442bccb0e4a9ac29452af1592a3cf2 Templatize ValidationState instead of subclassing +pr 2020-02-28 05:32:31 eae48ec84c4deacfe92139d07ee80e51136cb766 Merge #18209: test: Reduce unneeded whitelist permissions in tests +v 2020-02-28 09:04:18 cbd345a75c2be26e17fce4c65c0c1ca19a3eb9e0 test: test OP_CSV empty stack fail in feature_csv_activation.py +v 2020-02-28 09:04:59 09f706ab8e47ddfdfa41418f2e7cb6d87661147a test: check for OP_CSV empty stack fail reject reason in feature_csv_activation.py +v 2020-02-28 09:04:59 5ffaf883b93fb8d3d841c36e808b90d61d39d492 test: eliminiated magic numbers in feature_csv_activation.py +pr 2020-02-28 16:49:29 e5753fa4e808aab0f10641a5ed4d53fa1ae0e141 Merge #17921: test: test OP_CSV empty stack fail in feature_csv_activation.py +v 2020-02-28 17:31:35 1ef28b4f7cfba410fef524def1dac24bbc4086ca Make AnalyzePSBT next role calculation simple, correct +v 2020-02-28 18:25:37 fab30b61eb51538a4db62e34f7133c44575b3fe9 util: Remove unused ParseMoney that takes a c_str +v 2020-02-28 18:25:58 8888461f6814ae8b6221b02049fb9e1f69a5ff70 util: Fail to parse empty string in ParseMoney +pr 2020-02-28 18:39:52 73cfa070e5e4edcace587dde3190ac913ac0623c Merge #18195: test: Add cost_of_change parameter assertions to bnb_search_test +pr 2020-02-28 19:08:38 5ad80bec3f31c0e4bec0bc0b62dff28b32e4b8b5 Merge #18135: build: add --enable-determinism configure flag +v 2020-02-28 20:42:23 54be4e71d898de8f14e3269550d56097c023d1cc test: check specific reject reasons in feature_csv_activation.py +v 2020-02-28 21:07:40 9aa8145bc0241c39281e300b4183ca672d4ae2ac Merge #17959: test: check specific reject reasons in feature_csv_activation.py +cr 2020-02-28 21:09:03 7bf4ce4f644bb7dac9b63172c656b5d599eedea3 refactor: test/bench: dedup SetupDummyInputs() +v 2020-02-28 21:20:31 5aab011805ceb12801644170700b1a62e0bf4a5d test: add unit test for non-standard "scriptsig-not-pushonly" txs +pr 2020-02-28 21:23:04 7a266a679d66803a2838324179a50dd0757bbb54 Merge #18173: refactor: test/bench: deduplicate SetupDummyInputs() +cr 2020-02-28 22:04:27 faf6f156ffd1a8ed1aed047428d791a8c13c162b test: Add missing syncwithvalidationinterfacequeue +pr 2020-02-28 22:51:54 1a51cd1ac5a094c911d6cafb3f57ef0798d51570 Merge #17800: random: don't special case clock usage on macOS +pr 2020-02-28 23:01:58 eca4d8ef6afff6706d8626f72345768b1f78f630 Merge #16562: Refactor message transport packaging +v 2020-02-28 23:56:49 d36146009fb3fc9b9a772823b4df139a85173481 Drop unused mach time headers +pr 2020-02-29 02:44:48 902796093235083c23df10c1c45f80d89a93b2ab Merge #18225: util: Fail to parse empty string in ParseMoney +pr 2020-02-29 11:08:11 715dbbe9e8b64fd4b556a0b0720b44d68c3b5e32 Merge #18229: random: drop unused MACH time headers +v 2020-03-01 16:13:35 3e32499909ca8127baaa9b40ad113b25ee151bbd Change example addresses to bech32 +pr 2020-03-01 21:34:05 54a7ef612a3b69984d521432f8a694a682c76090 Merge #17399: validation: Templatize ValidationState instead of subclassing +v 2020-03-02 09:26:30 037fa770eb1ed5152b3ef2c5d3fb2a812d3ef944 wallet: make KeypoolCountExternalKeys() const +v 2020-03-02 09:26:30 22d329ad0ed3ed501bd811720be6a2876d1afe4d wallet: use constant CWallets in rpcdump.cpp +v 2020-03-02 09:26:30 7b3587b29db9eaf11718fc09d48817a45a0a429a wallet/db: make IsDummy() const +v 2020-03-02 09:26:30 8cd0b86340870d8f359e4ae26880e03ea36818ab wallet: make CanGetAddresses() const +v 2020-03-02 09:26:30 d366795d180bc52ba750f71f201a6e5e0c40f1b6 wallet/db: make Backup() const +v 2020-03-02 09:26:30 dc2d0650fdb69d27fe1b0092555b7841d542a635 make BlockUntilSyncedToCurrentChain() const +v 2020-03-02 09:26:30 ddc93557ad0cf8e433df850d38710828ccd99c16 wallet: make CanGenerateKeys() const +v 2020-03-02 09:26:31 227b9dd2d6e1914edfec108af6bec5f12d9f6f39 wallet/spkm: make GetOldestKeyPoolTime() const +v 2020-03-02 09:27:35 57c569e4d9779e2263848770e0ba7eab3054a1bf wallet: make BackupWallet() const +v 2020-03-02 09:27:35 d9b0ebc1da8758645f6de24a4a557511ef9b5e36 wallet: make ReserveDestination pwallet ivar const +v 2020-03-02 09:27:35 df3a818d2a9fe48e656a8ad2da18fab8a1bfd6e3 wallet: make getters const +v 2020-03-02 09:27:36 79facb11e92f8b61063f301027dee7c7344eb1be wallet: use constant CWallets in rpcwallet.cpp +pr 2020-03-02 10:47:59 1f886243e464032123045cbf70ff2a72de9b9c80 Merge #18224: Make AnalyzePSBT next role calculation simple, correct +pr 2020-03-02 17:10:55 ac5c5d0162a963be6fbaa53261c01705436a65f3 Merge #18168: httpserver: use own HTTP status codes +v 2020-03-02 22:25:05 fa6df0de538c15a6d393830af373ac9af6f48125 test: Bump timeouts to accomodate really slow disks +v 2020-03-03 08:07:21 9b0e16226e6c1fb6a3550d635339f1bbb49a852f doc: Correct spelling errors in comments +v 2020-03-03 18:42:52 faae5a9a356d821f0cbdea32030b0ce356351a1d test: Add bad-txns-*-toolarge test cases to invalid_txs +pr 2020-03-04 05:22:17 088604221b4a5d4cb7eaee34158550a7cce19e6f Merge #18253: doc: Correct spelling errors in comments +pr 2020-03-04 14:16:57 a71c34742c24245a0d642e68f9e61f46cc7573fb Merge #17809: rpc: Auto-format RPCResult +v 2020-03-04 14:24:08 08b992675cf8d946db19b7bea747fa1085fdb2a2 test: add feature_asmap functional tests +v 2020-03-04 14:24:11 fbe9b024f01c29153afe494fed74b623ce3ffefa config: use default value in -asmap config +v 2020-03-04 14:24:13 81c38a24975f34e5894efe3d1aaf45ff6a8cee4a config: enable passing -asmap an absolute file path +v 2020-03-04 14:24:15 b8d0412b213df18f23bf8677ab94068c6cca9f51 config: separate the asmap finding and parsing checks +v 2020-03-04 14:24:17 dcaf543ba0241f9219cea70b67c7b066d4c9ca9b test: add functional test for an empty, unparsable asmap +cr 2020-03-04 14:24:19 819fb5549b0d02477f47b3c40338071f37b6d885 logging: asmap logging and #include fixups +v 2020-03-04 14:31:31 c90b9a2399f4cead37bad39f388ce1255e123dc4 net: extract conditional to bool CNetAddr::IsHeNet +v 2020-03-04 14:54:27 5ba829e12e99f119df56cab422f827b9be03fe57 rpc: fix getpeerinfo RPCResult `mapped_as` type +v 2020-03-04 14:54:30 1ba3e1cc21150abe632a5b82a1a38998b33815dc init: move asmap code earlier in init process +cr 2020-03-04 16:06:23 fa8b6020ec9350c5ddf05018eb390ff565cefca3 doc: Merge release notes for 0.20.0 release +cr 2020-03-04 19:44:25 b054c46977667953593819248c167545aa3e7a40 refactor: Convert ping time from double to int64_t +v 2020-03-04 19:44:57 e6fc63ec7ee637a4b533e4d7b22def05e74e1dff refactor: Convert min ping time from double to int64_t +v 2020-03-04 19:45:29 7a810b1d7a9d03818706dc94457dc3255f062796 refactor: Convert ping wait time from double to int64_t +v 2020-03-04 20:52:16 d831831822885717e9841f1ff67c19add566fa45 lockedpool: When possible, use madvise to avoid including sensitive information in core dumps +v 2020-03-04 22:35:15 9b5950db8683f9b4be03f79ee0aae8a780b01a4b bnb: exit selection when best_waste is 0 +pr 2020-03-05 03:25:39 2492dc0068f84e2cc4d776c87f489bce79afa47b Merge #18259: doc: Merge release notes for 0.20.0 release +pr 2020-03-05 08:06:52 cbc32d67dc0cbe636ee3510802ae863bee73ac13 Merge #18249: test: Bump timeouts to accomodate really slow disks +v 2020-03-05 10:44:50 1891245e7318bf625bbf67aab08a79fc3e87b61d refactor: Cast ping values to double before output +pr 2020-03-05 13:13:33 d0601e67f151a753bc71e41e5a5c56a3fa09c1f1 Merge #17812: config, net, test: asmap feature refinements and functional tests +pr 2020-03-05 16:33:54 a2a77ba34f713d6406c31a4baa991666b13794a0 Merge #18056: ci: Check for submodules +cr 2020-03-05 16:35:47 8a2a652e6fab5eb8224beefcc07d9011b61865a8 Remove redundant type information from rpc docs +v 2020-03-05 19:09:28 2455aa5d7f54befeade05795ed8f5dd89d01042a [rpc] changed MineBlocksOnDemand to IsMockableChain +pr 2020-03-05 19:40:06 96488e67847997548a532a82001b6cd58dfa1822 Merge #18263: rpc: change setmocktime check to use IsMockableChain +pr 2020-03-05 19:50:10 aaf09469fb2c0976292854be5c6de484667ecf91 Merge #18260: refactor: Fix implicit value conversion in formatPingTime +pr 2020-03-05 19:56:26 727857d12d040b467f6956019a1698e15d27ccaa Merge #18112: Serialization improvements step 5 (blockencodings) +pr 2020-03-05 21:08:31 891464950b071091ecb5166c235ef32ab2eb8bac Merge #18109: tests: Avoid hitting some known minor tinyformat issues when fuzzing strprintf(...) +v 2020-03-05 21:22:47 7e9c7113afbed96cef80c327cc93e82000d6bb69 compressor: Make the domain of CompressAmount(...) explicit +pr 2020-03-05 21:25:36 d7134b306a1787c2c867e6e667cb6583192cd6f5 Merge #17917: tests: Add amount compression/decompression fuzzing to existing fuzzing harness +v 2020-03-05 21:35:26 8f6fb0a85ae6399c8fb4f205ad35c319c42294f1 tests: Add serialization/deserialization fuzzing for integral types +v 2020-03-05 21:35:26 9ff41f64198e8ddb969544fc1a5328763f1fa183 tests: Add float to FUZZERS_MISSING_CORPORA (temporarily) +pr 2020-03-05 21:41:30 a2b5aae9f3470f4a1366c4d0b3b9644baf371db4 Merge #17996: tests: Add fuzzing harness for serialization/deserialization of floating-points and integrals +cr 2020-03-05 22:11:10 f4691b6c217ab843e6e66fa0ad34d83137499a89 tests: Add fuzzing harness for CKey related functions +pr 2020-03-05 22:43:16 3f826598a42dcc707b58224e94c394e30a42ceee Merge #17972: tests: Add fuzzing harness for CKey and key related functions +pr 2020-03-06 08:41:00 97aadf98d0b890e09eff45535fa13a663f27334d Merge #16117: util: Replace boost sleep with std sleep +v 2020-03-06 14:13:31 306f71b4eb4a0fd8e64f47dc008bc235b80b13d9 scheduler: don't rely on boost interrupt on shutdown +v 2020-03-06 14:13:31 b9c426012770d166e6ebfab27689be44e6e89aa5 sync.h: add REVERSE_LOCK +v 2020-03-06 14:14:08 d0ebd93270758ea97ea956b8821e17a2d001ea94 scheduler: switch from boost to std +v 2020-03-06 14:14:10 294937b39de5924e772f8ed90d35c53290c8acab scheduler_tests: re-enable mockforward test +cr 2020-03-06 14:14:10 cea19f685915be8affb2203184a549576194413f Drop unused reverselock.h +cr 2020-03-06 14:29:21 259e290db8f784dba75979acf16e7964af63445c tests: Add fuzzing harness for locale independence testing +v 2020-03-06 19:20:41 70a6b529f306ff72ea1badf25e970a92b2b17ab3 lint-cppcheck: Remove -DHAVE_WORKING_BOOST_SLEEP_FOR +pr 2020-03-06 20:31:11 45cdcd47d99e3af28c82839148b637d31c0b4fc9 Merge #18126: tests: Add fuzzing harness testing the locale independence of the strencodings.h functions +pr 2020-03-06 20:51:56 3516a31eaa7714a815e0346625ae096f281d3d9e Merge #18234: refactor: Replace boost::mutex,condition_var,chrono with std equivalents in scheduler +v 2020-03-06 22:08:12 fab7d14ea5a4305317d66f35beb3225a07823d42 test: Check that wait_until returns if time point is in the past +pr 2020-03-07 00:24:54 4d80274b9963e85d6e6dc79a41cd3ff4f389ada5 Merge #18241: wallet/refactor: refer to CWallet immutably when possible +v 2020-03-07 00:29:23 0d0bc3b5c1dad86cd5b2d7d90925d5722f2be6e8 build: Add locale fuzzer to FUZZERS_MISSING_CORPORA +pr 2020-03-07 01:04:53 3d28c886f077ce22fb7755fe9ec1f4e08d3d4a62 Merge #18286: build: Add locale fuzzer to FUZZERS_MISSING_CORPORA (and unbreak Travis! :)) +v 2020-03-07 01:34:30 1d0a87e712a6253ef3f9b06a9611fd8e113401d2 build: remove chrono package from depends Boost +v 2020-03-07 01:34:31 ad345909b2465a65ee023b389fae342088e2f187 doc: remove Boost Chrono from install docs +v 2020-03-07 01:34:31 bd37f2bc26158f85ef1ab73b9ca1fc0da8ea562a build: remove Boost Chrono detection from build system +v 2020-03-07 01:34:31 e21fa542b189263ad3a4342d048905d68c3a3507 test: remove Boost Chrono installation from CI +v 2020-03-07 14:39:25 4fe4de6364b05d2abde196b486b6e3f254d18026 tests: Fuzz additional functions in the hex fuzzing harness +v 2020-03-07 14:39:25 c7ea12d098ee292b78274671b698202c6551b075 tests: Add key_io fuzzing harness +v 2020-03-07 14:40:19 1d324ce92229f3557f6bb38a63873dea1677240e tests: Fuzz additional functions in the integer fuzzing harness +v 2020-03-07 14:58:38 fa70ccc6c4e304646b4610228f3975b3a9762643 scheduler: Use C++11 member initialization, add shutdown assert +v 2020-03-07 15:35:49 52fed696d251dc38211eb2fa7f144b6a989dd479 tests: Fuzz additional functions in the script fuzzing harness +v 2020-03-07 15:35:49 5fc10f3cb5991684f10c589fa5ccf2d694ffa32a tests: Fuzz additional functions in the transaction fuzzing harness +v 2020-03-07 16:13:43 474ea3b927ddc67e64ae78e08c20c9264817e84d Introduce DescriptorCache struct which caches xpubs +cr 2020-03-07 16:13:47 09e25071f40c564af08a1386c39c4f2d8eb484b6 Cache parent xpub inside of BIP32PubkeyProvider +cr 2020-03-07 16:13:47 58f54b686f663e4c46a2cf7a64560409007c7eb3 Add DescriptorCache* read_cache and DescriptorCache* write_cache to Expand and GetPubKey +cr 2020-03-07 16:13:47 66c2cadc91d26074b89e5ada68350b5c8676efac Rename BIP32PubkeyProvider.m_extkey to m_root_extkey +cr 2020-03-07 16:13:47 deb791c7ba057a3765d09b12bf3e55547a5298e4 Only cache xpubs that have a hardened last step +cr 2020-03-07 16:13:47 df55d44d0de2174ba74ed3a28bef5e83b0a51b47 Track the index of the key expression in PubkeyProvider +cr 2020-03-07 16:13:47 f76733eda5f4c161e9eb47c74b949582ab8f448a Cache the immediate derivation parent xpub +v 2020-03-07 16:38:06 ddc7e42d600a0cb3e763cda0dc04a1f2f34e9440 build: Set minimum Automake version to 1.13 +pr 2020-03-07 17:19:52 5e12a61044b15e4e29ac786135a9ebb72d1bfc61 Merge #17926: tests: Add key_io fuzzing harness. Fuzz additional functions in existing fuzzing harnesses. +v 2020-03-07 22:55:34 fab0e5ba7f2777b86f1487234ed7cc4be9f72ea8 fuzz: Add assert(script == decompressed_script) +v 2020-03-08 17:26:27 2c52b59d0a44a86d94fee4e437978d822862c542 Refactor rawtransaction's SignTransaction into generic SignTransaction function +v 2020-03-08 17:26:32 d999dd588cab0ff479bc7bee8c9fc33880265ec6 Add SignTransaction function to ScriptPubKeyMan and LegacyScriptPubKeyMan +v 2020-03-08 17:26:32 f37de927442d3f024926a66c436d59e391c8696a Implement CWallet::SignTransaction using ScriptPubKeyMan::SignTransaction +v 2020-03-08 17:27:05 a4af324d15c1ee43c2abd11a304ae18c7ee82eb0 Use CWallet::SignTransaction in CreateTransaction and signrawtransactionwithwallet +v 2020-03-09 01:02:31 492971de35bab26346545f68365872211f458b00 build: Fix mingw pkgconfig file and dependency naming +v 2020-03-09 02:20:41 a652ba6293ef8d144935dc882b5f0003c987fa22 rpc/wallet: initialize nFeeRequired to avoid using garbage value on failure +pr 2020-03-09 12:17:51 6ddf435493cb428b10001638a726fad1ab6e55b8 Merge #18274: rpc/wallet: initialize nFeeRequired to avoid using garbage value on failure +v 2020-03-09 15:30:18 bf0664181965787829935d5f9704640cff5cfc66 tests: Reset FUZZERS_MISSING_CORPORA to enable regression fuzzing for more harnesses +pr 2020-03-09 16:05:52 31b2ce70fb279e886da636716e45ec75bca0a711 Merge #18299: tests: Update FUZZERS_MISSING_CORPORA to enable regression fuzzing for all harnesses in master +v 2020-03-09 16:13:48 fa4fa88d7648bfeb75fac941cdff79dcc38affbf doc: Remove --disable-ccache from docs +v 2020-03-09 16:13:57 aaaa055ff72a33241a3fdc2308d77bcbf51c262d fuzz: Add option to merge input dir to test runner +v 2020-03-09 16:16:17 3d70dd99f9f74eef70b19ff6f6f850adc0d5ef8f Move FillPSBT to be a member of CWallet +v 2020-03-09 16:16:20 6a9c429084b40356aa36aa67992da35f61c2f6a2 Move direct calls to MessageSign into new SignMessage functions in CWallet and ScriptPubKeyMan +cr 2020-03-09 16:16:20 82a30fade70a2a95c2bbeac4aa06dafda600479d Move key and script filling and signing from CWallet::FillPSBT to ScriptPubKeyMan::FillPSBT +v 2020-03-09 16:16:20 d2774c09cfcc6c5c967d40bb094eabc8c0bdb6bf Clear any input_errors for an input after it is signed +cr 2020-03-09 16:16:20 dc174881ad8498a6905ba282a48077bc5c8037a7 Replace GetSigningProvider with GetSolvingProvider +cr 2020-03-09 16:16:36 815c7a679316e34b2072a45949ad4ecb1ae1c7fb tests: Add basic fuzzing harness for CNetAddr/CService/CSubNet related functions (netaddress.h) +pr 2020-03-09 16:19:29 be00ef2aca0e5c350af0043af29428ac85dcca1d Merge #18292: fuzz: Add assert(script == decompressed_script) +cr 2020-03-09 18:20:52 6590395f6047cbfbe29f491d816c25c9a28d23a2 tests: Remove FUZZERS_MISSING_CORPORA +v 2020-03-09 18:41:39 46a1ee7732550956a5db35f9a5cb87530b6cff43 doc: Add historical release notes for 0.19.1 +v 2020-03-09 18:51:03 c1e07423083cd2a7e3f2b28f69a573ea1837af4d doc: Warn about wallet.dat re-use and backups +pr 2020-03-09 18:53:46 5518eeec2727d40e1105901a8751bf584ab69402 Merge #18047: tests: Add basic fuzzing harness for CNetAddr/CService/CSubNet related functions (netaddress.h) +cr 2020-03-09 20:24:50 65a52a002475056183ea8ee1a42b78aec7d68583 tests: Add fuzzing harness for CScript operations +v 2020-03-09 20:24:50 eb7c50ca1f4eafed4bb9a20d3012776545a6a433 tests: Add common Consume* fuzzing functions +pr 2020-03-09 20:54:19 ffdde475b0688217a3b000389aed78d48b91aa47 Merge #18303: doc: Add historical release notes for 0.19.1 +pr 2020-03-09 21:02:12 dcf2ccbfde1f11c055900aff69fd527559512eab Merge #18115: wallet: Pass in transactions and messages for signing instead of exporting the private keys +v 2020-03-09 21:12:03 d484279a46fe2cd5e133b6c18a1e00f802084772 test: add logging to wallet_listsinceblock.py +pr 2020-03-09 21:16:21 ccb2c9e7891a53bdfcf4bbefd364fff1fb0cc30e Merge #18306: test: add logging to wallet_listsinceblock.py +v 2020-03-09 21:39:48 e37f53648e3acc6aea75adafec4de2bdbd8cb293 Make lifetime correctness easier to see (avoid reference lifetime extension) +cr 2020-03-09 21:39:48 e7ddbd98937412b2e8b7a3dfacdcacfcbb1d9148 tests: Add fuzzing harness for CScriptNum operations +pr 2020-03-10 04:01:31 6fb4bbfb0e5f1885bd8c4fea652facfbe3de5299 Merge #18176: tests: Add fuzzing harness for CScript and CScriptNum operations +v 2020-03-10 09:14:04 cbf2d75d8f49b7b1e32acb5373b312b484f3fa6a qa: Add getdescriptorinfo functional test +pr 2020-03-10 13:17:23 1a97c9a483e580e4c7b0fd33136edb92f52bca1d Merge #15443: qa: Add getdescriptorinfo functional test +pr 2020-03-10 13:24:10 5d92ac26ed8984c29eabc4b78bcddd2423e68dac Merge #18264: build: Remove Boost Chrono +v 2020-03-10 13:24:49 ffff9dcdc3cbe427739cc19cc7a53f032474fa2a test: Explain why test logging should be used +v 2020-03-10 14:47:32 fadafb83cff9a9a340eac1b5a853e2467d5e0ef7 scheduler: Make schedule* methods type safe +v 2020-03-10 14:52:53 fa36f3a29538012a6eb5c3402b3b3c18fd32b230 refactor: move DUMP_BANS_INTERVAL to banman.h +v 2020-03-10 16:15:11 fa3fa27c45618bcd8e325b27728b5f6c175d1a03 fuzz: Remove option --export_coverage from test_runner +v 2020-03-10 17:35:01 ac73afbcbf7751cf2b8d52de6f2a341e8bac5cf6 doc: asmap release note +pr 2020-03-10 17:45:38 cf4cb28efcf80c018a7f070c671f43cd172dbd86 Merge #18305: test: Explain why test logging should be used +v 2020-03-10 18:56:52 2e4edc68f903cf7873027440ff551f3f6121dbe6 Add some test logging to wallet_bumpfee.py +v 2020-03-10 18:56:52 f1b45031148105754c23af08c891387e71c3c2c3 bumpfee test: exit loop at proper time with new fee value being compared +pr 2020-03-10 19:15:39 b5c7665e3083f5daaf2b9f247a59a008f2d689a4 Merge #18311: Bumpfee test fix +v 2020-03-10 23:38:42 4444edc2e6671d3f73de3725447130f73ecf0375 ci: Enable all functional tests in valgrind +cr 2020-03-11 07:57:55 9220a0fdd0f3dc2c8dd7cbeefac7d11106451b51 tests: Add one specialized ProcessMessage(...) fuzzing binary per message type for optimal results when using coverage-guided fuzzing +cr 2020-03-11 07:57:55 fd1dae10b4a549ba9292d837235d59bd9eebbed3 tests: Add fuzzing harness for ProcessMessage(...) +cr 2020-03-11 12:42:27 516cc6fc7842c13a1d54c6ea2b9e3d335a872125 tests: Remove unit test from fuzzing harness +cr 2020-03-11 12:42:27 7b169cae207ad1301c4edf7d623407d1f377169d tests: Add deserialization fuzzing of SnapshotMetadata (utxo_snapshot), uint160 and uint256 +v 2020-03-11 12:51:23 fa1244783ccb4798af4906ac6be5a38df241fa38 doc: Explain rebase/squash policy in CONTRIBUTING.md +v 2020-03-11 13:37:59 46ef4cfe5f416cb34e889646df3ee241b1d5ae5a tests: Re-arrange test cases in parse_univalue to increase coverage +v 2020-03-11 13:38:10 9f8d74a8c78457ed49c7ff81bae909c8e003670b tests: Fuzz currently uncovered code path in TxToUniv(...) +pr 2020-03-11 13:39:09 16dfaed1b732c4f1607326af07b4e83498f38e1c Merge #18304: ci: Enable all functional tests in valgrind +pr 2020-03-11 13:51:24 f1064c1b0d102ad669c04099bb474f71d797fce8 Merge #17989: tests: Add fuzzing harness for ProcessMessage(...). Enables high-level fuzzing of the P2P layer. +v 2020-03-11 13:51:26 08eab0f599a7be7b9b0256bfe9e3a793fe7450db tests: Add fuzzing of CSubNet, CNetAddr and CService related functions +v 2020-03-11 13:51:26 117a706faba586f2095f97cf630b709b3e29a947 tests: Fuzz RecursiveDynamicUsage(const std::shared_ptr& p) +v 2020-03-11 13:51:26 47a263108b05c7039baba5618656898312a7a5ef tests: Fuzz DecodeBase64PSBT(...) +v 2020-03-11 13:51:26 7a861a62c164ab9b07d6fca09b6a8176e688f1f6 tests: Fuzz HasAllDesirableServiceFlags(...) and MayHaveUsefulAddressDB(...) +v 2020-03-11 13:51:26 81b58a3161c5d558dadd2b7093e4fc9687844cd9 tests: Fuzz operator!= of CService +v 2020-03-11 13:51:26 c2c58f6f59d38e3d60fe0a8fa45b2a45deee84cc tests: Increase fuzzing coverage of DecompressScript(...) +v 2020-03-11 13:51:26 d3d4892ef45d09edbbe4672b112100743970b2a5 tests: Simplify code by removing unwarranted use of unique_ptr:s +v 2020-03-11 13:51:26 e57e67057ae76db73f52ddd5480a4ea5b4bf1636 tests: Fuzz DecodeHexBlk(...) +pr 2020-03-11 15:05:33 9c507a77f7a11fd280bb4c534a59b62a8f92f9bd Merge #18310: doc: asmap release note +pr 2020-03-11 15:17:43 b813fbe804a39b2a07755e4bf5af82597bb7cfd0 Merge #17159: doc: Add a note about backporting +pr 2020-03-11 15:21:05 90b3e59caf2e9701d23af429372d9b61acd4768a Merge #17833: doc: Added running functional tests in valgrind +pr 2020-03-11 15:25:47 377eed564e103a1bae8502617d1f426f939bab73 Merge #18170: doc: Minor grammatical changes and flow improvements +pr 2020-03-11 15:28:15 2926cbcebb70fa3b4402bf50b0d6f31a5e8c673b Merge #18219: doc: Add warning against wallet.dat re-use +pr 2020-03-11 16:01:25 414f6c496d9c4c44a5251d88d4a63039de961524 Merge #18283: doc: Explain rebase policy in CONTRIBUTING.md +pr 2020-03-11 16:11:56 d20d5dc824269fff45bb6fc9dbf1a6ce811b8559 Merge #18285: test: Check that wait_until returns if time point is in the past +pr 2020-03-11 16:31:38 3b21a7863411b4b0391313e765f23b2664d4540a Merge #18290: build: Set minimum Automake version to 1.13 +v 2020-03-11 16:32:15 a33cffbeabcc42137c4a66aa19b7dd1d300e6d73 util: HelpExampleRpc formatting fixup +pr 2020-03-11 16:45:47 24a727e23e4143bcc4e5dfac536bae8d8261d32a Merge #18255: test: Add bad-txns-*-toolarge test cases to invalid_txs +pr 2020-03-11 17:42:47 0eebe45cf7c63f55af0116c25cf0824ef31b9e33 Merge #18208: rpc: Change RPCExamples to bech32 +pr 2020-03-11 18:02:43 249114b1a6a4a10f8cfa61cafd01c391991a750f Merge #18314: tests: Add deserialization fuzzing of SnapshotMetadata (utxo_snapshot). Increase fuzzing coverage. +v 2020-03-11 18:23:59 fa72d270ad5326d8ad78bb7100e74dd460188c32 test: Bump walletpassphrase timeouts in wallet_createwallet to avoid valgrind timeouts +2020-03-11 18:28:57 58c72880ff70807cf622cdebf1d6273f4041bd2e Merge #18268: rpc: Remove redundant types from descriptions +cr 2020-03-11 18:37:17 fa9b3040e7f21733416c3ea155f372c8c398ea80 test: Bump rpc timeout in feature_assumevalid to avoid valgrind timeouts +v 2020-03-11 20:16:54 bbbbb53dd1111c615ea519e5f275a115616e5a33 fuzz: Add missing ECC_Start to key_io test +pr 2020-03-11 20:55:28 309b0c4c19319a8e0fd3fd7ff82ef9ebb2803072 Merge #13693: [test] Add coverage to estimaterawfee and estimatesmartfee +pr 2020-03-11 20:57:14 5c73645ac79f1d12611051d2e9467a003383ffd9 Merge #18319: fuzz: Add missing ECC_Start to key_io test +v 2020-03-11 21:16:31 0ae42a16c766a7ecb8711bfad6f22b8581ea0258 guix: Remove now-unnecessary gcc make flag +pr 2020-03-11 21:17:15 9cc7eba1b5651195c05473004c00021fe3856f30 Merge #18318: test: Bump rpc timeout in feature_assumevalid to avoid valgrind timeouts +v 2020-03-11 23:38:27 1168394d759b13af68acec6d5bfa04aaa24561f8 [wallet] Notify conflicted transactions in TransactionRemovedFromMempool +v 2020-03-11 23:38:33 2dd561f36124972d2364f941de9c3417c65f05b6 [validation] Remove pool member from ConnectTrace +v 2020-03-11 23:38:33 5613f9842b4000fed088b8cf7b99674c328d15e1 [validation] Remove conflictedTxs from PerBlockConnectTrace +v 2020-03-11 23:38:33 969b65f3f527631ede1a31c7855151e5c5d91f8f [validation] Remove NotifyEntryRemoved callback from ConnectTrace +v 2020-03-11 23:38:33 cdb893443cc16edf974f099b8485e04b3db1b1d7 [validation interface] Remove vtxConflicted from BlockConnected +v 2020-03-11 23:38:33 e57980b4738c10344baf136de3e050a3cb958ca5 [mempool] Remove NotifyEntryAdded and NotifyEntryRemoved callbacks +v 2020-03-12 10:34:43 5e6b8b391243016cb06e9e107c2e6a13a744b31e build: Use git archive as source tarball +pr 2020-03-12 10:36:37 4c42a13205a1b75c9b4c171d4eae4716dca646e3 Merge #18320: guix: Remove now-unnecessary gcc make flag +v 2020-03-12 10:43:16 6c4da59f5b5b3c40526d38965d4ffa7fd59f2ebc build: Drop SOURCEDIST reordering +cr 2020-03-12 13:07:17 79804fe24bd00e183382dfbcab9343960d158aa5 [rpc] walletcreatefundedpsbt: don't automatically append inputs +cr 2020-03-12 13:07:17 e5327f947c310849e1ddbb24321e4c9f85564549 [rpc] fundrawtransaction: add_inputs option to control automatic input adding +pr 2020-03-12 14:15:43 2737197ff39f98b0fbdf0fe913c1a7c8ee0f318c Merge #18213: test: Fix race in p2p_segwit +pr 2020-03-12 14:20:50 e2d36639ca87b980b147047e4e47cf160b2c9406 Merge #18228: test: Add missing syncwithvalidationinterfacequeue +v 2020-03-12 14:23:56 fa7fea3654203bf7e7bd504589dd564af7fc749d refactor: Remove mempool global from net +v 2020-03-12 15:15:10 100213c5c29ebd7bd50aa885e54594ae10bf87a4 util: Fail to parse space-only strings in ParseMoney(...) (instead of parsing as zero) +pr 2020-03-13 03:23:19 3f9e6a3c1ce8710364a815ac1796b45ccf1325b5 Merge #18316: util: HelpExampleRpc formatting +v 2020-03-13 15:18:24 fb15bfd99e6ed705cb6f7c4dcd1b2a6bc68be79e Fix nit in getblockchaininfo +v 2020-03-13 20:35:41 fadd99f61032c0b75ad9b198eb5d8e307b0518ee rpc: Add missing newline in RPCResult description +v 2020-03-13 20:36:15 fac52253f81a4f0d04b25eb4b6c28d04b85ef10b rpc: Document an RPCResult for all calls; Enforce at compile time +pr 2020-03-13 22:30:21 e5cb0dffd5ac8d05d1512d440f45201c1792aca9 Merge #18002: Abstract out script execution out of VerifyWitnessProgram() +pr 2020-03-13 22:45:09 7f8176a1ebd00679596971fd01012cf61743b826 Merge #18204: descriptors: improve descriptor cache and cache xpubs +cr 2020-03-14 09:24:21 7df0cf719fecf1b8d09801295db8bd2137bfe033 Replace remaining literals BTC with CURRENCY_UNIT +v 2020-03-14 14:44:56 7a6627ae87b637bf32c03122865402bd71adf0d1 Fix mining to an invalid target + ensure that a new block has the correct hash internally in Python tests +cr 2020-03-14 20:23:01 d056df033a1e88554f7cc39dd709a87b17cb49df Replace std::to_string with locale-independent alternative +pr 2020-03-14 21:03:45 67dfd18f4401986063e22c79d4d7da61f15b5cd4 Merge #16902: O(1) OP_IF/NOTIF/ELSE/ENDIF script implementation +cr 2020-03-15 03:15:52 fa192952507dbe5f405abffce38b3556923ba271 test: Bump timeouts to avoid valgrind failures +pr 2020-03-15 15:14:40 d402c1e4d3e812341176e0948d64ff126f9ec3c1 Merge #18345: test: Bump timeouts to avoid valgrind failures +v 2020-03-15 16:19:50 0579a276307d22ae62ecbcaa704e8477274e784d tests: Add fuzzing harness for CBlockHeader +v 2020-03-15 16:19:50 cb4eec13c03089617a94169b4e30381d87788b56 tests: Add fuzzing harness for count_seconds(...) +cr 2020-03-15 17:25:29 44abf417eb1cd8598084eee1a429ca57c7d0579a tests: Add fuzzing harness for various functions taking std::string as input +cr 2020-03-15 17:25:29 7726f3bc4671fbc23e5bc31d0eb9fe381e2f07ef tests: Add fuzzing harness for CFeeRate +cr 2020-03-15 17:25:29 d69145acb76ff12b7c5c1e55ce89e14bc6453904 tests: Add fuzzing harness for MultiplicationOverflow(...) +cr 2020-03-15 17:34:27 e4d366788bc2e8dce8e6ca572fce08d913d15d6b build: Drop needless EXTRA_DIST content +v 2020-03-15 23:43:39 686c5456f2fcf7e301907223d16a85f7eb378c6c Fix missing header in sync.h +cr 2020-03-16 10:08:07 ddbb41931019ed4226af3df37874c7eb7cf570f1 build: Use pkg-config in BITCOIN_QT_CONFIGURE for all hosts +cr 2020-03-16 10:09:22 05a93d5d96101b45d87571af5b772c7a1e82fd27 build: Fix indentation in bitcoin_qt.m4 +cr 2020-03-16 10:09:22 9123ec15db104397998f5084afc69403d2f9e4b8 build: Remove extra tokens warning +v 2020-03-16 10:09:22 fded4f48c33742d7c790335c8de59c15b80d94e6 build: Remove duplicated QT_STATICPLUGIN define +v 2020-03-16 10:09:23 8a26848c460160e1279f26bc413f693a34e33b9d build: Fix m4 escaping +cr 2020-03-16 10:51:11 82dd8860bbe81567e4afb033d9026dc0e69b1574 qt: Periodical translations update +pr 2020-03-16 10:52:55 2a1b85f3c54fdaa8d13aeaf7e1acab1afb98fd97 tx: Bump transifex slug to 020x +pr 2020-03-16 11:29:26 d31f92586a05803fcc372b3febb8bd36b7c1ac32 Merge #18360: Bump transifex slug and update English translations for 0.20 +pr 2020-03-16 13:04:54 69f4f2c43358e2e86b70f8e89a404781be591002 Merge #18357: Fix missing header in sync.h +pr 2020-03-16 13:14:10 9ed429c50a45c5103130943431ba875125ec4e99 Merge #18341: doc: Replace remaining literal BTC with CURRENCY_UNIT. +pr 2020-03-16 13:19:35 a64e5bed6bfe7c95ee232070e18b8fd680bfaf62 Merge #18344: doc: Fix nit in getblockchaininfo +pr 2020-03-16 16:05:45 86623873095f8d73fd28ad323ed3d06e20433176 Merge #17997: refactor: Remove mempool global from net +pr 2020-03-16 18:04:08 25424cf57e296fc4ed3f32bf5d472646d0df3a11 Merge #18346: rpc: Document an RPCResult for all calls; Enforce at compile time +pr 2020-03-16 21:31:42 7060d2d97a289097f41fcc79698312c0117a75c8 Merge #18350: test: Fix mining to an invalid target + ensure that a new block has the correct hash internally +v 2020-03-17 02:33:07 fa5894f7f581718ea28bb34b52fcd3b33ff3e644 DNS seeds: wait for 5m instead of 11s if 1000+ peers are known +v 2020-03-17 03:10:47 96954d17948662672cababc940e453dff08e8cbb DNS seeds: don't query DNS while network is inactive +v 2020-03-17 06:00:31 a8897115626ab6509c67511e50e73c0f7c953c6a rand: remove getentropy() fallback for macOS < 10.12 +v 2020-03-17 06:09:52 f9f210d8de43b4559fe7c80bb286aeb60de52b54 doc: fix GetTimeMicros() comment in random.cpp +v 2020-03-17 14:45:00 612a931d1a3ac1678d02aed30c48fd25ccd113db tests: simplify next_block() function in feature_block +pr 2020-03-17 15:23:58 8fc5f2bdf01d09d2e6f5df3134e95cebc7f3519a Merge #18366: tests: simplify next_block() function in feature_block +pr 2020-03-17 17:03:20 1d64dfe4fa050a81e4f9b665f2fad2180401cc6e Merge #18364: random: remove getentropy() fallback for macOS < 10.12 +pr 2020-03-17 18:07:42 d2d0a04a661fde731a212b0489fe211566ff5ca8 Merge #18353: tests: Add fuzzing harnesses for classes CBlockHeader, CFeeRate and various functions +cr 2020-03-17 18:27:39 89cdf4d5692d396b8c7177b3918aa9dab07f9624 validation: introduce unused ChainstateManager +v 2020-03-17 18:27:39 8e2ecfe2496d8a015f3ee8723025a438feffbd28 validation: add CChainState.m_from_snapshot_blockhash +pr 2020-03-17 18:38:00 ad04f0d8a533861237b0ed882a417ec6dbe2107f Merge #17319: Tests: remove bignum module +v 2020-03-17 19:03:40 2b081c4568e8019886fdb0f2a57babc73d7487f7 test: add basic tests for ChainstateManager +cr 2020-03-17 19:03:40 4ae29f5f0c5117032debb722d7049664fdceeae8 use ChainstateManager to initialize chainstate +cr 2020-03-17 19:03:40 5b690f0aae21e7d46cbefe3f5be645842ac4ae3b refactor: move RewindBlockIndex to CChainState +cr 2020-03-17 19:07:58 c9017ce3bc27665594c9d80f395780d40755bb22 protect g_chainman with cs_main +pr 2020-03-17 19:27:42 39497d1f3268d3aa75a41d07a5a5442a463265c6 Merge #15283: log: Fix UB with bench on genesis block +cr 2020-03-17 20:10:59 5e47b19e50cf5a8de77dfe363988522cfd212c06 tests: Add harness which fuzzes EvalScript and VerifyScript using a fuzzed signature checker +pr 2020-03-17 21:34:53 ce87d5613a5537b68cf23e7bc25c1e3770704ff9 Merge #18289: refactor: Make scheduler methods type safe +v 2020-03-18 00:55:07 84a46a9b93671b899faf3900936904199d92daaf doc: mention MAKE=gmake workaround when building on a BSD +v 2020-03-18 04:10:20 6afaf2f680d8d4b048352e695d3b1f884db22e61 test: use fs namespace in dbwrapper unicodepath test +v 2020-03-18 13:03:26 7d8e1dec3b26074df1533f715871f79c956cc224 net: fix use-after-free in tests +pr 2020-03-18 14:42:25 3a8d25064e700ff2e69600cc1ede597751283a85 Merge #18371: test: use fs namespace in dbwrapper unicodepath test +v 2020-03-18 18:34:53 5b59a19731827398aa32754d1f327178247d3199 Update merkle.cpp +pr 2020-03-18 19:02:22 dbb067da389d457e73c6ecbf6389baa3ab082b46 Merge #18379: doc: Comment fix merkle.cpp +pr 2020-03-18 20:48:27 e83a1de4c03f305f4a89febc648168003a6e7987 Merge #18155: tests: Add harness which fuzzes EvalScript and VerifyScript using a fuzzed signature checker +pr 2020-03-18 20:51:44 5c9d408b2dd8c7a5b40b3e6051bb095eaad62604 Merge #18300: fuzz: Add option to merge input dir to test runner +pr 2020-03-18 21:40:47 a421e0a22f1230abd69b4661a019bed39b72205f Merge #18376: net: fix use-after-free in tests +cr 2020-03-18 21:54:01 a3ad6459b77e9b7156e486a9e4a37dbfdc35e324 Simplify bn2vch using int.to_bytes +v 2020-03-18 21:54:01 a733ad514a172a77309b84cbc6c81562bdf12e28 Add bn2vch test to functional tests +cr 2020-03-18 23:32:01 33dd764984def9371f324d3add19ee894a0260bf doc: Add fuzzing quickstart guides for libFuzzer and afl-fuzz. Simplify instructions. +v 2020-03-19 04:36:38 e90e3e684ffa7b25f0dfb5b45e70bb0c358261fb build: fix sysctl() detection on macOS +pr 2020-03-19 09:58:11 67de1ee8bc18afff0f2f9f203803467a2274bfc1 Merge #18378: Bugfix & simplify bn2vch using int.to_bytes +pr 2020-03-19 15:23:51 3d3d834324f313328ca1465f28e47e5569721c82 Merge #18359: build: fix sysctl() detection on macOS +pr 2020-03-19 15:50:31 527c3989e7467b66522b2cd196f7ad9fad470828 Merge #18340: doc: mention MAKE=gmake workaround when building on a BSD +pr 2020-03-19 17:26:51 312d27b11ceaacd3be75a14907f856352b7dcf48 Merge #17477: Remove the mempool's NotifyEntryAdded and NotifyEntryRemoved signals +cr 2020-03-19 20:57:11 b4926840633a254e46a462f9d38ac664ce7682f6 doc: Temporary note that release notes should be edited in wiki +v 2020-03-19 21:26:04 1c2ab1a6d29f2c6c065dae4f4a4e2ad1286311b3 refactor: Rename Node::disconnect methods +v 2020-03-19 21:26:04 1dca9dc4c772fa0a4ec52c4d88b7cd3d243aea7b refactor: Change createWallet, fillPSBT argument order +v 2020-03-19 21:26:04 3dc27a15242a22b5301904375e5880372e9b7f4d doc: Add internal interface conventions to developer notes +pr 2020-03-19 21:26:04 5bf45fe2a9642f8ae8f8a12bcbf8f8b4770421ad Merge #18386: doc: Temporary note that release notes should be edited in wiki +v 2020-03-19 21:26:04 6ceb21909ce66b7b4762a855889acd46bb6b77f3 refactor: Rename Chain::Notifications methods to be consistent with other interfaces methods +cr 2020-03-19 21:26:04 77e4b0657298c715c835d8d2eb11e173852e6815 refactor: Get rid of Wallet::IsWalletFlagSet method +v 2020-03-19 21:26:04 96dfe5ced64979e51649d20555aa182defc80119 refactor: Change Chain::broadcastTransaction param order +v 2020-03-20 20:49:10 ca2e47437277ef6851a739f247b44e73a53f21a1 Fix a compiler warning: unused GetDevURandom() +v 2020-03-21 01:58:13 fa01febeaf801bade77a613e64f18b556ae16d86 test: Remove ci timeout restriction in test_runner +v 2020-03-21 10:03:40 d18bf0c0b0506f38256c49f6bcbe5de0098f514a rpc: add missing HelpExampleRpc for getblockfilter +cr 2020-03-21 13:18:07 f709ad0c907d87d03002455967cc30ae7d704d80 build: Fix libevent linking for bench_bitcoin binary +v 2020-03-21 13:23:30 cd04286825c6512b46bf59ab7b3dfffb0e36d65b build: Fix typo in EVENT_CFLAGS variable +pr 2020-03-21 14:17:38 5504703a9f8388dff66d33bd077bcc4c82dff6c8 Merge #18396: rpc: add missing HelpExampleRpc for getblockfilter +v 2020-03-21 14:56:33 ef35604c9c88e7800e9be106b791b1c0fa8b310a rpc: fix broken RPCExamples for waitforblock(height) +v 2020-03-21 15:21:31 a2a03c3ca94b1cdd279ac09f2a81e04d262586fd fixing documentation to not require rpcpassword +v 2020-03-22 03:47:38 1a0993ae354c36d6f219e67f82ca8236530d6201 scripts: add PE dylib checking to symbol-check.py +cr 2020-03-22 11:02:54 a6d1ab8caa63bd343207baa60edb705209f16fb4 test: update bumpfee testing from totalFee to fee_rate +v 2020-03-22 11:02:57 bd05f96d79df1a1561f84850d777808f8575fb8b test: delete wallet_bumpfee_totalfee_deprecation.py +v 2020-03-22 14:29:00 7c1ac70c01536a8dd5b455f5b268a087cecf10a1 tests: Don't assume presence of __builtin_mul_overflow in MultiplicationOverflow(...) fuzzing harness +cr 2020-03-22 15:12:40 fa92af5af39a08982f785542df5419d6d5a4706d ci: Run feature_block and feature_abortnode in valgrind +v 2020-03-22 20:26:39 079df9609e6ed2a09949ebe5e98a179f61709801 build: Drop ZeroMQ patch for Mingw-w64 < 4.0 +v 2020-03-22 20:27:56 f642b49af73fedc6dc9af4ac299e4cfa80755583 build: Drop ZeroMQ patch for glibc < 2.12 +cr 2020-03-22 23:20:35 test: add executable flag for rpc_estimatefee.py +pr 2020-03-23 03:46:07 57a8fa9c3b4452ef7a9d9ed4b957b3888f542fb0 Merge #18406: test: add executable flag for rpc_estimatefee.py +pr 2020-03-23 12:38:07 d478a737dbdd9c6e60718cdef3352dbe6c86aa10 Merge #18392: ci: Run feature_block in valgrind +pr 2020-03-23 12:39:47 97b0687501cee77a9170f9e288755a5d268e9bd4 Merge #18393: tests: Don't assume presence of __builtin_mul_overflow(…) in MultiplicationOverflow(…) fuzzing harness +v 2020-03-23 15:36:24 f65c9ad40f2f5cdc581bdaf72e7dc68e9d7f7a80 Check for overflow when calculating sum of outputs +v 2020-03-23 17:33:48 41ff4992e57f8626019c0b2ab3d024db71e4c20f script: fix SCRIPT_ERR_SIG_PUSHONLY error string +pr 2020-03-23 21:37:50 ac579ada7e83a1b8100d611412f9ede885a4e522 Merge #18278: interfaces: Describe and follow some code conventions +v 2020-03-23 22:44:58 2b0fcff7f26d59fed4bcafd1602325122a206c67 Make VerifyWitnessProgram use a Span stack +v 2020-03-24 03:57:19 ac94141af0c16161afa68de1c3720f254ae4e12c validation: delay flushing undo files in syncing node case +v 2020-03-24 14:04:14 aae26053f958ae9a96a25d32c6341b14daaa4f26 gui: display Mapped AS in peers info window +v 2020-03-24 14:04:16 76db4b260e4826a1e59a5e44c92e4c10ec986527 gui: avoid QT Designer/Form Editor re-formatting +v 2020-03-24 15:39:23 4308aa67e3ea38e3fe5ac84e38a29df36c0d0e10 tests: Add fuzzing harness for functions in net_permissions.h +cr 2020-03-24 15:39:23 43ff0d91f8a4af68e64fd12273133322d44a69ea tests: Add fuzzing harness for functions in timedata.h +pr 2020-03-24 15:39:23 a8695db7851dabdda08b2ec9a68d6a27c0e2fdc4 tests: Add fuzzing harness for functions in addrdb.h +pr 2020-03-24 16:12:33 98fbb2a1844a5397fdc50eacb799f9109a597e26 Merge #17720: test: add unit test for non-standard "scriptsig-not-pushonly" txs +pr 2020-03-24 16:35:32 5236b2e267a58870239673c7ec85e5df0cb8fc8e Merge #18417: tests: Add fuzzing harnesses for functions in addrdb.h, net_permissions.h and timedata.h +v 2020-03-24 16:44:26 83e1d92413e262e6a876336ec433a6fbc335223a test: listsinceblock block height checks +v 2020-03-24 17:22:46 3e0df92bf216e1dce05ca9bf14049f2e42783c30 Update with new Windows code signing certificate +v 2020-03-24 17:48:28 87d24e67bb8f6a01ff710df4f14cb7d1caf651ae tests: Add integer serialization/deserialization fuzzing harness +cr 2020-03-24 18:01:54 102f3267e9e7925a7ea42f1181303cf1da8ce643 tests: Add fuzzing harness for classes/functions in blockfilter.h +v 2020-03-24 20:29:49 6ab3aad9a51cc5e97a8e2ae7dbd5082272163c30 [gui] send dialog: split on_sendButton_clicked +v 2020-03-24 20:29:49 86e22d23bb90383971a68ead0666f225ddd632fb [util] GetFileSize +v 2020-03-24 21:53:07 8e08d005989c6b5f7f05e0a1e0ba84f544a76d01 qt: Use parent-child relation to manage lifetime of OptionsModel object +v 2020-03-25 02:48:27 14e8cf974a7a317796ef8e97e5cf9c355ceff0ee [consensus] MOVEONLY: Move single-sig checking EvalScript code to EvalChecksig +pr 2020-03-25 08:40:54 5b4a9f4bdf9d90f29921425e13e50a0076edffab Merge #18342: doc: Add fuzzing quickstart guides for libFuzzer and afl-fuzz +v 2020-03-25 09:06:48 332f373a9dece71717f75eb06e6a1fc957f2952b [scripts] previous_release: improve failed download error message +v 2020-03-25 11:45:43 fa156999695ddaeb016d8320bee62f8d96679d55 test: Add basic test for BIP 37 +pr 2020-03-25 12:35:03 3f5107d008e15efa364c53bd3ed4e819cd2c6712 Merge #18423: tests: Add fuzzing harness for classes/functions in blockfilter.h. Add integer {de,}serialization fuzzing. +cr 2020-03-25 13:33:44 1f97b69ba27deb645bf5dd229d0cb97d2baf8f49 build: remove double LIBBITCOIN_SERVER from bench-Makefile +pr 2020-03-25 14:48:44 baa72cd9a2fd1c7213f726e5354f87591ddd895f Merge #18331: build: Use git archive as source tarball +pr 2020-03-25 15:11:10 244e88e6b580f94434d16b2cea2e5690db24f0d4 Merge #18402: gui: display mapped AS in peers info window +pr 2020-03-25 15:35:36 3e50fdbe4e5bb98194e88023468bd77dee78b26e Merge #18395: scripts: add PE dylib checking to symbol-check.py +cr 2020-03-25 16:10:18 fae1e992898aa6b36c402cec4085fbf6da9b33ad ci: Only clone bitcoin-core/qa-assets when fuzzing +pr 2020-03-25 17:04:53 60a39a96fc04c9bde98f0a55c0deb2a0b3fc25a7 Merge #18425: releases: Update with new Windows code signing certificate +pr 2020-03-25 18:36:50 7c942250264e75957d7737ff0d2f5c72e0e19a42 Merge #18430: ci: Only clone bitcoin-core/qa-assets when fuzzing +pr 2020-03-25 20:11:47 2e97d8001705214b6b915b61a2c9c34832b85323 Merge #18134: Replace std::to_string with locale-independent alternative +v 2020-03-26 04:39:34 1a4e9f32efcc5f6a74290446dc58784fd85c7b31 scripts: add MACHO tests to test-security-check.py +pr 2020-03-26 04:39:34 7142d50ac33e0ad7d24e49e04c1fc7e3e769ed46 scripts: rename test_64bit_PE to test_PE +v 2020-03-26 04:39:34 edaca2dd123cef958699c07ab248cf0ffc71af07 scripts: add MACHO NX check to security-check.py +pr 2020-03-26 09:22:24 d8ce27ff9f806efaf95cb4aeb11b9d5a3f106e88 Merge #18397: build: Fix libevent linking for bench_bitcoin binary +pr 2020-03-26 10:20:28 e99ca783cd2d064734dfe7920bcfa438355b5aab Merge #18429: build: remove double LIBBITCOIN_SERVER from bench-Makefile +v 2020-03-26 13:56:43 596c627a1eb2b32e2755ae5b9bf32235cf8ce72b ci: Fix brew in Travis +v 2020-03-26 13:57:14 25c8b73656c90f7b78a90f25c5bcc308f8b7c598 ci: Use Homebrew addon on native macOS +pr 2020-03-26 14:10:31 f3a91ab0edc70e1bcb7e770f0878f03459c399e1 Merge #18438: ci: Use Homebrew addon on native macOS +pr 2020-03-26 16:56:03 23991ee53af21c2fdc28f6e8e002dc1455c71098 Merge #15600: lockedpool: When possible, use madvise to avoid including sensitive information in core dumps +pr 2020-03-26 17:34:27 94d3063c93b2e3f2081b0b10385ac71ce29eb06e Merge #18412: script: fix SCRIPT_ERR_SIG_PUSHONLY error string +v 2020-03-26 17:54:18 e347cfa9a7244277f9d220a4dc3537182f18441e rpc: remove deprecated totalFee arg from RPC bumpfee +v 2020-03-26 17:54:21 4a0b27bb01738e6917e27b2cf47f9a8536249693 wallet: remove totalfee from createBumpTransaction() +v 2020-03-26 17:54:23 c3857c5fcb21836ddc1b79a6b19cffe562cade10 wallet: remove CreateTotalBumpTransaction() +pr 2020-03-26 18:34:49 694f4cbd7853ffeb7b4576d42368920b0ef79b01 Merge #18312: wallet: remove deprecated fee bumping by totalFee +v 2020-03-26 18:55:29 e41e46cee0d9b98869a569b73dafc5452b4272d6 ci: Remove misplaced comments from folded block scalar +pr 2020-03-26 19:04:41 7f9dedb22dcd9550ca525c0e35fec38b2d59e029 Merge #18441: ci: Remove misplaced comments from folded block scalar +v 2020-03-26 20:43:17 f85203097f78d9daa1d35c4097a80beab31da2a4 lockedpool: avoid sensitive data in core files (FreeBSD) +pr 2020-03-26 22:21:34 7834c3b9ecf6bfd343542e4c5dc9b44f265f1922 tests: Add fuzzing harness for functions/classes in chain.h +cr 2020-03-26 22:21:34 d7930c43269346686ec67614281cbca59808f43c tests: Add fuzzing harness for functions/classes in protocol.h +pr 2020-03-27 01:25:55 0dc6218c7911762027f7839f54b5d27845531255 Merge #18270: util: Fail to parse whitespace-only strings in ParseMoney(...) (instead of parsing as zero) +pr 2020-03-27 01:37:48 e3154aacf444a29f9f5642b6c937e875ab9a2c13 Merge #18445: tests: Add fuzzing harnesses for functions/classes in chain.h and protocol.h +cr 2020-03-27 04:10:31 dcda81c47101196e53e379d965a2692515ef8363 test: add coverage for script parse error in ParseScript +pr 2020-03-27 07:49:50 54646167db5ec86e1f532b6dcf8a1713ea026b6b Merge #18388: Make VerifyWitnessProgram use a Span stack +cr 2020-03-27 07:51:05 9ab14e4d21c73d16d8d782f1576fe29e659e2a70 Limit decimal range of numbers ParseScript accepts +pr 2020-03-27 08:02:51 b53af72b8276e8a23915d38fe459889cccb56f50 Merge #18416: util: Limit decimal range of numbers ParseScript accepts +pr 2020-03-27 08:24:11 7eed413e72a236b6f1475a198f7063fd24929e23 Merge #18398: rpc: fix broken RPCExamples for waitforblock(height) +v 2020-03-27 13:59:06 fac96fff624a3ab65209dcd3378efb6e6ab47a58 util: Remove unused itostr +pr 2020-03-27 14:29:48 bdc2644b72d68b52383bb461ccd6ef8448674cea Merge #18107: build: Add cov_fuzz target +pr 2020-03-27 14:58:12 210b533a114462473024c92a20a0765001abd45d Merge #18447: test: Add coverage for script parse error in ParseScript +v 2020-03-27 14:58:39 1d05a9d80b1211b47af465ba6958b0ec5a8c33ab Move DEFAULT_MAX_RAW_TX_FEE_RATE to node/transaction.h +v 2020-03-27 14:59:19 1cd8dc2556b847e11a238b9e69493cd8fbeecc6c [gui] load PSBT +v 2020-03-27 14:59:19 764bfe4cba35c24f7627cc425d9e7eba56e98964 [psbt] add file size limit +v 2020-03-27 14:59:19 f6895301f768220f3ea70231d5cc5b45ecbf4488 [gui] save PSBT to file +v 2020-03-27 15:14:08 faaf1cb5b9a4c22b21757f7578833f908b79b867 util: Replace i64tostr with ToString +cr 2020-03-27 16:00:10 dcc8332543f8fb6d1bb47cb270fcbb6a814a7d6e Add generateblock rpc +v 2020-03-27 16:17:35 41b0baf43c243b64b394e774e336475a489cca2b gui: Handle WalletModel::unload asynchronous +v 2020-03-27 16:17:35 ab31b9d6fe7b39713682e3f52d11238dbe042c16 Fix wallet unload race condition +v 2020-03-27 17:09:31 7524b6479cb20471d827aec5500925c86c62ce1c Add tests for generateblock +pr 2020-03-27 19:26:00 a1d5b12ec07d2f7aa9fa955a6dd99e8a2be5cb25 Merge getreceivedby tally into GetReceived function +pr 2020-03-27 20:04:46 f2c416bcf5f898dd996106871dbbd7051851ccac Merge #16995: Fix gcc 9 warnings +v 2020-03-27 22:58:51 fa47a0b003f53708b6d5df1ed4e7f8a7c68aa3ac net: Make addr relay mockable +v 2020-03-28 00:38:07 e980214bc4fd49530e8d50fe0a6657b8583bc6b5 serialization: prevent int overflow for big Coin::nHeight +pr 2020-03-28 11:49:04 1277ca401a796b5b26a9e85afc455ff92e20cdfb Merge #18415: scripts: add MACHO tests to test-security-check.py +v 2020-03-28 18:32:28 c34164896c62fc6307b4cc72c060a277263590bb Bugfix: RPC: Remove final comma for last entry of fixed-size Arrays and Objects in RPCResult +pr 2020-03-28 19:26:45 1668c80bdcc3c2742fbe220573f5b5248129f3fa Merge #18449: util: Remove unused itostr +pr 2020-03-28 20:13:13 6b4f182806d62f00035cd9edc8ea8b837138e7f0 Merge #18444: RPC: Remove final comma for last entry of fixed-size arrays/objects in RPCResult +v 2020-03-28 20:25:53 6e0d82c55bf4a9aae98c47b7cd00b2828b5dd0ee rpc: remove unused getbalances() code +pr 2020-03-28 22:09:52 27a82d347eddfe1cde0005f8a2174274ab6efe9f Merge #18459: rpc: remove unused getbalances() code +v 2020-03-29 13:12:30 621e86ee8d0102e2bf41f7656a368083b89b2f83 Update -blocksonly documentation +pr 2020-03-29 13:15:55 6cfb3dbbdbf575b4f3ab1fced3410d67c00d01de Merge #18391: doc: Update init and reduce-traffic docs for -blocksonly +v 2020-03-29 14:17:04 11a520f6793e21e0a8a9301f5ec4c28a48131b85 tests: Add fuzzing harness for functions/classes in random.h +v 2020-03-29 14:17:04 64d277bbbcbd464b2a795bae011ee808298a42ca tests: Add fuzzing harness for LimitedString (serialize.h) +v 2020-03-29 14:17:04 9718f38f54357f15b8a27e060aed56f91015112d tests: Add fuzzing harness for functions/classes in merkleblock.h +v 2020-03-29 14:17:04 a16ea051f915eb4c975fe06f89470aa99d99d7e4 tests: Add fuzzing harness for functions/classes in flatfile.h +cr 2020-03-29 14:17:04 f205cf7fef5618aaa96f016fda168eedfd9da437 tests: Add fuzzing harness for functions/classes in span.h +pr 2020-03-29 15:32:05 5f9cd62f33fb4d440173b9c376cadf4887e81e9d Merge #18455: tests: Add fuzzing harness for functions/classes in flatfile.h, merkleblock.h, random.h, serialize.h and span.h +v 2020-03-29 16:45:46 fa369651c5523f393e0bfcfa328b8e27006711aa net: Add missing cs_vNodes lock +v 2020-03-30 14:09:12 fa6e01f2a163511a735088895ab02232b150801b doc: block-relay-only is not blocksonly +pr 2020-03-30 15:16:12 6a11d9e33034242cbb3398f7eb4b448d034072c7 Merge #18433: serialization: prevent int overflow for big Coin::nHeight +v 2020-03-30 20:18:42 fa3cc0bfc4c4fc13a384fc291403c9fd41082f18 test: Remove unsafe BOOST_TEST_MESSAGE +pr 2020-03-30 20:28:02 7e1fc03b185d89f21da1bee2f8b7900d65745b30 Merge #18334: test: Add basic test for BIP 37 +v 2020-03-30 20:51:05 fac3716b09bb9ee121db629873d9694a95cae942 test: check that peer is connected when calling sync_* +pr 2020-03-30 23:36:14 769ee5fa0011ae658770586442715452a656559d Merge BigEndian functionality into CustomUintFormatter +v 2020-03-30 23:36:16 6f9a1e5ad0a270d3b5a715f3e3ea0911193bf244 Extend CustomUintFormatter to support enums +v 2020-03-30 23:36:16 d06fedd1bc26bf5bf2b203d4445aeaebccca780e Add SER_READ and SER_WRITE for read/write-dependent statements +pr 2020-03-30 23:57:59 faa9491870bf29583a989c407694d01f49b65bec ci: Use Focal for fuzzers +pr 2020-03-31 00:06:43 965c0c37d54c727bee50920fdfa62f8174a94280 Merge #18420: test: listsinceblock block height checks +v 2020-03-31 00:09:51 73747afbbeb013669faf4c4d2c0903cec4526fb0 Convert merkleblock to new serialization +v 2020-03-31 00:10:30 2b1f85e8c52c8bc5a17eae4c809eaf61d724af98 Convert blockencodings_tests to new serialization +cr 2020-03-31 00:10:30 4eb5643e3538863c9d2ff261f49a9a1b248de243 Convert everything except wallet/qt to new serialization +v 2020-03-31 10:14:48 00559229588feb19de2a0cb7506f70c483a1f433 test: add BIP37 'filterclear' test to p2p_filter.py +pr 2020-03-31 13:23:30 f2880e21eff2428615ee3024570c4861d3238107 Merge #18160: gui: Avoid Wallet::GetBalance in WalletModel::pollBalanceChanged +v 2020-03-31 13:42:09 d695eb4c2164fc8777dc014e1a30c014cf04982a doc: note the costs of fetching all pull requests +pr 2020-03-31 14:07:06 9a2b5f22c1f603a6e3abc16dbf074c8d33a8d01f Merge #18338: Fix wallet unload race condition +v 2020-03-31 14:23:43 9eefc6e92fa1acef6eddd87886ed80510b439a57 gui: Delete progress dialog instead of hidding it +v 2020-03-31 14:23:43 ee9e88ba2734b81d0ffe23fd45c4f69a970c6494 wallet: Handle duplicate fileid exception +cr 2020-03-31 14:36:02 1be8ff280c78c30baabae9429c53c0bebb89c44d wallet: Avoid use of Chain::Lock in rescanblockchain +v 2020-03-31 14:36:02 25a9fcf9e53bfa94e8f8b19a4abfda0f444f6b2a wallet: Avoid use of Chain::Lock in importwallet and dumpwallet +v 2020-03-31 14:36:02 3cb85ac594f115db99f96b0a0f4bfdcd69ef0590 wallet refactor: Avoid use of Chain::Lock in CWallet::RescanFromTime +cr 2020-03-31 14:36:02 48973402d8bccb673eaeb68b7aa86faa39d3cb8a wallet: Avoid use of Chain::Lock in CWallet::GetKeyBirthTimes +v 2020-03-31 14:36:02 ade5f87971211bc67753f14a0d49e020142efc7c wallet refactor: Avoid use of Chain::Lock in qt wallettests +cr 2020-03-31 14:36:02 bc96a9bfc61afdb696fb92cb644ed5fc3d1793f1 wallet: Avoid use of Chain::Lock in importmulti +v 2020-03-31 14:36:02 bf30cd4922ea62577d7bf63f5029e8be62665d45 refactor: Add interfaces::FoundBlock class to selectively return block data +v 2020-03-31 14:36:02 c0d07dc4cba7634cde4e8bf586557772f3248a42 wallet: Avoid use of Chain::Lock in CWallet::ScanForWalletTransactions +cr 2020-03-31 14:36:02 c1694ce6bb7e19a8722d5583cd85ad17da40bb67 wallet: Avoid use of Chain::Lock in importprunedfunds +pr 2020-03-31 14:36:02 d52ba21dfff99173abb927bc964ce7ceb711d789 Merge #18481: test: add BIP37 'filterclear' test to p2p_filter.py +v 2020-03-31 14:36:02 e958ff9ab5607da2cd321f29fc785a6d359e44f4 wallet: Avoid use of Chain::Lock in CWallet::CreateTransaction +v 2020-03-31 14:36:02 f6da44ccce4cfff53433e665305a6fe0a01364e4 wallet: Avoid use of Chain::Lock in tryGetTxStatus and tryGetBalances +v 2020-03-31 14:36:02 f7ba881bc669451a60fedac58a449794702a3e23 wallet: Avoid use of Chain::Lock in listsinceblock +v 2020-03-31 16:07:33 bda84a08a0ac92dff6cadc99cf9bb8c3fadd7e13 rpc: Add documentation for deactivating settxfee +-- end of processed commits -- +pr 2020-03-31 21:35:03 +0100 d2db25233cf0dd1d2668a4aafc4fc94c47c11849 Merge #18474: test: check that peer is connected when calling sync_* +c 2020-03-31 22:03:03 +0100 fa9064704524a0fd1fa9ea73eea45b07316ac3d1 test: Wait for both veracks in add_p2p_connection +cr 2020-03-31 22:03:24 +0100 faf1d047313e71658fb31f6b94fdd5d37705ab85 test: Remove redundant sync_with_ping after add_p2p_connection +c 2020-03-31 22:11:47 +0100 7777703958937ec0ae609b1ee882f1bf2d113d10 doc: Explain new test logging +c 2020-03-31 23:41:52 +0100 cd3b1569d9ad8e24d3a222aff74e0c254baadf79 Correctly compute redeemScript from witnessScript for signrawtransaction +pr 2020-04-01 04:06:55 +0100 eb773f106314fc7d193a29b40f713557bb2ba639 Merge #18486: doc: Explain new test logging +pr 2020-03-31 20:39:15 +0100 72ef366564394bad798484ba935c96b68579043f Merge #18472: test: Remove unsafe BOOST_TEST_MESSAGE +pr 2020-03-31 21:35:03 +0100 d2db25233cf0dd1d2668a4aafc4fc94c47c11849 Merge #18474: test: check that peer is connected when calling sync_* +cr 2020-04-01 11:49:15 +0100 740614e3c36b1b6906e30027990bbca92d3edd9b qt: Translations update pre-branch +cr 2020-04-01 13:19:34 +0100 0753efd9dc8f2e756955a726afbb602d904e1e92 rpc: Remove deprecated "size" from mempool txs +v 2020-04-01 15:18:59 +0100 4670006762ffce654bb12edb5a7e64ad004122a7 test: remove redundant sync_with_ping after +c 2020-04-01 16:30:02 +0100 6112a209828c43930f677c45461339cdf68a56e9 test: replace (send_message + sync_with_ping) with send_and_ping +c 2020-04-01 17:25:13 +0100 fab32557f25c93fecb7bb33f78fdf3e9160c89e5 rpc: Make rpc documentation not depend on rpc +cr 2020-04-01 22:34:47 +0100 222253e37d9702181fe754d776177962d6794f30 chainparams: Bump assumed valid hash +c 2020-04-02 05:31:54 +0100 a46484c8b3715725f5dc0b8ad1bf921880ed9af1 build: Detect gmtime_* definitions via configure +pr 2020-04-02 11:47:13 +0100 5c1ba3a10a18c6edee20f27f3609ffbbbaa2e8f3 Merge #18358: util: fix compilation with mingw-w64 7.0.0 +cr 2020-04-02 13:28:11 +0100 0660119ac372c2863d14060ac1bc9bc243771f94 Drop unintended bitcoin-tx dependency on libeventgit +cr 2020-04-02 13:35:10 +0100 01a3392b1b778fa4fcf568013326d6ea1de4fb3b Drop bitcoin-wallet dependency on libevent +cr 2020-04-02 13:52:47 +0100 fad2f68353944c83cad7b77415645215ae3f1093 init: Replace URL_WEBSITE with PACKAGE_URL +pr 2020-04-02 14:07:55 +0100 6bdd515ccf1b0d3ec5990467db87b9f7963b9b51 Merge #16923: wallet: Handle duplicate fileid exception +cr 2020-04-02 14:09:55 +0100 7b2975ae8f09851bc559378978e84a560a4e6211 doc: Update webchat URLs in README.md +pr 2020-04-02 14:43:49 +0100 b83565625e32b22395e28c1965b2e42fc17f04d7 Merge #18500: chainparams: Bump assumed valid hash +c 2020-04-02 14:56:20 +0100 fa1793c1c44a3f75a09f9c636467b8274c541bdd net: Pass connman const when relaying address +c 2020-04-02 16:24:00 +0100 eca65caadcddf43b2dace111bd7e4b0a2a9556c2 Bugfix: RPC: Add missing commas and correct indentation of explicit ELISION +c 2020-04-02 16:24:01 +0100 26dcf3958187cbdc9ffc9438a5eebfcaf607f7e9 Bugfix: RPC: Don't use a continuation elipsis after an elision elipsis +c 2020-04-02 16:28:05 +0100 f32ab443a98e622afa601372454310aef1f380be Bugfix: RPC: JSON null is not "None" +c 2020-04-02 16:29:32 +0100 fa1da3d4bfc0511a89f5b19d5a4d89e55ff7ccde test: Add basic addr relay test +c 2020-04-02 17:00:28 +0100 b86cd155f6f661052042048aa7cfc2a397afe4f7 scripted-diff: Wallet: Rename mapAddressBook to m_address_book +c 2020-04-02 17:01:36 +0100 144b2f85da4d51bf7d72b987888ddcaf5b429eed Wallet: Require usage of new CAddressBookData::setLabel to change label +c 2020-04-02 17:02:07 +0100 65b6bdc2b164343ec3cc3d32a0297daff9e24fec Wallet: Add CAddressBookData::IsChange which returns true iff label has never been set +cr 2020-04-02 17:02:56 +0100 8e64b8c84bcbd63caea06f3af087af1f0609eaf5 Wallet: New FindAddressBookEntry method to filter out change entries (and skip ->second everywhere) +c 2020-04-02 17:25:17 +0100 c751d886f499257627b308b11ffaa51c22db6cc0 Wallet: Avoid treating change-in-the-addressbook as non-change everywhere +c 2020-04-02 17:25:27 +0100 7b8e15728d1ad058a4b7d7569fd5d5ba6806ca28 rpc: Fix rpcRunLater race in walletpassphrase +c 2020-04-02 17:37:41 +0100 6d2905f57aaeb3ec3b63d31043f7673ca10003f2 Wallet: Avoid unnecessary/redundant m_address_book lookups +c 2020-04-02 17:37:42 +0100 b5795a788639305bab86a8b3f6b75d6ce81be083 Wallet: Add warning comments and assert to CWallet::DelAddressBook +pr 2020-04-02 19:12:46 +0100 ff53433fe4ed06893d7c497a9687f326b0280d4e Merge #18494: test: replace (send_message + sync_with_ping) with send_and_ping +pr 2020-04-02 22:06:23 +0100 0d71395848bbc2941862e7a0644f47212ec02e87 Merge #18464: doc: block-relay-only vs blocksonly +cr 2020-04-02 22:19:53 +0100 570d769c6c59b9f6d1a2b95b2ed60432cb33b3ba guix: Build support for Windows +cr 2020-04-02 22:19:54 +0100 91897c95e191d293eb27d8af15cbeafc5b8f3895 guix: Improve guix-build.sh documentation +c 2020-04-02 22:19:55 +0100 df953a4c9a6143f45864757b706c88b6fa70545a guix: Appease shellcheck. +c 2020-04-02 22:19:56 +0100 c4cce00eac691625b78b92f7dba0b7f57def19e5 guix: Remove dead links from README. +c 2020-04-02 22:19:57 +0100 acf4b3b3b5accf60a19441a0298ef27001b78e72 guix: Make x86_64-w64-mingw32 builds reproducible +c 2020-04-02 22:19:59 +0100 ef4f7e4c45c60a69406134122f091c77c6ef740f guix: Set the well-known timezone env var +c 2020-04-02 22:20:00 +0100 93e41b7e3b54c17fd1b4c61ee95fc0dc2827e954 guix: Use gcc-8 for mingw-w64 instead of 7 +c 2020-04-02 22:20:01 +0100 360a9e0ad50a36ec79a1a160dbed3966689fd41c guix: Bump time-machine for mingw-w64 patches +c 2020-04-02 22:20:02 +0100 ff821dd2a1c600488d11e7d9a20e9179ecc9144b guix: Reinstate make-ssp-fixed-gcc +c 2020-04-02 22:20:03 +0100 3f1f03c67a8e9edf487f08d272adb18b0a3942c8 guix: Spelling fixes +c 2020-04-02 22:20:04 +0100 449d8fe25bbe25daacfc67aa89ca32b0a3254c5a guix: Expand on INT trap message +c 2020-04-02 22:20:05 +0100 35a96792dda9e78165b1598aeac7b2ab759e7be5 guix: Check mingw symbols, improve SSP fix docs +pr 2020-04-02 23:50:29 +0100 dce6f3b29b4197b8eea91f5919d56eb222ea8959 Merge #18383: refactor: Check for overflow when calculating sum of tx outputs +c 2020-04-03 01:30:40 +0100 facc332dc587898cbc582a6f66dba498ae4a634e fuzz: Avoid running over all inputs after merging them +c 2020-04-03 02:02:34 +0100 faa64af960b64b522bb088e836c9d8cd6254c6c8 fuzz: Add CScriptNum::getint coverage +pr 2020-04-03 11:10:28 +0100 6ec42df32b06f8b262f31e40065247dee83f7aa5 Merge #18426: scripts: previous_release: improve behaviour on failed download +pr 2020-04-03 11:17:09 +0100 d478595fad6eb520793ed209ea7d9b04ee259a34 Merge #18382: doc: note the costs of fetching all pull requests +pr 2020-04-03 11:24:38 +0100 be60e37e40413742a8e23c854b90438af5e3aabc Merge #18505: doc: Update webchat URLs in README.md +c 2020-04-03 11:52:36 +0100 4928a995e9799c6c7ea84fa1efc4fef5b2ff7683 [doc] fix git add argument +pr 2020-04-03 12:11:07 +0100 08c4994969be20ab268faed2793fb4b9f17722ee Merge #18503: init: Replace URL_WEBSITE with PACKAGE_URL +pr 2020-04-03 12:37:11 +0100 f0d6487e290761a4fb03798240a351b5fddfdb38 Merge #18513: doc: fix git add argument +c 2020-04-03 15:00:12 +0100 0ed2d8e07d3806d78d03a77d2153f22f9d733a07 test: add BIP37 remote crash bug [CVE-2013-5700] test to p2p_filter.py +cr 2020-04-03 15:29:26 +0100 0eeb0468e7debb1dbe38242769207d22ed52c1df net: Hardcoded seeds update for 0.20 +cr 2020-04-03 15:47:59 +0100 9e071b00898aedd9632f105a22d976dc6dbc84b1 test: remove rapidcheck integration and tests +c 2020-04-03 18:16:19 +0100 fa0189955ab0f458bac81f534cbd626e1b0ad2c1 fuzz: Extend descriptor fuzz test +c 2020-04-03 18:32:17 +0100 fa86edf66d4d4ed04758333da45ed1b3b5892602 fuzz: Extend script fuzz test +pr 2020-04-03 20:08:05 +0100 e35e118656e9638cce019d4eeffc5f1b8639d4f5 Merge #18508: RPC: Fix more formatting nits +pr 2020-04-03 20:15:00 +0100 c8971547d9c9460fcbec6f54888df83f002c3dfd Merge #18499: rpc: Make rpc documentation not depend on call-time rpc args +c 2020-04-03 21:11:08 +0100 3dc8c012f0a40756f3c4359dbe169c03d7c8a725 test: remaining replacements of (send_message+sync_with_ping) with send_and_ping +c 2020-04-04 02:54:25 +0100 5ca90f8b598978437340bb8467f527b9edfb2bbf scripts: add MACHO lazy bindings check to security-check.py +cr 2020-04-04 16:44:39 +0100 d6815a2313158862d448733954a73520f223deb6 refactor: drop boost::signals2 in validationinterface +cr 2020-04-04 18:23:50 +0100 acf269e1463c84d51f2eef695089cbf9d03b547f tests: Add proof-of-work fuzzing harness +pr 2020-04-04 21:41:07 +0100 4839560ee1c12d162605f8eade75e63c581d8688 Merge #18407: tests: Add proof-of-work fuzzing harness +pr 2020-04-04 21:46:12 +0100 a3b61cf6416387eaac568b53451a0aebe128dfe1 Merge #18509: fuzz: Avoid running over all inputs after merging them +pr 2020-04-04 21:47:21 +0100 490ae0e87b9abf74f5804852e4a52e368b40478a Merge #18520: test: remaining replacements of (send_message+sync_with_ping) with send_and_ping +pr 2020-04-04 21:48:47 +0100 16b6d3422bf904de6fbd539c7073cc21827dd5a5 Merge #18519: fuzz: Extend script fuzz test +pr 2020-04-04 21:49:55 +0100 e16da90d957a10d8a1731d3b9a71643d5962b609 Merge #18518: fuzz: Extend descriptor fuzz test +pr 2020-04-04 21:51:44 +0100 94fd4a56ed1ca60b0d11c1bab15acab6c834441a Merge #18496: test: remove redundant sync_with_ping after add_p2p_connection +pr 2020-04-04 21:53:19 +0100 483007749426a1f51ea591eaac383f19fdde9efb Merge #18510: fuzz: Add CScriptNum::getint coverage +cr 2020-04-05 00:01:13 +0100 691e2a7af796c09b85423b45af54e354cd9c1e92 build: create test_fuzz library from src/test/fuzz/fuzz.cpp +pr 2020-04-05 03:33:56 +0100 96a30b98c925b4ca63993759ddf7b4dd1fa58ec1 Merge #18528: build: create test_fuzz library from src/test/fuzz/fuzz.cpp +cr 2020-04-05 03:46:24 +0100 fa6a00843447d53a5708ea3a629b9150cfe58be2 fuzz: Add process_messages harness +pr 2020-04-05 14:18:11 +0100 cf21293ef7fd304efb0843abeb17adc6159ca927 Merge #18515: test: add BIP37 remote crash bug [CVE-2013-5700] test to p2p_filter.py +c 2020-04-05 17:20:00 +0100 fa1a92224dd78de817d15bcda35a8310254e1a54 rpc: Avoid initialization-order-fiasco on static CRPCCommand tables +c 2020-04-05 18:39:38 +0100 3e6f7377f600e47e5e3d439fc5d6ccf3db210038 Improve getbalances coverage in wallet_balance tests +c 2020-04-05 18:40:25 +0100 7eacdc5167c8db94df84e206db85817bc64e4921 Shift coverage from getunconfirmedbalance to getbalances in wallet_abandonconflict tests +c 2020-04-05 18:40:28 +0100 0306d78cb49d1684cc96ba3512b582a1fdaf78cc Use getbalances in wallet_address_types tests +c 2020-04-06 01:00:34 +0100 7777e3624fabe4718675b2be8b088697b7ad4d0d scripted-diff: Replace strCommand with msg_type +c 2020-04-06 02:03:17 +0100 c0c43ae1471347ea93614e9a25989f13b021f8a8 test: skip backwards compat tests if not compiled with wallet +pr 2020-04-06 02:48:21 +0100 516ebe8a62de1906f8be9c4a144ea5753678eb4f Merge #18514: test: remove rapidcheck integration and tests +c 2020-04-06 02:48:21 +0100 787f40668dc15980c3d6de028d7950c08175d84a Set LD_LIBRARY_PATH consistently in travis tests +c 2020-04-06 02:48:21 +0100 b919efadff3d0393f4a8c3c1dc735f7ac5c665bb depends: Use default macos clang compiler +c 2020-04-06 02:48:21 +0100 d54f64c6c700be0604190f52c84fc5f1cdd9f02f Add multiprocess travis configuration +cr 2020-04-06 02:48:21 +0100 d6306466626635e6fee44385e6a688c8dc118eb5 libmultiprocess depends build +cr 2020-04-06 02:48:21 +0100 e6e44eedd56ecaf59f3fabf8e07ab7dee0ddb1b6 Multiprocess build changes +c 2020-04-06 07:08:56 +0100 a029805f57fa9a4ab9867c0d1e865675d57537c7 build: remove -Qunused-arguments workaround for clang + ccache +pr 2020-04-06 12:38:32 +0100 adac12ae73e896e405e75b02a0a49c575d115b6e Merge #18506: net: Hardcoded seeds update for 0.20 +pr 2020-04-06 14:27:56 +0100 299544f9c5375810f3b4f70e68d2340fe689108a Merge #18534: test: skip backwards compat tests if not compiled with wallet +cr 2020-04-06 14:58:51 +0100 cdfb8e7afa7648405dd6b957f47b1c7ab566a076 tests: Add fuzzing harness for HTTPRequest, libevent's evhttp and related functions +c 2020-04-06 15:12:32 +0100 7fcdec0f326f7fb547ec9c651871842cf518ea38 Remove PID file at the very end +pr 2020-04-06 15:46:07 +0100 fdeb445a34a97357c87416d80350f9b0b4f222ca Merge #18524: refactor: drop boost::signals2 in validationinterface +c 2020-04-06 16:07:33 +0100 25e03ba1ff18ca06954786e512000648941b4dfb test: relax bumpfee dust_to_fee txsize an extra vbyte +pr 2020-04-06 16:38:09 +0100 425a7f900ed824caa5d4a93991542c70171539fe Merge #18516: test: relax bumpfee dust_to_fee txsize an extra vbyte +c 2020-04-06 17:37:50 +0100 b224b4e7bd8c52bb70d933c1bc524c0fe87ac0c1 test: wallet_bumpfee assertion fixup +c 2020-04-06 17:53:49 +0100 fad691cafe083743a26f434488990f060ae4ac45 rpc: Make verifychain default values static, not depend on global args +pr 2020-04-06 17:59:48 +0100 c0b389b33516fb3eaaad7c30bd11dba768882a7e Merge #18484: rpc: Correctly compute redeemScript from witnessScript for signrawtransaction +c 2020-04-06 19:19:08 +0100 fa2251df5e3471e0d19d5d5c7780d34ee1498cee test: Use one node to avoid a race due to missing sync in rpc_signrawtransaction +pr 2020-04-06 19:21:53 +0100 54d5ba3d9cb45d8417ecca0f09c68d865d0c423c Merge #18540: test: wallet_bumpfee assertion fixup +pr 2020-04-06 19:29:35 +0100 75021e80ee4439dddadbe8c586cee04b85ac110c Merge #18487: rpc: Fix rpcRunLater race in walletpassphrase +pr 2020-04-06 20:06:09 +0100 c31bcaf203b5154117eee1cb2496dca2b7c3853d Merge #18458: net: Add missing cs_vNodes lock +pr 2020-04-06 20:51:18 +0100 c5966a87d1fdd7a98f2baee5b2deddd541fdfb5a Merge #18192: Bugfix: Wallet: Safely deal with change in the address book +pr 2020-04-06 21:21:47 +0100 abc145c9a4aef8ec269b7e0a3e9403cff9970fe4 Merge #18543: test: Use one node to avoid a race due to missing sync in rpc_signrawtransaction +c 2020-04-06 21:52:04 +0100 2952c46b923042f2de801f319e03ed5c4c4eb735 Wallet: Replace CAddressBookData.name with GetLabel() method +c 2020-04-06 21:52:04 +0100 7a2ecf16df938dd95d3130a46082def7a02338eb Wallet: Change IsMine check in CWallet::DelAddressBook from assert to failure +c 2020-04-06 21:52:04 +0100 d7092c392e10889cd7a080b3d22ed6446a59b87a QA: Test that change doesn't turn into non-change when spent in an avoid-reuse wallet +c 2020-04-06 22:19:19 +0100 56fe839e4e6d837b95b920a524570d11f7c3c5ce qt: Fix Window -> Minimize menu item +cr 2020-04-06 22:25:25 +0100 55608455cbed4234f26f62ed9ff500fe5dbc21c4 Make a fuzzer-based copy of the prevector randomized test +c 2020-04-06 22:39:38 +0100 eda8309bfc6a8c94f0b7c076d1cccc86c1011cbc Assert immediately rather than caching failure +c 2020-04-06 22:39:42 +0100 402ad5aaca9509d45d861d77eb6431d6e1944f91 Only run sanity check once at the end +c 2020-04-06 22:39:42 +0100 c2ccadc26a04358b11539097c1aadb8d11b85c21 Merge and generalize case 3 and case 6 +c 2020-04-06 22:51:38 +0100 b1d24d1d031a2b2ce67bf846bafa1c3a499b7553 Reorder the test instructions by number +pr 2020-04-07 11:43:07 +0100 d12568e2f8863e76d82de3c6bd933e9f5c20daaf Merge #18549: qt: Fix Window -> Minimize menu item +pr 2020-04-07 11:47:38 +0100 63dad673487d3623f9076721d2a1924263272eb9 Merge #18546: Bugfix: Wallet: Safely deal with change in the address book [part 2] +pr 2020-04-07 16:46:17 +0100 1b151e3ffce7c1a2ee46bf280cc1d96775d1f91e Merge #18532: rpc: Avoid initialization-order-fiasco on static CRPCCommand tables +c 2020-04-07 20:53:40 +0100 3c61abbbc847d725f30d169278d84655571407c1 Do not clear validationinterface entries being executed +c 2020-04-07 20:54:41 +0100 2276339a176f83ffe8ceefb3e41ecca8601aa13b Add test for UnregisterAllValidationInterfaces bug +c 2020-04-07 21:57:34 +0100 850847309458f43fc7ce6c13fa08c86e1cae042a Avoid non-trivial global constants in SHA-NI code +c 2020-04-08 00:00:49 +0100 93439a71eda49fb69f1e82966a23a946733aa6fa guix: Bump to upstream commit with mingw-w64 changes +cr 2020-04-08 00:00:50 +0100 ba0b99bdd613ba7f17c6247ece3001e1b44759a3 guix: Don't set MINGW_HAS_SECURE_API CFLAG in depends +c 2020-04-08 00:01:26 +0100 0b66d22da5f53640e22f05adf880782c613e6d0f guix: Use gcc-9 for mingw-w64 instead of 8 +c 2020-04-08 00:27:31 +0100 a35e3235891d35daa167116cc70340140e883f06 guix: Appease travis. +pr 2020-04-08 13:43:37 +0100 1f70185a809362117a8158e386fdead85728794f Merge #18551: Do not clear validationinterface entries being executed +c 2020-04-08 14:14:31 +0100 da0842dcd44f8c9c9b167917fac0949b4978c3b0 build: Update ax_boost_mase.m4 to the latest serial +cr 2020-04-08 14:44:39 +0100 faede1b293354560317b67f0b4e6874dcac6ef41 test: Properly raise FailedToStartError when rpc shutdown before warmup finished +c 2020-04-08 15:11:46 +0100 13d2a33537a403ac47a989be92109d3214375b6a Fix unregister_all_during_call cleanup +cr 2020-04-08 15:14:44 +0100 fa68a3e7640fc00c47f03fa565357679bdafb4b2 appveyor: Enable minimal unit test logging to aid debugging +c 2020-04-08 15:16:55 +0100 fa7af33b4cb12315de86315c163393bdb50fad75 ci: Run unit tests sequential once +pr 2020-04-08 15:28:50 +0100 b3c3d9a518f8cc51c0b73c5e4ee6bd567be441d2 Merge #18558: build: Fix boost detection for arch armv7l +c 2020-04-08 15:45:27 +0100 283bd72156959f420f13acc7a34e513ca3446025 tests: Add coverage of {,Incremental}DynamicUsage(const std::set& s) to existing fuzzer +c 2020-04-08 15:45:27 +0100 2df5701e902effa93834d9520690cbaca7e504f3 tests: Add coverage of GetVirtualTransactionSize(...) to existing fuzzer +cr 2020-04-08 15:45:27 +0100 44fb2a596b4a1aa70253c4145c35be6de68da22a tests: Add fuzzing harness for FeeFilterRounder +cr 2020-04-08 15:45:27 +0100 57890b2555ca347373109052f6789c23f46bc594 tests: Add fuzzing harness for classes/functions in checkqueue.h +cr 2020-04-08 15:45:27 +0100 7b9a2dc86426926038b2f49d3d4ce4cb64dcd14b tests: Add fuzzing harness for AdditionOverflow(...) +cr 2020-04-08 15:45:27 +0100 bf76000493082da05bf7258a5038e16fa76cd143 tests: Add fuzzing harness for classes/functions in cuckoocache.h +pr 2020-04-08 16:24:54 +0100 2392566284d84ad905d03617b07a906386f8769c Merge #18563: test: Fix unregister_all_during_call cleanup +pr 2020-04-08 16:34:19 +0100 bfef72d0fb023a15e7cf245ed670d46f0466bb93 Merge #18565: tests: Add fuzzing harnesses for classes/functions in policy/fees.h, checkqueue.h and cuckoocache.h. Add fuzzing coverage. +pr 2020-04-08 17:12:39 +0100 4c5923637653a4eeb4d2b13281ce7f4c021fda64 Merge #18533: scripted-diff: Replace strCommand with msg_type +pr 2020-04-08 17:14:31 +0100 3410fe688739f9fc7545043d052dd77fb35de573 Merge #18521: fuzz: Add process_messages harness +c 2020-04-08 17:51:51 +0100 fa5e973b4470246d517175b8ef05a2d13df157c3 test: Set -use_value_profile=1 when merging fuzz inputs +pr 2020-04-08 19:45:37 +0100 661bd5dea3d080cd79f15c7703fc6ab577a1aa0c Merge #18363: tests: Add fuzzing harness for HTTPRequest, libevent's evhttp and related functions +c 2020-04-09 00:26:06 +0100 1479007a335ab43af46f527d0543e254fc2a8e86 Introduce Instruction enum in asmap +c 2020-04-09 00:26:06 +0100 2b3dbfa5a63cb5a6625ec00294ebd933800f0255 Deal with decoding failures explicitly in asmap Interpret +c 2020-04-09 00:26:06 +0100 5feefbe6e7b6cdd809eba4074d41dc95a7035f7e Improve asmap Interpret checks and document failures +cr 2020-04-09 00:26:06 +0100 748977690e0519110cda9628162a7ccf73a5934b Add asmap_direct fuzzer that tests Interpreter directly +c 2020-04-09 00:26:06 +0100 7cf97fda154ba837933eb05be5aeecfb69a06641 Make asmap Interpreter errors fatal and fuzz test it +cr 2020-04-09 00:26:06 +0100 c81aefc5377888c7ac4f29f570249fd6c2fdb352 Add additional effiency checks to sanity checker +cr 2020-04-09 00:26:06 +0100 fffd8dca2de39ad4a683f0dce57cdca55ed2f600 Add asmap sanity checker +c 2020-04-09 00:32:00 +0100 2748e8793267126c5b40621d75d1930e358f057e script: prevent UB when computing abs value for num opcode serialize +c 2020-04-09 00:52:52 +0100 97ba77aa8e58c3c7ff767e6ca804d0e46370e5dc ci: Add native s390x +c 2020-04-09 00:59:37 +0100 6136a96cdf631f824fb89cf2720422787439acc9 ci: Rename RUN_CI_ON_HOST to DANGER_RUN_CI_ON_HOST +c 2020-04-09 10:26:24 +0100 5eae034996b340c19cebab9efb6c89d20fe051ef net: limit BIP37 filter lifespan (active between 'filterload' and 'filterclear') +pr 2020-04-09 13:07:09 +0100 dcef5ad6ec10bfea1ea00acf44d0182409c731f2 Merge #18562: ci: Run unit tests sequential once +pr 2020-04-09 13:20:59 +0100 87374d80a71dee201c34292462fd1ce8553715ae Merge #18566: test: Set -use_value_profile=1 when merging fuzz inputs +c 2020-04-09 14:42:43 +0100 75019774c96795ef1a57af2a92dd9491f5065cc5 cli -getinfo: use getbalances instead of deprecated getwalletinfo balance +pr 2020-04-09 15:19:22 +0100 1ae366ecb0678e7b5a0878b1e125949e3d91ba2a Merge #18569: ci: Add big endian native s390x build +pr 2020-04-09 15:21:17 +0100 081dcbde662361ddfbaf608239081c2179ff8231 Merge #18561: test: Properly raise FailedToStartError when rpc shutdown before warmup finished +cr 2020-04-09 16:34:07 +0100 5df0877f91f4ed59031b0d7dcd66780df87ac1af test: update and harden interface_bitcoin_cli tests +cr 2020-04-09 19:41:49 +0100 478c11dde326e2ff0480c14f76f9f6b52a7bdfd0 Correct scripted-diff example link +pr 2020-04-09 20:00:57 +0100 405713d00fb414808f3eb61d02899b53cc3f1cc1 Merge #18529: Add fuzzer version of randomized prevector test +pr 2020-04-10 00:42:20 +0100 d486991aa59d807b1cd62169dc094ac0d53647cb Merge #18295: scripts: add MACHO lazy bindings check to security-check.py +pr 2020-04-10 01:21:50 +0100 2b9a4a13324ac3f0adf712d01fb8f2ba914cdc8f Merge #18577: doc: Correct scripted-diff example link +pr 2020-04-10 15:12:46 +0100 29893ec8751f51f281f694453bd439f92ccf3ab2 Merge #18454: net: Make addr relay mockable, add test +cr 2020-04-10 15:48:56 +0100 fa404f1e4718e8155581f23826480086dfbcfaa6 test: Check that the version message does not leak the local address of the node +pr 2020-04-10 16:06:27 +0100 3347ca48816c7a0aab61573b23d7f8d902c1dac3 Merge #18526: Remove PID file at the very end +pr 2020-04-10 16:21:57 +0100 a840dab2a582747947db0ab92cfc829316966c96 Merge #18541: rpc: Make verifychain default values static, not depend on global args +cr 2020-04-10 17:01:01 +0100 d84c9aa25d8b86d7b3ff2205560986f012da727a build: Bump version to 0.20.99 +pr 2020-04-10 17:50:51 +0100 6ab96ec5469ceea8544fb07e31118c295dbe57ca Merge #18574: cli: call getbalances.ismine.trusted instead of getwalletinfo.balance +cr 2020-04-10 17:51:21 +0100 a6eea715ff549febe6d4bd52f17acb50abd99120 ci: Drop unused WINEDEBUG variable +pr 2020-04-10 17:52:37 +0100 4eb1eeb02c57774b2de3e2d5fe3dab4f3da97ee0 Merge #18504: build: Drop bitcoin-tx and bitcoin-wallet dependencies on libevent +cr 2020-04-10 17:54:32 +0100 6d480667b24dc630e7c3fe7ff032cbe1a958ab77 ci: Print ccache statistics summary +pr 2020-04-10 17:55:12 +0100 1b307613604883daea4913a65da30ae073c9dc4d Merge #16367: Multiprocess build support +c 2020-04-10 17:56:53 +0100 73f83036298e4932772704b2d5359c78d81bd7cc ci: Add pip cache +pr 2020-04-10 17:57:35 +0100 99d6a5be8bf132744917b4b2ece7ec5ac41c94d2 Merge #17999: refactor: Add ChainClient setMockTime, getWallets methods +pr 2020-04-10 17:59:29 +0100 a9213bbe75c61d2abb2e3532d8f16cf9c5987306 Merge #18422: [consensus] MOVEONLY: Move single-sig checking EvalScript code to EvalChecksig +pr 2020-04-10 18:02:01 +0100 10358a381aeec08a42f5e456c2041c0442a5dbd1 Merge #17737: Add ChainstateManager, remove BlockManager global +pr 2020-04-10 18:12:30 +0100 51e2ce45d6824b4d621f26b2048e6a43672e45dc Merge #17693: rpc: Add generateblock to mine a custom set of transactions +cr 2020-04-10 18:46:39 +0100 dabe2bb11a757a7ea3af2ed48e75a44d3f0c28c7 build: Bump gitian descriptors to 0.21 +c 2020-04-10 20:27:01 +0100 2599d13c9417dc8c5107535521173687ec5e6c2f rpc: Remove deprecated migration code +pr 2020-04-10 20:43:44 +0100 75917591c840ca61f5e2c6f5858e6882e834a911 Merge #18586: build: Bump gitian descriptors to 0.21 +pr 2020-04-10 21:34:30 +0100 3eb8b1c3924c1d14c1a4234eb5360f32808b86dc Merge #17905: gui: Avoid redundant tx status updates +cr 2020-04-11 00:38:21 +0100 f29bd546ec169dd9af2ca6265c76353e68db92be Revert "Merge #16367: Multiprocess build support" +c 2020-04-11 10:15:20 +0100 7cbfebbf3df0d26f518811e0bfb7abf270c83e37 Update ax_cxx_compile_stdcxx.m4 +c 2020-04-11 10:15:25 +0100 0fbde488b24f62b4bbbde216647941dcac65c81a Support conversion between Spans of compatible types +c 2020-04-11 10:15:25 +0100 7829685e27aae25efb32e07368175c8f664b2218 Add configure option for c++17 +pr 2020-04-11 15:05:35 +0100 a5623ba89f050182ce9b1f570f3736b272b544b2 Merge #18588: Revert "Merge #16367: Multiprocess build support" +c 2020-04-11 17:40:16 +0100 1356a45ef042e7bd3d539fbb606d6b1be547d00f test: complete impl. of msg_merkleblock and wait_for_merkleblock +c 2020-04-11 17:40:28 +0100 854382885f18aa9a95cdde3d11591b05c305ad3f refactor: test: improve wait_for{header,merkleblock} interface +c 2020-04-11 17:57:44 +0100 555567ace9baae3c80e118eeca434d5c424a3487 test: Extend wallet_dump test to cover comments +c 2020-04-11 19:15:05 +0100 e44aeefaaed8d698d1b9004b66f85384397b1a75 gitian: Add missing automake package to gitian-win-signer.yml +c 2020-04-11 19:30:27 +0100 c31cbe7cfefc18123eb85ffb2ce509748435efde Add C++17 test to Travis +c 2020-04-12 02:32:45 +0100 f63dec189c3c8eee1ab2187681d5d0b2513b1b2e [REFACTOR] Initialize PrecomputedTransactionData in CheckInputScripts +c 2020-04-12 11:12:01 +0100 4d6cde38cefa61209d307ed8015bdd40f2695668 test: refactor rpc_signrawtransaction witness script tests +c 2020-04-12 11:12:03 +0100 9cdddae3b4efee071d71ba3b6629a53017332f6f test: add rpc_signrawtransaction logging +pr 2020-04-12 14:13:10 +0100 76143bf714abade4a6d4068981c882e5cf0a2386 Merge #18495: rpc: Remove deprecated migration code +c 2020-04-12 19:56:36 +0100 b1b0cfecb639ce44be280c7a45a41a19e893c401 test: Remove REJECT message code +cr 2020-04-12 22:04:03 +0100 fa86a4bbfc000593ae4ad9dcdaec3fd0c0406086 rpc: Rename first arg of generateblock RPC to "output" +pr 2020-04-13 00:38:18 +0100 59d62492900f6fc6ade2a780e75863ba3b254e06 Merge #18593: test: complete impl. of msg_merkleblock and wait_for_merkleblock +pr 2020-04-13 00:46:25 +0100 a2b282c9d05843e5729e1a597ab764d912a6343e Merge #18609: test: Remove REJECT message code +pr 2020-04-13 00:49:34 +0100 c49971f3c9b11e5d959fa2387195826f8400fe93 Merge #18584: test: Check that the version message does not leak the local address +c 2020-04-13 09:22:30 +0100 c0af173da20cc4560523205bc268677a808a43df doc: default minconf for getbalance should be 0 +pr 2020-04-13 11:28:35 +0100 4d26312c1725fd097615167025115b56aab40501 Merge #18597: test: Extend wallet_dump test to cover comments +pr 2020-04-13 12:27:45 +0100 d5783985eb0049752a930e0f7234c479eb8381aa Merge #18502: doc: Update docs for getbalance (default minconf should be 0) +c 2020-04-13 13:23:06 +0100 905e2e85baca388ee1a34c6e2f559b7dd815c253 gitian: add jonatack gpg key fingerprint +c 2020-04-13 13:56:35 +0100 88884ee8d8dcd5303b20e54801b03f9631959c76 script: Disallow silent bool -> CScript conversion +pr 2020-04-13 14:35:48 +0100 d9fd7b5a675d94b99a5ee5b636bbc21088ed02fb Merge #18596: test: Try once more when RPC connection fails on Windows +c 2020-04-13 15:39:42 +0100 c47adf8df435831c26ca25813fb7272176bd4eb7 Added my fingerprint Stephan Oeste (Emzy) +pr 2020-04-13 16:19:56 +0100 e28e5353c430109db27b66887653012d472075cf Merge #18545: test: refactor rpc_signrawtransaction and add logging +pr 2020-04-13 16:39:44 +0100 130b64415f54173d5a82dd7736adda624400b848 Merge #18493: rpc: Remove deprecated "size" from mempool txs +pr 2020-04-13 16:45:11 +0100 6ef45bc9688412da9e13218e08f802125bf589c0 Merge #18581: ci: Print ccache stats, add pip cache, and cleanups +c 2020-04-13 18:20:39 +0100 9c16b1735f8e530ce68d678e9ca0eceb2ceb3520 Move wallet upgrading to its own function +c 2020-04-13 18:21:01 +0100 183323712398e26ddcf3a9dc048aaa9900a91f5a Only run UpgradeWallet if the wallet needs to be upgraded +c 2020-04-13 18:21:18 +0100 c988f27937bc79c90f4eed48552c72f1b66dc044 Have UpgradeWallet take the version to upgrade to and an error message out parameter +c 2020-04-13 18:21:41 +0100 1e48796c99b63aa8fa8451ce7b0c20759ea43500 Make UpgradeWallet a member function of CWallet +c 2020-04-13 18:28:01 +0100 92263cce5b6c6b66296dadda5f29724611db0160 Add upgradewallet RPC +cr 2020-04-13 18:28:04 +0100 0d32d661481f099af572e7a08a50e17bcc165c44 Remove -upgradewallet startup option +pr 2020-04-13 22:57:18 +0100 6110ae8326c74704c9e105deca725f2411395969 Merge #18451: test: shift coverage from getunconfirmedbalance to getbalances +c 2020-04-14 02:38:29 +0100 fa4c29bc1d2425f861845bae4f3816d9817e622a test: Add various low-level p2p tests +c 2020-04-14 08:49:45 +0100 182dbdf0f4b6e6484b0d4588aaefacc75862a99c util: Detect posix_fallocate() instead of assuming +pr 2020-04-14 12:18:12 +0100 4702cadca94520a36bfe979c85750563c30f7c85 Merge #17954: wallet: Remove calls to Chain::Lock methods +c 2020-04-14 14:02:06 +0100 1abbdac6777bc5396d17a6772c8176a354730997 wallet: Prefer full destination groups in coin selection +c 2020-04-14 14:03:14 +0100 a2324e4d3f47f084b07a364c9a360a0bf31e86a0 test: Improve naming and logging of avoid_reuse tests +c 2020-04-14 14:15:18 +0100 fa50d11dd117eb6f91cbeac7476797f3885a6169 appveyor: Disable functional tests for now +c 2020-04-14 14:52:42 +0100 38677274f931088218eeb1f258077d3387f39c89 rpc: settxfee respects -maxtxfee wallet setting +cr 2020-04-14 14:59:58 +0100 fa6cb00ce535d9be2c91465200674a07fc13c7d9 doc: Fix macos comments in release-notes +c 2020-04-14 15:40:37 +0100 a9ecbdfcaa15499644d16e9c8ad2c63dfc45b37b test: add more inactive filter tests to p2p_filter.py +c 2020-04-14 17:38:26 +0100 8d306862ef077f2a71931372dd6a2efa05188c84 ci: Add fuzzbuzz integration +pr 2020-04-14 22:35:39 +0100 75fcfdaf8b4b68ef1d1fcd606fb36c9265e15918 Merge #18631: appveyor: Disable functional tests for now +cr 2020-04-15 01:18:38 +0100 fac0c8db9f634ea7231fb0b6dc139ae0bda4a051 appveyor: Remove clcache +c 2020-04-15 02:04:36 +0100 fa320975411af4f0e41771d89958a77fd7a2284b test: Create cached blocks not in the future +pr 2020-04-15 02:22:36 +0100 4d793bcfe81479d1bf34805c3960c4611eb8fc9b Merge #18632: doc: Fix macos comments in release-notes +pr 2020-04-15 07:56:40 +0100 903be99ee6541d46cfb2d01116798f8d5522b31a Merge #18621: script: Disallow silent bool -> CScript conversion +pr 2020-04-15 08:17:04 +0100 ae486b263c22128ae3a78cb809623abfef0bfb47 Merge #17929: build: add linker optimisation flags to gitian & guix (Linux) +pr 2020-04-15 08:31:40 +0100 5447d57bfff9636ec662f60a60d0a6a72605edfb Merge #18624: Added my fingerprint Stephan Oeste (Emzy) +cr 2020-04-15 08:35:47 +0100 1b04302e43c91cf2353c545e646e50a672eab300 gui: use PACKAGE_NAME in exception message +pr 2020-04-15 08:38:02 +0100 e831f18b1ed3b9749566145ceba6038f89c0a749 Merge #18619: gitian: add jonatack gpg key fingerprint +c 2020-04-15 11:05:03 +0100 54b5eb2b149a1f2a4a1dbdb9e0648c5a390d8e22 tests: Add std::locale::global to list of locale dependent functions in lint-locale-dependence.sh +c 2020-04-15 11:59:10 +0100 a95af77eb264646b4160836e4e9a2c4b45f87bb8 qt: Make bitcoin.ico non-executable +pr 2020-04-15 12:30:39 +0100 18f11fb24b47c6762e659b4bd3413f03e2c9ec99 Merge #18646: gui: use PACKAGE_NAME in exception message +pr 2020-04-15 13:26:34 +0100 20c0e2e0f04f699d29419d52696601b76eca3124 Merge #18628: test: Add various low-level p2p tests +c 2020-04-15 14:41:49 +0100 9df32e820d83aa74e2f175d8d63b5666b8b4ef0e scripted-diff: test: replace command with msgtype +c 2020-04-15 15:01:55 +0100 ccccd5190898ece3ac17aa3178f320d091f221df script: Remove undocumented and unused operator+ +c 2020-04-15 15:39:42 +0100 727b67e7b86567adff81d945044989de3b5d2d5f test: add coverage for bitcoin-cli -rpcwait +cr 2020-04-15 15:40:15 +0100 becc8b9747c963b0fb1b927ced60d5bebed60be4 test: verify bitcoin-cli -version with node stopped +cr 2020-04-15 15:40:22 +0100 bb13f46fb15c360c68e370d0106463afd590dc43 test: verify cli.getwalletinfo in wallet section +c 2020-04-15 15:40:24 +0100 c28c7b882b40cc75989dd102414de3b3dad69706 test: add -getinfo "unlocked_until" and "headers" coverage +c 2020-04-15 16:46:24 +0100 fa176e253fb473767c61d4d8cd2d93e87d71a015 test: Avoid accessing free'd memory in validation_chainstatemanager_tests +c 2020-04-15 17:02:39 +0100 808ef36b89ea9ce72116bbd7ee479b984367dc60 [doc] Update thread information in developer docs +pr 2020-04-15 19:38:02 +0100 4bd6bc5cb4f3c4b017cc0ac21c00c2218acb97d0 Merge #18615: test: Avoid accessing free'd memory in validation_chainstatemanager_tests +cr 2020-04-15 20:05:18 +0100 fad4fa7e2fb95b7ced9007060ebfd0e8f181f5d8 node: Add args alias for gArgs global +cr 2020-04-15 20:13:04 +0100 fa0cbd48c418ec14e1d91bffea206bce20bd1e56 test: Add optional extra_args to testing setup +c 2020-04-15 20:13:11 +0100 fa69f88486e900aacf3fc768671f947927173226 fuzz: Disable debug log file +pr 2020-04-15 21:19:52 +0100 6db8ef2431ac7915bc272f50eaed186522bda3ca Merge #18640: appveyor: Remove clcache +pr 2020-04-15 21:30:11 +0100 e84a5f000493fe39adb2a5f22b43c3848dcd0a4f Merge #18645: [doc] Update thread information in developer docs +cr 2020-04-15 22:07:44 +0100 9986608ba93de040490ee0d5584ea33e605f1df0 test: Verify findCommonAncestor always initializes outputs +pr 2020-04-15 22:41:56 +0100 544709763e1f45148d1926831e07ff03487673ee Merge #18571: fuzz: Disable debug log file +c 2020-04-16 01:22:18 +0100 fa2bc4141df59f2e38fef863723b433250295d20 tools: Add unused argsman to bench_bitcoin +c 2020-04-16 01:32:30 +0100 fa46aebeb1fc419b227524eab8352d9a7fc1f981 scripted-diff: Replace gArgs with local argsman in bench +c 2020-04-16 01:33:36 +0100 fae00a77e2589cc784650e3e60e1b99c22ca8a7b bench: Remove unused argsman.ClearArgs +c 2020-04-16 13:45:05 +0100 fa5b1f067fcf8bebb23455dd8a16cde5068e79cd rpc: Document all aliases for second arg of getblock +c 2020-04-16 13:45:33 +0100 fa168d754221a83cab0d2984a02c41cf6819e873 rpc: Document all aliases for first arg of listtransactions +pr 2020-04-16 13:51:54 +0100 e16718a8b3db8bf9c9715f28f4dc6080bf609776 Merge #18401: Refactor: Initialize PrecomputedTransactionData in CheckInputScripts +pr 2020-04-16 14:59:23 +0100 79b0459648e33307edcefc358d9bfdd0ed5ff844 Merge #18650: qt: Make bitcoin.ico non-executable +pr 2020-04-16 15:11:12 +0100 661e8df1b63b213d2d5b0d7cba0733869b508af9 Merge #18653: test: add coverage for bitcoin-cli -rpcwait +cr 2020-04-16 15:56:21 +0100 0c6318788beaf1a31aeba5a21f3f8bb5c07cea6c ci: Limit cache size regardless of NO_DEPENDS +c 2020-04-16 16:08:46 +0100 faec0638872798b58b9882ee079014555bc8393e log: Use Join() helper when listing log categories +pr 2020-04-16 16:44:03 +0100 f4c0ad4aefe0a59d629c415d0ceac63bf2c0bb58 Merge #18660: test: Verify findCommonAncestor always initializes outputs +c 2020-04-16 17:06:58 +0100 2b18fd2242a589988fbb68205dae4afa0b8b3d34 Disable unavailable context menu items in transactions tab +c 2020-04-16 17:26:09 +0100 faf989f93695d29099f6e152d5a2e117cd304183 util: Document why ArgsManager (con/de)structor is not inline +pr 2020-04-16 17:56:36 +0100 d8dfcea5d956126fe0e2b1f36db74c8ef805e7ab Merge #17669: tests: have coins simulation test also use CCoinsViewDB +c 2020-04-16 18:32:36 +0100 fac5c373006a9e4bcbb56843bb85f1aca4d87599 scripted-diff: Sort test includes +cr 2020-04-16 18:33:09 +0100 fa488f131fd4f5bab0d01376c5a5013306f1abcd scripted-diff: Bump copyright headers +cr 2020-04-16 20:20:57 +0100 3718ae2ef8dd2559e435bf8d7f5ed5217611ce81 [tests] Don't initialize PrecomputedTransactionData in txvalidationcache tests +pr 2020-04-16 21:12:30 +0100 447f8676b2e9d11fb4003f8d815284a255f44c77 Merge #18667: ci: Limit cache size regardless of NO_DEPENDS +pr 2020-04-16 21:27:46 +0100 8f2497941ef19c64b1669a9135952fc989a5027c Merge #18598: gitian: Add missing automake package to gitian-win-signer.yml +pr 2020-04-16 21:37:27 +0100 969ee8549496108730d2c824d69d0782a43c3d7f Merge #18662: test: Replace gArgs with local argsman in bench +c 2020-04-17 00:09:39 +0100 69ffddc83e0f3e265bf6cf7ae31489ae629fe6be refactor: Remove unused methods CBloomFilter::reset()/clear() +cr 2020-04-17 05:01:00 +0100 bda62e87e681696828d14b5581b6c19b6e81f378 Adding build instructions to Bitcoin Core, fixes #18658 +pr 2020-04-17 11:32:13 +0100 0856c1570679b31c0aa3eedcf2a13171364f0c15 Merge #18262: bnb: exit selection when best_waste is 0 +c 2020-04-17 11:36:04 +0100 fa4632c41714dfaa699bacc6a947d72668a4deef test: Move boost/stdlib includes last +pr 2020-04-17 11:49:00 +0100 4a71c469058b824ed6c5132ab9901e194fa8aae1 Merge #18670: refactor: Remove unused methods CBloomFilter::reset()/clear() +cr 2020-04-17 11:53:34 +0100 b68e71796792a9da9daa0a4e759d284d15595230 build: Set libevent minimum version to 2.0.21 +pr 2020-04-17 12:05:48 +0100 c189bfd260ca37cbf025ed4790ee7594ce8dbb1c Merge #17824: wallet: Prefer full destination groups in coin selection +c 2020-04-17 12:45:43 +0100 eab7367e25e35688a4d4a6c96701dd7149134df5 fuzz: fix unused variable compiler warning +pr 2020-04-17 12:55:55 +0100 c2e53ff064dfec1eb5d9c3e481cbf03ca997c6ad Merge #18467: rpc: Improve documentation and return value of settxfee +c 2020-04-17 14:00:43 +0100 faceeae49ae85fb644996fedb970ad9d0e297ca5 ci: Disable valgrind functionl tests on forked repos to avoid timeouts +cr 2020-04-17 14:09:04 +0100 1362be044724bb49d785ca2e296a3b43343c1690 build: Drop make dist in gitian builds +c 2020-04-17 14:09:11 +0100 2aa48edec0101f8a77a2189244fc62722ff7a123 refactor: Drop unused ${WRAP_DIR}/${HOST} directory +pr 2020-04-17 14:09:59 +0100 ecc2e4e363eed796811ef491e9f47b01dadf827d Merge #18664: fuzz: fix unused variable compiler warning +pr 2020-04-17 15:12:13 +0100 54f812d9d29893c690ae06b84aaeab128186aa36 Merge #18673: scripted-diff: Sort test includes +c 2020-04-17 15:19:32 +0100 fab117096446ab63d1f38c1ef6edbc94a5d4ab52 bench: Remove requirement that all benches use RegTestingSetup +c 2020-04-17 15:20:54 +0100 fa1fdb02fccd0f670f7b08ee61c249f04d0db17f bench: Replace ::mempool globabl with test_setup.mempool +pr 2020-04-17 17:16:42 +0100 244daa482151b5b9a8a145df0541880c8bdc03fc Merge #18607: rpc: Fix named arguments in documentation +c 2020-04-17 18:00:19 +0100 6f8b498d186df5aa08dbb9ca8fdeab6652f1db5e fuzz: http_request workaround for libevent < 2.1.1 +pr 2020-04-17 19:00:04 +0100 d7bdba460cc05a139a1bb67e16cafeb209b206ee Merge #18683: ci: Disable valgrind functionl tests on forked repos to avoid timeouts +pr 2020-04-17 19:04:14 +0100 c54295c1a2068aab5ea99c0a40eb716e1194d5b6 Merge #18641: test: Create cached blocks not in the future +c 2020-04-17 20:43:23 +0100 fa66280396890bf616cc75432603111e1046d496 fuzz: Run in parallel +cr 2020-04-17 22:09:27 +0100 fabfcad8764bb8f807b0ac5f3482b414278a4525 test: Bump timeout in wallet_import_rescan +pr 2020-04-17 22:17:11 +0100 895c71e53557ce0385181191270c660fc6c32ce1 Merge #18682: fuzz: http_request workaround for libevent < 2.1.1 +c 2020-04-17 23:51:05 +0100 27abd1a4f4c7a3d092d59edbbaa1e0f324c8b0ef test: Replace boost::mutex with std::mutex +c 2020-04-18 04:40:08 +0100 709998467e1c1bc7980662c9f88fbc7964602d33 rpc: doc: Fix and extend getblockstats examples +pr 2020-04-18 11:00:26 +0100 bbb1ba1814738d9d641bff69564972083013e130 Merge #17219: wallet: allow transaction without change if keypool is empty +pr 2020-04-18 17:57:16 +0100 6ae99aab5d97b06d46ff940111b290f1eeb90045 Merge #18692: test: Bump timeout in wallet_import_rescan +c 2020-04-18 19:58:58 +0100 fa03713e133e3017112fdd5c278e0c8643054578 test: Properly raise FailedToStartError when rpc shutdown before warmup finished (take 2) +c 2020-04-19 03:05:29 +0100 315a4d36f716341a38bc4e4de8630b3246d27dbc build: fix ASLR for bitcoin-cli on Windows +pr 2020-04-19 04:53:25 +0100 d65631171cf87a1b25d50317a9e27338a4dc0d8b Merge #18695: test: Replace boost::mutex with std::mutex +pr 2020-04-19 11:10:06 +0100 b690b24eb213d3c93cf470b9f973e523c68eede8 Merge #18633: test: Properly raise FailedToStartError when rpc shutdown before warmup finished (take 2) +pr 2020-04-19 11:18:21 +0100 a998c5185bc7fc2c7e22312fac60175cb2869bdd Merge #18675: tests: Don't initialize PrecomputedTransactionData in txvalidationcache tests +pr 2020-04-19 12:06:42 +0100 b470c758470fd97ccb42d0348a32942afa2a3ec8 Merge #15761: Replace -upgradewallet startup option with upgradewallet RPC +c 2020-04-19 13:40:20 +0100 fac2fc4dd8a28b99e17c57e4ab6580a3231f1d0a test: Increase debugging to hunt down mempool_reorg intermittent failure +cr 2020-04-19 13:52:49 +0100 faebcd4e8d3bb72f0b8ce849716241be8b46c1da ci: Remove xenial tsan workaround +c 2020-04-19 14:04:37 +0100 fc289b7898fb90d4800675b69c0bb9b42df5599f wallet: Refactor WalletRescanReserver to use wallet reference +pr 2020-04-19 14:18:21 +0100 d2882a012bee1ea9905427bfcf76fb4df4bf72e4 Merge #18610: scripted-diff: test: replace command with msgtype (naming) +pr 2020-04-19 15:32:43 +0100 f8102d90889a786a568d62ee4eef13049f8cea00 Merge #18601: wallet: Refactor WalletRescanReserver to use wallet reference +c 2020-04-19 17:12:03 +0100 c648e636b2f230db5f1d1137088685f74ae42454 test: add wait_for_cookie_credentials() to test framework +c 2020-04-19 17:12:05 +0100 92fe537cf704dfb4ae830c8c8b382f08c4893e65 test: fix intermittent race condition in interface_bitcoin_cli.py +c 2020-04-20 09:58:54 +0100 20a30922fbf6ba14e250ca649239af115dbbe7b0 doc: note why we can't use thread_local with glibc back compat +pr 2020-04-20 11:13:59 +0100 dc5da7fe7b0c51dac269d6c630d9b54581b07900 Merge #18691: test: add wait_for_cookie_credentials() to framework for rpcwait tests +pr 2020-04-20 11:59:53 +0100 da4cbb7927497ca3261c1504c3b85dd3f5800673 Merge #18544: net: limit BIP37 filter lifespan (active between 'filterload'..'filterclear') +pr 2020-04-20 12:15:45 +0100 5e5dd9918e0a998d316a256c13fa17b3195437b2 Merge #17831: rpc: doc: Fix and extend getblockstats examples +c 2020-04-20 12:17:49 +0100 b91e4ae0d8ab2ae6b77585c97c52d825f56ed539 Do not expose and consider -logthreadnames when it does not work +pr 2020-04-20 15:05:32 +0100 3be119c0f634627ca30188cd2c7f47ad01b6ff01 Merge #17579: [refactor] Merge getreceivedby tally into GetReceived function +pr 2020-04-20 15:16:12 +0100 fc00e651e407200da1eb0ae61f6448e22d1b6d8d Merge #18705: ci: Remove xenial tsan workaround +cr 2020-04-20 15:57:48 +0100 69749fbe6a95f45eb7a695a5f89be87e55c91fb8 tests: Add fuzzing harness for Golomb-Rice coding (GolombRiceEncode/GolombRiceDecode) +c 2020-04-20 17:22:21 +0100 c7437185589926ec8def2af6bede6a407b3d2e4a test: add further BIP37 size limit checks to p2p_filter.py +pr 2020-04-20 17:43:07 +0100 56d2ff8a8fc52676a22163f804a9f1a5415b4b71 Merge #18676: build: Check libevent minimum version in configure script +pr 2020-04-20 20:32:41 +0100 c4c3f110eb93243fc8f740070240f50b0008f206 Merge #18190: tests: Add fuzzing harness for Golomb-Rice coding (GolombRiceEncode/GolombRiceDecode) +c 2020-04-21 03:05:43 +0100 b155fcda5186c59fc4fb2a9eaaf791d132e0ab30 doc: fix typo in configure.ac +c 2020-04-21 04:32:01 +0100 7b99c7454cdb74cd9cd7a5eedc2fb9d0a19df456 scripts: add MACHO Canary check to security-check.py +c 2020-04-21 04:32:06 +0100 8334ee31f868f0f9baf0920d14d20174ed889dbe scripts: add MACHO LAZY_BINDINGS test to test-security-check.py +pr 2020-04-21 12:26:18 +0100 4ad6144ed028f61ca6fa9d381cfe6516172a5ee1 Merge #18672: test: add further BIP37 size limit checks to p2p_filter.py +c 2020-04-21 12:58:51 +0100 60cdcf30a4ddd29907513f32b2e607e092c96179 test: Fix linter issue +pr 2020-04-21 13:05:42 +0100 977328338e468390feea691de744609db213281b Merge #18721: test: Fix linter issue +c 2020-04-21 14:06:59 +0100 a9b957740e3490d87e5ce0b7f1b93ba43bb19764 bench: add CAddrMan benchmarks +cr 2020-04-21 14:38:26 +0100 8f5dc8800aeb524eee2fa2451cd22883b7b2bfec test: display command line options passed to send_cli() in debug log +pr 2020-04-21 15:58:10 +0100 9ea4d8326a9d1641dfacca7ac82c16b7d387d967 Merge #18704: test: Increase debugging to hunt down mempool_reorg intermittent failure +c 2020-04-21 16:17:42 +0100 3c21db7b78fb0a27a0ea61b64eede8af0972791f [test] add 8 error messages to feature_segwit and change version to type +pr 2020-04-21 18:42:21 +0100 b6a5dc90bfd4640cf9f914e59bf8e21cd265b51e Merge #18384: [test] more specific feature_segwit test error messages and fixing incorrect comments +c 2020-04-21 19:18:03 +0100 c205979031ff4e8e32a5f05bae813405f233fccd [docs] Improve commenting in coins.cpp|h +c 2020-04-21 19:19:15 +0100 21fa0a44abe8c1b5c452e097eab20cf0ae988805 [docs] use consistent naming for possible_overwrite +cr 2020-04-21 19:19:15 +0100 2685c214cce4b07695273503e60350e3f05fe3e2 [tests] small whitespace fixup +cr 2020-04-21 19:19:15 +0100 e9936966c08bd8a6ac02828131f619ddaa1ced13 scripted-diff: Rename PRUNED to SPENT in coins tests +pr 2020-04-22 07:46:19 +0100 7d1a3bda21214b119c0e6380927d451454669f9f Merge #18709: doc: note why we can't use thread_local with glibc back compat +pr 2020-04-22 09:40:32 +0100 c90a9e6fffa73707b6fcd4c39c39b2fc5aaf8398 Merge #18713: scripts: Add MACHO stack canary check to security-check.py +pr 2020-04-22 13:17:01 +0100 19032c750cb48338bd178fd785ed345e87235e2e Merge #18612: script: Remove undocumented and unused operator+ +pr 2020-04-22 13:18:06 +0100 acb4fa07416f37cfcf77dcafb26612845fd531a6 Merge #18665: Do not expose and consider -logthreadnames when it does not work +pr 2020-04-22 13:23:56 +0100 9e8e813df5f19ff154d9314f2d039eb6153f06c4 Merge #18410: Docs: Improve commenting for coins.cpp|h +c 2020-04-22 14:00:56 +0100 faff9e4bb431919a4bc7e4dc4a9ca188e2d18113 test: Remove unused, undocumented and misleading CScript.__add__ +pr 2020-04-22 14:09:19 +0100 ce4e1f0282c6a622e8252f06028f1da416a79e23 Merge #18553: Avoid non-trivial global constants in SHA-NI code +c 2020-04-22 14:16:05 +0100 faa4243c1157c3e67111b6e5e979cdc3e1452a94 Add release notes skeleton, so that notes can be filled easier +c 2020-04-22 14:18:11 +0100 1e94a2bcbc5ff8ae61eed9f31317ea534649116d depends: Add --sysroot option to mac os native compile flags +pr 2020-04-22 14:18:11 +0100 5dcb0615898216c503e965a01d855a5999a586b5 Merge #18702: build: fix ASLR for bitcoin-cli on Windows +c 2020-04-22 14:22:49 +0100 facaefadd3b0cd53d375890e8339303a202c2a8b doc: Add wallet release notes for 0.21.0 +pr 2020-04-22 15:52:40 +0100 a7a6f1ff417abc2452a2a2b9edcd2f12d6c14441 Merge #18575: bench: Remove requirement that all benches use same testing setup +c 2020-04-22 16:22:36 +0100 bb1ec36fb171816309ae5af53d549ff3e4633f67 doc: Document how to fuzz Bitcoin Core using honggfuzz +c 2020-04-22 18:46:08 +0100 9f5608c2893f89cd56c7c548b748996199e0da1d test: check for matching object hashes in wait_for_getdata +pr 2020-04-22 20:45:56 +0100 fb89af26d8e34cf88b9383a99b794adc5336eb9c Merge #18733: doc: Add wallet release notes for 0.21.0 +pr 2020-04-22 20:49:22 +0100 47b94a337e1aad0c347fdfecba999b963ab51006 Merge #18732: test: Remove unused, undocumented and misleading CScript.__add__ +c 2020-04-22 20:51:42 +0100 d5a31b7cb4226a62931fd72672422a3d2e789e7a tests: Add fuzzing harness for functions in primitives/block.h +c 2020-04-22 21:56:56 +0100 fa262712ca0981cb0ee68cd3dd99a214a20dcbf1 test: Check submitblock return values +c 2020-04-23 01:40:24 +0100 3e38023af724a76972d39cbccfb0bba4c54a0323 scripts: add PE .reloc section check to security-check.py +pr 2020-04-23 02:16:23 +0100 4f802e59a044b208a52c21e6bcc908d38e1d3bd6 Merge #17509: gui: save and load PSBT +pr 2020-04-23 03:12:35 +0100 e890c15e2cc91487ce023900912646ff56ee97b4 Merge #18671: wallet: Add BlockUntilSyncedToCurrentChain to dumpwallet +pr 2020-04-23 11:37:53 +0100 64139803f1225dab26197a20314109d37fa87d5f Merge #18690: test: Check object hashes in wait_for_getdata +c 2020-04-23 17:54:03 +0100 b8580cacc70764ba5a48e3defb864d75e6c28626 [net processing] Move net processing consts to net_processing.cpp +c 2020-04-23 17:54:06 +0100 0109622b08887ed01a30911477ce4b8f266d4b4a [validation] Move validation-only consts to validation.cpp +cr 2020-04-23 17:54:06 +0100 507b36dd1bf867cd20e4312b95c68b494c9bb7b8 [validation] Move all const declarations to top of validation.h +cr 2020-04-23 17:54:06 +0100 e9ea95a30d3c0f62b0df0b29744fb5d68687f97f [net processing] Move all const declarations to top of net_processing.cpp +c 2020-04-23 18:22:16 +0100 eb37275a6f972c81caef010b4ee9c5dc88edc759 Fix naming of macOS SDK and clarify version +c 2020-04-23 18:25:50 +0100 06620302c713cae65ee8e4ff9302e4c88e2a1285 Introduce SetType function to tell ScriptPubKeyMans the type and internal-ness of it +cr 2020-04-23 18:25:50 +0100 3194a7f88ac1a32997b390b4f188c4b6a4af04a5 Introduce WalletDescriptor class +c 2020-04-23 18:25:50 +0100 6b13cd3fa854dfaeb9e269bff3d67cacc0e5b5dc Create LegacyScriptPubKeyMan when not a descriptor wallet +cr 2020-04-23 18:25:50 +0100 6b8119af53ee2fdb4c4b5b24b4e650c0dc3bd27c Introduce DescriptorScriptPubKeyMan as a dummy class +cr 2020-04-23 18:25:50 +0100 78f8a92910d34247fa5d04368338c598d9908267 Implement SetType in DescriptorScriptPubKeyMan +cr 2020-04-23 18:25:50 +0100 834de0300cde57ca3f662fb7aa5b1bdaed68bc8f Store WalletDescriptor in DescriptorScriptPubKeyMan +c 2020-04-23 18:25:50 +0100 96accc73f067c7c95946e9932645dd821ef67f63 Add WALLET_FLAG_DESCRIPTORS +c 2020-04-23 18:25:50 +0100 aeac157c9dc141546b45e06ba9c2e641ad86083f Return nullptr from GetLegacyScriptPubKeyMan if descriptor wallet +c 2020-04-23 18:25:50 +0100 d8132669e10c1db9ae0c2ea0d3f822d7d2f01345 Add a lock cs_desc_man for DescriptorScriptPubKeyMan +c 2020-04-23 18:59:42 +0100 db7177af8c159abbcc209f2caafcd45d54c181c5 Add LoadDescriptorScriptPubKeyMan and SetActiveScriptPubKeyMan to CWallet +c 2020-04-23 18:59:48 +0100 1346e14831489f9c8f53a08f9dfed61d55d53c6f Functional tests for descriptor wallets +c 2020-04-23 18:59:48 +0100 1cb42b22b11c27e64462afc25a94b2fc50bfa113 Generate new descriptors when encrypting +cr 2020-04-23 18:59:48 +0100 223588b1bbc63dc57098bbd0baa48635e0cc0b82 Add a --descriptors option to various tests +c 2020-04-23 18:59:48 +0100 2363e9fcaa41b68bf11153f591b95f2d41ff9a1a Load the descriptor cache from the wallet file +c 2020-04-23 18:59:48 +0100 2db7ca765c8fb2c71dd6f7c4f29ad70e68ff1720 Implement IsMine for DescriptorScriptPubKeyMan +c 2020-04-23 18:59:48 +0100 388ba94231f2f10a0be751c562cdd4650510a90a Change wallet_encryption.py to use signmessage instead of dumpprivkey +c 2020-04-23 18:59:48 +0100 3c19fdd2a2fd5394fcfa75b2ba84ab2277cbdabf Return error when no ScriptPubKeyMan is available for specified type +c 2020-04-23 18:59:48 +0100 46c46aebb7943e1e2e96755e94dc6c197920bf75 Implement GetID for DescriptorScriptPubKeyMan +cr 2020-04-23 18:59:48 +0100 46dfb99768e7d03a3cf552812d5b41ceaebc06be Implement writing descriptorkeys, descriptorckeys, and descriptors to wallet file +c 2020-04-23 18:59:48 +0100 4cb9b69be031e1dc65d8964794781b347fd948f5 Implement several simple functions in DescriptorScriptPubKeyMan +c 2020-04-23 18:59:48 +0100 586b57a9a6b4b12a78f792785b63a5a1743bce0c Implement ReturnDestination in DescriptorScriptPubKeyMan +c 2020-04-23 18:59:48 +0100 58c7651821b0eeff0a99dc61d78d2e9e07986580 Implement TopUp in DescriptorScriptPubKeyMan +c 2020-04-23 18:59:48 +0100 72a9540df96ffdb94f039b9c14eaacdc7d961196 Implement FillPSBT in DescriptorScriptPubKeyMan +c 2020-04-23 18:59:48 +0100 741122d4c1a62ced3e96d16d67f4eeb3a6522d99 Implement MarkUnusedAddresses in DescriptorScriptPubKeyMan +c 2020-04-23 18:59:48 +0100 82ae02b1656819f4bd5023b8955447e1d4ea8692 Be able to create new wallets with DescriptorScriptPubKeyMans as backing +c 2020-04-23 18:59:48 +0100 84b4978c02102171775c77a45f6ec198930f0a88 Implement SignMessage for descriptor wallets +cr 2020-04-23 18:59:48 +0100 869f7ab30aeb4d7fbd563c535b55467a8a0430cf tests: Add RPCOverloadWrapper which overloads some disabled RPCs +c 2020-04-23 18:59:48 +0100 886e0d75f5fea2421190aa4812777d89f68962cc Implement CWallet::IsSpentKey for non-LegacySPKMans +c 2020-04-23 18:59:48 +0100 8b9603bd0b443e2f7984eb72bf2e21cf02af0bcb Change GetMetadata to use unique_ptr +c 2020-04-23 18:59:48 +0100 953feb3d2724f5398dd48990c4957a19313d2c8c Implement loading of keys for DescriptorScriptPubKeyMan +c 2020-04-23 18:59:48 +0100 a775f7c7fd0b9094fcbeee6ba92206d5bbb19164 Implement Unlock and Encrypt in DescriptorScriptPubKeyMan +c 2020-04-23 18:59:48 +0100 b713baa75a62335ab9c0eed9ef76a95bfec30668 Implement GetMetadata in DescriptorScriptPubKeyMan +c 2020-04-23 18:59:48 +0100 bde7c9fa38775a81d53ac0484fa9c98076a0c7d1 Implement SignTransaction in DescriptorScriptPubKeyMan +c 2020-04-23 18:59:48 +0100 bfdd0734869a22217c15858d7a76d0dacc2ebc86 Implement GetNewDestination for DescriptorScriptPubKeyMan +c 2020-04-23 18:59:48 +0100 ce24a944940019185efebcc5d85eac458ed26016 Add IsLegacy to CWallet so that the GUI knows whether to show watchonly +c 2020-04-23 18:59:48 +0100 cf060628590fab87d73f278e744d70ef2d5d81db Correctly check for default wallet +c 2020-04-23 18:59:48 +0100 d1ec3e4f19487b4b100f80ad02eac063c571777d Add IsSingleType to Descriptors +c 2020-04-23 18:59:48 +0100 d50c8ddd4190f20bf0debd410348b73408ec3143 Implement GetSolvingProvider for DescriptorScriptPubKeyMan +c 2020-04-23 18:59:48 +0100 e014886a342508f7c8d80323eee9a5f314eaf94c Implement SetupGeneration for DescriptorScriptPubKeyMan +c 2020-04-23 18:59:48 +0100 ec2f9e1178c8e38c0a5ca063fe81adac8f916348 Implement IsHDEnabled in DescriptorScriptPubKeyMan +c 2020-04-23 18:59:48 +0100 f193ea889ddb53d9a5c47647966681d525e38368 add importdescriptors RPC and tests for native descriptor wallets +c 2020-04-23 18:59:48 +0100 f1ca5feb4ad668a3e1ae543d0addd5f483f1a88f Implement GetKeypoolOldestTime and only display it if greater than 0 +c 2020-04-23 18:59:48 +0100 f866957979c23cefd41efa9dae9e53b9177818dc Implement GetReservedDestination in DescriptorScriptPubKeyMan +c 2020-04-23 22:42:25 +0100 297a1785360c4db662a7f3d3ade7b6b503258d39 [test] Integration tests for unbroadcast functionality +c 2020-04-23 22:42:25 +0100 50fc4df6c4e8a84bdda13ade7bed7a2131796f00 [mempool] Persist unbroadcast set to mempool.dat +c 2020-04-23 22:42:25 +0100 6851502472d3625416f0e7796e9f2a0379d14d49 [refactor/test] Extract P2PTxInvStore into test framework +c 2020-04-23 22:42:25 +0100 7e93eecce3bc5a1b7bb0284e06f9e2e69454f5ba [util] Add method that returns random time in milliseconds +c 2020-04-23 22:42:25 +0100 89eeb4a3335f8e871cc3f5286af4546dff66172a [mempool] Track "unbroadcast" transactions +c 2020-04-23 22:42:25 +0100 dc1da48dc5e5526215561311c184a8cbc345ecdc [wallet] Update the rebroadcast frequency to be ~1/day. +c 2020-04-23 22:42:25 +0100 e25e42f20a3aa39651fbc1f9fa3df1a49f1f5868 [p2p] Reattempt initial send of unbroadcast transactions +c 2020-04-23 23:43:44 +0100 fae98668d150bae7a68167749ae134894cb1140e test: Fix intermittent error in mempool_reorg +cr 2020-04-24 00:01:26 +0100 fa8b9b5d1f48ad95eecf47ebbd7bf374777fc621 test: Fix intermittent failure in wallet_importmulti +pr 2020-04-24 10:22:54 +0100 d8ca51db5ddfb51c225c0c99f8aa1f5d68f0ad83 Merge #18589: Fix naming of macOS SDK and clarify version +c 2020-04-24 12:55:20 +0100 c4027e735072c3de4b4ffb20eecd7187ff36bad7 refactor: test: use wait_for_getdata() in p2p_compactblocks.py +pr 2020-04-24 12:57:48 +0100 85bae24d060e0e67e72b7116ae92b220aad9fba1 Merge #18752: test: Fix intermittent error in mempool_reorg +cr 2020-04-24 13:16:03 +0100 fd8e99da57b53da29fbaec6435931c396e3b612b tests: Add fuzzing harness for functions in primitives/transaction.h +pr 2020-04-24 13:41:15 +0100 d1aa0ae1ad64618765601011bb23e9986ae79aba Merge #18712: test: display command line options passed to send_cli() in debug log +c 2020-04-24 15:53:59 +0100 fdceb6328382ac0f9d643f9d42ba0509062d7d48 fuzz: Remove enumeration of expected deserialization exceptions in ProcessMessage(...) fuzzer +c 2020-04-24 16:18:34 +0100 8098dea06944f9de8b285f44958eb98761f133ee test: Add mempool_updatefromblock.py +pr 2020-04-24 19:22:14 +0100 7812889849eb936afadc7267b51ad3768b2adf94 Merge #18157: doc: fixing init.md documentation to not require rpcpassword +pr 2020-04-24 19:38:23 +0100 8c0f86f284408f316e27702510733289a6a139e7 Merge #18757: test: Remove enumeration of expected deserialization exceptions in ProcessMessage(...) fuzzer +cr 2020-04-24 20:51:00 +0100 2495110012fc0cb7142a4536791dd79da5cc3e44 test: add coverage for -rpcwallet cli option +pr 2020-04-24 21:34:43 +0100 29637a5c56fd8dc8b55c385b2c56a291fe3a70a5 Merge #18745: test: Check submitblock return values +pr 2020-04-24 21:37:17 +0100 a215c6133323cc9f27bc9ea12299f3a907329545 Merge #18756: refactor: test: use wait_for_getdata() in p2p_compactblocks.py +c 2020-04-24 21:46:54 +0100 fabe44e8154a6068d6cba91ec30f00345ed7b275 bench: Start nodes with -nodebuglogfile +pr 2020-04-24 23:41:22 +0100 5f19155e5bca37bf1fe14515758c6f589f6806ae Merge #18724: test: add coverage for -rpcwallet cli option +c 2020-04-25 12:49:08 +0100 0956e46bff7f0b6da65a4de6d4f8261fe9d7055c test: use zero-argument super() shortcut (Python 3.0+) +pr 2020-04-25 13:36:39 +0100 9fac600ababd8edefbe053a7edcd0e178f069f84 Merge #17383: Refactor: Move consts to their correct translation units +pr 2020-04-25 13:38:39 +0100 6f51f6f3573e4f0aae8dc0a8ad9d597ad4899bb1 Merge #18754: bench: add CAddrMan benchmarks +pr 2020-04-25 14:25:50 +0100 fd48e7ad990c7b67a9ad3bb5ba29cefd2c16e20a Merge #18585: test: use zero-argument super() shortcut (Python 3.0+) +pr 2020-04-25 14:26:52 +0100 bab81f7e4d3e4443f9c36354dd0e4314ad430cd3 Merge #18739: doc: Document how to fuzz Bitcoin Core using Honggfuzz +pr 2020-04-25 14:28:33 +0100 3e7c118d6555c740601597522246e9c6781a2348 Merge #18688: fuzz: Run in parallel +pr 2020-04-25 14:50:12 +0100 65276c7737176a5269b052ceae78dbb44b216bf4 Merge #18744: test: Add fuzzing harnesses for various classes/functions in primitives/ +c 2020-04-25 17:28:22 +0100 cd543d9193ac1882c1b4a8a84e3ac7356a8b7ce9 test: check misbehavior more independently in p2p_filter.py +c 2020-04-26 00:36:02 +0100 fa489011d9202d61463dbc426041c867f2670438 test: Remove raw-tx byte juggling in mempool_reorg +c 2020-04-26 01:16:22 +0100 e8fa0a3d2025509fcddc59fc618e91371542cf87 Fix WSL file locking by using flock instead of fcntl +pr 2020-04-26 12:41:01 +0100 3cf464de2e6d51cb35a296e95a9ab2e2eaeb7882 Merge #18770: test: Remove raw-tx byte juggling in mempool_reorg +pr 2020-04-26 15:47:37 +0100 9ddfce671263e41aa27d56747c23c3240efdfab8 Merge #18753: test: Fix intermittent failure in wallet_importmulti +c 2020-04-26 17:57:46 +0100 e3ec4924a72c33f202b10a82e8498875d8f1b775 qt: remove todo bug fix for old versions of Qt +cr 2020-04-26 21:23:56 +0100 103b6ecce0f8e6d1366962c8748794067b2485fe tests: Add fuzzing coverage for TransactionErrorString(...) +c 2020-04-26 21:23:56 +0100 1532259fcae8712777e1cedefc91224ee60a6aaa tests: Add fuzzing coverage for FormatHDKeypath(...) and WriteHDKeypath(...) +c 2020-04-26 21:23:56 +0100 90b635e84e432e5a3682864f15274dba6acfbded tests: Add fuzzing coverage for CHECK_NONFATAL(...) +cr 2020-04-26 21:23:56 +0100 a19598cf9851cb238a4b5caa04f9ae7281532352 tests: Add fuzzing harness for functions in system.h (ArgsManager) +c 2020-04-26 21:23:56 +0100 a4e3d13df6a6f48974f541de0b5b061e8078ba9a tests: Add fuzzing coverage for StringForFeeReason(...) +c 2020-04-26 21:23:56 +0100 dde508b8b03a4a144331cb1ff97f1349b491c402 tests: Add fuzzing coverage for ParseFixedPoint(...) +c 2020-04-26 21:23:56 +0100 e1e181fad1a73e9dee38a2bd74518e1b8d446930 tests: Add fuzzing coverage for JSONRPCTransactionError(...) and RPCErrorFromTransactionError(...) +c 2020-04-26 21:25:40 +0100 32b6b386a5499b1f8439f80d8fc1ee573bc31a53 tests: Sort fuzzing harnesses +c 2020-04-26 21:31:39 +0100 de8905adf204c42bba810802f82b98f7b3dd26dc test: use unittest and test_runner for test framework unit testing +pr 2020-04-27 00:57:41 +0100 ae32e5ce3d268881cbf631de1903b2a414bb64e1 Merge #18669: log: Use Join() helper when listing log categories +c 2020-04-27 01:22:42 +0100 fa501700e91b8667d4d2f116c3705e3ab9a1c8c3 wallet: Recommned absolute path for dumpwallet +c 2020-04-27 01:23:05 +0100 7918c1b019a36a8f9aa55daae422c6b6723b2a39 test: Add CreateWalletFromFile test +pr 2020-04-27 01:23:05 +0100 eef90c14ed0f559e3f6e187341009270b84f45cb Merge #16528: Native Descriptor Wallets using DescriptorScriptPubKeyMan +c 2020-04-27 01:23:05 +0100 fcb72616253ed22e364bc312992d77efc1c4a3c1 Prevent valgrind false positive in rest_blockhash_by_height +c 2020-04-27 02:03:16 +0100 fac24dea00c54fe1e2dcc7625bb65ada8b97ac0c ci: Run functional tests on mac again +c 2020-04-27 04:08:51 +0100 cd24f37ea9168bd56b8c518ea6125e242cc4213d doc: Better explain GNU ld's dislike of ld64's options +c 2020-04-27 15:20:00 +0100 ff046aeeba8d4f3ff210d37ba020616c12450ab3 wallet: Make sure no DescriptorScriptPubKeyMan members are uninitialized after construction +c 2020-04-27 15:20:26 +0100 2a780980983f4b4aaae75817e57e7ed308713561 wallet: Make sure no WalletDescriptor members are uninitialized after construction +cr 2020-04-27 17:27:34 +0100 fae49f6e424f31e93c5620d5ff893fb517ef4a8b ci: Add and document BASE_BUILD_DIR +cr 2020-04-27 18:06:59 +0100 38e49ded8bd079f8da8b270b39f81cc5cf3ada11 tests: Add fuzzing harness for MessageSign, MessageVerify and other functions in util/message.h +c 2020-04-27 20:35:26 +0100 faec3dc2adc487af97c22408f9f0bfe33f44a230 init: Remove boost from ThreadImport +pr 2020-04-27 23:02:52 +0100 8bdb2134fc800bcab7f21d76d56195d3785fea8c Merge #18777: wallet: Recommend absolute path for dumpwallet +pr 2020-04-28 01:36:39 +0100 5352d14b3796d9e672a20ada8f7613a70fe448f4 Merge #18778: ci: Run functional tests on mac again +pr 2020-04-28 06:32:45 +0100 ac21090f209cb1b8ea6cd5074d5e9c6b82ce2a7f Merge #18629: scripts: add PE .reloc section check to security-check.py +c 2020-04-28 08:52:31 +0100 45615de26caa4c8ffeacc558143aaf6887cbb314 ci: Fix default retry script usage +pr 2020-04-28 09:44:17 +0100 65fb3dfc8dc1f847b756e5ce8eac4fe45305ff0e Merge #18556: build: Drop make dist in gitian builds +pr 2020-04-28 10:15:41 +0100 b9ba76f1c9e6564c6cf3fa6a6150e8e4d1171de3 Merge #18769: qt: remove bug fix for Qt < 5.5 +pr 2020-04-28 10:34:22 +0100 9fb95ae8e3e4f10888a98fc99d704d97e2eb371f Merge #18779: doc: Better explain GNU ld's dislike of ld64's options +cr 2020-04-28 12:10:19 +0100 fa72a751026d43e1d01ae30e26bcfd9b4cc0cf45 ci: Document why tests can not be run on mac +pr 2020-04-28 13:25:51 +0100 ad04130742dccbe3dd35e2a4da123b2686a24966 Merge #18799: ci: Document why tests can not be run on mac +pr 2020-04-28 13:51:57 +0100 6e3fc7492a7d5e58c0ada22617388b6487410f82 Merge #18663: doc: mention build docs in README.md +cr 2020-04-28 15:36:35 +0100 395c1137f630dc495ffb2752a23bc1dfd470ee53 gitian: Limit sourced script to just assignments +cr 2020-04-28 15:36:36 +0100 f5a6ac4f48b18f93050d77bcb23f9cf45ec34647 guix: Make source tarball using git-archive +c 2020-04-28 15:36:37 +0100 14701604d0904bc5bbf1c67de08f8ee6d3215523 guix: Expose GIT_COMMON_DIR in container as readonly +cr 2020-04-28 15:36:38 +0100 fa791da02f9684e3fd554b687fb692ae6a23d65a nsis: Specify OutFile path only once +pr 2020-04-28 16:50:21 +0100 a483ffd6890e23a770ea5ce9dacd802ca19d1d7c Merge #18735: ci: Add and document BASE_BUILD_DIR +c 2020-04-28 16:53:00 +0100 fa301fec966b77c54d02ac54ae7d726629adbfd5 test: Fix wallet_bumpfee intermittent error +c 2020-04-28 17:08:33 +0100 7b2b06dfe3061b5ab4a283245930e2f7773eb3ef tests: Add missing sync_all to wallet_importdescriptors.py +pr 2020-04-28 18:11:57 +0100 6a60bfc76c39493d35c10fef9b2851eb256bfaa5 Merge #18765: test: Fix wallet_bumpfee intermittent error +pr 2020-04-28 18:14:26 +0100 ba348dbc518b8e082a5dc3a225432fdacf859a13 Merge #18805: tests: Add missing sync_all to wallet_importdescriptors.py +c 2020-04-28 18:27:22 +0100 1ad8ea2b73134bdd8d6b50704a019d47ad2191d8 net: remove is{Empty,Full} flags from CBloomFilter, clarify CVE fix +c 2020-04-28 21:10:58 +0100 1e06bb68bed84e525c55022f789416ffd4793e8d Drop unused CLIENT_VERSION_SUFFIX macro +c 2020-04-29 01:40:47 +0100 fac0cf6e5513df1402068df113d496b4e03a4bdc rpc: Do not advertise dumptxoutset as a way to flush the chainstate +c 2020-04-29 02:17:03 +0100 ff6549c3c84ca7324032dbc37744645bf2fe1c3e fix: update rest info on block size and json +c 2020-04-29 04:20:22 +0100 06442549f8b725f46c1c727e9eb6fde6b843503c validation: Add minimum witness commitment size constant +c 2020-04-29 04:20:31 +0100 692f8307fc1449299b90182e7d79efb81a55d7ab test: add test for witness commitment index +c 2020-04-29 08:31:41 +0100 5495fa585007b40b2e9285c23be275de71708af8 Add Hash Padding Microbenchmarks +pr 2020-04-29 09:32:37 +0100 0ef0d33f7562c3b7f9c021549e70b3b4dbcc504c Merge #18038: P2P: Mempool tracks locally submitted transactions to improve wallet privacy +c 2020-04-29 11:47:57 +0100 a2e6db5c4f1bb52a8814102b628e51652493d06a rpc: Add mutex to guard deadlineTimers +pr 2020-04-29 13:23:06 +0100 ecca2ea1d5f6460e3a1ace1ae666c7c8b3d4487a Merge #18785: Prevent valgrind false positive in rest_blockhash_by_height +pr 2020-04-29 13:30:15 +0100 af2ec6b03745cf408f169cfbd74e3380a69975e0 Merge #18759: bench: Start nodes with -nodebuglogfile +c 2020-04-29 15:11:49 +0100 66fe7b1a98c03f690dcf60d359baac124658aeae test: added test for upgradewallet RPC +c 2020-04-29 15:54:48 +0100 047ceac142246b5d51056a51dbf4645b31802be4 [net processing] ignore tx GETDATA from blocks-only peers +c 2020-04-29 15:54:55 +0100 e257cf71c851e25e1a533bf1d4296f6b55c81332 [net processing] ignore unknown INV types in GETDATA messages +pr 2020-04-29 16:09:05 +0100 e302830faed00c259a517d87ce032dcd8c47528f Merge #18774: test: added test for upgradewallet RPC +pr 2020-04-29 16:14:14 +0100 ab91a0e0fc6e6be491e7df743fbfc56449ced451 Merge #18798: ci: Fix default retry script usage +pr 2020-04-29 17:07:13 +0100 978c5a212240fd03af13d6f72ba3c27da6298f61 Merge #18485: test: Add mempool_updatefromblock.py +c 2020-04-29 19:45:17 +0100 4fc1df41d570ab631a8b47e4427a0b84305e37d1 qt: Track QEvent::Resize during animation +pr 2020-04-29 20:23:39 +0100 0f204dd3f21b997334a0e99954c939db154b64ca Merge #18727: test: Add CreateWalletFromFile test +pr 2020-04-29 23:54:34 +0100 95a9165016ecea3063cf9a35b86764779c7781f0 Merge #18736: test: Add fuzzing harnesses for various classes/functions in util/ +pr 2020-04-29 23:56:25 +0100 36c0abd8f61ba859d53b1e59014720282c97c143 Merge #18726: test: check misbehavior more independently in p2p_filter.py +c 2020-04-30 00:34:01 +0100 2f032556e08a04807c71eb02104ca9589eaadf1b [test] test that an invalid GETDATA doesn't prevent processing of future messages +c 2020-04-30 00:34:01 +0100 9847e205bf7edcac4c30ce4b6d62f482aa7bc1b7 [docs] Improve commenting in ProcessGetData() +pr 2020-04-30 09:45:17 +0100 63d5ed2fc45846ebab760764a3c07b1062212b3b Merge #18437: util: Detect posix_fallocate() instead of assuming +c 2020-04-30 09:57:46 +0100 06e434d7d96b5ebddd2ee829995101a62fa8da4e test: fix message for ECC_InitSanityCheck test +pr 2020-04-30 10:16:56 +0100 35ef3c15ef8263b79c6e8f002ceab270f08cd5a5 Merge #18591: Add C++17 build to Travis +pr 2020-04-30 10:45:06 +0100 afed2e98b0e3a059adf0b1f88ce2551e3b09733c Merge #18810: doc: update rest info on block size and json +cr 2020-04-30 11:02:03 +0100 5d4999951ee32e333b511245862628e80f83b703 prevector: Avoid unnamed struct, which is a GNU extension +c 2020-04-30 11:02:04 +0100 0ae8f18dfe143051fec6ae10ea7df10142e3ff2f build: add -Wgnu to compile flags +cr 2020-04-30 11:02:04 +0100 3a0fd7726b8b916de6cce33bb67f48990575f923 Remove use of non-standard zero variadic macros +c 2020-04-30 11:02:04 +0100 49f6178c3e5e3ad54a419da9d8523207da17fc64 Drop unused LOG_TIME_MICROS helper +pr 2020-04-30 11:50:26 +0100 64673b1037d60d5f2c9818085ff4d77b883ed44b Merge #18780: validation: add const for minimum witness commitment size +pr 2020-04-30 12:09:05 +0100 cf5e3be5ea74560894d1c4fe982cfbae3504524a Merge #18825: test: fix message for ECC_InitSanityCheck test +pr 2020-04-30 12:20:14 +0100 00c1a4d9a95eaead64508ee2a7625bdc67e65fa3 Merge #18809: rpc: Do not advertise dumptxoutset as a way to flush the chainstate +c 2020-04-30 14:19:14 +0100 fa0e5b89cf742df56c6c8f49fe9b3c54d2970a66 Add templated GetRandomDuration<> +c 2020-04-30 14:19:16 +0100 0000ea32656833efa3d2ffd9bab66c88c83334f0 test: Add test for GetRandMillis and GetRandMicros +cr 2020-04-30 14:19:24 +0100 13c1f6b24fa5e53f100d90d36b47b7dd3bc91b9f tests: Add fuzzing harness for IsRBFOptIn(...) +cr 2020-04-30 14:19:24 +0100 3439c88a5d2d0bdcc30d949b9d400ca90b8a7d28 tests: Add fuzzing harness for CBlockPolicyEstimator +pr 2020-04-30 14:30:13 +0100 a66ba6d029b3948dec0cf092bb844f70c16b07dc Merge #18576: test: use unittest for test_framework unit testing +c 2020-04-30 15:19:49 +0100 2bcc2bd742392730b4f21e3d4f00438c34acac1f tests: Clarify how we avoid hitting the signed integer overflow in CFeeRate::GetFeePerK() when fuzzing +cr 2020-04-30 16:45:16 +0100 fa359d14c09c6b139dead5da17c5a1c02f68393c test: Strip down previous releases boilerplate +cr 2020-04-30 17:50:36 +0100 aaaacff107a71e2495eff17602fa2bec52c02e4d ci: Merge C++17 build with one of the existing ones +pr 2020-04-30 17:53:42 +0100 ef8ef31fd28acb1bac7566ac25202d95152a243e Merge #18775: tests: Add fuzzing harnesses for various classes/functions in policy/ (CBlockPolicyEstimator, IsRBFOptIn(…), etc.) +pr 2020-04-30 19:04:24 +0100 e5b9308920a151946b83694fe1701d90316a2a9e Merge #18829: ci: Merge C++17 build with one of the existing ones +cr 2020-04-30 19:31:19 +0100 b855592d835bf4b3fb1263b88d4f96669a1722b1 [wallet] Move getHeight from Chain::Lock interface to simple Chain +cr 2020-04-30 19:37:21 +0100 0a76287387950bc9c5b634e95c5cd5fb1029f42d [wallet] Move getBlockHash from Chain::Lock interface to simple Chain +cr 2020-04-30 19:37:21 +0100 841178820d31e1c24a00cb2c8fc0b1fd2f126f56 [wallet] Move methods from Chain::Lock interface to simple Chain +cr 2020-04-30 19:37:21 +0100 de13363a472ea30dff2f8f55c6ae572281115380 [wallet] Move getBlockHeight from Chain::Lock interface to simple Chain +cr 2020-04-30 19:41:24 +0100 6a72f26968cf931c985d8d4797b6264274cabd06 [wallet] Remove locked_chain from CWallet, its RPCs and tests +c 2020-05-01 11:59:09 +0100 28b112e9bd3fd1181c0720306051ba7efca8b436 Get rid of BindWallet +cr 2020-05-01 11:59:09 +0100 2b9cba206594bfbcefcef0c88a0bf793819643bd Remove CWalletTx merging logic from AddToWallet +cr 2020-05-01 11:59:09 +0100 2bc9b92ed8b7736ad67876398a0bb8287f57e9b3 Cancel wallet balance timer when shutdown requested +pr 2020-05-01 11:59:09 +0100 608359b071dac82a9cf33a6c9e01f87abfcb90eb Merge #16426: Reverse cs_main, cs_wallet lock order and reduce cs_main locking +cr 2020-05-01 11:59:09 +0100 65b9d8f8ddb5a838454efc8bdd6576f0deb65f6d Avoid copying CWalletTx in LoadToWallet +cr 2020-05-01 11:59:09 +0100 83f69fab3a1ae97c5cff8ba1e6fd191b0fa264bb Switch transaction table to use wallet height not node height +c 2020-05-01 11:59:09 +0100 bd2fbc7cdbec46400341209f4cb7e69e5b2cee19 Get rid of unneeded CWalletTx::Init parameter +c 2020-05-01 11:59:09 +0100 bf0a510981ddc28c754881ca21c50ab18e5f2b59 gui: Avoid wallet tryGetBalances calls before TransactionChanged or BlockTip notifications +c 2020-05-01 11:59:09 +0100 d002f9d15d938e78360ad906f2d74a249c7e923e Disable CWalletTx copy constructor +cr 2020-05-01 11:59:09 +0100 d3a56be77a9d112cde4baef4314882170b9f228f Revert "gui: Avoid Wallet::GetBalance in WalletModel::pollBalanceChanged" +cr 2020-05-01 12:39:00 +0100 fae51a5c6f4270a1088e6295b10a8cc45988ae46 wallet: Avoid translating RPC errors when loading wallets +cr 2020-05-01 12:39:06 +0100 fae7776690c37104d2d4949429c5f84e6a33c576 wallet: Avoid translating RPC errors when creating txs +cr 2020-05-01 12:39:35 +0100 fa59cc1c977cce8f1f28374ac2169970ca78a35f wallet: Report full error message in wallettool +c 2020-05-01 12:41:32 +0100 fa2cce4391b0b1bda325f695bb45f7b565c8e8ea wallet: Remove trailing whitespace from potential translation strings +c 2020-05-01 13:36:35 +0100 fa8614aea9b8dc0f135a1221c7435014adb71c89 test: Fix intermittent p2p_segwit issue +c 2020-05-01 13:45:26 +0100 fab7ee39900d128cd305f530b643e2e62999ec74 test: Fix p2p_leak intermittent issue +cr 2020-05-01 17:30:20 +0100 d256f91cb1b0d6ff5170106b99b0266cbe51f5a2 rel-builds: Directly deploy win installer to OUTDIR +c 2020-05-01 17:31:07 +0100 a4f6ffa71e335d4b2a6bf525b7f416968f9cd9f7 lint: Also enable source statements for non-gitian +c 2020-05-01 17:33:47 +0100 1f2c39a30e0f82046c7aecddfda3eb99cb536816 guix: Remove logical cores requirement +cr 2020-05-01 19:27:57 +0100 27e63e01cce368d67092de8f0c736927d6f6aa69 build: Accomodate makensis v2.x +pr 2020-05-01 19:57:59 +0100 844d2070a2c0106bb7a54be5cad7d4da4d9cd55e Merge #18828: test: Strip down previous releases boilerplate +cr 2020-05-01 22:59:20 +0100 dc1fba9389de130809834b7832d780ecf4161496 scripted-diff: Rename share/genbuild.sh macros to more meaningful ones +c 2020-05-01 23:00:07 +0100 35f1189ea7365c1fdaf7dd9ac5e90fc8af69eae7 build: Rename BUILD_* macros and the code self-descriptive +c 2020-05-01 23:46:00 +0100 b59b4504abf96cec860badfed2ac793ae5d40ced have GenerateNewKey and DeriveNewChildKey take a CHDChain as an argument +pr 2020-05-02 14:24:05 +0100 68ef9523d1bcd00afbccee2a6585c9f82ddcdb31 Merge #18413: script: prevent UB when computing abs value for num opcode serialize +c 2020-05-03 00:30:58 +0100 fa09110ebb5e485b17a767fca198819fcbe7c16e doc: Fix typo in Coin doxygen comment +cr 2020-05-03 00:42:40 +0100 2742c3428633b6ceaab6714635dc3adb74bf121b test: add factor option to adjust test timeouts +c 2020-05-03 04:45:17 +0100 489ebfd7a16443d8263c048d55622da297df7c39 tests: feature_backwards_compatibility.py test downgrade after upgrade +pr 2020-05-03 13:58:56 +0100 ddc0a600b38ac6cef044085cdee46649fc437562 Merge #18617: test: add factor option to adjust test timeouts +pr 2020-05-03 15:30:47 +0100 cce034b02800ef380738b662ad7690bd87081a66 Merge #18839: test: Fix intermittent issues +pr 2020-05-03 15:35:21 +0100 2e6a16b968a9d111da9a94e82b576460b563c7e3 Merge #18855: tests: feature_backwards_compatibility.py test downgrade after upgrade +c 2020-05-03 16:21:45 +0100 71f183a49b714a28622277fa668d8f9f3dac0aae build: warn on potentially uninitialized reads +cr 2020-05-03 19:42:14 +0100 b56607a89ba112083f2b0a7b64ab18d66b26e2be Remove CCoinsViewCache::GetValueIn(...) +pr 2020-05-04 10:53:34 +0100 afa577c323dcaedf641897fab43af2540e230bcb Merge #15768: gui: Add close window shortcut +c 2020-05-04 12:05:42 +0100 e8123eae40eb264bbb71007d0eb074901f0e2fe5 gui: Fix itemWalletAddress leak when not tree mode +c 2020-05-04 12:36:40 +0100 89a28e02fa46f3d5eb07ab02aa34aa95c6fcee11 [test] add v0.16.3 backwards compatibility test +c 2020-05-04 12:36:40 +0100 9c246b873c74834a121edba00fcaecf0cba6f9b4 [test] backwards compatibility: bump v0.19.0.1 to v0.19.1 +pr 2020-05-04 12:48:23 +0100 74a1152f25814c92e53641da4255282c7df26fa8 Merge #18859: Remove CCoinsViewCache::GetValueIn(...) +c 2020-05-04 13:56:30 +0100 fae153b40968bfd974a4709bcd841a59447abf18 test: Fix verack race to avoid intermittent test failures +pr 2020-05-04 14:02:21 +0100 0a729b0e42fad486c10d412c2a52a6275128c335 Merge #18783: tests: Add fuzzing harness for MessageSign, MessageVerify and other functions in util/message.h +pr 2020-05-04 15:06:42 +0100 42fd5038197d621bc96bb64e8e730bc5e05314b8 Merge #18786: init: Remove boost from ThreadImport +pr 2020-05-04 15:29:22 +0100 23c926d859c60379fba97ad106978077a317841f Merge #18699: wallet: Avoid translating RPC errors +pr 2020-05-04 15:31:07 +0100 b549cb1bd2cc4c6d7daeccdd06915bec590e90ca Merge #18443: lockedpool: avoid sensitive data in core files (FreeBSD) +cr 2020-05-04 15:40:48 +0100 fa47cf9d95dc2c2822fc96df16f179176935bf96 wallet: Fix typo in assert that is compile-time true +c 2020-05-04 17:53:21 +0100 8f9f4ba5e2b738fb63c2d6cdcfdce5c169d4e88c refactor: Remove duplicated code +c 2020-05-04 17:53:58 +0100 c269e618cf53634d3cf270273ab1b0354dc3c119 Drop unused GIT_COMMIT_DATE macro +c 2020-05-04 18:00:08 +0100 bfe1ba2f5b36056e0c41edf8206b93d3d83098df rel-builds: Specify core.abbrev for git-rev-parse +pr 2020-05-05 00:44:23 +0100 e727c2bdcab3660297f452c76c6f877038015c02 Merge #18088: build: ensure we aren't using GNU extensions +cr 2020-05-05 02:40:56 +0100 23b9fa2e5ec0425980301d2eebad81e660a5ea39 gui: Add detailed text to BitcoinGUI::message +cr 2020-05-05 02:45:59 +0100 917ca93553917251e0fd59717a347c63cdfd8a14 Make ThreadSafe{MessageBox|Question} bilingual +cr 2020-05-05 02:46:04 +0100 7e923d47ba9891856b86bc9f718cf2f1f773bdf6 Make InitError bilingual +c 2020-05-05 02:46:08 +0100 e95e658b8ec6e02229691a1941d688e96d4df6af doc: Do not translate technical or extremely rare errors +c 2020-05-05 02:51:29 +0100 18bd83b1fee2eb47ed4ad05c91f2d6cc311fc9ad util: Cleanup translation.h +cr 2020-05-05 03:27:19 +0100 f963a680515eda66429b3d1537a7baf281ab9283 test: Add test for conflicted wallet tx notifications +cr 2020-05-05 03:56:50 +0100 68288ef0c15522799d4bf6239d2ae1e8086b5abf qt: Overhaul ReceiveRequestDialog +c 2020-05-05 03:57:08 +0100 73529f0859c060087dd41e9e176fd4198d0f385f qt: Rename slot to updateDisplayUnit() +c 2020-05-05 04:10:35 +0100 708e3c7e85a666d5b8da8638a819c0f3973fcca4 valgrind: remove rest_blockhash_by_height suppression +c 2020-05-05 04:10:36 +0100 d7120f7f78cda5ed1ab91f83e9b546de68dbee47 valgrind : remove duplicate BCLog::Logger suppression +c 2020-05-05 04:21:52 +0100 0c63f808542ba02fc41aa90b1d96e9123f16d8ad build: Suppress -Wdeprecated-copy warnings +pr 2020-05-05 04:56:04 +0100 ec79b5f86b22ad8f77c736f9bb76c2e4d7faeaa4 Merge #18782: wallet: Make sure no DescriptorScriptPubKeyMan or WalletDescriptor members are left uninitialized after construction +c 2020-05-05 05:24:00 +0100 610030d95c60ea526440d801a98ac8bd370eac48 docs: Add release notes for descriptor wallets +c 2020-05-05 05:24:06 +0100 89b1ce1140535b4c902a7c5999bed335b9ddfe7c Remove unimplemented SetCrypted from DescriptorScriptPubKeyMan +c 2020-05-05 05:24:06 +0100 b9073c8f13fb0ba94c2ec6365666343e19fd9ddf rpc: createwallet warning that descriptor wallets are experimental +cr 2020-05-05 05:24:46 +0100 ca2a09640fe976b1e74a33d29d9381895e71b347 Change SetType to SetInternal and remove m_address_type +c 2020-05-05 05:57:47 +0100 be01449cc8eb7bb97531a967f5d1dcc7b8865d1e Add test for param interaction b/w -blocksonly and -whitelistforcerelay +c 2020-05-05 06:09:20 +0100 44cc75f80ee7805a117e9298a182af1a44bcbff4 wallet: error if an explicit fee rate was given but the needed fee rate differed +cr 2020-05-05 12:25:58 +0100 fa13090d2048c9a1e475eb25de756763f8adddb8 contrib: Remove optimize-pngs.py script, which lives in the maintainer repo +c 2020-05-05 13:47:59 +0100 a30b0a24e97eae7f6d1428c5bf339a579872f28e build: enable -Werror=gnu +pr 2020-05-05 15:06:35 +0100 52ce396b2a47ed1c5d7d5764bc98a09451001749 Merge #18879: valgrind: remove outdated suppressions +pr 2020-05-05 15:40:39 +0100 fbd522721cb89ef0efea0c1bc912c00b268d1c2a Merge #18885: contrib: Move optimize-pngs.py script to the maintainer repo +c 2020-05-05 16:30:36 +0100 faa26d374425f52e03efff3a575c391b7862abe5 test: Remove RPCOverloadWrapper boilerplate +cr 2020-05-05 19:37:46 +0100 fa3f9a05660687bf4146e089050e944a1d6cbe3c test: Fix intermittent sync_blocks failures +c 2020-05-05 23:56:21 +0100 a8b5f1b133d4f23975a3fbfb7a415b17261466ee gui: Fix manual coin control with multiple wallets loaded +pr 2020-05-06 00:36:32 +0100 60091d20f9bb6bb2d57b634567ba63b4f0e458d0 Merge #9381: Remove CWalletTx merging logic from AddToWallet +pr 2020-05-06 06:13:36 +0100 d96fdc2a396f4ca44d64d830b352469674f2845f Merge #18741: guix: Make source tarball using git-archive +c 2020-05-06 06:28:49 +0100 c3cf2f55013c4ea1c1ef4a878fc7ff8e92f2c42d rpc/blockchain.cpp: Remove g_utxosetscan mutex that is only protecting a single atomic variable +pr 2020-05-06 08:40:06 +0100 551dc7f664666cdc8cb6e6cab5522d70980778e8 Merge #18806: net: remove is{Empty,Full} flags from CBloomFilter, clarify CVE fix +c 2020-05-06 10:39:07 +0100 03da4c7781fe52cac48530ca292af4d794ae28e2 build: make linker checks more robust +pr 2020-05-06 12:15:28 +0100 dd3310bbb81538f3b1d896f16dfed45a3d46a29e Merge #18854: doc: Fix typo in Coin doxygen comment +pr 2020-05-06 12:49:49 +0100 6621be53517d69ab855cee4a5978a44d6a133ba3 Merge #18843: build: warn on potentially uninitialized reads +pr 2020-05-06 13:19:41 +0100 88b2652fadf6e004e751d48884ae8d4cf5c452b8 Merge #18853: wallet: Fix typo in assert that is compile-time true +pr 2020-05-06 13:59:28 +0100 f763283b65ad15917231db0de0b7753b96c195f2 Merge #18512: Improve asmap checks and add sanity check +pr 2020-05-06 14:09:55 +0100 c6b15ec0ee4679a22abefb0d8d528f026acd8b67 Merge #17874: build: make linker checks more robust +pr 2020-05-06 14:30:31 +0100 7bcc42b4035b878719d13201286e322989b415c5 Merge #18873: test: Fix intermittent sync_blocks failures +cr 2020-05-06 21:10:46 +0100 fa082d0a57afedca9122fac4aecd6a3070f06b04 travis: Remove valgrind +c 2020-05-07 01:42:07 +0100 9f59dde9740d065118bdddde75ef9f4e4603a7b1 rpc: Relock wallet only if most recent callback +cr 2020-05-07 05:41:01 +0100 a9d28afe23a94efdccc53f9f10716f3a0c9337eb qt: Display warnings as rich text +c 2020-05-07 06:15:46 +0100 1e9bfd4926a3cbb9db877c773a60b0bbbbe8bde0 qt: Reset toolbar after all wallets are closed +c 2020-05-07 06:40:10 +0100 9c59f9c285303659ee1beed7555bbb322e6e6981 Fix ZapSelectTx to sync wallet spends +pr 2020-05-07 08:41:59 +0100 3b1e289248dcda896aaa1c84995ee9c6077601e6 Merge #18535: build: remove -Qunused-arguments workaround for clang + ccache +c 2020-05-07 08:44:56 +0100 8bf1540cc235fb8fb5330a7ae8ab638247ceb177 build: remove fdelt_chk backwards compatibility code +cr 2020-05-07 08:45:09 +0100 df6bde031b24112abf3a94337a2c096698acde6e test: remove glibc fdelt sanity check +pr 2020-05-07 12:56:33 +0100 c1cd2b5a97f435b75f860a1a4d95e15a2c3b270b Merge #18899: travis: Remove valgrind +cr 2020-05-07 13:34:55 +0100 4a614ff88ac71d6457513a4f7aa8a3235874ff3f test: explicit imports from test_framework.messages in p2p_invalid_messages.py +cr 2020-05-07 13:34:55 +0100 b35e1d2471c3d9e0b6cc4b94f4726a7e6ea32206 test: add inventory type constant MSG_CMPCT_BLOCK +cr 2020-05-07 13:34:55 +0100 eeaaa58d2ccc243a7506d34bca47c678867d6dd5 test: replace inv type magic numbers by constants +pr 2020-05-07 13:59:57 +0100 56611b0e240529d88ad5fa41e8da1bb1c2a570ed Merge #18743: depends: Add --sysroot option to mac os native compile flags +c 2020-05-07 14:58:57 +0100 8c705ff1291ef7876ab1a939e2c7312aacc3dc37 travis: Remove s390x +pr 2020-05-07 15:26:59 +0100 f54753293fe7355e4280944d766f22054b560ba1 Merge #18905: travis: Remove s390x +cr 2020-05-07 18:32:01 +0100 34e641a564531853342b03db2d9f0bf52b6e439e test: Remove unnecessary disconnect_nodes call in rpc_psbt.py +c 2020-05-07 18:32:01 +0100 a9bd1f9adf869a95f70b3a40615a2f8e8e52db1d test: warn if nodes not connected before disconnect_nodes +cr 2020-05-07 18:32:01 +0100 e6e7abd51a9a6027acac7a9964e36357f25e242c test: remove redundant two-way disconnect_nodes calls +c 2020-05-08 03:19:26 +0100 3e4421070af01374cd3daf77b28a2abc223c6f83 Expose txinwitness for coinbase in JSON form +c 2020-05-08 03:19:34 +0100 34645c4dd04f1e9bc199fb722de0bb397ec0e131 Test txinwitness is accessible on coinbase vin +c 2020-05-08 08:36:58 +0100 1551cea2d52cac403ff506a7cc955d8de8fd6f3e refactor: Use override for non-final overriders +c 2020-05-08 08:37:05 +0100 d044e0ec7d37bbcdf10bbdb903b9119741c7297d refactor: Remove override for final overriders +cr 2020-05-08 15:13:29 +0100 d135c294764add81683ba47575f9a5dde7d7c07f [ci] make list of previous releases to download a setting +pr 2020-05-08 16:23:40 +0100 3930014abcdd8f28a213e119605f68508aae1816 Merge #18864: Add v0.16.3 backwards compatibility test, bump v0.19.0.1 to v0.19.1 +pr 2020-05-08 17:17:55 +0100 5b24f6084ede92d0f493ff416b4726245140b2c1 Merge #16224: gui: Bilingual GUI error messages +cr 2020-05-08 19:18:43 +0100 df37377e30678ac9b8338ea920e50b7296da6bd5 test: Fix outstanding -Wsign-compare errors +c 2020-05-08 19:21:48 +0100 095bc9a10691505c3d0fdacb6caeb62bfdcf1732 fuzz: fix vector size problem in system fuzzer +c 2020-05-08 21:36:18 +0100 9ccaaba11e94571fe984857494042ac292c17156 [init] Add -peerblockfilters option +c 2020-05-08 21:36:19 +0100 23083856a551ca13e8b142791c296ecb25cc4e7f [test] Add test for cfcheckpt +c 2020-05-08 21:36:19 +0100 f9e00bb25ac4039056808affeb5ffa86a2c317fe [net processing] Message handling for getcfcheckpt. +pr 2020-05-08 23:11:43 +0100 b55866969e248cbd912a1c298e3ba375685575dc Merge #18917: fuzz: fix vector size problem in system fuzzer +pr 2020-05-09 00:31:17 +0100 376294cde6b1588cb17055d8fde567eaf5848c3c Merge #18866: test: Fix verack race to avoid intermittent test failures +c 2020-05-09 08:20:00 +0100 eac6a3080d38cfd4eb7204ecd327df213958e51a refactor: Rework asmap Interpret to avoid ptrdiff_t +c 2020-05-09 08:20:09 +0100 68537275bd91d1dc14a69609ae443f955bfdbd64 build: Enable -Werror=sign-compare +cr 2020-05-09 10:09:52 +0100 420fa0770f37619bfa29898d59dac45b6a477abb fuzz: use std::optional for sep_pos variable +pr 2020-05-09 12:30:37 +0100 88d8b4e182bfc75e8496f7046af7aab93307b9d0 Merge #18901: fuzz: use std::optional for sep_pos_opt variable +c 2020-05-09 14:43:51 +0100 fe05dd0611cfc2929a7fdec04ca5948bccf0233b util: Enhance bilingual_str +c 2020-05-10 12:27:15 +0100 89fea68ffdbd97394d891177e664f896b3e7d1e6 build: don't pass -w when building for Windows +c 2020-05-10 12:49:09 +0100 3333cb96994182bbdbb21174b691feb716858bc2 fuzz: Pass down MAKEJOBS to test_runner +cr 2020-05-10 12:51:31 +0100 fa35c34df781cf46bbd15522961f214f03b958bf Remove unused ci configs that have been moved elsewhere +c 2020-05-10 14:58:42 +0100 83da576f4416c64b5d520819208a722b2273739a net: use CMessageHeader::HEADER_SIZE, add missing include +c 2020-05-10 15:35:17 +0100 cbd661122e5852d543467090459d33cf8cb4a3c7 Set LD_LIBRARY_PATH consistently in travis tests +c 2020-05-10 16:00:19 +0100 4c9b9a4882e68835f16a52f1f0657efe47e589b5 util: Enhance Join() +c 2020-05-10 16:01:28 +0100 da16f95c3fecf4ee1e9a1dc4333b0b92cd981afd gui: Do not translate InitWarning messages in debug.log +c 2020-05-10 19:28:29 +0100 78be8d97d3d750fcfbbe509a72639b7b30b7bd18 util: Drop OpOriginal() and OpTranslated() +c 2020-05-10 23:20:57 +0100 51e9393c1f6c9eaac554f821f5327f63bd09c8cf refactor: s/command/msg_type/ in CNetMsgMaker and CSerializedNetMsg +c 2020-05-11 00:18:17 +0100 872aa25fa1d71aa022cdfa02e5927d851d73b3a8 doc: add c++17-enable to fuzzing instructions +pr 2020-05-11 05:20:25 +0100 ec4d27fa8bdc60315c21e71ab989905bf915225d Merge #18216: test, build: Enable -Werror=sign-compare +cr 2020-05-11 14:53:49 +0100 fa182a8794cbf9be1aa91d1d75e65bc7800156bc rpcwallet: Replace boost::optional::emplace with simple assignment of T{} +cr 2020-05-11 14:59:00 +0100 fa1f840596554ed264d11ee3b3643bf99eb57eb5 rpcwallet: Replace pwallet-> with wallet. +pr 2020-05-11 15:08:04 +0100 f71a3a8829746cb17fc42c7475cf03229ad6c08e Merge #18939: doc: add c++17-enable flag to fuzzing instructions +pr 2020-05-11 18:34:07 +0100 eb2ffbb7c1347115e6a3d6fa30f909959b6170a5 Merge #18914: refactor: Apply override specifier consistently +cr 2020-05-11 18:42:55 +0100 de5e91c3034f320f84ee0308a3c31659635d136a refactor: Add BerkeleyDatabaseVersion() function +c 2020-05-11 19:36:06 +0100 6666c828e072a5e99ea0c16394ca3e5b9de07409 fuzz: Give CNode ownership to ConnmanTestMsg in process_message fuzz harness +cr 2020-05-11 21:31:02 +0100 8a22fd01140bd957036fc00419b147e4268ae9b1 avoided os-dependant path +pr 2020-05-12 02:13:48 +0100 7a5767423f3757e876fbcb0f4ffb534172dd734d Merge #18808: [net processing] Drop unknown types in getdata +c 2020-05-12 09:06:28 +0100 d97fac422eaaefe13e1ed376e617882a100872ae Add a link from ZMQ doc to ZMQ example in contrib/ +pr 2020-05-12 09:17:15 +0100 49d237ce3230288cee9d2c9d98d11702c906719b Merge #18928: build: don't pass -w when building for Windows +pr 2020-05-12 09:42:12 +0100 ad1b7b18177afb2a2d919cef5442e7c35fd7fe1e Merge #18957: Add a link from ZMQ doc to ZMQ example in contrib/ +pr 2020-05-12 10:05:40 +0100 0f2fa599aee0fa45cd65ef5a5973212d20024c07 Merge #18931: net: use CMessageHeader::HEADER_SIZE, add missing include +c 2020-05-12 10:30:33 +0100 25d8264c95eaf98a66df32addb0bf32d795a35bd p2p: add MAX_FEELER_CONNECTIONS constant +c 2020-05-12 10:30:33 +0100 e3047edfb63c3d098cb56ba9f9a1e7e0a795d552 test: use p2p constants in denial of service tests +c 2020-05-12 12:28:12 +0100 fab860aed4878b831dae463e1ee68029b66210f5 fuzz: Stop nodes in process_message* fuzzers +pr 2020-05-12 12:37:31 +0100 4fa31570144e6b601a73712de8605f24e48b1e5c Merge #18929: ci: Pass down LD_LIBRARY_PATH and MAKEJOBS to fuzz test_runner +pr 2020-05-12 14:03:07 +0100 e45fb7e0d276ce13447a08e5270930bef3c56dd1 Merge #18877: Serve cfcheckpt requests +c 2020-05-12 14:37:31 +0100 85f4a4b0822e3aa10310c4623eff719f301e9263 guix: Make V=1 more powerful for debugging +cr 2020-05-12 14:47:06 +0100 5d1377b52bfcd4edf8553aaf332bfeb92fc554cc build: multiprocess autotools changes +cr 2020-05-12 14:47:06 +0100 603fd6a2e708c04ef6c9880f89d0a4cbaa6fc7c5 depends: add MULTIPROCESS depends option +pr 2020-05-12 14:47:06 +0100 8da1e43b63cb36759eeb1fcfd6768163265c44e2 Merge #18910: p2p: add MAX_FEELER_CONNECTIONS constant +c 2020-05-12 14:47:06 +0100 e2bab2aa162ae38b2bf8195b577c982402fbee9d multiprocess: add multiprocess travis configuration +c 2020-05-12 16:03:39 +0100 839add193b13c17a40f42ff69d973caeb800d3f2 build: Enable -Wsuggest-override +c 2020-05-12 21:16:55 +0100 c6131bf407c1ada78a0e5509a702bc7da0bfd57d Abstract logic to determine whether to answer tx GETDATA +c 2020-05-12 21:17:42 +0100 f2f32a3dee9a965c8198f9ddd3aaebc627c273e4 Push down use of cs_main into FindTxForGetData +c 2020-05-12 21:29:49 +0100 746736639e6d05acdb85c866d4c605c947d4c500 [net processing] Only send a getheaders for one block in an INV +c 2020-05-12 22:12:46 +0100 1f790a1147ad9a5fe06987d84b6cd71f91cbec4b Make Span size type unsigned +c 2020-05-12 22:12:46 +0100 ab303a16d114b1e94c6cf0e4c5db5389dfa197f6 Add Span constructors for arrays and vectors +c 2020-05-12 22:12:46 +0100 bb3d38fc061d8482e68cd335a45c9cd8bb66a475 Make pointer-based Span construction safer +c 2020-05-12 22:19:40 +0100 2676aeadfa0e43dcaaccc4720623cdfe0beed528 Simplify usage of Span in several places +c 2020-05-12 23:33:18 +0100 2896c412fadbc03916a33028f4f50fd87ac48edb Do not answer GETDATA for to-be-announced tx +pr 2020-05-13 08:19:05 +0100 219c55da752dc48dd885c895f3998f3bc263fd93 Merge #16710: build: Enable -Wsuggest-override if available +pr 2020-05-13 09:13:06 +0100 8d17f8dc17732c16344dfd035207ce095a403d6e Merge #18578: gui: Fix leak in CoinControlDialog::updateView +pr 2020-05-13 09:15:32 +0100 246e878e784584dd0d323a612007dfdafddeba42 Merge #18894: gui: Fix manual coin control with multiple wallets loaded +pr 2020-05-13 10:36:06 +0100 a33901cb6d82e2f75aab67f80a8852b7e6e9817a Merge #18814: rpc: Relock wallet only if most recent callback +c 2020-05-13 14:02:38 +0100 1122817c194ed49abf896e68604e725c3b5c8569 qt: Remove QFont warnings with QPA=minimal +c 2020-05-13 14:14:04 +0100 da73f1513a637a9f347b64de66564d6cdb2541f8 qt: Fix shutdown when waitfor* cmds are called from RPC console +pr 2020-05-13 14:17:07 +0100 6c647c89db286edb26c140a46e73306e31f1ba91 Merge #18738: build: Suppress -Wdeprecated-copy warnings +pr 2020-05-13 14:52:58 +0100 99c03728c07ce8d51b971ae7a508d428b4c24ea4 Merge #18878: test: Add test for conflicted wallet tx notifications +pr 2020-05-13 18:35:25 +0100 5d18c0ae18272f371fe44c62a43574288719ed7e Merge #18862: Remove fdelt_chk back-compat code and sanity check +pr 2020-05-13 19:14:51 +0100 fc895d7700f9092d519b43000f412c1283e44d25 Merge #18616: refactor: Cleanup clientversion.cpp +pr 2020-05-13 19:30:39 +0100 51825aea7fa068877ea77e3121def58005df3510 Merge #18922: gui: Do not translate InitWarning messages in debug.log +pr 2020-05-13 20:36:10 +0100 a9a6d946e41b459d3d04ab79df85ce0b31304948 Merge #18888: test: Remove RPCOverloadWrapper boilerplate +pr 2020-05-13 21:20:13 +0100 04c09553d89809cf6328679d7535ecaa0070485d Merge #18887: build: enable -Werror=gnu +c 2020-05-13 21:20:13 +0100 691c817b340d10e806dc3b1834d2a8fcc5e681fd Add util::Ref class as temporary alternative for c++17 std::any +cr 2020-05-13 21:20:13 +0100 6fca33b2edc09ed62dab2323c780b31585de1750 refactor: Pass NodeContext to RPC and REST methods through util::Ref +c 2020-05-13 21:20:13 +0100 b3f7f375efb9a9ca9a7a4f2caf41fe3df2262520 refactor: Remove g_rpc_node global +c 2020-05-13 21:20:13 +0100 ccb5059ee89f6e8dc31ba5b82830b384890bb65e scripted-diff: Remove g_rpc_node references +c 2020-05-14 00:57:50 +0100 fab6d060ce5f580db538070beec1c5518c8c777c test: Add unregister_validation_interface_race test +cr 2020-05-14 00:57:55 +0100 fa770ce7fe67685c43780e219d8232efbee0bb8e validationinterface: Rework documentation, Rename pwalletIn to callbacks +c 2020-05-14 00:58:11 +0100 fa5ceb25fce2200edf6b8ebfa6d4f01ed6774b95 test: Remove UninterruptibleSleep from test and replace it by SyncWithValidationInterfaceQueue +c 2020-05-14 00:58:20 +0100 7777f2a4bb1f9d843bc50a4e35085cfbb2808780 miner: Avoid stack-use-after-return in validationinterface +c 2020-05-14 02:46:18 +0100 e8a8cff07c409c7eecd478d3df36c7ba92c59730 build: enforce minimum required Windows version (7) +c 2020-05-14 07:36:27 +0100 061acf62a15ad3dbb9f055b7c2569b9832ed623a scripts: no-longer check for 32 bit windows in security-check.py +c 2020-05-14 07:36:27 +0100 13f606b4f940e5820ff21ea62fc27a5a91774b05 scripts: remove NONFATAL from security-check.py +c 2020-05-14 08:29:58 +0100 83d063e9541cc9ea41ea86919eb9435c73efb14e scripts: add run_command to security-check.py +c 2020-05-14 08:30:52 +0100 eacedfb0230978748cbcfb13817fed7e7c756ba7 scripts: add additional type annotations to security-check.py +pr 2020-05-14 13:40:55 +0100 b9c504cbc4ba45a32abb86b67a277b75a17f13a4 Merge #18742: miner: Avoid stack-use-after-return in validationinterface +c 2020-05-14 14:36:51 +0100 facede18a42ccbf45cb5156bd4e5c9cabb359821 test: Check that invalid witness destinations can not be imported +c 2020-05-14 17:40:57 +0100 050e2ee6f28e7b31c167013be7313726e34084e9 test: Remove const to work around compiler error on xenial +pr 2020-05-14 18:26:17 +0100 4dd2e5255a7f78901dacc5a6d33dbc201e17df96 Merge #18946: rpcwallet: Replace boost::optional::emplace with simple assignment of T{} +pr 2020-05-14 19:00:06 +0100 2d7489be8f77b3b57d75b6f3a8bba372dda37c89 Merge #18796: scripts: security-check.py refactors +pr 2020-05-14 19:43:45 +0100 553bb3fc3d953e00770c11e25d20ecd0efe041e6 Merge #18962: net processing: Only send a getheaders for one block in an INV +c 2020-05-14 19:45:42 +0100 b74f3d6c452d9ad7013c70a91216220917978f66 tests: Fill fuzzing coverage gaps for functions in consensus/validation.h +c 2020-05-14 19:45:42 +0100 c0bbf8193d92ba85d62092c4fd886ff4461f65bf tests: Fill fuzzing coverage gaps for functions in primitives/block.h +cr 2020-05-14 19:52:57 +0100 cd34038cbda4864e4770734c44b18d3e01aa2a28 Switch from Optional to std::optional (C++17). Run clang-format. +c 2020-05-14 19:52:57 +0100 fb559c1170773360afb9d05daaccd57d18636ee9 tests: Fill fuzzing coverage gaps for functions in util/translation.h +pr 2020-05-15 01:05:45 +0100 e2f6866cca3e0c3c74f94f2df50ed3243158ea32 Merge #18975: test: Remove const to work around compiler error on xenial +pr 2020-05-15 13:58:49 +0100 951870807ea28e05cf074e364e1b55e985ab9f6d Merge #18781: Add templated GetRandDuration<> +cr 2020-05-15 14:23:55 +0100 b604c5c8b5892842f13dee89ae31812a28ab25d1 wallet: Minimal fix to restore conflicted transaction notifications +c 2020-05-15 20:19:10 +0100 5fa067a27d709a8a24b798cbd2459bf5b291c885 Remove unnecessary blockfile SetPos +c 2020-05-15 23:00:04 +0100 45f2f6a0e8514a0438a87554400bf73cbb90707f Determine inactive HD seeds from key metadata and track them in LegacyScriptPubKeyMan +c 2020-05-15 23:00:10 +0100 1ed52fbb4d81f7b7634fd4fb6d1d00e1478129dc Remove IBD check in sethdseed +c 2020-05-15 23:00:10 +0100 b1810a145a601a8064e4094350cfb6ddafbdb4d8 Test that keys from inactive seeds are generated +c 2020-05-15 23:00:10 +0100 c93082ece40b1c72f05b3e2085c022c09eaa4d65 Generate new keys for inactive seeds after marking used +pr 2020-05-16 11:14:45 +0100 5a454d78825f7ff7efaa52eddf8eb1503931b64f Merge #18634: ci: Add fuzzbuzz integration configuration file +pr 2020-05-16 11:16:47 +0100 f8123d483caaee64c28be77fb5b6ae12293ddc4a Merge #18952: test: avoid os-dependant path +c 2020-05-16 15:37:43 +0100 fa9f20b6477a206adf5089398803b45d1a114b6f log: Properly log txs rejected from mempool +pr 2020-05-17 13:19:39 +0100 dc5333d31f280e09bb1e8cdacfbe842f4ab9e69b Merge #18938: tests: Fill fuzzing coverage gaps for functions in consensus/validation.h, primitives/block.h and util/translation.h +c 2020-05-17 15:24:16 +0100 facdeea2b25ef36e37b6ada58ea390a72d11a4b2 net: Remove un-actionable TODO +c 2020-05-17 15:26:19 +0100 fabea6d404571d046365f4f083da3569d2cbf4f7 net: Run clang-format on protocol.h +c 2020-05-17 15:52:31 +0100 4444dbf4d5047dd1c92973f7167a74a0779e61a3 gui: Remove un-actionable TODO +c 2020-05-17 16:33:09 +0100 0ea5d70b4756f376342417e0019490233cb4a918 Updated comment for the condition where a transaction relay is denied +c 2020-05-17 17:39:26 +0100 fa243be1dc49385fff847f8a784c7a9c9f07c939 log: Remove "No rpcpassword set" from logs +c 2020-05-18 01:52:11 +0100 d16006960443c2efe37c896e46edae9dca86c57d [wallet] remove nLastResend logic +cr 2020-05-18 16:48:04 +0100 784ae096259955ea7a294114f5c021c9489d2717 test: Add capability to disable RPC timeout in functional tests. +c 2020-05-18 16:48:40 +0100 38c3dd9c706e7e84b2a4dbaf1424a3f1c3b694fc docs: Add notes on how to diasble rpc timeout in functional tests while attatching gdb. +c 2020-05-18 17:54:07 +0100 0187d4c118ab4c0f5c2d4fb180c2a8dea8ac53cf [indexes] Add compact block filter headers cache +c 2020-05-18 23:13:49 +0100 458992b06d80eb568141f60a33d38e12e894e27a Prevent UB in DeleteLock() function +cr 2020-05-18 23:14:07 +0100 58e6881bc5be002e8ddbc9b75422c0deae66a2df refactor: Refactor duplicated code into LockHeld() +cr 2020-05-18 23:14:07 +0100 8d8921abd35c3ac1b8ebacb11de8e1bbc7b28d66 refactor: Add LockStackItem type alias +c 2020-05-18 23:14:07 +0100 f511f61dda4e860079153d5e51d64658cc265283 refactor: Add LockPair type alias +c 2020-05-18 23:14:08 +0100 26c093a9957756f3743c2347fe0abd90f81159c4 Replace thread_local g_lockstack with a mutex-protected map +c 2020-05-19 00:39:33 +0100 1df77014d8bb733d7d89e36b28671cb47f436292 refactor: Remove unused bool parameter in BlockNotifyGenesisWait() +c 2020-05-19 00:39:45 +0100 2bec309ad6d0f2543948d64ed26f7d9a903f67e5 refactor: Remove unused bool parameter in RPCNotifyBlockChange() +c 2020-05-19 00:49:32 +0100 1dab574edf57ccd6cdf5ec706ac328c62142d7a2 refactor: Pass SynchronizationState enum to GUI +c 2020-05-19 00:49:48 +0100 3c709aa69d5bb5a1564c339a0e6a16bac8f02c98 refactor: Remove Node::getReindex() call from GUI +pr 2020-05-19 01:01:13 +0100 362f9c60a54e673bb3daa8996f86d4bc7547eb13 Merge #18986: tests: Add capability to disable RPC timeout in functional tests +c 2020-05-19 01:01:42 +0100 06d519f0b43ed16252428e935d3aeb5a38f582e0 qt: Add SynchronizationState enum to signal parameter +cr 2020-05-19 01:01:53 +0100 a0d0f1c6c3d736bc0ee076b7f27a0ef59fd260bc refactor: Remove Node:: queries from GUI +cr 2020-05-19 01:38:54 +0100 fa006caa136f05a18428c792802523637d2234ca ci: tsan on clang-9 +cr 2020-05-19 01:38:56 +0100 faf552117efdd456fb17b1d9490896de3b7d67a4 ci: Set DEBIAN_FRONTEND=noninteractive +c 2020-05-19 07:33:02 +0100 de7c5f41aba860751ef7824245e6d9d5088a1200 wallet/wallet.h: Remove mutexScanning which was only protecting a single atomic bool +c 2020-05-19 07:33:10 +0100 479c5846f7477625ec275fbb8a076c7ef157172b rpc/blockchain.cpp: thread safety annotations for latestblock +c 2020-05-19 07:33:10 +0100 8b5af3d4c1270267ad85e78f661bf8fab06f3aad net: fMsgProcWake use LOCK instead of lock_guard +c 2020-05-19 07:33:10 +0100 a7887899480db72328784009181d93904e6d479d test/checkqueue_tests: thread safety annotations +pr 2020-05-19 08:18:06 +0100 c73bd004ae81d5a34f429659957d8c01c6066d28 Merge #18861: Do not answer GETDATA for to-be-announced tx +pr 2020-05-19 08:41:21 +0100 042ff521421fc9a860b4a3e3a7d214bd9a23169f Merge #18999: log: Remove "No rpcpassword set" from logs +pr 2020-05-19 09:10:23 +0100 e7736854ef6c8c69e38c852668c3d58d09f4d712 Merge #19008: ci: tsan on clang-9 +pr 2020-05-19 13:35:02 +0100 d44dd513226ff8c45d25425d1b689cdceb7282ea Merge #18152: qt: Use SynchronizationState enum for signals to GUI +pr 2020-05-19 13:54:23 +0100 aa8d76806c74a51ec66e5004394fe9ea8ff0fac4 Merge #17946: Fix GBT: Restore "!segwit" and "csv" to "rules" key +c 2020-05-19 15:37:15 +0100 fa83b39ff3ae3fbad93df002915c0e5f99c104a9 init: Remove confusing and redundant InitError +cr 2020-05-19 15:41:30 +0100 fa12a37b27f0570a551b8c103ea6537ee4a8e399 test: Replace inline-comments with logs, pep8 formatting +c 2020-05-19 15:41:44 +0100 faf45d1f1f997c316fc4c611a23c4456533eefe9 http: Avoid crash when g_thread_http was never started +c 2020-05-19 17:32:27 +0100 d0a3feea73e0751f325ef7f1de20fa668f27332e Change docs for walletcreatefundedpsbt RPC method +c 2020-05-19 22:23:13 +0100 a7ebe48b94c5a9195c8eabd193204c499cb4bfdb [rpc] add unbroadcast info to mempool entries and getmempoolinfo +c 2020-05-19 22:23:19 +0100 9d3f7eb9860254eb787ebe2734fd6a26bcf365c1 [mempool] sanity check that all unbroadcast txns are in mempool +c 2020-05-19 22:24:27 +0100 651f1d816f054cb9c637f8a99c9360bba381ef58 [test] wait for inital broadcast before comparing mempool entries +cr 2020-05-19 22:30:30 +0100 f9ee0f37c28f604bc82dab502ce229c66ef5b3b9 Add comments to CustomUintFormatter +c 2020-05-19 23:57:09 +0100 fa2ca0cbdde5c6c5e407ec037e52e3f6315a0b37 test: Fix intermittent failure in feature_dbcrash +c 2020-05-20 00:12:41 +0100 fab908f18a080912a0e833f12cccc27f27662e3b test: Fix intermittent ETIMEDOUT on FreeBSD +pr 2020-05-20 03:15:32 +0100 0aa2ff0f660ec7fec532b5f33850219bad5104dd Merge #18956: build: enforce minimum required Windows version (7) +pr 2020-05-20 10:09:29 +0100 a587f85853ecf86994bb3d463c32801e2e82d363 Merge #18587: gui: Avoid wallet tryGetBalances calls in WalletModel::pollBalanceChanged +pr 2020-05-20 12:25:04 +0100 bd5ec7c5284d839d403a0b859b4e6ef0ee50bcbc Merge #19006: rpc: Avoid crash when g_thread_http was never started +pr 2020-05-20 12:27:53 +0100 e20e964cb1ab78ac2fef3fd8871fcabc4b2c5afb Merge #18996: net: Remove un-actionable TODO +pr 2020-05-20 12:30:29 +0100 448bdff26307981b7e32ba5610dad6674c1fe46d Merge #18317: Serialization improvements step 6 (all except wallet/gui) +cr 2020-05-20 13:27:07 +0100 fa8bbb1368be0f3fd9cc4446aead3f4c2188a4ab net: Use C++11 member initialization in protocol +cr 2020-05-20 18:11:16 +0100 f852761aec81ed23c7b9e4546c08d1ef303f2507 guix: Add clarifying documentation for V env var +c 2020-05-20 18:16:41 +0100 65c589e45e8b8914698a0fd25cd5aafdda30869c Convert Qt to new serialization +pr 2020-05-20 20:11:51 +0100 3eda7ea9ba724bfa53ad6f4f63af85fccb46da00 Merge #18764: refactor: test: replace inv type magic numbers by constants +c 2020-05-20 22:56:08 +0100 60ed33904cf974e8f3c1b95392a23db1fe2d4a98 tests: implement base58_decode +pr 2020-05-21 08:09:48 +0100 17df15efb5461d99adeb545140173513ca484180 Merge #18958: guix: Make V=1 more powerful for debugging +pr 2020-05-21 08:34:25 +0100 97b21b302a117dc8ef8334a5f3c94f6a6b9eeff0 Merge #18677: Multiprocess build support +cr 2020-05-21 09:23:48 +0100 29f2cbdeb7afdde87d108adf80cffad17d112632 cli: extract connection exception handler, -rpcwait logic +c 2020-05-21 09:24:17 +0100 743077544b5420246ef29e0b708c90e3a8dfeeb6 cli: lift -rpcwallet logic up to CommandLineRPC() +c 2020-05-21 09:24:20 +0100 9f01849a498a70616506bdcda8ce6897aa29e664 cli: create GetWalletBalances() to fetch multiwallet balances +c 2020-05-21 09:24:23 +0100 afce85eb994384246e455b766549c3206cb059e0 cli: use GetWalletBalances() functionality for -getinfo +c 2020-05-21 09:24:26 +0100 903b6c117f541ea9258d3234ffcf59427344e668 rpc: drop unused JSONRPCProcessBatchReply size arg, refactor +c 2020-05-21 09:24:30 +0100 5edad5ce5d3f15b694bf3fad0300c6446674b554 test: add -getinfo multiwallet functional tests +pr 2020-05-21 11:53:39 +0100 25ad2c623af30056ffb36dcd203a52edda2b170f Merge #18740: Remove g_rpc_node global +cr 2020-05-21 12:47:46 +0100 faf1c3cc58d14f86ba5364e6ee5c8ef29cac2e26 test: Replace TEST_PREVIOUS_RELEASES env var with test_framework option +c 2020-05-21 12:48:06 +0100 fad798be76dd5e330463c837fda768477d536078 test: Default --previous-releases to false if dir is empty +c 2020-05-21 13:13:00 +0100 fa4ea997b4da1ae0afafba223fff9efbeefaf555 init: Setup scheduler in tests and init in exactly the same way +c 2020-05-21 13:13:23 +0100 99993489da9bc003b823bcab10e5f5297b369431 test: Set -logthreadnames in unit tests +pr 2020-05-21 14:00:25 +0100 cfe22a5f9e1d9e2d3dc8ce177e6c8eb04bc96615 Merge #18530: Add test for -blocksonly and -whitelistforcerelay param interaction +cr 2020-05-21 14:55:51 +0100 fa7b626d7a150e5cbd4d163d2dab6f8a55fc2cc4 node: Add chainman alias for g_chainman +c 2020-05-21 14:55:58 +0100 fa05fdf0f19fa4b557cc5e9ba436e3215b83c4e6 net: Pass chainman into PeerLogicValidation +cr 2020-05-21 14:55:59 +0100 fa84b1cd846f6499b741710fd478ec9ad49b5120 validation: Make LoadBlockIndex() a member of ChainstateManager +cr 2020-05-21 14:56:16 +0100 fa1d97b25686a5caca623599f6d608fd08616fe8 validation: Make ProcessNewBlock*() members of ChainstateManager +cr 2020-05-21 14:56:16 +0100 fa24d4909864096934577abc26cfa9be47f634ba validation: Make PruneOneBlockFile() a member of ChainstateManager +c 2020-05-21 14:56:25 +0100 fab6b9d18fd48bbbd1939b1173723bc04c5824b5 validation: Mark g_chainman DEPRECATED +pr 2020-05-21 15:58:28 +0100 741816936441210e7f7e4bcf00300d83aa950481 Merge #18997: gui: Remove un-actionable TODO +pr 2020-05-21 16:27:27 +0100 99e5e21b38bc0a5b26a53b84b5435b7abd1a7803 Merge #19023: test: Fix intermittent ETIMEDOUT on FreeBSD +pr 2020-05-21 16:44:03 +0100 fed1a9043fdf802c7cf7eab1c8aab25ca1c90e8d Merge #19020: net: Use C++11 member initialization in protocol +c 2020-05-21 17:40:31 +0100 c57f03ce1741b38af448bec7b22ab9f8ac21f067 refactor: Replace const char* to std::string +pr 2020-05-21 18:34:29 +0100 4479eb04d92806633aa3ad3e413f6a7166863638 Merge #18960: indexes: Add compact block filter headers cache +pr 2020-05-21 19:50:25 +0100 9abed46871a7f44277a0a59c645a8593ce9e5628 Merge #16946: wallet: include a checksum of encrypted private keys +pr 2020-05-22 00:51:51 +0100 ad3a61c5f5c9eebff98ee59c8cc4612c1affa046 Merge #18895: p2p: unbroadcast followups: rpcs, nLastResend, mempool sanity check +pr 2020-05-22 02:48:26 +0100 ccd85b57af60d7034db372b9501d059fbc5941e4 Merge #17681: wallet: Keep inactive seeds after sethdseed and derive keys from them as needed +pr 2020-05-22 03:21:56 +0100 df303ceb650521dc7b1ba91e0eea383c387a5860 Merge #18787: wallet: descriptor wallet release notes and cleanups +c 2020-05-22 03:43:58 +0100 0122fbab4c340b23ae56173de6c5ab866ba25ab8 Split SetHDChain into AddHDChain and LoadHDChain +c 2020-05-22 04:01:24 +0100 d9cd095b5965fc20c09f401370e7ba99446663e3 Split SetActiveScriptPubKeyMan into Add/LoadActiveScriptPubKeyMan +pr 2020-05-22 11:29:37 +0100 b5c423c48e094bd098e11c3d1f57acae7502a4da Merge #19014: test: Replace TEST_PREVIOUS_RELEASES env var with test_framework option +c 2020-05-22 13:45:21 +0100 90eb027204f5a9d7c00fa97d4112243bd37a9012 doc: Add and fix comments about never destroyed objects +c 2020-05-22 16:15:46 +0100 6a239e72eb403d3ac5c7db203c5b3a24ef49a48b tests: Don't limit fuzzing inputs to 1 MB for afl-fuzz (now: ∞ ∀ fuzzers) +c 2020-05-22 16:59:58 +0100 3bdc7c2d3977a7864aacea80bffc4df7f37cac51 [doc] Add comment for m_headers_cache +c 2020-05-22 16:59:58 +0100 5308c97ccaf0955e5840956bc1636108a43e6f46 [test] Add test for cfheaders +c 2020-05-22 16:59:58 +0100 f6b58c150686e90bc4952976e488b1605f3ae02a [net processing] Message handling for getcfheaders. +c 2020-05-22 20:52:37 +0100 fa7fc5a8e0fcf9ca81e84b3631f18ae40502be60 rpc: factor out RpcInterruptionPoint from dumptxoutset +c 2020-05-22 20:53:50 +0100 fa756928c3f455943086051c5fe1d5bb09962248 rpc: Make gettxoutsetinfo/GetUTXOStats interruptible +cr 2020-05-22 21:30:07 +0100 7eaf86d3bfc83f2beb3ef449707d5156853126fb trivial: Suggested cleanups to surrounding code +pr 2020-05-22 22:43:20 +0100 fa3288cda12537b2e99a3cc7e14dfff3e944884f Merge #19052: tests: Don't limit fuzzing inputs to 1 MB for afl-fuzz (now: ∞ ∀ fuzzers) +c 2020-05-23 08:14:18 +0100 ea9fcfd1305f92a7c3ca4d3c05951ceba1b6b05b doc: Drop protobuf stuff +c 2020-05-23 11:22:29 +0100 69bfcac27a83440092bc6e61904ded910ed4baf4 gui: update Qt base translations for macOS release +pr 2020-05-23 12:03:40 +0100 492cdc56e087c7f51f3d1e3f807191da7f9d9a07 Merge #19058: doc: Drop protobuf stuff +pr 2020-05-23 12:58:13 +0100 793e0ff22cbace2a0fbe1e4a2e88a7bc6bf44502 Merge #18698: Make g_chainman internal to validation +pr 2020-05-23 13:17:38 +0100 24f70290642c9c5108d3dc62dbe055f5d1bcff9d Merge #18594: cli: display multiwallet balances in -getinfo +c 2020-05-23 14:40:49 +0100 fab47375fe0bdec1e557e087fdb0707c4dfa7cc2 test: pep-8 p2p_getdata.py +cr 2020-05-23 14:47:10 +0100 73d8ef72742ab9193e9e95158b26176bfaab3f66 qt: Add BitcoinUnits::formatWithPrivacy() function +c 2020-05-23 14:51:03 +0100 999922baed3a80b581ce46daa01c4cbca4fcbfd8 test: Default mininode.wait_until timeout to 60s +c 2020-05-23 15:01:10 +0100 fa80b4788bbe3ef00c5d767c0d89ba9809d8707c test: Remove global wait_until from p2p_getdata +cr 2020-05-24 00:02:04 +0100 2f867203b0c7a4438ce484be4cfa2b29dbf1abf0 Added best block hash to the NotifyHeaderTip and NotifyBlockTip signals. +c 2020-05-24 00:02:10 +0100 a06e845e826acaeb0db7cf02b2519c177e94dee5 BlockTip struct created and connected to notifyHeaderTip and notifyBlockTip signals. +c 2020-05-24 18:34:52 +0100 ef17c03e074b6c3f185afa4eff572ba687c2a171 Convert wallet to new serialization +c 2020-05-24 18:35:00 +0100 71f016c6eb42e1ac2c905e04ba4d20c2009e533f Remove old serialization primitives +c 2020-05-24 18:35:00 +0100 92beff15d3ae2646c00bd78146d7592a7097ce9c Convert LimitedString to formatter +cr 2020-05-25 11:05:06 +0100 f9b22e3bdb54acb2f830b3ebbad47ff17dfb5781 tests: Add fuzzing harness for CCoinsViewCache +c 2020-05-25 17:36:48 +0100 c87770915b88d195d264b58111c64142b1965cfa wallettool: Add a salvage command +c 2020-05-25 17:37:53 +0100 cdd955e580dff99f3fa440494ed2b348f7f094af Add basic test for bitcoin-wallet salvage +c 2020-05-25 17:39:40 +0100 d321046f4bb4887742699c586755a21f3a2edbe1 wallet: remove -salvagewallet +c 2020-05-25 17:59:22 +0100 8ebcbc85c652665b78dcfd2ad55fa67cafd42c73 walletdb: don't automatically salvage when corruption is detected +c 2020-05-25 17:59:29 +0100 07250b8dcebe2b97ed0fd900ad35cba4091b8ecf walletdb: remove fAggressive from Salvage +cr 2020-05-25 17:59:29 +0100 2741774214168eb287c7066d6823afe5e570381d Expose a version of ReadKeyValue and use it in RecoverKeysOnlyFilter +c 2020-05-25 17:59:29 +0100 84ae0578b6c68dda145ca65fef510ce0fdac0d7b Add release notes about salvage changes +cr 2020-05-25 17:59:29 +0100 9ea2d258b46e8a9776100633585ed0feede5c2a4 Move RecoverDatabaseFile and RecoverKeysOnlyFilter into salvage.{cpp/h} +cr 2020-05-25 17:59:29 +0100 b426c7764d26e280e1f814cf36e050743c45cd12 Make BerkeleyBatch::Recover and WalletBatch::RecoverKeysOnlyFilter standalone +cr 2020-05-25 17:59:29 +0100 ced95d0e43389fe62b5d30fcc7c42dbca0e88242 Move BerkeleyEnvironment::Salvage into BerkeleyBatch::Recover +c 2020-05-25 17:59:29 +0100 ea337f2d0318a860f695698cfb3aa91c03ded858 Move RecoverKeysOnlyFilter into RecoverDataBaseFile +c 2020-05-25 19:27:06 +0100 00d44a534b4e5ae249b8011360c6b0f7dc731581 [test] P2P connection behavior should meet expectations +c 2020-05-25 19:27:06 +0100 ba5498318233ab81decbc585e9619d8ffe2df1b0 [test] Test that wallet transactions aren't rebroadcast before 12 hours +c 2020-05-25 19:27:06 +0100 bd093ca15de762fdaf0937a0877d17b0c2bce16e [test] updates to unbroadcast test +c 2020-05-25 19:27:06 +0100 dab298d9ab5a5a41685f437db9081fa7b395fa73 [docs] add release notes +c 2020-05-25 19:27:07 +0100 1f94bb0c744a103b633c1051e8fbc01e612097dc [doc] Provide rationale for randomization in scheduling. +c 2020-05-25 19:27:07 +0100 750456d6f29c63d57af05bfbdd6035bb9c965de2 [trivial] Remove misleading 'const' +c 2020-05-25 19:27:07 +0100 8f30260a67166a6ab7c0f33f7ec1990d3c31761e [doc] Update unbroadcast description in RPC results +c 2020-05-25 19:27:07 +0100 9c8a55d9cb0ec73f10b196e79b637aa601c0a6b7 [mempool] Don't throw expected error message when upgrading +c 2020-05-25 19:27:07 +0100 9e1cb1adf1800efe429e348650931f2669b0d2c0 [trivial/doc] Fix comment type +c 2020-05-25 19:27:07 +0100 fa32e676e5833a5c5fc735ef00c0a80f5fab7a2c [test] Manage node connections better in mempool persist test +pr 2020-05-26 01:55:22 +0100 14f8447777465ffc8eb644bad1dbc52362c4362f Merge #19059: gui: update Qt base translations for macOS release +pr 2020-05-26 12:27:00 +0100 7d32cce3e75b99ea7f7ec829b04945f9d2d898ce Merge #19010: net processing: Add support for getcfheaders +pr 2020-05-26 12:29:44 +0100 d3b0ef80f6533e58e1ce4a5cbdaa9919872033fa Merge #18867: tests: Add fuzzing harness for CCoinsViewCache +pr 2020-05-26 12:33:43 +0100 13397dc78fd6a6a57bdc91db66c51788603267bb Merge #19056: rpc: Make gettxoutsetinfo/GetUTXOStats interruptible +pr 2020-05-26 13:14:57 +0100 fe1357a03af108c41baa6bd31903f2cfb0d75ef5 Merge #18881: Prevent UB in DeleteLock() function +c 2020-05-26 14:23:15 +0100 e685ca19928eec4e687c66f5edfcfff085a42c27 util/system.cpp: add thread safety annotations for dir_locks +pr 2020-05-26 14:45:50 +0100 dcacea096e029a02a937bf96d002ca7e94c48c15 Merge #19032: Serialization improvements: final step +c 2020-05-26 15:05:51 +0100 b00266fe0cf05fe6044f471105ce2bfed4349626 refactor: replace pointers by references within tx_verify.{h,cpp} +cr 2020-05-26 16:31:51 +0100 5478d6c099e76fe070703cc5383cba7b91468b0f logging: thread safety annotations +c 2020-05-26 16:39:01 +0100 4c825792dd9f4eaf4936c3e376ac7a5c177528e2 Remove outdated comment about DER encoding +pr 2020-05-26 18:06:12 +0100 4af01b37d40246cd1fdb54719855927e36a36b46 Merge #19060: test: Remove global wait_until from p2p_getdata +c 2020-05-26 22:24:17 +0100 bb911ae7f5cbe4974ec61266d2334b95067fa49d [refactor] Pass CNode and CConnman by reference +c 2020-05-26 22:27:15 +0100 e535670726952e43483763dfca6fc6ec2f4b0691 [indexes] Fix default [de]serialization of BlockFilter. +c 2020-05-26 22:38:20 +0100 11106a4722558765a44ae45c7892724a73ce514c [net processing] Message handling for getcfilters. +c 2020-05-26 22:38:26 +0100 9e36067d8cd02830c7e5a88a391dff6ac3adbe0c [test] Add test for cfilters. +c 2020-05-26 22:54:49 +0100 fc6a637a013daeb14b2f93652d7f494f3b8462aa qt: increase console command max length +c 2020-05-27 00:56:43 +0100 5555d978b056ab0e0e59faaf2d2067ec43fffaef wallet: Make PeriodicFlush uninterruptible +pr 2020-05-27 03:51:49 +0100 520e435b5e56dec7e86b0e5dbc50e3906e586a82 Merge #18918: wallet: Move salvagewallet into wallettool +c 2020-05-27 07:02:00 +0100 1c91ffefcf54d22f805c86318ea32d23b9d20c96 doc : add link to readme.md in the first section +cr 2020-05-27 09:55:44 +0100 8d75115844baefe5cad4d82ec8dce001dd16eb9c qt: Add privacy feature to Overview page +pr 2020-05-27 10:51:05 +0100 48e114e0a86f0b3e97303333877d1c3086155c2f Merge #19061: doc: Add link to Visual Studio build readme +pr 2020-05-27 11:35:54 +0100 cffbf1eb9a4771034bda6f0a4faa2465e7640b2e Merge #19073: Remove outdated comment about DER encoding +pr 2020-05-27 12:16:10 +0100 9ccaee1d5e2e4b79b0a7c29aadb41b97e4741332 Merge #19004: refactor: Replace const char* to std::string +cr 2020-05-27 17:37:08 +0100 fab893e0caf510d4836a20194892ef9c71426c51 doc: Fix unrelated typos reported by codespell +c 2020-05-27 18:41:56 +0100 fa7b885f51ff848d3f913bc6e15d24528300c210 walletdb: Remove unsed boost/thread +c 2020-05-27 22:39:47 +0100 3d6603e340d6d461832f0aa204b04343d34af3d4 depends: Propagate well-known vars into depends +c 2020-05-27 22:39:48 +0100 2d4e48081382a58033ed5c3734a4ad810b56a963 depends: boost: Specify toolset to bootstrap.sh +c 2020-05-27 22:39:49 +0100 1ce74bcde341bbab538937544a0e4b4abccdc050 depends: boost: Split target-os from toolset +c 2020-05-27 22:39:51 +0100 0a33803f1c42c938cc7c6c5291ef1f9a1dfb491b depends: boost: Use clang toolset if clang in CXX +c 2020-05-27 22:39:52 +0100 f0d7ed10b48a6303d8b0cb6f2fc6b8652945bffb depends: Propagate only specific CLI variables to sub-makes +pr 2020-05-28 00:31:33 +0100 55b4c65bd1d829e799db7fe75fab88691830de43 Merge #16127: More thread safety annotation coverage +c 2020-05-28 07:13:19 +0100 4a7253ab6c3bb323581cea54573529c2f823f035 Remove g_rpc_chain global +cr 2020-05-28 07:13:19 +0100 e783197bf0f7429f80fea94b44c59857bc8cfef9 refactor: replace RegisterWalletRPCCommands with GetWalletRPCCommands +c 2020-05-28 07:54:09 +0100 79be4874209f71ba6428a80c40c9f028ac936c41 Add thread safety annotated wrapper for std::mutex +c 2020-05-28 07:54:24 +0100 dfb75ae49d4d617ec02188a6f449e8b8015ad467 refactor: Rename LockGuard to StdLockGuard for consistency with StdMutex +c 2020-05-28 07:55:04 +0100 971a468ccf0474ca00fa7d20278569b8fb11f0fb Use template function instead of void* parameter +c 2020-05-28 07:55:39 +0100 9cc6eb3c9e0eb1d5be26fb81cc5595c131fec8f4 Get rid of -Wthread-safety-precise warnings +c 2020-05-28 07:56:44 +0100 87766b355c47fcb0f0dcf3f6fe359eb00227d50c build: Replace -Wthread-safety-analysis with broader -Wthread-safety +c 2020-05-28 14:00:20 +0100 fa609c4f76f215c19ea4021e78c102dee2b8c3d1 scheduler: Remove unused REVERSE_LOCK +c 2020-05-28 14:00:56 +0100 fa9819695aac260be0ba170eb15ecba8cb519843 test: Remove unused scheduler.h include from the common setup +c 2020-05-28 14:21:43 +0100 357f02bf2942f2944a04a1ceaa687f89d5da7d28 Create a local class inherited from BasicTestingSetup with a localized args manager and put it into the getarg_tests namespace +c 2020-05-28 14:22:19 +0100 f871f15c9d760b56a6a3b78b3941d3983d60810c scripted-diff: replace gArgs with argsman +c 2020-05-28 14:39:41 +0100 47be28c8bc475eafeebd4fc58ea92f0d3df0d8c6 validation: use std::chrono in CChainState::FlushStateToDisk() +c 2020-05-28 14:43:36 +0100 789e9dd3aa727176797529c35b2848f994630a82 validation: use std::chrono in IsCurrentForFeeEstimation() +c 2020-05-28 15:22:36 +0100 fab2950d703217ec34b27e677e4f33ebbf99ca08 doc: Switch boost::thread to std::thread in scheduler +c 2020-05-28 15:22:57 +0100 fa9cca0550f3d0ee8c276146f40007f76fbb97c2 doc: Remove unused documentation about unimplemented features +pr 2020-05-28 15:47:50 +0100 082a417abcce6a2d6e0a52ccad5cca9657cec64b Merge #18635: Replace -Wthread-safety-analysis with broader -Wthread-safety +pr 2020-05-28 16:55:20 +0100 ea3e9e0b84c57df4110ca9e5ccced65c5bbe4611 Merge #18700: Fix locking on WSL using flock instead of fcntl +cr 2020-05-28 16:58:54 +0100 100000d1b2c2e38d7a14a31b0af79e0e4316b04c doc: Add headings to CONTRIBUTING.md +cr 2020-05-28 16:59:07 +0100 fae2fb2a196ee864e9a13fffc24a0279cd5d17e6 doc: Expand section on Getting Started +cr 2020-05-28 16:59:20 +0100 facef3d4131f9980a4516282f11731361559509c doc: Explain that anyone can work on good first issues, move text to CONTRIBUTING.md +c 2020-05-28 18:26:18 +0100 cc29d1e2c46e01c544ef44c79d72b7bcc5d39ba7 [tools] Update clang-format config +c 2020-05-28 18:35:42 +0100 399d84da3708719b063953107bab0f5f6493addb build: Only allow ASCII identifiers +c 2020-05-28 19:56:47 +0100 79b0a69e09c1a912122e6431ea3c530cc292c690 Add missing QPainterPath include +c 2020-05-29 00:28:21 +0100 fac43f9889f500bcb62d830c030dec42fe791031 scheduler: Replace stop(true) with StopWhenDrained() +c 2020-05-29 00:28:43 +0100 fa3d41b5ab8fe62bc2e36c3e1211aace69e6da65 doc: Switch scheduler to doxygen comments +pr 2020-05-29 01:42:57 +0100 fc1fb4dd7c05f32b5c1ee6116ff840c3a1c3492e Merge #19094: build: Only allow ASCII identifiers +pr 2020-05-29 02:27:26 +0100 adc143fc2b9ab75837776046064fb1d714645d28 Merge #19097: qt: Add missing QPainterPath include +pr 2020-05-29 07:55:16 +0100 5f75c5e7df14f1a8296b5565372a39e8433ef0ad Merge #16432: qt: Add privacy to the Overview page +pr 2020-05-29 09:02:26 +0100 343169998193bac57581493dcbdf6d1e10617ef1 Merge #17597: qt: Fix height of QR-less ReceiveRequestDialog +pr 2020-05-29 09:19:44 +0100 c2c15ea54eb1c8f99b96cd90a4a383fbdc0d625a Merge #17908: qt: Remove QFont warnings with QT_QPA_PLATFORM=minimal +pr 2020-05-29 09:23:08 +0100 a9024a42fcece274c094cc537275ab0c55bbce15 Merge #17918: qt: Hide non PKHash-Addresses in signing address book +pr 2020-05-29 09:29:14 +0100 0d5c18204b73ccb0d7c07f90c52de31edc25e28e Merge #17956: gui: Disable unavailable context menu items in transactions tab +pr 2020-05-29 09:30:36 +0100 beb3844c45c57cdc0ae715c8fe22e1c310d82662 Merge #17968: qt: Ensure that ModalOverlay is resized properly +pr 2020-05-29 10:01:09 +0100 f4b603cff63aea798a55e7a129edf8324f8e19b1 Merge #17993: gui: Balance/TxStatus polling update based on last block hash. +pr 2020-05-29 10:06:08 +0100 de369c7ea57745fbbbab5c7ba3ec8ab48f9e3ec5 Merge #18165: Consolidate service flag bit-to-name conversion to a shared serviceFlagToStr function +pr 2020-05-29 10:09:09 +0100 d7f5e01e30938c586c3279c91914add94eeb239c Merge #18424: qt: Use parent-child relation to manage lifetime of OptionsModel object +pr 2020-05-29 11:24:09 +0100 73407ff65cefa29ce522cb3cb43898497e8afa30 Merge #16939: p2p: Delay querying DNS seeds +pr 2020-05-29 13:42:48 +0100 f2e2c5ebcccf8d656b850c28452e6e652934f36b Merge #14988: wallet: Fix for confirmed column in csv export for payment to self transactions +pr 2020-05-29 14:49:46 +0100 e4bfd51acc111c27f8a808756f88738b02388c38 Merge #18452: qt: Fix shutdown when waitfor* cmds are called from RPC console +c 2020-05-29 16:05:47 +0100 4f49d5222eca11c149713ad34113d5a3d1c577b1 gui, refactor: Register Qt meta types in application constructor +pr 2020-05-29 16:28:00 +0100 c19fd96694d15966f1cc83c43bae2746b92d3149 Merge #19022: test: Fix intermittent failure in feature_dbcrash +cr 2020-05-29 17:07:48 +0100 5cb7ee67a5c0e5da39eb698b64d23722fb2f7b3e net: improve code documentation for dns seed behaviour +c 2020-05-29 17:44:22 +0100 c571ecb07145b4ce8c17ca80489f8f1497388c4d tests: Add fuzzing helper functions ConsumeDataStream, ConsumeTxDestination and ConsumeUInt160 +cr 2020-05-29 17:49:26 +0100 fbacad1880341ace31f669530c66d4e322d19235 util: simplify the interface of serviceFlagToStr() +c 2020-05-29 17:59:37 +0100 189ae0c38b7d4927c5c73b94664e9542b2b06ed9 util: dedup code in callers of serviceFlagToStr() +pr 2020-05-29 18:43:08 +0100 8ad5f1c376fe99eeccac2696ac0e18e662323a4d Merge #19106: util: simplify the interface of serviceFlagToStr() +pr 2020-05-29 19:23:43 +0100 cb88de3e3d37842199a17ba3d36838fc69fbe573 Merge #18926: test: Pass ArgsManager into getarg_tests +c 2020-05-29 20:33:54 +0100 fad21a1a7aa8804f4699e5821f074f5d3845c78b test: Explain that a bug should be filed when the test fail +c 2020-05-29 22:22:07 +0100 fa9c67559186f5416c1c0b26c0a1d5e72c234ccb Limit scope of all global std::once_flag +cr 2020-05-29 23:17:18 +0100 fa1433ac1be8481f08c1a0a311a6b87d8a874c6a rpc: Remove special case for unknown service flags +pr 2020-05-30 04:15:10 +0100 98ebe7896dabbdfc787dfdb83277ba3de22e318f Merge #18820: build: Propagate well-known vars into depends +cr 2020-05-30 11:37:01 +0100 43fb8f0ca331a7f79f0d287817da7f4b894bdbfa tests: Add fuzzing harness for functions in script/bitcoinconsensus.h +c 2020-05-30 11:37:01 +0100 8de72711c685e638fa54d485694fb1b1af024adc tests: Fill fuzzing coverage gaps for functions in script/script.h, script/script_error.h and script/standard.h +cr 2020-05-30 11:37:01 +0100 c91d2f06150cda258a17e78d9b7065b594d34a85 tests: Add fuzzing harness for functions in script/sigcache.h +cr 2020-05-30 11:37:01 +0100 d3d8adb79fbe34b15cf29334607f9b76d303aa1a tests: Add fuzzing harness for functions in script/interpreter.h +cr 2020-05-30 11:37:01 +0100 f898ef65c947776750e49d050633f830546bbdc6 tests: Add fuzzing harness for functions in script/sign.h +cr 2020-05-30 11:37:01 +0100 fa80117cfdeca7e5d3a2a09b385c0e938bf701e9 tests: Add fuzzing harness for functions in script/descriptor.h +pr 2020-05-30 11:49:27 +0100 e478b11db0b12951a418ae94c9465eae200af55b Merge #19110: test: Explain that a bug should be filed when the tests fail +c 2020-05-30 13:32:29 +0100 fac2eeeb9d718bdb892eef9adf333ea61ba8f3d0 cirrus: Remove no longer needed install step +c 2020-05-30 13:32:33 +0100 fa2ffe87f794caa74f80c1c2d6e6067ee4849632 ci: Deduplicate DOCKER_EXEC +c 2020-05-30 13:32:58 +0100 fa0d5ee1126a8cff9f30f863eb8f5c78bf57e168 ci: Set halt_on_error=1 for tsan +cr 2020-05-30 13:33:02 +0100 fa10d850790bbe52d948659bb1ebbb88fe718065 ci: Use libc++ instead of libstdc++ for tsan +c 2020-05-30 13:33:06 +0100 fa906bf2988c799765a04c484269f890964ec3ee test: Extend tsan suppressions for clang stdlib +c 2020-05-30 13:33:44 +0100 fa0cc02c0a029133f080680ae9186002a144738f ci: Mute depends logs completely +pr 2020-05-30 17:22:09 +0100 826fe9c667118cc48ef000cd76e395e4cad4d6c1 Merge #18807: [doc / test / mempool] unbroadcast follow-ups +c 2020-05-30 17:28:07 +0100 fa861794d3a625defe5113d3333bfdfb030b2ae9 doc: Add release notes for 17219 +cr 2020-05-30 17:31:36 +0100 fac0ed16ec8677be6e09fa0f8c0ad296415670df doc: Sync "how to upgrade" with 0.20.0 release notes +pr 2020-05-30 17:33:49 +0100 dec067f5a019fbeea0403efcfc501238a114d095 Merge #18965: tests: implement base58_decode +cr 2020-05-31 12:36:22 +0100 eeeed51f58402f3afbd72dfc0f6d0a3de720c297 test: pep-8 wallet_hd +c 2020-05-31 12:51:44 +0100 fa7d3a88900a800c9eca81b238337d07825a3320 test: Add missing sync_blocks to wallet_hd +c 2020-05-31 15:52:06 +0100 fa563cef61e8a217c5e8ec059e174afae61087a5 test: Add more tsan suppressions +pr 2020-05-31 22:55:55 +0100 091cc4b94e009f7140493cd37798d447c6881e5e Merge #16564: test: Always define the raii_event_tests test suite +pr 2020-05-31 23:20:17 +0100 07d0e0d59f2557b6efc1453db58714edea0bc29f Merge #19044: net processing: Add support for getcfilters +c 2020-05-31 23:37:43 +0100 fa7c8509153bfd2d5b4dcff86ad27dfd73e8788b ci: Install llvm to get llvm symbolizer +c 2020-05-31 23:37:56 +0100 faf62e6ed0ca45db44c370844c3515eb5a8cda12 ci: Remove unused workaround +pr 2020-05-31 23:58:41 +0100 a65b55fa45d41761c3e67ac5107d284d6edc2525 Merge #18994: tests: Add fuzzing harnesses for functions in script/ +c 2020-06-01 00:54:00 +0100 f30960adc02877267cb6efeb378962ed96628741 gui: Add closeAllWallets to WalletController +c 2020-06-01 00:58:09 +0100 c4b574899abfa27f83c6948593838ed418c78f9c gui: Add Close All Wallets action +c 2020-06-01 03:58:42 +0100 b3fbc94d4f2937bb682f2766cc9a8d4fde328a3f Apply cfilters review fixups +c 2020-06-01 04:01:06 +0100 132b30d9c84f2a8053714a438f227b583a89a9ea [net] Signal NODE_COMPACT_FILTERS if we're serving compact filters. +c 2020-06-01 04:01:13 +0100 f5c003d3ead182335252558c5c6c9b9ca8968065 [test] Add test for NODE_COMPACT_FILTER. +pr 2020-06-01 08:38:57 +0100 a8327fd71f5ccc88f603e35a402bca8967dbcfed Merge #19072: doc: Expand section on Getting Started +pr 2020-06-01 09:07:05 +0100 9bc7751cadbd038faf8ac1d62cda23fcf00d4cc2 Merge #19115: doc: Add release notes for 17219 +cr 2020-06-01 14:08:36 +0100 cb00510dbac99b44f3f2cf6e58bb2e4401c5ef28 rpc: create rpc/mining.h, hoist default max tries values to constant +c 2020-06-01 16:14:43 +0100 f46b678acff0b2e75e26aa50b14d935b3d251a2a qt: lock cs_main, m_cached_tip_mutex in that order +c 2020-06-01 21:20:04 +0100 d15db4b1fc988736b08c092d000ca1d1ff686975 refactor: Fix unreachable code in init arg checks +c 2020-06-01 21:24:10 +0100 eea81146571480b2acd12c8cd7f36b04d056c47f build: Enable unreachable-code-loop-increment +c 2020-06-02 00:42:55 +0100 8b3136bd307123a255b9166aa42a497a44bcce70 refactor: replace CNode pointers by references within net_processing.{h,cpp} +cr 2020-06-02 07:03:02 +0100 bd7e530f010d43816bb05d6f1590d1cd36cdaa2c This PR adds initial support for type hints checking in python scripts. +c 2020-06-02 07:23:34 +0100 9be7fd35c5d631c2cc34d3b4fa63ae0a9d5a68ef rpc: make generatetoaddress locals const +c 2020-06-02 07:24:29 +0100 f7c65a33508c4bb8e9ed896e150a4fa529a243e5 cli: create GetNewAddress() +pr 2020-06-02 07:48:04 +0100 44307449f758b239fca0ad6b722bc36795ac6727 Merge #19104: gui, refactor: Register Qt meta types in application constructor +c 2020-06-02 07:50:36 +0100 f4185b26d9b2ff2e86c99cdfe3ad9be62bb6299a cli: create GenerateToAddressRequestHandler class +cr 2020-06-02 07:50:41 +0100 ff41a3690066081772b172f3c31a63f5fe6ea7ed cli: extract ParseResult() and ParseError() +c 2020-06-02 07:50:45 +0100 4818124137732540383a29835afa2be41aa55ca8 cli: create bitcoin-cli -generate command +cr 2020-06-02 07:50:48 +0100 18f93545a12db00180cea369a4b5cce7f10cd362 test: add tests for bitcoin-cli -generate +c 2020-06-02 07:50:51 +0100 4b859cfff9965eb07044f4d104398cb0e7ab127e cli: add multiwallet capability to GetNewAddress and -generate +cr 2020-06-02 07:50:54 +0100 bf53ebef061a563cfc4c5857f5d6bc93fb136282 test: add multiwallet tests for bitcoin-cli -generate +c 2020-06-02 07:50:57 +0100 22cb303cf099b430d602384bc92706ce01b4f98d rpc: add missing space in JSON parsing error message, update test +pr 2020-06-02 12:04:19 +0100 1f7fe59460db226f88a6f40baa56580cbf724ec8 Merge #19111: Limit scope of all global std::once_flag +c 2020-06-02 12:11:46 +0100 fa1c74fd0342b74d44cc4e41fff3890c1434e8f7 wallet: Remove unused boost::thread_interrupted +pr 2020-06-02 12:13:51 +0100 45a1489997a51c2188e841030f0d9eb3e8777032 Merge #19122: test: Add missing sync_blocks to wallet_hd +pr 2020-06-02 12:32:15 +0100 9e8bd217cd2a3437ce7c8fc7f04a61a3aee5268c Merge #13204: Faster sigcache nonce +c 2020-06-02 12:53:08 +0100 20d31bdd92cc2ad9b8d26ed80da73bbcd6016144 tests: Avoid fuzzer-specific nullptr dereference in libevent when handling PROXY requests +pr 2020-06-02 15:35:03 +0100 5879bfa9a541576100d939d329a2639b79d9e4f9 Merge #18792: wallet: Remove boost from PeriodicFlush +pr 2020-06-02 23:11:52 +0100 3657aee2d25ce1ffefc6817af3eead7120b1d755 Merge #18982: wallet: Minimal fix to restore conflicted transaction notifications +c 2020-06-02 23:16:07 +0100 faabc6e4459c394401a28c61ced8e85b07fa5d3d doc: Remove release notes of 0.20.1 release +c 2020-06-02 23:16:51 +0100 fa1a91657fcb210c7873da285f74a3442168192b doc: Add release-notes-0.20.0.md +c 2020-06-03 00:09:39 +0100 fa13c180c782e0795ff1262eb9ba6dd2f0bb8ddc doc: Move 0.21 fragments into the main release notes +pr 2020-06-03 04:04:00 +0100 657b82cef0e8e8695fc189d013a4353bdbebb041 Merge #19084: net: improve code documentation for dns seed behaviour +c 2020-06-03 09:06:36 +0100 0fef60c63d6d2f4df8e698936221e2330ef3a244 build: improved output of configure for build OS +c 2020-06-03 11:06:56 +0100 fa1d5800d9c5e33942b76f6667839a818723dee9 validation: Remove unused boost interruption_point +c 2020-06-03 11:06:58 +0100 fa3b4f9b8e54ec07aeb2e5e2333da3e784f7be12 validation: Make VerifyDB level 4 interruptible +pr 2020-06-03 12:05:06 +0100 42065518d937e036cce6b0ad21890f8fc2c50cfc Merge #19146: doc: Remove release note fragments of 0.20.1 release, Add release-notes-0.20.0 +pr 2020-06-03 12:23:41 +0100 0f55294cc165e52a87657d7b77614b27c996d638 Merge #18875: fuzz: Stop nodes in process_message* fuzzers +pr 2020-06-03 12:31:06 +0100 bdedfcf076a60c3a89bf1cc7f1ea50bc4e4eb897 Merge #18974: test: Check that invalid witness destinations can not be imported +pr 2020-06-03 14:55:32 +0100 575589a62e39520f7210f58bdef731933a3b88ab Merge #19041: ci: tsan with -stdlib=libc++-10 +c 2020-06-03 15:18:01 +0100 7daffc6a90a797ce7c365a893a31a31b0206985c [test] CScriptNum Decode Check as Unit Tests +pr 2020-06-03 15:19:52 +0100 234fabab90627eb9f93b03533c74f830b771f9ba Merge #18210: test: type hints in Python tests +pr 2020-06-03 15:58:27 +0100 fab7d954b261d74b369fe2a3c1785540c4f056b4 test: Make valgrind.supp work on aarch64 +pr 2020-06-03 18:13:54 +0100 a1c0e5fce13911252a135bdce4ffc09c24d23791 Merge #19088: validation: use std::chrono throughout some validation functions +pr 2020-06-04 03:44:34 +0100 b42bc33d2d4d32c11f8ad0aa812bb9b4d3ae3a5f Merge #19152: build: improve build OS configure output +pr 2020-06-04 04:02:34 +0100 76e64525ff38eaedccf8c2b847eccfffb69be27f Merge #19159: test: Make valgrind.supp work on aarch64 +pr 2020-06-04 14:45:26 +0100 584170a3888e1c55be00bdf2c8224ad342d24656 Merge #19142: validation: Make VerifyDB level 4 interruptible +c 2020-06-04 15:05:22 +0100 faa958bc283023334b9377f5fb2210459ca16d82 txindex: Remove unused boost/thread +c 2020-06-04 15:05:36 +0100 fad8c890f5ae6e083e416781b4857a1a53ad5249 txdb: Remove unused boost/thread +c 2020-06-04 15:05:54 +0100 89f9fef1f71dfeff4baa59bc42bc9049a46d911b refactor: Specify boost/thread/thread.hpp explicitly +pr 2020-06-04 15:27:53 +0100 b46fb5cb1058daaf0075b17f329163b8397caeec Merge #19131: refactor: Fix unreachable code in init arg checks +pr 2020-06-04 15:39:06 +0100 011fe009f9eeeb71ab958ab53df716438871d26e Merge #17994: validation: flush undo files after last block write +pr 2020-06-04 16:16:49 +0100 365f1082e1e6ff1c2f53552c3871223e87a9d43f Merge #19112: rpc: Remove special case for unknown service flags +pr 2020-06-04 16:28:55 +0100 39afe5b1c68c5979b2ef2f03b60ec6a57901328f Merge #19082: test: Moved the CScriptNum asserts into the unit test in script.py +c 2020-06-04 16:32:38 +0100 d1cca129b4b5b8e4830e442ebaee55dd0660b48a refactor: Use bilingual_str::empty() +c 2020-06-04 16:32:51 +0100 083daf7fbaf02de61f8d197ef6a8df98c1a57f7b Pass bilingual_str argument to AbortNode() +c 2020-06-04 16:32:52 +0100 d924f2a596c8f37deb2dd94069c578244823c31f Drop MSG_NOPREFIX flag +pr 2020-06-04 19:45:32 +0100 01b45b2e016f0b0907929e818216edf7157fb03a Merge #19053: refactor: replace CNode pointers by references within net_processing.{h,cpp} +c 2020-06-04 21:39:17 +0100 fa3999fe351b510bb141dff9ae4ecc8e717bf292 net: Reformat excessively long if condition into multiple lines +c 2020-06-04 21:39:23 +0100 fa9604c46f3245a704487c29b684caadffbf73bc doc: noban precludes maxuploadtarget disconnects +c 2020-06-04 23:26:01 +0100 fa7e002d520d8390f3ff4b0383cfdfc14713355d ci: tsan with wallet +pr 2020-06-05 04:01:39 +0100 4ede05d421e7799e631bb83ed16799e8bae79eeb Merge #18758: Remove unused boost/thread +pr 2020-06-05 08:18:46 +0100 7f9800caf90de0138954d80d851857cc33920ce0 Merge #15202: gui: Add Close All Wallets action +pr 2020-06-05 08:25:49 +0100 f4f222045693a4d611d8a1d755d7e4d2b91d5183 Merge #19132: qt: lock cs_main, m_cached_tip_mutex in that order +pr 2020-06-05 09:17:27 +0100 b55b5b6c3d93e3706c3a2b9b2b62bf5c68c5509f Merge #19164: ci: tsan with wallet +c 2020-06-05 10:50:34 +0100 00124713912ead4ce610d519bb3ebab7e31cbea7 build: turn on --enable-c++17 by --enable-fuzz +pr 2020-06-05 12:15:44 +0100 aa35ea55021dbb7f35a00fd666903d9fd03b88e7 Merge #19173: build: turn on --enable-c++17 by --enable-fuzz +pr 2020-06-05 13:29:18 +0100 0fc6ea216c00fff470bd876c53418afca63bf7e9 Merge #19096: Remove g_rpc_chain global +c 2020-06-05 13:29:18 +0100 f42f5e58f5fd063d5feec3eadf4a4040a941d4af refactor: Combine GetWalletForJSONRPCRequest and EnsureWalletIsAvailable functions +c 2020-06-05 14:15:31 +0100 7dda912e1c28b02723c9f24fa6c4e9003d928978 test: Do not swallow flake8 exit code +cr 2020-06-05 14:16:16 +0100 5d77549d8b287eb773db695b88c165ebe3be1005 doc: Add mypy to test dependencies +c 2020-06-05 15:57:13 +0100 edae6075aa3b1169c84b65e76fd48d68242a294e [tests] Only acquire lock once in p2p_compactblocks.py +c 2020-06-05 15:59:40 +0100 c67c1f2c032a8efa141d776a7e5be58f052159ea [tests] Don't call super twice in P2PTxInvStore.on_inv() +c 2020-06-05 16:01:54 +0100 62068381a3b9c065d81300be79abba7aecfdb41b [tests] Make mininode_lock non-reentrant +c 2020-06-05 20:04:57 +0100 1a9ef1d398dd14728b6bc67a89139cdf827c9753 refactor: Replace RecursiveMutex with Mutex in Shutdown() +c 2020-06-05 21:01:26 +0100 a99a3c0bd6d5476503c015e23be569295fdd190c rpc: Validate provided keys for query_options parameter in listunspent +c 2020-06-06 00:41:09 +0100 3351c91ed402895dcb4f803a29d2cac70ccfa8b4 refactor: Make CScriptVisitor stateless +pr 2020-06-06 07:25:08 +0100 17cfa52d380673eaec3d428383b163ca4eb83f04 Merge #19172: test: Do not swallow flake8 exit code +c 2020-06-06 13:12:37 +0100 fa16e7816b886b82d36457b0d8edc773cba76421 build: Add -Wshadow-field +c 2020-06-06 14:41:02 +0100 c2410ceb844a443caf6dd8c6df976b9e24724d06 refactor: Replace RecursiveMutex with Mutex in timedata.cpp +c 2020-06-06 14:50:32 +0100 fac6b9b938230d24c13fcb6e9be28515d674c6c8 test: Avoid overwriting the NodeContext member of the testing setup +c 2020-06-06 14:51:21 +0100 b1b173994406158e5faa3c83b113da9d971ac104 Merge #18968: doc: noban precludes maxuploadtarget disconnects +c 2020-06-06 15:19:52 +0100 78c8f4fe11706cf5c165777c2ca122bd933b8b6a refactor: Replace RecursiveMutex with Mutex in netbase.cpp +c 2020-06-06 21:30:29 +0100 45eff751c6d07007dabc365dc4c0e6c63e3fe5cf Add functional test for P2P eviction logic of inbound peers +c 2020-06-07 09:50:22 +0100 501e6ab4e778d8f4e95fdc807eeb8644df16203b doc: Add documentation for 'checklevel' argument in 'verifychain' RPC call +pr 2020-06-07 11:41:31 +0100 1b90a7b61a37d450bbe5b485dcc9b8c591567e0d Merge #19005: doc: Add documentation for 'checklevel' argument in 'verifychain' RPC… +c 2020-06-07 12:04:00 +0100 cc5c0d2299b09c58cd9962ca5075ffa53f2633c0 refactor: Fix formatting of timedata.cpp +c 2020-06-07 15:30:38 +0100 fa4cd1fdae3c3d9c47f5c31876c08ab1d676e5e3 ci: Switch to bitcoincore.org download +pr 2020-06-07 15:41:24 +0100 43695b0cf851893ad93aaf1ad50d991e0cf8db9f Merge #19201: ci: Switch to bitcoincore.org download +c 2020-06-07 16:03:49 +0100 4c0c89307dabbf51a32551471c54966ddf7c5bc3 log: remove deprecated `db` log category +c 2020-06-07 16:59:55 +0100 c514a4f59a7430f05dbe20465ddf4ca323329f1e doc: release note for `db` log category removal +pr 2020-06-07 17:31:01 +0100 b3091b2be7d1e5ab86d7380a884d4f23a5e9c9b7 Merge #19202: log: remove deprecated `db` log category +c 2020-06-08 05:54:43 +0100 57890abf2c7919eddfec36178b1136cd44ffe883 Remove two unneeded tests +c 2020-06-08 05:54:52 +0100 ff1e7b884447a5ba10553b2d964625f94e255bdc Move size limits to module-global +c 2020-06-08 05:55:34 +0100 5c4648d17ba18e4194959963994cc6b37053f127 Fix "invalid message size" test +pr 2020-06-08 06:47:58 +0100 807b9f811479a2b5a4b29e44fe915e054bd92fc3 Merge #19188: test: Avoid overwriting the NodeContext member of the testing setup [-Wshadow-field] +c 2020-06-08 08:37:59 +0100 cb38b069b0f41b1a26264784b1c1303c8ac6ab08 util: Don't reference errno when pthread fails. +c 2020-06-08 09:38:29 +0100 645a8653c895e4fc7717e9e5ac045612b5deaa60 rpc: remove deprecated getaddressinfo `label` field +cr 2020-06-08 09:38:31 +0100 a8507c99da10791aa69ca277128e06753942e976 rpc: remove deprecated getaddressinfo `labels: purpose` +c 2020-06-08 09:38:34 +0100 90e989390ee50633fff0e4f210a1ea23ff00e012 rpc: getaddressinfo RPCResult fixup +c 2020-06-08 09:38:36 +0100 bc01f7ae0538d3c647ce8dfbc29f7914d5df3fbb doc: release note for rpc getaddressinfo removals +pr 2020-06-08 11:55:00 +0100 399a0d9dc7a15bd4a9184ba19e1f251cfbb450c8 Merge #19180: refactor: Replace RecursiveMutex with Mutex in Shutdown() +cr 2020-06-08 11:59:03 +0100 fa2c2b50d895ff3402b82ce3db69bfc43053b519 doc: Extract net permissions doc +pr 2020-06-08 12:01:14 +0100 8496dbeba6878d4a123995170a0ad8d125c17695 Merge #19190: refactor: Replace RecursiveMutex with Mutex in netbase.cpp +pr 2020-06-08 12:04:27 +0100 374fd6fc8b4c6539173d5fa0008266aafdb6c668 Merge #19189: refactor: Replace RecursiveMutex with Mutex in timedata.cpp +pr 2020-06-08 12:27:58 +0100 41fb69404c037c0f70a57861adb60ff40b318a32 Merge #19192: doc: Extract net permissions doc +pr 2020-06-08 12:36:28 +0100 9573d2b55b45b24b9920cf5983d1681205ff41df Merge #19194: util: Don't reference errno when pthread fails. +cr 2020-06-08 13:10:23 +0100 faedb50d89cf113084adfa50c280c295c95571a8 test: pep-8 mining_basic +c 2020-06-08 13:10:37 +0100 fa98e10d5efcd965ee224ec21c9e79ebb123f055 test: Remove leftover comment in mining_basic +c 2020-06-08 13:52:39 +0100 af2a145e575f23c64909e6cf1fb323c603bda7ca Refactor resource exhaustion test +pr 2020-06-08 14:13:22 +0100 b3ec1fe8114a790adf0f0987d55952de65fd2242 Merge #18890: test: disconnect_nodes should warn if nodes were already disconnected +pr 2020-06-08 14:54:38 +0100 3e58734e55eed9861dc8e7f4a43ed99f630c70c2 Merge #18898: gui: Display warnings as rich text +cr 2020-06-08 15:06:02 +0100 faceed753a4d3d909985cdfc42b23f5dd395e168 doc: Add redirect for GUI issues and pull requests +cr 2020-06-08 15:06:14 +0100 66666d55b16603287d30ee672061ced8fc6752ab doc: Mention repo split in the READMEs +pr 2020-06-08 15:18:42 +0100 297466b49ff3aa568c78920d1d0f33646dbd3e21 Merge #18826: Expose txinwitness for coinbase in JSON form from RPC +pr 2020-06-08 15:36:57 +0100 a79bca2f1fb25f433d6e100a31a3acfde2656ce1 Merge #19069: refactor: replace pointers by references within tx_verify.{h,cpp} +c 2020-06-08 16:35:00 +0100 5527be06277647dffe7cda587c4bbfbec2a5c8ca refactor: Add AbortError alias +c 2020-06-08 19:24:51 +0100 addf18da951439f696dba163ae1c73458d43ea03 Call SHA256AutoDetect in benchmark setup +c 2020-06-09 07:35:10 +0100 bacbfb61eee6d3c32de3db4dea3f585c7159b643 refactor: Replace RecursiveMutex with Mutex in warnings.cpp +pr 2020-06-09 13:54:57 +0100 9ad6f14175c19b5d47267c3dd5840c14bad43c83 Merge #19220: refactor: Replace RecursiveMutex with Mutex in warnings.cpp +c 2020-06-09 14:39:44 +0100 425e7cb8cf6140e03802a96d2be9a8b4aa2e244a refactor: Put`TryParsePermissionFlags` in anonymous namespace +c 2020-06-09 14:39:44 +0100 77b79fa6ef60d363ca720cef5473f1a2c45099a3 refactor: Error message bilingual_str consistency +c 2020-06-09 14:40:02 +0100 6fe989054f0ad9308e8a25f7123d9e5dd67f1164 refactor: Change Node::initError to take bilingual_str +c 2020-06-09 16:05:05 +0100 ec4c6a17e82a6726d95075b43ebd2525c50b37cd scripted-diff: replace MAX_BLOCKS_ONLY_CONNECTIONS with MAX_BLOCK_RELAY_ONLY_CONNECTIONS +c 2020-06-09 19:15:04 +0100 fa7b46cc915d048d8e6bc7c074334e631fceb7ec test: Add BerkeleyDatabase tsan suppression +c 2020-06-09 21:08:41 +0100 6fc641644f7193365cf2b40f5cf20374ec871943 change blacklist to blocklist +cr 2020-06-09 21:39:09 +0100 67f232b5d874b501c114bced5d764db7f4f5ce99 Squashed 'src/secp256k1/' changes from b19c000063..2ed54da18a +cr 2020-06-09 21:41:38 +0100 ddc2419c090b0af65edc9eb07ac0a736eb351b69 Update MSVC build config for libsecp256k1 +pr 2020-06-09 22:15:52 +0100 221873e15874b5d5c02d674bcc982446adae6fa3 Merge #19227: test: change blacklist to blocklist +pr 2020-06-09 22:18:04 +0100 f8364df25070cea08f0fb5bbbb212f1ff72f9d21 Merge #19176: refactor: Error message bilingual_str consistency +c 2020-06-10 01:50:50 +0100 c75de5da5fdd3a304f9da3d8a2e0370d1723ddd0 [TESTS] Move base58 to own module to break circular dependency +c 2020-06-10 03:08:16 +0100 948f1134bc7b8ea1fb3c6b55f0cda16cc8dec126 gui: add missing translation.h include to fix build +c 2020-06-10 05:06:03 +0100 16d4b3fd6d5aad18ebb731a5006a15180d3661ef test: mempool.dat compatibility between versions +pr 2020-06-10 10:12:40 +0100 20e95313790c75631e44f9572a2f8767685c52d6 Merge #19231: gui: add missing translation.h include to fix build +c 2020-06-10 13:01:09 +0100 38e33aa481cefbe12c50f344bae190c0d95fb489 refactor: Make GetWarnings() bilingual_str aware internally +c 2020-06-10 13:01:20 +0100 d1ae7c0355662481a7d181a0a458284936d53eb1 Make GetWarnings() return bilingual_str +c 2020-06-10 13:01:20 +0100 d49612f98add29066817b7c808b76c2d728948e5 Make SetMiscWarning() accept bilingual_str argument +pr 2020-06-10 14:25:13 +0100 bc933aeaf04420218b46318e316ee5eaa772823c Merge #19226: test: Add BerkeleyDatabase tsan suppression +pr 2020-06-10 14:50:57 +0100 371a73e94043761a6ac6ecdf77ae26cd1f289053 Merge #19233: Make SetMiscWarning() accept bilingual_str argument +pr 2020-06-10 15:23:58 +0100 6762a627ecb89ba8d4ed81a049a5d802e6dd75c2 Merge #19230: [TESTS] Move base58 to own module to break circular dependency +c 2020-06-10 15:27:58 +0100 e8acc6015695c8439fc971a12709468995b96dcf [test] add mempool msg test for node with bloomfilter enabled +c 2020-06-10 15:28:04 +0100 0474ea25afc65546cbfe5f822c0212bf3e211023 [test] fix race conditions and test in p2p_filter +c 2020-06-10 15:28:04 +0100 497a619386008dfaec0db15ecaebcdfaf75f5011 [test] add BIP 37 test for node with fRelay=false +cr 2020-06-10 15:28:04 +0100 4ef80f0827392a1310ca5a29cc1f8f5ca5d16f95 [test] sending invalid msgs to node with bloomfilters=0 causes disconnect +c 2020-06-10 15:28:45 +0100 dca73941eb0f0a4c9b68efed3870b536f7dd6cfe scripted-diff: rename node to peer for mininodes +c 2020-06-10 15:35:43 +0100 9b8907faded8e4ec312c0dd4b4b15e1793876acd Check size after Unserializing CPubKey +c 2020-06-10 16:54:25 +0100 e38081846d889fcbbbc6ca4a4d3bca26807fde2f Revert "[TESTS] Move base58 to own module to break circular dependency" +cr 2020-06-10 16:56:44 +0100 b216b0b71f7853d747af8b712fc250c699f3c320 [tests] sort imports in rpc_createmultisig.py +cr 2020-06-10 17:10:02 +0100 3a83a01694160f2e722e1bc90a328bd569b8e109 [tests] move generate_wif_key to wallet_util.py +c 2020-06-11 02:15:38 +0100 ca8bc4233059bb576c658d1b20bbfbfc00e8481f Drop --disable-jni from libsecp256k1 configure options +c 2020-06-11 02:29:33 +0100 e10439ce5a54cd13062e4ed07ebc681e385ed5cb scripted-diff: rename privkey with seckey in secp256k1 interface +pr 2020-06-11 09:38:11 +0100 45a6811d36fc59ce0d7e2be7a848059a05b0486e Merge #19206: test: Remove leftover comment in mining_basic +c 2020-06-11 13:49:39 +0100 f8213c05f087e5fbb5d92a291f766b0baebc798f Add means to handle negative capabilities in thread safety annotations +pr 2020-06-11 14:52:16 +0100 7a24cca82906e4ee1e082c8f4563fb873170532c Merge #19100: refactor: Combine GetWalletForJSONRPCRequest and EnsureWalletIsAvailable functions +c 2020-06-11 15:05:54 +0100 4a8181b303218683d014e8e79a172ea8ccccc4dd tests: Add std::vector ConsumeFixedLengthByteVector(FuzzedDataProvider& fuzzed_data_provider, const size_t length) +cr 2020-06-11 15:05:54 +0100 cf5b8f64b3fef053035fa11231601b79bfa53aff tests: Add fuzzing harness for {Read,Write}{LE,BE}{16,32,64} (crypto/common.h) +c 2020-06-11 17:38:36 +0100 fad889cbf0b6c46da2e110b73cbea55e4ff7951e wallet: Make RPC help compile-time static +c 2020-06-11 17:39:22 +0100 fadf6bd04f002d05aaff8eba74015e25a41966bc refactor: Remove unused request.fHelp +pr 2020-06-11 17:49:38 +0100 85f7db22841e472a61e547886f4d65bdfef26fc3 Merge #19239: tests: move generate_wif_key to wallet_util.py +pr 2020-06-11 17:59:09 +0100 8682414d0238200b3f4c0b2f209c58155bc8ba82 Merge #19247: tests: Add fuzzing harness for {Read,Write}{LE,BE}{16,32,64} (crypto/common.h) +pr 2020-06-11 19:35:08 +0100 b33136b6ba9887f7db651c4c5264ca7f2f601df7 Merge #19083: test: msg_mempool, fRelay, and other bloomfilter tests +c 2020-06-12 08:54:00 +0100 c4ffcf07af19cd0c600b11dabd94e7e9d31ad072 build: remove BIP70 configure option +c 2020-06-12 09:02:18 +0100 83fd3a6d73eee452dc5141bdf6826da62d7b2dbd init: use std::thread for ThreadImport() +c 2020-06-12 12:31:42 +0100 a4a3fc4cd2e6f53cdffcc2962fd152a4e40c7413 doc: improve subtree check instructions +pr 2020-06-12 18:04:37 +0100 19e919217e6d62e3640525e4149de1a4ae04e74f Merge #19250: wallet: Make RPC help compile-time static +pr 2020-06-12 19:48:20 +0100 5af16a4db76f8c00b6c9598147ab49d79be1f149 Merge #16756: test: Connection eviction logic tests +pr 2020-06-12 20:29:53 +0100 f154071ec81760ffdb552d5768243a62e1e9eceb Merge #19177: test: Fix and clean p2p_invalid_messages functional tests +c 2020-06-13 01:09:15 +0100 ccf1f6ea24905876f35e685204cb2293cf083e97 refactor: Drop ::HasWallets() +pr 2020-06-13 02:50:29 +0100 8c97780db8c9dd33efed134385573ba97e9cd165 Merge #19228: Update libsecp256k1 subtree +pr 2020-06-13 08:41:39 +0100 265492723a6874abc542361e4693840240e7d2ef Merge #18297: build: Use pkg-config in BITCOIN_QT_CONFIGURE for all hosts including Windows +cr 2020-06-13 11:24:18 +0100 78c312c983255e15fc274de2368a2ec13ce81cbf Replace current benchmarking framework with nanobench +pr 2020-06-13 15:30:31 +0100 eac65d99ddb27061e6ae0f9448887db86e2c0734 Merge #19261: refactor: Drop ::HasWallets() +c 2020-06-13 15:49:31 +0100 49236be099c5e8b3cadbc98d5216313e7e1a5a45 [tests] Don't import asyncio to test magic bytes +c 2020-06-13 17:59:18 +0100 9e2e753b0605c8cd826381a362f0c7de56eea81f build: Always define ZMQ_STATIC for MinGW +c 2020-06-13 18:01:04 +0100 e9edbe4dbd8c24a779de7d92e5f10c870aab5511 build: Always use pkg-config +c 2020-06-13 18:01:27 +0100 6fd2118e777d11cbc81a45313d1a7d6400e34f3f build: Drop dead non-pkg-config code for UNIVALUE check +c 2020-06-13 18:01:36 +0100 06cfc9cadf7c5dd43147e6525a348d5f2d299422 build: Fix indentation in UNIVALUE check +c 2020-06-13 18:01:49 +0100 10cbae0c399302b0f8b1aa847c4246ba60bf25ee build: Drop dead non-pkg-config code for ZMQ check +cr 2020-06-13 18:07:10 +0100 44a14afbb889633a6c9a322a5aeca2e1b2cbdbd8 build: Drop dead non-pkg-config code for qrencode check +pr 2020-06-14 06:31:17 +0100 195822f1e05e2f36002c906667d4c639663f23b5 Merge #19264: [tests] Don't import asyncio to test magic bytes +cr 2020-06-14 16:33:25 +0100 fa7166759789c1282609ff3ab2e80d4f70910a9f ci: Move travis workarounds to .travis.yml +cr 2020-06-14 18:58:02 +0100 fa457fbd3387661e1973a8f4e5cc2def79e0c625 move-only: Move NDEBUG compile time check to util/check +c 2020-06-14 19:47:12 +0100 1c6b787e0319c44f0e0bede3f4a77ac7c2089db2 [netprocessing] disconnect node that sends filterclear +c 2020-06-14 19:47:49 +0100 ff8c430c6589ea72b9e169455cf6437c8623cc52 [test] test disconnect for filterclear +c 2020-06-14 19:48:17 +0100 3a10d935ac8ebabdfd336569d943f042ff84b13e [p2p/refactor] move disconnect logic and remove misbehaving +cr 2020-06-15 09:13:49 +0100 0f8f51544558d204a4e9d0607b0f375150529637 RPC: Rephrase generatetoaddress help, and use PACKAGE_NAME +cr 2020-06-15 10:22:52 +0100 313a081b907bf0a5b56af99ec2d42814ef0638b0 [net] Add seed.bitcoin.wiz.biz to DNS seeds +pr 2020-06-15 11:14:37 +0100 75edf2cf0255224141c709e89d02f253d7945f6b Merge #19282: RPC: Rephrase generatetoaddress help, and use PACKAGE_NAME +pr 2020-06-15 11:25:06 +0100 1c86ed41483471929840eec09b93d7de3a4aeacf Merge #19276: ci: Move travis workarounds to .travis.yml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +v 2020-08-14 11:37:06 +0100 fa93bc14c7411a108dd024d391344fabf0f76369 rpc: Remove unused return type from appendCommand +v 2020-08-14 11:37:19 +0100 faaa46dc204d6d714f71dbc6f0bf02215dba0f0f rpc: Assert that RPCArg names are equal to CRPCCommand ones (mining) +v 2020-08-14 11:37:51 +0100 fa32c1d5ec25bc53bf989a8ae68e688593d2859d rpc: Assert that RPCArg names are equal to CRPCCommand ones (zmq) +v 2020-08-14 11:38:03 +0100 fa3d9ce3254882c545d700990fe8e9a678f31eed rpc: Assert that RPCArg names are equal to CRPCCommand ones (rpcdump) +cr 2020-08-14 12:38:28 +0100 6cb8771173d835bdeb89c76b1d53191d3c896968 build: Add missed gcov files to 'make clean' +v 2020-08-14 12:56:18 +0100 ce3e6a7cb21d1aa455513970846e1f70c01472a4 bench: Allow skip benchmark +pr 2020-08-14 13:57:49 +0100 1a43cd3f747f04eda32389689c006f3646b173e7 Merge #19709: test: Fix 'make cov' with clang +pr 2020-08-14 14:12:44 +0100 30dd562fd2c58536fa026fff9853b8d825216b01 Merge #19457: wallet: Cleanup wallettool salvage and walletdb extraneous declarations +v 2020-08-14 14:27:38 +0100 fa55c1d5fdd88c4bc4d361da231cd63b20255b50 build: Add Werror=range-loop-analysis +v 2020-08-14 14:58:34 +0100 4792cad88c5c3c93e639a051df779230ee817396 doc: comment out and add annotation to unused MSG_FILTERED_WITNESS_BLOCK +pr 2020-08-15 00:44:30 +0100 f269165edc0354fffa34226f37b83503bba6c044 Merge #17458: Refactor OutputGroup effective value calculations and filtering to occur within the struct +pr 2020-08-15 01:19:48 +0100 a0e75bd31dffa2742406d18e020a2e897fcb21f0 Merge #15937: Add loadwallet and createwallet load_on_startup options +pr 2020-08-15 01:54:45 +0100 d052f5e6b79b9600f929457e9280b441b772785b Merge #16841: Replace GetScriptForWitness with GetScriptForDestination +pr 2020-08-15 03:15:42 +0100 4cde97374d5c7fc22cc0a13f2f74ca45af33279d Merge #19718: build: Add missed gcov files to 'make clean' +v 2020-08-15 07:02:42 +0100 86d4cf42d97abf4c436d1eabf29e2ed150f69c1e Increase the ip address relay branching factor for unreachable networks +v 2020-08-15 08:24:46 +0100 fa6583c30bf7d82cf7ffdae995f8f16524ad2c0d ci: Set increased --timeout-factor by default +v 2020-08-15 11:03:16 +0100 02fbe3ae0bd91cbab2828cb7aa46f6493c82f026 net: add nLastBlockTime/TXTime to CNodeStats, CNode::copyStats +v 2020-08-15 13:01:54 +0100 fa330ec2fe5f5ba68a8d43fff0b19584c0b1ff39 test: Remove confusing and broken use of wait_until global +v 2020-08-15 13:34:37 +0100 8a560a7d57cbd9f473d6a3782893a0e2243c55bd rpc: expose nLastBlockTime/TXTime as getpeerinfo last_block/transaction +v 2020-08-15 14:13:13 +0100 21c57bacda766a4f56ee75a2872f5d0f94e3901e test: getpeerinfo last_block and last_transaction tests +v 2020-08-15 14:13:40 +0100 cfef5a2c98b9563392a4a258fedb8bdc869c9749 test: rpc_net.py logging and test naming improvements +v 2020-08-15 14:26:33 +0100 5da96210fc2fda9fbd79531f42f91262fd7a9257 doc: release note for getpeerinfo last_block/last_transaction +pr 2020-08-15 14:39:02 +0100 3ab2582c7fe76d2839ab493512758d5601903c86 Merge #19730: ci: Set increased --timeout-factor by default +v 2020-08-15 21:06:03 +0100 c91b241b48d7f97b3e6b39d84ec780f2a3e3a0a7 Updated outdated help command for getblocktemplate (fixes #19625) +v 2020-08-15 23:23:55 +0100 7668db3b08531a590089d66cc5c91f1fb3afbfcc Move only: Move CDiskTxPos to its own file +pr 2020-08-16 10:04:28 +0100 a57af897ec16976b28de05aa0b9c3f6a96d73ede Merge #19564: test: p2p_feefilter improvements (logging, refactoring, speedup) +cr 2020-08-16 10:15:49 +0100 667bc7a7f7c5d9a15eaf6957c3d8841a75efa7bc rpc: Add getindexinfo RPC +v 2020-08-16 10:15:52 +0100 124e1ee1343f8bfb3748393ced9debdbdee60d3b doc: Add release notes for getindexinfo RPC +v 2020-08-16 10:15:52 +0100 c447b09458c89c946957a211a4f5373b92af44bf test: Add tests for getindexinfo RPC +cr 2020-08-16 14:16:36 +0100 cf0681133ae7301ead7091eaee55c945da5cdfcc build: disable D-Bus on Android by default +v 2020-08-16 17:47:48 +0100 366913e307d2dc13bc00d6bf7b6b2426c359ac30 build: AX_BOOST_THREAD serial 33 +pr 2020-08-16 17:56:25 +0100 ffad34816722cdf27a0a7c16539ddd1d655602e0 Merge #19705: Shrink CAddress from 48 to 40 bytes on x64 +v 2020-08-17 00:06:02 +0100 a13cafc6c6998baedf3c5766259c21fcd763b99e wallet: GetWalletTx requires cs_wallet lock +v 2020-08-17 00:06:03 +0100 d8441f30ff57e4ae98cff6694c995eaffc19c51a wallet: IsMine overloads require cs_wallet lock +pr 2020-08-17 05:18:28 +0100 c831e105c567420aa4d3f60c6675a229daaf5fe6 Merge #14582: wallet: always do avoid partial spends if fees are within a specified range +v 2020-08-17 09:09:48 +0100 5067c5acc30c5cf87496c1bf8eb03712cc66b206 [test] Add test for getblockheader verboseness +v 2020-08-17 10:52:02 +0100 fa41810d0e87f9f9a2e39be238b9598be02646d0 ci: Run valgrind fuzzer on cirrus +v 2020-08-17 10:53:31 +0100 fa0538e94db26dd84e02aac1cf174b79729dae72 ci: Set cirrus RAM to 8GB +pr 2020-08-17 11:47:11 +0100 1bc8e8eae2dc4b47ef67afc6880ea48b8e84a086 Merge #19734: Move CDiskTxPos to its own file +v 2020-08-17 12:16:09 +0100 d3e8adfada889a3c9fba930086eda609509aca07 util: remove c-string interfaces for DecodeBase58{Check} +v 2020-08-17 16:56:59 +0100 71e0f07e9c5f0aef532b85c04807dcbedd04e0af util: remove unused c-string variant of atoi64() +v 2020-08-18 02:08:49 +0100 72ae20fc142457a200278cb2fedc5e32a3766b58 tests: add sync_all to fix race condition in wallet groups test +pr 2020-08-18 04:33:34 +0100 53dac67a97e2084eb2369457d0fec1d3accc3bad Merge #19719: build: Add Werror=range-loop-analysis +pr 2020-08-18 05:15:48 +0100 f2d1b9881f68e8196e5842ea92ad80a8b0f2e6ed Merge #19721: p2p: comment out unused MSG_FILTERED_WITNESS_BLOCK +pr 2020-08-18 06:00:13 +0100 772cb03a281638079051a4e5068559a4d9b1fda8 Merge #19015: build: Enable some commonly enabled compiler diagnostics +pr 2020-08-18 07:18:00 +0100 e6e277f9ed4da7aff9b7b39a7838bada0c3e572a Merge #19756: tests: add sync_all to fix race condition in wallet groups test +v 2020-08-18 07:30:36 +0100 9f77b821764dcaebc97a5ae76c3052936418308d doc: release notes for -maxapsfee +v 2020-08-18 08:46:53 +0100 9034f6e30ee6d3db71049de4500e7ede648557fb Drop deprecated and unused GUARDED_VAR and PT_GUARDED_VAR annotations +v 2020-08-18 11:24:39 +0100 7e31ea9fa0a59ced2293057acb14c71ec97db689 -maxapsfee: follow-up fixes +pr 2020-08-18 13:03:23 +0100 a2a250c7d07bcb80cefca9dd4a7ce57f41291334 Merge #19743: -maxapsfee follow-up +cr 2020-08-18 19:03:56 +0100 b667a90389cce7e1bf882f4ac78323c48858efaa tests: Add fuzzing harness for SigHasLowR(...) and ecdsa_signature_parse_der_lax(...) +cr 2020-08-18 19:03:57 +0100 46fcac1e4b9e0b1026bc0b663582148b2fd60390 tests: Add fuzzing harness for ec_seckey_import_der(...) and ec_seckey_export_der(...) +v 2020-08-18 20:21:12 +0100 8e121e550953711cd03d7b6c221afd065c325c5e depends: Cleanup CMake invocation +v 2020-08-18 20:23:31 +0100 b3f541f618fe1f3d44baf6a0dd4299173c81f752 depends: Prepend CPPFLAGS to C{,XX}FLAGS for CMake +v 2020-08-18 20:29:19 +0100 b8936883573708059357a66f67fad9dc77a8bade depends: Specify LDFLAGS to cmake as well +v 2020-08-18 21:06:09 +0100 45cf55ccac94689e48dd0648ed2401918a778024 test: remove `CNodeNoVersionMisbehavior` from p2p_leak.py +v 2020-08-18 21:06:15 +0100 f6f082b9343522bc8005f23937ac6ecf56548c98 test: remove `CNodeNoVersionIdle` from p2p_leak.py +v 2020-08-18 21:13:19 +0100 ed5cd12869e0691a785199d2d977ce5879095180 test: Distinguish between nodes(bitcoind) and peers(mininodes) in p2p_leak.py +v 2020-08-19 02:47:59 +0100 8ed2f1ed78937eff0bb8b5318a30da908e33af24 Remove unused includes +v 2020-08-19 02:47:59 +0100 cf095a53fcef8ad72e2f1177660ef50bc7e340ad Move comment about BaseIndex::DB from TxIndex::DB +pr 2020-08-19 09:12:49 +0100 c6532fa6c14d3cea5941cff9411937db9a8d5f1a Merge #19746: ci: Move valgrind fuzzer to cirrus +v 2020-08-19 09:41:27 +0100 333329dbda423b00098ec9f8702d75d24468c56e doc: Fix getmempoolancestor RPC result doc +pr 2020-08-19 13:20:15 +0100 44ddcd887ddf3f62bcfb9c0b59ba2124335dbe94 Merge #19706: refactor: make EncodeBase58{Check} consume Spans +pr 2020-08-19 14:04:34 +0100 e9b30126545d6ddd8772363e4079d1e4908ad117 Merge #19750: refactor: remove unused c-string variant of atoi64() +pr 2020-08-20 01:56:37 +0100 44f66d2f10cb9ba0538c836976bdd090fd38c8f0 Merge #19765: doc: Fix getmempoolancestors RPC result doc +pr 2020-08-20 03:17:14 +0100 70d7ddbcbbead05031f6071adaf6dd2e183ab4f9 Merge #19727: test: Remove unused classes from p2p_leak.py +pr 2020-08-20 15:00:22 +0100 27eeb0337b083713879645bcdb28b046e91d631c Merge #19550: rpc: Add getindexinfo RPC +v 2020-08-20 18:55:06 +0100 1ccb9f30c040daf688f89f0d63e9f5e7b131d193 Move Win32 defines to configure.ac to ensure they are globally defined +v 2020-08-20 19:20:27 +0100 916d3596c493fec44da86aeb92b61eafeea0b596 help: Generate checkpoint height from chainparams +v 2020-08-21 00:28:10 +0100 b8405b833ad28351c80fb10f6f896f974013fd9e wallet: IsChange requires cs_wallet lock +pr 2020-08-21 05:48:46 +0100 0d9e14a6466cd1644cb659b7b79d40d8761034c0 Merge #19733: Move comment about BaseIndex::DB from TxIndex::DB +v 2020-08-21 13:10:41 +0100 daed542a12e0a6a4692aca12a61b84cd55accc33 [net_processing] Move ProcessMessage to PeerLogicValidation +pr 2020-08-21 13:34:02 +0100 d254e6e7951fa81fad06bc82516770a0c186a2fd Merge #19722: test: Add test for getblockheader verboseness +v 2020-08-21 15:41:02 +0100 4148f55dd016f940df50a44cf03d117cdb1dd929 docs: Correct description for getblockstats's txs field +cr 2020-08-21 15:52:13 +0100 9e2897d020b114a10c860f90c5405be029afddba scripted-diff: Rename mininode_lock to p2p_lock +cr 2020-08-21 15:52:20 +0100 85165d4332b0f72d30e0c584b476249b542338e6 scripted-diff: Rename mininode to p2p +cr 2020-08-21 15:53:59 +0100 5e8df3312e47a73e747ee892face55ed9ababeea test: resort imports +v 2020-08-21 17:44:27 +0100 fa96574b0d2d2c0880447f163cd0280fb3551910 test: Move doxygen comment to header +v 2020-08-21 17:44:50 +0100 fa11ff29803ca4f5fd0035bede697448cff7d960 test: Pass empty tx pool to block assembler +v 2020-08-21 17:44:52 +0100 fad84b7e14ff92465bc17bfdaf1362bcffe092f6 test: Activate segwit in TestChain100Setup +pr 2020-08-22 19:50:14 +0100 197450f80868fe752c6107955e5da80704212b34 Merge #19777: docs: Correct description for getblockstats's txs field +v 2020-08-23 01:27:09 +0100 638441928a446726ce3a7fb20433a5478e7585bb test: add parameterized constructor for msg_sendcmpct() +v 2020-08-23 21:47:09 +0100 8071c75d45e12c2bca04b170c687bebd30ad19ac qt, refactor: Limit scope of QPainter object +v 2020-08-23 22:09:26 +0100 15ae4a17c430b27b58b5fce89a868a70edca80c8 test/fuzz: add a seed corpus generation option to the test_runner +pr 2020-08-24 05:14:18 +0100 38c13a4a6055c0e5af37475fbaae8e41ae26b64f Merge #19689: build: Add Qt version checking +cr 2020-08-24 06:45:17 +0100 fa40017706e08b4de111e8e57aabeced60881a57 init: Pass reference to ArgsManager around instead of relying on global +v 2020-08-24 06:51:48 +0100 fa33bc2dabbbd2d73961f9b0ce51420a3b6e4ad5 init: Capture copy of blocknotify setting for BlockNotifyCallback +cr 2020-08-24 06:52:17 +0100 fa9d5902f7d72e8cce105dd1b1f5a1062e304b10 scripted-diff: gArgs -> args +pr 2020-08-24 07:02:27 +0100 1d53d72948e39ad2d099a6cf2488d5652e7a1f23 Merge #19659: Add a seed corpus generation option to the fuzzing test_runner +cr 2020-08-24 08:31:24 +0100 fa30d5282cb07b6de0160d7df8b649332db97dde doc: Remove label from good first issue template +pr 2020-08-24 12:32:44 +0100 8e94275f863cbb4a7db1efd7201c039f355c87c1 Merge #19786: doc: Remove label from good first issue template +v 2020-08-24 12:44:07 +0100 fa347b2f2570a9436313a7c5d61015f2088662f4 test: Select at least the fee in wallet_bumpfee to avoid negative amounts +v 2020-08-24 12:49:28 +0100 fafc9d5af48c987212af4170bb8b2504be8138f8 test: Fix intermittent issue in wallet_bumpfee +pr 2020-08-24 14:27:29 +0100 7ce7f2b2518cfa3bd4102c5b443278379bbf24eb Merge #17396: build: modest Android improvements +pr 2020-08-24 14:50:37 +0100 4fefd80f08880abd7c2d77a170152a9ef4394e4a Merge #19704: Net processing: move ProcessMessage() to PeerLogicValidation +pr 2020-08-24 16:03:07 +0100 7f609f68d835bece8b01da1b09b127c67769ae7d Merge #19731: net, rpc: expose nLastBlockTime/nLastTXTime as last block/last_transaction in getpeerinfo +v 2020-08-24 17:41:14 +0100 1ab49b81cf32b6ef9e312a0a8ac45c68a3262f0d Add in/out connections to rpc getnetworkinfo +v 2020-08-24 17:41:22 +0100 d9cc13e88d096c1a171159c01cbb96444f7f8d7f UNIX_EPOCH_TIME fixup in rpc getnettotals +v 2020-08-24 17:41:24 +0100 581b343d5bf517510ab0236583ca96628751177d Add in/out connections to cli -getinfo +cr 2020-08-24 20:50:59 +0100 102867c587f5f7954232fb8ed8e85cda78bb4d32 net: change CNetAddr::ip to have flexible size +cr 2020-08-24 20:50:59 +0100 1ea57ad67406b3aaaef5254bc2fa7e4134f3a6df net: don't accept non-left-contiguous netmasks +pr 2020-08-25 03:26:16 +0100 c6b730dbfcbd454132a660211002f19c6960f014 Merge #18405: build: Drop all of the ZeroMQ patches +pr 2020-08-25 04:52:52 +0100 8e0f341779e1d2754432765ec09deb7488f5b093 Merge #15704: Move Win32 defines to configure.ac to ensure they are globally defined +v 2020-08-25 06:19:55 +0100 f36140d00c937b5059cd952d759a77e25330388a build: use patch rather than sed in bdb package +v 2020-08-25 06:19:56 +0100 335bd7f8bc415d6419763e17b013f94e5f0e5689 build: use patch rather than sed in Boost package +v 2020-08-25 07:37:35 +0100 865cb23a485d88be603c1d6bf8c32ef7a5edeaa2 build: use patch rather than sed in fontconfig package +v 2020-08-25 07:37:44 +0100 4af59a407a207e7de327c1bb145d68ebc8ddedd8 build: use patch rather than sed in zeromq package +v 2020-08-25 07:37:44 +0100 bf85eace1a594862c4baa375fd3c8b741948cc47 build: remove no-longer needed qt configure workaround +v 2020-08-25 07:37:44 +0100 cc107a3af17d821f66de9357efe73214a628803b build: use patch rather than sed in native_cctools package +v 2020-08-25 07:37:45 +0100 3aaa39d436aa32489aa136d6b3d714220535ec1e build: replace pwd sed in qt package with a patch +v 2020-08-25 07:37:45 +0100 9d440f4e11f7d610f3bcf1fb587d71ed2581a6c1 build: remove no-longer needed qt workaround +v 2020-08-25 07:37:45 +0100 c723e4176ee3c1c2391a7c43b094a315bdd3c72e build: replace FreeType back-compat sed with a patch in qt package +cr 2020-08-25 10:04:25 +0100 d5800da5199527a366024bc80cad7fcca17d5c4a [test] Remove final references to mininode +pr 2020-08-25 13:18:40 +0100 f8462a6d2794be728cf8550f45d19a354aae59cf Merge #19601: Refactoring CHashWriter & Get{Prevouts,Sequence,Outputs}Hash to SHA256 (Alternative to #18071) +v 2020-08-25 13:27:25 +0100 fa39c62eb7f39e7d249b8d46c075c4e7a9aec684 test: inline hashToHex +pr 2020-08-25 17:10:25 +0100 8d6224fefe015c2022d00a79a4549464bd79cf2f Merge #19628: net: change CNetAddr::ip to have flexible size +v 2020-08-25 17:46:00 +0100 c4b85ba704a1b5257dc82786a84f676bacb7b027 Bugfix: Define and use HAVE_FDATASYNC correctly outside LevelDB +v 2020-08-25 17:52:51 +0100 2bc207190e6f1818b04c9336f6e0d625b2a2a0ba util: make EncodeBase32 consume Spans +v 2020-08-25 17:52:57 +0100 e2aa1a585a83971639572cd2c84565ec360deac9 util: make EncodeBase64 consume Spans +v 2020-08-25 18:23:40 +0100 0bbe26a1af2aab2287b18048f80b3f70e63e0044 wallet: filter for keys only before record deser in salvage +v 2020-08-25 18:23:40 +0100 544e12a4e81633d222574eec253a1ff292d3c4a5 walletdb: Add KeyFilterFn to ReadKeyValue +cr 2020-08-26 04:27:12 +0100 bbc01a753d40488fa1469c87b31e7a12ddc8b329 build: replace qtranslations lrelease sed with a patch in qt package +v 2020-08-26 04:27:31 +0100 3de365e4f15ddaaf6bdb5b3c31529156617d2835 build: replace wingenminiupnpcstrings sed with a patch in miniupnpc package +pr 2020-08-26 06:17:35 +0100 92735e45badfa98ee3c6f4e69b8858119bc09406 Merge #19775: test: Activate segwit in TestChain100Setup +pr 2020-08-26 08:18:38 +0100 6a2ba626852bd5bd8531dfa335c78fa87e4f6282 Merge #19779: Remove gArgs global from init +pr 2020-08-26 08:43:17 +0100 e80e5b3e4f00f7031a26b83549c6c7198ac8adce Merge #19760: test: Remove confusing mininode terminology +cr 2020-08-26 10:52:31 +0100 102abff9eb6c267af64f2a3560712147d1896e13 gui: Replace interface::Node references with pointers +cr 2020-08-26 10:52:31 +0100 519cae8fd6e44aef3470415d7c5e12acb0acd9f4 gui: Delay interfaces::Node initialization +v 2020-08-26 10:52:31 +0100 91aced7c7e6e75c1f5896b7e3843015177f32748 gui: Remove unused interfaces::Node references +pr 2020-08-26 10:52:31 +0100 a12d9e5fd24a25bef476c10620317e43a5905754 Merge #19687: refactor: make EncodeBase{32,64} consume Spans +cr 2020-08-26 10:52:31 +0100 e1336316250ab5cb0ed654b1e593378a6e0769ce gui: Partially revert #10244 gArgs and Params changes +v 2020-08-26 10:56:55 +0100 471714e1f024fb3b4892a7a8b34a76b83a13fa19 p2p: add CInv block message helper methods +v 2020-08-26 10:56:59 +0100 39f1dc944554218911b0945fff7e6d06f3dab284 p2p: remove nFetchFlags from NetMsgType TX and INV processing +v 2020-08-26 10:57:03 +0100 42ca5618cae0fd9ef97d2006b17d896bc58cc17c [net processing] Split AlreadyHave() into separate block and tx functions +v 2020-08-26 10:57:07 +0100 430e183b89d00b4148f0b77a6fcacca2cd948202 [net processing] Remove mempool argument from AlreadyHaveBlock() +v 2020-08-26 10:57:11 +0100 5fdfb80b861e0de3fcf8a57163b3f52af4b2df3b [net processing] Change AlreadyHaveBlock() to take block_hash argument +v 2020-08-26 10:57:15 +0100 acd66421671e42a58e8e067868e1ab86268e3231 [net processing] Change AlreadyHaveTx() to take a GenTxid +v 2020-08-26 10:57:19 +0100 b1c855453bf2634e7fd9b53c4a76a8536fc9865d p2p: use CInv block message helpers in net_processing.cpp +v 2020-08-26 10:57:23 +0100 24ee4f01eadb870435712950a1364cf0def06e9f p2p: make gtxid(.hash) and fAlreadyHave localvars const +v 2020-08-26 10:57:27 +0100 aa3621385ee66c9dde5c632c0a79fba3a6ea2d62 test: use CInv::MSG_WITNESS_TX flag in p2p_segwit +v 2020-08-26 10:57:30 +0100 fb56d37612dea6666e7da73d671311a697570dae p2p: ensure inv is GenMsgTx before ToGenTxid in inv processing +v 2020-08-26 11:00:00 +0100 3edc4e34fe2f92e7066c1455f5e42af2fdb43b99 bench: Prevent thread oversubscription +pr 2020-08-26 15:32:44 +0100 93ab136a33e46080c8aa02d59fb7c2a8d03a3387 Merge bitcoin-core/gui#35: Parse params directly instead of through node (partial revert #10244) +cr 2020-08-26 17:01:59 +0100 1343c86c7cc1fc896696b3ed87c12039e4ef3a0c test: Update wait_until usage in tests not to use the one from utils +v 2020-08-26 17:01:59 +0100 d841301010914203fb5ef02627c76fad99cb11f1 test: Add docstring to wait_until() in util.py to warn about its usage +pr 2020-08-26 18:25:38 +0100 30568d3f1e238f6900265914c2d449adcc355c66 Merge #19778: test: Fix intermittent issue in wallet_bumpfee +pr 2020-08-27 07:21:59 +0100 28f4e53e168fe09b3ed9b811f12e1f990a304264 Merge #19752: test: Update wait_until usage in tests not to use the one from utils +v 2020-08-27 08:51:56 +0100 42ec5585424ceb91bed07826dde15697c020661a Justify the choice of ADDR cache lifetime +v 2020-08-27 08:51:56 +0100 81b00f87800f40cb14f2131ff27668bd2bb9e551 Add indexing ADDR cache by local socket addr +pr 2020-08-27 09:03:14 +0100 2562d5d23863b6ef6cbdd9c34db5e485d9dc8406 Merge #19761: build: improve sed robustness by not using sed +v 2020-08-27 09:57:20 +0100 407175e0c2bc797599ebd9c0a1f2ec89ad7af136 p2p: change CInv::type from int to uint32_t +v 2020-08-27 10:41:40 +0100 facb41bf1d1b7ee552c627f9829b4494b817ce28 test: Remove unused p2p_lock in VersionBitsWarningTest +pr 2020-08-27 15:21:37 +0100 91af7ef831d32a9db7719c64442a7d76cef5a931 Merge #19289: wallet: GetWalletTx and IsMine require cs_wallet lock +cr 2020-08-27 17:50:05 +0100 fad2794e93b4f5976e81793a4a63aa03a2c8c686 test: Rename wait until helper to wait_until_helper +v 2020-08-27 17:50:08 +0100 fa1cd9e1ddc6918c3d600d36eadea71eebb242b6 test: Remove unused lock arg from BitcoinTestFramework.wait_until +v 2020-08-27 18:50:39 +0100 cc26fab48d76a813d798657b18ae1af08a301150 tests: Add fuzzing harness for CNode +pr 2020-08-27 19:17:25 +0100 b987e657cda982a65c181e378ab9a9f3ca765b49 Merge #19169: rpc: Validate provided keys for query_options parameter in listunspent +pr 2020-08-27 19:33:00 +0100 15886b08aa5f05194633eba063d7412d0e4fd036 Merge bitcoin-core/gui#40: Clarify block height label +cr 2020-08-27 19:33:00 +0100 24bf17602c620445f76c3b407937751c8a894d37 gui refactor: Inline SplashScreen::ConnectWallet +cr 2020-08-27 19:33:00 +0100 b266b3e0bf29d0f3d5deaeec62d57c5025b35525 refactor: Create interfaces earlier during initialization +cr 2020-08-27 19:33:00 +0100 e4f435047121886edb6e6a6c4e4998e44ed2e36a refactor: Move wallet methods out of chain.h and node.h +v 2020-08-28 01:07:27 +0100 df536883d263781c2abe944afc85f681cda635ed chain: Remove UB CChain comparison +pr 2020-08-28 07:30:57 +0100 862fde88be706adb20a211178253636442c3ae00 Merge #19067: tests: Add fuzzing harness for CNode +cr 2020-08-28 09:42:04 +0100 fa0572d0f3b083b4c8e2e883a66e2b198c6779f1 Pass mempool reference to chainstate constructor +v 2020-08-28 10:39:26 +0100 fa48405ef84985e5a9d38ec38e90d16596ea45b5 Warn on unknown rw_settings +v 2020-08-28 10:42:18 +0100 772ea4844c34ad70d02fd0bd6c0945baa8fff85c wallet: Avoid recursive lock in IsTrusted +v 2020-08-28 10:42:18 +0100 819f10f6718659eeeec13af2ce831df3a0984090 wallet, refactor: Immutable CWalletTx::pwallet +pr 2020-08-28 12:44:47 +0100 4326515f01d7938bb448e7a9338dcc9c98497847 Merge #19822: chain: Fix CChain comparison UB by removing it (it was unused) +v 2020-08-28 13:17:28 +0100 7b6d0f10a7af7998f7cfcf3aeaa0269b61a321ce Remove old check for 3-byte shifted IP addresses from pre-0.2.9 node messages +pr 2020-08-28 13:36:40 +0100 1dac4dcf088f4ffc4129f2f4ffbf09561f5afcc8 Merge #19758: Drop deprecated and unused GUARDED_VAR and PT_GUARDED_VAR annotations +pr 2020-08-28 14:24:16 +0100 22acd36d5365932bedd9d6ef23fbd616105383c9 Merge #19646: doc: Updated outdated help command for getblocktemplate +pr 2020-08-28 15:50:57 +0100 9632b7edc74834c3249d08e94f44d27a5db1f435 Merge #19739: refactor: remove c-string interfaces for DecodeBase58{Check} +pr 2020-08-28 16:51:37 +0100 5edef20a65f05cb91b06bb0b308432c5dcbeca9a Merge #19797: net: Remove old check for 3-byte shifted IP addresses from pre-0.2.9 nodes +pr 2020-08-28 16:54:05 +0100 ca30d34cf94b7797272ef1920ca4b48716e7f999 Merge bitcoin-core/gui#39: Add visual accenting for the 'Create new receiving address' button +v 2020-08-28 17:01:06 +0100 b35e74ba379bdc12ea6d49a45469f0d6aa74cc27 wallet, refactor: Remove duplicate map lookups in GetAddressBalances +v 2020-08-28 19:12:02 +0100 7984c39be11ca04460883365e1ae2a496aaa6c0e test framework: serialize/deserialize inv type as unsigned int +pr 2020-08-28 19:29:16 +0100 1cf73fb8eba3b89a30d5e943deaec5052a8b21b7 Merge #19607: [p2p] Add Peer struct for per-peer data in net processing +v 2020-08-28 22:17:07 +0100 675e55e01392971aa56bda56cb09498b466d0902 Ignore unknown messages before VERACK +v 2020-08-29 02:55:27 +0100 ca185cf5a14b16d61814d7172284bc8efcd28b69 doc: Document differences in bitcoind and bitcoin-qt locale handling +v 2020-08-29 08:55:44 +0100 fa1fc536bb26471fd2a6fe8d12f98cf53c646306 test: Add tsan supp for leveldb::DBImpl::DeleteObsoleteFiles +pr 2020-08-29 09:03:45 +0100 baf9cedee89f34a391b11240984c27b162bccdba Merge #18817: doc: Document differences in bitcoind and bitcoin-qt locale handling +v 2020-08-29 09:26:25 +0100 bd897ce79f72a44a2e609f95433e251a3fd9eb9c scripted-diff: Move previous_release.py to test/get_previous_releases.py +v 2020-08-29 09:28:53 +0100 0374e821bd9e9498ce9c03aa8e5435870019978b util: Hard code previous release tarball checksums +pr 2020-08-29 12:42:04 +0100 4631dc5c578475fd3ca7a91676f7daf788a11192 Merge #18921: build: add stack-clash and control-flow protection options to hardening flags +v 2020-08-29 18:43:23 +0100 af9ea55a72c94678b343f5dd98dc78f3a3ac58cb Use LockAssertion utility class instead of AssertLockHeld() +v 2020-08-29 18:46:23 +0100 23d71d171e6e22ba5e4a909d597a54595b2a2c1f Do not hide compile-time thread safety warnings +v 2020-08-29 18:46:23 +0100 3ddc150857178bfb1c854c05bf9b526777876f56 Add missed thread safety annotations +v 2020-08-29 18:46:47 +0100 2ee7743fe723227f2ea1b031eddb14fc6863f4c8 sync.h: Make runtime lock checks require compile-time lock checks +v 2020-08-29 18:46:47 +0100 ea74e10acf17903e44c85e3678853414653dd4e1 doc: Add best practice for annotating/asserting locks +v 2020-08-30 09:34:59 +0100 cccc7525697e7b8d99b545e34f0f504c78ffdb94 rpc: Properly deserialize txs with witness before signing +v 2020-08-30 12:34:43 +0100 3ec8f4c080eab61563f11659c5f1370a34b77dc5 Set appveyor vm version to previous Visual Studio 2019 release. +v 2020-08-30 17:38:27 +0100 413e0d1d31ede6a9b539d63ec814b6e8044e35e2 Avoid callback when -blocknotify is empty +pr 2020-08-30 18:27:09 +0100 6eb97fb82382e8be7166e293887afbca3d4af40a Merge #19839: Set appveyor VM version to previous Visual Studio 2019 release +v 2020-08-30 21:37:06 +0100 12242b17a52c9833e6504f3f0a5b247a6e2fc5f9 cli: create initial -netinfo option, NetinfoRequestHandler class +v 2020-08-30 21:37:45 +0100 54799b66b466c0d015e6fe2f820663cc5d8e7998 cli: add ipv6 and onion address type detection helpers +pr 2020-08-31 02:59:21 +0100 f89b4f895fc6f116db85ae73afb882d3c21bfd35 Merge #19830: test: Add tsan supp for leveldb::DBImpl::DeleteObsoleteFiles +pr 2020-08-31 03:24:18 +0100 21eda43cdea808335385af5c35f3baa77239749c Merge #19828: wallet, refactor: Remove duplicate map lookups in GetAddressBalances +pr 2020-08-31 06:07:24 +0100 0adb80fe630ccaf3ab4577ad1070d35c2dd807d8 Merge #19803: Bugfix: Define and use HAVE_FDATASYNC correctly outside LevelDB +pr 2020-08-31 06:21:27 +0100 5c910a6b7aca81fabe4b79df57a37859af4f8f80 Merge #19826: Pass mempool reference to chainstate constructor +pr 2020-08-31 07:29:27 +0100 afffbb1bc64019f228a58b642d562cd4f2b36948 Merge #19710: bench: Prevent thread oversubscription and decreases the variance of result values +v 2020-08-31 08:10:02 +0100 a104caeb4008a6e0726ba604ece6f53549110354 Update the vcpkg checkout commit ID in appveyor config. +pr 2020-08-31 09:10:57 +0100 269a7ccb2784aca12d911368e223c7691880cf22 Merge #19099: refactor: Move wallet methods out of chain.h and node.h +pr 2020-08-31 09:56:34 +0100 61b8c04d78fb116e1722659ac455ad27856c6604 Merge #19379: tests: Add fuzzing harness for SigHasLowR(...) and ecdsa_signature_parse_der_lax(...) +pr 2020-08-31 11:45:27 +0100 7721b318099e0847ead8d4e864ad3daf4078d547 Merge #19773: wallet: Avoid recursive lock in IsTrusted +pr 2020-08-31 12:30:53 +0100 f98872f1279e73419bb415a07b919f88db7976f0 Merge #18244: rpc: fundrawtransaction and walletcreatefundedpsbt also lock manually selected coins +v 2020-08-31 12:34:57 +0100 c4be50fea31e85f0e7151ed5ecaba531f6f929db remove usage of boost::bind +v 2020-08-31 15:11:09 +0100 a3653c159e4f5c887eec9ea608e474eaa299fc07 cli: tally peer connections by type +v 2020-08-31 15:11:51 +0100 19377b2fd24704bff6c805946575b116f07d5e0d cli: start dashboard report with chain and version header +v 2020-08-31 15:11:59 +0100 d3f77b736e43b187771b901a6a3452f83c116918 cli: create inbound/outbound peer connections report +v 2020-08-31 15:12:01 +0100 c227100919dd2422b29eb3bca9c0f1a7983cc3a8 cli: create local addresses, ports, and scores report +v 2020-08-31 15:12:04 +0100 3a0ab93e1ce8d91235a6d46a57c6cb110fc5bf03 cli: add NetType enum struct and NetTypeEnumToString() +v 2020-08-31 15:12:36 +0100 f5edd66e5d136b229c805af9e6ea73218f6cedde cli: create vector of Peer structs for peers data +v 2020-08-31 15:12:44 +0100 ce57bf6cc0cdaf8233fd8a20e0d1c5b69d17d2a3 cli: create peer connections report sorted by dir, minping +v 2020-08-31 15:13:17 +0100 644be659abfcf7c638e17795bafedad73bc55b27 cli: add -netinfo server version check and error message +v 2020-08-31 15:13:26 +0100 4e2f2ddd6444d93dd7e60ec67cc393dfc2a29b9d cli: add getpeerinfo last_{block,transaction} to -netinfo +v 2020-08-31 15:13:29 +0100 077b3ac9284a90f33e31c64c49062ceaf815af60 cli: change -netinfo optional arg from bool to int +pr 2020-08-31 15:18:29 +0100 c1e0c2ad3b6cd9e7ef55287fb572cfcf10a0e660 Merge #19813: util, ci: Hard code previous release tarball checksums +pr 2020-08-31 16:02:20 +0100 068bc211881c790225e9979eb16ce4f44fb64e01 Merge #19842: Update the vcpkg checkout commit ID in appveyor config +pr 2020-08-31 16:43:35 +0100 89a8299a14af68c1f96ca1650cbfd4fc2952e77b Merge #19717: rpc: Assert that RPCArg names are equal to CRPCCommand ones (mining,zmq,rpcdump) +v 2020-08-31 17:29:55 +0100 fa80c814874a2893e4323ba5148fba21d7f421cd Assert that RPCArg names are equal to CRPCCommand ones (blockchain) +cr 2020-08-31 17:29:57 +0100 fa6bb0ce5dba33970e2c1e47ea4d0d2c0718eccb Assert that RPCArg names are equal to CRPCCommand ones (rawtransaction) +cr 2020-08-31 17:39:19 +0100 3340dbadd38f5624642cf0e14dddbe6f83a3863b Remove -zapwallettxes +pr 2020-08-31 19:46:27 +0100 e796fdd4cb8ed1adfcf128549f3e8cc1af2759b9 Merge #19507: Expand functional zmq transaction tests +pr 2020-09-01 02:26:28 +0100 a1d14f522c45d10cfeb544ee7bd70636ab917a9e Merge #19671: wallet: Remove -zapwallettxes +pr 2020-09-01 07:18:26 +0100 bab4cce1b0eedc1a51692aaf83ba54dd0a9d17e6 Merge #19668: Do not hide compile-time thread safety warnings +v 2020-09-01 07:23:08 +0100 e36f802fa4916586b53a989c0848389ad838b846 lint: add C++ code linter +v 2020-09-01 10:34:11 +0100 939807768acd508932f2efabee660d56324a73df refactor: CTxMemPool::UpdateParent() requires CTxMemPool::cs lock +v 2020-09-01 10:34:19 +0100 66e47e5e506043fbb9b4e487b44bf992985709c9 refactor: CTxMemPool::UpdateChild() requires CTxMemPool::cs lock +v 2020-09-01 10:34:29 +0100 7140b31b90cbd84d75eedb3e395d0d55f83b5b95 refactor: CTxMemPool::ApplyDelta() requires CTxMemPool::cs lock +v 2020-09-01 10:34:29 +0100 fa5fcb032b6ed04c49ee465235288b8059fa805e refactor: CTxMemPool::ClearPrioritisation() requires CTxMemPool::cs lock +v 2020-09-01 10:34:39 +0100 7c4bd0387a01a0c3e2938d530dba3c882e4d8f2b refactor: CTxMemPool::GetTotalTxSize() requires CTxMemPool::cs lock +v 2020-09-01 10:36:27 +0100 020f0519ec66d9626255b938e1c6c3f7f9aa4017 refactor: CTxMemPool::IsUnbroadcastTx() requires CTxMemPool::cs lock +v 2020-09-01 14:28:39 +0100 8de51d1513ada6d96b80f164da48088e5cdcbe3f doc: elaborate on release notes wrt netmasks +pr 2020-09-01 16:12:20 +0100 48c1083632687a42ac603d4f241e70616a1d3815 Merge #19105: Add Muhash3072 implementation in Python +v 2020-09-01 16:23:58 +0100 a06eb03ded1a70879db86a03c2d6831e2ed75f62 doc: Add comments and additional reviewers to CODEOWNERS file +v 2020-09-01 16:46:28 +0100 d780293e1ee0f9e66bd2d88914694c17f9aaa0ca net: improve nLastBlockTime and nLastTXTime documentation +cr 2020-09-01 17:13:50 +0100 f1ee37319a7a211e5fb325406d62db5b61dbd30e wallet: Reload previously loaded wallets on GUI startup +pr 2020-09-02 08:09:18 +0100 3a3e21dafb721e96fc60355462f93d9edfda528c Merge #14687: zmq: enable tcp keepalive +v 2020-09-02 08:33:17 +0100 83ad65f31b5c9441ae1618614082e584854a14e1 Address nits in ADDR caching +v 2020-09-02 08:33:18 +0100 0d04784af151de249bbbcbad51e6e8ad9af8f5a3 Refactor the functional test +pr 2020-09-02 12:45:40 +0100 505b39e72b48043f6adf29f4519d5add3e90a1c7 Merge #19610: p2p: refactor AlreadyHave(), CInv::type, INV/TX processing +v 2020-09-02 12:51:36 +0100 6de942908726480fb2919ed1f1b7906a63ec576d qa: Changes v0.17.1 to v0.17.2 +pr 2020-09-02 13:35:25 +0100 c17a00375808438c01e7639a28a73241554b52aa Merge #19857: net: improve nLastBlockTime and nLastTXTime documentation +pr 2020-09-02 14:03:05 +0100 8845b38b599e15eb8073b679b55eec953fe9d171 Merge #19685: depends: CMake invocation cleanup +pr 2020-09-02 14:14:34 +0100 c157a50694545090cb1c7e69123fe4709bd5a279 Merge #19840: Avoid callback when -blocknotify is empty +v 2020-09-02 14:21:33 +0100 752e6ad5336d5af0db9fe16d24c0c6aa25b74a3f Protect localhost and block-relay-only peers from eviction +v 2020-09-02 15:24:23 +0100 bf1f913c4405cba35c8f99ec07b407940eb955b6 cli -netinfo: display multiple levels of details +v 2020-09-02 20:17:13 +0100 9bdde3c802e1512cbcd8ae8f7db72b6fe13ea829 build: add /usr/local/ to LCOV_FILTER_PATTERN for macOS builds +cr 2020-09-02 21:34:58 +0100 8d6ff46f55f373e344278ab3f1ac27b1dba36623 scripted-diff: Rename `OUTBOUND` ConnectionType to `OUTBOUND_FULL_RELAY` +v 2020-09-02 21:36:29 +0100 a6ab1e81f964df131cfa0e11e07bedb3283b823f [net] Remove unnecessary default args on OpenNetworkConnection +v 2020-09-03 01:18:21 +0100 1d74fc7df621b31d1b8adc9d7f53e7478d6e40b5 [trivial] Small style updates +cr 2020-09-03 01:18:21 +0100 dff16b184b1428a068d144e5e4dde7595b4729c0 [refactor] Restructure logic to check for addr relay. +v 2020-09-03 01:18:21 +0100 ff6b9081add3a40d53b1cc1352b57eeb46e41d45 [doc] Explain address handling logic in process messages +v 2020-09-03 01:18:22 +0100 1e563aed785565af6b7aed7f7399c52205d8f19c [refactor] Simplify check for block-relay-only connection. +v 2020-09-03 01:18:22 +0100 4829b6fcc6489b445f80689af6c2a1a919f176b1 [refactor] Simplify connection type logic in ThreadOpenConnections +v 2020-09-03 01:18:22 +0100 d5a57cef62ee9e9d30f7e3b80e178149ceeef67c [doc] Describe connection types in more depth. +v 2020-09-03 01:18:22 +0100 da3a0be61b025224231206cb4656e420453bfdeb [test] Add explicit tests that connection types get set correctly +v 2020-09-03 01:18:22 +0100 eb1c5d090f4ef844dabc1e8bf3864c1afe1c791c [doc] Follow developer notes, add comment about missing default. +pr 2020-09-03 04:36:45 +0100 2d4574aad84aa98d39e7777b63d702f59026ca24 Merge #19861: build: add /usr/local/ to LCOV_FILTER_PATTERN for macOS builds +pr 2020-09-03 04:43:10 +0100 9876ab8c74efe7cf7ebccb2b90b52e7b5957524f Merge #19844: remove usage of boost::bind +pr 2020-09-03 05:07:53 +0100 136fe4c5e9fbaff1b461571c5f67d4fafe12c4ea Merge #19816: test: Rename wait until helper to wait_until_helper +pr 2020-09-03 05:47:01 +0100 68f0ab26bca825edf7e48a69176c38b04e3158d0 Merge #19805: wallet: Avoid deserializing unused records when salvaging +pr 2020-09-03 12:28:30 +0100 620ac8c47539b5131e902df272fcc8b2d5a7c54a Merge #19724: [net] Cleanup connection types- followups +pr 2020-09-03 12:38:21 +0100 4053de04e23962f793303b1e68cd89d82fe14335 Merge #19859: qa: Fixes failing functional test by changing version +pr 2020-09-03 16:20:47 +0100 69a13eb2467ae04b001c927fc359d12192199350 Merge #19670: Protect localhost and block-relay-only peers from eviction +pr 2020-09-03 16:23:52 +0100 bd60a9a8edd4a3fe2f4f605b77cdae34969eaaf2 Merge #19818: p2p: change `CInv::type` from `int` to `uint32_t`, fix UBSan warning +v 2020-09-03 16:47:46 +0100 e4557133f595f357df5e16ae4f2f19c579631396 [tests] Move bech32 unit tests to test framework +v 2020-09-03 16:47:49 +0100 011e784f74411bd5d5dbccfd3af39e0937fd8933 [tests] Rename segwit encode and decode functions +v 2020-09-03 16:47:49 +0100 64eca45100536579a3849631e59d4277bbc25be1 [tests] Fix pep8 style violations in address.py +v 2020-09-03 16:47:49 +0100 7f639df0b8a15aaeccedab00b634925f568c2c9a [tests] Remove unused optional verify_checksum parameter +v 2020-09-03 16:47:49 +0100 825fcae484f31182041dfacbf820e818d759b130 [tests] Replace bytes literals with hex literals +v 2020-09-03 16:47:49 +0100 b230f8b3f3adcb1e2ae299094f9ae0a8bc7cc3d0 [tests] Correct docstring for address.py +v 2020-09-03 16:47:49 +0100 ea70e6a2ca0e183ef40cdb9b3b86f39e94366015 [tests] Tidy up imports in address.py +cr 2020-09-03 17:24:32 +0100 0d94e6062547f288a75921d2433458a44a5f2297 refactor: Use DatabaseStatus and DatabaseOptions types +cr 2020-09-03 17:24:32 +0100 288b4ffb6b291f0466d513ff3c40af6758ca7c88 Remove WalletLocation class +cr 2020-09-03 17:24:32 +0100 3c815cfe54087fd139169161d2fd175e99840e6a wallet: Remove Verify and IsLoaded methods +cr 2020-09-03 17:24:32 +0100 77d5bb72b8722ec7a6c7c33479a532cbd5870ba4 wallet: Remove path checking code from createwallet RPC +v 2020-09-03 17:24:32 +0100 7bf6dfbb484adfda3b8df26ee3e2ebda239dd263 wallet: Remove path checking code from bitcoin-wallet tool +v 2020-09-03 17:24:32 +0100 8b5e7297c02f3100a9cb27bfe206e3fc617ec173 refactor: Pass wallet database into CWallet::Create +pr 2020-09-03 17:24:32 +0100 a0a422c34cfd6514d0cc445bd784d3ee1a2d1749 Merge #19754: wallet, gui: Reload previously loaded wallets on startup +cr 2020-09-03 17:24:32 +0100 a987438e9d9cad0b5530e218a447928485f3fd93 wallet: Remove path checking code from loadwallet RPC +cr 2020-09-03 17:24:32 +0100 b5b414151af32e5a07b5757b64482d77519d77c0 wallet: Add MakeDatabase function +v 2020-09-04 10:25:44 +0100 ac2ff4fb1e06270cf17727f90599c9f3a55ddd5a refactor: Avoid duplicate map lookup in ScriptToAsmStr +pr 2020-09-04 12:20:22 +0100 99a8eb60518050c22bbfc634a1a90cbae29aff03 Merge #19854: Avoid locking CTxMemPool::cs recursively in simple cases +pr 2020-09-04 14:09:37 +0100 23d3ae7accfc690298b1b0bac9615155f485c5ad Merge #19405: rpc, cli: add network in/out connections to `getnetworkinfo` and `-getinfo` +v 2020-09-04 16:48:02 +0100 36f8e0cce700576865e61035626e08c5e845a38a doc: update PyZMQ installation instructions, ZeroMQ link +v 2020-09-04 16:48:32 +0100 062e6699c4ac48c3d46516190ec411dec3680a0d script: fix zmq_sub.py file permissions +cr 2020-09-04 17:46:44 +0100 296be8f58e02b39a58f017c52294aceed22c3ffd Get rid of unused functions CTxMemPool::GetMemPoolChildren, CTxMemPool::GetMemPoolParents +cr 2020-09-04 17:46:44 +0100 46d955d196043cc297834baeebce31ff778dff80 Remove mapLinks in favor of entry inlined structs with iterator type erasure +v 2020-09-04 22:21:18 +0100 4294e706909341ab5bf7d99d794434dff5c44a08 rawtransaction: fix argument in combinerawtransaction help message +v 2020-09-04 22:29:29 +0100 cb79b9dbf4cd06e17c8c65b36bf15c3ea2641de4 [mempool] Revert unbroadcast set to tracking just txid +v 2020-09-04 22:37:44 +0100 fc66d0a65cdc52a3b259effe0c29b5eafb1b5ff5 [p2p] Check for nullptr before dereferencing pointer +v 2020-09-04 22:42:30 +0100 125c0381266e0e05a408f8e1818501ab73d29110 [p2p] Remove dead code +v 2020-09-04 22:42:59 +0100 a8a64acaf32ac21feeb885671772282b531ef9a2 [BroadcastTransaction] Remove unsafe move operator +pr 2020-09-05 10:19:45 +0100 df75e9f3ee4de2b841fe0e84514b58a4e630d258 Merge #19878: rawtransaction: fix argument in combinerawtransaction help message +v 2020-09-05 10:44:25 +0100 fa831684e54783f6b40533ca218eb7636bdae667 refactor: Add IsRBFOptInEmptyMempool +v 2020-09-05 10:44:43 +0100 faef4fc9b4990e563022b6ab595cb02c4060c216 Remove mempool global from interfaces +v 2020-09-05 10:45:16 +0100 fa9ee52556f493e4a896e2570ca1a3102d777d9a doc: Add doxygen comment to IsRBFOptIn +pr 2020-09-05 12:43:36 +0100 81a19e725304bc77c39491f312913b47b76a6dac Merge #19852: refactor: Avoid duplicate map lookup in ScriptToAsmStr +v 2020-09-05 13:02:55 +0100 fa8e1487144eab237ffd291397355ef4801f46f8 ci: Double tsan CPU and Memory to avoid global timeout +pr 2020-09-05 13:08:16 +0100 416efcb7ab4545d65c675338065aaaa46f800748 Merge #19728: Increase the ip address relay branching factor for unreachable networks +pr 2020-09-05 14:33:14 +0100 3ba25e3bdde3464eed5d2743d68546e48b005544 Merge #19848: Remove mempool global from interfaces +v 2020-09-05 15:24:08 +0100 eeee1104d78eb59a582ee1709ff4ac2c33ee1190 Remove mempool global from init +v 2020-09-05 15:24:52 +0100 fa0359c5b30730744aa8a7cd9ffab79ded91041f Remove mempool global from p2p +v 2020-09-05 15:24:56 +0100 fafb381af8279b2d2ca768df0bf68d7eb036a2f9 Remove mempool global +v 2020-09-05 18:55:59 +0100 56b018ca7f37d25041b74f1bec305bdf54a55b9b test: Fix flaky wallet_basic test +v 2020-09-06 01:29:30 +0100 2f79e9d00206a5230377f49be7b2f6da70f80417 refactor: remove unused header in protocol.cpp +pr 2020-09-06 06:50:00 +0100 03689317021a72431762c1974530f2a980a7fffa Merge #19881: ci: Double tsan CPU and Memory to avoid global timeouts +v 2020-09-06 10:59:01 +0100 abac4367607d8d2b628e4db6a9663c960bacdacc wallet: Avoid multiple BerkeleyBatch in DelAddressBook +pr 2020-09-06 12:03:43 +0100 c91f955f44903df559ee8dfce1aa86cb89457b6e Merge #19887: test: Fix flaky wallet_basic test +pr 2020-09-06 12:17:51 +0100 68d1f1698f50f9f3c848d988b6f89fe981cc662c Merge #19890: refactor: remove unused header in protocol.cpp +v 2020-09-06 17:15:04 +0100 637d8bce741213295bd9b9d1982cae663c701ba1 Change FILE_CHAR_BLOCKLIST to FILE_CHARS_DISALLOWED +pr 2020-09-06 18:35:22 +0100 af8135e369dae43d8ccaf2a76dfb461c05cc5ae7 Merge #19897: Change FILE_CHAR_BLOCKLIST to FILE_CHARS_DISALLOWED +pr 2020-09-07 00:45:36 +0100 56d47e19edca0c3f9898d904de271251de6d6dc5 Merge #19619: Remove wallet.dat path handling from wallet.cpp, rpcwallet.cpp +v 2020-09-07 02:35:18 +0100 2ac8bf95834c8a43ebf365f09fb610829733134b Implement keccak-f[1600] and SHA3-256 +v 2020-09-07 02:35:23 +0100 3f01ddb01bfffd49dfa131898d1c674ac5d0ac99 Add SHA3 benchmark +v 2020-09-07 02:35:23 +0100 ab654c7d587b33d62230394663020439f80cee28 Unroll Keccak-f implementation +pr 2020-09-07 04:56:31 +0100 78cb45d72251e85db07e8500bbdd2e9460b132b2 Merge #19738: wallet: Avoid multiple BerkeleyBatch in DelAddressBook +pr 2020-09-07 08:47:28 +0100 07087051afe9cd5a66ea3e9c0a05079b1ffff47f Merge #19556: Remove mempool global +v 2020-09-07 09:55:06 +0100 e15b1cfc310df739b92bd281112dbeb31d3bb30a Various cleanups in zmqnotificationinterface. +v 2020-09-07 09:55:54 +0100 b93b9d54569145bfcec6cee10968284fe05fe254 Simplify and fix notifier removal on error. +v 2020-09-07 09:55:55 +0100 7f2ad1b9acef4ccc1b3e1a9f551416235d95cbfd Use std::unique_ptr for CZMQNotifierFactory. +cr 2020-09-07 09:56:22 +0100 a3ffb6ebebd753cec294c91cef7c603a30cf217e Replace zmqconfig.h by a simple zmqutil. +pr 2020-09-07 11:06:55 +0100 25839661305ec9fe8c25d171e31270d95311a4e4 Merge #19478: Remove CTxMempool::mapLinks data structure member +cr 2020-09-07 11:13:58 +0100 2297b26b3ce95e935c0ebb8c38dabf19965054a5 [net_processing] Pass chainparams to PeerLogicValidation constructor +cr 2020-09-07 11:13:58 +0100 824bbd1ffba3df7ffa6f5bfaa31298cd484473b1 [move only] Collect all private members of PeerLogicValidation together +v 2020-09-07 11:15:48 +0100 58bd369b0ddd3383f7bdf7840912d18b96545f91 scripted-diff: [net processing] Rename PeerLogicValidation to PeerManager +v 2020-09-07 11:16:12 +0100 3115e00f75b41d9765dcbb376e367b25f61a1d58 [net processing] Move MaybePunishPeerForTx to PeerManager +v 2020-09-07 11:16:12 +0100 64f6162651420be2f4aa1498f0378a86780bc089 [whitespace] tidy up indentation after scripted diff +cr 2020-09-07 11:16:12 +0100 aa114b1c9b06c2bd3ed936bbb9fb32b31f75bdb2 [net_processing] Move SendBlockTransactions into PeerManager +cr 2020-09-07 11:16:12 +0100 b70cd890e375e904b7f36b3d959e5656f5a5cbcd [net processing] Move MaybePunishNodeForBlock into PeerManager +v 2020-09-07 11:16:12 +0100 bb6a32ce9983c72afa90f41a43a47ffd703ca006 [net processing] Move Misbehaving() to PeerManager +cr 2020-09-07 11:16:12 +0100 d7778351bf60a21925a97b7fc4e9df5541b6d995 [net processing] Move ProcessHeadersMessage to PeerManager +cr 2020-09-07 11:16:12 +0100 e662e2d42afaf9c67c898634a0f3bc200255b6ea [net processing] Move ProcessOrphanTx to PeerManager +v 2020-09-07 13:49:37 +0100 6954156b4091bc1e561502f0eef0cece56c76eec qt: Fix visual quality of text in QR image +v 2020-09-07 14:06:24 +0100 fa188c9c59b8c3e43c31be01797f073e27a7bc10 test: Use MiniWalet in p2p_feefilter +v 2020-09-07 15:48:21 +0100 ac71fe936da290adf5a3155fe8db5f78b485f1f1 [doc] Clarify scope of eviction protection of outbound block-relay peers +pr 2020-09-07 17:09:15 +0100 147d50d63e07f600b414273a9f6b84f9f4ad9696 Merge #19791: [net processing] Move Misbehaving() to PeerManager +v 2020-09-07 19:03:44 +0100 e9a6d8b13b0558b17cdafbd32fd2663b4138ff11 p2p: Unify Send and Receive protocol versions +v 2020-09-07 19:03:54 +0100 8d2026796a6f7add0c2cda9806e759817d1eae6f refactor: Rename local variable nSendVersion +v 2020-09-07 19:03:54 +0100 e084d45562b94827b3a7873895882fcaae9f4d48 p2p: Remove SetCommonVersion() from VERACK handler +v 2020-09-07 19:03:55 +0100 ddefb5c0b759950942ac03f28c43b548af7b4033 p2p: Use the greatest common version in peer logic +cr 2020-09-07 19:33:16 +0100 1bc8d0fd5906bc9637d513cd193a1f47ad94da28 [rpc] walletcreatefundedpsbt: allow inputs to be null +cr 2020-09-07 19:33:16 +0100 2c2a1445dc9d22c9d729b8301c8b3f54195bcfcf [rpc] add snake case aliases for transaction methods +cr 2020-09-07 19:55:53 +0100 6e8dd99ef1c147898bd06fee7014afdff6618f18 [net processing] Add doxygen comments for orphan data and function +cr 2020-09-07 19:57:32 +0100 55c79a9cefb6c83cdebbf6c538c471607695b457 ProcessOrphanTx: remove useless done variable +cr 2020-09-07 20:07:43 +0100 4763b51bca86fb9e49175619a47cdbef34feaf99 ProcessOrphanTx: remove useless setMisbehaving set +cr 2020-09-07 20:08:43 +0100 e07c5d94231cefb748f9534ab8ff0b3e2b04c4d8 ProcessOrphanTx: Remove outdated commented +cr 2020-09-07 20:10:17 +0100 4fce726bd1e35a686cd9d48add5da22b1b5e25e1 ProcessOrphanTx: Remove aliases +cr 2020-09-07 20:12:02 +0100 001343f4bc8b22fa9e313bd2867756eb9d614fa3 ProcessOrphanTx: Move AddToCompactExtraTransactions call into ProcessOrphanTx +v 2020-09-08 06:55:11 +0100 fa7e407b504bc60c77341f02636ed9d6a4b53d79 Do not pass chain params to CheckForStaleTipAndEvictPeers twice +v 2020-09-08 07:45:42 +0100 a9f201439a84096a209bebc11705656b08d1b488 build: use DIR_FUZZ_SEED_CORPUS if specified for cov_fuzz target +v 2020-09-08 07:47:53 +0100 fb3bacce69a39bf86288ece239c1be63518e11fb .gitignore: ignore qa-assets/ folder +pr 2020-09-08 21:13:39 +0100 4f229d8904f8e3494cab30d61df9f11f1cc06388 Merge #19914: refactor: Do not pass chain params to CheckForStaleTipAndEvictPeers twice +v 2020-09-09 02:02:53 +0100 1bee1e6269b76b52b1eab9112d39c245beaa27a2 Do not create default wallet +cr 2020-09-09 02:02:53 +0100 d26f0648f1c0d1115dcb8d76e57195032b88f400 Tell users how to load or create a wallet when no wallet is loaded +pr 2020-09-09 08:06:22 +0100 564e1ab0f3dc573bd3ea60a80f6649c361243df9 Merge #19800: test: Mockwallet +v 2020-09-09 09:38:50 +0100 fa65a11d0c9a34ff7f4cc4efd53367794e751749 test: bugfix: Actually pick largest utxo +v 2020-09-09 09:39:05 +0100 faba790bd40b5a9e8849997785020790ff60571b test: MiniWallet: Default fee_rate in send_self_transfer, Pass in utxo_to_spend +cr 2020-09-09 10:27:28 +0100 fa56e866e8ac08b35e775a4e37a4e5849e093c7d test: Run rpc_txoutproof.py even with wallet disabled +v 2020-09-09 10:27:33 +0100 faf5eb45c4a08fbfd9a8c12534bca8adfe756ef2 test: Test empty array in gettxoutproof +v 2020-09-09 10:27:35 +0100 faf251d854e3a670533ea3e9087e82c92f3ae533 test: gettxoutproof duplicate txid +cr 2020-09-09 16:47:31 +0100 8b39a875581bed1c2f40a7d9616bdb7cc642bf59 bugfix: make LoadWallet assigns status always +v 2020-09-09 19:57:06 +0100 62dba9628d2532dca0c44934600f5aac3b21e275 log: print unexpected version warning in validation log category +v 2020-09-10 02:47:40 +0100 404682b7cdb54494e7c98f0ba0cac8b51f379750 add signet basic support (signet.cpp) +cr 2020-09-10 02:47:40 +0100 a2147d7dadec1febcd9c2b8ebbbf78dce6d0556b validation: move GetWitnessCommitmentIndex to consensus/validation +cr 2020-09-10 12:44:53 +0100 92326d89766155a792254d30a9962251b8fc7799 [rpc] add send method +v 2020-09-10 14:51:03 +0100 d76925478efd35e6fd835370639f2139b28381e4 [doc] Clarify semantic of peer's m_protect w.r.t to outbound eviction logics +cr 2020-09-10 15:02:10 +0100 d11020019a0c93dcc56859cdfcd9f0c6a777424f Add OpenBSD instructions for building the Qt GUI +cr 2020-09-10 15:37:14 +0100 784f757994c1306bb6584b14c0c78617d6248432 [refactor] clarify tests by referencing p2p objects directly +pr 2020-09-10 15:37:21 +0100 a47e5964861dfb98d61719c9852e12fd6da84c31 Merge #19841: Implement Keccak and SHA3_256 +v 2020-09-10 15:38:28 +0100 7a0de46aeafb351cffa3410e1aae9809fd4698ad [doc] sample code for test framework p2p objects +v 2020-09-10 15:39:01 +0100 549d30faf04612d9589c81edf9770c99e3221885 scripted-diff: replace p2p with p2ps[0] in p2p_invalid_tx +v 2020-09-10 15:39:14 +0100 10d61505fe77880d6989115defa5e08417f3de2d [test] remove confusing p2p property +v 2020-09-10 15:54:30 +0100 fc7f84a9ca98ee0d9c2d1f092be6b5dba3f2a582 tests: Add fuzzing harness for Keccak and SHA3_256 +v 2020-09-10 17:04:53 +0100 812037cb80f72096738cf2b0c15b39536c6c1e24 Change CSipHasher's count variable to uint8_t +pr 2020-09-11 06:12:54 +0100 dffefda21de00ceb564763e7afa9bbffbb1f3df5 Merge #19870: doc: update PyZMQ install instructions, fix zmq_sub.py file permissions +pr 2020-09-11 07:22:12 +0100 9366a73d695136fec8de12d3942254543903c0cd Merge #19916: build: allow user to specify DIR_FUZZ_SEED_CORPUS for cov_fuzz +cr 2020-09-11 12:35:39 +0100 d2bb681f96fb327b4c4d5b2b113692ca22fdffbf util: move HasPrefix() so it can be reused +pr 2020-09-11 15:16:48 +0100 f2d9934381bf89f1746f13cc5f86ae199eaa52bb Merge #19922: test: Run rpc_txoutproof.py even with wallet disabled +ff 2020-09-11 20:44:08 +0100 894fb33f4c1b24667891f7d2aff9f486177b1173 Update src/secp256k1 subtree to upstream libsecp256k1 +cr 2020-09-11 20:44:08 +0100 b9c1a7648131c5deec9704ee9acd00ec1820b9ce Squashed 'src/secp256k1/' changes from 2ed54da18a..8ab24e8dad +v 2020-09-12 19:24:26 +0100 1df2cd1c8f468bd7a5b1335a46ccea28fbddaacb QA: blocktools: Accept block template to create_block +v 2020-09-12 19:24:26 +0100 d438d609cd64fe532d94e45000495de93ef99aa6 QA: Use GBT to get block versions correct +pr 2020-09-13 01:04:43 +0100 be375b2206fef8a5b6860eed14daab5f82386da4 Merge #19919: bugfix: make LoadWallet assigns status always +v 2020-09-13 18:43:03 +0100 e1fdd2963baab68bb6a77af2ad7a07fcacd4e73e Test batch rpc with params +pr 2020-09-14 04:52:24 +0100 ba4b3fbcf21317a9410f3be913e4437d58968091 Merge #19944: Update secp256k1 subtree (including BIP340 support) +v 2020-09-14 09:12:36 +0100 afecde8046b5f13253f1a7d687b4a90841b5766c build: add PTHREAD_LIBS to LDFLAGS configure output +pr 2020-09-14 09:30:17 +0100 06dbbe76dd027e924eb95ffc4b409daffaefe61b Merge #19931: Change CSipHasher's count variable to uint8_t +cr 2020-09-14 09:35:00 +0100 68e3e2294483cfee6bba8b5481eaee293e981ae8 scripted-diff: add FUZZ_SUITE_LDFLAGS_COMMON +cr 2020-09-14 09:35:09 +0100 15c27c44417ab77a660b53b8574f7eb5261b19f8 build: split PTHREAD_* flags out of AM_LDFLAGS +v 2020-09-14 09:35:09 +0100 fc9278d162c342bace8a147da6bc4f9941d8d9d7 build: AX_PTHREAD serial 27 +v 2020-09-14 14:11:25 +0100 dba8196b447b6a85be66890db70928100e867d8b policy/fees: correct decay explanation comments +v 2020-09-14 14:11:30 +0100 5b8cb35621891b681f9b49a9de5f6d8da4ccdecc policy/fee: remove requireGreater parameter in EstimateMedianVal() +v 2020-09-14 14:26:44 +0100 569d92a4d2924a1f6d50775980b591552f6372e7 policy/fees: small readability improvements +v 2020-09-14 14:28:27 +0100 c36869bbf6a38626833b4aea53be024c48ede475 policy/fees: unify some duplicated for loops +cr 2020-09-14 15:23:23 +0100 a3abeec33a6ae903e514c7a7b6f587b7c17288a0 policy/fees: remove a floating-point division by zero +cr 2020-09-14 15:42:45 +0100 4668ded6d6ea4299d998abbb57543f37519812e2 validation: Move ~CMainCleanup logic to ~BlockManager +pr 2020-09-15 03:49:08 +0100 ffaac6e6142a1cf61e8e12d7fc406fcb02300144 Merge #16378: The ultimate send RPC +pr 2020-09-15 05:05:21 +0100 5d5e335f96970fcb1a97c3fd1ab9f8bac1a82908 Merge #19903: Update build-openbsd.md with GUI support +pr 2020-09-15 08:01:50 +0100 a33651866c863328e8aca870465cc1c99a4240d6 Merge #19643: Add -netinfo peer connections dashboard +v 2020-09-15 08:38:56 +0100 6fe2ef2acb00b1df7f6a0c0dea1a81a1924be0e1 scripted-diff: Rename SendMessage to SendZmqMessage. +pr 2020-09-15 12:03:02 +0100 48a9968e508581e726feefe34e3bc0bf4a0b61ed Merge #19558: build: split pthread flags out of ldflags and dont use when building libconsensus +pr 2020-09-15 14:46:08 +0100 62e3eb9888934189d7cdec3c0170f88e9cb05ecf Merge #19241: help: Generate checkpoint height from chainparams +v 2020-09-15 14:48:59 +0100 f07fb5a55e2d5d87f288c988a24ae8b9e3f827a1 build: patch qt libpng to fix powerpc build +cr 2020-09-15 19:11:34 +0100 74f73c783d46b012f375d819e2cd09c792820cd5 validation: Pass in chainman to UnloadBlockIndex +cr 2020-09-15 19:13:44 +0100 f8d4975ab3fcd3553843cf0862251289c88c106b validation: Move PruneOneBlockFile to BlockManager +pr 2020-09-15 23:30:57 +0100 1c4f59728c35dc61c213932ffa593826db10095a Merge #19879: [p2p] miscellaneous wtxid followups +v 2020-09-16 02:01:32 +0100 2233a93a109b10b6fe0f5f26c2bb529c8de3dde7 [rpc] Return fee and vsize from testmempoolaccept +v 2020-09-16 15:19:58 +0100 23c35bf0059bd6270218e0b732959e9c754f9812 [test] add get_vsize util for more programmatic testing +pr 2020-09-16 15:25:00 +0100 a518b1c26b71dc5040e620f86973cc812024e9c7 Merge #19936: Test: batch rpc with params +pr 2020-09-16 15:30:45 +0100 be3af4f31089726267ce2dbdd6c9c153bb5aeae1 Merge #19934: tests: Add fuzzing harness for Keccak and SHA3_256 +v 2020-09-16 17:58:21 +0100 7a89f2e6c539a54bcaa24bff41aae3910244ad3d build: Fix target name +v 2020-09-17 13:45:17 +0100 fe42411b4b07b99c591855f5f00ad45dfeec8e30 test: move HasReason so it can be reused +v 2020-09-17 14:29:52 +0100 efc9b85e6f4aa431d308089874a18f0bbdcdd0fd Mark send RPC experimental +v 2020-09-17 19:59:09 +0100 0fc1c685e1ca68ca8ed2b35f623bbe6a9fc36d66 [rpc] send: fix parsing replaceable option +v 2020-09-17 20:10:56 +0100 d813d26f06248aaa7be3c698c87939cc777fafd0 [rpc] send: various touch-ups +v 2020-09-17 20:10:56 +0100 f7b331ea85d45c7337e527b6e77a45da7a689b7d rpc: add brackets to ConstructTransaction +cr 2020-09-17 21:17:17 +0100 e0d73573a37bf4b519f6f61e5678572d48a64517 net: CNetAddr: add support to (un)serialize as ADDRv2 +pr 2020-09-18 01:03:55 +0100 652c45fdbbd55bde95c8c6cf08a5feb6055ac112 Merge #15454: Remove the automatic creation and loading of the default wallet +v 2020-09-18 01:37:57 +0100 a8de47a1c9033fac3355590f1fe2158a95011bb3 consensus: add signet validation +cr 2020-09-18 01:37:57 +0100 c7898bca4e1ccbc6edafd3b72eaf80df38e3af32 qt: update QT to support signet network +cr 2020-09-18 01:37:57 +0100 e8990f121405af8cd539b904ef082439261e6c93 add signet chain and accompanying parameters +v 2020-09-18 02:19:42 +0100 3efe298dccb248f25d6b01ab6a80b1cd6c9e1a1e signet: hard-coded parameters for Signet Global Network VI (2020-09-07) +cr 2020-09-18 02:19:42 +0100 4c189abdc452f08dfa758564b5381bc78c42d481 test: add small signet fuzzer +v 2020-09-18 02:19:42 +0100 ec9b25d046793be50da1c11ba61d1b4b13b295b0 test: signet network selection tests +v 2020-09-18 02:19:43 +0100 8258c4c0076bb5f27efdc117a04b27fcd6dd00b2 test: some sanity checks for consensus logic +v 2020-09-18 02:19:43 +0100 e47ad375bf17557f805bd206e789b8db78c6338a test: basic signet tests +v 2020-09-18 10:07:53 +0100 0d9d2a1f7c26dc9c7b233ea8c3182fe1f8936bca Only update the updateSmartFeeLabel once in sync +v 2020-09-18 16:54:42 +0100 a5f5374b43275ce4529c3a44c4b44e478d35e079 test: create default wallet in extended tests +pr 2020-09-19 07:31:43 +0100 967be53aeec9f02b90f132e0482d27af4c85dd95 Merge #19971: test: create default wallet in extended tests +pr 2020-09-19 08:04:03 +0100 c30f79d418e2e001f1f804a2370db47e5d9ea587 Merge #19940: rpc: Return fee and vsize from testmempoolaccept +pr 2020-09-19 09:28:04 +0100 83b23848f7300addf5bbfcfe47a6f8b75a3599f8 Merge #18790: gui: Improve thread naming +pr 2020-09-19 10:13:28 +0100 831b0ecea9156447a2b6a67d28858bc26d302c1c Merge #13686: ZMQ: Small cleanups in the ZMQ code +v 2020-09-19 15:50:58 +0100 73f71e19965e07534eb47701f2b23c9ed59ef475 refactor: Use explicit function type instead of template +v 2020-09-19 16:02:02 +0100 ab2a44297fd0796bf5797ae2a477e8e56d9c3c12 Replace LockAssertion with a proper thread safety annotations +cr 2020-09-19 16:02:42 +0100 0bd1184adf6610c0bd14f4e9a25c0a200e65ae25 Remove unused LockAssertion struct +pr 2020-09-20 07:25:48 +0100 38fd1bdcd4a5abbd0dbbf4ec93de9010cffa4055 Merge #18949: doc: Add CODEOWNERS file to automatically nominate PR reviewers +pr 2020-09-20 10:13:56 +0100 b99a1633b270e0e89479b2bb2ae19a8a8dc0fa05 Merge #19781: test: add parameterized constructor for msg_sendcmpct() +v 2020-09-20 16:34:42 +0100 f22d6a11423a4462196de24cd68e7f45513cc001 log: Remove static log message "Initializing chainstate Chainstate [ibd] @ height -1 (null)" +v 2020-09-21 09:13:34 +0100 7be6ff61875a8d5d2335bff5d1f16ba40557adb0 net: recognize TORv3/I2P/CJDNS networks +v 2020-09-21 09:16:09 +0100 e15344889aac50aadee9211ac34e466867d5862b Clarify blocksonly whitelistforcerelay test +v 2020-09-21 18:27:44 +0100 3f5b5f3f6db0e5716911b3fba1460ce327e8a845 validation: Move FindFilesToPrune{,Manual} to BlockManager +v 2020-09-21 18:28:08 +0100 485899a93c6f5fff62090907efb0ac938992e1fb style: Make FindFilesToPrune{,Manual} match style guide +v 2020-09-21 18:30:21 +0100 3756853b15902d63f4b5a3129e8b5d82e84e125b docs: Move FindFilesToPrune{,Manual} doxygen comment +v 2020-09-21 18:30:27 +0100 72a1d5c6f3834e206719ee5121df7727aed5b786 validation: Remove review-only comments + assertions +pr 2020-09-21 18:36:57 +0100 c0c409dcd330e8b837291b1d331894aeb0015ead Merge #19697: Improvements on ADDR caching +pr 2020-09-21 21:33:00 +0100 8c5f68118cd03ff0b9babee351fee83117fb7afa Merge #18267: BIP-325: Signet [consensus] +pr 2020-09-21 23:14:32 +0100 77376034d4abab292be6ade8486bc472c5f75fe3 Merge #17785: p2p: Unify Send and Receive protocol versions +v 2020-09-22 03:01:29 +0100 395acfa83a5436790c1a722a5609ac9d48df235f [rpc] Add connection type to getpeerinfo RPC, update tests +v 2020-09-22 03:01:29 +0100 49c10a9ca40967d28ae16dfea9cccc6f3a6624a1 [log] Add connection type to log statement +cr 2020-09-22 03:01:29 +0100 50f94b34a33c954f6e207f509c93d33267a5c3e2 [rpc] Deprecate getpeerinfo addnode field +cr 2020-09-22 03:01:29 +0100 df091b9b509f0b10e4315c0bfa2da0cc0c31c22f [refactor] Rename test file to allow any getpeerinfo deprecations. +v 2020-09-22 03:03:40 +0100 a512925e19a70d7f6b80ac530a169f45ffaafa1c [doc] Release notes +pr 2020-09-22 16:08:08 +0100 d692d192cda37fda6359ad0736b85de20383db73 Merge #19849: Assert that RPCArg names are equal to CRPCCommand ones (blockchain,rawtransaction) +cr 2020-09-22 16:17:50 +0100 1b615e61bfc464f215a1b48e6e27d1e8fc16b2d1 zmq test: Actually make reorg occur +cr 2020-09-22 16:34:30 +0100 68c3c7e1bdd00bbe7d70592a8eb39520fa3f87f1 Add functional tests for zmq sequence topic and mempool sequence logic +v 2020-09-22 16:34:30 +0100 759d94e70f6844443106404882c7b105f3a4dba7 Update zmq notification documentation and sample consumer +cr 2020-09-22 16:34:30 +0100 e76fc2b84d065c9d06010d0a10b316f1f9d36fb9 Add 'sequence' zmq publisher to track all block (dis)connects, mempool deltas +cr 2020-09-22 19:49:30 +0100 fa14f57fbc3c1fa2b9eea5df687f0fb36d452bd5 Assert that RPCArg names are equal to CRPCCommand ones (net, rpcwallet) +v 2020-09-22 21:28:36 +0100 fa2ad5dae17b237641b8ece0e68ffcdd79d543bf test: Run signet test even when wallet was not compiled +v 2020-09-22 21:31:31 +0100 77771a03df6c5d940b340d15eb88f2ac9a29c13a refactor: Remove SignetTxs::m_valid and use optional instead +v 2020-09-22 21:32:18 +0100 fae0548686cb3d095086d3f0fef38dcfcd31d8ca fuzz: Remove needless guard +cr 2020-09-22 21:32:25 +0100 faf0a26711eed9264113463e56b988cf9fe549fd doc: Update comments for new chain settings (-signet and -chain=signet) +cr 2020-09-22 21:33:09 +0100 facaf9e61f4b9ea91fab554d495ebea1043d08fb doc: Document signet BIP +pr 2020-09-22 21:36:06 +0100 c7eb85d0059369ac599b46389b51ac428a36f6ed Merge #19959: build: patch qt libpng to fix powerpc build +pr 2020-09-22 21:45:06 +0100 b1291b2e8fc39b366765d905200f022823e3d50b Merge #19963: Clarify blocksonly whitelistforcerelay test +v 2020-09-23 03:01:14 +0100 1ca20c1af8f08f07c407c3183c37b467ddf0f413 Add doxygen comment for ReceiveMsgBytes +v 2020-09-23 03:01:14 +0100 2716647ebf60cea05fc9edce6a18dcce4e7727ad Give V1TransportDeserializer an m_node_id member +cr 2020-09-23 03:01:14 +0100 52d4ae46ab822d0f54e246a6f2364415cda149bd Give V1TransportDeserializer CChainParams& member +cr 2020-09-23 03:01:14 +0100 5bceef6b12fa16d20287693be377dace3dfec3e5 Change CMessageHeader Constructor +cr 2020-09-23 03:01:14 +0100 890b1d7c2b8312d41d048d2db124586c5dbc8a49 Move checksum check from net_processing to net +cr 2020-09-23 03:05:18 +0100 deb52711a17236d0fca302701b5af585341ab42a Remove header checks out of net_processing +pr 2020-09-23 08:02:00 +0100 82198938255783d2593f42a652efc9921550d86d Merge #19993: refactor: Signet fixups +pr 2020-09-23 12:55:24 +0100 9e217f5a6f08c50aff9975aa4c079e2aab2fe371 Merge #19572: ZMQ: Create "sequence" notifier, enabling client-side mempool tracking +pr 2020-09-23 15:37:07 +0100 8235dca6210dab8e9657c0b592ab928554155082 Merge #19979: Replace LockAssertion with AssertLockHeld, remove LockAssertion +v 2020-09-23 16:41:49 +0100 9b4fa0af40cd88ed25dd77962235fbf268bdcaa7 net: Print error message if -proxy is specified without arguments (instead of continuing without proxy server) +pr 2020-09-23 19:11:08 +0100 5e14fafb316ebd718370847aeb74b63ed5c17a59 Merge #19994: Assert that RPCArg names are equal to CRPCCommand ones (net, rpcwallet) +pr 2020-09-23 19:29:52 +0100 43305e9810e4dd3e1305e4f0e2f4016b7dd9e907 Merge #19868: build: Fix target name +pr 2020-09-23 19:35:54 +0100 1b313cacc99a1b372238f9036abed5491f9d28f7 Merge #19927: validation: Reduce direct g_chainman usage +v 2020-09-23 22:14:28 +0100 347c94f551c3f144c44e00373e4dd61ff6d908b7 zmq: Add support to listen on multiple interfaces +cr 2020-09-23 22:14:28 +0100 b1c3f180ecb63f3960506d202feebaa4271058ae doc: Adjust ZMQ usage to support multiple interfaces +v 2020-09-23 22:14:29 +0100 a0b2e5cb6aa8db0563fac7d67a949b9baefe3a25 doc: Add release notes to support multiple interfaces +v 2020-09-24 06:52:25 +0100 2ea62cae483b764e30f61c06d8ac65755bbd864c Improve docs about feeler connections +v 2020-09-24 18:36:16 +0100 af57766182013e17c23245671a33463f754ccd28 Fix misleading error message: Clean stack rule +pr 2020-09-25 13:18:31 +0100 78f912c9010f686e2d1bbdc1c51f381b496c2a1b Merge #19804: test/refactor: reference p2p objects explicitly and remove confusing Test_Node.p2p property +v 2020-09-25 13:23:01 +0100 b3972bca9f74b3e75918676ef029f1964b0622a1 doc: Mention signet in -help output +v 2020-09-25 13:37:22 +0100 8a4dcda414fcf8281d8b3b79039b735c0a7d0d4c doc: Added default signet config for linearize script +v 2020-09-26 09:48:54 +0100 0fcaf731997c4989b869e42d8990f742637799c2 test: use explicit p2p objects where available +v 2020-09-26 11:50:10 +0100 92e28fa8b2590cce0e8f0adadae80e46cb63a9ef test: remove unused constants in functional tests +pr 2020-09-26 11:55:19 +0100 8aa3a4a498742dc42631956ed3599b3fb2b80302 Merge #20022: test: use explicit p2p objects where available +pr 2020-09-26 16:24:54 +0100 4f45ea1f739349d75ef4273bfb369395eec2fb39 Merge #19725: [RPC] Add connection type to getpeerinfo, improve logs +pr 2020-09-26 16:45:59 +0100 055abfbc5a4d5e6ffc0011ab045949e08fff0f84 Merge #20023: test: remove unused constants in functional tests +cr 2020-09-27 01:57:26 +0100 d5863c0b3e20d56acf7246008b7832efde68ab21 [send] Make send RPCs return fee reason +v 2020-09-27 22:31:42 +0100 a5a6965157f458e18f420f62df3c00620123c74d [Trivial] python help message +v 2020-09-28 03:14:19 +0100 183f308fff4caad3e3ada654b6fdf597d262c4c1 uint256: Update constructors to c++11, make ONE static +cr 2020-09-28 03:14:19 +0100 4cc7171c9887e88027642927c979e507d7b78dda wallet: no need for duplicate storage for ABANDON_HASH constant +cr 2020-09-28 03:14:19 +0100 82cf4641f4a161834d07ce83c18982d9b143c040 scripted-diff: Replace UINT256_ONE() with uint256::ONE +pr 2020-09-28 07:38:20 +0100 e7e6f0bf18b9fc188d6ca944ff2b829f02128d7e Merge #20026: test: typo in a functional test doc +pr 2020-09-28 08:16:56 +0100 c95784e3d31dc557b175181bc034339df22cb5fd Merge #20016: uint256: 1 is a constant +v 2020-09-28 09:13:51 +0100 fae243f0cb92b5648d07d0a5033e2f4de862ae99 test: Remove confusing cast to same type (int to int) +v 2020-09-28 09:14:00 +0100 faa94cb1675d8bd511eb593176cd07aa59465225 test: Check that invalid peer traffic is accounted for +cr 2020-09-28 16:38:36 +0100 090530cc24054d6b4658752bb88f75a3b73eab5d feature: Added ability for users to add a startup command +pr 2020-09-28 19:44:33 +0100 2552702000744ab2c396f1270468fc173d4e8dce Merge #15367: feature: Added ability for users to add a startup command +pr 2020-09-28 20:27:08 +0100 655937ebcbf681ededf86b1f0f60aac45c73393d Merge #19845: net: CNetAddr: add support to (un)serialize as ADDRv2 +v 2020-09-28 23:04:56 +0100 69cf5d4eeb73f7d685e915fc17af64634d88a4a2 [test] Make sure send rpc returns fee reason +pr 2020-09-29 07:04:25 +0100 5db44c740ebda9b7cb37ed0a5f4534832771da28 Merge #20014: doc: Mention signet in -help output +pr 2020-09-29 07:32:33 +0100 7ea649946daa421ed7dfa478cbb0bcf2de3cc2f8 Merge #20028: test: Check that invalid peer traffic is accounted for +v 2020-09-29 07:59:43 +0100 b3273cf4039d26e66ae58a8acb9d865461618d54 net: Use network byte order for in_addr.s_addr +v 2020-09-29 07:59:51 +0100 a5266d4546c444cfd6d36cb63d2df52ce9e689e2 net: Add alternative port for onion service +v 2020-09-29 07:59:52 +0100 e3f07851f02857b4844fccb2e91070c5cd3aad4d refactor: Rename TorController::target to m_tor_control_center +v 2020-09-29 07:59:52 +0100 fdd3ae4d264f26f87009879838dec035db5a7aed net, refactor: Refactor CBaseChainParams::RPCPort function +pr 2020-09-29 08:14:08 +0100 e36aa351a31cde0f95ce957b2ff593a97f91eb6d Merge #19969: Send RPC bug fix and touch-ups +pr 2020-09-29 09:14:40 +0100 6af9b31bfc6dd6086d245c00eb7cff762fc34a1e Merge #19107: p2p: Move all header verification into the network layer, extend logging +v 2020-09-29 09:20:05 +0100 fa23308e9aad70c99a31f91d8556f1876ea02c04 Remove gArgs global from CreateChainParams to aid testing +v 2020-09-29 09:23:10 +0100 fa29b5ae666bbb4c19188f0dcf8a1ba738aac624 test: Add signet witness commitment section parse tests +cr 2020-09-29 09:35:01 +0100 c1585bca8dae01dee6a1dd8eadae2f8b100503df test: Get rid of default wallet hacks +pr 2020-09-29 09:35:01 +0100 ec9b4492eba5d32ab833d511984756601d3f39b0 Merge #19630: Cleanup fee estimation code +cr 2020-09-29 09:35:01 +0100 ed3acda33b75d1b546ee696a63def239bcdd62de test, refactor: add default_wallet_name and wallet_data_filename variables +pr 2020-09-29 13:41:11 +0100 d82b2c6e65ff1ade508e2e8abeb07d0ff37e09c4 Merge #19898: log: print unexpected version warning in validation log category +cr 2020-09-29 13:48:28 +0100 712f95d3324d02310dd468e7bfd1e1b0df432e77 Update msvc build to use new vcpkg manifest +v 2020-09-29 14:01:18 +0100 fac966142e00f6838cfd666ff8905078204d014e signet: Add assumed values for default signet +pr 2020-09-29 14:17:28 +0100 8aa617896139a9e2242eb5471ce021bb33d1219d Merge #20003: net: Exit with error message if -proxy is specified without arguments (instead of continuing without proxy server) +pr 2020-09-29 14:24:43 +0100 9e6f56f6ea0f384a92dfd489b41af8e215909eb9 Merge #19984: log: Remove static log message "Initializing chainstate Chainstate [ibd] @ height -1 (null)" +pr 2020-09-29 15:38:22 +0100 de4b7f25acef14f98ed09b7cbaa065067313d24b Merge #20015: doc: Added default signet config for linearize script +v 2020-09-30 04:08:54 +0100 95fedd33a23d6cb7542378afef229965f1ebfd68 refactor: Clean up -Wlogical-op warning +pr 2020-09-30 05:41:22 +0100 c7ad94428ab6f54661d7a5441e1fdd0ebf034903 Merge #19958: doc: Better document features of feelers +pr 2020-09-30 07:51:38 +0100 36f5a58c021061a51f739962a0f045178bfacffa Merge #19960: build: The vcpkg tool has introduced a proper way to use manifests +pr 2020-09-30 08:01:23 +0100 1769828684f16b53e5fbf65173f508b9ea1b4b9c Merge #19501: send* RPCs in the wallet returns the "fee reason" +cr 2020-09-30 08:28:33 +0100 faf60dee34ae3dbe8e103a2c1b0679f13df6a921 doc: Remove double-whitespace from help string, other whitespace fixups +v 2020-09-30 08:28:50 +0100 fa710a6d67b2de64bde90def77c70d0a052f9030 doc: Add 19501 release notes +pr 2020-09-30 13:05:19 +0100 5c435c78e36c543fe27d332523f157f714141226 Merge #20036: signet: Add assumed values for default signet +pr 2020-09-30 13:21:42 +0100 4f5ae52738f757d9a8e5bd8641d1ada0741ba9c9 Merge #20006: Fix misleading error message: Clean stack rule +pr 2020-09-30 13:23:44 +0100 301959fa7482cf749504864789e6f9f4470b8bb6 Merge #20043: doc: Add 19501 release notes +pr 2020-09-30 14:53:25 +0100 7b7cb70f4cd915ef30d7b94042b53537f07af321 Merge #19498: Tidy up ProcessOrphanTx +pr 2020-09-30 15:03:02 +0100 72affcb16cad45bd9e08ca163b2147fd01b84b70 Merge #19802: doc: elaborate on release notes wrt netmasks +pr 2020-09-30 16:00:19 +0100 3487e421a7fef4b28381efcf21a7e38483946cec Merge #20004: test: Add signet witness commitment section parse tests +v 2020-09-30 18:13:05 +0100 f471a3be00c2b6433b8c258b716982c0539da13f scripted diff: Improve invalid vout value rpc error message +v 2020-09-30 23:33:38 +0100 241803da211265444e65f254f24dd184f2457fa9 test: Add zmq test to support multiple interfaces +v 2020-09-30 23:33:38 +0100 e66870c5a4c2adbd30dca67d409fd5cd98697587 zmq: Append address to notify log output +pr 2020-10-01 08:43:11 +0100 40aab35e9828427a800916ac15e3381332f4d0a6 Merge #19253: Tests: tidy up address.py and segwit_addr.py +v 2020-10-01 10:25:42 +0100 6fccad7f711df330e461c1fab3f758d078345ed5 signet: do not log signet startup messages for other chains +pr 2020-10-01 12:29:05 +0100 9fc2f011ba1724b3f43b7ed228084095bfd78930 Merge #20048: chainparams: do not log signet startup messages for other chains +v 2020-10-01 16:33:56 +0100 7eab781a145a35d0373c4ab4d237a82b4919e88d rpc: Set HTTP Content-Type in bitcoin-cli +pr 2020-10-01 16:43:34 +0100 a0185d90a7f259058effaa55b8f3d06f27f13dd8 Merge #18309: zmq: Add support to listen on multiple interfaces +cr 2020-10-01 17:00:07 +0100 57f17e57c8c410e10c16a46f7372c0ea8b7dd467 net: Pass onion service target to Tor controller +v 2020-10-01 17:00:10 +0100 92bd3c1da48d17c8ba20349e18ad19051614bc1a net, refactor: Move AddLocal call one level up +v 2020-10-01 17:19:20 +0100 bb145c9050203b3f3d8bff10fb3bba31da51adb1 net: Extend -bind config option with optional network type +cr 2020-10-01 17:19:43 +0100 96571b3d4cb4cda0fd3d5a457ae4a12f615de82b doc: Update onion service target port numbers in tor.md +cr 2020-10-01 21:19:11 +0100 598e3b1ed3aa7c15a66948694300f86ed7733ef9 tx: Update transifex slug for 0.21 +cr 2020-10-01 21:24:08 +0100 7532c9a2216d5188ce55adc989892b1e4031dee3 qt: Periodic translations update +pr 2020-10-02 05:16:26 +0100 69a73803dfb2f65919660902d126487906a31770 Merge #20058: Update transifex slug for 0.21 +v 2020-10-02 05:30:50 +0100 82b70f15c72adc777bddc7ae7b1e359fb5daf1f1 refactor: fix -Wbraced-scalar-init warning in validation tests +pr 2020-10-02 07:38:12 +0100 a6a993a888f578fcb8d6ff60ce0265fad55dafcb Merge #20060: refactor: fix -Wbraced-scalar-init warning in validation tests +pr 2020-10-02 08:25:20 +0100 60ec57b3d73e5cef71ebf3c4cdf54a4474bf492b Merge #20055: rpc: Set HTTP Content-Type in bitcoin-cli +v 2020-10-02 10:24:46 +0100 99992e78329f5f4352a8e8890669061f0c3536e4 doc: Collect release-notes snippets +pr 2020-10-02 12:37:23 +0100 df2129a2349b1877049f250551f49a4592e73765 Merge #19991: net: Use alternative port for incoming Tor connections +v 2020-10-02 14:48:45 +0100 64bc5efd39bad3212a1d57fd6234b544a14bb974 test: Assert PSBT change type +v 2020-10-02 15:40:15 +0100 5cb5fd3005435f3a7ca0c3401951d1db8db4fb88 test: add test coverage for CNetAddr ipv6 scoped addresses +v 2020-10-02 15:42:02 +0100 f36887fa47b42af60f8a06a3995baca7c73ca310 net: rename CNetAddr scopeId to m_scope_id, improve code doc +pr 2020-10-02 15:42:38 +0100 597488d37c9c358837616516d88f861f5c25f827 Merge #19871: doc: Clarify scope of eviction protection of outbound block-relay peers +pr 2020-10-02 16:06:59 +0100 d9935222d53a2a625da992ca51cce7b79d78ca9a Merge #19951: net, test: CNetAddr scoped ipv6 test coverage, rename scopeId to m_scope_id +pr 2020-10-02 16:07:35 +0100 171cd05ae3413e18fd6382572c86f2bb21ab2fd9 Merge #20034: test: Get rid of default wallet hacks +v 2020-10-02 16:15:52 +0100 a56e9f5670136b29e48aabfc7f38569222fe4635 test: Assert exclusive PSBT funding options +v 2020-10-02 23:44:59 +0100 1885ad35467f201f2a210057797aae8a450e7cdf RPC: remove duplicate line in getblock help +pr 2020-10-03 04:13:21 +0100 54fc96ffa70ad3a53d32709101b7a2ce064d822e Merge #19956: rpc: Improve invalid vout value rpc error message +v 2020-10-03 11:56:19 +0100 d4dde24034d7467883b290111da60527ab8048f8 net: Add CNode::m_inbound_onion data member +v 2020-10-03 12:50:52 +0100 3491bf358a81d41a386cd14581d15396354a6e6c test: Mention commit id in scripted diff error +v 2020-10-03 13:38:19 +0100 49fba9c1aa699d3aa47ea4dafe07b47c8d0aac6e net: Add CNode::ConnectedThroughNetwork member function +v 2020-10-03 13:38:49 +0100 3984b78cd7f49e409377f2175a56e8e4bd71d1d8 test: Add tests for CNode::ConnectedThroughNetwork +v 2020-10-03 18:20:04 +0100 33df8d46bb4b6daca91db208d3d1629d3c1e500c ci: Build Arm64 on Travis without functional tests +v 2020-10-03 20:55:52 +0100 1b41ce8f5f3debae03ca60e4acada14680df9185 lint: Don't use TRAVIS_COMMIT_RANGE for commit-script-check +v 2020-10-03 20:56:13 +0100 c11dc995c98e908dfd9cea64d4b34329b1dbb5c6 lint: Don't use TRAVIS_COMMIT_RANGE in whitespace linter +v 2020-10-03 20:56:15 +0100 a91ab86fae91d416d664d19d2f482a8d19c115a6 lint: Use TRAVIS_BRANCH in lint-git-commit-check.sh +pr 2020-10-04 08:05:59 +0100 06314fbb5521bf9666e1523f09bfbf78aa976b1b Merge #20071: ci, lint: Remove usage of TRAVIS_COMMIT_RANGE +pr 2020-10-04 08:09:38 +0100 2f7a53cc9d68d6a3983d18b430e6a50706041935 Merge #20069: test: Mention commit id in scripted diff error +pr 2020-10-04 08:42:53 +0100 f0fd132226211465d41ce4a29681d75438c045a8 Merge #20072: ci: Build Arm64 on Travis without functional tests +pr 2020-10-04 14:39:26 +0100 cce151317909ab8eb56d3e5da522f43c7d7db077 Merge #19723: Ignore unknown messages before VERACK +v 2020-10-04 16:49:07 +0100 fae7a1c18803675e70b9bf66575e1e0a6e01f6f6 fuzz: Configure check for main function +pr 2020-10-05 02:40:17 +0100 dde104963b3ba2e24bb3b383351ddcbef52a0240 Merge #20064: RPC: remove duplicate line in getblock help +pr 2020-10-05 08:45:11 +0100 875e1ccc9fe01e026e564dfd39a64d9a4b332a89 Merge #19947: Test: Cover "change_type" option of "walletcreatefundedpsbt" RPC +v 2020-10-05 12:54:05 +0100 8f1290c60159a3171c27250bc95687548c5c1b84 [rpc/node] check for high fee before ATMP in clients +v 2020-10-05 12:55:01 +0100 932564b9cfda8446a957649c2316a52e868ad5d4 scripted-diff: update max-fee-exceeded error message to include RPC +v 2020-10-05 12:55:01 +0100 b048b275d9711f70847afaea5450f17a0f7e673a [validation] Remove absurdfee from accepttomempool +v 2020-10-06 09:05:03 +0100 2dc79c4264d608ebe48c980f0ead54274ab3ee4f doc: Update and improve files.md +v 2020-10-06 12:57:06 +0100 d103484fe81a8a5bf1d692f3f7d1c0ef1be5f63c util: Do not use gArgs global in ArgsManager member functions +v 2020-10-06 19:17:53 +0100 c83155b406b849a1589d22c34843cc883897431d Bump vcpkg commit ID to get new msys mirror list +pr 2020-10-06 20:00:24 +0100 d8cd7b137fb075616f31d2b43b85fa2e27ea7477 Merge #20095: CI: Bump vcpkg commit ID to get new msys mirror list +v 2020-10-06 22:51:30 +0100 107b57df9fa8b2d625d2b342dc77722282a6ae4c scripted-diff: put ECDSA in name of signature functions +v 2020-10-06 22:51:30 +0100 8bd2b4e78452ff69c08c37acf164a6b80e503f13 refactor: rename scriptPubKey in VerifyWitnessProgram to exec_script +v 2020-10-06 22:51:30 +0100 f8c099e2207c90d758e7a659d6a55fa7ccb7ceaa --- [TAPROOT] Refactors --- +pr 2020-10-07 03:58:30 +0100 db88db47278d2e7208c50d16ab10cb355067d071 Merge #19339: validation: re-delegate absurd fee checking from mempool to clients +pr 2020-10-07 08:31:12 +0100 283a73d7eaea2907a6f7f800f529a0d6db53d7a6 Merge #20092: util: Do not use gArgs global in ArgsManager member functions +v 2020-10-08 01:46:49 +0100 bd5215103eb3985c1622eddea45a040e6173829c random: fixes read buffer resizing in RandAddSeedPerfmon +v 2020-10-08 02:36:44 +0100 907f142fc7e1d35f443be076367739faf11cc2cc rpc: change no wallet loaded message to be clearer +v 2020-10-08 09:04:29 +0100 b6834e312a6a7bb395ec7266bc9469384639df96 Avoid 'timing mishap' warnings when mocking +v 2020-10-08 09:04:29 +0100 ec3916f40a3fc644ecbbaaddef6258937c7fcfbc Use mockable time everywhere in net_processing +pr 2020-10-08 10:38:47 +0100 9dd4de2832e298398436b957375d62de67f0a928 Merge #20027: Use mockable time everywhere in net_processing +pr 2020-10-08 12:17:45 +0100 b337bd7bc0873ace317ad8e1ebbd3842da3f81d5 Merge #20065: fuzz: Configure check for main function +v 2020-10-08 12:28:38 +0100 1afcd41a906e6417925e80578c0d850d269dc008 [net] Remove CombinerAll +v 2020-10-08 13:47:21 +0100 faf2999e2515c47108dc3d376dbd1c0fce4d6103 cirrus: Use kvm to avoid spurious CI failures in the default virtualization cluster +pr 2020-10-08 14:07:23 +0100 392c6f4fb253ca40a45b052528760ecb23869da2 Merge #20101: rpc: change no wallet loaded message to be clearer +v 2020-10-08 14:11:25 +0100 faa0847dec0f48f8c07c9a4c995bf5f688bb8c1c doc: Add release notes for #20101 +pr 2020-10-08 19:42:19 +0100 d9de00b3e067d26cde0ea349b911d082acc8801a Merge #20105: [net] Remove CombinerAll +v 2020-10-08 22:11:16 +0100 c201d73df3602dac75573a0ec3fe4c86bbc02585 style and nits for fee-checking in BroadcastTransaction +pr 2020-10-09 07:44:35 +0100 380705ef4f007463dc7951376c7bedef1f01a169 Merge #20106: cirrus: Use kvm to avoid spurious CI failures in the default virtualization cluster +v 2020-10-09 09:32:19 +0100 1d3ec2a1fda7446323786a52da1fd109c01aa6fb Support bypassing range check in ReadCompactSize +pr 2020-10-09 11:02:38 +0100 6854dbdc88d7300e760d75cdd024047071466264 Merge #20076: doc: Update and improve files.md +pr 2020-10-09 11:08:14 +0100 12a1c3ad1a43634d2a98717e49e3f02c4acea2fe Merge #20107: doc: Collect release-notes snippets +cr 2020-10-09 12:28:58 +0100 567008d2a0c95bd972f4031f31647c493d1bc2e8 p2p: Add DumpAnchors() +v 2020-10-09 12:29:04 +0100 bad16aff490dcf87722fbfe202a869fb24c734e1 p2p: Add CConnman::GetCurrentBlockRelayOnlyConns() +cr 2020-10-09 12:29:04 +0100 c29272a157d09a8125788c1b860e89b63b4cb36c p2p: Add ReadAnchors() +v 2020-10-09 12:29:05 +0100 0a85e5a7bc8dc6587963e2e37ac1b087a1fc97fe p2p: Try to connect to anchors once +v 2020-10-09 12:29:05 +0100 4170b46544231e7cf1d64ac3baa314083be37502 p2p: Integrate DumpAnchors() and ReadAnchors() into CConnman +cr 2020-10-09 12:29:05 +0100 5543c7ab285e90256cbbf9858249e028c9611cda p2p: Fix off-by-one error in fetching address loop +v 2020-10-09 12:30:09 +0100 a490d074b3491427afbd677f5fa635b910f8bb34 doc: Add anchors.dat to files.md +cr 2020-10-09 15:42:49 +0100 201a4596d92d640d5eb7e76cc8d959228fa09dbb net: CAddress & CAddrMan: (un)serialize as ADDRv2 +cr 2020-10-09 15:42:50 +0100 353a3fdaad055eea42a0baf7326bdd591f541170 net: advertise support for ADDRv2 via new message +v 2020-10-09 15:42:50 +0100 dcf0cb477699d11afd0ff37c8bfb2b1b4f7f1ee5 tor: make a TORv3 hidden service instead of TORv2 +v 2020-10-09 16:58:47 +0100 88197b0769770913941a3361bff3a1c67a86f7d2 [doc] release notes for max fee checking +v 2020-10-09 19:14:47 +0100 c056064a4a93be3601a63b37afea41f8b878df79 gui: Fix SplashScreen crash when run with -disablewallet +v 2020-10-10 00:08:02 +0100 3069b56a456d98fca7c4a4ccd329581bd1f0b853 [doc] Improve help for getpeerinfo connection_type field. +v 2020-10-10 00:09:51 +0100 41dca087b73a3627107603694f5a982ea2a53189 [trivial] Extract connection type doc into file where it is used. +pr 2020-10-11 01:51:57 +0100 0b2abaa666d6f3331e3246ffd64dd47946e9dcdf Merge #19954: Complete the BIP155 implementation and upgrade to TORv3 +v 2020-10-11 19:29:07 +0100 79f3d9b932bf62b90995bce1cf4b0b1f0152d26d Mention BIP155 in doc/bips.md +v 2020-10-11 19:29:11 +0100 56f9dba015c592b8925795012e3061a710070a27 Only relay IPv4, IPv6, Tor addresses +v 2020-10-11 22:57:56 +0100 cc8c6823b4a8b74922f78ce6ce527ced9325bd49 test: use MiniWallet for p2p_leak_tx.py +v 2020-10-11 23:22:16 +0100 5b77f8098de537898151ab116d0e547fd6ff9466 test: add p2p_lock acquires in p2p_leak_tx.py +pr 2020-10-12 08:47:07 +0100 af22322dab1a2277483b2512723491a5fad1a606 Merge #20119: BIP155 follow-ups +v 2020-10-12 09:25:08 +0100 8e4d62280e3d3fa729e71d557ba457a3e08349f8 tests: don't export in6addr_loopback +v 2020-10-12 10:06:32 +0100 450d2b23710ad296eede81339195376021ab5500 --- [TAPROOT] BIP340/341/342 consensus rules --- +v 2020-10-12 10:06:32 +0100 5d62e3a68b6ea9bb03556ee1fbf5678f20be01a2 refactor: keep spent outputs in PrecomputedTransactionData +cr 2020-10-12 10:06:32 +0100 9eb590894f15ff40806039bfd32972fbc260e30d Add TaggedHash function (BIP 340) +v 2020-10-12 12:11:26 +0100 faad92fe1c3cca9795226bd167130976930ddab8 test: Remove unused nVersion=1 in p2p tests +cr 2020-10-12 17:18:24 +0100 ba8950ee0134a7958e3e9b041cd54d222feb09a1 build: optionally skip external warnings +pr 2020-10-12 17:40:45 +0100 f79a4a895279ba4efa43494270633f94f7d18342 Merge #19998: net: Add CNode::ConnectedThroughNetwork member function +cr 2020-10-12 19:01:16 +0100 da3b8fde03f2e8060bb7ff3bff17175dab85f0cd Add txrequest module +cr 2020-10-12 20:08:43 +0100 3c7fe0e5a0ee1abf4dc263ae5310e68253c866e1 Add txrequest unit tests +cr 2020-10-12 20:08:47 +0100 5b03121d60527a193a84c339151481f9c9c1962b Add txrequest fuzz tests +cr 2020-10-12 20:14:11 +0100 242d16477df1a024c7126bad23dde39cad217eca Change transaction request logic to use txrequest +cr 2020-10-12 20:14:53 +0100 173a1d2d3f824b83777ac713e89bee69fd87692d Expedite removal of tx requests that are no longer needed +v 2020-10-12 20:14:53 +0100 86f50ed10f66b5535f0162cf0026456a9e3f8963 Delete limitedmap as it is unused now +cr 2020-10-12 20:14:53 +0100 cc16fff3e476a9378d2176b3c1b83ad12b1b052a Make txid delay penalty also apply to fetches of orphan's parents +cr 2020-10-12 20:14:53 +0100 de11b0a4eff20da3e3ca52dc90948b5253d329c5 Reduce MAX_PEER_TX_ANNOUNCEMENTS for non-PF_RELAY peers +cr 2020-10-12 20:14:53 +0100 fd9a0060f028a4c01bd88f58777dea34bdcbafd1 Report and verify expirations +cr 2020-10-12 23:15:28 +0100 883cea7dea3cedc9b45b6191f7d4e7be2d9a11ca Restore compatibility with old CSubNet serialization +v 2020-10-12 23:35:08 +0100 886be97af5d4aba338b23a7b20b8560be8156231 Ignore incorrectly-serialized banlist.dat entries +v 2020-10-13 01:06:38 +0100 5de246ca8159dcffaa4c136a60c8bfed2028e2ee Implement Taproot signature hashing (BIP 341) +cr 2020-10-13 01:15:40 +0100 0664f5fe1f77f08d235aa3750b59428257b0b91d Support for Schnorr signatures and integration in SignatureCheckers (BIP 340) +cr 2020-10-13 01:17:56 +0100 8bbed4b7acf4c76eaea8c0e10f3cbf6ba4e53809 Implement Taproot validation (BIP 341) +cr 2020-10-13 01:18:15 +0100 330de894a9a48515d9a473448b6c67adc3d188be Use ScriptExecutionData to pass through annex hash +cr 2020-10-13 01:18:24 +0100 72422ce396b8eba7b1a72c171c2f07dae691d1b5 Implement Tapscript script validation rules (BIP 342) +cr 2020-10-13 01:18:47 +0100 0e2a5e448f426219a6464b9aaadcc715534114e6 tests: dumping and minimizing of script assets data +v 2020-10-13 01:18:47 +0100 206fb180ec6ee5f916afc6f574000d716daf79b7 --- [TAPROOT] Tests --- +cr 2020-10-13 01:18:47 +0100 3c226639eb134314a0640d34e4ccb6148dbde22f tests: add BIP340 Schnorr signature support to test framework +cr 2020-10-13 01:18:47 +0100 4567ba034c5ae6e6cc161360f7425c9e844738f0 tests: add generic qa-asset-based script verification unit test +v 2020-10-13 01:18:47 +0100 865d2c37e2e44678498b7f425b65e01b1e231cde --- [TAPROOT] Regtest activation and policy --- +v 2020-10-13 01:18:47 +0100 d7ff237f2996a4c11fdf9399187c2d2b26bf9809 Activate Taproot/Tapscript on regtest (BIP 341, BIP 342) +cr 2020-10-13 01:18:47 +0100 e9a021d7e6a454d610a45cb9b3995f0d96a5fbb6 Make Taproot spends standard + policy limits +cr 2020-10-13 01:18:47 +0100 f06e6d03452cf5e0b1a0863afb08c9e6d3ef452e tests: functional tests for Schnorr/Taproot/Tapscript +v 2020-10-13 03:50:16 +0100 d1292f25f272401da0c58580521c74b1fa03a9ad Avoid the use of abs64 in timedata +v 2020-10-13 12:42:59 +0100 135afa749c6e835ea33b8678cdb35da9640eede8 wallet: remove db mode string +pr 2020-10-13 13:00:39 +0100 ad90dd9f313aa4a2f87675b4392b85c0b06a5a83 Merge #20141: Avoid the use of abs64 in timedata +pr 2020-10-13 13:27:30 +0100 cd6e193d4c85b94b1281f270754c2a22d1537876 Merge #20126: test: p2p_leak_tx.py improvements (use MiniWallet, add p2p_lock acquires) +pr 2020-10-13 13:42:12 +0100 ec0453cd57736df33e9f50c004d88bea10428ad5 Merge bitcoin-core/gui#102: Fix SplashScreen crash when run with -disablewallet +v 2020-10-13 13:57:52 +0100 33330778230961cfbf2a24de36b5877e395cc596 rpc: Adjust witness-tx deserialize error message +cr 2020-10-13 14:38:18 +0100 fa299ac27364bd7a59e6fb7e0c4ce476f2deec40 test: Speed up wallet_resendwallettransactions test with mockscheduler RPC +v 2020-10-13 22:38:38 +0100 9c47cb29f9f525ee58acc629825a97075156d764 [Rename only] Rename orphan_work_set to m_orphan_work_set. +pr 2020-10-14 05:19:42 +0100 e21b824386bf9befdab44a60c9f58a450147739e Merge #20109: Release notes and followups from 19339 +v 2020-10-14 09:09:50 +0100 fa1f6f237d02265af616129402fa2b8a3019dda5 net: Send post-verack handshake messages at most once +pr 2020-10-14 09:33:55 +0100 3750f664b349c759e715ba0b9e1a64e1ea07c782 Merge #20129: tests: don't export in6addr_loopback +pr 2020-10-14 13:50:22 +0100 9efa55c715c0179b2bd079348ef67b624411b11b Merge #20130: Wallet: remove db mode string +v 2020-10-14 13:55:55 +0100 6df7882029854f0427d84b22081018ae77e27e66 net: add peer network to CNodeStats +cr 2020-10-14 13:56:03 +0100 4938a109adf13f2c60a50f08d4cc9ddb8d7ded96 rpc, test: expose CNodeStats network in RPC getpeerinfo +v 2020-10-14 13:56:05 +0100 5133fab37e8679e1d0d08ead4f5cccf4979dc15b cli: simplify -netinfo using getpeerinfo network field +v 2020-10-14 13:56:07 +0100 82fd40216c70037480150d2b62e2b58c57784546 refactor: promote some -netinfo localvars to class members +pr 2020-10-14 13:57:15 +0100 99a1d572eabca89790216b3919a237e07063a376 Merge #18750: build: optionally skip external warnings +v 2020-10-14 15:08:37 +0100 8803aee66813d27ddbdfce937ab9c35f8f7c35bc Move m_orphan_work_set to net_processing +cr 2020-10-14 15:08:44 +0100 2d9f2fca43aadcdda4d644cddab36dca88b40b97 Move vRecvGetData to net processing +cr 2020-10-14 15:08:44 +0100 673247b58cd1252ab7e99f7d63ead05cc100cef2 Lock before checking if orphan_work_set is empty; indicate it is guarded +cr 2020-10-14 15:08:44 +0100 ba951812ec0cc8ebee5911a582f188525b76ff0a Guard vRecvGetData (now in net processing) with its own mutex +v 2020-10-14 15:08:44 +0100 da0988daf1d665a4644ad3f1ddf3f8a8bdd88cde scripted-diff: rename vRecvGetData +v 2020-10-14 15:16:42 +0100 d681a28219d3876a2b6e3cd2fb0d92963674903e RPC: getpeerinfo: Deprecate "whitelisted" field (replaced by "permissions") +v 2020-10-14 15:16:43 +0100 5b57dc5458800e56b4dddfeb32a1813804a62b0f RPC: getpeerinfo: Wrap long help line for bytesrecv_per_msg +v 2020-10-14 15:29:37 +0100 6272604bef3b409455b010d134b4b62c8f6ff49f refactor: enable -netinfo to add future networks (i2p, cjdns) +cr 2020-10-14 16:18:12 +0100 54729f3f4e6765dfded590af5fb28c88331685f8 Add libsqlite3 +cr 2020-10-14 16:18:13 +0100 e87df8258090138d5c22ac46b8602b618620e8a1 Add sqlite to travis and depends +v 2020-10-14 16:27:37 +0100 7577b6e1c88a1a7b45ecf5c7f1735bae6f5a82bf Add SQLiteDatabase and SQLiteBatch dummy classes +v 2020-10-14 16:27:40 +0100 ca8b7e04ab89f99075b093fa248919fd10acbdf7 Implement SQLiteDatabaseVersion +v 2020-10-14 16:28:17 +0100 5a488b3d77326a0d957c1233493061da1b6ec207 Constructors, destructors, and relevant private fields for SQLiteDatabase/Batch +v 2020-10-14 16:28:18 +0100 010e3659069e6f97dd7b24483f50ed71042b84b0 Implement SQLiteDatabase::TxnBegin, TxnCommit, and TxnAbort +v 2020-10-14 16:28:18 +0100 310b0fde04639b7446efd5c1d2701caa4b991b86 Run dumpwallet for legacy wallets only in wallet_backup.py +v 2020-10-14 16:28:18 +0100 3bfa0fe1259280f8c32b41a798c9453b73f89b02 Initialize and Shutdown sqlite3 globals +v 2020-10-14 16:28:18 +0100 6045f77003f167bee9a85e2d53f8fc6ff2e297d8 Implement SQLiteDatabase::MakeBatch +cr 2020-10-14 16:28:18 +0100 6173269866306058fcb1cc825b9eb681838678ca Set and check the sqlite user version +v 2020-10-14 16:28:18 +0100 6636a2608a4e5906ee8092d5731595542261e0ad Implement SQLiteBatch::Close +cr 2020-10-14 16:28:18 +0100 6c6639ac9f6e1677da066cf809f9e3fa4d2e7c32 Include sqlite3 in documentation +cr 2020-10-14 16:28:18 +0100 727e6b2a4ee5abb7f2dcbc9f7778291908dc28ad Implement SQLiteDatabase::Verify +cr 2020-10-14 16:28:18 +0100 7aa45620e2f2178145a2eca58ccbab3cecff08fb Add SetupSQLStatements +v 2020-10-14 16:28:18 +0100 93825352a36456283bf87e39b5888363ee242f21 Implement SQLiteDatabase::Close +cr 2020-10-14 16:28:18 +0100 9af5de3798c49f86f27bb79396e075fb8c1b2381 Use SQLite for descriptor wallets +cr 2020-10-14 16:28:18 +0100 9b78f3ce8ed1867c37f6b9fff98f74582d44b789 walletutil: Wallets can also be sqlite +cr 2020-10-14 16:28:18 +0100 9d3d2d263c331e3c77b8f0d01ecc9fea0407dd17 Use network magic as sqlite wallet application ID +cr 2020-10-14 16:28:18 +0100 a0de83372be83f59015cd3d61af2303b74fb64b5 Implement SQLiteDatabase::Open +cr 2020-10-14 16:28:18 +0100 ac38a87225be0f1103ff9629d63980550d2f372b Determine wallet file type based on file magic +v 2020-10-14 16:28:18 +0100 ac5c1617e7f4273daf24c24da1f6bc5ef5ab2d2b Implement SQLiteDatabase::Backup +v 2020-10-14 16:28:18 +0100 b4df8fdb19fcded7e6d491ecf0b705cac0ec76a1 Implement SQLiteDatabase::Rewrite +v 2020-10-14 16:28:18 +0100 bf90e033f4fe86cfb90492c7e0962278ea3a146d Implement SQLiteBatch::ReadKey, WriteKey, EraseKey, and HasKey +cr 2020-10-14 16:28:18 +0100 c4a29d0a90b821c443c10891d9326c534d15cf97 Update wallet_multiwallet.py for descriptor and sqlite wallets +v 2020-10-14 16:28:18 +0100 f023b7cac0eb16d3c1bf40f1f7898b290de4cc73 wallet: Enforce sqlite serialized threading mode +v 2020-10-14 16:28:18 +0100 f6f9cd6a64842ef23777312f2465e826ca04b886 Implement SQLiteBatch::StartCursor, ReadAtCursor, and CloseCursor +pr 2020-10-14 17:36:59 +0100 c2c4dbaebd955ad2829364f7fa5b8169ca1ba6b9 Merge #19988: Overhaul transaction request logic +cr 2020-10-14 19:41:15 +0100 52380bf304b1c02dda23f1e2fad0159e29b2f7a2 Squashed 'src/secp256k1/' changes from 8ab24e8dad..c6b6b8f1bb +ff 2020-10-14 19:41:15 +0100 9e5626d2a8ddbbd7640ff53f89f3a7021d747633 Update libsecp256k1 subtree to latest master +v 2020-10-14 21:47:42 +0100 5e737a009234cbd7cf53748d3d28a2da5221192f rpc, wallet: Expose database format in getwalletinfo +pr 2020-10-15 00:59:19 +0100 661fe5d65cc6516439f9d6e0f1a5e2db0e129059 Merge #20146: net: Send post-verack handshake messages at most once +pr 2020-10-15 04:27:47 +0100 f2e6d14430137a271d153348d207df6ab8086bc6 Merge #20147: Update libsecp256k1 (endomorphism, test improvements) +pr 2020-10-15 08:12:29 +0100 8ed37f6c8497c8ec9e919dab35f63201e5f75f11 Merge #19077: wallet: Add sqlite as an alternative wallet database and use it for new descriptor wallets +pr 2020-10-15 09:22:35 +0100 3caee16946575e71e90ead9ac531f5a3a1259307 Merge #19953: Implement BIP 340-342 validation (Schnorr/taproot/tapscript) +v 2020-10-15 09:32:26 +0100 defe48a51f4315f8cc607875a099981593c8cc39 doc: Update wallet files in files.md +pr 2020-10-15 09:55:44 +0100 3956165903cf2fce3acd61ed6f2625f769ac7e2f Merge #17775: DecodeHexTx: Try case where txn has inputs first +v 2020-10-15 10:27:43 +0100 fa64892b8296208380341c2c1d8c3f6c1a915475 signet: Fix uninitialized read in validation +v 2020-10-15 10:28:13 +0100 fa729cdb2cee26850663746517e136e5317b121f doc: Move assumed-values doxygen comments to header +pr 2020-10-15 10:44:36 +0100 e3b474c548668b653a4868c7be67e09f58e2382f Merge #20140: Restore compatibility with old CSubNet serialization +pr 2020-10-15 10:49:34 +0100 560dea9b26f7f27b851b2d426140a98bd78796fe Merge #19770: RPC: getpeerinfo: Deprecate "whitelisted" field (replaced by "permissions") +pr 2020-10-15 11:01:11 +0100 711ddce94377aea38ce30fa93b3ee8ea1d96ba98 Merge #20131: test: Remove unused nVersion=1 in p2p tests +v 2020-10-15 15:46:34 +0100 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721 test: add coverage for getwalletinfo format field +pr 2020-10-15 16:44:38 +0100 0d22482353752ebfb11aa29f4b26113b817a448a Merge #20002: net, rpc, cli: expose peer network in getpeerinfo; simplify/improve -netinfo +pr 2020-10-15 19:19:55 +0100 9855422e65ca74691129114b8ae534c31596c34b Merge #17428: p2p: Try to preserve outbound block-relay-only connections during restart +pr 2020-10-15 19:45:56 +0100 9ad7cd2887abf5f91495337a2458560de10b4f69 Merge #20090: [doc] Tiny followups to new getpeerinfo connection type field +v 2020-10-15 22:20:20 +0100 5669642a0bbac60b746e9301de2cefd6358ca0c0 docs: mention BIPs 340-342 in doc/bips.md +v 2020-10-15 23:39:09 +0100 1d22300b99cda0504bb1f457d94468fa2c33c4e2 Address functional test nits +pr 2020-10-16 05:05:26 +0100 cbb5f3a2d584f487278e0da1db23d3fcb42e4dc6 Merge #19836: rpc: Properly deserialize txs with witness before signing +v 2020-10-16 05:29:23 +0100 fa723e3d43e63e8424d97d21d8f2cc8136aba206 Initialize default-initialized uint256 consensus params to zero explicitly +v 2020-10-16 07:26:46 +0100 51365674e828ae95477570019738ab32aa572241 script: Make ComputeEntrySchnorr and ComputeEntryECDSA const to clarify contract +pr 2020-10-16 08:01:42 +0100 82d3596dfe4ef4fd2c582d05540f93450b49d092 Merge #20161: Minor Taproot follow-ups +pr 2020-10-16 10:12:08 +0100 2947ae6f85d40baa8ac0d2180b181c60708ad0ba Merge #20035: signet: Fix uninitialized read in validation +pr 2020-10-16 10:43:21 +0100 cb21d864c52b7858000ff6c8727240f1721132a9 Merge #19401: QA: Use GBT to get block versions correct +v 2020-10-16 12:01:07 +0100 fa2b778d0cf723925af8710d52cae211d4f036df test: Remove unused -blockversion from tests +cr 2020-10-16 12:05:31 +0100 fddce7e199308d96e366d700dca982ef088ba98b test: use MiniWallet for mining_getblocktemplate_longpoll.py +v 2020-10-16 12:28:17 +0100 fa7fb0e44241982a6e5cd560c06ac0c9d8f47f88 test: Default blockversion to 4 in feature_block +v 2020-10-16 12:48:17 +0100 fa68755364473e48cf039e8cc2d08036fe58c1f6 contrib: Fix gen_key_io_test_vectors.py imports +pr 2020-10-16 13:08:35 +0100 9e8d2bd076d78ba59abceb80106f44fe26246b14 Merge bitcoin-core/gui#97: Relax GUI freezes during IBD (when using wallets) +v 2020-10-16 14:40:54 +0100 8ee3536b2b77aeb3a48df5b34effbc7345ef34d8 test: remove unused helpers random_transaction(), make_change() and gather_inputs() +v 2020-10-16 14:41:00 +0100 b128b566725a5037fdaea99940d1b9de5553d198 test: add logging for mining_getblocktemplate_longpoll.py +v 2020-10-16 22:33:44 +0100 c8abbc9d1fd8f77b5dcf31cf7a6dd6aac5d1c75c p2p: declare Announcement::m_state as uint8_t, add getter/setter +pr 2020-10-17 03:37:01 +0100 b3527fd2e9be5a94b84433ae229cdf0aaa2d3e7d Merge #20168: contrib: Fix gen_key_io_test_vectors.py imports +pr 2020-10-17 15:46:56 +0100 5d644778da48cb461c923235826a7db4a2946f00 Merge #20169: Taproot follow-up: Make ComputeEntrySchnorr and ComputeEntryECDSA const to clarify contract +v 2020-10-17 16:48:03 +0100 fa3af2c0d3b3ed185fb8c6105dc2d26dc66632af test: Fix intermittent issue in p2p_feefilter +pr 2020-10-17 16:57:23 +0100 80c8a02f1b4f6ad2b5c02595d66a74db22373ed4 Merge #20159: test: mining_getblocktemplate_longpoll.py improvements (use MiniWallet, add logging) +v 2020-10-18 09:10:20 +0100 faca3734c00ffaf2be7bd555fbfa2887ba28c811 test: Fix intermittent issue in wallet_import_rescan +v 2020-10-18 10:02:59 +0100 faab86f6c8367178a068b298eda4ae3986ac2147 test: Fix intermittent issue in wallet_send +cr 2020-10-18 17:06:01 +0100 76bbcc414f3001b16ac0101f738ed0b3e6f1a372 test: Fix -Wunused-function warning if configured --without-libs +pr 2020-10-19 03:25:38 +0100 c92aa8357c36a63b7a97d8a1bc09036a0d2661b3 Merge #19911: net: guard vRecvGetData with cs_vRecv and orphan_work_set with g_cs_orphans +pr 2020-10-19 04:07:11 +0100 a1e0359618e3a66d0156d2b0a4702bc55f957a3f Merge #19986: refactor: clean up -Wlogical-op warning in wallet/scriptpubkeyman.cp +pr 2020-10-19 07:04:10 +0100 62af467ff03941f3cf73c9727dd8cdb11ce20b3d Merge #20082: [bugfix] random: fixes read buffer to use min rather than max +pr 2020-10-19 08:18:16 +0100 152ddb31975875b8801043ea8342a7354357e282 Merge #20180: test: Fix -Wunused-function warnings if configured --without-libs +pr 2020-10-19 08:27:32 +0100 d9d9a293520d26ca8fec8caebab46db103b29903 Merge #20179: test: Fix intermittent issue in wallet_import_rescan +v 2020-10-19 08:42:40 +0100 fa5a91a352364fe615930f1e7d991671a54ddf2c test: Fix typo (one tx is enough) in p2p_feefilter +pr 2020-10-19 10:30:49 +0100 4769942d901a6095dc8715b6008d608e62d10b3c Merge #19624: Warn on unknown rw_settings +v 2020-10-19 11:00:16 +0100 fa38093beec89db97be9c61b78f3c5de127edbc8 doc: Merge release notes +pr 2020-10-19 11:47:55 +0100 4f807348af58759e330ab17a2bbc61c5dfb98081 Merge #20185: doc: Merge release notes +pr 2020-10-19 12:09:32 +0100 45385018e13e167521e655c36128d8ee4f2a3e0b Merge #20162: p2p: declare Announcement::m_state as uint8_t, add getter/setter +pr 2020-10-20 00:35:33 +0100 f5bd46a4cc6d395ce71ecb99852c1774235a249c Merge #20125: rpc, wallet: Expose database format in getwalletinfo +v 2020-10-20 08:27:45 +0100 be386840d4a394a1b6221fb7d0fa2b0bc4b1d413 test: Replace use of (dis)?connect_nodes globals +cr 2020-10-20 08:42:00 +0100 4b16c614616c1ff09e5b1dcd58516bcb9a88e5e8 scripted-diff: test: Replace uses of (dis)?connect_nodes global +v 2020-10-20 08:43:00 +0100 3c7d9ab8c8ec5284cdad1a53ee310b79b931f12f test: Move (dis)?connect_nodes globals into TestFramework as helpers +v 2020-10-20 14:32:23 +0100 2d5793c0161902730cde384dbdf3e3ba3e55c9e0 Bugfix: chainparams: Add missing (disabled) Taproot deployment for Signet +v 2020-10-20 14:44:43 +0100 6608fec332eac4dfd91138bc4fe2e1b5c7bb758f GUI: Create Wallet: Nicely disable descriptor wallet checkbox if sqlite support not compiled in +cr 2020-10-20 14:44:43 +0100 7b54d768e1514b328e1ac108d3db2f1bac3ba7ff Make sqlite support optional (compile-time) +v 2020-10-20 14:44:43 +0100 bbb42a68961a8ae1e4ef3221ffb1d5ff7272b075 RPC: createwallet: Nicer error message if descriptor wallet requested and sqlite support not compiled in +v 2020-10-21 12:28:15 +0100 fa4074b395a47c54069bd9f598244701505ff11d Show name, format and if uses descriptors in bitcoin-wallet tool +pr 2020-10-21 13:19:33 +0100 0f86e7f1285c6de697d144a0e68bbd67f4900e19 Merge #20157: Bugfix: chainparams: Add missing (always enabled) Taproot deployment for Signet +pr 2020-10-21 13:43:12 +0100 47fc883106fb939db0212751c2edb3d5f7430689 Merge #19967: test: Replace (dis)?connect_nodes globals with TestFramework methods +cr 2020-10-21 13:48:43 +0100 01476a88a6095fd3af71cb9bf1eadef920a1197b wallet: Make -wallet setting not create wallets +pr 2020-10-21 13:48:43 +0100 b46f37ba5ec4fbd2e4c82343fc4f353d7f34837a Merge #20198: Show name, format and if uses descriptors in bitcoin-wallet tool +v 2020-10-21 16:51:39 +0100 5aadd4be1883386a04bef6a04e9a1142601ef7a7 Convert amounts from float to decimal +v 2020-10-21 20:07:28 +0100 fa5f46600fb98f1b35346bedc1a66c9019d01114 test: Fix rpc_net intermittent issue +pr 2020-10-22 01:40:38 +0100 dda18e7310a202a8aa46c95279446131659f91c5 Merge #20214: test: Fix rpc_net intermittent issue +cr 2020-10-22 02:39:55 +0100 56a461f72796ca60de28e78f144741eb1a4f5213 wallet: fix buffer over-read in SQLite file magic check +pr 2020-10-22 09:13:44 +0100 1cb4e339f978bfbde7e0159879fe06913bdeae20 Merge #20039: test: Convert amounts from float to decimal +pr 2020-10-22 10:02:33 +0100 7012db2a6bcd38cc820771fc9fd7fef13772ea32 Merge #20176: test: Fix intermittent issue in p2p_feefilter +pr 2020-10-22 13:18:06 +0100 88271184e82222f556d67511cc64230b0532f40d Merge #20112: test: Speed up wallet_resendwallettransactions with mockscheduler RPC +pr 2020-10-22 20:26:00 +0100 9453fbf5a022803b621a4a93bfe91d421beab296 Merge #20: Wrap tooltips in the intro window +pr 2020-10-23 03:10:54 +0100 9af7c1993b3512a7230f723b1923abd496989c59 Merge #20216: wallet: fix buffer over-read in SQLite file magic check +pr 2020-10-23 10:54:47 +0100 49984b44cfcd3fd0cef16c8ce97197973afc3c04 Merge bitcoin-core/gui#71: Fix visual quality of text in QR image +pr 2020-10-24 08:01:37 +0100 d67883d01e507dd22d1281f4a4860e79d6a46a47 Merge bitcoin-core/gui#43: bugfix: Call setWalletActionsEnabled(true) only for the first wallet +v 2020-10-25 16:15:56 +0100 f8a1c4d9469cb496fdafaf6f4d94977687df9190 cli -netinfo: various quick updates and fixes +v 2020-10-25 16:22:55 +0100 33e987452f869c279f2491499939e51e0af8364c cli -netinfo: make age column variable-width +v 2020-10-25 16:51:18 +0100 773f4c99c00c0b1d8c1b53cb99ba571337100953 cli -netinfo: handle longer tor v3 local addresses +v 2020-10-25 16:51:21 +0100 398045ba8b3694931069f88ec95553b3207dd1a6 cli -netinfo: print oversized/extreme ping times as "-" +cr 2020-10-25 20:17:18 +0100 7b2e42ecc4bddb5504665d6932dc5ffdbd3b593e qt: Add WalletFrame::sizeHint +v 2020-10-26 09:17:25 +0100 fa56d56d4e9b69fdd02e631b9a2380cfd3095144 fuzz: Properly initialize PrecomputedTransactionData +v 2020-10-26 16:31:25 +0100 fa9b48549ca39b862a10bcfd90e3eac2a0e8ad2e test: Add test for -blockversion +v 2020-10-26 17:37:35 +0100 903f3d06275312aa4000b765d2287339210c61c1 fuzz: Check for addrv1 compatibility before using addrv1 serializer +pr 2020-10-27 08:07:23 +0100 fa463f11637739eced87ce892b59aa22e28a71d5 Merge #20247: fuzz: Check for addrv1 compatibility before using addrv1 serializer. Fuzz addrv2 serialization. +pr 2020-10-27 08:43:53 +0100 67d4643a1a763b893ee69f6bbbf59ef1f2cb0d51 Merge #20152: doc: Update wallet files in files.md +pr 2020-10-27 10:17:14 +0100 c1564baf3b5e1e069e5fc573c7cbe875e9d84e87 Merge #19124: doc: Document ALLOW_HOST_PACKAGES dependency option +pr 2020-10-27 10:57:57 +0100 83363f7b62f97e34c863161447a7647f4f72b131 Merge #20167: test: Add test for -blockversion +v 2020-10-27 11:07:41 +0100 d419fdedbe34c7ea19c0473660cc1b486b4e70d8 [net processing] Don't add AlreadyHave txs to recentRejects +v 2020-10-27 14:30:12 +0100 d0a829e9632379e42f0be5c554e3b692f0d14a95 build: fix mutex detection when building bdb on macOS +pr 2020-10-27 14:51:30 +0100 55b1ffcd259cc64139dad646a52fab5c597c95c2 Merge bitcoin-core/gui#116: Fix unreasonable default size of the main window without loaded wallets +cr 2020-10-27 19:40:44 +0100 a193f969eef4a0e656d26bb7e7bba1c04d90b777 qt: Pre-splitoff translations update +v 2020-10-27 21:45:25 +0100 0672522aedd3760c30b8740c7e9487f00bf9dfeb [move-only, test]: Match test order with run order +v 2020-10-28 03:23:02 +0100 47ff5098ad5ea2c20ea387f99940a7cde6c80789 [test] Clarify setup of node topology. +ff 2020-10-28 07:08:48 +0100 5803f5f5f6030e69b46a46f0511b8173bf89de0d Update secp256k1 subtree to latest master +cr 2020-10-28 07:08:48 +0100 6c0259fc2f8bd34ba83ad10a6a11d6d99e8d1fc7 Squashed 'src/secp256k1/' changes from c6b6b8f1bb..3967d96bf1 +pr 2020-10-28 08:50:12 +0100 488b77f72e8fcca63db0dd46780c3940b101ec25 Merge #20256: qt: Pre-splitoff translations update +pr 2020-10-28 10:25:34 +0100 db26eeba71fb07caae8c4c8a59a80c4ebe0b5797 Merge #19877: [test] clarify rpc_net & p2p_disconnect_ban functional tests +v 2020-10-28 11:18:09 +0100 778cd0d88d8d6dd22d7f0fb740f3ca3dbb2280a1 [tests] Remove getnettotals/getpeerinfo consistency test +pr 2020-10-28 16:27:33 +0100 3f512f3d563954547061ee743648b57a900cbe04 Merge #20258: tests: Remove getnettotals/getpeerinfo consistency test +pr 2020-10-29 11:40:15 +0100 6196cf77e57499c678df275c2707bda37873868e Merge #19753: p2p: don't add AlreadyHave transactions to recentRejects +pr 2020-10-29 11:50:28 +0100 924a4ff7eb626185684a4524bb0acea7e2904db8 Merge #20242: fuzz: Properly initialize PrecomputedTransactionData +pr 2020-10-29 12:03:36 +0100 f3727fd73538b3a097559cc1005c08caa2bdf1dd Merge #20156: build: Make sqlite support optional (compile-time) +pr 2020-10-29 12:07:31 +0100 2e24197117027c927a45d3c1832326e5bd9b10d0 Merge #20115: cli: -netinfo quick updates/fixups for 0.21 +pr 2020-10-29 12:31:54 +0100 5b82f253b69f3b3d7b5bafb9089ec36c14d1162c Merge #20195: build: fix mutex detection when building bdb on macOS +pr 2020-10-29 12:38:21 +0100 8e9e190ea5ce157f1bb977cca6168e7c82275ac3 Merge #20257: Update secp256k1 subtree to latest master +pr 2020-10-29 15:01:39 +0100 42b66a6b814bca130a9ccf0a3f747cf33d628232 Merge #20186: wallet: Make -wallet setting not create wallets +cr 2020-10-29 17:34:16 +0100 586640381a2c379ce3d6366b1b4534ccc4e8ccf2 Skip --descriptor tests if sqlite is not compiled +v 2020-10-29 19:59:29 +0100 7411876c75471a45ad40c38c668db3a4b9413fb9 Ensure a legacy wallet for BDB format check +v 2020-10-29 22:55:13 +0100 bd93fc9945bfd4be117990c5d861f61ddd451f96 Fix change detection of imported internal descriptors +v 2020-10-30 11:15:05 +0100 5bff82540b90d899ceac6390c008d653e6b665c3 [gui] create wallet: smarter checkbox toggling +v 2020-10-30 13:53:28 +0100 fab94534b64593be1620c989bf69eb02e1be9b1b doc: Document that wallet salvage is experimental +v 2020-10-30 23:52:19 +0100 525cbd425e2f6a1dbd0febc53d7ada22cec4661f Only relay Taproot spends if next block has it active +v 2020-10-30 23:52:38 +0100 3d0556d41087f945ed0a47a5d770076ad42ce432 Increase feature_taproot inactive test coverage +v 2020-10-31 16:02:49 +0100 ecc6cf1a3b097b9b5b047282063a0b6779631b83 test: fix creation of std::string objects with \0s +v 2020-10-31 17:02:52 +0100 89836a82eec63f93bbe6c3bd6a52be26e71ab54d style: minor improvements as a followup to #19845 +v 2020-11-01 13:56:10 +0100 241434200ec2067673d8522fee4f1228abfd8247 refactor: qt: Use vQueueNotifications.clear() +v 2020-11-01 18:23:05 +0100 5d9917464a7987ebe82e1355015d1c6f4cb91657 docs: Correct getblockstats documentation for (sw)total_weight +cr 2020-11-01 22:19:24 +0100 e5f3e95a8e277acc54bc377a6b116d60d8c4eb5c doc: fix getchaintxstats fields in release-process.md +pr 2020-11-01 23:41:38 +0100 5a6f3c5a01eaf904c42bd77dbed931b49a8fec74 Merge #20080: Strip any trailing `/` in -datadir and -blocksdir paths +pr 2020-11-01 23:48:22 +0100 0c2eb7f8deaada74d816889eddd4df9b92e4a29b Merge #20262: tests: Skip --descriptor tests if sqlite is not compiled +pr 2020-11-01 23:52:49 +0100 f1fcbdea25558d0562e975f79fc11c614d15bad6 Merge #20271: doc: Document that wallet salvage is experimental +v 2020-11-01 23:54:19 +0100 08067aebfd7e838e6ce6b030c31a69422260fc6f Add script equivalent of functions in address.py +cr 2020-11-01 23:54:19 +0100 0bd1860300b13b12a25d330ba3a93ff2d13aa379 Avoid dumpprivkey and watchonly behavior in rpc_signrawtransaction.py +v 2020-11-01 23:54:19 +0100 242aed7cc1d003e8fed574bbebd19c7e54e23402 tests: Add a --legacy-wallet that is mutually exclusive with --descriptors +cr 2020-11-01 23:54:19 +0100 25bc5dccbfd52691adca6edd418dd54290300c28 Use importdescriptors when in descriptor wallet mode in wallet_createwallet.py +v 2020-11-01 23:54:19 +0100 3457679870e8eff2a7d14fe59a479692738c48b6 Use separate watchonly wallet for multisig in feature_nulldummy.py +v 2020-11-01 23:54:19 +0100 388053e1722632c2e485c56a444bc75cf0152188 Disable some tests for tool_wallet when descriptors +v 2020-11-01 23:54:19 +0100 47d3243160fdec7e464cfb8f869be7f5d4ee25fe Make raw multisig tests legacy wallet only in rpc_rawtransaction.py +v 2020-11-01 23:54:19 +0100 4b871909d6e4a51888e062d322bf53263deda15e Use importdescriptors for descriptor wallets in wallet_bumpfee.py +v 2020-11-01 23:54:19 +0100 553dbf9af4dea96e6a3e79bba9607003342029bd Make import tests in wallet_listtransactions.py legacy wallet only +v 2020-11-01 23:54:19 +0100 59d3da5bce4ebd9c2291d8f201a53ee087938b21 Do addmultisigaddress tests in legacy wallet mode in wallet_address_types.py +v 2020-11-01 23:54:19 +0100 6c9c12bf87f95066acc28ea2270a00196eb77703 Update feature_backwards_compatibility for descriptor wallets +v 2020-11-01 23:54:19 +0100 86968882a8a26312a7af29c572313c4aff488c11 Add descriptor wallet output to tool_wallet.py +v 2020-11-01 23:54:19 +0100 9a4c631e1c00eb1661c000978b133d7aa0226290 Update wallet_labels.py to not require descriptors=False +cr 2020-11-01 23:54:19 +0100 a357111047411f18c156cd34a002a38430f2901c Update wallet_importprunedfunds to avoid dumpprivkey +v 2020-11-01 23:54:19 +0100 a42652ec10c733a5bf37e418e45d4841f54331b4 Move import and watchonly tests to be legacy wallet only in wallet_balance.py +cr 2020-11-01 23:54:19 +0100 c2711e4230d9a423ead24f6609691fb338b1d26b Avoid dumpprivkey in wallet_listsinceblock.py +v 2020-11-01 23:54:19 +0100 c7b7e0a69265946aecc885be911c7650911ba2e3 tests: Make only desc wallets for wallet_multwallet.py --descriptors +v 2020-11-01 23:54:19 +0100 d4b67ad214ada7645c4ce2d5ec336fe5c3f7f7ca Avoid creating legacy wallets in wallet_importdescriptors.py +cr 2020-11-01 23:54:19 +0100 dc81418fd01021070f3f66bab5fee1484456691a Use a separate watchonly wallet in rpc_fundrawtransaction.py +pr 2020-11-01 23:58:19 +0100 26d7941224bcfe4f6ce9d4462610f300c9bd029a Merge #20230: wallet: Fix bug when just created encrypted wallet cannot get address +pr 2020-11-02 08:44:59 +0100 867dbeba5f91be15ca0d4a7303a71957ff9a37ad Merge #20281: docs: Correct getblockstats documentation for (sw)total_weight +cr 2020-11-02 09:22:08 +0100 fa90ba36d3f640ef2d559b69ae1ea99a73da6ac8 Update assumed chain params +v 2020-11-02 09:38:38 +0100 2ead31fb1b17c9b183a4b81f0ae4f48e5cf67d64 [wallet] Return object from upgradewallet RPC +pr 2020-11-02 10:12:06 +0100 c5ec0367d718544caa3a1578d6c730fc92ee4e94 Merge #20165: Only relay Taproot spends if next block has it active +v 2020-11-02 14:19:44 +0100 fae45c34d13330442d5135cb9ac5a56dc697497b test: Only try witness deserialize when checking for witness deserialize failure +pr 2020-11-02 15:58:25 +0100 b6a00e76ab6f9efa1c30b65aa33f8faaf4b50b5b Merge #20279: doc: release process updates/fixups +pr 2020-11-02 18:50:37 +0100 ef4c7c4e0bf26d2cde5a85a60c7d865d50fd37ec Merge #18788: tests: Update more tests to work with descriptor wallets +pr 2020-11-02 18:53:23 +0100 ca18860563259d2b42d1a102ab6bc2802ce99b1d Merge #20263: Update assumed chain params +v 2020-11-02 20:54:57 +0100 dd7b5f46d85401254630abf6976f59b5b8eed181 script: fix deprecation warning in makeseeds.py +v 2020-11-02 20:54:59 +0100 961f148cb1b4caab86b4354357999e03433b04b1 doc: update contrib/seeds/README dnspython installation info +v 2020-11-02 22:45:40 +0100 c2cf8a18c25bf19ade51fedfa5c352bd7145edb0 fuzz: Check for addrv1 compatibility before using addrv1 serializer on CService +v 2020-11-02 23:21:03 +0100 28f8cb13d4d5a3d6aefa6e192e55f9aa87579e52 fuzz: Fix DecodeHexTx fuzzing harness issue +pr 2020-11-03 02:38:35 +0100 8387f832d6932d72adb86eaa4aecfd0c35341acc Merge #20187: Addrman: test-before-evict bugfix and improvements for block-relay-only peers +pr 2020-11-03 09:14:22 +0100 5174b534da57066dca2e82a617c62919b6d638fd Merge #20289: fuzz: Check for addrv1 compatibility before using addrv1 serializer/deserializer on CService +pr 2020-11-03 09:48:15 +0100 218fe60d91a9190aa0ee561479044df368214766 Merge #20290: fuzz: Fix DecodeHexTx fuzzing harness issue +cr 2020-11-03 10:15:20 +0100 eefe19471868ef0cdc9d32473d0b57015e7647ee [net] Consolidate logic around calling CAddrMan::Connected() +v 2020-11-03 12:06:32 +0100 58cfbc38e040925b51cb8d35d23b50e9cf06fb2a Ignoring (but warn) on duplicate -wallet parameters +v 2020-11-03 12:23:21 +0100 fa762a3fd43e49f8572be69e9129cd9170855f76 test: Remove unused unnamed parameter from block.serialize call +v 2020-11-03 12:25:55 +0100 fa1dea19fc50db449386c9f969adc5ad327a0f0d test: Fix deser issue in create_block +v 2020-11-03 12:26:17 +0100 50eb0c2512842b96a0128a7d592a357665f6e006 Small improvements to the Taproot functional tests +v 2020-11-03 12:26:17 +0100 fac865b72d5c0e01fce74b84ab21e5ebbf069327 test: Fix intermittent feature_taproot issue +v 2020-11-03 14:01:40 +0100 fa62304c9760f0de9838e56150008816e7a9bacb Remove dead CheckForkWarningConditionsOnNewFork +v 2020-11-03 14:02:02 +0100 fa7eed5be704ccdbdce5c9aedb953dd9c8b30446 doc: Clarify that vpindexToConnect is in reverse order +pr 2020-11-03 15:04:07 +0100 95bde34a7186edb559efeeea7f2fbc0fbdd06273 Merge #20237: net: Hardcoded seeds update for 0.21 +v 2020-11-03 19:44:57 +0100 fab900802d74799ac1004265951be1b66e70cf76 ci: Bump timeout factor +v 2020-11-03 20:26:58 +0100 fa8e494554d0f5f8f48bb33ce96a8d7de9b95e31 ci: Run ci configs on cirrus +pr 2020-11-04 02:51:42 +0100 17c6fb176a07d86f96f7cf41164c4b71cd1b3765 Merge #20282: wallet: change upgradewallet return type to be an object +pr 2020-11-04 04:35:23 +0100 5d32009f1a3b091299ff4a9345195b2359125f98 Merge #20220: wallet, rpc: explicit fee rate follow-ups/fixes for 0.21 +pr 2020-11-04 08:51:14 +0100 88776c2926061482ab551b0cf5c408fc1bc39ac3 Merge #20245: test: Run script_assets_test even if built --with-libs=no +v 2020-11-04 10:28:02 +0100 04a69c200e0d18ae63c7e47898f85d1b4cb5c23d macOS deploy: use the new plistlib API +v 2020-11-04 12:41:17 +0100 0bfce9dc46234b196a8b3679c21d6f8455962495 [addrman] Fix Connected() comment +v 2020-11-04 13:21:54 +0100 fa2ecadd0d3283a89d27772dc0275e76277ae17e test: Fix intermittent rpc_net issue +v 2020-11-04 13:22:06 +0100 f1f433e8ca014f69925e8d5487877e06ca784ec8 Make it easier to reason about node eviction by removing unused NodeEvictionCandidate::addr (CAddress) +pr 2020-11-04 13:41:52 +0100 1209b6c692c14dc1435d653f3c032ae22a98af8e Merge #20212: net: fix output of peer address in version message +v 2020-11-04 16:55:03 +0100 5cafe2b25c1d2f6825b3c8103c280020929dd645 fuzz: Add missing ECC_Start to descriptor_parse test +pr 2020-11-04 17:16:41 +0100 ed9f5477502e5856eba742656e8fc0fcf7bb053b Merge #20299: test: Fix intermittent rpc_net issue +v 2020-11-04 18:10:23 +0100 bd7398cc6258c258e9f4411c50630ec4a552341b wallet: have ScriptPubKeyMan::Upgrade check against the new version +cr 2020-11-04 18:15:12 +0100 8e32e1c41c995e832e643f605d35a7aa112837e6 wallet: remove nWalletMaxVersion +v 2020-11-04 18:15:14 +0100 0bd995aa19be65b0dd23df1df571c71428c2bc32 wallet: upgrade the CHDChain version number when upgrading to split hd +v 2020-11-04 18:15:25 +0100 092fc434854f881330771a93a1280ac67b1d3549 tests: Add a sha256sum_file function to util +v 2020-11-04 18:15:29 +0100 4b418a9decc3e855ee4b0bbf9e61121c8e9904e5 test: Add test_framework/bdb.py module for inspecting bdb files +v 2020-11-04 18:16:54 +0100 bf7635963c03203e7189ddaa56c6b086a0108cbf tests: Test specific upgradewallet scenarios and that upgrades work +v 2020-11-04 18:16:57 +0100 5f9c0b6360215636cfa62a70d3a70f1feb3977ab wallet: Remove -upgradewallet from dummywallet +cr 2020-11-04 18:16:57 +0100 a314271f08215feba53ead27096ac7fda34acb3c test: Remove unused wallet.dat +pr 2020-11-04 20:13:08 +0100 deb2b27c0d9910a4e522c0f9d500d863468e8ee2 Merge #20294: ci: Run more ci configs on cirrus +pr 2020-11-04 20:38:18 +0100 67600880159a8a00393ea4969288393a7dfc514d Merge #20300: fuzz: Add missing ECC_Start to descriptor_parse test +v 2020-11-05 00:11:50 +0100 d7901ab8d2fdd2f6e68c4fa48078111bf5f0fa73 fuzz: Assert expected DecodeHexTx behaviour when using legacy decoding +pr 2020-11-05 07:51:07 +0100 83650e4df5caac2dbe734f9021430e525d5cc6a5 Merge #20199: wallet: ignore (but warn) on duplicate -wallet parameters +pr 2020-11-05 07:56:02 +0100 6954e4d16c1c14142c400e561224fcc98bf6a519 Merge #20283: test: Only try witness deser when checking for witness deser failure +pr 2020-11-05 07:57:28 +0100 f33e3325417988711476fd4703ac013d13a5de46 Merge #20303: fuzz: Assert expected DecodeHexTx behaviour when using legacy decoding +v 2020-11-05 10:28:37 +0100 090b8385af818e1df122aacdd6d71bd37c8fffa7 Set bilingual error completely +v 2020-11-05 12:00:18 +0100 fac05178366a1c9100b1d19d66fb669d7266f306 travis: Remove s390x build +v 2020-11-05 12:54:51 +0100 fa2c3c0d96b48bc1685d84186552f72e3609a331 ci: Set LC_ALL=C to allow running the s390x tests in qemu +pr 2020-11-05 13:00:13 +0100 d94777bd525a06abac74cd1508ddb845faf1d118 Merge #20302: net: Make it easier to reason about node eviction by removing unused NodeEvictionCandidate::addr (CAddress) +v 2020-11-05 13:50:15 +0100 fa00ff0399fe54f42d80daa04140d19bcfe0e2d8 test: Fix wallet_multiwallet test issue on Windows +pr 2020-11-05 14:51:37 +0100 9bb078351b09862a263e936bb612dca82305a6fe Merge #20308: wallet: Set bilingual error completely +v 2020-11-05 17:31:24 +0100 faa2f06f5eaf8578873495f44603ee74d7a1abf4 scripted-diff: [build] Ensure source tarball has leading directory name +pr 2020-11-05 18:45:05 +0100 f5cdc290d5a41895d2bbaf474c3a951e5141b8a9 Merge #20316: test: Fix wallet_multiwallet test issue on Windows +v 2020-11-05 19:51:57 +0100 444412821e5349ce0e0b039d884583edb70c4399 test: Fix intermittent issue in wallet_listsinceblock +v 2020-11-05 20:48:41 +0100 faf5fa74136b0117f02c5aa525bfff86654786ea wallet: Set DatabaseStatus::SUCCESS in MakeSQLiteDatabase +v 2020-11-05 23:16:55 +0100 568a1d72619371a45b14a8356d3f80bd0c0efabc fix ecdsa verify in test framework +cr 2020-11-06 05:17:54 +0100 69f59af54d15ee9800d5df86bcdb0e962c71e7c3 Bugfix: Wallet: Soft-fail exceptions within ListWalletDir file checks +v 2020-11-06 05:35:33 +0100 24d2d3341d07509ad3f37bb6f130446ad20ac807 QA: wallet_multiwallet: Check that recursive symlink directory and wallet.dat loops are ignored +pr 2020-11-06 08:02:00 +0100 65460c207c0b92122b8abf87495403d3a396da2b Merge #20324: wallet: Set DatabaseStatus::SUCCESS in MakeSQLiteDatabase +pr 2020-11-06 08:08:27 +0100 c51c2753a4ff34413f7369e9cf0282f64a5e38de Merge #20326: tests: Fix ecdsa_verify in test framework +pr 2020-11-06 08:34:55 +0100 a0c00ff7c04524f838e927173af41ccfc2ac7217 Merge #20298: macOS deploy: use the new plistlib API +v 2020-11-06 10:05:30 +0100 66667acc53cdfe224b36a74be4ba046b28282d15 cirrus: Skip tasks on the gui repo main branch +v 2020-11-06 10:27:47 +0100 dc80a7d0b0817b43d41af3a08b5800c425ebd5d8 docs/descriptors.md: Remove hardened marker in the path after xpub +pr 2020-11-06 18:03:49 +0100 4727c1ca2493f5e5f333ea92aa963aaf6a43057c Merge #20328: cirrus: Skip tasks on the gui repo main branch +pr 2020-11-06 18:08:32 +0100 7e373294a5ae819099c39d9d03d1f5a311d63cfc Merge #20315: travis: Remove s390x build +v 2020-11-07 07:50:59 +0100 fa4234d877ea3193bfd0e18ff68dcb8fb84b47b5 test: Mock IBD in net_processing fuzzers +v 2020-11-07 12:35:20 +0100 021feb3187b207d511561c1f0ffd7f9e5e0c9c1d refactor: Drop redudant CWallet::GetDBHandle +v 2020-11-07 12:40:27 +0100 9b74461fa293453a9eb0b1717b30b3f7fa778d91 refactor: Assert before dereference in CWallet::GetDatabase +cr 2020-11-09 08:53:47 +0100 8ae9d314e9af7bcce1e8bc52f0317b9d565109bf Bump minimum python version to 3.6 +v 2020-11-09 08:53:50 +0100 97c738ff1b592270491551cc0a43472d244ffbb0 [tests] Recommend f-strings for formatting, update feature_block to use them +v 2020-11-09 10:15:13 +0100 fafce1a13a65cc3ae0cd5351648bb0290f9bfe8c ci: Move documentation to correct config file +cr 2020-11-09 10:15:48 +0100 fa0795f54dc5268bacc6acdfdbe23f9952a0e7d8 ci: Replace TRAVIS_OS_NAME with CI_OS_NAME +v 2020-11-09 10:15:50 +0100 fa8b1114e60100f503673ccc7ef5618851c0c9e3 ci: Run arm ci config on cirrus +cr 2020-11-09 10:15:59 +0100 3333d6942e8c5d823b97ea51ef88c8a0791742c6 ci: Run macos ci config on cirrus +cr 2020-11-09 10:16:45 +0100 77777c8b5e3d0edbe1178d982a778b7cc9964b70 ci: Run windows ci config on cirrus +pr 2020-11-09 15:06:20 +0100 f70eb51b05dee30b31f576a69bf110e9ac49c8b8 Merge #20318: build: Ensure source tarball has leading directory name +pr 2020-11-09 15:14:45 +0100 663fd92b28c355cafbc67efb91ad8ec0f41e31d6 Merge #20266: wallet: fix change detection of imported internal descriptors +pr 2020-11-09 15:31:20 +0100 05aeeee34f1552ea9be553a55f927110393927bf Merge #20339: ci: Run more ci configs on cirrus +pr 2020-11-09 15:47:04 +0100 4fd37d0a104ff1b05a3c8e374af9b2c92a0078c2 Merge #20292: test: Fix intermittent feature_taproot issue +v 2020-11-09 16:21:51 +0100 b6121edf70a8d50fd16ddbba0c3168e5e49bfc2e swapped "is" for "==" in literal comparison +v 2020-11-09 16:27:41 +0100 0e3a78a8ab7ab5da71bd5e2f428ec3a2c9ad0901 fuzz: Check for addrv1 compatibility before using addrv1 serializer/deserializer on CSubNet +v 2020-11-09 16:29:15 +0100 79b8f8d5749fc676d9eeca0296172b7cdbbf2238 fuzz: Assert roundtrip equality for both addrv1 and addrv2 versions of CService +pr 2020-11-09 17:07:23 +0100 79a3b59cc70622fbadc43ade5fce31fcf94d852d Merge #20120: net, rpc, test, bugfix: update GetNetworkName, GetNetworksInfo, regression tests +pr 2020-11-09 20:19:00 +0100 1dfe19e2840b16c014674a890ba58a43fe039687 Merge #20153: wallet: do not import a descriptor with hardened derivations into a watch-only wallet +v 2020-11-09 21:21:30 +0100 330cb33985d0ce97c20f4a0f0bbda0fbffe098d4 src/randomenv.cpp: fix build on uclibc +v 2020-11-09 22:58:26 +0100 6c7e8f067dcf4c5d793d162aeb84f074f9a14664 depends: Allow relative CONFIG_SITE path env var +v 2020-11-09 22:58:27 +0100 618cbd2c1a630a60bed9212718dce78fe5f50108 lint: Also lint files with shellcheck directive +v 2020-11-09 22:58:28 +0100 46756a69877ab7d56f3b05f8c5a8899eb24d9ffd depends: Fix PYTHONPATH setting in config.site.in +pr 2020-11-10 07:57:02 +0100 0b69bb90eed33bdafaf74fb3d97b9561372e4bbd Merge #20355: fuzz: Check for addrv1 compatibility before using addrv1 serializer/deserializer on CSubNet +pr 2020-11-10 09:20:51 +0100 42f950cb27b732782d55282cdcd934396fcd7071 Merge #20322: test: Fix intermittent issue in wallet_listsinceblock +pr 2020-11-10 19:51:11 +0100 fa8dd34e918cd80db215df8937aaf6bb1552fcd9 Merge #20332: test: Mock IBD in net_processing fuzzers +v 2020-11-11 01:01:02 +0100 7087440894a9daa7de806c5aa42d83ad60759c65 depends: native_ds_store 1.3.0 +v 2020-11-11 09:03:11 +0100 fa92cf29d971811ff8dd844ee1a1e2e12b79e389 ci: Remove redundant valgrind fuzz task +v 2020-11-11 10:10:31 +0100 fa949b3c1325693ea7ecc5556b2de50d2a6c9ead test: Suppress epoll_ctl data race +cr 2020-11-11 13:15:00 +0100 5e146022daa4336de94447e5b8e5418296286927 wallet: fix scanning progress calculation for single block range +pr 2020-11-11 14:21:37 +0100 155bf91c3b66e3ec9f870d8161e1a3c9a5c23251 Merge #20368: ci: Remove redundant valgrind fuzz task +v 2020-11-11 15:45:16 +0100 ee11a412a537f62aa46e8862678ce2069a2df5b7 Avoid signed integer overflow when loading a mempool.dat file with a malformed time field +pr 2020-11-11 15:45:19 +0100 179ece42734a126ee0b9b7b62feedb4011995eff Merge #20218: test: Suppress epoll_ctl data race +cr 2020-11-11 15:55:46 +0100 3f7279161347543ce4e997d78ea89a4043491145 wallet: fix bug in RPC send options +v 2020-11-11 15:55:53 +0100 6112cf20d43b0be34fe0edce2ac3e6b27cae1bbe wallet: add CFeeRate ctor doxygen documentation +v 2020-11-11 15:55:56 +0100 e21212f01b7c41eba13b0479b252053cf482bc1f wallet: remove unneeded WALLET_BTC_KB_TO_SAT_B constant +cr 2020-11-11 15:55:59 +0100 a0d495747320c79b27a83c216dcc526ac8df8f24 wallet: introduce fee_rate (sat/vB) param/option +cr 2020-11-11 15:56:01 +0100 410e471fa42d3db04e8879c71f8c824dcc151a83 wallet: remove redundant bumpfee fee_rate checks +v 2020-11-11 15:56:03 +0100 b7994c01e9a3251536fe6538a22f614774eec82d wallet: add fee_rate unit warnings to bumpfee +cr 2020-11-11 15:56:05 +0100 7f9835a05abf3e168ad93e7195cbaa4bf61b9b07 wallet: remove fee rates from conf_target helps +v 2020-11-11 16:05:15 +0100 38ada892ed0ed9aaa46b1791db12a371a3c0c419 addrman: ensure old versions don't parse peers.dat +pr 2020-11-11 16:11:01 +0100 d9f5132736f34f31f6e7d009015f917c9dcfec00 Merge #20344: wallet: fix scanning progress calculation for single block range +v 2020-11-11 23:31:40 +0100 3c77b8009de9457c356c0bf4362d11bb99a17bb7 fuzz: Improve coverage for CPartialMerkleTree fuzzing harness +pr 2020-11-12 01:26:38 +0100 c2d8ba6265a4375b039daf9cb36c0e0edad57eef Merge #19502: Bugfix: Wallet: Soft-fail exceptions within ListWalletDir file checks +v 2020-11-11 23:31:40 +0100 3c77b8009de9457c356c0bf4362d11bb99a17bb7 fuzz: Improve coverage for CPartialMerkleTree fuzzing harness +pr 2020-11-12 01:26:38 +0100 c2d8ba6265a4375b039daf9cb36c0e0edad57eef Merge #19502: Bugfix: Wallet: Soft-fail exceptions within ListWalletDir file checks +v 2020-11-12 06:12:29 +0100 c82336c493b112160d781974d4066fcb956b85f6 Remove references to CreateWalletFromFile +pr 2020-11-12 09:32:56 +0100 bcd142e479fa2917ba4987dc94b0ef6a4a2ac378 Merge #20285: Remove references to CreateWalletFromFile +pr 2020-11-12 09:34:48 +0100 027e51f715173d61c59514fd8deeea72f0c42ee8 Merge #20372: Avoid signed integer overflow when loading a mempool.dat file with a malformed time field +pr 2020-11-12 09:57:35 +0100 af8ec1d3e5766cac4960ef0e68db865d85a272b3 Merge #20375: fuzz: Improve coverage for CPartialMerkleTree fuzzing harness +pr 2020-11-12 10:06:42 +0100 8a486158cbc3f18adf12d2d3b737f7f4e7399e7d Merge #20188: tests: Add fuzzing harness for CConnman +cr 2020-11-12 11:43:03 +0100 173b5b5fe07d45be5a1e5bc7a5df996f20ab1e85 wallet: update fee rate units, use sat/vB for fee_rate error messages +v 2020-11-12 11:43:14 +0100 6da3afbaee5809ebf6d88efaa3958c505c2d71c7 wallet: update remaining rpcwallet fee rate units to BTC/kvB +cr 2020-11-12 11:43:17 +0100 449b730579566459e350703611629e63e54657ed wallet: provide valid values if invalid estimate mode passed +v 2020-11-12 11:43:19 +0100 be481b72e24fb6834bd674cd8daee67c6938b42d wallet: use MIN_RELAY_TX_FEE in bumpfee help +v 2020-11-12 11:43:22 +0100 9a670b4f07a6140de809d73cbd7f3e614eb6ea74 wallet: update sendtoaddress, send RPC examples with fee_rate +cr 2020-11-12 11:44:15 +0100 05e82d86b09d914ebce05dbc92a7299cb026847b wallet: override minfee checks (fOverrideFeeRate) for fee_rate +pr 2020-11-12 12:23:55 +0100 9bd1316697292251ed5690390794fc64517fc86b Merge bitcoin-core/gui#120: Fix multiwallet transaction notifications +cr 2020-11-12 15:23:17 +0100 e6bb9fde851422808f5d9870782c394f74a1f400 tests: Add fuzzing harness for CAddrMan +cr 2020-11-12 16:33:43 +0100 d04a17a7907c57f7b570e1b9743fd63489bdad68 fuzz: Use ConsumeRandomLengthBitVector(...) in src/test/fuzz/connman and src/test/fuzz/net +pr 2020-11-12 17:05:51 +0100 0bd4929cd00e91bf4137f43b097cd62f72f503e4 Merge #20284: addrman: ensure old versions don't parse peers.dat +v 2020-11-12 17:11:18 +0100 440f8d3abe97b96f434dad5216d417a08fc10253 fix potential devision by 0 +v 2020-11-12 19:58:59 +0100 0ccb3addf68067200892963521a92713c4667a63 tests: Remove no longer needed UBSan suppression (float-divide-by-zero in validation.cpp) +pr 2020-11-13 07:19:23 +0100 99fcc2b4778fa5e534f4cc5d6487bcaf3e840ac2 Merge #20379: tests: Remove no longer needed UBSan suppression (float divide-by-zero in validation.cpp) +pr 2020-11-13 07:40:35 +0100 28cb61646b29178dbdc0687670b685c30367347f Merge #19065: tests: Add fuzzing harness for CAddrMan +pr 2020-11-13 08:26:57 +0100 543693b92b954d186cb466a2f14b480f3bcf8c0b Merge #20378: wallet: fix potential division by 0 in WalletLogPrintf +v 2020-11-14 01:54:17 +0100 49473ef211343a25658d7c2de17c92e3123ab33b build: convert "echo" usage into a patch in qt package +v 2020-11-14 01:54:24 +0100 498fa16beabcbba0ef66acd4162e0f77de064268 build: document preprocessing steps in qt package +cr 2020-11-14 01:54:24 +0100 498fa16beabcbba0ef66acd4162e0f77de064268 build: document preprocessing steps in qt package +v 2020-11-14 01:54:24 +0100 bd5d9336d9e1c2345d72531adf2027bc4d099d1b build: don't copy Info.plist.* into mkspec for macOS qt build +v 2020-11-14 01:54:24 +0100 bfd7e33b4b255c3a5ba14993665e04349c6bdf0a build: remove plugin_no_soname from mac qt qmake.conf +v 2020-11-14 01:54:24 +0100 e1f2553e1148de9bd57818b40b5fe9da7ff5e246 build: remove global_init_link_order from mac qt qmake.conf +v 2020-11-14 01:54:24 +0100 fdde4c7ce624d4dbf72d38e9783c304d70430386 build: pass XCODE_VERSION through to qt macOS cross compile conf +cr 2020-11-14 02:20:07 +0100 29c66ace5c777b56cd9e19756a1ab0801d15a5ae Silence false positive GCC warning +v 2020-11-14 09:56:38 +0100 049feabf289ace817a3da62fe84942d0200b8f0b Add missing optional.h include +v 2020-11-14 13:07:49 +0100 ac64cec4ce35cb7e6fbf3678c1ffeac0137791ae gui: create wallet: add advanced section +v 2020-11-14 13:07:49 +0100 c99d6f644aa45d1bd929790f23a36d0dd7c29004 gui: create wallet: name placeholder +v 2020-11-14 18:51:59 +0100 20e491ddcb2617472c15294067768e8ce122499a CI/Cirrus: Skip merge_base step for non-PRs +v 2020-11-15 08:12:06 +0100 406097c8102d903759dabcbaf94c39831580139b ci: Use the previous build worker image in AppVeyor +pr 2020-11-15 09:44:05 +0100 fb7726e56d0f0617076c89cbc279547cc9d07341 Merge #20395: ci: Use the previous build worker image in AppVeyor +pr 2020-11-15 18:33:59 +0100 0ede354367c478cbbed0ec40a9d3cf1efe74cf33 Merge #20386: Silence false positive GCC warning in wallet/rpcwallet.cpp +pr 2020-11-16 07:57:34 +0100 2fa085a5d7522f9a045f6dab1cf0a4768b35715a Merge #20033: refactor: minor whitespace fixups, s/const/constexpr/ and remove template (followup to #19845) +pr 2020-11-16 07:59:43 +0100 37a463481176b1e2d8f562892ca5732aa7fe09c1 Merge #20390: CI/Cirrus: Skip merge_base step for non-PRs +pr 2020-11-16 10:40:56 +0100 1e17114917f29da114cb90f52579ddb911a1a856 Merge #20238: doc: Missing comments for signet parameters +pr 2020-11-16 11:03:25 +0100 c48e788246fcced78cb4eb1d4bd09cb41a9ff09b Merge #18836: wallet: upgradewallet fixes and additional tests +cr 2020-11-16 11:15:11 +0100 bb6441b7a4619dd11029e27126c0d727a8bdf2d2 qt: Pre-splitoff translations update +cr 2020-11-16 16:05:34 +0100 21f24336019d438e225c7bd6653871119883a4ee test: run mempool_spend_coinbase.py even with wallet disabled +v 2020-11-16 19:54:24 +0100 d355a302d9b7e4aaac04edaa0671ced3b3eaef45 Break circuit earlier +v 2020-11-16 22:22:42 +0100 963696288955dc31b3a4fd136bfb791a9d99755b [upgradewallet] removed unused warning param +pr 2020-11-17 06:56:22 +0100 7c0d412a74ba8d791e6b83b6aca82406f2158fc3 Merge #20405: p2p: avoid calculating onion address checksum when version is not 3 +pr 2020-11-17 06:57:40 +0100 3457054c61d5b74800797e2c26a8126a21352382 Merge #20346: script: modify security-check.py to use "==" instead of "is" for literal comparison +pr 2020-11-17 12:43:43 +0100 c463f70fb05ed45cfcc609324078a0ccb08c7f06 Merge #20139: Wallet: do not return warnings from UpgradeWallet() +pr 2020-11-17 13:03:59 +0100 e7986c51bc7afeca8f79f286fb5d950f469a8866 Merge bitcoin-core/gui#96: Slight improve create wallet dialog +pr 2020-11-17 13:49:12 +0100 80e32e120ee4ba7e5b458338682cf1130964218f Merge #20305: wallet: introduce fee_rate sat/vB param/option +pr 2020-11-17 13:57:36 +0100 831675c8dccfa6525ffe751da3cc60709c380953 Merge #20401: qt: Pre-splitoff translations update +v 2020-11-17 17:29:33 +0100 9d09132be4ff99f98ca905c342347d5f35f13350 CConnman: initialise at declaration rather than in Start() +v 2020-11-18 08:33:26 +0100 fac4e136fa3d0fab7fde900a6be921313e16e7a6 refactor: Change pointer to reference because it can not be null +cr 2020-11-18 10:06:03 +0100 132e1d897f131537713c8314632022e073f4d4e1 build: Bump master version to 0.21.99 +pr 2020-11-18 10:24:22 +0100 4b24c3962fd95ec5dca7de4a7c1228b8c570336d Merge #19504: Bump minimum python version to 3.6 +cr 2020-11-18 11:12:46 +0100 daf1ebf0b1c2020169d75fc52c3be87207693a04 doc: Remove generated manual pages from master branch +pr 2020-11-18 11:18:02 +0100 4ae04090bb1dc53074f2562b88df27e762fbdf14 Merge bitcoin-core/gui#118: Remove BDB version from the Information tab +pr 2020-11-18 11:19:42 +0100 54532f46c4e257cde682d492de72cde261998d3f Merge bitcoin-core/gui#109: wallet: Remove unused AskPassphraseDialog::Decrypt +pr 2020-11-18 11:23:56 +0100 a64ff1c4d32c0458660426e4f40b45b8b7c13a87 Merge #19905: Remove dead CheckForkWarningConditionsOnNewFork +pr 2020-11-18 13:45:46 +0100 5bcae7967f73353aff5e6d2f696bbf47ec6fdbb3 Merge #20408: CConnman: move initialization to declaration +cr 2020-11-18 13:52:38 +0100 dc5a35a5072b273ce2be5b2110bacf298150a725 doc: clean out release notes post branch-off +cr 2020-11-18 13:52:44 +0100 8a715a6b17a8c10369dcfad735b4362bef0c326c build: Bump gitian descriptors to 0.22 +pr 2020-11-18 14:02:25 +0100 d020e8839fa590f5c3553458de2f979af7663084 Merge #20418: doc: clean out release notes post branch-off +pr 2020-11-18 14:42:37 +0100 50e019a97a5b49caee867ec7d630fca908caed9d Merge #20414: doc: Remove generated manual pages from master branch +cr 2020-11-18 14:46:09 +0100 a52ecc936a267cae97c2f313743bf75d5af07700 build: set minimum supported macOS to 10.14 +cr 2020-11-18 15:15:04 +0100 faaee810e62d796d66bfb2bc4e53c8b4c8104d13 build: Require C++17 compiler +v 2020-11-18 15:15:37 +0100 fac71987281077aed7f79dce99f4eb3e8a91916a Use std::make_unique +cr 2020-11-18 16:11:47 +0100 c46c18b788cb0862aafbb116fd37936cbed6a431 wallet: refactor GetClosestWalletFeature() +v 2020-11-18 17:55:43 +0100 b33af48210c117a734fc3e1bebeb1c2057645775 Include wallet/bdb.h where it is actually being used +cr 2020-11-18 17:56:08 +0100 a58b719cf75e2d97205ec260bcff0d4780fe4fb8 Do not compile BDB things when USE_BDB is defined +v 2020-11-18 17:56:12 +0100 6ebc41bf9cb0184554923e84e1935195d356f2b3 Enforce salvage is only for BDB wallets +v 2020-11-18 17:56:12 +0100 71e40b33bd1e72ccf5d82e1d3f8b481f8e965492 RPC: Require descriptors=True for createwallet when BDB is not compiled +cr 2020-11-18 17:56:12 +0100 99309ab3e96a290359b84f9b657c5115aa3470dd Allow disabling BDB in configure with --without-bdb +v 2020-11-18 17:56:12 +0100 d52f502b1ea1cafa7d58c5517f01dba26ecb7269 Fix mock SQLiteDatabases +v 2020-11-18 17:56:12 +0100 ee47f11f7399ec3a4330ea1f2fc388c7e32959d6 GUI: Force descriptor wallets when BDB is not compiled +cr 2020-11-18 18:00:57 +0100 8f7b93047581c67f2133cdb8c7845471de66c30f Drop the leading 0 from the version number +pr 2020-11-19 03:29:05 +0100 ea7926527ce36c05cacb99602b2b59579ff646e8 Merge #20413: build: Require C++17 compiler +v 2020-11-19 08:04:05 +0100 2498b04ce88696a3216fc38b7d393906b733e8b1 Don't upgrade to HD split if it is already supported +pr 2020-11-19 10:40:46 +0100 cddcd22ab326428b461f1937f1db4d1329e46faf Merge #20288: script, doc: contrib/seeds updates +pr 2020-11-19 11:32:16 +0100 888c22e0dd352a0c307d1af2d7f6b10402f361af Merge #20359: depends: Various config.site.in improvements and linting +pr 2020-11-19 11:39:00 +0100 47b6ad837c07da6c6eb35fabbb45d5666f712ea0 Merge #20333: build: remove native_biplist dependency +pr 2020-11-19 11:44:29 +0100 e12ad7f383462c51af3d41a83f37c5e5a4c4dabc Merge #19968: doc: clarify CRollingBloomFilter size estimate +pr 2020-11-19 11:50:53 +0100 fbb2bee82d83f10f0365388579ab063ad39ecd28 Merge #20067: refactor: remove use of boost::algorithm::replace_first +pr 2020-11-19 12:00:10 +0100 1cc5e693c1863fc758edcf43e68cdd256193b411 Merge #20358: src/randomenv.cpp: fix build on uclibc +pr 2020-11-19 12:09:19 +0100 d9180c50b689d2fc05662579d2e742e4cc49ac5e Merge #20145: contrib: add getcoins.py script to get coins from (signet) faucet +pr 2020-11-19 12:32:48 +0100 9ab9665c74dd27d80f44f0713daf3694bbe700e4 Merge #15710: wallet: Catch ios_base::failure specifically +v 2020-11-19 13:48:38 +0100 fa69c2c78455fd0dc436018fece9ff7fc83a180d wallet: Do not treat default constructed types as None-type +pr 2020-11-19 14:19:05 +0100 71d068db405883d35f3800aedd4e3a2d4e854762 Merge #18531: rpc: remove deprecated CRPCCommand constructor +pr 2020-11-19 15:33:02 +0100 7aa94569ce1a748a00dab475c02448255613d7db Merge #20024: init: Fix incorrect warning "Reducing -maxconnections from N to N-1, because of system limitations" +pr 2020-11-19 15:38:17 +0100 c4d1e24f54805e2c8d28cd793d2f2f2a220fdf55 Merge #20047: test: use wait_for_{block,header} helpers in p2p_fingerprint.py +v 2020-11-19 15:47:07 +0100 2a55a0ed3055a2ce0a33b58a3a7bbf6e30df3dfd Squashed 'src/univalue/' changes from 98261b1e7b..98fadc0909 +ff 2020-11-19 15:48:24 +0100 fa17eef6274811be5348149443e563bca95d54a3 Update univalue subtree +pr 2020-11-19 16:30:54 +0100 884bde510e2db59ee44604e2cccabb0bf1ef6ada Merge #20291: [net] Consolidate logic around calling CAddrMan::Connected() +pr 2020-11-19 16:39:31 +0100 848d66519c392093dbc1bbd5689f84be5ecd9bc8 Merge #20054: Remove confusing and useless "unexpected version" warning +pr 2020-11-19 16:40:02 +0100 04670ef81ea2300fcba4e1a492c4c6b0e0752848 Merge #20385: test: run mempool_spend_coinbase.py even with wallet disabled +pr 2020-11-19 17:59:20 +0100 db58b857f77ae14aa4927c4aa03ddc7d41a12d9e Merge #20329: docs/descriptors.md: Remove hardened marker in the path after xpub +v 2020-11-19 18:21:55 +0100 17a5f172fa9ec509b1c3f950ee8dfb6f025534d2 fuzz: Make addrman fuzzing harness deterministic +pr 2020-11-19 19:04:22 +0100 0a267f4eb88597f9e3dbd4614c70427e6e41df20 Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15 +v 2020-11-19 20:00:50 +0100 99d56e357159c7154f69f28cb5587c5ca20d6594 wallet: fix and improve upgradewallet result responses +v 2020-11-19 20:00:53 +0100 ca8cd893bb56bf5d455154b0498b1f58f77d20ed wallet: fix and improve upgradewallet error responses +v 2020-11-19 20:00:56 +0100 3eb6f8b2e61c24a22ea9396d86672307845f35eb wallet (not for backport): improve upgradewallet error messages +v 2020-11-19 22:29:42 +0100 7ffac12545328cadd92a3caec4f1c6ca7c127493 tests: shrink feature_taproot transfer of funds tx +pr 2020-11-20 04:39:37 +0100 2878167c18eee9ad440ab3f663d74bf2db254f17 Merge #20000: test: fix creation of "std::string"s with \0s +pr 2020-11-20 05:36:01 +0100 46f0b2f97601e9d13277fd73bed9b0219bcdee5b Merge #19851: refactor: Extract ParseOpCode from ParseScript +pr 2020-11-20 06:10:58 +0100 fdd068507d2694137d72638d87ea961e6f16a753 Merge #20056: net: Use Span in ReceiveMsgBytes +v 2020-11-20 08:40:50 +0100 0f020cdf0a8c3c88499c96522470e2e5e79f27fa sanitizers: Add suppression for unsigned-integer-overflow in libstdc++ basic_string.tcc +pr 2020-11-20 09:30:12 +0100 3d632c3f49300e1e0c573b36d1200f16f2729d38 Merge #20428: tests: shrink feature_taproot transfer of funds tx +pr 2020-11-20 09:35:00 +0100 c45e1d9aa7f0fececf02f9b481ae6dd87578c666 Merge bitcoin-core/gui#21: Update pruning tooltip, original author BitcoinErrorLog +pr 2020-11-20 09:38:05 +0100 094663842d0b342183d494b6f97e049ba2a5701b Merge bitcoin-core/gui#13: Hide peer detail view if multiple are selected +cr 2020-11-20 09:40:44 +0100 1b3d7009280595108eb22ac1188bc4367804fc5d Allow zero-fee fundrawtxn and walletcreatefundedpsbt calls +v 2020-11-20 09:40:47 +0100 3f1e10b2b1cd11f7112fbad6355464bd4adbbc5c Update feeRate (BTC/kvB) to fee_rate (sat/vB) in wallet_bumpfee +v 2020-11-20 09:43:52 +0100 9f08780dd7946b63476e9736745131db8e7f4e93 Use the correct incremental fee constant in bumpfee help +pr 2020-11-20 10:53:34 +0100 4c2ee5c855899fc05bd0ee34a96eaae325628ca3 Merge #20424: build: Update univalue subtree +pr 2020-11-20 10:56:03 +0100 ea460291f97d4c22aaec9f66b84078942afa3a08 Merge #20430: sanitizers: Add suppression for unsigned-integer-overflow in libstdc++ +cr 2020-11-20 15:11:21 +0100 fabecce71909c984504c21fa05f91d5f1b471e8c net: Treat raw message bytes as uint8_t +pr 2020-11-20 15:42:07 +0100 d4159984c360001d9469fd54512bf0da4b02c4fd Merge #20223: build: Drop the leading 0 from the version number +pr 2020-11-21 07:47:40 +0100 816132e6eb23c06287c1e820cc0990d2317c2f10 Merge #20426: wallet: allow zero-fee fundrawtransaction/walletcreatefundedpsbt and other fixes +v 2020-11-21 20:12:08 +0100 68c2ef13e953f142f818a84be9e2c09ef8636ccc Fix version string in Windows and Mac installers +pr 2020-11-22 07:30:16 +0100 e9a1c9fbdea977edbb4d10d0368cc7c3199bc469 Merge #19867: build: document and cleanup Qt hacks +v 2020-11-23 09:27:36 +0100 fa05d19bd6ba619bb3f9aabc05c439cd18d34544 test: Fix intermittent issue in mempool_compatibility +pr 2020-11-23 10:26:25 +0100 1b75f2542d154ba6f9f75bc2c9d7a0ca54de784c Merge #20432: net: Treat raw message bytes as uint8_t +pr 2020-11-23 10:30:01 +0100 86bf3ae3b57eea4361452d19e3e62c8847d23714 Merge #20202: wallet: Make BDB support optional +cr 2020-11-23 11:30:55 +0100 b87caf10b57fbab148949727f4004805be2bbc1d test: add is_bdb_compiled helper +pr 2020-11-23 13:36:41 +0100 b0c9024a7cf62a5b8510e8aa5a52563f311d91b2 Merge #20449: build: Fix Windows installer build +pr 2020-11-23 14:24:58 +0100 555b5d1bf940646a728499cfa1005bcb61383c20 Merge #20419: build: set minimum supported macOS to 10.14 +pr 2020-11-23 15:53:40 +0100 2ee954daaee5758d04935492139808cb6fd95233 Merge #20458: test: add is_bdb_compiled helper +v 2020-11-23 17:08:48 +0100 fa1f949a4dc2568456f3ba30bbd8ecbc78a423ca ci: Run nowallet ci config on cirrus +v 2020-11-23 17:09:12 +0100 fa73674738b0b5a271ae387e2ebd76d747e02d91 ci: Run i686 centos ci config on cirrus +v 2020-11-23 17:11:05 +0100 fa7a4385d08797876de9a05ae8a6fde18e36bd67 ci: Fix doc typos in .cirrus.yml +v 2020-11-23 18:08:18 +0100 8f7d1b39efbe65ab2747c593cc3560d4a449a333 Fix QPainter non-determinism on macOS +cr 2020-11-23 20:58:50 +0100 fad7be584ffaf8099cc099d9378ba831c9483260 test: Fix intermittent p2p_finerprint issue +pr 2020-11-23 21:02:17 +0100 cb89e18845852c005ba8ab94acc6544d7c876a42 Merge #19179: ci: Run ci configs on cirrus +v 2020-11-23 21:50:52 +0100 800655ff3199782b803e671f5baa77ff90a5591d depends: boost: Refer to version in URL +v 2020-11-23 21:50:53 +0100 a57b49856033f3de4a861367b70aba85aec58cf8 depends: boost: Bump to 1.71.0 +v 2020-11-23 21:50:54 +0100 9cf2ee54d366c3f5fcfce96244988858599e7e95 depends: boost: Split into non-/native packages +v 2020-11-23 21:50:55 +0100 d7048fa73fafaf0d89d891d98e51a251a64a1495 depends: boost: Disable all compression +v 2020-11-23 21:50:56 +0100 86002e7e90d7c78d5a76a159bf17db48aec94f94 depends: boost: Cleanup architecture/address-model +v 2020-11-23 21:50:57 +0100 ab9e047cc2226198d22384c286cb30c4c7d51e83 depends: boost: Cleanup toolset selection +v 2020-11-23 21:50:58 +0100 b2328b7989997652af52295a4b2e988e68b8428b depends: boost: Remove unnecessary _archiver_ +v 2020-11-23 21:50:59 +0100 f190343c96520db254d6689f8f24c9eb36bead6b depends: boost: Specify cflags+compileflags +v 2020-11-23 22:02:54 +0100 053b4fbad8729308774d5e7b53f53c12627fa88b doc: Release note regarding -rpcauth validation +cr 2020-11-23 22:02:54 +0100 46001323b1f4a57d8d6805f1bc39a5b8d401f0c5 rpc: Validate -rpcauth arguments +cr 2020-11-23 22:02:54 +0100 d37c813a43166f559a4e2d1c22e7243f70301291 rpc: Refactor to process -rpcauth once +cr 2020-11-23 23:33:53 +0100 e95aaefe2540cb76969818fcc2ff77d33448ed5a build: Avoid secp256k1.h include from system +v 2020-11-24 00:29:28 +0100 2dde55702da30ea568cac8a1d1cbddd652d6958e depends: build bdb with -std=c++17 +v 2020-11-24 03:17:35 +0100 2374f2fbef4359476fe3184e2402a2cc741cefad depends: build Boost with -std=c++17 +v 2020-11-24 03:18:06 +0100 e2c500636cb767347ae2b913345788ad3c3e8279 depends: build zeromq with -std=c++17 +v 2020-11-24 03:18:21 +0100 104e859c9755aee5708ea1934454d88b10c266ff builds: don't pass -silent to qt when building in debug mode +v 2020-11-24 03:18:24 +0100 2f5dfe4a7ff12b6b57427374142cdf7e266b73bc depends: build qt in c++17 mode +v 2020-11-24 06:31:58 +0100 b1f59d55d920d2b35269b474762f94fec87bfb16 RPC/Wallet: unloadwallet: Clarify docs/error when both the RPC endpoint and wallet_name parameter specify a wallet +v 2020-11-24 06:33:18 +0100 89bdad5b25ae4ac03a486f729a5b58ae6f21946d RPC/Wallet: unloadwallet: Allow specifying wallet_name param matching RPC endpoint +v 2020-11-24 09:36:48 +0100 05c10953887bd78af2e21ef6d3c07f90dd885572 test: Add testing of ParseInt/ParseUInt edge cases with leading +/-/0:s +v 2020-11-24 09:46:49 +0100 fa861569dcfff9e72686dc5f30b1faa645b4d54e util: Allow Assert(...) to be used in all contexts +cr 2020-11-24 09:47:29 +0100 fac5efe730ab5b8694920547203deefc5252d294 util: Add Assume() identity function +v 2020-11-24 10:09:48 +0100 faa05854f832405231c9198787a4eafe2cd4c5f0 util: Remove probably misleading TODO +pr 2020-11-24 10:33:08 +0100 7ebbee551d78830770f8cb42b1983acbf97c2706 Merge #19764: depends: Split boost into build/host packages + bump + cleanup +v 2020-11-24 10:36:07 +0100 0918eb49d5afabdf811da5eeb89f4f2c22d12de2 doc: Document current boost dependency as 1.71.0 +pr 2020-11-24 12:04:22 +0100 6f9dac5ede133ab12349335696a891c3bf959234 Merge #20473: doc: Document current boost dependency as 1.71.0 +pr 2020-11-24 12:07:09 +0100 3a32b62fa715238313e4818894d58962fa90de89 Merge #20462: RPC/Wallet: unloadwallet: Clarify docs/error when both the RPC request and wallet_name parameter specify a wallet +pr 2020-11-24 12:10:23 +0100 9402159b9bfade4417ee32721ab0d8c877aac9c6 Merge #20472: test: Add testing of ParseInt/ParseUInt edge cases with leading +/-/0:s +pr 2020-11-24 14:12:02 +0100 31c9987976af8ac5ad40091256ac41a2ccb078cd Merge #20447: depends: Patch qt_intersect_spans to avoid non-deterministic behavior in LLVM 8 +cr 2020-11-24 15:08:28 +0100 982e548a9a78b1b0abad59b54c780b6b06570452 Don't set BDB flags when configuring without +v 2020-11-24 16:13:23 +0100 12bd0fc9d70333c54c83ebb08c734272dbd330c2 Move NodeImpl from interfaces/node.cpp to node/interfaces.cpp +cr 2020-11-24 16:13:23 +0100 2a26771d8161d30be1853a35acfee588cce03634 Move ChainImpl from interfaces/chain.cpp to node/interfaces.cpp +cr 2020-11-24 16:20:16 +0100 629a9299b2a7241a3fa7d597cb34abcbe1af9255 Move WalletImpl from interfaces/wallet.cpp to wallet/interfaces.cpp +v 2020-11-24 21:00:34 +0100 c23f6f84efa2fe7e7168a5d41341f3a7c5598f70 Add depends qt fix for ARM macs +pr 2020-11-25 08:02:19 +0100 ca4a7849420ebb60f2bfb5ef628d5ffa51de15ee Merge #20410: wallet: Do not treat default constructed types as None-type +pr 2020-11-25 08:19:59 +0100 efd4cdb81fc7ded5dc93a2ad9d20d67c823a7a76 Merge #20456: test: Fix intermittent issue in mempool_compatibility +pr 2020-11-25 09:48:47 +0100 1e9e4b68f3cbd1af3de5806aeff952e9bf0ab8fc Merge #20469: build: Avoid secp256k1.h include from system +v 2020-11-25 12:07:10 +0100 fa18e7cbc5ea6aaba94dca4ebdc850c9db141f89 This change to the appveyor CI config for msvc builds reverses a change introduced in #19960. It re-applies a setting to inform vcpkg to only build release vesions of the dependencies rather than the default of debug and release. +pr 2020-11-25 12:46:27 +0100 afdfd3c8c1ce96adae11809e3989de381137fee9 Merge #20403: wallet: upgradewallet fixes, improvements, test coverage +v 2020-11-25 13:38:33 +0100 830ddf413934226d0b6ca99165916790cc52ca18 Drop noop gcc version checks +cr 2020-11-25 15:12:23 +0100 5659e73493fcdfb5d0cb9d686c24c4fbe1c217ed qt: Add ObjectInvoke template function +v 2020-11-25 15:12:32 +0100 5fcfee68af47d4a891ae9c9964d73886f0f01d7d qt: Call setParent() in the parent's context +v 2020-11-25 15:12:33 +0100 8963b2c71f120b2746396c4987392f0105c8dd60 qt: Improve comments in WalletController::getOrCreateWallet() +pr 2020-11-25 15:18:33 +0100 5c0aebfcd42a3effe2496ecef623302da64cd9a3 Merge #19387: span: update constructors to match c++20 draft spec and add lifetimebound attribute +pr 2020-11-25 16:31:43 +0100 19b8071eaeb32dbe39ccc771dbe6095dd9285779 Merge #20489: CI msvc: only build vcpkg dependencies for release (not debug) to reduce build times +pr 2020-11-25 17:02:20 +0100 50091592dd875a1c94030dbed74112b003732d68 Merge #19337: sync: detect double lock from the same thread +cr 2020-11-25 17:18:36 +0100 65afe4cb69e80278de0f584b6eeb6741f02a31eb build: Drop unneeded ApplicationServices framework dependency +cr 2020-11-25 17:25:52 +0100 ec4a46dd9c158e1a0de144e9abb260da941aa702 build: Drop unneeded IOKit framework dependency +v 2020-11-25 21:04:39 +0100 e416cfc92bf51f6fd088ab61c2306c5e73877dd0 Add MAX_STANDARD_SCRIPTSIG_SIZE to policy +cr 2020-11-26 10:05:59 +0100 4848e711076c6ebc5d841feb83baeb6d2bc76c94 scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD +cr 2020-11-26 10:07:33 +0100 79bff8e48aca961ec271b0d592aca9278b981e2f Remove NODISCARD +cr 2020-11-26 14:41:53 +0100 6d3689fcf6cff397187028344570489db3e6ecf4 sync: print proper lock order location when double lock is detected +cr 2020-11-26 14:42:00 +0100 a21dc469ccf076ca3b07b1adbd8bf667145f1c44 sync: const-qualify the argument of double_lock_detected() +cr 2020-11-26 14:42:06 +0100 db058efeb0821cb5022e3b29e0aff3627d7aaf83 sync: use HasReason() in double lock tests +v 2020-11-26 21:34:25 +0100 1d578c078f0ce00cb032d3c6c689fd199b8d2f35 doc: Add bash as an OpenBSD dependency +v 2020-11-26 23:56:25 +0100 18246ed5f09dd078fa1410b7ec2ba4379cc5e032 Fix and improve taproot_construct comments +v 2020-11-26 23:56:25 +0100 2d8099c713dfd4b546150fd53c2e4f364b9009f4 Mention units of MAX_STANDARD_ policy constants +v 2020-11-26 23:56:25 +0100 6040de9a46725826330cd63cdf76e2121a18e728 Add comments on CPubKey::IsValid +v 2020-11-26 23:56:25 +0100 84e29c7c0141b52044020ec0c5dfa8a462b7e97f Mention in validation that IsWitnessStandard tests for P2TR +v 2020-11-26 23:56:25 +0100 8dbb7de67ce0a71f5fc54289c0ff048ac8dd0acc Add comments to VerifyTaprootCommitment +v 2020-11-26 23:56:25 +0100 cdf900cbf26db05c7edb398ea645f1d23049d810 Document need_vin_vout_mismatch argument to make_spender +v 2020-11-26 23:56:25 +0100 ea0e78677bdbe3313f594118c500cf7784c56970 Document additional IsWitnessStandard behavior +v 2020-11-26 23:56:25 +0100 f867cbcc268a3bfaeef5510a7e40e6d3c0818b6d Clean up assets test minimizer LDFLAGS +v 2020-11-27 09:04:13 +0100 86b1ab64b1a5b56518787ef16ea54ddbbc97d83e refactor: Replace deprecated Qt::SystemLocale{Short,Long}Date +pr 2020-11-27 10:59:24 +0100 e2ff5e7b35d71195278d2a2ed9485f141de33d7a Merge #20497: [Refactor] Add MAX_STANDARD_SCRIPTSIG_SIZE to policy +v 2020-11-27 13:41:07 +0100 9429a398e291a1b5edcfc657b94fcaf52cd1d8f9 Handle rename failure in DumpMempool(...) by using RenameOver(...) return value +v 2020-11-27 13:41:26 +0100 ce9dd45422e1f4ecce6df68da086b8bfc2100756 Add [[nodiscard]] to RenameOver(...) +cr 2020-11-27 21:18:50 +0100 8008ef770f3d0b14d03e22371314500373732143 qt: unlock wallet "OK" button bugfix +v 2020-11-27 23:54:55 +0100 3ebde2143aa98af213872b98b474d904e55056f7 [test] Fix wait condition in disconnect_p2ps +pr 2020-11-28 10:14:45 +0100 1ae5758981de15a8c0713bfdae216bf91d607c57 Merge #20448: RPC/Wallet: unloadwallet: Allow specifying wallet_name param matching RPC endpoint wallet +pr 2020-11-28 10:39:32 +0100 854b36cfa2ef017567dcf1e7d0304107a8700f2b Merge bitcoin-core/gui#138: unlock encrypted wallet "OK" button bugfix +pr 2020-11-28 18:06:43 +0100 7ae86b3c6845873ca96650fc69beb4ae5285c801 Merge #20522: [test] Fix sync issue in disconnect_p2ps +cr 2020-11-29 00:43:55 +0100 6690adba08006739da0060eb4937126bdfa1181a Warn when binaries are built from a dirty branch. +pr 2020-11-30 05:23:23 +0100 2e1336dbfe8af43e2960a74c8c7c9aa4650aef0e Merge #20471: build: use C++17 in depends +cr 2020-11-30 07:54:18 +0100 4d70d3d7fe29db38a1f9c84a3a6167ca57b38479 build: automatically determine macOS translations +v 2020-11-30 07:54:19 +0100 0ab4018c1217f82dffd65e973d9cccf13af2ef50 macdeploy: have a single level of logging output +v 2020-11-30 07:54:19 +0100 32347cd56aaae95f3f4c78be9270565285280d72 macdeploy: assume plistlib is available +v 2020-11-30 07:54:19 +0100 464b34d4c328d5109b8dd197da9e7f00d1b843c2 macdeploy: remove codesigning argument +cr 2020-11-30 07:54:19 +0100 6390a04862c043cd2bdf3610f3bcf9cb5526659f macdeploy: consolidate .DS_Store generation +cr 2020-11-30 07:54:19 +0100 827d382aa79d503470cc7abb0000cc365db06f12 macdeploy: remove add-resources argument +cr 2020-11-30 07:54:20 +0100 5d2cbdf772030b203ab1b32c65481ce3fc524b22 macdeploy: use Python 3.6 +cr 2020-11-30 07:54:20 +0100 a42aa94c54699833723076f3bfaeeac668523a69 macdeploy: remove runHDIUtil in favor of directly calling subprocess.run +v 2020-11-30 07:54:20 +0100 adaa26202b965346566b5adff2fc5cee65955dfe macdeploy: remove existing Bitcoin-Core.dmg if present +v 2020-11-30 07:54:20 +0100 ccb0325b1bd1cee5a76382a16901dc80ea8f50d8 macdeploy: move qt_conf to where it's used +v 2020-11-30 08:39:09 +0100 b685f60a08007e0ae8a5564ee68cd94f9015d899 build: mac_alias 2.1.1 +pr 2020-11-30 09:10:41 +0100 817aeca57a4cc3c8b4b321dbc653bfc4a8d61b0c Merge #20491: refactor: Drop noop gcc version checks +pr 2020-11-30 15:42:36 +0100 81d5af42f4dba5b68a597536cad7f61894dc22a3 Merge #20499: Remove obsolete NODISCARD ifdef forest. Use [[nodiscard]] (C++17). +v 2020-11-30 19:53:50 +0100 86e6add5ca7d425faa314103df6617044a910ab3 doc: rename CODEOWNERS to REVIEWERS +v 2020-11-30 20:45:09 +0100 fa275e1539941b49fe206ff0bf110e3362bec6bb test: Fix intermittent feature_taproot issue +pr 2020-12-01 08:28:34 +0100 ffd5e7a8567d666a2e9233a6a52b0fc8dfe6a035 Merge #20519: Handle rename failure in DumpMempool(...) by using the RenameOver(...) return value. Add [[nodiscard]] to RenameOver(...). +pr 2020-12-01 09:39:56 +0100 24e4857b29b33c72755384057463506d99b08871 Merge #20494: refactor: Move node and wallet code out of src/interfaces +pr 2020-12-01 10:02:56 +0100 cd720337fe9c27422fe8d507726ca8c79f52b4ba Merge #20222: refactor: CTxMempool constructor clean up +pr 2020-12-01 10:59:09 +0100 f2a673f15b51bb1ca9e57db7a4bc883540fde65d Merge bitcoin-core/gui#137: refactor: Replace deprecated Qt::SystemLocale{Short,Long}Date +pr 2020-12-01 11:23:23 +0100 335d27d08141b02eff91209d21dfe4650a66a30e Merge #20512: doc: Add bash as an OpenBSD dependency +pr 2020-12-01 11:27:06 +0100 dcb7518067cd3e05dbdad1390057962b2dfc883a Merge #20496: build: Drop unneeded macOS framework dependencies +pr 2020-12-01 11:28:27 +0100 277c225b842168c132e4ca1efe360f811dade5d3 Merge #20478: Don't set BDB flags when configuring without +v 2020-12-01 13:38:23 +0100 fada2dfcac1c4b47ee76b877d91d515cf1d36410 test: Fix wallet_multiwallet issue on windows +pr 2020-12-01 14:04:10 +0100 dfd0b700886cab7cd2fcf4958a214b098fe18152 Merge #20425: fuzz: Make CAddrMan fuzzing harness deterministic +pr 2020-12-01 15:11:51 +0100 f17e8ba3a17b6516a1b1fb7f45d506a339e99f90 Merge #20207: Follow-up extra comments on taproot code and tests +v 2020-12-01 18:32:26 +0100 c502a6dbfb854ca827a5a3925394f9e09d29b898 lint: Use c++17 std in cppcheck linter +v 2020-12-01 18:36:39 +0100 1e62350ca20898189904a88dfef9ea11ddcd8626 refactor: Improve use of explicit keyword +pr 2020-12-02 01:23:00 +0100 80d4231e1638969b01c999028eaf3419bf3af23b Merge #19980: refactor: Some wallet cleanups +pr 2020-12-02 08:31:02 +0100 607c844f3720f51bb011f302a7ce742fcb6b8ae3 Merge #20540: test: Fix wallet_multiwallet issue on windows +pr 2020-12-02 09:37:37 +0100 283f22cabb9afcb159cb1a9793b5249e55975636 Merge #20461: rpc: Validate -rpcauth arguments +v 2020-12-02 09:42:07 +0100 2b356117e94f9ef27b67a8e98663f5d676f58c11 ci: no-longer exclude feature_block in TSAN job +pr 2020-12-02 09:44:55 +0100 7f0f01f0ab4521d05fb5fd6e0b7d19470b342e77 Merge #20507: sync: print proper lock order location when double lock is detected +pr 2020-12-02 10:52:09 +0100 c33662a0eaff7811922a4635b80f165b4c31396b Merge #18948: qt: Call setParent() in the parent's context +pr 2020-12-02 10:56:14 +0100 3693fccc3acd25dad29879605bfa1fa5d55a7c3a Merge #20543: ci: no-longer exclude feature_block in TSAN job +v 2020-12-02 11:52:03 +0100 fa5c4f12f5d017d8dbe7700ca9688189eacbf32b ci: Adjust cirrus ci task names +cr 2020-12-02 12:39:01 +0100 8b99e609e7da5dd3601e9214d8f869e96108fffe Adjusted msvc compiler and linker settings to remove optimisations that are causing sporadic ABI issues on Visual Studio updates. +v 2020-12-02 12:49:25 +0100 c82d15b6d189983ebf82f35ade33d830870f25c6 depends: Do not force Precompiled Headers (PCH) for building Qt on Linux +pr 2020-12-02 13:52:19 +0100 0a13d15c143906bb6fd5d30c25df03ce5e20418d Merge #20530: lint, refactor: Update cppcheck linter to c++17 and improve explicit usage +pr 2020-12-02 17:22:00 +0100 a35b948836db20fab9b48d3b77cf9f23ffee109a Merge #20545: ci: Adjust cirrus ci task names + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/dependencies.md b/doc/dependencies.md index 9fa9f69ab8..3be09b663c 100644 --- a/doc/dependencies.md +++ b/doc/dependencies.md @@ -6,23 +6,24 @@ These are the dependencies currently used by BGL Core. You can find instructions | Dependency | Version used | Minimum required | CVEs | Shared | [Bundled Qt library](https://doc.qt.io/qt-5/configure-options.html#third-party-libraries) | | --- | --- | --- | --- | --- | --- | | Berkeley DB | [4.8.30](https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html) | 4.8.x | No | | | -| Boost | [1.70.0](https://www.boost.org/users/download/) | [1.47.0](https://github.com/BGL/BGL/pull/8920) | No | | | -| Clang | | [3.3+](https://releases.llvm.org/download.html) (C++11 support) | | | | +| Boost | [1.71.0](https://www.boost.org/users/download/) | [1.58.0](https://github.com/bitcoin/bitcoin/pull/19667) | No | | | +| Clang | | [5.0+](https://releases.llvm.org/download.html) (C++17 support) | | | | | Expat | [2.2.7](https://libexpat.github.io/) | | No | Yes | | | fontconfig | [2.12.1](https://www.freedesktop.org/software/fontconfig/release/) | | No | Yes | | -| FreeType | [2.7.1](https://download.savannah.gnu.org/releases/freetype) | | No | | | -| GCC | | [4.8+](https://gcc.gnu.org/) (C++11 support) | | | | -| HarfBuzz-NG | | | | | | -| libevent | [2.1.11-stable](https://github.com/libevent/libevent/releases) | 2.0.22 | No | | | -| libpng | | | | | [Yes](https://github.com/BGL/BGL/blob/master/depends/packages/qt.mk) | +| FreeType | [2.7.1](https://download.savannah.gnu.org/releases/freetype) | | No | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) (Android only) | +| GCC | | [7+](https://gcc.gnu.org/) (C++17 support) | | | | +| HarfBuzz-NG | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) | +| libevent | [2.1.11-stable](https://github.com/libevent/libevent/releases) | [2.0.21](https://github.com/bitcoin/bitcoin/pull/18676) | No | | | +| libpng | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) | | librsvg | | | | | | | MiniUPnPc | [2.0.20180203](https://miniupnp.tuxfamily.org/files) | | No | | | -| PCRE | | | | | [Yes](https://github.com/BGL/BGL/blob/master/depends/packages/qt.mk) | -| Python (tests) | | [3.5](https://www.python.org/downloads) | | | | +| PCRE | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) | +| Python (tests) | | [3.6](https://www.python.org/downloads) | | | | | qrencode | [3.4.4](https://fukuchi.org/works/qrencode) | | No | | | -| Qt | [5.9.7](https://download.qt.io/official_releases/qt/) | [5.5.1](https://github.com/BGL/BGL/issues/13478) | No | | | -| XCB | | | | | [Yes](https://github.com/BGL/BGL/blob/master/depends/packages/qt.mk) (Linux only) | -| xkbcommon | | | | | [Yes](https://github.com/BGL/BGL/blob/master/depends/packages/qt.mk) (Linux only) | +| Qt | [5.9.8](https://download.qt.io/official_releases/qt/) | [5.5.1](https://github.com/bitcoin/bitcoin/issues/13478) | No | | | +| SQLite | [3.32.1](https://sqlite.org/download.html) | [3.7.17](https://github.com/bitcoin/bitcoin/pull/19077) | | | | +| XCB | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) (Linux only) | +| xkbcommon | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) (Linux only) | | ZeroMQ | [4.3.1](https://github.com/zeromq/libzmq/releases) | 4.0.0 | No | | | | zlib | [1.2.11](https://zlib.net/) | | | | No | @@ -32,7 +33,8 @@ Some dependencies are not needed in all configurations. The following are some f #### Options passed to `./configure` * MiniUPnPc is not needed with `--with-miniupnpc=no`. -* Berkeley DB is not needed with `--disable-wallet`. +* Berkeley DB is not needed with `--disable-wallet` or `--without-bdb`. +* SQLite is not needed with `--disable-wallet` or `--without-sqlite`. * Qt is not needed with `--without-gui`. * If the qrencode dependency is absent, QR support won't be added. To force an error when that happens, pass `--with-qrencode`. * ZeroMQ is needed only with the `--with-zmq` option. diff --git a/doc/descriptors.md b/doc/descriptors.md index 367dd6b2d6..da2b31d33f 100644 --- a/doc/descriptors.md +++ b/doc/descriptors.md @@ -10,6 +10,14 @@ Supporting RPCs are: - `deriveaddresses` takes as input a descriptor and computes the corresponding addresses. - `listunspent` outputs a specialized descriptor for the reported unspent outputs. +- `getaddressinfo` outputs a descriptor for solvable addresses (since v0.18). +- `importmulti` takes as input descriptors to import into the wallet + (since v0.18). +- `generatetodescriptor` takes as input a descriptor and generates coins to it + (`regtest` only, since v0.19). +- `utxoupdatepsbt` takes as input descriptors to add information to the psbt + (since v0.19). +- `createmultisig` and `addmultisigaddress` return descriptors as well (since v0.20) This document describes the language. For the specifics on usage, see the RPC documentation for the functions mentioned above. @@ -42,7 +50,7 @@ Output descriptors currently support: - `wsh(multi(2,03a0434d9e47f3c86235477c7b1ae6ae5d3442d49b1943c2b752a68e2a47e247c7,03774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb,03d01115d548e7561b15c38f004d734633687cf4419620095bc5b0f47070afe85a))` describes a P2WSH *2-of-3* multisig output with keys in the specified order. - `sh(wsh(multi(1,03f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8,03499fdf9e895e719cfd64e67f07d38e3226aa7b63678949e6e49b241a60e823e4,02d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e)))` describes a P2SH-P2WSH *1-of-3* multisig output with keys in the specified order. - `pk(xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8)` describes a P2PK output with the public key of the specified xpub. -- `pkh(xpub68Gmy5EdvgibQVfPdqkBBCHxA5htiqg55crXYuXoQRKfDBFA1WEjWgP6LHhwBZeNK1VTsfTFUHCdrfp1bgwQ9xv5ski8PX9rL2dZXvgGDnw/1'/2)` describes a P2PKH output with child key *1'/2* of the specified xpub. +- `pkh(xpub68Gmy5EdvgibQVfPdqkBBCHxA5htiqg55crXYuXoQRKfDBFA1WEjWgP6LHhwBZeNK1VTsfTFUHCdrfp1bgwQ9xv5ski8PX9rL2dZXvgGDnw/1/2)` describes a P2PKH output with child key *1/2* of the specified xpub. - `pkh([d34db33f/44'/0'/0']xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL/1/*)` describes a set of P2PKH outputs, but additionally specifies that the specified xpub is a child of a master with fingerprint `d34db33f`, and derived using path `44'/0'/0'`. - `wsh(multi(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))` describes a set of *1-of-2* P2WSH multisig outputs where the first multisig key is the *1/0/`i`* child of the first specified xpub and the second multisig key is the *0/0/`i`* child of the second specified xpub, and `i` is any number in a configurable range (`0-1000` by default). - `wsh(sortedmulti(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))` describes a set of *1-of-2* P2WSH multisig outputs where one multisig key is the *1/0/`i`* child of the first specified xpub and the other multisig key is the *0/0/`i`* child of the second specified xpub, and `i` is any number in a configurable range (`0-1000` by default). The order of public keys in the resulting witnessScripts is determined by the lexicographic order of the public keys at that index. diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 2373ee5f8e..2b7c6df52e 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -9,6 +9,7 @@ Developer Notes - [Coding Style (C++)](#coding-style-c) - [Coding Style (Python)](#coding-style-python) - [Coding Style (Doxygen-compatible comments)](#coding-style-doxygen-compatible-comments) + - [Generating Documentation](#generating-documentation) - [Development tips and tricks](#development-tips-and-tricks) - [Compiling for debugging](#compiling-for-debugging) - [Compiling for gprof profiling](#compiling-for-gprof-profiling) @@ -35,10 +36,14 @@ Developer Notes - [Source code organization](#source-code-organization) - [GUI](#gui) - [Subtrees](#subtrees) + - [Upgrading LevelDB](#upgrading-leveldb) + - [File Descriptor Counts](#file-descriptor-counts) + - [Consensus Compatibility](#consensus-compatibility) - [Scripted diffs](#scripted-diffs) - [Suggestions and examples](#suggestions-and-examples) - [Release notes](#release-notes) - [RPC interface guidelines](#rpc-interface-guidelines) + - [Internal interface guidelines](#internal-interface-guidelines) @@ -138,12 +143,17 @@ For example, to describe a function use: ```c++ /** - * ... text ... - * @param[in] arg1 A description - * @param[in] arg2 Another argument description - * @pre Precondition for function... + * ... Description ... + * + * @param[in] arg1 input description... + * @param[in] arg2 input description... + * @param[out] arg3 output description... + * @return Return cases... + * @throws Error type and cases... + * @pre Pre-condition for function... + * @post Post-condition for function... */ -bool function(int arg1, const char *arg2) +bool function(int arg1, const char *arg2, std::string& arg3) ``` A complete list of `@xxx` commands can be found at http://www.doxygen.nl/manual/commands.html. @@ -158,44 +168,73 @@ To describe a class, use the same construct above the class definition: * @see GetWarnings() */ class CAlert -{ ``` To describe a member or variable use: ```c++ -int var; //!< Detailed description after the member +//! Description before the member +int var; ``` or ```c++ -//! Description before the member -int var; +int var; //!< Description after the member ``` Also OK: ```c++ /// -/// ... text ... +/// ... Description ... /// bool function2(int arg1, const char *arg2) ``` -Not OK (used plenty in the current source, but not picked up): +Not picked up by Doxygen: ```c++ // -// ... text ... +// ... Description ... // ``` +Also not picked up by Doxygen: +```c++ +/* + * ... Description ... + */ +``` + A full list of comment syntaxes picked up by Doxygen can be found at http://www.doxygen.nl/manual/docblocks.html, but the above styles are favored. -Documentation can be generated with `make docs` and cleaned up with `make clean-docs`. The resulting files are located in `doc/doxygen/html`; open `index.html` to view the homepage. +Recommendations: -Before running `make docs`, you will need to install dependencies `doxygen` and `dot`. For example, on macOS via Homebrew: -``` -brew install graphviz doxygen -``` +- Avoiding duplicating type and input/output information in function + descriptions. + +- Use backticks (``) to refer to `argument` names in function and + parameter descriptions. + +- Backticks aren't required when referring to functions Doxygen already knows + about; it will build hyperlinks for these automatically. See + http://www.doxygen.nl/manual/autolink.html for complete info. + +- Avoid linking to external documentation; links can break. + +- Javadoc and all valid Doxygen comments are stripped from Doxygen source code + previews (`STRIP_CODE_COMMENTS = YES` in [Doxyfile.in](doc/Doxyfile.in)). If + you want a comment to be preserved, it must instead use `//` or `/* */`. + +### Generating Documentation + +The documentation can be generated with `make docs` and cleaned up with `make +clean-docs`. The resulting files are located in `doc/doxygen/html`; open +`index.html` in that directory to view the homepage. + +Before running `make docs`, you'll need to install these dependencies: + +Linux: `sudo apt install doxygen graphviz` + +MacOS: `brew install doxygen graphviz` Development tips and tricks --------------------------- @@ -237,6 +276,33 @@ configure option adds `-DDEBUG_LOCKORDER` to the compiler flags. This inserts run-time checks to keep track of which locks are held and adds warnings to the `debug.log` file if inconsistencies are detected. +### Assertions and Checks + +The util file `src/util/check.h` offers helpers to protect against coding and +internal logic bugs. They must never be used to validate user, network or any +other input. + +* `assert` or `Assert` should be used to document assumptions when any + violation would mean that it is not safe to continue program execution. The + code is always compiled with assertions enabled. + - For example, a nullptr dereference or any other logic bug in validation + code means the program code is faulty and must terminate immediately. +* `CHECK_NONFATAL` should be used for recoverable internal logic bugs. On + failure, it will throw an exception, which can be caught to recover from the + error. + - For example, a nullptr dereference or any other logic bug in RPC code + means that the RPC code is faulty and can not be executed. However, the + logic bug can be shown to the user and the program can continue to run. +* `Assume` should be used to document assumptions when program execution can + safely continue even if the assumption is violated. In debug builds it + behaves like `Assert`/`assert` to notify developers and testers about + nonfatal errors. In production it doesn't warn or log anything, though the + expression is always evaluated. + - For example it can be assumed that a variable is only initialized once, + but a failed assumption does not result in a fatal bug. A failed + assumption may or may not result in a slightly degraded user experience, + but it is safe to continue program execution. + ### Valgrind suppressions file Valgrind is a programming tool for memory debugging, memory leak detection, and @@ -250,6 +316,7 @@ $ valgrind --suppressions=contrib/valgrind.supp src/test/test_BGL $ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \ --show-leak-kinds=all src/test/test_BGL --log_level=test_suite $ valgrind -v --leak-check=full src/BGLd -printtoconsole +$ ./test/functional/test_runner.py --valgrind ``` ### Compiling for test coverage @@ -383,27 +450,52 @@ and its `cs_KeyStore` lock for example). Threads ------- -- ThreadScriptCheck : Verifies block scripts. +- [Main thread (`bitcoind`)](https://doxygen.bitcoincore.org/bitcoind_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97) + : Started from `main()` in `bitcoind.cpp`. Responsible for starting up and + shutting down the application. + +- [ThreadImport (`b-loadblk`)](https://doxygen.bitcoincore.org/init_8cpp.html#ae9e290a0e829ec0198518de2eda579d1) + : Loads blocks from `blk*.dat` files or `-loadblock=` on startup. + +- [ThreadScriptCheck (`b-scriptch.x`)](https://doxygen.bitcoincore.org/validation_8cpp.html#a925a33e7952a157922b0bbb8dab29a20) + : Parallel script validation threads for transactions in blocks. + +- [ThreadHTTP (`b-http`)](https://doxygen.bitcoincore.org/httpserver_8cpp.html#abb9f6ea8819672bd9a62d3695070709c) + : Libevent thread to listen for RPC and REST connections. -- ThreadImport : Loads blocks from `blk*.dat` files or `-loadblock=`. +- [HTTP worker threads(`b-httpworker.x`)](https://doxygen.bitcoincore.org/httpserver_8cpp.html#aa6a7bc27265043bc0193220c5ae3a55f) + : Threads to service RPC and REST requests. -- ThreadDNSAddressSeed : Loads addresses of peers from the DNS. +- [Indexer threads (`b-txindex`, etc)](https://doxygen.bitcoincore.org/class_base_index.html#a96a7407421fbf877509248bbe64f8d87) + : One thread per indexer. -- ThreadMapPort : Universal plug-and-play startup/shutdown. +- [SchedulerThread (`b-scheduler`)](https://doxygen.bitcoincore.org/class_c_scheduler.html#a14d2800815da93577858ea078aed1fba) + : Does asynchronous background tasks like dumping wallet contents, dumping + addrman and running asynchronous validationinterface callbacks. -- ThreadSocketHandler : Sends/Receives data from peers on port 8333. +- [TorControlThread (`b-torcontrol`)](https://doxygen.bitcoincore.org/torcontrol_8cpp.html#a4faed3692d57a0d7bdbecf3b37f72de0) + : Libevent thread for tor connections. -- ThreadOpenAddedConnections : Opens network connections to added nodes. +- Net threads: -- ThreadOpenConnections : Initiates new connections to peers. + - [ThreadMessageHandler (`b-msghand`)](https://doxygen.bitcoincore.org/class_c_connman.html#aacdbb7148575a31bb33bc345e2bf22a9) + : Application level message handling (sending and receiving). Almost + all net_processing and validation logic runs on this thread. -- ThreadMessageHandler : Higher-level message handling (sending and receiving). + - [ThreadDNSAddressSeed (`b-dnsseed`)](https://doxygen.bitcoincore.org/class_c_connman.html#aa7c6970ed98a4a7bafbc071d24897d13) + : Loads addresses of peers from the DNS. -- DumpAddresses : Dumps IP addresses of nodes to `peers.dat`. + - [ThreadMapPort (`b-upnp`)](https://doxygen.bitcoincore.org/net_8cpp.html#a63f82a71c4169290c2db1651a9bbe249) + : Universal plug-and-play startup/shutdown. -- ThreadRPCServer : Remote procedure call handler, listens on port 8332 for connections and services them. + - [ThreadSocketHandler (`b-net`)](https://doxygen.bitcoincore.org/class_c_connman.html#a765597cbfe99c083d8fa3d61bb464e34) + : Sends/Receives data from peers on port 8333. -- Shutdown : Does an orderly shutdown of everything. + - [ThreadOpenAddedConnections (`b-addcon`)](https://doxygen.bitcoincore.org/class_c_connman.html#a0b787caf95e52a346a2b31a580d60a62) + : Opens network connections to added nodes. + + - [ThreadOpenConnections (`b-opencon`)](https://doxygen.bitcoincore.org/class_c_connman.html#a55e9feafc3bab78e5c9d408c207faa45) + : Initiates new connections to peers. Ignoring IDE/editor files -------------------------- @@ -555,6 +647,19 @@ class A - *Rationale*: Easier to understand what is happening, thus easier to spot mistakes, even for those that are not language lawyers. +- Use `Span` as function argument when it can operate on any range-like container. + + - *Rationale*: Compared to `Foo(const vector&)` this avoids the need for a (potentially expensive) + conversion to vector if the caller happens to have the input stored in another type of container. + However, be aware of the pitfalls documented in [span.h](../src/span.h). + +```cpp +void Foo(Span data); + +std::vector vec{1,2,3}; +Foo(vec); +``` + - Prefer `enum class` (scoped enumerations) over `enum` (traditional enumerations) where possible. - *Rationale*: Scoped enumerations avoid two potential pitfalls/problems with traditional C++ enumerations: implicit conversions to `int`, and name clashes due to enumerators being exported to the surrounding scope. @@ -668,6 +773,53 @@ the upper cycle, etc. Threads and synchronization ---------------------------- +- Prefer `Mutex` type to `RecursiveMutex` one + +- Consistently use [Clang Thread Safety Analysis](https://clang.llvm.org/docs/ThreadSafetyAnalysis.html) annotations to + get compile-time warnings about potential race conditions in code. Combine annotations in function declarations with + run-time asserts in function definitions: + +```C++ +// txmempool.h +class CTxMemPool +{ +public: + ... + mutable RecursiveMutex cs; + ... + void UpdateTransactionsFromBlock(...) EXCLUSIVE_LOCKS_REQUIRED(::cs_main, cs); + ... +} + +// txmempool.cpp +void CTxMemPool::UpdateTransactionsFromBlock(...) +{ + AssertLockHeld(::cs_main); + AssertLockHeld(cs); + ... +} +``` + +```C++ +// validation.h +class ChainstateManager +{ +public: + ... + bool ProcessNewBlock(...) EXCLUSIVE_LOCKS_REQUIRED(!::cs_main); + ... +} + +// validation.cpp +bool ChainstateManager::ProcessNewBlock(...) +{ + AssertLockNotHeld(::cs_main); + ... + LOCK(::cs_main); + ... +} +``` + - Build and run tests with `-DDEBUG_LOCKORDER` to verify that no potential deadlocks are introduced. As of 0.12, this is defined by default when configuring with `--enable-debug`. @@ -809,7 +961,7 @@ Others are external projects without a tight relationship with our project. Chan be sent upstream, but bugfixes may also be prudent to PR against BGL Core so that they can be integrated quickly. Cosmetic changes should be purely taken upstream. -There is a tool in `test/lint/git-subtree-check.sh` to check a subtree directory for consistency with +There is a tool in `test/lint/git-subtree-check.sh` ([instructions](../test/lint#git-subtree-checksh)) to check a subtree directory for consistency with its upstream repository. Current subtrees include: @@ -820,6 +972,10 @@ Current subtrees include: - **Note**: Follow the instructions in [Upgrading LevelDB](#upgrading-leveldb) when merging upstream changes to the LevelDB subtree. +- src/crc32c + - Used by leveldb for hardware acceleration of CRC32C checksums for data integrity. + - Upstream at https://github.com/google/crc32c ; Maintained by Google. + - src/secp256k1 - Upstream at https://github.com/BGL-core/secp256k1/ ; actively maintained by Core contributors. @@ -919,7 +1075,7 @@ introduce accidental changes. Some good examples of scripted-diff: - [scripted-diff: Rename InitInterfaces to NodeContext](https://github.com/BGL/BGL/commit/301bd41a2e6765b185bd55f4c541f9e27aeea29d) -uses an elegant script to replace occurences of multiple terms in all source files. +uses an elegant script to replace occurrences of multiple terms in all source files. - [scripted-diff: Remove g_connman, g_banman globals](https://github.com/BGL/BGL/commit/301bd41a2e6765b185bd55f4c541f9e27aeea29d) replaces specific terms in a list of specific source files. @@ -1047,7 +1203,134 @@ A few guidelines for introducing and reviewing new RPC interfaces: new RPC is replacing a deprecated RPC, to avoid both RPCs confusingly showing up in the command list. +- Use *invalid* bech32 addresses (e.g. in the constant array `EXAMPLE_ADDRESS`) for + `RPCExamples` help documentation. + + - *Rationale*: Prevent accidental transactions by users and encourage the use + of bech32 addresses by default. + - Use the `UNIX_EPOCH_TIME` constant when describing UNIX epoch time or timestamps in the documentation. - *Rationale*: User-facing consistency. + +Internal interface guidelines +----------------------------- + +Internal interfaces between parts of the codebase that are meant to be +independent (node, wallet, GUI), are defined in +[`src/interfaces/`](../src/interfaces/). The main interface classes defined +there are [`interfaces::Chain`](../src/interfaces/chain.h), used by wallet to +access the node's latest chain state, +[`interfaces::Node`](../src/interfaces/node.h), used by the GUI to control the +node, and [`interfaces::Wallet`](../src/interfaces/wallet.h), used by the GUI +to control an individual wallet. There are also more specialized interface +types like [`interfaces::Handler`](../src/interfaces/handler.h) +[`interfaces::ChainClient`](../src/interfaces/chain.h) passed to and from +various interface methods. + +Interface classes are written in a particular style so node, wallet, and GUI +code doesn't need to run in the same process, and so the class declarations +work more easily with tools and libraries supporting interprocess +communication: + +- Interface classes should be abstract and have methods that are [pure + virtual](https://en.cppreference.com/w/cpp/language/abstract_class). This + allows multiple implementations to inherit from the same interface class, + particularly so one implementation can execute functionality in the local + process, and other implementations can forward calls to remote processes. + +- Interface method definitions should wrap existing functionality instead of + implementing new functionality. Any substantial new node or wallet + functionality should be implemented in [`src/node/`](../src/node/) or + [`src/wallet/`](../src/wallet/) and just exposed in + [`src/interfaces/`](../src/interfaces/) instead of being implemented there, + so it can be more modular and accessible to unit tests. + +- Interface method parameter and return types should either be serializable or + be other interface classes. Interface methods shouldn't pass references to + objects that can't be serialized or accessed from another process. + + Examples: + + ```c++ + // Good: takes string argument and returns interface class pointer + virtual unique_ptr loadWallet(std::string filename) = 0; + + // Bad: returns CWallet reference that can't be used from another process + virtual CWallet& loadWallet(std::string filename) = 0; + ``` + + ```c++ + // Good: accepts and returns primitive types + virtual bool findBlock(const uint256& hash, int& out_height, int64_t& out_time) = 0; + + // Bad: returns pointer to internal node in a linked list inaccessible to + // other processes + virtual const CBlockIndex* findBlock(const uint256& hash) = 0; + ``` + + ```c++ + // Good: takes plain callback type and returns interface pointer + using TipChangedFn = std::function; + virtual std::unique_ptr handleTipChanged(TipChangedFn fn) = 0; + + // Bad: returns boost connection specific to local process + using TipChangedFn = std::function; + virtual boost::signals2::scoped_connection connectTipChanged(TipChangedFn fn) = 0; + ``` + +- For consistency and friendliness to code generation tools, interface method + input and inout parameters should be ordered first and output parameters + should come last. + + Example: + + ```c++ + // Good: error output param is last + virtual bool broadcastTransaction(const CTransactionRef& tx, CAmount max_fee, std::string& error) = 0; + + // Bad: error output param is between input params + virtual bool broadcastTransaction(const CTransactionRef& tx, std::string& error, CAmount max_fee) = 0; + ``` + +- For friendliness to code generation tools, interface methods should not be + overloaded: + + Example: + + ```c++ + // Good: method names are unique + virtual bool disconnectByAddress(const CNetAddr& net_addr) = 0; + virtual bool disconnectById(NodeId id) = 0; + + // Bad: methods are overloaded by type + virtual bool disconnect(const CNetAddr& net_addr) = 0; + virtual bool disconnect(NodeId id) = 0; + ``` + +- For consistency and friendliness to code generation tools, interface method + names should be `lowerCamelCase` and standalone function names should be + `UpperCamelCase`. + + Examples: + + ```c++ + // Good: lowerCamelCase method name + virtual void blockConnected(const CBlock& block, int height) = 0; + + // Bad: uppercase class method + virtual void BlockConnected(const CBlock& block, int height) = 0; + ``` + + ```c++ + // Good: UpperCamelCase standalone function name + std::unique_ptr MakeNode(LocalInit& init); + + // Bad: lowercase standalone function + std::unique_ptr makeNode(LocalInit& init); + ``` + + Note: This last convention isn't generally followed outside of + [`src/interfaces/`](../src/interfaces/), though it did come up for discussion + before in [#14635](https://github.com/BGL/BGL/pull/14635). diff --git a/doc/files.md b/doc/files.md index 8f86fa966c..212396b26e 100644 --- a/doc/files.md +++ b/doc/files.md @@ -8,6 +8,10 @@ - [Multi-wallet environment](#multi-wallet-environment) + - [Berkeley DB database based wallets](#berkeley-db-database-based-wallets) + + - [SQLite database based wallets](#sqlite-database-based-wallets) + - [GUI settings](#gui-settings) - [Legacy subdirectories and files](#legacy-subdirectories-and-files) @@ -26,15 +30,16 @@ Linux | `$HOME/.BGL/` macOS | `$HOME/Library/Application Support/BGL/` Windows | `%APPDATA%\BGL\` [\[1\]](#note1) -2. The non-default data directory path can be specified by `-datadir` option. +2. A custom data directory path can be specified with the `-datadir` option. 3. All content of the data directory, except for `BGL.conf` file, is chain-specific. This means the actual data directory paths for non-mainnet cases differ: -Chain option | Data directory path ---------------------|-------------------- -no option (mainnet) | *path_to_datadir*`/` -`-testnet` | *path_to_datadir*`/testnet3/` -`-regtest` | *path_to_datadir*`/regtest/` +Chain option | Data directory path +-------------------------------|------------------------------ +`-chain=main` (default) | *path_to_datadir*`/` +`-chain=test` or `-testnet` | *path_to_datadir*`/testnet3/` +`-chain=signet` or `-signet` | *path_to_datadir*`/signet/` +`-chain=regtest` or `-regtest` | *path_to_datadir*`/regtest/` ## Data directory layout @@ -44,39 +49,57 @@ Subdirectory | File(s) | Description `blocks/index/` | LevelDB database | Block index; `-blocksdir` option does not affect this path `blocks/` | `blkNNNNN.dat`[\[2\]](#note2) | Actual BGL blocks (in network format, dumped in raw on disk, 128 MiB per file) `blocks/` | `revNNNNN.dat`[\[2\]](#note2) | Block undo data (custom format) -`chainstate/` | LevelDB database | Blockchain state (a compact representation of all currently unspent transaction outputs and some metadata about the transactions they are from) +`chainstate/` | LevelDB database | Blockchain state (a compact representation of all currently unspent transaction outputs (UTXOs) and metadata about the transactions they are from) `indexes/txindex/` | LevelDB database | Transaction index; *optional*, used if `-txindex=1` `indexes/blockfilter/basic/db/` | LevelDB database | Blockfilter index LevelDB database for the basic filtertype; *optional*, used if `-blockfilterindex=basic` `indexes/blockfilter/basic/` | `fltrNNNNN.dat`[\[2\]](#note2) | Blockfilter index filters for the basic filtertype; *optional*, used if `-blockfilterindex=basic` -`wallets/` | | [Contains wallets](#multi-wallet-environment); can be specified by `-walletdir` option; if `wallets/` subdirectory does not exist, a wallet resides in the data directory +`wallets/` | | [Contains wallets](#multi-wallet-environment); can be specified by `-walletdir` option; if `wallets/` subdirectory does not exist, wallets reside in the [data directory](#data-directory-location) +`./` | `anchors.dat` | Anchor IP address database, created on shutdown and deleted at startup. Anchors are last known outgoing block-relay-only peers that are tried to re-connect to on startup `./` | `banlist.dat` | Stores the IPs/subnets of banned nodes -`./` | `BGL.conf` | Contains [configuration settings](BGL-conf.md) for `BGLd` or `BGL-qt`; can be specified by `-conf` option +`./` | `BGL.conf` | User-defined [configuration settings](BGL-conf.md) for `BGLd` or `BGL-qt`. File is not written to by the software and must be created manually. Path can be specified by `-conf` option `./` | `BGLd.pid` | Stores the process ID (PID) of `BGLd` or `BGL-qt` while running; created at start and deleted on shutdown; can be specified by `-pid` option `./` | `debug.log` | Contains debug information and general logging generated by `BGLd` or `BGL-qt`; can be specified by `-debuglogfile` option `./` | `fee_estimates.dat` | Stores statistics used to estimate minimum transaction fees and priorities required for confirmation `./` | `guisettings.ini.bak` | Backup of former [GUI settings](#gui-settings) after `-resetguisettings` option is used +`./` | `ip_asn.map` | IP addresses to Autonomous System Numbers (ASNs) mapping used for bucketing of the peers; path can be specified with the `-asmap` option `./` | `mempool.dat` | Dump of the mempool's transactions -`./` | `onion_private_key` | Cached Tor hidden service private key for `-listenonion` option +`./` | `onion_v3_private_key` | Cached Tor onion service private key for `-listenonion` option `./` | `peers.dat` | Peer IP address database (custom format) +`./` | `settings.json` | Read-write settings set through GUI or RPC interfaces, augmenting manual settings from [BGL.conf](BGL-conf.md). File is created automatically if read-write settings storage is not disabled with `-nosettings` option. Path can be specified with `-settings` option `./` | `.cookie` | Session RPC authentication cookie; if used, created at start and deleted on shutdown; can be specified by `-rpccookiefile` option `./` | `.lock` | Data directory lock file ## Multi-wallet environment -Wallets are Berkeley DB (BDB) databases: +Wallets are Berkeley DB (BDB) or SQLite databases. + +1. Each user-defined wallet named "wallet_name" resides in the `wallets/wallet_name/` subdirectory. + +2. The default (unnamed) wallet resides in `wallets/` subdirectory; if the latter does not exist, the wallet resides in the data directory. + +3. A wallet database path can be specified with the `-wallet` option. + +4. `wallet.dat` files must not be shared across different node instances, as that can result in key-reuse and double-spends due the lack of synchronization between instances. + +5. Any copy or backup of the wallet should be done through a `backupwallet` call in order to update and lock the wallet, preventing any file corruption caused by updates during the copy. + + +### Berkeley DB database based wallets Subdirectory | File(s) | Description --------------|-------------------|------------ +-------------|-------------------|------------- `database/` | BDB logging files | Part of BDB environment; created at start and deleted on shutdown; a user *must keep it as safe* as personal wallet `wallet.dat` `./` | `db.log` | BDB error file -`./` | `wallet.dat` | Personal wallet (BDB) with keys and transactions -`./` | `.walletlock` | Wallet lock file +`./` | `wallet.dat` | Personal wallet (a BDB database) with keys and transactions +`./` | `.walletlock` | BDB wallet lock file -1. Each user-defined wallet named "wallet_name" resides in `wallets/wallet_name/` subdirectory. +### SQLite database based wallets -2. The default (unnamed) wallet resides in `wallets/` subdirectory; if the latter does not exist, the wallet resides in the data directory. +Subdirectory | File | Description +-------------|----------------------|------------- +`./` | `wallet.dat` | Personal wallet (a SQLite database) with keys and transactions +`./` | `wallet.dat-journal` | SQLite Rollback Journal file for `wallet.dat`. Usually created at start and deleted on shutdown. A user *must keep it as safe* as the `wallet.dat` file. -3. A wallet database path can be specified by `-wallet` option. ## GUI settings @@ -88,15 +111,15 @@ These subdirectories and files are no longer used by the BGL Core: Path | Description | Repository notes ---------------|-------------|----------------- -`blktree/` | Blockchain index; replaced by `blocks/index/` in [0.8.0](https://github.com/BGL/BGL/blob/master/doc/release-notes/release-notes-0.8.0.md#improvements) | [PR #2231](https://github.com/BGL/BGL/pull/2231), [`8fdc94cc`](https://github.com/BGL/BGL/commit/8fdc94cc8f0341e96b1edb3a5b56811c0b20bd15) -`coins/` | Unspent transaction output database; replaced by `chainstate/` in 0.8.0 | [PR #2231](https://github.com/BGL/BGL/pull/2231), [`8fdc94cc`](https://github.com/BGL/BGL/commit/8fdc94cc8f0341e96b1edb3a5b56811c0b20bd15) -`blkindex.dat` | Blockchain index BDB database; replaced by {`chainstate/`, `blocks/index/`, `blocks/revNNNNN.dat`[\[2\]](#note2)} in 0.8.0 | [PR #1677](https://github.com/BGL/BGL/pull/1677) -`blk000?.dat` | Block data (custom format, 2 GiB per file); replaced by `blocks/blkNNNNN.dat`[\[2\]](#note2) in 0.8.0 | [PR #1677](https://github.com/BGL/BGL/pull/1677) -`addr.dat` | Peer IP address BDB database; replaced by `peers.dat` in [0.7.0](https://github.com/BGL/BGL/blob/master/doc/release-notes/release-notes-0.7.0.md) | [PR #1198](https://github.com/BGL/BGL/pull/1198), [`928d3a01`](https://github.com/BGL/BGL/commit/928d3a011cc66c7f907c4d053f674ea77dc611cc) +`blktree/` | Blockchain index; replaced by `blocks/index/` in [0.8.0](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.8.0.md#improvements) | [PR #2231](https://github.com/bitcoin/bitcoin/pull/2231), [`8fdc94cc`](https://github.com/bitcoin/bitcoin/commit/8fdc94cc8f0341e96b1edb3a5b56811c0b20bd15) +`coins/` | Unspent transaction output database; replaced by `chainstate/` in 0.8.0 | [PR #2231](https://github.com/bitcoin/bitcoin/pull/2231), [`8fdc94cc`](https://github.com/bitcoin/bitcoin/commit/8fdc94cc8f0341e96b1edb3a5b56811c0b20bd15) +`blkindex.dat` | Blockchain index BDB database; replaced by {`chainstate/`, `blocks/index/`, `blocks/revNNNNN.dat`[\[2\]](#note2)} in 0.8.0 | [PR #1677](https://github.com/bitcoin/bitcoin/pull/1677) +`blk000?.dat` | Block data (custom format, 2 GiB per file); replaced by `blocks/blkNNNNN.dat`[\[2\]](#note2) in 0.8.0 | [PR #1677](https://github.com/bitcoin/bitcoin/pull/1677) +`addr.dat` | Peer IP address BDB database; replaced by `peers.dat` in [0.7.0](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.7.0.md) | [PR #1198](https://github.com/bitcoin/bitcoin/pull/1198), [`928d3a01`](https://github.com/bitcoin/bitcoin/commit/928d3a011cc66c7f907c4d053f674ea77dc611cc) +`onion_private_key` | Cached Tor onion service private key for `-listenonion` option. Was used for Tor v2 services; replaced by `onion_v3_private_key` in [0.21.0](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.21.0.md) | [PR #19954](https://github.com/bitcoin/bitcoin/pull/19954) ## Notes -1. The `/` (slash, U+002F) is used as the platform-independent path component separator in this paper. +1. The `/` (slash, U+002F) is used as the platform-independent path component separator in this document. 2. `NNNNN` matches `[0-9]{5}` regex. - diff --git a/doc/fuzzing.md b/doc/fuzzing.md index fcea90480a..c97b8d4d50 100644 --- a/doc/fuzzing.md +++ b/doc/fuzzing.md @@ -1,97 +1,159 @@ -Fuzz-testing BGL Core -========================== - -A special test harness in `src/test/fuzz/` is provided for each fuzz target to -provide an easy entry point for fuzzers and the like. In this document we'll -describe how to use it with AFL and libFuzzer. +# Fuzzing Bitcoin Core using libFuzzer + +## Quickstart guide + +To quickly get started fuzzing Bitcoin Core using [libFuzzer](https://llvm.org/docs/LibFuzzer.html): + +```sh +$ git clone https://github.com/bitcoin/bitcoin +$ cd bitcoin/ +$ ./autogen.sh +$ CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=address,fuzzer,undefined +# macOS users: If you have problem with this step then make sure to read "macOS hints for +# libFuzzer" on https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md#macos-hints-for-libfuzzer +$ make +$ src/test/fuzz/process_message +# abort fuzzing using ctrl-c +``` -## Preparing fuzzing +## Fuzzing harnesses, fuzzing output and fuzzing corpora + +[`process_message`](https://github.com/bitcoin/bitcoin/blob/master/src/test/fuzz/process_message.cpp) is a fuzzing harness for the [`ProcessMessage(...)` function (`net_processing`)](https://github.com/bitcoin/bitcoin/blob/master/src/net_processing.cpp). The available fuzzing harnesses are found in [`src/test/fuzz/`](https://github.com/bitcoin/bitcoin/tree/master/src/test/fuzz). + +The fuzzer will output `NEW` every time it has created a test input that covers new areas of the code under test. For more information on how to interpret the fuzzer output, see the [libFuzzer documentation](https://llvm.org/docs/LibFuzzer.html). + +If you specify a corpus directory then any new coverage increasing inputs will be saved there: + +```sh +$ mkdir -p process_message-seeded-from-thin-air/ +$ src/test/fuzz/process_message process_message-seeded-from-thin-air/ +INFO: Seed: 840522292 +INFO: Loaded 1 modules (424174 inline 8-bit counters): 424174 [0x55e121ef9ab8, 0x55e121f613a6), +INFO: Loaded 1 PC tables (424174 PCs): 424174 [0x55e121f613a8,0x55e1225da288), +INFO: 0 files found in process_message-seeded-from-thin-air/ +INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes +INFO: A corpus is not provided, starting from an empty corpus +#2 INITED cov: 94 ft: 95 corp: 1/1b exec/s: 0 rss: 150Mb +#3 NEW cov: 95 ft: 96 corp: 2/3b lim: 4 exec/s: 0 rss: 150Mb L: 2/2 MS: 1 InsertByte- +#4 NEW cov: 96 ft: 98 corp: 3/7b lim: 4 exec/s: 0 rss: 150Mb L: 4/4 MS: 1 CrossOver- +#21 NEW cov: 96 ft: 100 corp: 4/11b lim: 4 exec/s: 0 rss: 150Mb L: 4/4 MS: 2 ChangeBit-CrossOver- +#324 NEW cov: 101 ft: 105 corp: 5/12b lim: 6 exec/s: 0 rss: 150Mb L: 6/6 MS: 5 CrossOver-ChangeBit-CopyPart-ChangeBit-ChangeBinInt- +#1239 REDUCE cov: 102 ft: 106 corp: 6/24b lim: 14 exec/s: 0 rss: 150Mb L: 13/13 MS: 5 ChangeBit-CrossOver-EraseBytes-ChangeBit-InsertRepeatedBytes- +#1272 REDUCE cov: 102 ft: 106 corp: 6/23b lim: 14 exec/s: 0 rss: 150Mb L: 12/12 MS: 3 ChangeBinInt-ChangeBit-EraseBytes- + NEW_FUNC[1/677]: 0x55e11f456690 in std::_Function_base::~_Function_base() /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h:255 + NEW_FUNC[2/677]: 0x55e11f465800 in CDataStream::CDataStream(std::vector > const&, int, int) src/./streams.h:248 +#2125 REDUCE cov: 4820 ft: 4867 corp: 7/29b lim: 21 exec/s: 0 rss: 155Mb L: 6/12 MS: 2 CopyPart-CMP- DE: "block"- + NEW_FUNC[1/9]: 0x55e11f64d790 in std::_Rb_tree > >, std::_Select1st > > >, std::less, std::allocator > > > >::~_Rb_tree() /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h:972 + NEW_FUNC[2/9]: 0x55e11f64d870 in std::_Rb_tree > >, std::_Select1st > > >, std::less, std::allocator > > > >::_M_erase(std::_Rb_tree_node > > >*) /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_tree.h:1875 +#2228 NEW cov: 4898 ft: 4971 corp: 8/35b lim: 21 exec/s: 0 rss: 156Mb L: 6/12 MS: 3 EraseBytes-CopyPart-PersAutoDict- DE: "block"- + NEW_FUNC[1/5]: 0x55e11f46df70 in std::enable_if<__and_ >::__construct_helper::type>::value, void>::type std::allocator_traits >::_S_construct(zero_after_free_allocator&, char*, unsigned char const&) /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h:243 + NEW_FUNC[2/5]: 0x55e11f477390 in std::vector >::data() /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_vector.h:1056 +#2456 NEW cov: 4933 ft: 5042 corp: 9/55b lim: 21 exec/s: 0 rss: 160Mb L: 20/20 MS: 3 ChangeByte-InsertRepeatedBytes-PersAutoDict- DE: "block"- +#2467 NEW cov: 4933 ft: 5043 corp: 10/76b lim: 21 exec/s: 0 rss: 161Mb L: 21/21 MS: 1 InsertByte- +#4215 NEW cov: 4941 ft: 5129 corp: 17/205b lim: 29 exec/s: 4215 rss: 350Mb L: 29/29 MS: 5 InsertByte-ChangeBit-CopyPart-InsertRepeatedBytes-CrossOver- +#4567 REDUCE cov: 4941 ft: 5129 corp: 17/204b lim: 29 exec/s: 4567 rss: 404Mb L: 24/29 MS: 2 ChangeByte-EraseBytes- +#6642 NEW cov: 4941 ft: 5138 corp: 18/244b lim: 43 exec/s: 2214 rss: 450Mb L: 43/43 MS: 3 CopyPart-CMP-CrossOver- DE: "verack"- +# abort fuzzing using ctrl-c +$ ls process_message-seeded-from-thin-air/ +349ac589fc66a09abc0b72bb4ae445a7a19e2cd8 4df479f1f421f2ea64b383cd4919a272604087a7 +a640312c98dcc55d6744730c33e41c5168c55f09 b135de16e4709558c0797c15f86046d31c5d86d7 +c000f7b41b05139de8b63f4cbf7d1ad4c6e2aa7f fc52cc00ec1eb1c08470e69f809ae4993fa70082 +$ cat --show-nonprinting process_message-seeded-from-thin-air/349ac589fc66a09abc0b72bb4ae445a7a19e2cd8 +block^@M-^?M-^?M-^?M-^?M-^?nM-^?M-^? +``` -AFL needs an input directory with examples, and an output directory where it -will place examples that it found. These can be anywhere in the file system, -we'll define environment variables to make it easy to reference them. +In this case the fuzzer managed to create a `block` message which when passed to `ProcessMessage(...)` increased coverage. -libFuzzer will use the input directory as output directory. +The project's collection of seed corpora is found in the [`bitcoin-core/qa-assets`](https://github.com/bitcoin-core/qa-assets) repo. -Extract the example seeds (or other starting inputs) into the inputs -directory before starting fuzzing. +To fuzz `process_message` using the [`bitcoin-core/qa-assets`](https://github.com/bitcoin-core/qa-assets) seed corpus: -``` -git clone https://github.com/BGL-core/qa-assets -export DIR_FUZZ_IN=$PWD/qa-assets/fuzz_seed_corpus +```sh +$ git clone https://github.com/bitcoin-core/qa-assets +$ src/test/fuzz/process_message qa-assets/fuzz_seed_corpus/process_message/ +INFO: Seed: 1346407872 +INFO: Loaded 1 modules (424174 inline 8-bit counters): 424174 [0x55d8a9004ab8, 0x55d8a906c3a6), +INFO: Loaded 1 PC tables (424174 PCs): 424174 [0x55d8a906c3a8,0x55d8a96e5288), +INFO: 991 files found in qa-assets/fuzz_seed_corpus/process_message/ +INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes +INFO: seed corpus: files: 991 min: 1b max: 1858b total: 288291b rss: 150Mb +#993 INITED cov: 7063 ft: 8236 corp: 25/3821b exec/s: 0 rss: 181Mb +… ``` -Only for AFL: +If you find coverage increasing inputs when fuzzing you are highly encouraged to submit them for inclusion in the [`bitcoin-core/qa-assets`](https://github.com/bitcoin-core/qa-assets) repo. -``` -mkdir outputs -export AFLOUT=$PWD/outputs -``` +Every single pull request submitted against the Bitcoin Core repo is automatically tested against all inputs in the [`bitcoin-core/qa-assets`](https://github.com/bitcoin-core/qa-assets) repo. Contributing new coverage increasing inputs is an easy way to help make Bitcoin Core more robust. -## AFL +## macOS hints for libFuzzer -### Building AFL +The default Clang/LLVM version supplied by Apple on macOS does not include +fuzzing libraries, so macOS users will need to install a full version, for +example using `brew install llvm`. -It is recommended to always use the latest version of afl: -``` -wget http://lcamtuf.coredump.cx/afl/releases/afl-latest.tgz -tar -zxvf afl-latest.tgz -cd afl- -make -export AFLPATH=$PWD -``` +Should you run into problems with the address sanitizer, it is possible you +may need to run `./configure` with `--disable-asm` to avoid errors +with certain assembly code from Bitcoin Core's code. See [developer notes on sanitizers](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#sanitizers) +for more information. -### Instrumentation +You may also need to take care of giving the correct path for `clang` and +`clang++`, like `CC=/path/to/clang CXX=/path/to/clang++` if the non-systems +`clang` does not come first in your path. -To build BGL Core using AFL instrumentation (this assumes that the -`AFLPATH` was set as above): -``` -./configure --disable-ccache --disable-shared --enable-tests --enable-fuzz CC=${AFLPATH}/afl-gcc CXX=${AFLPATH}/afl-g++ -export AFL_HARDEN=1 -cd src/ -make -``` -We disable ccache because we don't want to pollute the ccache with instrumented -objects, and similarly don't want to use non-instrumented cached objects linked -in. - -The fuzzing can be sped up significantly (~200x) by using `afl-clang-fast` and -`afl-clang-fast++` in place of `afl-gcc` and `afl-g++` when compiling. When -compiling using `afl-clang-fast`/`afl-clang-fast++` the resulting -binary will be instrumented in such a way that the AFL -features "persistent mode" and "deferred forkserver" can be used. See -https://github.com/mcarpenter/afl/tree/master/llvm_mode for details. - -### Fuzzing - -To start the actual fuzzing use: +Full configure that was tested on macOS Catalina with `brew` installed `llvm`: +```sh +./configure --enable-fuzz --with-sanitizers=fuzzer,address,undefined CC=/usr/local/opt/llvm/bin/clang CXX=/usr/local/opt/llvm/bin/clang++ --disable-asm ``` -export FUZZ_TARGET=fuzz_target_foo # Pick a fuzz_target -mkdir ${AFLOUT}/${FUZZ_TARGET} -$AFLPATH/afl-fuzz -i ${DIR_FUZZ_IN}/${FUZZ_TARGET} -o ${AFLOUT}/${FUZZ_TARGET} -m52 -- test/fuzz/${FUZZ_TARGET} + +Read the [libFuzzer documentation](https://llvm.org/docs/LibFuzzer.html) for more information. This [libFuzzer tutorial](https://github.com/google/fuzzing/blob/master/tutorial/libFuzzerTutorial.md) might also be of interest. + +# Fuzzing Bitcoin Core using american fuzzy lop (`afl-fuzz`) + +## Quickstart guide + +To quickly get started fuzzing Bitcoin Core using [`afl-fuzz`](https://github.com/google/afl): + +```sh +$ git clone https://github.com/bitcoin/bitcoin +$ cd bitcoin/ +$ git clone https://github.com/google/afl +$ make -C afl/ +$ make -C afl/llvm_mode/ +$ ./autogen.sh +# It is possible to compile with afl-gcc and afl-g++ instead of afl-clang. However, running afl-fuzz +# may require more memory via the -m flag. +$ CC=$(pwd)/afl/afl-clang-fast CXX=$(pwd)/afl/afl-clang-fast++ ./configure --enable-fuzz +$ make +# For macOS you may need to ignore x86 compilation checks when running "make". If so, +# try compiling using: AFL_NO_X86=1 make +$ mkdir -p inputs/ outputs/ +$ echo A > inputs/thin-air-input +$ afl/afl-fuzz -i inputs/ -o outputs/ -- src/test/fuzz/bech32 +# You may have to change a few kernel parameters to test optimally - afl-fuzz +# will print an error and suggestion if so. ``` -You may have to change a few kernel parameters to test optimally - `afl-fuzz` -will print an error and suggestion if so. +Read the [`afl-fuzz` documentation](https://github.com/google/afl) for more information. -## libFuzzer +# Fuzzing Bitcoin Core using Honggfuzz -A recent version of `clang`, the address/undefined sanitizers (ASan/UBSan) and libFuzzer is needed (all -found in the `compiler-rt` runtime libraries package). +## Quickstart guide -To build all fuzz targets with libFuzzer, run +To quickly get started fuzzing Bitcoin Core using [Honggfuzz](https://github.com/google/honggfuzz): +```sh +$ git clone https://github.com/bitcoin/bitcoin +$ cd bitcoin/ +$ ./autogen.sh +$ git clone https://github.com/google/honggfuzz +$ cd honggfuzz/ +$ make +$ cd .. +$ CC=$(pwd)/honggfuzz/hfuzz_cc/hfuzz-clang CXX=$(pwd)/honggfuzz/hfuzz_cc/hfuzz-clang++ ./configure --enable-fuzz --with-sanitizers=address,undefined +$ make +$ mkdir -p inputs/ +$ honggfuzz/honggfuzz -i inputs/ -- src/test/fuzz/process_message ``` -./configure --disable-ccache --enable-fuzz --with-sanitizers=fuzzer,address,undefined CC=clang CXX=clang++ -make -``` - -The fuzzer needs some inputs to work on, but the inputs or seeds can be used -interchangeably between libFuzzer and AFL. - -See https://llvm.org/docs/LibFuzzer.html#running on how to run the libFuzzer -instrumented executable. -Alternatively run the script in `./test/fuzz/test_runner.py` and provide it -with the `${DIR_FUZZ_IN}` created earlier. +Read the [Honggfuzz documentation](https://github.com/google/honggfuzz/blob/master/docs/USAGE.md) for more information. diff --git a/doc/init.md b/doc/init.md index 1281c56f55..f157b3f701 100644 --- a/doc/init.md +++ b/doc/init.md @@ -20,9 +20,9 @@ The macOS configuration assumes BGLd will be set up for the current user. Configuration --------------------------------- -At a bare minimum, BGLd requires that the rpcpassword setting be set -when running as a daemon. If the configuration file does not exist or this -setting is not set, BGLd will shut down promptly after startup. +Running BGLd as a daemon does not require any manual configuration. You may +set the `rpcauth` setting in the `BGL.conf` configuration file to override +the default behaviour of using a special cookie for authentication. This password does not have to be remembered or typed as it is mostly used as a fixed token that BGLd and client programs read from the configuration diff --git a/doc/man/BGL-cli.1 b/doc/man/BGL-cli.1 index e578ed63d9..9fe0526f17 100644 --- a/doc/man/BGL-cli.1 +++ b/doc/man/BGL-cli.1 @@ -1,115 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. -.TH BGL-CLI "1" "February 2019" "BGL-cli v0.17.99.0" "User Commands" +.TH BGL-CLI "1" .SH NAME -BGL-cli \- manual page for BGL-cli v0.17.99.0 -.SH SYNOPSIS -.B BGL-cli -[\fI\,options\/\fR] \fI\, \/\fR[\fI\,params\/\fR] \fI\,Send command to BGL Core\/\fR -.br -.B BGL-cli -[\fI\,options\/\fR] \fI\,-named \/\fR[\fI\,name=value\/\fR]... \fI\,Send command to BGL Core (with named arguments)\/\fR -.br -.B BGL-cli -[\fI\,options\/\fR] \fI\,help List commands\/\fR -.br -.B BGL-cli -[\fI\,options\/\fR] \fI\,help Get help for a command\/\fR -.SH DESCRIPTION -BGL Core RPC client version v0.17.99.0 -.SH OPTIONS -.HP -\-? -.IP -Print this help message and exit -.HP -\fB\-conf=\fR -.IP -Specify configuration file. Relative paths will be prefixed by datadir -location. (default: BGL.conf) -.HP -\fB\-datadir=\fR -.IP -Specify data directory -.HP -\fB\-getinfo\fR -.IP -Get general information from the remote server. Note that unlike -server\-side RPC calls, the results of \fB\-getinfo\fR is the result of -multiple non\-atomic requests. Some entries in the result may -represent results from different states (e.g. wallet balance may -be as of a different block from the chain state reported) -.HP -\fB\-named\fR -.IP -Pass named instead of positional arguments (default: false) -.HP -\fB\-rpcclienttimeout=\fR -.IP -Timeout in seconds during HTTP requests, or 0 for no timeout. (default: -900) -.HP -\fB\-rpcconnect=\fR -.IP -Send commands to node running on (default: 127.0.0.1) -.HP -\fB\-rpccookiefile=\fR -.IP -Location of the auth cookie. Relative paths will be prefixed by a -net\-specific datadir location. (default: data dir) -.HP -\fB\-rpcpassword=\fR -.IP -Password for JSON\-RPC connections -.HP -\fB\-rpcport=\fR -.IP -Connect to JSON\-RPC on (default: 8332, testnet: 18332, regtest: -18443) -.HP -\fB\-rpcuser=\fR -.IP -Username for JSON\-RPC connections -.HP -\fB\-rpcwait\fR -.IP -Wait for RPC server to start -.HP -\fB\-rpcwallet=\fR -.IP -Send RPC for non\-default wallet on RPC server (needs to exactly match -corresponding \fB\-wallet\fR option passed to BGLd). This changes -the RPC endpoint used, e.g. -http://127.0.0.1:8332/wallet/ -.HP -\fB\-stdin\fR -.IP -Read extra arguments from standard input, one per line until EOF/Ctrl\-D -(recommended for sensitive information such as passphrases). When -combined with \fB\-stdinrpcpass\fR, the first line from standard input -is used for the RPC password. -.HP -\fB\-stdinrpcpass\fR -.IP -Read RPC password from standard input as a single line. When combined -with \fB\-stdin\fR, the first line from standard input is used for the -RPC password. -.HP -\fB\-version\fR -.IP -Print version and exit -.PP -Chain selection options: -.HP -\fB\-testnet\fR -.IP -Use the test chain -.SH COPYRIGHT -Copyright (C) 2009-2019 The Bitcoin Core developers +BGL-cli \- manual page for BGL-cli -Please contribute if you find BGL Core useful. Visit - for further information about the software. -The source code is available from . - -This is experimental software. -Distributed under the MIT software license, see the accompanying file COPYING -or +This is a placefolder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release. diff --git a/doc/man/BGL-qt.1 b/doc/man/BGL-qt.1 index 75750b2f1c..80045901f0 100644 --- a/doc/man/BGL-qt.1 +++ b/doc/man/BGL-qt.1 @@ -1,610 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. -.TH BGL-QT "1" "February 2019" "BGL-qt v0.17.99.0" "User Commands" +.TH BGL-QT "1" .SH NAME -BGL-qt \- manual page for BGL-qt v0.17.99.0 -.SH SYNOPSIS -.B BGL-qt -[\fI\,command-line options\/\fR] -.SH DESCRIPTION -BGL Core version v0.17.99.0 (64\-bit) -.SH OPTIONS -.HP -\-? -.IP -Print this help message and exit -.HP -\fB\-alertnotify=\fR -.IP -Execute command when a relevant alert is received or we see a really -long fork (%s in cmd is replaced by message) -.HP -\fB\-assumevalid=\fR -.IP -If this block is in the chain assume that it and its ancestors are valid -and potentially skip their script verification (0 to verify all, -default: -0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8, -testnet: -0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75) -.HP -\fB\-blocknotify=\fR -.IP -Execute command when the best block changes (%s in cmd is replaced by -block hash) -.HP -\fB\-blockreconstructionextratxn=\fR -.IP -Extra transactions to keep in memory for compact block reconstructions -(default: 100) -.HP -\fB\-blocksdir=\fR -.IP -Specify blocks directory (default: /blocks) -.HP -\fB\-conf=\fR -.IP -Specify configuration file. Relative paths will be prefixed by datadir -location. (default: BGL.conf) -.HP -\fB\-daemon\fR -.IP -Run in the background as a daemon and accept commands -.HP -\fB\-datadir=\fR -.IP -Specify data directory -.HP -\fB\-dbcache=\fR -.IP -Set database cache size in MiB (4 to 16384, default: 450) -.HP -\fB\-debuglogfile=\fR -.IP -Specify location of debug log file. Relative paths will be prefixed by a -net\-specific datadir location. (\fB\-nodebuglogfile\fR to disable; -default: debug.log) -.HP -\fB\-includeconf=\fR -.IP -Specify additional configuration file, relative to the \fB\-datadir\fR path -(only useable from configuration file, not command line) -.HP -\fB\-loadblock=\fR -.IP -Imports blocks from external blk000??.dat file on startup -.HP -\fB\-maxmempool=\fR -.IP -Keep the transaction memory pool below megabytes (default: 300) -.HP -\fB\-maxorphantx=\fR -.IP -Keep at most unconnectable transactions in memory (default: 100) -.HP -\fB\-mempoolexpiry=\fR -.IP -Do not keep transactions in the mempool longer than hours (default: -336) -.HP -\fB\-par=\fR -.IP -Set the number of script verification threads (\fB\-8\fR to 16, 0 = auto, <0 = -leave that many cores free, default: 0) -.HP -\fB\-persistmempool\fR -.IP -Whether to save the mempool on shutdown and load on restart (default: 1) -.HP -\fB\-pid=\fR -.IP -Specify pid file. Relative paths will be prefixed by a net\-specific -datadir location. (default: BGLd.pid) -.HP -\fB\-prune=\fR -.IP -Reduce storage requirements by enabling pruning (deleting) of old -blocks. This allows the pruneblockchain RPC to be called to -delete specific blocks, and enables automatic pruning of old -blocks if a target size in MiB is provided. This mode is -incompatible with \fB\-txindex\fR and \fB\-rescan\fR. Warning: Reverting this -setting requires re\-downloading the entire blockchain. (default: -0 = disable pruning blocks, 1 = allow manual pruning via RPC, ->=550 = automatically prune block files to stay under the -specified target size in MiB) -.HP -\fB\-reindex\fR -.IP -Rebuild chain state and block index from the blk*.dat files on disk -.HP -\fB\-reindex\-chainstate\fR -.IP -Rebuild chain state from the currently indexed blocks. When in pruning -mode or if blocks on disk might be corrupted, use full \fB\-reindex\fR -instead. -.HP -\fB\-sysperms\fR -.IP -Create new files with system default permissions, instead of umask 077 -(only effective with disabled wallet functionality) -.HP -\fB\-txindex\fR -.IP -Maintain a full transaction index, used by the getrawtransaction rpc -call (default: 0) -.HP -\fB\-version\fR -.IP -Print version and exit -.PP -Connection options: -.HP -\fB\-addnode=\fR -.IP -Add a node to connect to and attempt to keep the connection open (see -the `addnode` RPC command help for more info). This option can be -specified multiple times to add multiple nodes. -.HP -\fB\-banscore=\fR -.IP -Threshold for disconnecting misbehaving peers (default: 100) -.HP -\fB\-bantime=\fR -.IP -Number of seconds to keep misbehaving peers from reconnecting (default: -86400) -.HP -\fB\-bind=\fR -.IP -Bind to given address and always listen on it. Use [host]:port notation -for IPv6 -.HP -\fB\-connect=\fR -.IP -Connect only to the specified node; \fB\-noconnect\fR disables automatic -connections (the rules for this peer are the same as for -\fB\-addnode\fR). This option can be specified multiple times to connect -to multiple nodes. -.HP -\fB\-discover\fR -.IP -Discover own IP addresses (default: 1 when listening and no \fB\-externalip\fR -or \fB\-proxy\fR) -.HP -\fB\-dns\fR -.IP -Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR (default: 1) -.HP -\fB\-dnsseed\fR -.IP -Query for peer addresses via DNS lookup, if low on addresses (default: 1 -unless \fB\-connect\fR used) -.HP -\fB\-externalip=\fR -.IP -Specify your own public address -.HP -\fB\-forcednsseed\fR -.IP -Always query for peer addresses via DNS lookup (default: 0) -.HP -\fB\-listen\fR -.IP -Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\fR) -.HP -\fB\-listenonion\fR -.IP -Automatically create Tor hidden service (default: 1) -.HP -\fB\-maxconnections=\fR -.IP -Maintain at most connections to peers (default: 125) -.HP -\fB\-maxreceivebuffer=\fR -.IP -Maximum per\-connection receive buffer, *1000 bytes (default: 5000) -.HP -\fB\-maxsendbuffer=\fR -.IP -Maximum per\-connection send buffer, *1000 bytes (default: 1000) -.HP -\fB\-maxtimeadjustment\fR -.IP -Maximum allowed median peer time offset adjustment. Local perspective of -time may be influenced by peers forward or backward by this -amount. (default: 4200 seconds) -.HP -\fB\-maxuploadtarget=\fR -.IP -Tries to keep outbound traffic under the given target (in MiB per 24h), -0 = no limit (default: 0) -.HP -\fB\-onion=\fR -.IP -Use separate SOCKS5 proxy to reach peers via Tor hidden services, set -\fB\-noonion\fR to disable (default: \fB\-proxy\fR) -.HP -\fB\-onlynet=\fR -.IP -Make outgoing connections only through network (ipv4, ipv6 or -onion). Incoming connections are not affected by this option. -This option can be specified multiple times to allow multiple -networks. -.HP -\fB\-peerbloomfilters\fR -.IP -Support filtering of blocks and transaction with bloom filters (default: -1) -.HP -\fB\-permitbaremultisig\fR -.IP -Relay non\-P2SH multisig (default: 1) -.HP -\fB\-port=\fR -.IP -Listen for connections on (default: 8333, testnet: 18333, -regtest: 18444) -.HP -\fB\-proxy=\fR -.IP -Connect through SOCKS5 proxy, set \fB\-noproxy\fR to disable (default: -disabled) -.HP -\fB\-proxyrandomize\fR -.IP -Randomize credentials for every proxy connection. This enables Tor -stream isolation (default: 1) -.HP -\fB\-seednode=\fR -.IP -Connect to a node to retrieve peer addresses, and disconnect. This -option can be specified multiple times to connect to multiple -nodes. -.HP -\fB\-timeout=\fR -.IP -Specify connection timeout in milliseconds (minimum: 1, default: 5000) -.HP -\fB\-torcontrol=\fR: -.IP -Tor control port to use if onion listening enabled (default: -127.0.0.1:9051) -.HP -\fB\-torpassword=\fR -.IP -Tor control port password (default: empty) -.HP -\fB\-upnp\fR -.IP -Use UPnP to map the listening port (default: 0) -.HP -\fB\-whitebind=\fR -.IP -Bind to given address and whitelist peers connecting to it. Use -[host]:port notation for IPv6 -.HP -\fB\-whitelist=\fR -.IP -Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or -CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple -times. Whitelisted peers cannot be DoS banned and their -transactions are always relayed, even if they are already in the -mempool, useful e.g. for a gateway -.PP -Wallet options: -.HP -\fB\-addresstype\fR -.IP -What type of addresses to use ("legacy", "p2sh\-segwit", or "bech32", -default: "p2sh\-segwit") -.HP -\fB\-avoidpartialspends\fR -.IP -Group outputs by address, selecting all or none, instead of selecting on -a per\-output basis. Privacy is improved as an address is only -used once (unless someone sends to it after spending from it), -but may result in slightly higher fees as suboptimal coin -selection may result due to the added limitation (default: 0) -.HP -\fB\-changetype\fR -.IP -What type of change to use ("legacy", "p2sh\-segwit", or "bech32"). -Default is same as \fB\-addresstype\fR, except when -\fB\-addresstype\fR=\fI\,p2sh\-segwit\/\fR a native segwit output is used when -sending to a native segwit address) -.HP -\fB\-disablewallet\fR -.IP -Do not load the wallet and disable wallet RPC calls -.HP -\fB\-discardfee=\fR -.IP -The fee rate (in BTC/kB) that indicates your tolerance for discarding -change by adding it to the fee (default: 0.0001). Note: An output -is discarded if it is dust at this rate, but we will always -discard up to the dust relay fee and a discard fee above that is -limited by the fee estimate for the longest target -.HP -\fB\-fallbackfee=\fR -.IP -A fee rate (in BTC/kB) that will be used when fee estimation has -insufficient data (default: 0.0002) -.HP -\fB\-keypool=\fR -.IP -Set key pool size to (default: 1000) -.HP -\fB\-mintxfee=\fR -.IP -Fees (in BTC/kB) smaller than this are considered zero fee for -transaction creation (default: 0.00001) -.HP -\fB\-paytxfee=\fR -.IP -Fee (in BTC/kB) to add to transactions you send (default: 0.00) -.HP -\fB\-rescan\fR -.IP -Rescan the block chain for missing wallet transactions on startup -.HP -\fB\-salvagewallet\fR -.IP -Attempt to recover private keys from a corrupt wallet on startup -.HP -\fB\-spendzeroconfchange\fR -.IP -Spend unconfirmed change when sending transactions (default: 1) -.HP -\fB\-txconfirmtarget=\fR -.IP -If paytxfee is not set, include enough fee so transactions begin -confirmation on average within n blocks (default: 6) -.HP -\fB\-upgradewallet\fR -.IP -Upgrade wallet to latest format on startup -.HP -\fB\-wallet=\fR -.IP -Specify wallet database path. Can be specified multiple times to load -multiple wallets. Path is interpreted relative to if -it is not absolute, and will be created if it does not exist (as -a directory containing a wallet.dat file and log files). For -backwards compatibility this will also accept names of existing -data files in .) -.HP -\fB\-walletbroadcast\fR -.IP -Make the wallet broadcast transactions (default: 1) -.HP -\fB\-walletdir=\fR -.IP -Specify directory to hold wallets (default: /wallets if it -exists, otherwise ) -.HP -\fB\-walletnotify=\fR -.IP -Execute command when a wallet transaction changes (%s in cmd is replaced -by TxID) -.HP -\fB\-walletrbf\fR -.IP -Send transactions with full\-RBF opt\-in enabled (RPC only, default: 0) -.HP -\fB\-zapwallettxes=\fR -.IP -Delete all wallet transactions and only recover those parts of the -blockchain through \fB\-rescan\fR on startup (1 = keep tx meta data e.g. -payment request information, 2 = drop tx meta data) -.PP -ZeroMQ notification options: -.HP -\fB\-zmqpubhashblock=\fR
-.IP -Enable publish hash block in
-.HP -\fB\-zmqpubhashtx=\fR
-.IP -Enable publish hash transaction in
-.HP -\fB\-zmqpubrawblock=\fR
-.IP -Enable publish raw block in
-.HP -\fB\-zmqpubrawtx=\fR
-.IP -Enable publish raw transaction in
-.PP -Debugging/Testing options: -.HP -\fB\-debug=\fR -.IP -Output debugging information (default: \fB\-nodebug\fR, supplying is -optional). If is not supplied or if = 1, -output all debugging information. can be: net, tor, -mempool, http, bench, zmq, db, rpc, estimatefee, addrman, -selectcoins, reindex, cmpctblock, rand, prune, proxy, mempoolrej, -libevent, coindb, qt, leveldb. -.HP -\fB\-debugexclude=\fR -.IP -Exclude debugging information for a category. Can be used in conjunction -with \fB\-debug\fR=\fI\,1\/\fR to output debug logs for all categories except one -or more specified categories. -.HP -\fB\-help\-debug\fR -.IP -Print help message with debugging options and exit -.HP -\fB\-logips\fR -.IP -Include IP addresses in debug output (default: 0) -.HP -\fB\-logtimestamps\fR -.IP -Prepend debug output with timestamp (default: 1) -.HP -\fB\-maxtxfee=\fR -.IP -Maximum total fees (in BTC) to use in a single wallet transaction or raw -transaction; setting this too low may abort large transactions -(default: 0.10) -.HP -\fB\-printtoconsole\fR -.IP -Send trace/debug info to console (default: 1 when no \fB\-daemon\fR. To disable -logging to file, set \fB\-nodebuglogfile\fR) -.HP -\fB\-shrinkdebugfile\fR -.IP -Shrink debug.log file on client startup (default: 1 when no \fB\-debug\fR) -.HP -\fB\-uacomment=\fR -.IP -Append comment to the user agent string -.PP -Chain selection options: -.HP -\fB\-testnet\fR -.IP -Use the test chain -.PP -Node relay options: -.HP -\fB\-bytespersigop\fR -.IP -Equivalent bytes per sigop in transactions for relay and mining -(default: 20) -.HP -\fB\-datacarrier\fR -.IP -Relay and mine data carrier transactions (default: 1) -.HP -\fB\-datacarriersize\fR -.IP -Maximum size of data in data carrier transactions we relay and mine -(default: 83) -.HP -.HP -\fB\-minrelaytxfee=\fR -.IP -Fees (in BTC/kB) smaller than this are considered zero fee for relaying, -mining and transaction creation (default: 0.00001) -.HP -\fB\-whitelistforcerelay\fR -.IP -Force relay of transactions from whitelisted peers even if they violate -local relay policy (default: 0) -.HP -\fB\-whitelistrelay\fR -.IP -Accept relayed transactions received from whitelisted peers even when -not relaying transactions (default: 1) -.PP -Block creation options: -.HP -\fB\-blockmaxweight=\fR -.IP -Set maximum BIP141 block weight (default: 3996000) -.HP -\fB\-blockmintxfee=\fR -.IP -Set lowest fee rate (in BTC/kB) for transactions to be included in block -creation. (default: 0.00001) -.PP -RPC server options: -.HP -\fB\-rest\fR -.IP -Accept public REST requests (default: 0) -.HP -\fB\-rpcallowip=\fR -.IP -Allow JSON\-RPC connections from specified source. Valid for are a -single IP (e.g. 1.2.3.4), a network/netmask (e.g. -1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This -option can be specified multiple times -.HP -\fB\-rpcauth=\fR -.IP -Username and HMAC\-SHA\-256 hashed password for JSON\-RPC connections. The -field comes in the format: :$. A -canonical python script is included in share/rpcauth. The client -then connects normally using the -rpcuser=/rpcpassword= pair of arguments. This -option can be specified multiple times -.HP -\fB\-rpcbind=\fR[:port] -.IP -Bind to given address to listen for JSON\-RPC connections. Do not expose -the RPC server to untrusted networks such as the public internet! -This option is ignored unless \fB\-rpcallowip\fR is also passed. Port is -optional and overrides \fB\-rpcport\fR. Use [host]:port notation for -IPv6. This option can be specified multiple times (default: -127.0.0.1 and ::1 i.e., localhost) -.HP -\fB\-rpccookiefile=\fR -.IP -Location of the auth cookie. Relative paths will be prefixed by a -net\-specific datadir location. (default: data dir) -.HP -\fB\-rpcpassword=\fR -.IP -Password for JSON\-RPC connections -.HP -\fB\-rpcport=\fR -.IP -Listen for JSON\-RPC connections on (default: 8332, testnet: -18332, regtest: 18443) -.HP -\fB\-rpcserialversion\fR -.IP -Sets the serialization of raw transaction or block hex returned in -non\-verbose mode, non\-segwit(0) or segwit(1) (default: 1) -.HP -\fB\-rpcthreads=\fR -.IP -Set the number of threads to service RPC calls (default: 4) -.HP -\fB\-rpcuser=\fR -.IP -Username for JSON\-RPC connections -.HP -\fB\-server\fR -.IP -Accept command line and JSON\-RPC commands -.PP -UI Options: -.HP -\fB\-choosedatadir\fR -.IP -Choose data directory on startup (default: 0) -.HP -\fB\-lang=\fR -.IP -Set language, for example "de_DE" (default: system locale) -.HP -\fB\-min\fR -.IP -Start minimized -.HP -\fB\-resetguisettings\fR -.IP -Reset all settings changed in the GUI -.HP -\fB\-rootcertificates=\fR -.IP -Set SSL root certificates for payment request (default: \fB\-system\-\fR) -.HP -\fB\-splash\fR -.IP -Show splash screen on startup (default: 1) -.SH COPYRIGHT -Copyright (C) 2009-2019 The Bitcoin Core developers +BGL-qt \- manual page for BGL-qt -Please contribute if you find BGL Core useful. Visit - for further information about the software. -The source code is available from . - -This is experimental software. -Distributed under the MIT software license, see the accompanying file COPYING -or +This is a placefolder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release. diff --git a/doc/man/BGL-tx.1 b/doc/man/BGL-tx.1 index 817d9ce7ea..4dd5b062e0 100644 --- a/doc/man/BGL-tx.1 +++ b/doc/man/BGL-tx.1 @@ -1,116 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. -.TH BGL-TX "1" "February 2019" "BGL-tx v0.17.99.0" "User Commands" +.TH BGL-TX "1" .SH NAME -BGL-tx \- manual page for BGL-tx v0.17.99.0 -.SH SYNOPSIS -.B BGL-tx -[\fI\,options\/\fR] \fI\, \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded BGL transaction\/\fR -.br -.B BGL-tx -[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded BGL transaction\/\fR -.SH DESCRIPTION -BGL Core BGL\-tx utility version v0.17.99.0 -.SH OPTIONS -.HP -\-? -.IP -Print this help message and exit -.HP -\fB\-create\fR -.IP -Create new, empty TX. -.HP -\fB\-json\fR -.IP -Select JSON output -.HP -\fB\-txid\fR -.IP -Output only the hex\-encoded transaction id of the resultant transaction. -.PP -Chain selection options: -.HP -\fB\-testnet\fR -.IP -Use the test chain -.PP -Commands: -.IP -delin=N -.IP -Delete input N from TX -.IP -delout=N -.IP -Delete output N from TX -.IP -in=TXID:VOUT(:SEQUENCE_NUMBER) -.IP -Add input to TX -.IP -locktime=N -.IP -Set TX lock time to N -.IP -nversion=N -.IP -Set TX version to N -.IP -outaddr=VALUE:ADDRESS -.IP -Add address\-based output to TX -.IP -outdata=[VALUE:]DATA -.IP -Add data\-based output to TX -.IP -outmultisig=VALUE:REQUIRED:PUBKEYS:PUBKEY1:PUBKEY2:....[:FLAGS] -.IP -Add Pay To n\-of\-m Multi\-sig output to TX. n = REQUIRED, m = PUBKEYS. -Optionally add the "W" flag to produce a -pay\-to\-witness\-script\-hash output. Optionally add the "S" flag to -wrap the output in a pay\-to\-script\-hash. -.IP -outpubkey=VALUE:PUBKEY[:FLAGS] -.IP -Add pay\-to\-pubkey output to TX. Optionally add the "W" flag to produce a -pay\-to\-witness\-pubkey\-hash output. Optionally add the "S" flag to -wrap the output in a pay\-to\-script\-hash. -.IP -outscript=VALUE:SCRIPT[:FLAGS] -.IP -Add raw script output to TX. Optionally add the "W" flag to produce a -pay\-to\-witness\-script\-hash output. Optionally add the "S" flag to -wrap the output in a pay\-to\-script\-hash. -.IP -replaceable(=N) -.IP -Set RBF opt\-in sequence number for input N (if not provided, opt\-in all -available inputs) -.IP -sign=SIGHASH\-FLAGS -.IP -Add zero or more signatures to transaction. This command requires JSON -registers:prevtxs=JSON object, privatekeys=JSON object. See -signrawtransactionwithkey docs for format of sighash flags, JSON -objects. -.PP -Register Commands: -.IP -load=NAME:FILENAME -.IP -Load JSON file FILENAME into register NAME -.IP -set=NAME:JSON\-STRING -.IP -Set register NAME to given JSON\-STRING -.SH COPYRIGHT -Copyright (C) 2009-2019 The Bitcoin Core developers +BGL-tx \- manual page for BGL-tx -Please contribute if you find BGL Core useful. Visit - for further information about the software. -The source code is available from . - -This is experimental software. -Distributed under the MIT software license, see the accompanying file COPYING -or +This is a placefolder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release. diff --git a/doc/man/BGL-wallet.1 b/doc/man/BGL-wallet.1 index a14a4e04f7..69133b33f7 100644 --- a/doc/man/BGL-wallet.1 +++ b/doc/man/BGL-wallet.1 @@ -1,63 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. -.TH BGL-WALLET "1" "February 2019" "BGL-wallet v0.17.99.0" "User Commands" +.TH BITCOIN-WALLET "1" .SH NAME -BGL-wallet \- manual page for BGL-wallet v0.17.99.0 -.SH DESCRIPTION -BGL Core BGL\-wallet version v0.17.99.0 -.PP -wallet\-tool is an offline tool for creating and interacting with BGL Core wallet files. -By default wallet\-tool will act on wallets in the default mainnet wallet directory in the datadir. -To change the target wallet, use the \fB\-datadir\fR, \fB\-wallet\fR and \fB\-testnet\fR/\-regtest arguments. -.SS "Usage:" -.IP -BGL\-wallet [options] -.SH OPTIONS -.HP -\-? -.IP -Print this help message and exit -.HP -\fB\-datadir=\fR -.IP -Specify data directory -.HP -\fB\-wallet=\fR -.IP -Specify wallet name -.PP -Debugging/Testing options: -.HP -\fB\-debug=\fR -.IP -Output debugging information (default: 0). -.HP -\fB\-printtoconsole\fR -.IP -Send trace/debug info to console (default: 1 when no \fB\-debug\fR is true, 0 -otherwise. -.PP -Chain selection options: -.HP -\fB\-testnet\fR -.IP -Use the test chain -.PP -Commands: -.IP -create -.IP -Create new wallet file -.IP -info -.IP -Get wallet info -.SH COPYRIGHT -Copyright (C) 2009-2019 The Bitcoin Core developers +bitcoin-wallet \- manual page for bitcoin-wallet -Please contribute if you find BGL Core useful. Visit - for further information about the software. -The source code is available from . - -This is experimental software. -Distributed under the MIT software license, see the accompanying file COPYING -or +This is a placefolder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release. diff --git a/doc/man/BGLd.1 b/doc/man/BGLd.1 index fe3619a594..8bd5714a2f 100644 --- a/doc/man/BGLd.1 +++ b/doc/man/BGLd.1 @@ -1,583 +1,6 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. -.TH BGLD "1" "February 2019" "BGLd v0.17.99.0" "User Commands" -.SH NAME -BGLd \- manual page for BGLd v0.17.99.0 -.SH SYNOPSIS -.B BGLd -[\fI\,options\/\fR] \fI\,Start BGL Core Daemon\/\fR -.SH DESCRIPTION -BGL Core Daemon version v0.17.99.0 -.SH OPTIONS -.HP -\-? -.IP -Print this help message and exit -.HP -\fB\-alertnotify=\fR -.IP -Execute command when a relevant alert is received or we see a really -long fork (%s in cmd is replaced by message) -.HP -\fB\-assumevalid=\fR -.IP -If this block is in the chain assume that it and its ancestors are valid -and potentially skip their script verification (0 to verify all, -default: -0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8, -testnet: -0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75) -.HP -\fB\-blocknotify=\fR -.IP -Execute command when the best block changes (%s in cmd is replaced by -block hash) -.HP -\fB\-blockreconstructionextratxn=\fR -.IP -Extra transactions to keep in memory for compact block reconstructions -(default: 100) -.HP -\fB\-blocksdir=\fR -.IP -Specify blocks directory (default: /blocks) -.HP -\fB\-conf=\fR -.IP -Specify configuration file. Relative paths will be prefixed by datadir -location. (default: BGL.conf) -.HP -\fB\-daemon\fR -.IP -Run in the background as a daemon and accept commands -.HP -\fB\-datadir=\fR -.IP -Specify data directory -.HP -\fB\-dbcache=\fR -.IP -Set database cache size in MiB (4 to 16384, default: 450) -.HP -\fB\-debuglogfile=\fR -.IP -Specify location of debug log file. Relative paths will be prefixed by a -net\-specific datadir location. (\fB\-nodebuglogfile\fR to disable; -default: debug.log) -.HP -\fB\-includeconf=\fR -.IP -Specify additional configuration file, relative to the \fB\-datadir\fR path -(only useable from configuration file, not command line) -.HP -\fB\-loadblock=\fR -.IP -Imports blocks from external blk000??.dat file on startup -.HP -\fB\-maxmempool=\fR -.IP -Keep the transaction memory pool below megabytes (default: 300) -.HP -\fB\-maxorphantx=\fR -.IP -Keep at most unconnectable transactions in memory (default: 100) -.HP -\fB\-mempoolexpiry=\fR -.IP -Do not keep transactions in the mempool longer than hours (default: -336) -.HP -\fB\-par=\fR -.IP -Set the number of script verification threads (\fB\-8\fR to 16, 0 = auto, <0 = -leave that many cores free, default: 0) -.HP -\fB\-persistmempool\fR -.IP -Whether to save the mempool on shutdown and load on restart (default: 1) -.HP -\fB\-pid=\fR -.IP -Specify pid file. Relative paths will be prefixed by a net\-specific -datadir location. (default: BGLd.pid) -.HP -\fB\-prune=\fR -.IP -Reduce storage requirements by enabling pruning (deleting) of old -blocks. This allows the pruneblockchain RPC to be called to -delete specific blocks, and enables automatic pruning of old -blocks if a target size in MiB is provided. This mode is -incompatible with \fB\-txindex\fR and \fB\-rescan\fR. Warning: Reverting this -setting requires re\-downloading the entire blockchain. (default: -0 = disable pruning blocks, 1 = allow manual pruning via RPC, ->=550 = automatically prune block files to stay under the -specified target size in MiB) -.HP -\fB\-reindex\fR -.IP -Rebuild chain state and block index from the blk*.dat files on disk -.HP -\fB\-reindex\-chainstate\fR -.IP -Rebuild chain state from the currently indexed blocks. When in pruning -mode or if blocks on disk might be corrupted, use full \fB\-reindex\fR -instead. -.HP -\fB\-sysperms\fR -.IP -Create new files with system default permissions, instead of umask 077 -(only effective with disabled wallet functionality) -.HP -\fB\-txindex\fR -.IP -Maintain a full transaction index, used by the getrawtransaction rpc -call (default: 0) -.HP -\fB\-version\fR -.IP -Print version and exit -.PP -Connection options: -.HP -\fB\-addnode=\fR -.IP -Add a node to connect to and attempt to keep the connection open (see -the `addnode` RPC command help for more info). This option can be -specified multiple times to add multiple nodes. -.HP -\fB\-banscore=\fR -.IP -Threshold for disconnecting misbehaving peers (default: 100) -.HP -\fB\-bantime=\fR -.IP -Number of seconds to keep misbehaving peers from reconnecting (default: -86400) -.HP -\fB\-bind=\fR -.IP -Bind to given address and always listen on it. Use [host]:port notation -for IPv6 -.HP -\fB\-connect=\fR -.IP -Connect only to the specified node; \fB\-noconnect\fR disables automatic -connections (the rules for this peer are the same as for -\fB\-addnode\fR). This option can be specified multiple times to connect -to multiple nodes. -.HP -\fB\-discover\fR -.IP -Discover own IP addresses (default: 1 when listening and no \fB\-externalip\fR -or \fB\-proxy\fR) -.HP -\fB\-dns\fR -.IP -Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR (default: 1) -.HP -\fB\-dnsseed\fR -.IP -Query for peer addresses via DNS lookup, if low on addresses (default: 1 -unless \fB\-connect\fR used) -.HP -\fB\-externalip=\fR -.IP -Specify your own public address -.HP -\fB\-forcednsseed\fR -.IP -Always query for peer addresses via DNS lookup (default: 0) -.HP -\fB\-listen\fR -.IP -Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\fR) -.HP -\fB\-listenonion\fR -.IP -Automatically create Tor hidden service (default: 1) -.HP -\fB\-maxconnections=\fR -.IP -Maintain at most connections to peers (default: 125) -.HP -\fB\-maxreceivebuffer=\fR -.IP -Maximum per\-connection receive buffer, *1000 bytes (default: 5000) -.HP -\fB\-maxsendbuffer=\fR -.IP -Maximum per\-connection send buffer, *1000 bytes (default: 1000) -.HP -\fB\-maxtimeadjustment\fR -.IP -Maximum allowed median peer time offset adjustment. Local perspective of -time may be influenced by peers forward or backward by this -amount. (default: 4200 seconds) -.HP -\fB\-maxuploadtarget=\fR -.IP -Tries to keep outbound traffic under the given target (in MiB per 24h), -0 = no limit (default: 0) -.HP -\fB\-onion=\fR -.IP -Use separate SOCKS5 proxy to reach peers via Tor hidden services, set -\fB\-noonion\fR to disable (default: \fB\-proxy\fR) -.HP -\fB\-onlynet=\fR -.IP -Make outgoing connections only through network (ipv4, ipv6 or -onion). Incoming connections are not affected by this option. -This option can be specified multiple times to allow multiple -networks. -.HP -\fB\-peerbloomfilters\fR -.IP -Support filtering of blocks and transaction with bloom filters (default: -1) -.HP -\fB\-permitbaremultisig\fR -.IP -Relay non\-P2SH multisig (default: 1) -.HP -\fB\-port=\fR -.IP -Listen for connections on (default: 8333, testnet: 18333, -regtest: 18444) -.HP -\fB\-proxy=\fR -.IP -Connect through SOCKS5 proxy, set \fB\-noproxy\fR to disable (default: -disabled) -.HP -\fB\-proxyrandomize\fR -.IP -Randomize credentials for every proxy connection. This enables Tor -stream isolation (default: 1) -.HP -\fB\-seednode=\fR -.IP -Connect to a node to retrieve peer addresses, and disconnect. This -option can be specified multiple times to connect to multiple -nodes. -.HP -\fB\-timeout=\fR -.IP -Specify connection timeout in milliseconds (minimum: 1, default: 5000) -.HP -\fB\-torcontrol=\fR: -.IP -Tor control port to use if onion listening enabled (default: -127.0.0.1:9051) -.HP -\fB\-torpassword=\fR -.IP -Tor control port password (default: empty) -.HP -\fB\-upnp\fR -.IP -Use UPnP to map the listening port (default: 0) -.HP -\fB\-whitebind=\fR -.IP -Bind to given address and whitelist peers connecting to it. Use -[host]:port notation for IPv6 -.HP -\fB\-whitelist=\fR -.IP -Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or -CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple -times. Whitelisted peers cannot be DoS banned and their -transactions are always relayed, even if they are already in the -mempool, useful e.g. for a gateway -.PP -Wallet options: -.HP -\fB\-addresstype\fR -.IP -What type of addresses to use ("legacy", "p2sh\-segwit", or "bech32", -default: "p2sh\-segwit") -.HP -\fB\-avoidpartialspends\fR -.IP -Group outputs by address, selecting all or none, instead of selecting on -a per\-output basis. Privacy is improved as an address is only -used once (unless someone sends to it after spending from it), -but may result in slightly higher fees as suboptimal coin -selection may result due to the added limitation (default: 0) -.HP -\fB\-changetype\fR -.IP -What type of change to use ("legacy", "p2sh\-segwit", or "bech32"). -Default is same as \fB\-addresstype\fR, except when -\fB\-addresstype\fR=\fI\,p2sh\-segwit\/\fR a native segwit output is used when -sending to a native segwit address) -.HP -\fB\-disablewallet\fR -.IP -Do not load the wallet and disable wallet RPC calls -.HP -\fB\-discardfee=\fR -.IP -The fee rate (in BTC/kB) that indicates your tolerance for discarding -change by adding it to the fee (default: 0.0001). Note: An output -is discarded if it is dust at this rate, but we will always -discard up to the dust relay fee and a discard fee above that is -limited by the fee estimate for the longest target -.HP -\fB\-fallbackfee=\fR -.IP -A fee rate (in BTC/kB) that will be used when fee estimation has -insufficient data (default: 0.0002) -.HP -\fB\-keypool=\fR -.IP -Set key pool size to (default: 1000) -.HP -\fB\-mintxfee=\fR -.IP -Fees (in BTC/kB) smaller than this are considered zero fee for -transaction creation (default: 0.00001) -.HP -\fB\-paytxfee=\fR -.IP -Fee (in BTC/kB) to add to transactions you send (default: 0.00) -.HP -\fB\-rescan\fR -.IP -Rescan the block chain for missing wallet transactions on startup -.HP -\fB\-salvagewallet\fR -.IP -Attempt to recover private keys from a corrupt wallet on startup -.HP -\fB\-spendzeroconfchange\fR -.IP -Spend unconfirmed change when sending transactions (default: 1) -.HP -\fB\-txconfirmtarget=\fR -.IP -If paytxfee is not set, include enough fee so transactions begin -confirmation on average within n blocks (default: 6) -.HP -\fB\-upgradewallet\fR -.IP -Upgrade wallet to latest format on startup -.HP -\fB\-wallet=\fR -.IP -Specify wallet database path. Can be specified multiple times to load -multiple wallets. Path is interpreted relative to if -it is not absolute, and will be created if it does not exist (as -a directory containing a wallet.dat file and log files). For -backwards compatibility this will also accept names of existing -data files in .) -.HP -\fB\-walletbroadcast\fR -.IP -Make the wallet broadcast transactions (default: 1) -.HP -\fB\-walletdir=\fR -.IP -Specify directory to hold wallets (default: /wallets if it -exists, otherwise ) -.HP -\fB\-walletnotify=\fR -.IP -Execute command when a wallet transaction changes (%s in cmd is replaced -by TxID) -.HP -\fB\-walletrbf\fR -.IP -Send transactions with full\-RBF opt\-in enabled (RPC only, default: 0) -.HP -\fB\-zapwallettxes=\fR -.IP -Delete all wallet transactions and only recover those parts of the -blockchain through \fB\-rescan\fR on startup (1 = keep tx meta data e.g. -payment request information, 2 = drop tx meta data) -.PP -ZeroMQ notification options: -.HP -\fB\-zmqpubhashblock=\fR
-.IP -Enable publish hash block in
-.HP -\fB\-zmqpubhashtx=\fR
-.IP -Enable publish hash transaction in
-.HP -\fB\-zmqpubrawblock=\fR
-.IP -Enable publish raw block in
-.HP -\fB\-zmqpubrawtx=\fR
-.IP -Enable publish raw transaction in
-.PP -Debugging/Testing options: -.HP -\fB\-debug=\fR -.IP -Output debugging information (default: \fB\-nodebug\fR, supplying is -optional). If is not supplied or if = 1, -output all debugging information. can be: net, tor, -mempool, http, bench, zmq, db, rpc, estimatefee, addrman, -selectcoins, reindex, cmpctblock, rand, prune, proxy, mempoolrej, -libevent, coindb, qt, leveldb. -.HP -\fB\-debugexclude=\fR -.IP -Exclude debugging information for a category. Can be used in conjunction -with \fB\-debug\fR=\fI\,1\/\fR to output debug logs for all categories except one -or more specified categories. -.HP -\fB\-help\-debug\fR -.IP -Print help message with debugging options and exit -.HP -\fB\-logips\fR -.IP -Include IP addresses in debug output (default: 0) -.HP -\fB\-logtimestamps\fR -.IP -Prepend debug output with timestamp (default: 1) -.HP -\fB\-maxtxfee=\fR -.IP -Maximum total fees (in BTC) to use in a single wallet transaction or raw -transaction; setting this too low may abort large transactions -(default: 0.10) -.HP -\fB\-printtoconsole\fR -.IP -Send trace/debug info to console (default: 1 when no \fB\-daemon\fR. To disable -logging to file, set \fB\-nodebuglogfile\fR) -.HP -\fB\-shrinkdebugfile\fR -.IP -Shrink debug.log file on client startup (default: 1 when no \fB\-debug\fR) -.HP -\fB\-uacomment=\fR -.IP -Append comment to the user agent string -.PP -Chain selection options: -.HP -\fB\-testnet\fR -.IP -Use the test chain -.PP -Node relay options: -.HP -\fB\-bytespersigop\fR -.IP -Equivalent bytes per sigop in transactions for relay and mining -(default: 20) -.HP -\fB\-datacarrier\fR -.IP -Relay and mine data carrier transactions (default: 1) -.HP -\fB\-datacarriersize\fR -.IP -Maximum size of data in data carrier transactions we relay and mine -(default: 83) -.HP -\fB\-minrelaytxfee=\fR -.IP -Fees (in BTC/kB) smaller than this are considered zero fee for relaying, -mining and transaction creation (default: 0.00001) -.HP -\fB\-whitelistforcerelay\fR -.IP -Force relay of transactions from whitelisted peers even if they violate -local relay policy (default: 0) -.HP -\fB\-whitelistrelay\fR -.IP -Accept relayed transactions received from whitelisted peers even when -not relaying transactions (default: 1) -.PP -Block creation options: -.HP -\fB\-blockmaxweight=\fR -.IP -Set maximum BIP141 block weight (default: 3996000) -.HP -\fB\-blockmintxfee=\fR -.IP -Set lowest fee rate (in BTC/kB) for transactions to be included in block -creation. (default: 0.00001) -.PP -RPC server options: -.HP -\fB\-rest\fR -.IP -Accept public REST requests (default: 0) -.HP -\fB\-rpcallowip=\fR -.IP -Allow JSON\-RPC connections from specified source. Valid for are a -single IP (e.g. 1.2.3.4), a network/netmask (e.g. -1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This -option can be specified multiple times -.HP -\fB\-rpcauth=\fR -.IP -Username and HMAC\-SHA\-256 hashed password for JSON\-RPC connections. The -field comes in the format: :$. A -canonical python script is included in share/rpcauth. The client -then connects normally using the -rpcuser=/rpcpassword= pair of arguments. This -option can be specified multiple times -.HP -\fB\-rpcbind=\fR[:port] -.IP -Bind to given address to listen for JSON\-RPC connections. Do not expose -the RPC server to untrusted networks such as the public internet! -This option is ignored unless \fB\-rpcallowip\fR is also passed. Port is -optional and overrides \fB\-rpcport\fR. Use [host]:port notation for -IPv6. This option can be specified multiple times (default: -127.0.0.1 and ::1 i.e., localhost) -.HP -\fB\-rpccookiefile=\fR -.IP -Location of the auth cookie. Relative paths will be prefixed by a -net\-specific datadir location. (default: data dir) -.HP -\fB\-rpcpassword=\fR -.IP -Password for JSON\-RPC connections -.HP -\fB\-rpcport=\fR -.IP -Listen for JSON\-RPC connections on (default: 8332, testnet: -18332, regtest: 18443) -.HP -\fB\-rpcserialversion\fR -.IP -Sets the serialization of raw transaction or block hex returned in -non\-verbose mode, non\-segwit(0) or segwit(1) (default: 1) -.HP -\fB\-rpcthreads=\fR -.IP -Set the number of threads to service RPC calls (default: 4) -.HP -\fB\-rpcuser=\fR -.IP -Username for JSON\-RPC connections -.HP -\fB\-server\fR -.IP -Accept command line and JSON\-RPC commands -.SH COPYRIGHT -Copyright (C) 2009-2019 The Bitcoin Core developers -Please contribute if you find BGL Core useful. Visit - for further information about the software. -The source code is available from . +.TH BGLD "1" +.SH NAME +BGLd \- manual page for BGLd -This is experimental software. -Distributed under the MIT software license, see the accompanying file COPYING -or +This is a placefolder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release. diff --git a/doc/multiprocess.md b/doc/multiprocess.md new file mode 100644 index 0000000000..471d8561f7 --- /dev/null +++ b/doc/multiprocess.md @@ -0,0 +1,35 @@ +# Multiprocess Bitcoin + +On unix systems, the `--enable-multiprocess` build option can be passed to `./configure` to build new `bitcoin-node`, `bitcoin-wallet`, and `bitcoin-gui` executables alongside existing `bitcoind` and `bitcoin-qt` executables. + +`bitcoin-node` is a drop-in replacement for `bitcoind`, and `bitcoin-gui` is a drop-in replacement for `bitcoin-qt`, and there are no differences in use or external behavior between the new and old executables. But internally (after [#10102](https://github.com/bitcoin/bitcoin/pull/10102)), `bitcoin-gui` will spawn a `bitcoin-node` process to run P2P and RPC code, communicating with it across a socket pair, and `bitcoin-node` will spawn `bitcoin-wallet` to run wallet code, also communicating over a socket pair. This will let node, wallet, and GUI code run in separate address spaces for better isolation, and allow future improvements like being able to start and stop components independently on different machines and environments. + +## Next steps + +Specific next steps after [#10102](https://github.com/bitcoin/bitcoin/pull/10102) will be: + +- [ ] Adding `-ipcbind` and `-ipcconnect` options to `bitcoin-node`, `bitcoin-wallet`, and `bitcoin-gui` executables so they can listen and connect to TCP ports and unix socket paths. This will allow separate processes to be started and stopped any time and connect to each other. +- [ ] Adding `-server` and `-rpcbind` options to the `bitcoin-wallet` executable so wallet processes can handle RPC requests directly without going through the node. +- [ ] Supporting windows, not just unix systems. The existing socket code is already cross-platform, so the only windows-specific code that needs to be written is code spawning a process and passing a socket descriptor. This can be implemented with `CreateProcess` and `WSADuplicateSocket`. Example: https://memset.wordpress.com/2010/10/13/win32-api-passing-socket-with-ipc-method/. +- [ ] Adding sandbox features, restricting subprocess access to resources and data. See [https://eklitzke.org/multiprocess-bitcoin](https://eklitzke.org/multiprocess-bitcoin). + +## Debugging + +After [#10102](https://github.com/bitcoin/bitcoin/pull/10102), the `-debug=ipc` command line option can be used to see requests and responses between processes. + +## Installation + +The multiprocess feature requires [Cap'n Proto](https://capnproto.org/) and [libmultiprocess](https://github.com/chaincodelabs/libmultiprocess) as dependencies. A simple way to get starting using it without installing these dependencies manually is to use the [depends system](../depends) with the `MULTIPROCESS=1` [dependency option](../depends#dependency-options) passed to make: + +``` +cd +make -C depends NO_QT=1 MULTIPROCESS=1 +./configure --prefix=$PWD/depends/x86_64-pc-linux-gnu +make +src/bitcoin-node -regtest -printtoconsole -debug=ipc +BITCOIND=bitcoin-node test/functional/test_runner.py +``` + +The configure script will pick up settings and library locations from the depends directory, so there is no need to pass `--enable-multiprocess` as a separate flag when using the depends system (it's controlled by the `MULTIPROCESS=1` option). + +Alternately, you can install [Cap'n Proto](https://capnproto.org/) and [libmultiprocess](https://github.com/chaincodelabs/libmultiprocess) packages on your system, and just run `./configure --enable-multiprocess` without using the depends system. The configure script will be able to locate the installed packages via [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/). See [Installation](https://github.com/chaincodelabs/libmultiprocess#installation) section of the libmultiprocess readme for install steps. See [build-unix.md](build-unix.md) and [build-osx.md](build-osx.md) for information about installing dependencies in general. diff --git a/doc/productivity.md b/doc/productivity.md index efed121e51..fe6fe56617 100644 --- a/doc/productivity.md +++ b/doc/productivity.md @@ -12,7 +12,7 @@ Table of Contents * [Multiple working directories with `git worktrees`](#multiple-working-directories-with-git-worktrees) * [Interactive "dummy rebases" for fixups and execs with `git merge-base`](#interactive-dummy-rebases-for-fixups-and-execs-with-git-merge-base) * [Writing code](#writing-code) - * [Format C/C++/Protobuf diffs with `clang-format-diff.py`](#format-ccprotobuf-diffs-with-clang-format-diffpy) + * [Format C/C++ diffs with `clang-format-diff.py`](#format-cc-diffs-with-clang-format-diffpy) * [Format Python diffs with `yapf-diff.py`](#format-python-diffs-with-yapf-diffpy) * [Rebasing/Merging code](#rebasingmerging-code) * [More conflict context with `merge.conflictstyle diff3`](#more-conflict-context-with-mergeconflictstyle-diff3) @@ -118,13 +118,13 @@ You can also set up [upstream refspecs](#reference-prs-easily-with-refspecs) to Writing code ------------ -### Format C/C++/Protobuf diffs with `clang-format-diff.py` +### Format C/C++ diffs with `clang-format-diff.py` See [contrib/devtools/README.md](/contrib/devtools/README.md#clang-format-diff.py). ### Format Python diffs with `yapf-diff.py` -Usage is exactly the same as [`clang-format-diff.py`](#format-ccprotobuf-diffs-with-clang-format-diffpy). You can get it [here](https://github.com/MarcoFalke/yapf-diff). +Usage is exactly the same as [`clang-format-diff.py`](#format-cc-diffs-with-clang-format-diffpy). You can get it [here](https://github.com/MarcoFalke/yapf-diff). Rebasing/Merging code ------------- @@ -172,11 +172,11 @@ When looking at other's pull requests, it may make sense to add the following se ``` [remote "upstream-pull"] - fetch = +refs/pull/*:refs/remotes/upstream-pull/* - url = git@github.com:BGL/BGL.git + fetch = +refs/pull/*/head:refs/remotes/upstream-pull/* + url = git@github.com:wu-emma/BGL.git ``` -This will add an `upstream-pull` remote to your git repository, which can be fetched using `git fetch --all` or `git fetch upstream-pull`. Afterwards, you can use `upstream-pull/NUMBER/head` in arguments to `git show`, `git checkout` and anywhere a commit id would be acceptable to see the changes from pull request NUMBER. +This will add an `upstream-pull` remote to your git repository, which can be fetched using `git fetch --all` or `git fetch upstream-pull`. It will download and store on disk quite a lot of data (all PRs, including merged and closed ones). Afterwards, you can use `upstream-pull/NUMBER/head` in arguments to `git show`, `git checkout` and anywhere a commit id would be acceptable to see the changes from pull request NUMBER. ### Diff the diffs with `git range-diff` diff --git a/doc/rapidcheck.md b/doc/rapidcheck.md deleted file mode 100644 index 49b10c3d18..0000000000 --- a/doc/rapidcheck.md +++ /dev/null @@ -1,84 +0,0 @@ -# RapidCheck property-based testing for BGL Core - -## Concept - -Property-based testing is experimentally being added to BGL Core with -[RapidCheck](https://github.com/emil-e/rapidcheck), a C++ framework for -property-based testing inspired by the Haskell library -[QuickCheck](https://hackage.haskell.org/package/QuickCheck). - -RapidCheck performs random testing of program properties. A specification of the -program is given in the form of properties which functions should satisfy, and -RapidCheck tests that the properties hold in a large number of randomly -generated cases. - -If an exception is found, RapidCheck tries to find the smallest case, for some -definition of smallest, for which the property is still false and displays it as -a counter-example. For example, if the input is an integer, RapidCheck tries to -find the smallest integer for which the property is false. - -## Running - -If RapidCheck is installed, BGL Core will automatically run the -property-based tests with the unit tests during `make check`, unless the -`--without-rapidcheck` flag is passed when configuring. - -For more information, run `./configure --help` and see `--with-rapidcheck` under -Optional Packages. - -## Setup - -The following instructions have been tested with Linux Debian and macOS. - -1. Clone the RapidCheck source code and cd into the repository. - - ```shell - git clone https://github.com/emil-e/rapidcheck.git - cd rapidcheck - ``` - -2. Build RapidCheck (requires CMake to be installed). - - ```shell - cmake -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true -DRC_ENABLE_BOOST_TEST=ON $(pwd) - make && make install - ``` - -3. Configure BGL Core with RapidCheck. - - `cd` to the directory of your local BGL repository and run - `./configure`. In the output you should see: - - ```shell - checking rapidcheck.h usability... yes - checking rapidcheck.h presence... yes - checking for rapidcheck.h... yes - [...] - Options used to compile and link: - [...] - with test = yes - with prop = yes - ``` - -4. Build BGL Core with RapidCheck. - - Now you can run `make` and should see the property-based tests compiled with - the unit tests: - - ```shell - Making all in src - [...] - CXX test/gen/test_BGL-crypto_gen.o - CXX test/test_BGL-key_properties.o - ``` - -5. Run the unit tests with `make check`. The property-based tests will be run - with the unit tests. - - ```shell - Running tests: crypto_tests from test/crypto_tests.cpp - [...] - Running tests: key_properties from test/key_properties.cpp - ``` - -That's it! You are now running property-based tests in BGL Core. diff --git a/doc/reduce-memory.md b/doc/reduce-memory.md index de49441e7f..0348953444 100644 --- a/doc/reduce-memory.md +++ b/doc/reduce-memory.md @@ -24,8 +24,9 @@ The size of some in-memory caches can be reduced. As caches trade off memory usa ## Number of peers -- `-maxconnections=` - the maximum number of connections, this defaults to `125`. Each active connection takes up some memory. Only significant if incoming - connections are enabled, otherwise the number of connections will never be more than `8`. +- `-maxconnections=` - the maximum number of connections, this defaults to 125. Each active connection takes up some + memory. This option applies only if incoming connections are enabled, otherwise the number of connections will never + be more than 10. Of the 10 outbound peers, there can be 8 full-relay connections and 2 block-relay-only ones. ## Thread configuration diff --git a/doc/reduce-traffic.md b/doc/reduce-traffic.md index d6ecc3d9ee..53abb949da 100644 --- a/doc/reduce-traffic.md +++ b/doc/reduce-traffic.md @@ -3,8 +3,10 @@ Reduce Traffic Some node operators need to deal with bandwidth caps imposed by their ISPs. -By default, BGL Core allows up to 125 connections to different peers, 8 of -which are outbound. You can therefore, have at most 117 inbound connections. +By default, BGL Core allows up to 125 connections to different peers, 10 of +which are outbound. You can therefore, have at most 115 inbound connections. +Of the 10 outbound peers, there can be 8 full-relay connections and 2 +block-relay-only ones. The default settings can result in relatively significant traffic consumption. @@ -21,12 +23,12 @@ longer serving historic blocks (blocks older than one week). Keep in mind that new nodes require other nodes that are willing to serve historic blocks. -Whitelisted peers will never be disconnected, although their traffic counts for +Peers with the `download` permission will never be disconnected, although their traffic counts for calculating the target. ## 2. Disable "listening" (`-listen=0`) -Disabling listening will result in fewer nodes connected (remember the maximum of 8 +Disabling listening will result in fewer nodes connected (remember the maximum of 10 outbound peers). Fewer nodes will result in less traffic usage as you are relaying blocks and transactions to fewer nodes. @@ -44,7 +46,11 @@ with other peers, you can disable transaction relay. Be reminded of the effects of this setting. - Fee estimation will no longer work. -- Not relaying other's transactions could hurt your privacy if used while a - wallet is loaded or if you use the node to broadcast transactions. +- It sets the flag "-walletbroadcast" to be "0", only if it is currently unset. + Doing so disables the automatic broadcasting of transactions from wallet. Not + relaying other's transactions could hurt your privacy if used while a wallet + is loaded or if you use the node to broadcast transactions. +- If a peer has the forcerelay permission, we will still receive and relay + their transactions. - It makes block propagation slower because compact block relay can only be used when transaction relay is enabled. diff --git a/doc/release-notes-15954.md b/doc/release-notes-15954.md deleted file mode 100644 index f4d2c5688c..0000000000 --- a/doc/release-notes-15954.md +++ /dev/null @@ -1,4 +0,0 @@ -Configuration option changes ------------------------------ - -Importing blocks upon startup via the `bootstrap.dat` file no longer occurs by default. The file must now be specified with `-loadblock=`. diff --git a/doc/release-notes-17056.md b/doc/release-notes-17056.md deleted file mode 100644 index 23d5a8c8cd..0000000000 --- a/doc/release-notes-17056.md +++ /dev/null @@ -1,4 +0,0 @@ -Low-level RPC Changes -=== - -- A new descriptor type `sortedmulti(...)` has been added to support multisig scripts where the public keys are sorted lexicographically in the resulting script. diff --git a/doc/release-notes-17410.md b/doc/release-notes-17410.md deleted file mode 100644 index 08ed353889..0000000000 --- a/doc/release-notes-17410.md +++ /dev/null @@ -1,5 +0,0 @@ -Command-line options --------------------- - -- The `-debug=db` logging category has been renamed to `-debug=walletdb`, to distinguish it from `coindb`. - `-debug=db` has been deprecated and will be removed in the next major release. diff --git a/doc/release-notes-17437.md b/doc/release-notes-17437.md deleted file mode 100644 index 3edfd00a38..0000000000 --- a/doc/release-notes-17437.md +++ /dev/null @@ -1,5 +0,0 @@ -Low-level RPC Changes -=== - -- The RPC gettransaction, listtransactions and listsinceblock responses now also -includes the height of the block that contains the wallet transaction, if any. diff --git a/doc/release-notes.md b/doc/release-notes.md index fa3ed994de..330e7844ba 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,6 +1,7 @@ *After branching off for a major version release of BGL Core, use this template to create the initial release notes draft.* +https://github.com/wu-emma/BGL-devwiki/wiki/0.20.0-Release-Notes-Draft *The release notes draft is a temporary file that can be added to by anyone. See [/doc/developer-notes.md#release-notes](/doc/developer-notes.md#release-notes) for the process.* @@ -8,7 +9,6 @@ for the process.* *Create the draft, named* "*version* Release Notes Draft" *(e.g. "0.20.0 Release Notes Draft"), as a collaborative wiki in:* -https://github.com/BGL-core/BGL-devwiki/wiki/ *Before the final release, move the notes back to this git repository.* @@ -45,76 +45,62 @@ wallet versions of BGL Core are generally supported. Compatibility ============== -BGL Core is supported and extensively tested on operating systems using -the Linux kernel, macOS 10.12+, and Windows 7 and newer. It is not recommended -to use BGL Core on unsupported systems. +BGL Core is supported and extensively tested on operating systems +using the Linux kernel, macOS 10.14+, and Windows 7 and newer. BGL +Core should also work on most other Unix-like systems but is not as +frequently tested on them. It is not recommended to use BGL Core on +unsupported systems. -BGL Core should also work on most other Unix-like systems but is not -as frequently tested on them. -From BGL Core 0.20.0 onwards, macOS versions earlier than 10.12 are no +From BGL Core 0.22.0 onwards, macOS versions earlier than 10.14 are no longer supported. Additionally, BGL Core does not yet change appearance when macOS "dark mode" is activated. -In addition to previously supported CPU platforms, this release's pre-compiled -distribution provides binaries for the RISC-V platform. - Notable changes =============== -Build System ------------- +P2P and network changes +----------------------- -- OpenSSL is no longer used by BGL Core. The last usage of the library -was removed in #17265. +Updated RPCs +------------ -- glibc 2.17 or greater is now required to run the release binaries. This -retains compatibility with RHEL 7, CentOS 7, Debian 8 and Ubuntu 14.04 LTS. -Further details can be found in #17538. +Changes to Wallet or GUI related RPCs can be found in the GUI or Wallet section below. New RPCs -------- -New settings +Build System ------------ -- RPC Whitelist system. It can give certain RPC users permissions to only some RPC calls. -It can be set with two command line arguments (`rpcwhitelist` and `rpcwhitelistdefault`). (#12763) +New settings +------------ Updated settings ---------------- -Updated RPCs ------------- +Changes to Wallet or GUI related settings can be found in the GUI or Wallet section below. -Note: some low-level RPC changes mainly useful for testing are described in the -Low-level Changes section below. +- Passing an invalid `-rpcauth` argument now cause bitcoind to fail to start. (#20461) -GUI changes ------------ - -- The "Start BGL Core on system login" option has been removed on macOS. +Tools and Utilities +------------------- Wallet ------ -- The wallet now by default uses bech32 addresses when using RPC, and creates native segwit change outputs. -- The way that output trust was computed has been fixed in #16766, which impacts confirmed/unconfirmed balance status and coin selection. +GUI changes +----------- Low-level changes ================= +RPC +--- + Tests ----- -- It is now an error to use an unqualified `walletdir=path` setting in the config file if running on testnet or regtest - networks. The setting now needs to be qualified as `chain.walletdir=path` or placed in the appropriate `[chain]` - section. (#17447) - -- `-fallbackfee` was 0 (disabled) by default for the main chain, but 0.0002 by default for the test chains. Now it is 0 - by default for all chains. Testnet and regtest users will have to add `fallbackfee=0.0002` to their configuration if - they weren't setting it and they want it to keep working like before. (#16524) - Credits ======= diff --git a/doc/release-notes/release-notes-0.19.1.md b/doc/release-notes/release-notes-0.19.1.md new file mode 100644 index 0000000000..5746bebb0d --- /dev/null +++ b/doc/release-notes/release-notes-0.19.1.md @@ -0,0 +1,115 @@ +0.19.1 Release Notes +=============================== + +Bitcoin Core version 0.19.1 is now available from: + + + +This minor release includes various bug fixes and performance +improvements, as well as updated translations. + +Please report bugs using the issue tracker at GitHub: + + + +To receive security and update notifications, please subscribe to: + + + +How to Upgrade +============== + +If you are running an older version, shut it down. Wait until it has completely +shut down (which might take a few minutes for older versions), then run the +installer (on Windows) or just copy over `/Applications/Bitcoin-Qt` (on Mac) +or `bitcoind`/`bitcoin-qt` (on Linux). + +Upgrading directly from a version of Bitcoin Core that has reached its EOL is +possible, but it might take some time if the datadir needs to be migrated. Old +wallet versions of Bitcoin Core are generally supported. + +Compatibility +============== + +Bitcoin Core is supported and extensively tested on operating systems using +the Linux kernel, macOS 10.10+, and Windows 7 and newer. It is not recommended +to use Bitcoin Core on unsupported systems. + +Bitcoin Core should also work on most other Unix-like systems but is not +as frequently tested on them. + +From Bitcoin Core 0.17.0 onwards, macOS versions earlier than 10.10 are no +longer supported, as Bitcoin Core is now built using Qt 5.9.x which requires +macOS 10.10+. Additionally, Bitcoin Core does not yet change appearance when +macOS "dark mode" is activated. + +In addition to previously supported CPU platforms, this release's pre-compiled +distribution provides binaries for the RISC-V platform. + +0.19.1 change log +================= + +### Wallet +- #17643 Fix origfee return for bumpfee with feerate arg (instagibbs) +- #16963 Fix `unique_ptr` usage in boost::signals2 (promag) +- #17258 Fix issue with conflicted mempool tx in listsinceblock (adamjonas, mchrostowski) +- #17924 Bug: IsUsedDestination shouldn't use key id as script id for ScriptHash (instagibbs) +- #17621 IsUsedDestination should count any known single-key address (instagibbs) +- #17843 Reset reused transactions cache (fjahr) + +### RPC and other APIs +- #17687 cli: Fix fatal leveldb error when specifying -blockfilterindex=basic twice (brakmic) +- #17728 require second argument only for scantxoutset start action (achow101) +- #17445 zmq: Fix due to invalid argument and multiple notifiers (promag) +- #17524 psbt: handle unspendable psbts (achow101) +- #17156 psbt: check that various indexes and amounts are within bounds (achow101) + +### GUI +- #17427 Fix missing qRegisterMetaType for `size_t` (hebasto) +- #17695 disable File-\>CreateWallet during startup (fanquake) +- #17634 Fix comparison function signature (hebasto) +- #18062 Fix unintialized WalletView::progressDialog (promag) + +### Tests and QA +- #17416 Appveyor improvement - text file for vcpkg package list (sipsorcery) +- #17488 fix "bitcoind already running" warnings on macOS (fanquake) +- #17980 add missing #include to fix compiler errors (kallewoof) + +### Platform support +- #17736 Update msvc build for Visual Studio 2019 v16.4 (sipsorcery) +- #17364 Updates to appveyor config for VS2019 and Qt5.9.8 + msvc project fixes (sipsorcery) +- #17887 bug-fix macos: give free bytes to `F_PREALLOCATE` (kallewoof) + +### Miscellaneous +- #17897 init: Stop indexes on shutdown after ChainStateFlushed callback (jimpo) +- #17450 util: Add missing headers to util/fees.cpp (hebasto) +- #17654 Unbreak build with Boost 1.72.0 (jbeich) +- #17857 scripts: Fix symbol-check & security-check argument passing (fanquake) +- #17762 Log to net category for exceptions in ProcessMessages (laanwj) +- #18100 Update univalue subtree (MarcoFalke) + +Credits +======= + +Thanks to everyone who directly contributed to this release: + +- Aaron Clauson +- Adam Jonas +- Andrew Chow +- Fabian Jahr +- fanquake +- Gregory Sanders +- Harris +- Hennadii Stepanov +- Jan Beich +- Jim Posen +- João Barbosa +- Karl-Johan Alm +- Luke Dashjr +- MarcoFalke +- Michael Chrostowski +- Russell Yanofsky +- Wladimir J. van der Laan + +As well as to everyone that helped with translations on +[Transifex](https://www.transifex.com/bitcoin/bitcoin/). diff --git a/doc/release-notes/release-notes-0.20.0.md b/doc/release-notes/release-notes-0.20.0.md new file mode 100644 index 0000000000..6fc1606b37 --- /dev/null +++ b/doc/release-notes/release-notes-0.20.0.md @@ -0,0 +1,987 @@ +0.20.0 Release Notes +==================== + +Bitcoin Core version 0.20.0 is now available from: + + + +This release includes new features, various bug fixes and performance +improvements, as well as updated translations. + +Please report bugs using the issue tracker at GitHub: + + + +To receive security and update notifications, please subscribe to: + + + +How to Upgrade +============== + +If you are running an older version, shut it down. Wait until it has completely +shut down (which might take a few minutes in some cases), then run the +installer (on Windows) or just copy over `/Applications/Bitcoin-Qt` (on Mac) +or `bitcoind`/`bitcoin-qt` (on Linux). + +Upgrading directly from a version of Bitcoin Core that has reached its EOL is +possible, but it might take some time if the data directory needs to be migrated. Old +wallet versions of Bitcoin Core are generally supported. + +Compatibility +============== + +Bitcoin Core is supported and extensively tested on operating systems +using the Linux kernel, macOS 10.12+, and Windows 7 and newer. Bitcoin +Core should also work on most other Unix-like systems but is not as +frequently tested on them. It is not recommended to use Bitcoin Core on +unsupported systems. + +From Bitcoin Core 0.20.0 onwards, macOS versions earlier than 10.12 are no +longer supported. Additionally, Bitcoin Core does not yet change appearance +when macOS "dark mode" is activated. + +Known Bugs +========== + +The process for generating the source code release ("tarball") has changed in an +effort to make it more complete, however, there are a few regressions in +this release: + +- The generated `configure` script is currently missing, and you will need to + install autotools and run `./autogen.sh` before you can run + `./configure`. This is the same as when checking out from git. + +- Instead of running `make` simply, you should instead run + `BITCOIN_GENBUILD_NO_GIT=1 make`. + +Notable changes +=============== + +P2P and network changes +----------------------- + +#### Removal of BIP61 reject network messages from Bitcoin Core + +The `-enablebip61` command line option to enable BIP61 has been removed. +(#17004) + +This feature has been disabled by default since Bitcoin Core version 0.18.0. +Nodes on the network can not generally be trusted to send valid messages +(including reject messages), so this should only ever be used when +connected to a trusted node. Please use the alternatives recommended +below if you rely on this removed feature: + +- Testing or debugging of implementations of the Bitcoin P2P network protocol + should be done by inspecting the log messages that are produced by a recent + version of Bitcoin Core. Bitcoin Core logs debug messages + (`-debug=`) to a stream (`-printtoconsole`) or to a file + (`-debuglogfile=`). + +- Testing the validity of a block can be achieved by specific RPCs: + + - `submitblock` + + - `getblocktemplate` with `'mode'` set to `'proposal'` for blocks with + potentially invalid POW + +- Testing the validity of a transaction can be achieved by specific RPCs: + + - `sendrawtransaction` + + - `testmempoolaccept` + +- Wallets should not assume a transaction has propagated to the network + just because there are no reject messages. Instead, listen for the + transaction to be announced by other peers on the network. Wallets + should not assume a lack of reject messages means a transaction pays + an appropriate fee. Instead, set fees using fee estimation and use + replace-by-fee to increase a transaction's fee if it hasn't confirmed + within the desired amount of time. + +The removal of BIP61 reject message support also has the following minor RPC +and logging implications: + +- `testmempoolaccept` and `sendrawtransaction` no longer return the P2P reject + code when a transaction is not accepted to the mempool. They still return the + verbal reject reason. + +- Log messages that previously reported the reject code when a transaction was + not accepted to the mempool now no longer report the reject code. The reason + for rejection is still reported. + +Updated RPCs +------------ + +- The RPCs which accept descriptors now accept the new `sortedmulti(...)` descriptor + type which supports multisig scripts where the public keys are sorted + lexicographically in the resulting script. (#17056) + +- The `walletprocesspsbt` and `walletcreatefundedpsbt` RPCs now include + BIP32 derivation paths by default for public keys if we know them. + This can be disabled by setting the `bip32derivs` parameter to + `false`. (#17264) + +- The `bumpfee` RPC's parameter `totalFee`, which was deprecated in + 0.19, has been removed. (#18312) + +- The `bumpfee` RPC will return a PSBT when used with wallets that have + private keys disabled. (#16373) + +- The `getpeerinfo` RPC now includes a `mapped_as` field to indicate the + mapped Autonomous System used for diversifying peer selection. See the + `-asmap` configuration option described below in _New Settings_. (#16702) + +- The `createmultisig` and `addmultisigaddress` RPCs now return an + output script descriptor for the newly created address. (#18032) + +Build System +------------ + +- OpenSSL is no longer used by Bitcoin Core. (#17265) + +- BIP70 support has been fully removed from Bitcoin Core. The + `--enable-bip70` option remains, but it will throw an error during configure. + (#17165) + +- glibc 2.17 or greater is now required to run the release binaries. This + retains compatibility with RHEL 7, CentOS 7, Debian 8 and Ubuntu 14.04 LTS. (#17538) + +- The source code archives that are provided with gitian builds no longer contain + any autotools artifacts. Therefore, to build from such source, a user + should run the `./autogen.sh` script from the root of the unpacked archive. + This implies that `autotools` and other required packages are installed on the + user's system. (#18331) + +New settings +------------ + +- New `rpcwhitelist` and `rpcwhitelistdefault` configuration parameters + allow giving certain RPC users permissions to only some RPC calls. + (#12763) + +- A new `-asmap` configuration option has been added to diversify the + node's network connections by mapping IP addresses Autonomous System + Numbers (ASNs) and then limiting the number of connections made to any + single ASN. See [issue #16599](https://github.com/bitcoin/bitcoin/issues/16599), + [PR #16702](https://github.com/bitcoin/bitcoin/pull/16702), and the + `bitcoind help` for more information. This option is experimental and + subject to removal or breaking changes in future releases, so the + legacy /16 prefix mapping of IP addresses remains the default. (#16702) + +Updated settings +---------------- + +- All custom settings configured when Bitcoin Core starts are now + written to the `debug.log` file to assist troubleshooting. (#16115) + +- Importing blocks upon startup via the `bootstrap.dat` file no longer + occurs by default. The file must now be specified with + `-loadblock=`. (#17044) + +- The `-debug=db` logging category has been renamed to + `-debug=walletdb` to distinguish it from `coindb`. The `-debug=db` + option has been deprecated and will be removed in the next major + release. (#17410) + +- The `-walletnotify` configuration parameter will now replace any `%w` + in its argument with the name of the wallet generating the + notification. This is not supported on Windows. (#13339) + +Removed settings +---------------- + +- The `-whitelistforcerelay` configuration parameter has been removed after + it was discovered that it was rendered ineffective in version 0.13 and + hasn't actually been supported for almost four years. (#17985) + +GUI changes +----------- + +- The "Start Bitcoin Core on system login" option has been removed on macOS. + (#17567) + +- In the Peers window, the details for a peer now displays a `Mapped AS` + field to indicate the mapped Autonomous System used for diversifying + peer selection. See the `-asmap` configuration option in _New + Settings_, above. (#18402) + +- A "known bug" [announced](https://bitcoincore.org/en/releases/0.18.0/#wallet-gui) + in the release notes of version 0.18 has been fixed. The issue + affected anyone who simultaneously used multiple Bitcoin Core wallets + and the GUI coin control feature. (#18894) + +- For watch-only wallets, creating a new transaction in the Send screen + or fee bumping an existing transaction in the Transactions screen will + automatically copy a Partially-Signed Bitcoin Transaction (PSBT) to + the system clipboard. This can then be pasted into an external + program such as [HWI](https://github.com/bitcoin-core/HWI) for + signing. Future versions of Bitcoin Core should support a GUI option + for finalizing and broadcasting PSBTs, but for now the debug console + may be used with the `finalizepsbt` and `sendrawtransaction` RPCs. + (#16944, #17492) + +Wallet +------ + +- The wallet now by default uses bech32 addresses when using RPC, and + creates native segwit change outputs. (#16884) + +- The way that output trust was computed has been fixed, which affects + confirmed/unconfirmed balance status and coin selection. (#16766) + +- The `gettransaction`, `listtransactions` and `listsinceblock` RPC + responses now also include the height of the block that contains the + wallet transaction, if any. (#17437) + +- The `getaddressinfo` RPC has had its `label` field deprecated + (re-enable for this release using the configuration parameter + `-deprecatedrpc=label`). The `labels` field is altered from returning + JSON objects to returning a JSON array of label names (re-enable + previous behavior for this release using the configuration parameter + `-deprecatedrpc=labelspurpose`). Backwards compatibility using the + deprecated configuration parameters is expected to be dropped in the + 0.21 release. (#17585, #17578) + +Documentation changes +--------------------- + +- Bitcoin Core's automatically-generated source code documentation is + now available at https://doxygen.bitcoincore.org. (#17596) + +Low-level changes +================= + +Utilities +--------- + +- The `bitcoin-cli` utility used with the `-getinfo` parameter now + returns a `headers` field with the number of downloaded block headers + on the best headers chain (similar to the `blocks` field that is also + returned) and a `verificationprogress` field that estimates how much + of the best block chain has been synced by the local node. The + information returned no longer includes the `protocolversion`, + `walletversion`, and `keypoololdest` fields. (#17302, #17650) + +- The `bitcoin-cli` utility now accepts a `-stdinwalletpassphrase` + parameter that can be used when calling the `walletpassphrase` and + `walletpassphrasechange` RPCs to read the passphrase from standard + input without echoing it to the terminal, improving security against + anyone who can look at your screen. The existing `-stdinrpcpass` + parameter is also updated to not echo the passphrase. (#13716) + +Command line +------------ + +- Command line options prefixed with main/test/regtest network names like + `-main.port=8333` `-test.server=1` previously were allowed but ignored. Now + they trigger "Invalid parameter" errors on startup. (#17482) + +New RPCs +-------- + +- The `dumptxoutset` RPC outputs a serialized snapshot of the current + UTXO set. A script is provided in the `contrib/devtools` directory + for generating a snapshot of the UTXO set at a particular block + height. (#16899) + +- The `generatetodescriptor` RPC allows testers using regtest mode to + generate blocks that pay an arbitrary output script descriptor. + (#16943) + +Updated RPCs +------------ + +- The `verifychain` RPC default values are now static instead of + depending on the command line options or configuration file + (`-checklevel`, and `-checkblocks`). Users can pass in the RPC + arguments explicitly when they don't want to rely on the default + values. (#18541) + +- The `getblockchaininfo` RPC's `verificationprogress` field will no + longer report values higher than 1. Previously it would occasionally + report the chain was more than 100% verified. (#17328) + +Tests +----- + +- It is now an error to use an unqualified `walletdir=path` setting in + the config file if running on testnet or regtest networks. The setting + now needs to be qualified as `chain.walletdir=path` or placed in the + appropriate `[chain]` section. (#17447) + +- `-fallbackfee` was 0 (disabled) by default for the main chain, but + 0.0002 by default for the test chains. Now it is 0 by default for all + chains. Testnet and regtest users will have to add + `fallbackfee=0.0002` to their configuration if they weren't setting it + and they want it to keep working like before. (#16524) + +Build system +------------ + +- Support is provided for building with the Android Native Development + Kit (NDK). (#16110) + +0.20.0 change log +================= + +### Mining +- #18742 miner: Avoid stack-use-after-return in validationinterface (MarcoFalke) + +### Block and transaction handling +- #15283 log: Fix UB with bench on genesis block (instagibbs) +- #16507 feefilter: Compute the absolute fee rather than stored rate (instagibbs) +- #16688 log: Add validation interface logging (jkczyz) +- #16805 log: Add timing information to FlushStateToDisk() (jamesob) +- #16902 O(1) `OP_IF/NOTIF/ELSE/ENDIF` script implementation (sipa) +- #16945 introduce CChainState::GetCoinsCacheSizeState (jamesob) +- #16974 Walk pindexBestHeader back to ChainActive().Tip() if it is invalid (TheBlueMatt) +- #17004 Remove REJECT code from CValidationState (jnewbery) +- #17080 Explain why `fCheckDuplicateInputs` can not be skipped and remove it (MarcoFalke) +- #17328 GuessVerificationProgress: cap the ratio to 1 (darosior) +- #17399 Templatize ValidationState instead of subclassing (jkczyz) +- #17407 node: Add reference to mempool in NodeContext (MarcoFalke) +- #17708 prevector: Avoid misaligned member accesses (ajtowns) +- #17850,#17896,#17957,#18021,#18021,#18112 Serialization improvements (sipa) +- #17925 Improve UpdateTransactionsFromBlock with Epochs (JeremyRubin) +- #18002 Abstract out script execution out of `VerifyWitnessProgram()` (sipa) +- #18388 Make VerifyWitnessProgram use a Span stack (sipa) +- #18433 serialization: prevent int overflow for big Coin::nHeight (pierreN) +- #18500 chainparams: Bump assumed valid hash (MarcoFalke) +- #18551 Do not clear validationinterface entries being executed (sipa) + +### P2P protocol and network code +- #15437 Remove BIP61 reject messages (MarcoFalke) +- #16702 Supply and use asmap to improve IP bucketing in addrman (naumenkogs) +- #16851 Continue relaying transactions after they expire from mapRelay (ajtowns) +- #17164 Avoid allocating memory for addrKnown where we don't need it (naumenkogs) +- #17243 tools: add PoissonNextSend method that returns mockable time (amitiuttarwar) +- #17251 SocketHandler logs peer id for close and disconnect (Sjors) +- #17573 Seed RNG with precision timestamps on receipt of net messages (TheBlueMatt) +- #17624 Fix an uninitialized read in ProcessMessage(…, "tx", …) when receiving a transaction we already have (practicalswift) +- #17754 Don't allow resolving of std::string with embedded NUL characters. Add tests (practicalswift) +- #17758 Fix CNetAddr::IsRFC2544 comment + tests (tynes) +- #17812 config, net, test: Asmap feature refinements and functional tests (jonatack) +- #17951 Use rolling bloom filter of recent block txs for AlreadyHave() check (sdaftuar) +- #17985 Remove forcerelay of rejected txs (MarcoFalke) +- #18023 Fix some asmap issues (sipa) +- #18054 Reference instead of copy in BlockConnected range loop (jonatack) +- #18376 Fix use-after-free in tests (vasild) +- #18454 Make addr relay mockable, add test (MarcoFalke) +- #18458 Add missing `cs_vNodes` lock (MarcoFalke) +- #18506 Hardcoded seeds update for 0.20 (laanwj) +- #18808 Drop unknown types in getdata (jnewbery) +- #18962 Only send a getheaders for one block in an INV (jnewbery) + +### Wallet +- #13339 Replace %w by wallet name in -walletnotify script (promag) +- #15931 Remove GetDepthInMainChain dependency on locked chain interface (ariard) +- #16373 bumpfee: Return PSBT when wallet has privkeys disabled (instagibbs) +- #16524 Disable -fallbackfee by default (jtimon) +- #16766 Make IsTrusted scan parents recursively (JeremyRubin) +- #16884 Change default address type to bech32 (instagibbs) +- #16911 Only check the hash of transactions loaded from disk (achow101) +- #16923 Handle duplicate fileid exception (promag) +- #17056 descriptors: Introduce sortedmulti descriptor (achow101) +- #17070 Avoid showing GUI popups on RPC errors (MarcoFalke) +- #17138 Remove wallet access to some node arguments (jnewbery) +- #17237 LearnRelatedScripts only if KeepDestination (promag) +- #17260 Split some CWallet functions into new LegacyScriptPubKeyMan (achow101) +- #17261 Make ScriptPubKeyMan an actual interface and the wallet to have multiple (achow101) +- #17290 Enable BnB coin selection for preset inputs and subtract fee from outputs (achow101) +- #17373 Various fixes and cleanup to keypool handling in LegacyScriptPubKeyMan and CWallet (achow101) +- #17410 Rename `db` log category to `walletdb` (like `coindb`) (laanwj) +- #17444 Avoid showing GUI popups on RPC errors (take 2) (MarcoFalke) +- #17447 Make -walletdir network only (promag) +- #17537 Cleanup and move opportunistic and superfluous TopUp()s (achow101) +- #17553 Remove out of date comments for CalculateMaximumSignedTxSize (instagibbs) +- #17568 Fix when sufficient preset inputs and subtractFeeFromOutputs (achow101) +- #17677 Activate watchonly wallet behavior for LegacySPKM only (instagibbs) +- #17719 Document better -keypool as a look-ahead safety mechanism (ariard) +- #17843 Reset reused transactions cache (fjahr) +- #17889 Improve CWallet:MarkDestinationsDirty (promag) +- #18034 Get the OutputType for a descriptor (achow101) +- #18067 Improve LegacyScriptPubKeyMan::CanProvide script recognition (ryanofsky) +- #18115 Pass in transactions and messages for signing instead of exporting the private keys (achow101) +- #18192,#18546 Bugfix: Wallet: Safely deal with change in the address book (luke-jr) +- #18204 descriptors: Improve descriptor cache and cache xpubs (achow101) +- #18274 rpc/wallet: Initialize nFeeRequired to avoid using garbage value on failure (kallewoof) +- #18312 Remove deprecated fee bumping by totalFee (jonatack) +- #18338 Fix wallet unload race condition (promag) + +### RPC and other APIs +- #12763 Add RPC Whitelist Feature from #12248 (JeremyRubin) +- #13716 cli: `-stdinwalletpassphrase` and non-echo stdin passwords (kallewoof) +- #16689 Add missing fields to wallet rpc help output (ariard) +- #16821 Fix bug where duplicate PSBT keys are accepted (erasmospunk) +- #16899 UTXO snapshot creation (dumptxoutset) +- #17156 psbt: Check that various indexes and amounts are within bounds (achow101) +- #17264 Set default bip32derivs to true for psbt methods (Sjors) +- #17283 improve getaddressinfo test coverage, help, code docs (jonatack) +- #17302 cli: Add "headers" and "verificationprogress" to -getinfo (laanwj) +- #17318 replace asserts in RPC code with `CHECK_NONFATAL` and add linter (adamjonas) +- #17437 Expose block height of wallet transactions (promag) +- #17519 Remove unused `COINBASE_FLAGS` (narula) +- #17578 Simplify getaddressinfo labels, deprecate previous behavior (jonatack) +- #17585 deprecate getaddressinfo label (jonatack) +- #17746 Remove vector copy from listtransactions (promag) +- #17809 Auto-format RPCResult (MarcoFalke) +- #18032 Output a descriptor in createmultisig and addmultisigaddress (achow101) +- #18122 Update validateaddress RPCExamples to bech32 (theStack) +- #18208 Change RPCExamples to bech32 (yusufsahinhamza) +- #18268 Remove redundant types from descriptions (docallag) +- #18346 Document an RPCResult for all calls; Enforce at compile time (MarcoFalke) +- #18396 Add missing HelpExampleRpc for getblockfilter (theStack) +- #18398 Fix broken RPCExamples for waitforblock(height) (theStack) +- #18444 Remove final comma for last entry of fixed-size arrays/objects in RPCResult (luke-jr) +- #18459 Remove unused getbalances() code (jonatack) +- #18484 Correctly compute redeemScript from witnessScript for signrawtransaction (achow101) +- #18487 Fix rpcRunLater race in walletpassphrase (promag) +- #18499 Make rpc documentation not depend on call-time rpc args (MarcoFalke) +- #18532 Avoid initialization-order-fiasco on static CRPCCommand tables (MarcoFalke) +- #18541 Make verifychain default values static, not depend on global args (MarcoFalke) +- #18809 Do not advertise dumptxoutset as a way to flush the chainstate (MarcoFalke) +- #18814 Relock wallet only if most recent callback (promag) + +### GUI +- #15023 Restore RPC Console to non-wallet tray icon menu (luke-jr) +- #15084 Don't disable the sync overlay when wallet is disabled (benthecarman) +- #15098 Show addresses for "SendToSelf" transactions (hebasto) +- #15756 Add shortcuts for tab tools (promag) +- #16944 create PSBT with watch-only wallet (Sjors) +- #16964 Change sendcoins dialogue Yes to Send (instagibbs) +- #17068 Always generate `bitcoinstrings.cpp` on `make translate` (D4nte) +- #17096 Rename debug window (Zero-1729) +- #17105 Make RPCConsole::TabTypes an enum class (promag) +- #17125 Add toolTip and placeholderText to sign message fields (dannmat) +- #17165 Remove BIP70 support (fanquake) +- #17180 Improved tooltip for send amount field (JeremyCrookshank) +- #17186 Add placeholder text to the sign message field (Danny-Scott) +- #17195 Send amount placeholder value (JeremyCrookshank) +- #17226 Fix payAmount tooltip in SendCoinsEntry (promag) +- #17360 Cleaning up hide button tool tip (Danny-Scott) +- #17446 Changed tooltip for 'Label' & 'Message' text fields to be more clear (dannmat) +- #17453 Fix intro dialog labels when the prune button is toggled (hebasto) +- #17474 Bugfix: GUI: Recognise `NETWORK_LIMITED` in formatServicesStr (luke-jr) +- #17492 Bump fee returns PSBT on clipboard for watchonly-only wallets (instagibbs) +- #17567 Remove macOS start on login code (fanquake) +- #17587 Show watch-only balance in send screen (Sjors) +- #17694 Disable 3rd-party tx-urls when wallet disabled (brakmic) +- #17696 Force set nPruneSize in QSettings after the intro dialog (hebasto) +- #17702 Move static placeholder texts to forms (laanwj) +- #17826 Log Qt related info (hebasto) +- #17886 Restore English translation option (achow101) +- #17906 Set CConnman byte counters earlier to avoid uninitialized reads (ryanofsky) +- #17935 Hide HD & encryption icons when no wallet loaded (brakmic) +- #17998 Shortcut to close ModalOverlay (emilengler) +- #18007 Bugfix: GUI: Hide the HD/encrypt icons earlier so they get re-shown if another wallet is open (luke-jr) +- #18060 Drop PeerTableModel dependency to ClientModel (promag) +- #18062 Fix unintialized WalletView::progressDialog (promag) +- #18091 Pass clientmodel changes from walletframe to walletviews (jonasschnelli) +- #18101 Fix deprecated QCharRef usage (hebasto) +- #18121 Throttle GUI update pace when -reindex (hebasto) +- #18123 Fix race in WalletModel::pollBalanceChanged (ryanofsky) +- #18160 Avoid Wallet::GetBalance in WalletModel::pollBalanceChanged (promag) +- #18360 Bump transifex slug and update English translations for 0.20 (laanwj) +- #18402 Display mapped AS in peers info window (jonatack) +- #18492 Translations update pre-branch (laanwj) +- #18549 Fix Window -> Minimize menu item (hebasto) +- #18578 Fix leak in CoinControlDialog::updateView (promag) +- #18894 Fix manual coin control with multiple wallets loaded (promag) + +### Build system +- #16667 Remove mingw linker workaround from win gitian descriptor (fanquake) +- #16669 Use new fork of osslsigncode for windows gitian signing (fanquake) +- #16949 Only pass --disable-dependency-tracking to packages that understand it (fanquake) +- #17008 Bump libevent to 2.1.11 in depends (stefanwouldgo) +- #17029 gitian: Various improvements for windows descriptor (dongcarl) +- #17033 Disable _FORTIFY_SOURCE when enable-debug (achow101) +- #17057 Switch to upstream libdmg-hfsplus (fanquake) +- #17066 Remove workaround for ancient libtool (hebasto) +- #17074 Added double quotes (mztriz) +- #17087 Add variable printing target to Makefiles (dongcarl) +- #17118 depends macOS: point --sysroot to SDK (Sjors) +- #17231 Fix boost mac cross build with clang 9+ (theuni) +- #17265 Remove OpenSSL (fanquake) +- #17284 Update retry to current version (RandyMcMillan) +- #17308 nsis: Write to correct filename in first place (dongcarl) +- #17324,#18099 Update univalue subtree (MarcoFalke) +- #17398 Update leveldb to 1.22+ (laanwj) +- #17409 Avoid hardcoded libfaketime dir in gitian (MarcoFalke) +- #17466 Fix C{,XX} pickup (dongcarl) +- #17483 Set gitian arch back to amd64 (MarcoFalke) +- #17486 Make Travis catch unused variables (Sjors) +- #17538 Bump minimum libc to 2.17 for release binaries (fanquake) +- #17542 Create test utility library from src/test/util/ (brakmic) +- #17545 Remove libanl.so.1 from ALLOWED_LIBRARIES (fanquake) +- #17547 Fix configure report about qr (hebasto) +- #17569 Allow export of environ symbols and work around rv64 toolchain issue (laanwj) +- #17647 lcov: filter depends from coverage reports (nijynot) +- #17658 Add ability to skip building qrencode (fanquake) +- #17678 Support for S390X and POWER targets (MarcoFalke) +- #17682 util: Update tinyformat to upstream (laanwj) +- #17698 Don't configure `xcb_proto` (fanquake) +- #17730 Remove Qt networking features (fanquake) +- #17738 Remove linking librt for backwards compatibility (fanquake) +- #17740 Remove configure checks for win libraries we don't link against (fanquake) +- #17741 Included `test_bitcoin-qt` in msvc build (sipsorcery) +- #17756 Remove `WINDOWS_BITS` from build system (fanquake) +- #17769 Set `AC_PREREQ` to 2.69 (fanquake) +- #17880 Add -Wdate-time to Werror flags (fanquake) +- #17910 Remove double `LIBBITCOIN_SERVER` linking (fanquake) +- #17928 Consistent use of package variable (Bushstar) +- #17933 guix: Pin Guix using `guix time-machine` (dongcarl) +- #17948 pass -fno-ident in Windows gitian descriptor (fanquake) +- #18003 Remove --large-address-aware linker flag (fanquake) +- #18004 Don't embed a build-id when building libdmg-hfsplus (fanquake) +- #18051 Fix behavior when `ALLOW_HOST_PACKAGES` unset (hebasto) +- #18059 Add missing attributes to Win installer (fanquake) +- #18104 Skip i686 build by default in guix and gitian (MarcoFalke) +- #18107 Add `cov_fuzz` target (MarcoFalke) +- #18135 Add --enable-determinism configure flag (fanquake) +- #18145 Add Wreturn-type to Werror flags, check on more Travis machines (Sjors) +- #18264 Remove Boost Chrono (fanquake) +- #18290 Set minimum Automake version to 1.13 (hebasto) +- #18320 guix: Remove now-unnecessary gcc make flag (dongcarl) +- #18331 Use git archive as source tarball (hebasto) +- #18397 Fix libevent linking for `bench_bitcoin` binary (hebasto) +- #18426 scripts: `Previous_release`: improve behaviour on failed download (theStack) +- #18429 Remove double `LIBBITCOIN_SERVER` from bench-Makefile (brakmic) +- #18528 Create `test_fuzz` library from src/test/fuzz/fuzz.cpp (brakmic) +- #18558 Fix boost detection for arch armv7l (hebasto) +- #18598 gitian: Add missing automake package to gitian-win-signer.yml (achow101) +- #18676 Check libevent minimum version in configure script (hebasto) +- #18945 Ensure source tarball has leading directory name (laanwj) + +### Platform support +- #16110 Add Android NDK support (icota) +- #16392 macOS toolchain update (fanquake) +- #16569 Increase init file stop timeout (setpill) +- #17151 Remove OpenSSL PRNG seeding (Windows, Qt only) (fanquake) +- #17365 Update README.md with working Android targets and API levels (icota) +- #17521 Only use D-Bus with Qt on linux (fanquake) +- #17550 Set minimum supported macOS to 10.12 (fanquake) +- #17592 Appveyor install libevent[thread] vcpkg (sipsorcery) +- #17660 Remove deprecated key from macOS Info.plist (fanquake) +- #17663 Pass `-dead_strip_dylibs` to ld on macOS (fanquake) +- #17676 Don't use OpenGL in Qt on macOS (fanquake) +- #17686 Add `-bind_at_load` to macOS hardened LDFLAGS (fanquake) +- #17787 scripts: Add macho pie check to security-check.py (fanquake) +- #17800 random: don't special case clock usage on macOS (fanquake) +- #17863 scripts: Add macho dylib checks to symbol-check.py (fanquake) +- #17899 msvc: Ignore msvc linker warning and update to msvc build instructions (sipsorcery) +- #17916 windows: Enable heap terminate-on-corruption (fanquake) +- #18082 logging: Enable `thread_local` usage on macos (fanquake) +- #18108 Fix `.gitignore` policy in `build_msvc` directory (hebasto) +- #18295 scripts: Add macho lazy bindings check to security-check.py (fanquake) +- #18358 util: Fix compilation with mingw-w64 7.0.0 (fanquake) +- #18359 Fix sysctl() detection on macOS (fanquake) +- #18364 random: remove getentropy() fallback for macOS < 10.12 (fanquake) +- #18395 scripts: Add pe dylib checking to symbol-check.py (fanquake) +- #18415 scripts: Add macho tests to test-security-check.py (fanquake) +- #18425 releases: Update with new Windows code signing certificate (achow101) +- #18702 Fix ASLR for bitcoin-cli on Windows (fanquake) + +### Tests and QA +- #12134 Build previous releases and run functional tests (Sjors) +- #13693 Add coverage to estimaterawfee and estimatesmartfee (Empact) +- #13728 lint: Run the ci lint stage on mac (Empact) +- #15443 Add getdescriptorinfo functional test (promag) +- #15888 Add `wallet_implicitsegwit` to test the ability to transform keys between address types (luke-jr) +- #16540 Add `ASSERT_DEBUG_LOG` to unit test framework (MarcoFalke) +- #16597 travis: Run full test suite on native macos (Sjors) +- #16681 Use self.chain instead of 'regtest' in all current tests (jtimon) +- #16786 add unit test for wallet watch-only methods involving PubKeys (theStack) +- #16943 Add generatetodescriptor RPC (MarcoFalke) +- #16973 Fix `combine_logs.py` for AppVeyor build (mzumsande) +- #16975 Show debug log on unit test failure (MarcoFalke) +- #16978 Seed test RNG context for each test case, print seed (MarcoFalke) +- #17009, #17018, #17050, #17051, #17071, #17076, #17083, #17093, #17109, #17113, #17136, #17229, #17291, #17357, #17771, #17777, #17917, #17926, #17972, #17989, #17996, #18009, #18029, #18047, #18126, #18176, #18206, #18353, #18363, #18407, #18417, #18423, #18445, #18455, #18565 Add fuzzing harnesses (practicalswift) +- #17011 ci: Use busybox utils for one build (MarcoFalke) +- #17030 Fix Python Docstring to include all Args (jbampton) +- #17041 ci: Run tests on arm (MarcoFalke) +- #17069 Pass fuzzing inputs as constant references (practicalswift) +- #17091 Add test for loadblock option and linearize scripts (fjahr) +- #17108 fix "tx-size-small" errors after default address change (theStack) +- #17121 Speed up `wallet_backup` by whitelisting peers (immediate tx relay) (theStack) +- #17124 Speed up `wallet_address_types` by whitelisting peers (immediate tx relay) (theStack) +- #17140 Fix bug in `blockfilter_index_tests` (jimpo) +- #17199 use default address type (bech32) for `wallet_bumpfee` tests (theStack) +- #17205 ci: Enable address sanitizer (asan) stack-use-after-return checking (practicalswift) +- #17206 Add testcase to simulate bitcoin schema in leveldb (adamjonas) +- #17209 Remove no longer needed UBSan suppressions (issues fixed). Add documentation (practicalswift) +- #17220 Add unit testing for the CompressScript function (adamjonas) +- #17225 Test serialisation as part of deserialisation fuzzing. Test round-trip equality where possible (practicalswift) +- #17228 Add RegTestingSetup to `setup_common` (MarcoFalke) +- #17233 travis: Run unit and functional tests on native arm (MarcoFalke) +- #17235 Skip unnecessary fuzzer initialisation. Hold ECCVerifyHandle only when needed (practicalswift) +- #17240 ci: Disable functional tests on mac host (MarcoFalke) +- #17254 Fix `script_p2sh_tests` `OP_PUSHBACK2/4` missing (adamjonas) +- #17267 bench: Fix negative values and zero for -evals flag (nijynot) +- #17275 pubkey: Assert CPubKey's ECCVerifyHandle precondition (practicalswift) +- #17288 Added TestWrapper class for interactive Python environments (jachiang) +- #17292 Add new mempool benchmarks for a complex pool (JeremyRubin) +- #17299 add reason checks for non-standard txs in `test_IsStandard` (theStack) +- #17322 Fix input size assertion in `wallet_bumpfee.py` (instagibbs) +- #17327 Add `rpc_fundrawtransaction` logging (jonatack) +- #17330 Add `shrinkdebugfile=0` to regtest bitcoin.conf (sdaftuar) +- #17340 Speed up fundrawtransaction test (jnewbery) +- #17345 Do not instantiate CAddrDB for static call CAddrDB::Read() (hebasto) +- #17362 Speed up `wallet_avoidreuse`, add logging (jonatack) +- #17363 add "diamond" unit test to MempoolAncestryTests (theStack) +- #17366 Reset global args between test suites (MarcoFalke) +- #17367 ci: Run non-cross-compile builds natively (MarcoFalke) +- #17378 TestShell: Fix typos & implement cleanups (jachiang) +- #17384 Create new test library (MarcoFalke) +- #17387 `wallet_importmulti`: use addresses of the same type as being imported (achow101) +- #17388 Add missing newline in `util_ChainMerge` test (ryanofsky) +- #17390 Add `util_ArgParsing` test (ryanofsky) +- #17420 travis: Rework `cache_err_msg` (MarcoFalke) +- #17423 ci: Make ci system read-only on the git work tree (MarcoFalke) +- #17435 check custom ancestor limit in `mempool_packages.py` (theStack) +- #17455 Update valgrind suppressions (practicalswift) +- #17461 Check custom descendant limit in `mempool_packages.py` (theStack) +- #17469 Remove fragile `assert_memory_usage_stable` (MarcoFalke) +- #17470 ci: Use clang-8 for fuzzing to run on aarch64 ci systems (MarcoFalke) +- #17480 Add unit test for non-standard txs with too large scriptSig (theStack) +- #17497 Skip tests when utils haven't been compiled (fanquake) +- #17502 Add unit test for non-standard bare multisig txs (theStack) +- #17511 Add bounds checks before base58 decoding (sipa) +- #17517 ci: Bump to clang-8 for asan build to avoid segfaults on ppc64le (MarcoFalke) +- #17522 Wait until mempool is loaded in `wallet_abandonconflict` (MarcoFalke) +- #17532 Add functional test for non-standard txs with too large scriptSig (theStack) +- #17541 Add functional test for non-standard bare multisig txs (theStack) +- #17555 Add unit test for non-standard txs with wrong nVersion (dspicher) +- #17571 Add `libtest_util` library to msvc build configuration (sipsorcery) +- #17591 ci: Add big endian platform - s390x (elichai) +- #17593 Move more utility functions into test utility library (mzumsande) +- #17633 Add option --valgrind to run the functional tests under Valgrind (practicalswift) +- #17635 ci: Add centos 7 build (hebasto) +- #17641 Add unit test for leveldb creation with unicode path (sipsorcery) +- #17674 Add initialization order fiasco detection in Travis (practicalswift) +- #17675 Enable tests which are incorrectly skipped when running `test_runner.py --usecli` (practicalswift) +- #17685 Fix bug in the descriptor parsing fuzzing harness (`descriptor_parse`) (practicalswift) +- #17705 re-enable CLI test support by using EncodeDecimal in json.dumps() (fanquake) +- #17720 add unit test for non-standard "scriptsig-not-pushonly" txs (theStack) +- #17767 ci: Fix qemu issues (MarcoFalke) +- #17793 ci: Update github actions ci vcpkg cache on msbuild update (hebasto) +- #17806 Change filemode of `rpc_whitelist.py` (emilengler) +- #17849 ci: Fix brew python link (hebasto) +- #17851 Add `std::to_string` to list of locale dependent functions (practicalswift) +- #17893 Fix double-negative arg test (hebasto) +- #17900 ci: Combine 32-bit build with centos 7 build (theStack) +- #17921 Test `OP_CSV` empty stack fail in `feature_csv_activation.py` (theStack) +- #17931 Fix `p2p_invalid_messages` failing in Python 3.8 because of warning (elichai) +- #17947 add unit test for non-standard txs with too large tx size (theStack) +- #17959 Check specific reject reasons in `feature_csv_activation.py` (theStack) +- #17984 Add p2p test for forcerelay permission (MarcoFalke) +- #18001 Updated appveyor job to checkout a specific vcpkg commit ID (sipsorcery) +- #18008 fix fuzzing using libFuzzer on macOS (fanquake) +- #18013 bench: Fix benchmarks filters (elichai) +- #18018 reset fIsBareMultisigStd after bare-multisig tests (fanquake) +- #18022 Fix appveyor `test_bitcoin` build of `*.raw` (MarcoFalke) +- #18037 util: Allow scheduler to be mocked (amitiuttarwar) +- #18056 ci: Check for submodules (emilengler) +- #18069 Replace 'regtest' leftovers by self.chain (theStack) +- #18081 Set a name for CI Docker containers (fanquake) +- #18109 Avoid hitting some known minor tinyformat issues when fuzzing strprintf(…) (practicalswift) +- #18155 Add harness which fuzzes EvalScript and VerifyScript using a fuzzed signature checker (practicalswift) +- #18159 Add --valgrind option to `test/fuzz/test_runner.py` for running fuzzing test cases under valgrind (practicalswift) +- #18166 ci: Run fuzz testing test cases (bitcoin-core/qa-assets) under valgrind to catch memory errors (practicalswift) +- #18172 Transaction expiry from mempool (0xB10C) +- #18181 Remove incorrect assumptions in `validation_flush_tests` (MarcoFalke) +- #18183 Set `catch_system_errors=no` on boost unit tests (MarcoFalke) +- #18195 Add `cost_of_change` parameter assertions to `bnb_search_test` (yancyribbens) +- #18209 Reduce unneeded whitelist permissions in tests (MarcoFalke) +- #18211 Disable mockforward scheduler unit test for now (MarcoFalke) +- #18213 Fix race in `p2p_segwit` (MarcoFalke) +- #18224 Make AnalyzePSBT next role calculation simple, correct (instagibbs) +- #18228 Add missing syncwithvalidationinterfacequeue (MarcoFalke) +- #18247 Wait for both veracks in `add_p2p_connection` (MarcoFalke) +- #18249 Bump timeouts to accomodate really slow disks (MarcoFalke) +- #18255 Add `bad-txns-*-toolarge` test cases to `invalid_txs` (MarcoFalke) +- #18263 rpc: change setmocktime check to use IsMockableChain (gzhao408) +- #18285 Check that `wait_until` returns if time point is in the past (MarcoFalke) +- #18286 Add locale fuzzer to `FUZZERS_MISSING_CORPORA` (practicalswift) +- #18292 fuzz: Add `assert(script == decompressed_script)` (MarcoFalke) +- #18299 Update `FUZZERS_MISSING_CORPORA` to enable regression fuzzing for all harnesses in master (practicalswift) +- #18300 fuzz: Add option to merge input dir to test runner (MarcoFalke) +- #18305 Explain why test logging should be used (MarcoFalke) +- #18306 Add logging to `wallet_listsinceblock.py` (jonatack) +- #18311 Bumpfee test fix (instagibbs) +- #18314 Add deserialization fuzzing of SnapshotMetadata (`utxo_snapshot`) (practicalswift) +- #18319 fuzz: Add missing `ECC_Start` to `key_io` test (MarcoFalke) +- #18334 Add basic test for BIP 37 (MarcoFalke) +- #18350 Fix mining to an invalid target + ensure that a new block has the correct hash internally (TheQuantumPhysicist) +- #18378 Bugfix & simplify bn2vch using `int.to_bytes` (sipa) +- #18393 Don't assume presence of `__builtin_mul_overflow(…)` in `MultiplicationOverflow(…)` fuzzing harness (practicalswift) +- #18406 add executable flag for `rpc_estimatefee.py` (theStack) +- #18420 listsinceblock block height checks (jonatack) +- #18430 ci: Only clone bitcoin-core/qa-assets when fuzzing (MarcoFalke) +- #18438 ci: Use homebrew addon on native macos (hebasto) +- #18447 Add coverage for script parse error in ParseScript (pierreN) +- #18472 Remove unsafe `BOOST_TEST_MESSAGE` (MarcoFalke) +- #18474 check that peer is connected when calling sync_* (MarcoFalke) +- #18477 ci: Use focal for fuzzers (MarcoFalke) +- #18481 add BIP37 'filterclear' test to p2p_filter.py (theStack) +- #18496 Remove redundant `sync_with_ping` after `add_p2p_connection` (jonatack) +- #18509 fuzz: Avoid running over all inputs after merging them (MarcoFalke) +- #18510 fuzz: Add CScriptNum::getint coverage (MarcoFalke) +- #18514 remove rapidcheck integration and tests (fanquake) +- #18515 Add BIP37 remote crash bug [CVE-2013-5700] test to `p2p_filter.py` (theStack) +- #18516 relax bumpfee `dust_to_fee` txsize an extra vbyte (jonatack) +- #18518 fuzz: Extend descriptor fuzz test (MarcoFalke) +- #18519 fuzz: Extend script fuzz test (MarcoFalke) +- #18521 fuzz: Add `process_messages` harness (MarcoFalke) +- #18529 Add fuzzer version of randomized prevector test (sipa) +- #18534 skip backwards compat tests if not compiled with wallet (fanquake) +- #18540 `wallet_bumpfee` assertion fixup (jonatack) +- #18543 Use one node to avoid a race due to missing sync in `rpc_signrawtransaction` (MarcoFalke) +- #18561 Properly raise FailedToStartError when rpc shutdown before warmup finished (MarcoFalke) +- #18562 ci: Run unit tests sequential once (MarcoFalke) +- #18563 Fix `unregister_all_during_call` cleanup (ryanofsky) +- #18566 Set `-use_value_profile=1` when merging fuzz inputs (MarcoFalke) +- #18757 Remove enumeration of expected deserialization exceptions in ProcessMessage(…) fuzzer (practicalswift) +- #18878 Add test for conflicted wallet tx notifications (ryanofsky) +- #18975 Remove const to work around compiler error on xenial (laanwj) + +### Documentation +- #16947 Doxygen-friendly script/descriptor.h comments (ch4ot1c) +- #16983 Add detailed info about Bitcoin Core files (hebasto) +- #16986 Doxygen-friendly CuckooCache comments (ch4ot1c) +- #17022 move-only: Steps for "before major release branch-off" (MarcoFalke) +- #17026 Update bips.md for default bech32 addresses in 0.20.0 (MarcoFalke) +- #17081 Fix Makefile target in benchmarking.md (theStack) +- #17102 Add missing indexes/blockfilter/basic to doc/files.md (MarcoFalke) +- #17119 Fix broken bitcoin-cli examples (andrewtoth) +- #17134 Add switch on enum example to developer notes (hebasto) +- #17142 Update macdeploy README to include all files produced by `make deploy` (za-kk) +- #17146 github: Add warning for bug reports (laanwj) +- #17157 Added instructions for how to add an upsteam to forked repo (dannmat) +- #17159 Add a note about backporting (carnhofdaki) +- #17169 Correct function name in ReportHardwareRand() (fanquake) +- #17177 Describe log files + consistent paths in test READMEs (fjahr) +- #17239 Changed miniupnp links to https (sandakersmann) +- #17281 Add developer note on `c_str()` (laanwj) +- #17285 Bip70 removal follow-up (fjahr) +- #17286 Fix help-debug -checkpoints (ariard) +- #17309 update MSVC instructions to remove Qt OpenSSL linking (fanquake) +- #17339 Add template for good first issues (michaelfolkson) +- #17351 Fix some misspellings (RandyMcMillan) +- #17353 Add ShellCheck to lint tests dependencies (hebasto) +- #17370 Update doc/bips.md with recent changes in master (MarcoFalke) +- #17393 Added regtest config for linearize script (gr0kchain) +- #17411 Add some better examples for scripted diff (laanwj) +- #17503 Remove bitness from bitcoin-qt help message and manpage (laanwj) +- #17539 Update and improve Developer Notes (hebasto) +- #17561 Changed MiniUPnPc link to https in dependencies.md (sandakersmann) +- #17596 Change doxygen URL to doxygen.bitcoincore.org (laanwj) +- #17598 Update release process with latest changes (MarcoFalke) +- #17617 Unify unix epoch time descriptions (jonatack) +- #17637 script: Add keyserver to verify-commits readme (emilengler) +- #17648 Rename wallet-tool references to bitcoin-wallet (hel-o) +- #17688 Add "ci" prefix to CONTRIBUTING.md (hebasto) +- #17751 Use recommended shebang approach in documentation code block (hackerrdave) +- #17752 Fix directory path for secp256k1 subtree in developer-notes (hackerrdave) +- #17772 Mention PR Club in CONTRIBUTING.md (emilengler) +- #17804 Misc RPC help fixes (MarcoFalke) +- #17819 Developer notes guideline on RPCExamples addresses (jonatack) +- #17825 Update dependencies.md (hebasto) +- #17873 Add to Doxygen documentation guidelines (jonatack) +- #17907 Fix improper Doxygen inline comments (Empact) +- #17942 Improve fuzzing docs for macOS users (fjahr) +- #17945 Fix doxygen errors (Empact) +- #18025 Add missing supported rpcs to doc/descriptors.md (andrewtoth) +- #18070 Add note about `brew doctor` (givanse) +- #18125 Remove PPA note from release-process.md (fanquake) +- #18170 Minor grammatical changes and flow improvements (travinkeith) +- #18212 Add missing step in win deployment instructions (dangershony) +- #18219 Add warning against wallet.dat re-use (corollari) +- #18253 Correct spelling errors in comments (Empact) +- #18278 interfaces: Describe and follow some code conventions (ryanofsky) +- #18283 Explain rebase policy in CONTRIBUTING.md (MarcoFalke) +- #18340 Mention MAKE=gmake workaround when building on a BSD (fanquake) +- #18341 Replace remaining literal BTC with `CURRENCY_UNIT` (domob1812) +- #18342 Add fuzzing quickstart guides for libFuzzer and afl-fuzz (practicalswift) +- #18344 Fix nit in getblockchaininfo (stevenroose) +- #18379 Comment fix merkle.cpp (4d55397500) +- #18382 note the costs of fetching all pull requests (vasild) +- #18391 Update init and reduce-traffic docs for -blocksonly (glowang) +- #18464 Block-relay-only vs blocksonly (MarcoFalke) +- #18486 Explain new test logging (MarcoFalke) +- #18505 Update webchat URLs in README.md (SuriyaaKudoIsc) +- #18513 Fix git add argument (HashUnlimited) +- #18577 Correct scripted-diff example link (yahiheb) +- #18589 Fix naming of macOS SDK and clarify version (achow101) + +### Miscellaneous +- #15600 lockedpool: When possible, use madvise to avoid including sensitive information in core dumps (luke-jr) +- #15934 Merge settings one place instead of five places (ryanofsky) +- #16115 On bitcoind startup, write config args to debug.log (LarryRuane) +- #16117 util: Replace boost sleep with std sleep (MarcoFalke) +- #16161 util: Fix compilation errors in support/lockedpool.cpp (jkczyz) +- #16802 scripts: In linearize, search for next position of magic bytes rather than fail (takinbo) +- #16889 Add some general std::vector utility functions (sipa) +- #17049 contrib: Bump gitian descriptors for 0.20 (MarcoFalke) +- #17052 scripts: Update `copyright_header` script to include additional files (GChuf) +- #17059 util: Simplify path argument for cblocktreedb ctor (hebasto) +- #17191 random: Remove call to `RAND_screen()` (Windows only) (fanquake) +- #17192 util: Add `check_nonfatal` and use it in src/rpc (MarcoFalke) +- #17218 Replace the LogPrint function with a macro (jkczyz) +- #17266 util: Rename decodedumptime to parseiso8601datetime (elichai) +- #17270 Feed environment data into RNG initializers (sipa) +- #17282 contrib: Remove accounts from bash completion (fanquake) +- #17293 Add assertion to randrange that input is not 0 (JeremyRubin) +- #17325 log: Fix log message for -par=1 (hebasto) +- #17329 linter: Strip trailing / in path for git-subtree-check (jnewbery) +- #17336 scripts: Search for first block file for linearize-data with some block files pruned (Rjected) +- #17361 scripts: Lint gitian descriptors with shellcheck (hebasto) +- #17482 util: Disallow network-qualified command line options (ryanofsky) +- #17507 random: mark RandAddPeriodic and SeedPeriodic as noexcept (fanquake) +- #17527 Fix CPUID subleaf iteration (sipa) +- #17604 util: Make schedulebatchpriority advisory only (fanquake) +- #17650 util: Remove unwanted fields from bitcoin-cli -getinfo (malevolent) +- #17671 script: Fixed wget call in gitian-build.py (willyko) +- #17699 Make env data logging optional (sipa) +- #17721 util: Don't allow base58 decoding of non-base58 strings. add base58 tests (practicalswift) +- #17750 util: Change getwarnings parameter to bool (jnewbery) +- #17753 util: Don't allow base32/64-decoding or parsemoney(…) on strings with embedded nul characters. add tests (practicalswift) +- #17823 scripts: Read suspicious hosts from a file instead of hardcoding (sanjaykdragon) +- #18162 util: Avoid potential uninitialized read in `formatiso8601datetime(int64_t)` by checking `gmtime_s`/`gmtime_r` return value (practicalswift) +- #18167 Fix a violation of C++ standard rules where unions are used for type-punning (TheQuantumPhysicist) +- #18225 util: Fail to parse empty string in parsemoney (MarcoFalke) +- #18270 util: Fail to parse whitespace-only strings in parsemoney(…) (instead of parsing as zero) (practicalswift) +- #18316 util: Helpexamplerpc formatting (jonatack) +- #18357 Fix missing header in sync.h (promag) +- #18412 script: Fix `script_err_sig_pushonly` error string (theStack) +- #18416 util: Limit decimal range of numbers parsescript accepts (pierreN) +- #18503 init: Replace `URL_WEBSITE` with `PACKAGE_URL` (MarcoFalke) +- #18526 Remove PID file at the very end (hebasto) +- #18553 Avoid non-trivial global constants in SHA-NI code (sipa) +- #18665 Do not expose and consider `-logthreadnames` when it does not work (hebasto) + +Credits +======= + +Thanks to everyone who directly contributed to this release: + +- 0xb10c +- 251 +- 4d55397500 +- Aaron Clauson +- Adam Jonas +- Albert +- Amiti Uttarwar +- Andrew Chow +- Andrew Toth +- Anthony Towns +- Antoine Riard +- Ava Barron +- Ben Carman +- Ben Woosley +- Block Mechanic +- Brian Solon +- Bushstar +- Carl Dong +- Carnhof Daki +- Cory Fields +- Daki Carnhof +- Dan Gershony +- Daniel Kraft +- dannmat +- Danny-Scott +- darosior +- David O'Callaghan +- Dominik Spicher +- Elichai Turkel +- Emil Engler +- emu +- Fabian Jahr +- fanquake +- Filip Gospodinov +- Franck Royer +- Gastón I. Silva +- gchuf +- Gleb Naumenko +- Gloria Zhao +- glowang +- Gr0kchain +- Gregory Sanders +- hackerrdave +- Harris +- hel0 +- Hennadii Stepanov +- ianliu +- Igor Cota +- James Chiang +- James O'Beirne +- Jan Beich +- Jan Sarenik +- Jeffrey Czyz +- Jeremy Rubin +- JeremyCrookshank +- Jim Posen +- John Bampton +- John L. Jegutanis +- John Newbery +- Jon Atack +- Jon Layton +- Jonas Schnelli +- João Barbosa +- Jorge Timón +- Karl-Johan Alm +- kodslav +- Larry Ruane +- Luke Dashjr +- malevolent +- MapleLaker +- marcaiaf +- MarcoFalke +- Marius Kjærstad +- Mark Erhardt +- Mark Tyneway +- Martin Erlandsson +- Martin Zumsande +- Matt Corallo +- Matt Ward +- Michael Folkson +- Michael Polzer +- Micky Yun Chan +- Neha Narula +- nijynot +- naumenkogs +- NullFunctor +- Peter Bushnell +- pierrenn +- Pieter Wuille +- practicalswift +- randymcmillan +- Rjected +- Russell Yanofsky +- Samer Afach +- Samuel Dobson +- Sanjay K +- Sebastian Falbesoner +- setpill +- Sjors Provoost +- Stefan Richter +- stefanwouldgo +- Steven Roose +- Suhas Daftuar +- Suriyaa Sundararuban +- TheCharlatan +- Tim Akinbo +- Travin Keith +- tryphe +- Vasil Dimov +- Willy Ko +- Wilson Ccasihue S +- Wladimir J. van der Laan +- Yahia Chiheb +- Yancy Ribbens +- Yusuf Sahin HAMZA +- Zakk +- Zero + +As well as to everyone that helped with translations on +[Transifex](https://www.transifex.com/bitcoin/bitcoin/). diff --git a/doc/release-notes/release-notes-0.20.1.md b/doc/release-notes/release-notes-0.20.1.md new file mode 100644 index 0000000000..9fbb29cb82 --- /dev/null +++ b/doc/release-notes/release-notes-0.20.1.md @@ -0,0 +1,158 @@ +0.20.1 Release Notes +==================== + +Bitcoin Core version 0.20.1 is now available from: + + + +This minor release includes various bug fixes and performance +improvements, as well as updated translations. + +Please report bugs using the issue tracker at GitHub: + + + +To receive security and update notifications, please subscribe to: + + + +How to Upgrade +============== + +If you are running an older version, shut it down. Wait until it has completely +shut down (which might take a few minutes in some cases), then run the +installer (on Windows) or just copy over `/Applications/Bitcoin-Qt` (on Mac) +or `bitcoind`/`bitcoin-qt` (on Linux). + +Upgrading directly from a version of Bitcoin Core that has reached its EOL is +possible, but it might take some time if the data directory needs to be migrated. Old +wallet versions of Bitcoin Core are generally supported. + +Compatibility +============== + +Bitcoin Core is supported and extensively tested on operating systems +using the Linux kernel, macOS 10.12+, and Windows 7 and newer. Bitcoin +Core should also work on most other Unix-like systems but is not as +frequently tested on them. It is not recommended to use Bitcoin Core on +unsupported systems. + +From Bitcoin Core 0.20.0 onwards, macOS versions earlier than 10.12 are no +longer supported. Additionally, Bitcoin Core does not yet change appearance +when macOS "dark mode" is activated. + +Known Bugs +========== + +The process for generating the source code release ("tarball") has changed in an +effort to make it more complete, however, there are a few regressions in +this release: + +- The generated `configure` script is currently missing, and you will need to + install autotools and run `./autogen.sh` before you can run + `./configure`. This is the same as when checking out from git. + +- Instead of running `make` simply, you should instead run + `BITCOIN_GENBUILD_NO_GIT=1 make`. + +Notable changes +=============== + +Changes regarding misbehaving peers +----------------------------------- + +Peers that misbehave (e.g. send us invalid blocks) are now referred to as +discouraged nodes in log output, as they're not (and weren't) strictly banned: +incoming connections are still allowed from them, but they're preferred for +eviction. + +Furthermore, a few additional changes are introduced to how discouraged +addresses are treated: + +- Discouraging an address does not time out automatically after 24 hours + (or the `-bantime` setting). Depending on traffic from other peers, + discouragement may time out at an indeterminate time. + +- Discouragement is not persisted over restarts. + +- There is no method to list discouraged addresses. They are not returned by + the `listbanned` RPC. That RPC also no longer reports the `ban_reason` + field, as `"manually added"` is the only remaining option. + +- Discouragement cannot be removed with the `setban remove` RPC command. + If you need to remove a discouragement, you can remove all discouragements by + stop-starting your node. + +Notification changes +-------------------- + +`-walletnotify` notifications are now sent for wallet transactions that are +removed from the mempool because they conflict with a new block. These +notifications were sent previously before the v0.19 release, but had been +broken since that release (bug +[#18325](https://github.com/bitcoin/bitcoin/issues/18325)). + +PSBT changes +------------ + +PSBTs will contain both the non-witness utxo and the witness utxo for segwit +inputs in order to restore compatibility with wallet software that are now +requiring the full previous transaction for segwit inputs. The witness utxo +is still provided to maintain compatibility with software which relied on its +existence to determine whether an input was segwit. + +0.20.1 change log +================= + +### Mining +- #19019 Fix GBT: Restore "!segwit" and "csv" to "rules" key (luke-jr) + +### P2P protocol and network code +- #19219 Replace automatic bans with discouragement filter (sipa) + +### Wallet +- #19300 Handle concurrent wallet loading (promag) +- #18982 Minimal fix to restore conflicted transaction notifications (ryanofsky) + +### RPC and other APIs +- #19524 Increment input value sum only once per UTXO in decodepsbt (fanquake) +- #19517 psbt: Increment input value sum only once per UTXO in decodepsbt (achow101) +- #19215 psbt: Include and allow both non_witness_utxo and witness_utxo for segwit inputs (achow101) + +### GUI +- #19097 Add missing QPainterPath include (achow101) +- #19059 update Qt base translations for macOS release (fanquake) + +### Build system +- #19152 improve build OS configure output (skmcontrib) +- #19536 qt, build: Fix QFileDialog for static builds (hebasto) + +### Tests and QA +- #19444 Remove cached directories and associated script blocks from appveyor config (sipsorcery) +- #18640 appveyor: Remove clcache (MarcoFalke) + +### Miscellaneous +- #19194 util: Don't reference errno when pthread fails (miztake) +- #18700 Fix locking on WSL using flock instead of fcntl (meshcollider) + +Credits +======= + +Thanks to everyone who directly contributed to this release: + +- Aaron Clauson +- Andrew Chow +- fanquake +- Hennadii Stepanov +- João Barbosa +- Luke Dashjr +- MarcoFalke +- MIZUTA Takeshi +- Pieter Wuille +- Russell Yanofsky +- sachinkm77 +- Samuel Dobson +- Wladimir J. van der Laan + +As well as to everyone that helped with translations on +[Transifex](https://www.transifex.com/bitcoin/bitcoin/). diff --git a/doc/release-process.md b/doc/release-process.md index 75edbc5983..074c85d2b5 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -18,20 +18,20 @@ Release Process ### Before every major release * On both the master branch and the new release branch: - - update `CLIENT_VERSION_MINOR` in [`configure.ac`](../configure.ac) - - update `CLIENT_VERSION_MINOR`, `PACKAGE_VERSION`, and `PACKAGE_STRING` in [`build_msvc/BGL_config.h`](/build_msvc/BGL_config.h) -* On the new release branch in [`configure.ac`](../configure.ac) and [`build_msvc/BGL_config.h`](/build_msvc/BGL_config.h) (see [this commit](https://github.com/BGL/BGL/commit/742f7dd)): - - set `CLIENT_VERSION_REVISION` to `0` + - update `CLIENT_VERSION_MAJOR` in [`configure.ac`](../configure.ac) + - update `CLIENT_VERSION_MAJOR`, `PACKAGE_VERSION`, and `PACKAGE_STRING` in [`build_msvc/bitcoin_config.h`](/build_msvc/bitcoin_config.h) +* On the new release branch in [`configure.ac`](../configure.ac) and [`build_msvc/bitcoin_config.h`](/build_msvc/bitcoin_config.h) (see [this commit](https://github.com/bitcoin/bitcoin/commit/742f7dd)): + - set `CLIENT_VERSION_MINOR` to `0` + - set `CLIENT_VERSION_BUILD` to `0` - set `CLIENT_VERSION_IS_RELEASE` to `true` #### Before branch-off -* Update hardcoded [seeds](/contrib/seeds/README.md), see [this pull request](https://github.com/BGL/BGL/pull/7415) for an example. -* Update [`src/chainparams.cpp`](/src/chainparams.cpp) m_assumed_blockchain_size and m_assumed_chain_state_size with the current size plus some overhead (see [this](#how-to-calculate-m_assumed_blockchain_size-and-m_assumed_chain_state_size) for information on how to calculate them). -* Update `src/chainparams.cpp` chainTxData with statistics about the transaction count and rate. Use the output of the RPC `getchaintxstats`, see - [this pull request](https://github.com/BGL/BGL/pull/17002) for an example. Reviewers can verify the results by running `getchaintxstats ` with the `window_block_count` and `window_last_block_hash` from your output. -* Update `src/chainparams.cpp` nMinimumChainWork with information from the getblockchaininfo rpc. -* Update `src/chainparams.cpp` defaultAssumeValid with information from the getblockhash rpc. +* Update hardcoded [seeds](/contrib/seeds/README.md), see [this pull request](https://github.com/bitcoin/bitcoin/pull/7415) for an example. +* Update [`src/chainparams.cpp`](/src/chainparams.cpp) m_assumed_blockchain_size and m_assumed_chain_state_size with the current size plus some overhead (see [this](#how-to-calculate-assumed-blockchain-and-chain-state-size) for information on how to calculate them). +* Update [`src/chainparams.cpp`](/src/chainparams.cpp) chainTxData with statistics about the transaction count and rate. Use the output of the `getchaintxstats` RPC, see + [this pull request](https://github.com/bitcoin/bitcoin/pull/20263) for an example. Reviewers can verify the results by running `getchaintxstats ` with the `window_block_count` and `window_final_block_hash` from your output. +* Update `src/chainparams.cpp` nMinimumChainWork and defaultAssumeValid (and the block height comment) with information from the `getblockheader` (and `getblockhash`) RPCs. - The selected value must not be orphaned so it may be useful to set the value two blocks back from the tip. - Testnet should be set some tens of thousands back from the tip due to reorgs there. - This update should be reviewed with a reindex-chainstate with assumevalid=0 to catch any defect @@ -121,7 +121,7 @@ Ensure gitian-builder is up-to-date: echo '5a60e0a4b3e0b4d655317b2f12a810211c50242138322b16e7e01c6fbb89d92f inputs/osslsigncode-2.0.tar.gz' | sha256sum -c popd -Create the macOS SDK tarball, see the [macOS build instructions](build-osx.md#deterministic-macos-dmg-notes) for details, and copy it into the inputs directory. +Create the macOS SDK tarball, see the [macdeploy instructions](/contrib/macdeploy/README.md#deterministic-macos-dmg-notes) for details, and copy it into the inputs directory. ### Optional: Seed the Gitian sources cache and offline git repositories @@ -219,7 +219,7 @@ Codesigner only: Commit the detached codesign payloads: rm -rf * tar xf signature-osx.tar.gz tar xf signature-win.tar.gz - git add -a + git add -A git commit -m "point to ${VERSION}" git tag -s v${VERSION} HEAD git push the current branch and new tag @@ -268,7 +268,6 @@ The list of files should be: ``` BGL-${VERSION}-aarch64-linux-gnu.tar.gz BGL-${VERSION}-arm-linux-gnueabihf.tar.gz -BGL-${VERSION}-i686-pc-linux-gnu.tar.gz BGL-${VERSION}-riscv64-linux-gnu.tar.gz BGL-${VERSION}-x86_64-linux-gnu.tar.gz BGL-${VERSION}-osx64.tar.gz @@ -329,8 +328,6 @@ BGL.org (see below for BGL.org update instructions). - Update packaging repo - - Notify BlueMatt so that he can start building [the PPAs](https://launchpad.net/~BGL/+archive/ubuntu/BGL) - - Push the flatpak to flathub, e.g. https://github.com/flathub/org.BGLcore.BGL-qt/pull/2 - Push the latest version to master (if applicable), e.g. https://github.com/BGL-core/packaging/pull/32 @@ -374,7 +371,7 @@ BGL.org (see below for BGL.org update instructions). ### Additional information -#### How to calculate `m_assumed_blockchain_size` and `m_assumed_chain_state_size` +#### How to calculate `m_assumed_blockchain_size` and `m_assumed_chain_state_size` Both variables are used as a guideline for how much space the user needs on their drive in total, not just strictly for the blockchain. Note that all values should be taken from a **fully synced** node and have an overhead of 5-10% added on top of its base value. diff --git a/doc/tor.md b/doc/tor.md index 207be99c63..a8e72424bc 100644 --- a/doc/tor.md +++ b/doc/tor.md @@ -14,12 +14,12 @@ outgoing connections, but more is possible. -proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy server will be used to try to reach .onion addresses as well. - -onion=ip:port Set the proxy server to use for Tor hidden services. You do not + -onion=ip:port Set the proxy server to use for Tor onion services. You do not need to set this if it's the same as -proxy. You can use -noonion - to explicitly disable access to hidden services. + to explicitly disable access to onion services. -listen When using -proxy, listening is disabled by default. If you want - to run a hidden service (see next section), you'll need to enable + to run an onion service (see next section), you'll need to enable it explicitly. -connect=X When behind a Tor proxy, you can specify .onion addresses instead @@ -110,7 +110,7 @@ Connecting to Tor's control socket API requires one of two authentication method configured. It also requires the control socket to be enabled, e.g. put `ControlPort 9051` in `torrc` config file. For cookie authentication the user running BGLd must have read access to the `CookieAuthFile` specified in Tor configuration. In some cases this is -preconfigured and the creation of a hidden service is automatic. If permission problems +preconfigured and the creation of an onion service is automatic. If permission problems are seen with `-debug=tor` they can be resolved by adding both the user running Tor and the user running BGLd to the same group and setting permissions appropriately. On Debian-based systems the user running BGLd can be added to the debian-tor group, diff --git a/doc/translation_strings_policy.md b/doc/translation_strings_policy.md index 95ac67a00e..26a6ba2310 100644 --- a/doc/translation_strings_policy.md +++ b/doc/translation_strings_policy.md @@ -23,7 +23,8 @@ On a high level, these strings are to be translated: ### GUI strings -Anything that appears to the user in the GUI is to be translated. This includes labels, menu items, button texts, tooltips and window titles. +Do not translate technical or extremely rare errors. +Anything else that appears to the user in the GUI is to be translated. This includes labels, menu items, button texts, tooltips and window titles. This includes messages passed to the GUI through the UI interface through `InitMessage`, `ThreadSafeMessageBox` or `ShowProgress`. General recommendations diff --git a/doc/zmq.md b/doc/zmq.md index aa71149746..c011e9cd10 100644 --- a/doc/zmq.md +++ b/doc/zmq.md @@ -1,6 +1,6 @@ # Block and Transaction Broadcasting with ZeroMQ -[ZeroMQ](http://zeromq.org/) is a lightweight wrapper around TCP +[ZeroMQ](https://zeromq.org/) is a lightweight wrapper around TCP connections, inter-process communication, and shared-memory, providing various message-oriented semantics such as publish/subscribe, request/reply, and push/pull. @@ -39,8 +39,9 @@ For version information, see [dependencies.md](dependencies.md). Typically, it is packaged by distributions as something like *libzmq3-dev*. The C++ wrapper for ZeroMQ is *not* needed. -In order to run the example Python client scripts in contrib/ one must -also install *python3-zmq*, though this is not necessary for daemon +In order to run the example Python client scripts in the `contrib/zmq/` +directory, one must also install [PyZMQ](https://github.com/zeromq/pyzmq) +(generally with `pip install pyzmq`), though this is not necessary for daemon operation. ## Enabling @@ -62,9 +63,11 @@ Currently, the following notifications are supported: -zmqpubhashblock=address -zmqpubrawblock=address -zmqpubrawtx=address + -zmqpubsequence=address The socket type is PUB and the address must be a valid ZeroMQ socket address. The same address can be used in more than one notification. +The same notification can be specified more than once. The option to set the PUB socket's outbound message high water mark (SNDHWM) may be set individually for each notification: @@ -73,12 +76,14 @@ The option to set the PUB socket's outbound message high water mark -zmqpubhashblockhwm=n -zmqpubrawblockhwm=n -zmqpubrawtxhwm=n + -zmqpubsequencehwm=address The high water mark value must be an integer greater than or equal to 0. For instance: $ BGLd -zmqpubhashtx=tcp://127.0.0.1:28332 \ + -zmqpubhashtx=tcp://192.168.1.2:28332 \ -zmqpubrawtx=ipc:///tmp/BGLd.tx.raw \ -zmqpubhashtxhwm=10000 @@ -86,7 +91,15 @@ Each PUB notification has a topic and body, where the header corresponds to the notification type. For instance, for the notification `-zmqpubhashtx` the topic is `hashtx` (no null terminator) and the body is the transaction hash (32 -bytes). +bytes) for all but `sequence` topic. For `sequence`, the body +is structured as the following based on the type of message: + + <32-byte hash>C : Blockhash connected + <32-byte hash>D : Blockhash disconnected + <32-byte hash>R<8-byte LE uint> : Transactionhash removed from mempool for non-block inclusion reason + <32-byte hash>A<8-byte LE uint> : Transactionhash added mempool + +Where the 8-byte uints correspond to the mempool sequence number. These options can also be provided in BGL.conf. @@ -96,7 +109,7 @@ ZeroMQ endpoint specifiers for TCP (and others) are documented in the Client side, then, the ZeroMQ subscriber socket must have the ZMQ_SUBSCRIBE option set to one or either of these prefixes (for instance, just `hash`); without doing so will result in no messages -arriving. Please see `contrib/zmq/zmq_sub.py` for a working example. +arriving. Please see [`contrib/zmq/zmq_sub.py`](/contrib/zmq/zmq_sub.py) for a working example. ## Remarks @@ -109,13 +122,20 @@ No authentication or authorization is done on connecting clients; it is assumed that the ZeroMQ port is exposed only to trusted entities, using other means such as firewalling. -Note that when the block chain tip changes, a reorganisation may occur -and just the tip will be notified. It is up to the subscriber to -retrieve the chain from the last known block to the new tip. Also note -that no notification occurs if the tip was in the active chain - this -is the case after calling invalidateblock RPC. +Note that for `*block` topics, when the block chain tip changes, +a reorganisation may occur and just the tip will be notified. +It is up to the subscriber to retrieve the chain from the last known +block to the new tip. Also note that no notification will occur if the tip +was in the active chain--as would be the case after calling invalidateblock RPC. +In contrast, the `sequence` topic publishes all block connections and +disconnections. There are several possibilities that ZMQ notification can get lost during transmission depending on the communication type you are using. BGLd appends an up-counting sequence number to each notification which allows listeners to detect lost notifications. + +The `sequence` topic refers specifically to the mempool sequence +number, which is also published along with all mempool events. This +is a different sequence value than in ZMQ itself in order to allow a total +ordering of mempool events to be constructed. diff --git a/share/examples/BGL.conf b/share/examples/BGL.conf index 6fbbfd1496..608cf6526b 100644 --- a/share/examples/BGL.conf +++ b/share/examples/BGL.conf @@ -20,8 +20,8 @@ # Bind to given address and always listen on it. Use [host]:port notation for IPv6 #bind= -# Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6 -#whitebind= +# Bind to given address and add permission flags to peers connecting to it. Use [host]:port notation for IPv6 +#whitebind=perm@ ############################################################## ## Quick Primer on addnode vs connect ## diff --git a/share/genbuild.sh b/share/genbuild.sh index 5d4a9fb1f4..1153df933f 100755 --- a/share/genbuild.sh +++ b/share/genbuild.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2012-2016 The Bitcoin Core developers +# Copyright (c) 2012-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. @@ -18,31 +18,27 @@ else exit 1 fi -git_check_in_repo() { - ! { git status --porcelain -uall --ignored "$@" 2>/dev/null || echo '??'; } | grep -q '?' -} - -DESC="" -SUFFIX="" -if [ "${BGL_GENBUILD_NO_GIT}" != "1" ] && [ -e "$(command -v git)" ] && [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ] && git_check_in_repo share/genbuild.sh; then +GIT_TAG="" +GIT_COMMIT="" +if [ "${BITCOIN_GENBUILD_NO_GIT}" != "1" ] && [ -e "$(command -v git)" ] && [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then # clean 'dirty' status of touched files that haven't been modified git diff >/dev/null 2>/dev/null # if latest commit is tagged and not dirty, then override using the tag name RAWDESC=$(git describe --abbrev=0 2>/dev/null) if [ "$(git rev-parse HEAD)" = "$(git rev-list -1 $RAWDESC 2>/dev/null)" ]; then - git diff-index --quiet HEAD -- && DESC=$RAWDESC + git diff-index --quiet HEAD -- && GIT_TAG=$RAWDESC fi # otherwise generate suffix from git, i.e. string like "59887e8-dirty" - SUFFIX=$(git rev-parse --short HEAD) - git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-dirty" + GIT_COMMIT=$(git rev-parse --short HEAD) + git diff-index --quiet HEAD -- || GIT_COMMIT="$GIT_COMMIT-dirty" fi -if [ -n "$DESC" ]; then - NEWINFO="#define BUILD_DESC \"$DESC\"" -elif [ -n "$SUFFIX" ]; then - NEWINFO="#define BUILD_SUFFIX $SUFFIX" +if [ -n "$GIT_TAG" ]; then + NEWINFO="#define BUILD_GIT_TAG \"$GIT_TAG\"" +elif [ -n "$GIT_COMMIT" ]; then + NEWINFO="#define BUILD_GIT_COMMIT \"$GIT_COMMIT\"" else NEWINFO="// No build information available" fi diff --git a/share/qt/Info.plist.in b/share/qt/Info.plist.in index 74bda7b9ee..fc453dee50 100644 --- a/share/qt/Info.plist.in +++ b/share/qt/Info.plist.in @@ -3,7 +3,7 @@ LSMinimumSystemVersion - 10.12.0 + 10.14.0 LSArchitecturePriority @@ -16,14 +16,14 @@ CFBundlePackageType APPL - CFBundleGetInfoString - @CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@.@CLIENT_VERSION_BUILD@, Copyright © 2009-@COPYRIGHT_YEAR@ @COPYRIGHT_HOLDERS_FINAL@ + NSHumanReadableCopyright + @CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_BUILD@, Copyright © 2009-@COPYRIGHT_YEAR@ @COPYRIGHT_HOLDERS_FINAL@ CFBundleShortVersionString - @CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@ + @CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_BUILD@ CFBundleVersion - @CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@ + @CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_BUILD@ CFBundleSignature ???? diff --git a/share/qt/extract_strings_qt.py b/share/qt/extract_strings_qt.py index 9201d9bd91..1369001d70 100755 --- a/share/qt/extract_strings_qt.py +++ b/share/qt/extract_strings_qt.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2012-2018 The Bitcoin Core developers +# Copyright (c) 2012-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' diff --git a/share/setup.nsi.in b/share/setup.nsi.in index a3224f015e..e06dc14c73 100644 --- a/share/setup.nsi.in +++ b/share/setup.nsi.in @@ -2,6 +2,11 @@ Name "@PACKAGE_NAME@ (64-bit)" RequestExecutionLevel highest SetCompressor /SOLID lzma +SetDateSave off + +# Uncomment these lines when investigating reproducibility errors +#SetCompress off +#SetDatablockOptimize off # General Symbol Definitions !define REGKEY "SOFTWARE\$(^Name)" @@ -52,14 +57,14 @@ CRCCheck on XPStyle on BrandingText " " ShowInstDetails show -VIProductVersion @CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@.@CLIENT_VERSION_BUILD@ +VIProductVersion @CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_BUILD@.0 VIAddVersionKey ProductName "@PACKAGE_NAME@" VIAddVersionKey ProductVersion "@PACKAGE_VERSION@" VIAddVersionKey CompanyName "${COMPANY}" VIAddVersionKey CompanyWebsite "${URL}" VIAddVersionKey FileVersion "@PACKAGE_VERSION@" -VIAddVersionKey FileDescription "" -VIAddVersionKey LegalCopyright "" +VIAddVersionKey FileDescription "Installer for @PACKAGE_NAME@" +VIAddVersionKey LegalCopyright "Copyright (C) 2009-@COPYRIGHT_YEAR@ @COPYRIGHT_HOLDERS_FINAL@" InstallDirRegKey HKCU "${REGKEY}" Path ShowUninstDetails show diff --git a/src/.changes! b/src/.changes! new file mode 100644 index 0000000000..dc99d90a9a --- /dev/null +++ b/src/.changes! @@ -0,0 +1,6597 @@ +diff --git a/src/BGL-tx.cpp b/src/BGL-tx.cpp +index 59cadadc..2ea1091c 100644 +--- a/src/BGL-tx.cpp ++++ b/src/BGL-tx.cpp +@@ -40,7 +40,6 @@ static void SetupBGLTxArgs(ArgsManager &argsman) + { + SetupHelpOptions(argsman); + +- argsman.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); + argsman.AddArg("-create", "Create new, empty TX.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); + argsman.AddArg("-json", "Select JSON output", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); + argsman.AddArg("-txid", "Output only the hex-encoded transaction id of the resultant transaction.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); +@@ -79,10 +78,6 @@ static void SetupBGLTxArgs(ArgsManager &argsman) + // + static int AppInitRawTx(int argc, char* argv[]) + { +-<<<<<<< HEAD:src/BGL-tx.cpp +- // +- // Parameters +- // + SetupBGLTxArgs(gArgs); + std::string error; + if (!gArgs.ParseParameters(argc, argv, error)) { +@@ -100,16 +95,13 @@ static int AppInitRawTx(int argc, char* argv[]) + + fCreateBlank = gArgs.GetBoolArg("-create", false); + +- if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) { ++ if (argc < 2 || HelpRequested(gArgs)) { + // First part of help message is specific to this utility +- std::string strUsage = PACKAGE_NAME " BGL-tx utility version " + FormatFullVersion() + "\n"; +- if (!gArgs.IsArgSet("-version")) { +- strUsage += "\n" +- "Usage: BGL-tx [options] [commands] Update hex-encoded BGL transaction\n" +- "or: BGL-tx [options] -create [commands] Create hex-encoded BGL transaction\n" +- "\n"; +- strUsage += gArgs.GetHelpMessage(); +- } ++ std::string strUsage = PACKAGE_NAME " BGL-tx utility version " + FormatFullVersion() + "\n\n" + ++ "Usage: BGL-tx [options] [commands] Update hex-encoded BGL transaction\n" + ++ "or: BGL-tx [options] -create [commands] Create hex-encoded BGL transaction\n" + ++ "\n"; ++ strUsage += gArgs.GetHelpMessage(); + + tfm::format(std::cout, "%s", strUsage); + +diff --git a/src/Makefile.am b/src/Makefile.am +index 93dd186d..18574188 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -20,9 +20,8 @@ else + LIBUNIVALUE = $(UNIVALUE_LIBS) + endif + +-BGL_INCLUDES=-I$(builddir) $(BDB_CPPFLAGS) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) ++BGL_INCLUDES=-I$(builddir) -I$(srcdir)/secp256k1/include $(BDB_CPPFLAGS) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) + +-BGL_INCLUDES += -I$(srcdir)/secp256k1/include + BGL_INCLUDES += $(UNIVALUE_CFLAGS) + + LIBBGL_SERVER=libBGL_server.a +@@ -299,13 +298,14 @@ libBGL_server_a_SOURCES = \ + index/blockfilterindex.cpp \ + index/txindex.cpp \ + init.cpp \ ++ interfaces/chain.cpp \ ++ interfaces/node.cpp \ + miner.cpp \ + net.cpp \ + net_processing.cpp \ + node/coin.cpp \ + node/coinstats.cpp \ + node/context.cpp \ +- node/interfaces.cpp \ + node/psbt.cpp \ + node/transaction.cpp \ + node/ui_interface.cpp \ +@@ -358,13 +358,13 @@ endif + libBGL_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(BGL_INCLUDES) $(SQLITE_CFLAGS) + libBGL_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) + libBGL_wallet_a_SOURCES = \ ++ interfaces/wallet.cpp \ + wallet/coincontrol.cpp \ + wallet/context.cpp \ + wallet/crypter.cpp \ + wallet/db.cpp \ + wallet/feebumper.cpp \ + wallet/fees.cpp \ +- wallet/interfaces.cpp \ + wallet/load.cpp \ + wallet/rpcdump.cpp \ + wallet/rpcwallet.cpp \ +diff --git a/src/banman.cpp b/src/banman.cpp +index 5933c1ce..9a829aa2 100644 +--- a/src/banman.cpp ++++ b/src/banman.cpp +@@ -120,20 +120,19 @@ bool BanMan::IsBanned(const CSubNet& sub_net) + + void BanMan::Ban(const CNetAddr& net_addr, int64_t ban_time_offset, bool since_unix_epoch) + { +- if (ban_reason == BanReasonNodeMisbehaving) { +- LOCK(m_cs_banned); +- m_discouraged.insert(net_addr.GetAddrBytes()); +- return; +- } + CSubNet sub_net(net_addr); + Ban(sub_net, ban_time_offset, since_unix_epoch); + } + + void BanMan::Discourage(const CNetAddr& net_addr) + { ++ LOCK(m_cs_banned); ++ m_discouraged.insert(net_addr.GetAddrBytes()); ++} + +- assert(ban_reason == BanReasonManuallyAdded); +- CBanEntry ban_entry(GetTime(), ban_reason); ++void BanMan::Ban(const CSubNet& sub_net, int64_t ban_time_offset, bool since_unix_epoch) ++{ ++ CBanEntry ban_entry(GetTime()); + + int64_t normalized_ban_time_offset = ban_time_offset; + bool normalized_since_unix_epoch = since_unix_epoch; +diff --git a/src/init.cpp b/src/init.cpp +index 53e2c106..ff0ac231 100644 +--- a/src/init.cpp ++++ b/src/init.cpp +@@ -1584,7 +1584,6 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA + + do { + const int64_t load_block_index_start_time = GetTimeMillis(); +- bool is_coinsview_empty; + try { + LOCK(cs_main); + chainman.InitializeChainstate(*Assert(node.mempool)); +@@ -1644,6 +1643,7 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA + // block tree into BlockIndex()! + bool failed_chainstate_init = false; + ++ + for (CChainState* chainstate : chainman.GetAll()) { + chainstate->InitCoinsDB( + /* cache_size_bytes */ nCoinDBCache, +@@ -1664,25 +1664,30 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA + break; + } + +- // ReplayBlocks is a no-op if we cleared the coinsviewdb with -reindex or -reindex-chainstate +- if (!::ChainstateActive().ReplayBlocks(chainparams)) { +- strLoadError = _("Unable to replay blocks. You will need to rebuild the database using -reindex-chainstate.").translated; +- break; +- } ++ // ReplayBlocks is a no-op if we cleared the coinsviewdb with -reindex or -reindex-chainstate ++ if (!chainstate->ReplayBlocks(chainparams)) { ++ strLoadError = _("Unable to replay blocks. You will need to rebuild the database using -reindex-chainstate."); ++ failed_chainstate_init = true; ++ break; ++ } + + // The on-disk coinsdb is now in a good state, create the cache + chainstate->InitCoinsCache(nCoinCacheUsage); + assert(chainstate->CanFlushToDisk()); + +- is_coinsview_empty = fReset || fReindexChainState || +- ::ChainstateActive().CoinsTip().GetBestBlock().IsNull(); +- if (!is_coinsview_empty) { +- // LoadChainTip initializes the chain based on CoinsTip()'s best block +- if (!::ChainstateActive().LoadChainTip(chainparams)) { +- strLoadError = _("Error initializing block database").translated; +- break; ++ if (!is_coinsview_empty(chainstate)) { ++ // LoadChainTip initializes the chain based on CoinsTip()'s best block ++ if (!chainstate->LoadChainTip(chainparams)) { ++ strLoadError = _("Error initializing block database"); ++ failed_chainstate_init = true; ++ break; // out of the per-chainstate loop ++ } ++ assert(chainstate->m_chain.Tip() != nullptr); + } +- assert(::ChainActive().Tip() != nullptr); ++ } ++ ++ if (failed_chainstate_init) { ++ break; // out of the chainstate activation do-while + } + } catch (const std::exception& e) { + LogPrintf("%s\n", e.what()); +@@ -1709,23 +1714,10 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA + } + } + ++ bool failed_verification = false; ++ + try { + LOCK(cs_main); +- if (!is_coinsview_empty) { +- uiInterface.InitMessage(_("Verifying blocks...").translated); +- if (fHavePruned && gArgs.GetArg("-checkblocks", DEFAULT_CHECKBLOCKS) > MIN_BLOCKS_TO_KEEP) { +- LogPrintf("Prune: pruned datadir may not have more than %d blocks; only checking available blocks\n", +- MIN_BLOCKS_TO_KEEP); +- } +- +- CBlockIndex* tip = ::ChainActive().Tip(); +- RPCNotifyBlockChange(true, tip); +- if (tip && tip->nTime > GetAdjustedTime() + 2 * 60 * 60) { +- strLoadError = _("The block database contains a block which appears to be from the future. " +- "This may be due to your computer's date and time being set incorrectly. " +- "Only rebuild the block database if you are sure that your computer's date and time are correct").translated; +- break; +- } + + for (CChainState* chainstate : chainman.GetAll()) { + if (!is_coinsview_empty(chainstate)) { +diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h +index 55a07ba1..ebf35077 100644 +--- a/src/interfaces/chain.h ++++ b/src/interfaces/chain.h +@@ -1,4 +1,4 @@ +-// Copyright (c) 2018-2020 The BGL Core developers ++// Copyright (c) 2018-2020 The Bitcoin Core developers + // Distributed under the MIT software license, see the accompanying + // file COPYING or http://www.opensource.org/licenses/mit-license.php. + +@@ -35,6 +35,27 @@ namespace interfaces { + class Handler; + class Wallet; + ++//! Helper for findBlock to selectively return pieces of block data. ++class FoundBlock ++{ ++public: ++ FoundBlock& hash(uint256& hash) { m_hash = &hash; return *this; } ++ FoundBlock& height(int& height) { m_height = &height; return *this; } ++ FoundBlock& time(int64_t& time) { m_time = &time; return *this; } ++ FoundBlock& maxTime(int64_t& max_time) { m_max_time = &max_time; return *this; } ++ FoundBlock& mtpTime(int64_t& mtp_time) { m_mtp_time = &mtp_time; return *this; } ++ //! Read block data from disk. If the block exists but doesn't have data ++ //! (for example due to pruning), the CBlock variable will be set to null. ++ FoundBlock& data(CBlock& data) { m_data = &data; return *this; } ++ ++ uint256* m_hash = nullptr; ++ int* m_height = nullptr; ++ int64_t* m_time = nullptr; ++ int64_t* m_max_time = nullptr; ++ int64_t* m_mtp_time = nullptr; ++ CBlock* m_data = nullptr; ++}; ++ + //! Interface giving clients (wallet processes, maybe other analysis tools in + //! the future) ability to access to the chain state, receive notifications, + //! estimate fees, and submit transactions. +@@ -43,12 +64,7 @@ class Wallet; + //! internal workings of the BGL node, and not being very convenient to use. + //! Chain methods should be cleaned up and simplified over time. Examples: + //! +-//! * The Chain::lock() method, which lets clients delay chain tip updates +-//! should be removed when clients are able to respond to updates +-//! asynchronously +-//! (https://github.com/BGL/BGL/pull/10973#issuecomment-380101269). +-//! +-//! * The initMessage() and showProgress() methods which the wallet uses to send ++//! * The initMessages() and showProgress() methods which the wallet uses to send + //! notifications to the GUI should go away when GUI and wallet can directly + //! communicate with each other without going through the node + //! (https://github.com/BGL/BGL/pull/15288#discussion_r253321096). +@@ -69,65 +85,6 @@ class Chain + public: + virtual ~Chain() {} + +- //! Interface for querying locked chain state, used by legacy code that +- //! assumes state won't change between calls. New code should avoid using +- //! the Lock interface and instead call higher-level Chain methods +- //! that return more information so the chain doesn't need to stay locked +- //! between calls. +- class Lock +- { +- public: +- virtual ~Lock() {} +- +- //! Get block hash. Height must be valid or this function will abort. +- virtual uint256 getBlockHash(int height) = 0; +- +- //! Get block time. Height must be valid or this function will abort. +- virtual int64_t getBlockTime(int height) = 0; +- +- //! Get block median time past. Height must be valid or this function +- //! will abort. +- virtual int64_t getBlockMedianTimePast(int height) = 0; +- +- //! Check that the block is available on disk (i.e. has not been +- //! pruned), and contains transactions. +- virtual bool haveBlockOnDisk(int height) = 0; +- +- //! Return height of the first block in the chain with timestamp equal +- //! or greater than the given time and height equal or greater than the +- //! given height, or nullopt if there is no block with a high enough +- //! timestamp and height. Also return the block hash as an optional output parameter +- //! (to avoid the cost of a second lookup in case this information is needed.) +- virtual Optional findFirstBlockWithTimeAndHeight(int64_t time, int height, uint256* hash) = 0; +- +- //! Return height of last block in the specified range which is pruned, or +- //! nullopt if no block in the range is pruned. Range is inclusive. +- virtual Optional findPruned(int start_height = 0, Optional stop_height = nullopt) = 0; +- +- //! Return height of the specified block if it is on the chain, otherwise +- //! return the height of the highest block on chain that's an ancestor +- //! of the specified block, or nullopt if there is no common ancestor. +- //! Also return the height of the specified block as an optional output +- //! parameter (to avoid the cost of a second hash lookup in case this +- //! information is desired). +- virtual Optional findFork(const uint256& hash, Optional* height) = 0; +- +- //! Get locator for the current chain tip. +- virtual CBlockLocator getTipLocator() = 0; +- +- //! Return height of the highest block on chain in common with the locator, +- //! which will either be the original block used to create the locator, +- //! or one of its ancestors. +- virtual Optional findLocatorFork(const CBlockLocator& locator) = 0; +- +- //! Check if transaction will be final given chain height current time. +- virtual bool checkFinalTx(const CTransaction& tx) = 0; +- }; +- +- //! Return Lock interface. Chain is locked when this is called, and +- //! unlocked when the returned interface is freed. +- virtual std::unique_ptr lock(bool try_lock = false) = 0; +- + //! Get current chain height, not including genesis block (returns 0 if + //! chain only contains genesis block, nullopt if chain does not contain + //! any blocks) +@@ -163,17 +120,38 @@ public: + //! Check if transaction will be final given chain height current time. + virtual bool checkFinalTx(const CTransaction& tx) = 0; + +- + //! Return whether node has the block and optionally return block metadata + //! or contents. +- //! +- //! If a block pointer is provided to retrieve the block contents, and the +- //! block exists but doesn't have data (for example due to pruning), the +- //! block will be empty and all fields set to null. +- virtual bool findBlock(const uint256& hash, +- CBlock* block = nullptr, +- int64_t* time = nullptr, +- int64_t* max_time = nullptr) = 0; ++ virtual bool findBlock(const uint256& hash, const FoundBlock& block={}) = 0; ++ ++ //! Find first block in the chain with timestamp >= the given time ++ //! and height >= than the given height, return false if there is no block ++ //! with a high enough timestamp and height. Optionally return block ++ //! information. ++ virtual bool findFirstBlockWithTimeAndHeight(int64_t min_time, int min_height, const FoundBlock& block={}) = 0; ++ ++ //! Find next block if block is part of current chain. Also flag if ++ //! there was a reorg and the specified block hash is no longer in the ++ //! current chain, and optionally return block information. ++ virtual bool findNextBlock(const uint256& block_hash, int block_height, const FoundBlock& next={}, bool* reorg=nullptr) = 0; ++ ++ //! Find ancestor of block at specified height and optionally return ++ //! ancestor information. ++ virtual bool findAncestorByHeight(const uint256& block_hash, int ancestor_height, const FoundBlock& ancestor_out={}) = 0; ++ ++ //! Return whether block descends from a specified ancestor, and ++ //! optionally return ancestor information. ++ virtual bool findAncestorByHash(const uint256& block_hash, ++ const uint256& ancestor_hash, ++ const FoundBlock& ancestor_out={}) = 0; ++ ++ //! Find most recent common ancestor between two blocks and optionally ++ //! return block information. ++ virtual bool findCommonAncestor(const uint256& block_hash1, ++ const uint256& block_hash2, ++ const FoundBlock& ancestor_out={}, ++ const FoundBlock& block1_out={}, ++ const FoundBlock& block2_out={}) = 0; + + //! Look up unspent output information. Returns coins in the mempool and in + //! the current chain UTXO set. Iterates through all the keys in the map and +@@ -184,6 +162,11 @@ public: + //! the specified block hash are verified. + virtual double guessVerificationProgress(const uint256& block_hash) = 0; + ++ //! Return true if data is available for all blocks in the specified range ++ //! of blocks. This checks all blocks that are ancestors of block_hash in ++ //! the height range from min_height to max_height, inclusive. ++ virtual bool hasBlocks(const uint256& block_hash, int min_height = 0, Optional max_height = {}) = 0; ++ + //! Check if transaction is RBF opt in. + virtual RBFTransactionState isRBFOptIn(const CTransaction& tx) = 0; + +@@ -268,7 +251,7 @@ public: + }; + + //! Register handler for notifications. +- virtual std::unique_ptr handleNotifications(Notifications& notifications) = 0; ++ virtual std::unique_ptr handleNotifications(std::shared_ptr notifications) = 0; + + //! Wait for pending notifications to be processed unless block hash points to the current + //! chain tip. +diff --git a/src/merkleblock.cpp b/src/merkleblock.cpp +index 3649e7e6..b571d463 100644 +--- a/src/merkleblock.cpp ++++ b/src/merkleblock.cpp +@@ -9,6 +9,24 @@ + #include + + ++std::vector BitsToBytes(const std::vector& bits) ++{ ++ std::vector ret((bits.size() + 7) / 8); ++ for (unsigned int p = 0; p < bits.size(); p++) { ++ ret[p / 8] |= bits[p] << (p % 8); ++ } ++ return ret; ++} ++ ++std::vector BytesToBits(const std::vector& bytes) ++{ ++ std::vector ret(bytes.size() * 8); ++ for (unsigned int p = 0; p < ret.size(); p++) { ++ ret[p] = (bytes[p / 8] & (1 << (p % 8))) != 0; ++ } ++ return ret; ++} ++ + CMerkleBlock::CMerkleBlock(const CBlock& block, CBloomFilter* filter, const std::set* txids) + { + header = block.GetBlockHeader(); +diff --git a/src/merkleblock.h b/src/merkleblock.h +index fe68c8cf..2a8fcc9e 100644 +--- a/src/merkleblock.h ++++ b/src/merkleblock.h +@@ -1,5 +1,5 @@ + // Copyright (c) 2009-2010 Satoshi Nakamoto +-// Copyright (c) 2009-2018 The Bitcoin Core developers ++// Copyright (c) 2009-2018 The BGL Core developers + // Distributed under the MIT software license, see the accompanying + // file COPYING or http://www.opensource.org/licenses/mit-license.php. + +@@ -13,6 +13,10 @@ + + #include + ++// Helper functions for serialization. ++std::vector BitsToBytes(const std::vector& bits); ++std::vector BytesToBits(const std::vector& bytes); ++ + /** Data structure that represents a partial merkle tree. + * + * It represents a subset of the txid's of a known block, in a way that +@@ -81,27 +85,14 @@ protected: + + public: + +- /** serialization implementation */ +- ADD_SERIALIZE_METHODS; +- +- template +- inline void SerializationOp(Stream& s, Operation ser_action) { +- READWRITE(nTransactions); +- READWRITE(vHash); +- std::vector vBytes; +- if (ser_action.ForRead()) { +- READWRITE(vBytes); +- CPartialMerkleTree &us = *(const_cast(this)); +- us.vBits.resize(vBytes.size() * 8); +- for (unsigned int p = 0; p < us.vBits.size(); p++) +- us.vBits[p] = (vBytes[p / 8] & (1 << (p % 8))) != 0; +- us.fBad = false; +- } else { +- vBytes.resize((vBits.size()+7)/8); +- for (unsigned int p = 0; p < vBits.size(); p++) +- vBytes[p / 8] |= vBits[p] << (p % 8); +- READWRITE(vBytes); +- } ++ SERIALIZE_METHODS(CPartialMerkleTree, obj) ++ { ++ READWRITE(obj.nTransactions, obj.vHash); ++ std::vector bytes; ++ SER_WRITE(obj, bytes = BitsToBytes(obj.vBits)); ++ READWRITE(bytes); ++ SER_READ(obj, obj.vBits = BytesToBits(bytes)); ++ SER_READ(obj, obj.fBad = false); + } + + /** Construct a partial merkle tree from a list of transaction ids, and a mask that selects a subset of them */ +@@ -157,13 +148,7 @@ public: + + CMerkleBlock() {} + +- ADD_SERIALIZE_METHODS; +- +- template +- inline void SerializationOp(Stream& s, Operation ser_action) { +- READWRITE(header); +- READWRITE(txn); +- } ++ SERIALIZE_METHODS(CMerkleBlock, obj) { READWRITE(obj.header, obj.txn); } + + private: + // Combined constructor to consolidate code +diff --git a/src/miner.cpp b/src/miner.cpp +index 6e47f89f..858948fc 100644 +--- a/src/miner.cpp ++++ b/src/miner.cpp +@@ -39,6 +39,17 @@ int64_t UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParam + return nNewTime - nOldTime; + } + ++void RegenerateCommitments(CBlock& block) ++{ ++ CMutableTransaction tx{*block.vtx.at(0)}; ++ tx.vout.erase(tx.vout.begin() + GetWitnessCommitmentIndex(block)); ++ block.vtx.at(0) = MakeTransactionRef(tx); ++ ++ GenerateCoinbaseCommitment(block, WITH_LOCK(cs_main, return LookupBlockIndex(block.hashPrevBlock)), Params().GetConsensus()); ++ ++ block.hashMerkleRoot = BlockMerkleRoot(block); ++} ++ + BlockAssembler::Options::Options() { + blockMinFeeRate = CFeeRate(DEFAULT_BLOCK_MIN_TX_FEE); + nBlockMaxWeight = DEFAULT_BLOCK_MAX_WEIGHT; +diff --git a/src/miner.h b/src/miner.h +index e96b2bc4..fe83aaf2 100644 +--- a/src/miner.h ++++ b/src/miner.h +@@ -201,4 +201,7 @@ private: + void IncrementExtraNonce(CBlock* pblock, const CBlockIndex* pindexPrev, unsigned int& nExtraNonce); + int64_t UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev); + ++/** Update an old GenerateCoinbaseCommitment from CreateNewBlock after the block txs have changed */ ++void RegenerateCommitments(CBlock& block); ++ + #endif // BGL_MINER_H +diff --git a/src/net.cpp b/src/net.cpp +index 6deb5119..5f16143f 100644 +--- a/src/net.cpp ++++ b/src/net.cpp +@@ -354,6 +354,11 @@ CNode* CConnman::FindNode(const CService& addr) + return nullptr; + } + ++bool CConnman::AlreadyConnectedToAddress(const CAddress& addr) ++{ ++ return FindNode(static_cast(addr)) || FindNode(addr.ToStringIPPort()); ++} ++ + bool CConnman::CheckIncomingNonce(uint64_t nonce) + { + LOCK(cs_vNodes); +@@ -630,22 +635,19 @@ bool CNode::ReceiveMsgBytes(Span msg_bytes, bool& complete) + const auto time = GetTime(); + LOCK(cs_vRecv); + nLastRecv = std::chrono::duration_cast(time).count(); +- nRecvBytes += nBytes; +- while (nBytes > 0) { ++ nRecvBytes += msg_bytes.size(); ++ while (msg_bytes.size() > 0) { + // absorb network data +- int handled = m_deserializer->Read(pch, nBytes); ++ int handled = m_deserializer->Read(msg_bytes); + if (handled < 0) { + // Serious header problem, disconnect from the peer. + return false; + } + +- pch += handled; +- nBytes -= handled; +- + if (m_deserializer->Complete()) { + // decompose a transport agnostic CNetMessage from the deserializer + uint32_t out_err_raw_size{0}; +- Optional result{m_deserializer->GetMessage(Params().MessageStart(), time, out_err_raw_size)}; ++ Optional result{m_deserializer->GetMessage(time, out_err_raw_size)}; + if (!result) { + // Message deserialization failed. Drop the message but don't disconnect the peer. + // store the size of the corrupt message +@@ -675,9 +677,9 @@ int V1TransportDeserializer::readHeader(Span msg_bytes) + { + // copy data to temporary parsing buffer + unsigned int nRemaining = CMessageHeader::HEADER_SIZE - nHdrPos; +- unsigned int nCopy = std::min(nRemaining, nBytes); ++ unsigned int nCopy = std::min(nRemaining, msg_bytes.size()); + +- memcpy(&hdrbuf[nHdrPos], pch, nCopy); ++ memcpy(&hdrbuf[nHdrPos], msg_bytes.data(), nCopy); + nHdrPos += nCopy; + + // if header incomplete, exit +@@ -714,7 +716,7 @@ int V1TransportDeserializer::readHeader(Span msg_bytes) + int V1TransportDeserializer::readData(Span msg_bytes) + { + unsigned int nRemaining = hdr.nMessageSize - nDataPos; +- unsigned int nCopy = std::min(nRemaining, nBytes); ++ unsigned int nCopy = std::min(nRemaining, msg_bytes.size()); + + if (vRecv.size() < nDataPos + nCopy) { + // Allocate up to 256 KiB ahead, but never more than the total message size. +@@ -736,7 +738,7 @@ const uint256& V1TransportDeserializer::GetMessageHash() const + return data_hash; + } + +-Optional V1TransportDeserializer::GetMessage(const CMessageHeader::MessageStartChars& message_start, const std::chrono::microseconds time, uint32_t& out_err_raw_size) ++Optional V1TransportDeserializer::GetMessage(const std::chrono::microseconds time, uint32_t& out_err_raw_size) + { + // decompose a single CNetMessage from the TransportDeserializer + Optional msg(std::move(vRecv)); +@@ -1084,7 +1086,6 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) { + // on all platforms. Set it again here just to be sure. + SetSocketNoDelay(hSocket); + +- + // Don't accept connections from banned peers. + bool banned = m_banman && m_banman->IsBanned(addr); + if (!NetPermissions::HasFlag(permissionFlags, NetPermissionFlags::PF_NOBAN) && banned) +@@ -1474,7 +1475,10 @@ void CConnman::SocketHandler() + { + bool notify = false; + if (!pnode->ReceiveMsgBytes(Span(pchBuf, nBytes), notify)) ++ pnode->CloseSocketDisconnect(); ++ RecordBytesRecv(nBytes); + if (notify) { ++ size_t nSizeAdded = 0; + auto it(pnode->vRecvMsg.begin()); + for (; it != pnode->vRecvMsg.end(); ++it) { + // vRecvMsg contains only completed CNetMessage +@@ -1591,7 +1595,7 @@ static void ThreadMapPort() + if (externalIPAddress[0]) { + CNetAddr resolved; + if (LookupHost(externalIPAddress, resolved, false)) { +- LogPrintf("UPnP : ExternalIPAddress = %s\n", resolved.ToString()); ++ LogPrintf("UPnP: ExternalIPAddress = %s\n", resolved.ToString()); + AddLocal(resolved, LOCAL_UPNP); + } + } else { +@@ -1718,7 +1722,7 @@ void CConnman::ThreadDNSAddressSeed() + { + LOCK(cs_vNodes); + for (const CNode* pnode : vNodes) { +- nRelevant += pnode->fSuccessfullyConnected && !pnode->IsFeelerConn() && !pnode->IsAddrFetchConn() && !pnode->IsManualConn() && !pnode->fInbound; ++ if (pnode->fSuccessfullyConnected && pnode->IsOutboundOrBlockRelayConn()) ++nRelevant; + } + } + if (nRelevant >= 2) { +@@ -1732,7 +1736,6 @@ void CConnman::ThreadDNSAddressSeed() + } + } + } +- seeds_right_now += DNSSEEDS_TO_QUERY_AT_ONCE; + } + + if (interruptNet) return; +@@ -1744,6 +1747,7 @@ void CConnman::ThreadDNSAddressSeed() + if (!interruptNet.sleep_for(std::chrono::seconds{1})) return; + } while (!fNetworkActive); + } ++ + LogPrintf("Loading addresses from DNS seed %s\n", seed); + if (HaveNameProxy()) { + AddAddrFetch(seed); +@@ -1851,6 +1855,7 @@ void CConnman::ThreadOpenConnections(const std::vector connect) + for (int i = 0; i < 10 && i < nLoop; i++) + { + if (!interruptNet.sleep_for(std::chrono::milliseconds(500))) ++ return; + } + } + if (!interruptNet.sleep_for(std::chrono::milliseconds(500))) +@@ -1962,6 +1967,17 @@ void CConnman::ThreadOpenConnections(const std::vector connect) + int nTries = 0; + while (!interruptNet) + { ++ if (anchor && !m_anchors.empty()) { ++ const CAddress addr = m_anchors.back(); ++ m_anchors.pop_back(); ++ if (!addr.IsValid() || IsLocal(addr) || !IsReachable(addr) || ++ !HasAllDesirableServiceFlags(addr.nServices) || ++ setConnected.count(addr.GetGroup(addrman.m_asmap))) continue; ++ addrConnect = addr; ++ LogPrint(BCLog::NET, "Trying to make an anchor connection to %s\n", addrConnect.ToString()); ++ break; ++ } ++ + // If we didn't find an appropriate destination after trying 100 addresses fetched from addrman, + // stop this loop, and let the outer loop run again (which sleeps, adds seed nodes, recalculates + // already-connected network ranges, ...) before trying new addrman addresses. +@@ -1969,11 +1985,30 @@ void CConnman::ThreadOpenConnections(const std::vector connect) + if (nTries > 100) + break; + +- CAddrInfo addr = addrman.SelectTriedCollision(); ++ CAddrInfo addr; + +- // SelectTriedCollision returns an invalid address if it is empty. +- if (!fFeeler || !addr.IsValid()) { +- addr = addrman.Select(fFeeler); ++ if (fFeeler) { ++ // First, try to get a tried table collision address. This returns ++ // an empty (invalid) address if there are no collisions to try. ++ addr = addrman.SelectTriedCollision(); ++ ++ if (!addr.IsValid()) { ++ // No tried table collisions. Select a new table address ++ // for our feeler. ++ addr = addrman.Select(true); ++ } else if (AlreadyConnectedToAddress(addr)) { ++ // If test-before-evict logic would have us connect to a ++ // peer that we're already connected to, just mark that ++ // address as Good(). We won't be able to initiate the ++ // connection anyway, so this avoids inadvertently evicting ++ // a currently-connected peer. ++ addrman.Good(addr); ++ // Select a new table address for our feeler instead. ++ addr = addrman.Select(true); ++ } ++ } else { ++ // Not a feeler ++ addr = addrman.Select(); + } + + // Require outbound connections, other than feelers, to be to distinct network groups +@@ -2135,7 +2170,7 @@ void CConnman::OpenNetworkConnection(const CAddress& addrConnect, bool fCountFai + } + if (!pszDest) { + bool banned_or_discouraged = m_banman && (m_banman->IsDiscouraged(addrConnect) || m_banman->IsBanned(addrConnect)); +- if (IsLocal(addrConnect) || FindNode(static_cast(addrConnect)) || banned_or_discouraged || FindNode(addrConnect.ToStringIPPort())) { ++ if (IsLocal(addrConnect) || banned_or_discouraged || AlreadyConnectedToAddress(addrConnect)) { + return; + } + } else if (FindNode(std::string(pszDest))) +@@ -2531,7 +2566,7 @@ void CConnman::Interrupt() + } + } + +-void CConnman::Stop() ++void CConnman::StopThreads() + { + if (threadMessageHandler.joinable()) + threadMessageHandler.join(); +@@ -2543,9 +2578,11 @@ void CConnman::Stop() + threadDNSAddressSeed.join(); + if (threadSocketHandler.joinable()) + threadSocketHandler.join(); ++} + +- if (fAddressesInitialized) +- { ++void CConnman::StopNodes() ++{ ++ if (fAddressesInitialized) { + DumpAddresses(); + fAddressesInitialized = false; + +@@ -2560,6 +2597,7 @@ void CConnman::Stop() + } + + // Close sockets ++ LOCK(cs_vNodes); + for (CNode* pnode : vNodes) + pnode->CloseSocketDisconnect(); + for (ListenSocket& hListenSocket : vhListenSocket) +@@ -2568,10 +2606,10 @@ void CConnman::Stop() + LogPrintf("CloseSocket(hListenSocket) failed with error %s\n", NetworkErrorString(WSAGetLastError())); + + // clean up some globals (to help leak detection) +- for (CNode *pnode : vNodes) { ++ for (CNode* pnode : vNodes) { + DeleteNode(pnode); + } +- for (CNode *pnode : vNodesDisconnected) { ++ for (CNode* pnode : vNodesDisconnected) { + DeleteNode(pnode); + } + vNodes.clear(); +@@ -2585,8 +2623,8 @@ void CConnman::DeleteNode(CNode* pnode) + { + assert(pnode); + bool fUpdateConnectionTime = false; +- m_msgproc->FinalizeNode(pnode->GetId(), fUpdateConnectionTime); +- if(fUpdateConnectionTime) { ++ m_msgproc->FinalizeNode(*pnode, fUpdateConnectionTime); ++ if (fUpdateConnectionTime) { + addrman.Connected(pnode->addr); + } + delete pnode; +@@ -2895,6 +2933,7 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn + m_conn_type(conn_type_in), + nLocalServices(nLocalServicesIn), + nMyStartingHeight(nMyStartingHeightIn), ++ m_inbound_onion(inbound_onion) + { + hSocket = hSocketIn; + addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn; +diff --git a/src/net.h b/src/net.h +index 792412a6..e0335a52 100644 +--- a/src/net.h ++++ b/src/net.h +@@ -154,7 +154,7 @@ enum class ConnectionType { + * evict only if this longer-known peer is offline. + * - move node addresses from New to Tried table, so that we have more + * connectable addresses in our AddrMan. +- * Note that in the literature ("Eclipse Attacks on Bitcoin’s Peer-to-Peer Network") ++ * Note that in the literature ("Eclipse Attacks on BGL’s Peer-to-Peer Network") + * only the latter feature is referred to as "feeler connections", + * although in our codebase feeler connections encompass test-before-evict as well. + * We make these connections approximately every FEELER_INTERVAL: +@@ -256,16 +256,13 @@ public: + ~CConnman(); + bool Start(CScheduler& scheduler, const Options& options); + +- // TODO: Remove NO_THREAD_SAFETY_ANALYSIS. Lock cs_vNodes before reading the variable vNodes. +- // +- // When removing NO_THREAD_SAFETY_ANALYSIS be aware of the following lock order requirements: +- // * CheckForStaleTipAndEvictPeers locks cs_main before indirectly calling GetExtraOutboundCount +- // which locks cs_vNodes. +- // * ProcessMessage locks cs_main and g_cs_orphans before indirectly calling ForEachNode which +- // locks cs_vNodes. +- // +- // Thus the implicit locking order requirement is: (1) cs_main, (2) g_cs_orphans, (3) cs_vNodes. +- void Stop() NO_THREAD_SAFETY_ANALYSIS; ++ void StopThreads(); ++ void StopNodes(); ++ void Stop() ++ { ++ StopThreads(); ++ StopNodes(); ++ }; + + void Interrupt(); + bool GetNetworkActive() const { return fNetworkActive; }; +@@ -445,6 +442,12 @@ private: + CNode* FindNode(const std::string& addrName); + CNode* FindNode(const CService& addr); + ++ /** ++ * Determine whether we're already connected to a given address, in order to ++ * avoid initiating duplicate connections. ++ */ ++ bool AlreadyConnectedToAddress(const CAddress& addr); ++ + bool AttemptToEvictConnection(); + CNode* ConnectNode(CAddress addrConnect, const char *pszDest, bool fCountFailure, ConnectionType conn_type); + void AddWhitelistPermissionFlags(NetPermissionFlags& flags, const CNetAddr &addr) const; +@@ -621,7 +624,7 @@ public: + virtual bool ProcessMessages(CNode* pnode, std::atomic& interrupt) = 0; + virtual bool SendMessages(CNode* pnode) = 0; + virtual void InitializeNode(CNode* pnode) = 0; +- virtual void FinalizeNode(NodeId id, bool& update_connection_time) = 0; ++ virtual void FinalizeNode(const CNode& node, bool& update_connection_time) = 0; + + protected: + /** +@@ -757,7 +760,7 @@ public: + /** read and deserialize data, advances msg_bytes data pointer */ + virtual int Read(Span& msg_bytes) = 0; + // decomposes a message from the context +- virtual Optional GetMessage(const CMessageHeader::MessageStartChars& message_start, std::chrono::microseconds time, uint32_t& out_err) = 0; ++ virtual Optional GetMessage(std::chrono::microseconds time, uint32_t& out_err) = 0; + virtual ~TransportDeserializer() {} + }; + +@@ -791,8 +794,9 @@ private: + } + + public: +- V1TransportDeserializer(const NodeId node_id, int nTypeIn, int nVersionIn) +- : m_node_id(node_id), ++ V1TransportDeserializer(const CChainParams& chain_params, const NodeId node_id, int nTypeIn, int nVersionIn) ++ : m_chain_params(chain_params), ++ m_node_id(node_id), + hdrbuf(nTypeIn, nVersionIn), + vRecv(nTypeIn, nVersionIn) + { +@@ -820,12 +824,16 @@ public: + } + return ret; + } +- Optional GetMessage(const CMessageHeader::MessageStartChars& message_start, std::chrono::microseconds time, uint32_t& out_err_raw_size) override; ++ Optional GetMessage(std::chrono::microseconds time, uint32_t& out_err_raw_size) override; + }; + + /** The TransportSerializer prepares messages for the network transport + */ ++class TransportSerializer { ++public: ++ // prepare message for transport (header construction, error-correction computation, payload encryption, etc.) + virtual void prepareForTransport(CSerializedNetMsg& msg, std::vector& header) = 0; ++ virtual ~TransportSerializer() {} + }; + + class V1TransportSerializer : public TransportSerializer { +@@ -841,7 +849,7 @@ class CNode + + public: + std::unique_ptr m_deserializer; +- std::unique_ptr m_serializer; ++ std::unique_ptr m_serializer; + + // socket + std::atomic nServices{NODE_NONE}; +@@ -986,8 +994,8 @@ public: + std::vector vAddrToSend; + std::unique_ptr m_addr_known{nullptr}; + bool fGetAddr{false}; +- int64_t nNextAddrSend GUARDED_BY(cs_sendProcessing){0}; +- int64_t nNextLocalAddrSend GUARDED_BY(cs_sendProcessing){0}; ++ std::chrono::microseconds m_next_addr_send GUARDED_BY(cs_sendProcessing){0}; ++ std::chrono::microseconds m_next_local_addr_send GUARDED_BY(cs_sendProcessing){0}; + + // List of block ids we still have announce. + // There is no final sorting before sending, as they are always sent immediately +diff --git a/src/net_processing.cpp b/src/net_processing.cpp +index 3c09e2de..03da79ff 100644 +--- a/src/net_processing.cpp ++++ b/src/net_processing.cpp +@@ -451,7 +451,7 @@ struct Peer { + /** Work queue of items requested by this peer **/ + std::deque m_getdata_requests GUARDED_BY(m_getdata_requests_mutex); + +- explicit Peer(NodeId id) : m_id(id) {} ++ Peer(NodeId id) : m_id(id) {} + }; + + using PeerRef = std::shared_ptr; +@@ -479,7 +479,8 @@ static void UpdatePreferredDownload(const CNode& node, CNodeState* state) EXCLUS + nPreferredDownload -= state->fPreferredDownload; + + // Whether this node should be marked as a preferred download node. +- state->fPreferredDownload = (!node.fInbound || node.HasPermission(PF_NOBAN)) && !node.IsAddrFetchConn() && !node.fClient; ++ state->fPreferredDownload = (!node.IsInboundConn() || node.HasPermission(PF_NOBAN)) && !node.IsAddrFetchConn() && !node.fClient; ++ + nPreferredDownload += state->fPreferredDownload; + } + +@@ -494,7 +495,9 @@ static void PushNodeVersion(CNode& pnode, CConnman& connman, int64_t nTime) + NodeId nodeid = pnode.GetId(); + CAddress addr = pnode.addr; + +- CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService(), addr.nServices)); ++ CAddress addrYou = addr.IsRoutable() && !IsProxy(addr) && addr.IsAddrV1Compatible() ? ++ addr : ++ CAddress(CService(), addr.nServices); + CAddress addrMe = CAddress(CService(), nLocalNodeServices); + + connman.PushMessage(&pnode, CNetMsgMaker(INIT_PROTO_VERSION).Make(NetMsgType::VERSION, PROTOCOL_VERSION, (uint64_t)nLocalNodeServices, nTime, addrYou, addrMe, +@@ -765,7 +768,11 @@ void PeerManager::AddTxAnnouncement(const CNode& node, const GenTxid& gtxid, std + // Too many queued announcements from this peer + return; + } ++ const CNodeState* state = State(nodeid); ++ ++ // Decide the TxRequestTracker parameters for this announcement: + // - "preferred": if fPreferredDownload is set (= outbound, or PF_NOBAN permission) ++ // - "reqtime": current time plus delays for: + // - NONPREF_PEER_TX_DELAY for announcements from non-preferred connections + // - TXID_RELAY_DELAY for txid announcements while wtxid peers are available + // - OVERLOADED_PEER_TX_DELAY for announcements from peers which have at least +@@ -773,7 +780,7 @@ void PeerManager::AddTxAnnouncement(const CNode& node, const GenTxid& gtxid, std + auto delay = std::chrono::microseconds{0}; + const bool preferred = state->fPreferredDownload; + if (!preferred) delay += NONPREF_PEER_TX_DELAY; +- if (!state->m_wtxid_relay && g_wtxid_relay_peers > 0) delay += TXID_RELAY_DELAY; ++ if (!gtxid.IsWtxid() && g_wtxid_relay_peers > 0) delay += TXID_RELAY_DELAY; + const bool overloaded = !node.HasPermission(PF_RELAY) && + m_txrequest.CountInFlight(nodeid) >= MAX_PEER_TX_REQUEST_IN_FLIGHT; + if (overloaded) delay += OVERLOADED_PEER_TX_DELAY; +@@ -829,7 +836,8 @@ void PeerManager::ReattemptInitialBroadcast(CScheduler& scheduler) const + scheduler.scheduleFromNow([&] { ReattemptInitialBroadcast(scheduler); }, delta); + } + +-void PeerManager::FinalizeNode(NodeId nodeid, bool& fUpdateConnectionTime) { ++void PeerManager::FinalizeNode(const CNode& node, bool& fUpdateConnectionTime) { ++ NodeId nodeid = node.GetId(); + fUpdateConnectionTime = false; + LOCK(cs_main); + int misbehavior{0}; +@@ -2018,6 +2026,7 @@ void PeerManager::ProcessOrphanTx(std::set& orphan_work_set) + // https://github.com/BGL/BGL/issues/8279 for details. + // We can remove this restriction (and always add wtxids to + // the filter even for witness stripped transactions) once ++ // wtxid-based relay is broadly deployed. + // See also comments in https://github.com/BGL/BGL/pull/18044#discussion_r443419034 + // for concerns around weakening security of unupgraded nodes + // if we start doing this too early. +@@ -2299,7 +2308,7 @@ void PeerManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, CDat + { + m_connman.SetServices(pfrom.addr, nServices); + } +- if (!pfrom.IsInboundConn() && !pfrom.IsFeelerConn() && !pfrom.IsManualConn() && !HasAllDesirableServiceFlags(nServices)) ++ if (pfrom.ExpectServicesFromConn() && !HasAllDesirableServiceFlags(nServices)) + { + LogPrint(BCLog::NET, "peer=%d does not offer the expected services (%08x offered, %08x expected); disconnecting\n", pfrom.GetId(), nServices, GetDesirableServiceFlags(nServices)); + pfrom.fDisconnect = true; +@@ -2398,14 +2407,8 @@ void PeerManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, CDat + // empty and no one will know who we are, so these mechanisms are + // important to help us connect to the network. + // +- // We also update the addrman to record connection success for +- // these peers (which include OUTBOUND_FULL_RELAY and FEELER +- // connections) so that addrman will have an up-to-date notion of +- // which peers are online and available. +- // +- // We skip these operations for BLOCK_RELAY peers to avoid +- // potentially leaking information about our BLOCK_RELAY +- // connections via the addrman or address relay. ++ // We skip this for BLOCK_RELAY peers to avoid potentially leaking ++ // information about our BLOCK_RELAY connections via address relay. + if (fListen && !::ChainstateActive().IsInitialBlockDownload()) + { + CAddress addr = GetLocalAddress(&pfrom.addr, pfrom.GetLocalServices()); +@@ -2424,9 +2427,23 @@ void PeerManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, CDat + // Get recent addresses + m_connman.PushMessage(&pfrom, CNetMsgMaker(greatest_common_version).Make(NetMsgType::GETADDR)); + pfrom.fGetAddr = true; ++ } + +- // Moves address from New to Tried table in Addrman, resolves +- // tried-table collisions, etc. ++ if (!pfrom.IsInboundConn()) { ++ // For non-inbound connections, we update the addrman to record ++ // connection success so that addrman will have an up-to-date ++ // notion of which peers are online and available. ++ // ++ // While we strive to not leak information about block-relay-only ++ // connections via the addrman, not moving an address to the tried ++ // table is also potentially detrimental because new-table entries ++ // are subject to eviction in the event of addrman collisions. We ++ // mitigate the information-leak by never calling ++ // CAddrMan::Connected() on block-relay-only peers; see ++ // FinalizeNode(). ++ // ++ // This moves an address from New to Tried table in Addrman, ++ // resolves tried-table collisions, etc. + m_connman.MarkAddressGood(pfrom.addr); + } + +@@ -3059,6 +3076,7 @@ void PeerManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, CDat + } + } else { + if (state.GetResult() != TxValidationResult::TX_WITNESS_STRIPPED) { ++ // We can add the wtxid of this transaction to our reject filter. + // Do not add txids of witness transactions or witness-stripped + // transactions to the filter, as they can have been malleated; + // adding such txids to the reject filter would potentially +@@ -3796,6 +3814,7 @@ bool PeerManager::ProcessMessages(CNode* pfrom, std::atomic& interruptMsgP + } + + if (pfrom->fDisconnect) ++ return false; + + // this maintains the order of responses + // and prevents m_getdata_requests to grow unbounded +@@ -4056,7 +4075,7 @@ bool PeerManager::SendMessages(CNode* pto) + + if (pto->RelayAddrsWithConn() && !::ChainstateActive().IsInitialBlockDownload() && pto->m_next_local_addr_send < current_time) { + AdvertiseLocal(pto); +- pto->nNextLocalAddrSend = PoissonNextSend(nNow, AVG_LOCAL_ADDRESS_BROADCAST_INTERVAL); ++ pto->m_next_local_addr_send = PoissonNextSend(current_time, AVG_LOCAL_ADDRESS_BROADCAST_INTERVAL); + } + + // +diff --git a/src/net_processing.h b/src/net_processing.h +index 3224c248..a3b3973e 100644 +--- a/src/net_processing.h ++++ b/src/net_processing.h +@@ -12,6 +12,8 @@ + #include + #include + ++class BlockTransactionsRequest; ++class BlockValidationState; + class CBlockHeader; + class CChainParams; + class CTxMemPool; +@@ -19,6 +21,7 @@ class ChainstateManager; + class TxValidationState; + + extern RecursiveMutex cs_main; ++extern RecursiveMutex g_cs_orphans; + + /** Default for -maxorphantx, maximum number of orphan transactions kept in memory */ + static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100; +@@ -55,7 +58,7 @@ public: + /** Initialize a peer by adding it to mapNodeState and pushing a message requesting its version */ + void InitializeNode(CNode* pnode) override; + /** Handle removal of a peer by updating various state and removing it from mapNodeState */ +- void FinalizeNode(NodeId nodeid, bool& fUpdateConnectionTime) override; ++ void FinalizeNode(const CNode& node, bool& fUpdateConnectionTime) override; + /** + * Process protocol messages received from a given node + * +@@ -105,6 +108,13 @@ private: + bool MaybePunishNodeForBlock(NodeId nodeid, const BlockValidationState& state, + bool via_compact_block, const std::string& message = ""); + ++ /** ++ * Potentially disconnect and discourage a node based on the contents of a TxValidationState object ++ * ++ * @return Returns true if the peer was punished (probably disconnected) ++ */ ++ bool MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state, const std::string& message = ""); ++ + /** Maybe disconnect a peer and discourage future connections from its address. + * + * @param[in] pnode The node to check. +diff --git a/src/netaddress.cpp b/src/netaddress.cpp +index 51cf8d0e..35e9161f 100644 +--- a/src/netaddress.cpp ++++ b/src/netaddress.cpp +@@ -21,8 +21,6 @@ + #include + #include + +-// 0xFD + sha256("BGL")[0:5] +-static const unsigned char g_internal_prefix[] = { 0xFD, 0x6B, 0x88, 0xC0, 0x87, 0x24 }; + constexpr size_t CNetAddr::V1_SERIALIZATION_SIZE; + constexpr size_t CNetAddr::MAX_ADDRV2_SIZE; + +@@ -179,15 +177,6 @@ void CNetAddr::SetLegacyIPv6(Span ipv6) + } + + /** +- * Try to make this a dummy address that maps the specified name into IPv6 like +- * so: (0xFD + %sha256("BGL")[0:5]) + %sha256(name)[0:10]. Such dummy +- * addresses have a prefix of fd6b:88c0:8724::/48 and are guaranteed to not be +- * publicly routable as it falls under RFC4193's fc00::/7 subnet allocated to +- * unique-local addresses. +- * +- * CAddrMan uses these fake addresses to keep track of which DNS seeds were +- * used. +- * + * Create an "internal" address that represents a name or FQDN. CAddrMan uses + * these fake addresses to keep track of which DNS seeds were used. + * @returns Whether or not the operation was successful. +@@ -1041,13 +1030,16 @@ static inline int NetmaskBits(uint8_t x) + } + } + +-CSubNet::CSubNet(const CNetAddr &addr, const CNetAddr &mask) ++CSubNet::CSubNet(const CNetAddr& addr, const CNetAddr& mask) : CSubNet() + { +- valid = true; ++ valid = (addr.IsIPv4() || addr.IsIPv6()) && addr.m_net == mask.m_net; ++ if (!valid) { ++ return; ++ } + // Check if `mask` contains 1-bits after 0-bits (which is an invalid netmask). + bool zeros_found = false; +- for (size_t i = mask.IsIPv4() ? 12 : 0; i < sizeof(mask.ip); ++i) { +- const int num_bits = NetmaskBits(mask.ip[i]); ++ for (auto b : mask.m_addr) { ++ const int num_bits = NetmaskBits(b); + if (num_bits == -1 || (zeros_found && num_bits != 0)) { + valid = false; + return; +@@ -1058,6 +1050,7 @@ CSubNet::CSubNet(const CNetAddr &addr, const CNetAddr &mask) + } + + assert(mask.m_addr.size() <= sizeof(netmask)); ++ + memcpy(netmask, mask.m_addr.data(), mask.m_addr.size()); + + network = addr; +@@ -1101,9 +1094,11 @@ bool CSubNet::Match(const CNetAddr &addr) const + + std::string CSubNet::ToString() const + { ++ assert(network.m_addr.size() <= sizeof(netmask)); ++ + uint8_t cidr = 0; + +- for (size_t i = network.IsIPv4() ? 12 : 0; i < sizeof(netmask); ++i) { ++ for (size_t i = 0; i < network.m_addr.size(); ++i) { + if (netmask[i] == 0x00) { + break; + } +diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp +deleted file mode 100644 +index 7778012c..00000000 +--- a/src/node/interfaces.cpp ++++ /dev/null +@@ -1,693 +0,0 @@ +-// Copyright (c) 2018-2020 The BGL Core developers +-// Distributed under the MIT software license, see the accompanying +-// file COPYING or http://www.opensource.org/licenses/mit-license.php. +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#if defined(HAVE_CONFIG_H) +-#include +-#endif +- +-#include +-#include +- +-using interfaces::BlockTip; +-using interfaces::Chain; +-using interfaces::FoundBlock; +-using interfaces::Handler; +-using interfaces::MakeHandler; +-using interfaces::Node; +-using interfaces::WalletClient; +- +-namespace node { +-namespace { +-class NodeImpl : public Node +-{ +-public: +- explicit NodeImpl(NodeContext* context) { setContext(context); } +- void initLogging() override { InitLogging(*Assert(m_context->args)); } +- void initParameterInteraction() override { InitParameterInteraction(*Assert(m_context->args)); } +- bilingual_str getWarnings() override { return GetWarnings(true); } +- uint32_t getLogCategories() override { return LogInstance().GetCategoryMask(); } +- bool baseInitialize() override +- { +- return AppInitBasicSetup(gArgs) && AppInitParameterInteraction(gArgs) && AppInitSanityChecks() && +- AppInitLockDataDirectory() && AppInitInterfaces(*m_context); +- } +- bool appInitMain(interfaces::BlockAndHeaderTipInfo* tip_info) override +- { +- return AppInitMain(m_context_ref, *m_context, tip_info); +- } +- void appShutdown() override +- { +- Interrupt(*m_context); +- Shutdown(*m_context); +- } +- void startShutdown() override +- { +- StartShutdown(); +- // Stop RPC for clean shutdown if any of waitfor* commands is executed. +- if (gArgs.GetBoolArg("-server", false)) { +- InterruptRPC(); +- StopRPC(); +- } +- } +- bool shutdownRequested() override { return ShutdownRequested(); } +- void mapPort(bool use_upnp) override +- { +- if (use_upnp) { +- StartMapPort(); +- } else { +- InterruptMapPort(); +- StopMapPort(); +- } +- } +- bool getProxy(Network net, proxyType& proxy_info) override { return GetProxy(net, proxy_info); } +- size_t getNodeCount(CConnman::NumConnections flags) override +- { +- return m_context->connman ? m_context->connman->GetNodeCount(flags) : 0; +- } +- bool getNodesStats(NodesStats& stats) override +- { +- stats.clear(); +- +- if (m_context->connman) { +- std::vector stats_temp; +- m_context->connman->GetNodeStats(stats_temp); +- +- stats.reserve(stats_temp.size()); +- for (auto& node_stats_temp : stats_temp) { +- stats.emplace_back(std::move(node_stats_temp), false, CNodeStateStats()); +- } +- +- // Try to retrieve the CNodeStateStats for each node. +- TRY_LOCK(::cs_main, lockMain); +- if (lockMain) { +- for (auto& node_stats : stats) { +- std::get<1>(node_stats) = +- GetNodeStateStats(std::get<0>(node_stats).nodeid, std::get<2>(node_stats)); +- } +- } +- return true; +- } +- return false; +- } +- bool getBanned(banmap_t& banmap) override +- { +- if (m_context->banman) { +- m_context->banman->GetBanned(banmap); +- return true; +- } +- return false; +- } +- bool ban(const CNetAddr& net_addr, int64_t ban_time_offset) override +- { +- if (m_context->banman) { +- m_context->banman->Ban(net_addr, ban_time_offset); +- return true; +- } +- return false; +- } +- bool unban(const CSubNet& ip) override +- { +- if (m_context->banman) { +- m_context->banman->Unban(ip); +- return true; +- } +- return false; +- } +- bool disconnectByAddress(const CNetAddr& net_addr) override +- { +- if (m_context->connman) { +- return m_context->connman->DisconnectNode(net_addr); +- } +- return false; +- } +- bool disconnectById(NodeId id) override +- { +- if (m_context->connman) { +- return m_context->connman->DisconnectNode(id); +- } +- return false; +- } +- int64_t getTotalBytesRecv() override { return m_context->connman ? m_context->connman->GetTotalBytesRecv() : 0; } +- int64_t getTotalBytesSent() override { return m_context->connman ? m_context->connman->GetTotalBytesSent() : 0; } +- size_t getMempoolSize() override { return m_context->mempool ? m_context->mempool->size() : 0; } +- size_t getMempoolDynamicUsage() override { return m_context->mempool ? m_context->mempool->DynamicMemoryUsage() : 0; } +- bool getHeaderTip(int& height, int64_t& block_time) override +- { +- LOCK(::cs_main); +- if (::pindexBestHeader) { +- height = ::pindexBestHeader->nHeight; +- block_time = ::pindexBestHeader->GetBlockTime(); +- return true; +- } +- return false; +- } +- int getNumBlocks() override +- { +- LOCK(::cs_main); +- return ::ChainActive().Height(); +- } +- uint256 getBestBlockHash() override +- { +- const CBlockIndex* tip = WITH_LOCK(::cs_main, return ::ChainActive().Tip()); +- return tip ? tip->GetBlockHash() : Params().GenesisBlock().GetHash(); +- } +- int64_t getLastBlockTime() override +- { +- LOCK(::cs_main); +- if (::ChainActive().Tip()) { +- return ::ChainActive().Tip()->GetBlockTime(); +- } +- return Params().GenesisBlock().GetBlockTime(); // Genesis block's time of current network +- } +- double getVerificationProgress() override +- { +- const CBlockIndex* tip; +- { +- LOCK(::cs_main); +- tip = ::ChainActive().Tip(); +- } +- return GuessVerificationProgress(Params().TxData(), tip); +- } +- bool isInitialBlockDownload() override { return ::ChainstateActive().IsInitialBlockDownload(); } +- bool getReindex() override { return ::fReindex; } +- bool getImporting() override { return ::fImporting; } +- void setNetworkActive(bool active) override +- { +- if (m_context->connman) { +- m_context->connman->SetNetworkActive(active); +- } +- } +- bool getNetworkActive() override { return m_context->connman && m_context->connman->GetNetworkActive(); } +- CFeeRate estimateSmartFee(int num_blocks, bool conservative, int* returned_target = nullptr) override +- { +- FeeCalculation fee_calc; +- CFeeRate result = ::feeEstimator.estimateSmartFee(num_blocks, &fee_calc, conservative); +- if (returned_target) { +- *returned_target = fee_calc.returnedTarget; +- } +- return result; +- } +- CFeeRate getDustRelayFee() override { return ::dustRelayFee; } +- UniValue executeRpc(const std::string& command, const UniValue& params, const std::string& uri) override +- { +- JSONRPCRequest req(m_context_ref); +- req.params = params; +- req.strMethod = command; +- req.URI = uri; +- return ::tableRPC.execute(req); +- } +- std::vector listRpcCommands() override { return ::tableRPC.listCommands(); } +- void rpcSetTimerInterfaceIfUnset(RPCTimerInterface* iface) override { RPCSetTimerInterfaceIfUnset(iface); } +- void rpcUnsetTimerInterface(RPCTimerInterface* iface) override { RPCUnsetTimerInterface(iface); } +- bool getUnspentOutput(const COutPoint& output, Coin& coin) override +- { +- LOCK(::cs_main); +- return ::ChainstateActive().CoinsTip().GetCoin(output, coin); +- } +- WalletClient& walletClient() override +- { +- return *Assert(m_context->wallet_client); +- } +- std::unique_ptr handleInitMessage(InitMessageFn fn) override +- { +- return MakeHandler(::uiInterface.InitMessage_connect(fn)); +- } +- std::unique_ptr handleMessageBox(MessageBoxFn fn) override +- { +- return MakeHandler(::uiInterface.ThreadSafeMessageBox_connect(fn)); +- } +- std::unique_ptr handleQuestion(QuestionFn fn) override +- { +- return MakeHandler(::uiInterface.ThreadSafeQuestion_connect(fn)); +- } +- std::unique_ptr handleShowProgress(ShowProgressFn fn) override +- { +- return MakeHandler(::uiInterface.ShowProgress_connect(fn)); +- } +- std::unique_ptr handleNotifyNumConnectionsChanged(NotifyNumConnectionsChangedFn fn) override +- { +- return MakeHandler(::uiInterface.NotifyNumConnectionsChanged_connect(fn)); +- } +- std::unique_ptr handleNotifyNetworkActiveChanged(NotifyNetworkActiveChangedFn fn) override +- { +- return MakeHandler(::uiInterface.NotifyNetworkActiveChanged_connect(fn)); +- } +- std::unique_ptr handleNotifyAlertChanged(NotifyAlertChangedFn fn) override +- { +- return MakeHandler(::uiInterface.NotifyAlertChanged_connect(fn)); +- } +- std::unique_ptr handleBannedListChanged(BannedListChangedFn fn) override +- { +- return MakeHandler(::uiInterface.BannedListChanged_connect(fn)); +- } +- std::unique_ptr handleNotifyBlockTip(NotifyBlockTipFn fn) override +- { +- return MakeHandler(::uiInterface.NotifyBlockTip_connect([fn](SynchronizationState sync_state, const CBlockIndex* block) { +- fn(sync_state, BlockTip{block->nHeight, block->GetBlockTime(), block->GetBlockHash()}, +- GuessVerificationProgress(Params().TxData(), block)); +- })); +- } +- std::unique_ptr handleNotifyHeaderTip(NotifyHeaderTipFn fn) override +- { +- return MakeHandler( +- ::uiInterface.NotifyHeaderTip_connect([fn](SynchronizationState sync_state, const CBlockIndex* block) { +- fn(sync_state, BlockTip{block->nHeight, block->GetBlockTime(), block->GetBlockHash()}, +- /* verification progress is unused when a header was received */ 0); +- })); +- } +- NodeContext* context() override { return m_context; } +- void setContext(NodeContext* context) override +- { +- m_context = context; +- if (context) { +- m_context_ref.Set(*context); +- } else { +- m_context_ref.Clear(); +- } +- } +- NodeContext* m_context{nullptr}; +- util::Ref m_context_ref; +-}; +- +-bool FillBlock(const CBlockIndex* index, const FoundBlock& block, UniqueLock& lock) +-{ +- if (!index) return false; +- if (block.m_hash) *block.m_hash = index->GetBlockHash(); +- if (block.m_height) *block.m_height = index->nHeight; +- if (block.m_time) *block.m_time = index->GetBlockTime(); +- if (block.m_max_time) *block.m_max_time = index->GetBlockTimeMax(); +- if (block.m_mtp_time) *block.m_mtp_time = index->GetMedianTimePast(); +- if (block.m_data) { +- REVERSE_LOCK(lock); +- if (!ReadBlockFromDisk(*block.m_data, index, Params().GetConsensus())) block.m_data->SetNull(); +- } +- return true; +-} +- +-class NotificationsProxy : public CValidationInterface +-{ +-public: +- explicit NotificationsProxy(std::shared_ptr notifications) +- : m_notifications(std::move(notifications)) {} +- virtual ~NotificationsProxy() = default; +- void TransactionAddedToMempool(const CTransactionRef& tx, uint64_t mempool_sequence) override +- { +- m_notifications->transactionAddedToMempool(tx, mempool_sequence); +- } +- void TransactionRemovedFromMempool(const CTransactionRef& tx, MemPoolRemovalReason reason, uint64_t mempool_sequence) override +- { +- m_notifications->transactionRemovedFromMempool(tx, reason, mempool_sequence); +- } +- void BlockConnected(const std::shared_ptr& block, const CBlockIndex* index) override +- { +- m_notifications->blockConnected(*block, index->nHeight); +- } +- void BlockDisconnected(const std::shared_ptr& block, const CBlockIndex* index) override +- { +- m_notifications->blockDisconnected(*block, index->nHeight); +- } +- void UpdatedBlockTip(const CBlockIndex* index, const CBlockIndex* fork_index, bool is_ibd) override +- { +- m_notifications->updatedBlockTip(); +- } +- void ChainStateFlushed(const CBlockLocator& locator) override { m_notifications->chainStateFlushed(locator); } +- std::shared_ptr m_notifications; +-}; +- +-class NotificationsHandlerImpl : public Handler +-{ +-public: +- explicit NotificationsHandlerImpl(std::shared_ptr notifications) +- : m_proxy(std::make_shared(std::move(notifications))) +- { +- RegisterSharedValidationInterface(m_proxy); +- } +- ~NotificationsHandlerImpl() override { disconnect(); } +- void disconnect() override +- { +- if (m_proxy) { +- UnregisterSharedValidationInterface(m_proxy); +- m_proxy.reset(); +- } +- } +- std::shared_ptr m_proxy; +-}; +- +-class RpcHandlerImpl : public Handler +-{ +-public: +- explicit RpcHandlerImpl(const CRPCCommand& command) : m_command(command), m_wrapped_command(&command) +- { +- m_command.actor = [this](const JSONRPCRequest& request, UniValue& result, bool last_handler) { +- if (!m_wrapped_command) return false; +- try { +- return m_wrapped_command->actor(request, result, last_handler); +- } catch (const UniValue& e) { +- // If this is not the last handler and a wallet not found +- // exception was thrown, return false so the next handler can +- // try to handle the request. Otherwise, reraise the exception. +- if (!last_handler) { +- const UniValue& code = e["code"]; +- if (code.isNum() && code.get_int() == RPC_WALLET_NOT_FOUND) { +- return false; +- } +- } +- throw; +- } +- }; +- ::tableRPC.appendCommand(m_command.name, &m_command); +- } +- +- void disconnect() final +- { +- if (m_wrapped_command) { +- m_wrapped_command = nullptr; +- ::tableRPC.removeCommand(m_command.name, &m_command); +- } +- } +- +- ~RpcHandlerImpl() override { disconnect(); } +- +- CRPCCommand m_command; +- const CRPCCommand* m_wrapped_command; +-}; +- +-class ChainImpl : public Chain +-{ +-public: +- explicit ChainImpl(NodeContext& node) : m_node(node) {} +- Optional getHeight() override +- { +- LOCK(::cs_main); +- int height = ::ChainActive().Height(); +- if (height >= 0) { +- return height; +- } +- return nullopt; +- } +- Optional getBlockHeight(const uint256& hash) override +- { +- LOCK(::cs_main); +- CBlockIndex* block = LookupBlockIndex(hash); +- if (block && ::ChainActive().Contains(block)) { +- return block->nHeight; +- } +- return nullopt; +- } +- uint256 getBlockHash(int height) override +- { +- LOCK(::cs_main); +- CBlockIndex* block = ::ChainActive()[height]; +- assert(block); +- return block->GetBlockHash(); +- } +- bool haveBlockOnDisk(int height) override +- { +- LOCK(cs_main); +- CBlockIndex* block = ::ChainActive()[height]; +- return block && ((block->nStatus & BLOCK_HAVE_DATA) != 0) && block->nTx > 0; +- } +- Optional findFirstBlockWithTimeAndHeight(int64_t time, int height, uint256* hash) override +- { +- LOCK(cs_main); +- CBlockIndex* block = ::ChainActive().FindEarliestAtLeast(time, height); +- if (block) { +- if (hash) *hash = block->GetBlockHash(); +- return block->nHeight; +- } +- return nullopt; +- } +- CBlockLocator getTipLocator() override +- { +- LOCK(cs_main); +- return ::ChainActive().GetLocator(); +- } +- bool checkFinalTx(const CTransaction& tx) override +- { +- LOCK(cs_main); +- return CheckFinalTx(tx); +- } +- Optional findLocatorFork(const CBlockLocator& locator) override +- { +- LOCK(cs_main); +- if (CBlockIndex* fork = FindForkInGlobalIndex(::ChainActive(), locator)) { +- return fork->nHeight; +- } +- return nullopt; +- } +- bool findBlock(const uint256& hash, const FoundBlock& block) override +- { +- WAIT_LOCK(cs_main, lock); +- return FillBlock(LookupBlockIndex(hash), block, lock); +- } +- bool findFirstBlockWithTimeAndHeight(int64_t min_time, int min_height, const FoundBlock& block) override +- { +- WAIT_LOCK(cs_main, lock); +- return FillBlock(ChainActive().FindEarliestAtLeast(min_time, min_height), block, lock); +- } +- bool findNextBlock(const uint256& block_hash, int block_height, const FoundBlock& next, bool* reorg) override { +- WAIT_LOCK(cs_main, lock); +- CBlockIndex* block = ChainActive()[block_height]; +- if (block && block->GetBlockHash() != block_hash) block = nullptr; +- if (reorg) *reorg = !block; +- return FillBlock(block ? ChainActive()[block_height + 1] : nullptr, next, lock); +- } +- bool findAncestorByHeight(const uint256& block_hash, int ancestor_height, const FoundBlock& ancestor_out) override +- { +- WAIT_LOCK(cs_main, lock); +- if (const CBlockIndex* block = LookupBlockIndex(block_hash)) { +- if (const CBlockIndex* ancestor = block->GetAncestor(ancestor_height)) { +- return FillBlock(ancestor, ancestor_out, lock); +- } +- } +- return FillBlock(nullptr, ancestor_out, lock); +- } +- bool findAncestorByHash(const uint256& block_hash, const uint256& ancestor_hash, const FoundBlock& ancestor_out) override +- { +- WAIT_LOCK(cs_main, lock); +- const CBlockIndex* block = LookupBlockIndex(block_hash); +- const CBlockIndex* ancestor = LookupBlockIndex(ancestor_hash); +- if (block && ancestor && block->GetAncestor(ancestor->nHeight) != ancestor) ancestor = nullptr; +- return FillBlock(ancestor, ancestor_out, lock); +- } +- bool findCommonAncestor(const uint256& block_hash1, const uint256& block_hash2, const FoundBlock& ancestor_out, const FoundBlock& block1_out, const FoundBlock& block2_out) override +- { +- WAIT_LOCK(cs_main, lock); +- const CBlockIndex* block1 = LookupBlockIndex(block_hash1); +- const CBlockIndex* block2 = LookupBlockIndex(block_hash2); +- const CBlockIndex* ancestor = block1 && block2 ? LastCommonAncestor(block1, block2) : nullptr; +- // Using & instead of && below to avoid short circuiting and leaving +- // output uninitialized. +- return FillBlock(ancestor, ancestor_out, lock) & FillBlock(block1, block1_out, lock) & FillBlock(block2, block2_out, lock); +- } +- void findCoins(std::map& coins) override { return FindCoins(m_node, coins); } +- double guessVerificationProgress(const uint256& block_hash) override +- { +- LOCK(cs_main); +- return GuessVerificationProgress(Params().TxData(), LookupBlockIndex(block_hash)); +- } +- bool hasBlocks(const uint256& block_hash, int min_height, Optional max_height) override +- { +- // hasBlocks returns true if all ancestors of block_hash in specified +- // range have block data (are not pruned), false if any ancestors in +- // specified range are missing data. +- // +- // For simplicity and robustness, min_height and max_height are only +- // used to limit the range, and passing min_height that's too low or +- // max_height that's too high will not crash or change the result. +- LOCK(::cs_main); +- if (CBlockIndex* block = LookupBlockIndex(block_hash)) { +- if (max_height && block->nHeight >= *max_height) block = block->GetAncestor(*max_height); +- for (; block->nStatus & BLOCK_HAVE_DATA; block = block->pprev) { +- // Check pprev to not segfault if min_height is too low +- if (block->nHeight <= min_height || !block->pprev) return true; +- } +- } +- return false; +- } +- RBFTransactionState isRBFOptIn(const CTransaction& tx) override +- { +- if (!m_node.mempool) return IsRBFOptInEmptyMempool(tx); +- LOCK(m_node.mempool->cs); +- return IsRBFOptIn(tx, *m_node.mempool); +- } +- bool hasDescendantsInMempool(const uint256& txid) override +- { +- if (!m_node.mempool) return false; +- LOCK(m_node.mempool->cs); +- auto it = m_node.mempool->GetIter(txid); +- return it && (*it)->GetCountWithDescendants() > 1; +- } +- bool broadcastTransaction(const CTransactionRef& tx, +- const CAmount& max_tx_fee, +- bool relay, +- std::string& err_string) override +- { +- const TransactionError err = BroadcastTransaction(m_node, tx, err_string, max_tx_fee, relay, /*wait_callback*/ false); +- // Chain clients only care about failures to accept the tx to the mempool. Disregard non-mempool related failures. +- // Note: this will need to be updated if BroadcastTransactions() is updated to return other non-mempool failures +- // that Chain clients do not need to know about. +- return TransactionError::OK == err; +- } +- void getTransactionAncestry(const uint256& txid, size_t& ancestors, size_t& descendants) override +- { +- ancestors = descendants = 0; +- if (!m_node.mempool) return; +- m_node.mempool->GetTransactionAncestry(txid, ancestors, descendants); +- } +- void getPackageLimits(unsigned int& limit_ancestor_count, unsigned int& limit_descendant_count) override +- { +- limit_ancestor_count = gArgs.GetArg("-limitancestorcount", DEFAULT_ANCESTOR_LIMIT); +- limit_descendant_count = gArgs.GetArg("-limitdescendantcount", DEFAULT_DESCENDANT_LIMIT); +- } +- bool checkChainLimits(const CTransactionRef& tx) override +- { +- if (!m_node.mempool) return true; +- LockPoints lp; +- CTxMemPoolEntry entry(tx, 0, 0, 0, false, 0, lp); +- CTxMemPool::setEntries ancestors; +- auto limit_ancestor_count = gArgs.GetArg("-limitancestorcount", DEFAULT_ANCESTOR_LIMIT); +- auto limit_ancestor_size = gArgs.GetArg("-limitancestorsize", DEFAULT_ANCESTOR_SIZE_LIMIT) * 1000; +- auto limit_descendant_count = gArgs.GetArg("-limitdescendantcount", DEFAULT_DESCENDANT_LIMIT); +- auto limit_descendant_size = gArgs.GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT) * 1000; +- std::string unused_error_string; +- LOCK(m_node.mempool->cs); +- return m_node.mempool->CalculateMemPoolAncestors( +- entry, ancestors, limit_ancestor_count, limit_ancestor_size, +- limit_descendant_count, limit_descendant_size, unused_error_string); +- } +- CFeeRate estimateSmartFee(int num_blocks, bool conservative, FeeCalculation* calc) override +- { +- return ::feeEstimator.estimateSmartFee(num_blocks, calc, conservative); +- } +- unsigned int estimateMaxBlocks() override +- { +- return ::feeEstimator.HighestTargetTracked(FeeEstimateHorizon::LONG_HALFLIFE); +- } +- CFeeRate mempoolMinFee() override +- { +- if (!m_node.mempool) return {}; +- return m_node.mempool->GetMinFee(gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000); +- } +- CFeeRate relayMinFee() override { return ::minRelayTxFee; } +- CFeeRate relayIncrementalFee() override { return ::incrementalRelayFee; } +- CFeeRate relayDustFee() override { return ::dustRelayFee; } +- bool havePruned() override +- { +- LOCK(cs_main); +- return ::fHavePruned; +- } +- bool isReadyToBroadcast() override { return !::fImporting && !::fReindex && !isInitialBlockDownload(); } +- bool isInitialBlockDownload() override { return ::ChainstateActive().IsInitialBlockDownload(); } +- bool shutdownRequested() override { return ShutdownRequested(); } +- int64_t getAdjustedTime() override { return GetAdjustedTime(); } +- void initMessage(const std::string& message) override { ::uiInterface.InitMessage(message); } +- void initWarning(const bilingual_str& message) override { InitWarning(message); } +- void initError(const bilingual_str& message) override { InitError(message); } +- void showProgress(const std::string& title, int progress, bool resume_possible) override +- { +- ::uiInterface.ShowProgress(title, progress, resume_possible); +- } +- std::unique_ptr handleNotifications(std::shared_ptr notifications) override +- { +- return MakeUnique(std::move(notifications)); +- } +- void waitForNotificationsIfTipChanged(const uint256& old_tip) override +- { +- if (!old_tip.IsNull()) { +- LOCK(::cs_main); +- if (old_tip == ::ChainActive().Tip()->GetBlockHash()) return; +- } +- SyncWithValidationInterfaceQueue(); +- } +- std::unique_ptr handleRpc(const CRPCCommand& command) override +- { +- return MakeUnique(command); +- } +- bool rpcEnableDeprecated(const std::string& method) override { return IsDeprecatedRPCEnabled(method); } +- void rpcRunLater(const std::string& name, std::function fn, int64_t seconds) override +- { +- RPCRunLater(name, std::move(fn), seconds); +- } +- int rpcSerializationFlags() override { return RPCSerializationFlags(); } +- util::SettingsValue getRwSetting(const std::string& name) override +- { +- util::SettingsValue result; +- gArgs.LockSettings([&](const util::Settings& settings) { +- if (const util::SettingsValue* value = util::FindKey(settings.rw_settings, name)) { +- result = *value; +- } +- }); +- return result; +- } +- bool updateRwSetting(const std::string& name, const util::SettingsValue& value) override +- { +- gArgs.LockSettings([&](util::Settings& settings) { +- if (value.isNull()) { +- settings.rw_settings.erase(name); +- } else { +- settings.rw_settings[name] = value; +- } +- }); +- return gArgs.WriteSettingsFile(); +- } +- void requestMempoolTransactions(Notifications& notifications) override +- { +- if (!m_node.mempool) return; +- LOCK2(::cs_main, m_node.mempool->cs); +- for (const CTxMemPoolEntry& entry : m_node.mempool->mapTx) { +- notifications.transactionAddedToMempool(entry.GetSharedTx(), 0 /* mempool_sequence */); +- } +- } +- NodeContext& m_node; +-}; +-} // namespace +-} // namespace node +- +-namespace interfaces { +-std::unique_ptr MakeNode(NodeContext* context) { return MakeUnique(context); } +-std::unique_ptr MakeChain(NodeContext& context) { return MakeUnique(context); } +-} // namespace interfaces +diff --git a/src/policy/feerate.cpp b/src/policy/feerate.cpp +index 5541b049..04e0e117 100644 +--- a/src/policy/feerate.cpp ++++ b/src/policy/feerate.cpp +@@ -7,8 +7,6 @@ + + #include + +-const std::string CURRENCY_UNIT = "BGL"; +- + CFeeRate::CFeeRate(const CAmount& nFeePaid, size_t nBytes_) + { + assert(nBytes_ <= uint64_t(std::numeric_limits::max())); +diff --git a/src/policy/feerate.h b/src/policy/feerate.h +index c847b9f0..6c952ff3 100644 +--- a/src/policy/feerate.h ++++ b/src/policy/feerate.h +@@ -11,7 +11,7 @@ + + #include + +-const std::string CURRENCY_UNIT = "BGL"; // One formatted unit ++const std::string CURRENCY_UNIT = "BTC"; // One formatted unit + const std::string CURRENCY_ATOM = "sat"; // One indivisible minimum value unit + + /* Used to determine type of fee estimation requested */ +@@ -19,7 +19,7 @@ enum class FeeEstimateMode { + UNSET, //!< Use default settings based on other criteria + ECONOMICAL, //!< Force estimateSmartFee to use non-conservative estimates + CONSERVATIVE, //!< Force estimateSmartFee to use conservative estimates +- BGL_KVB, //!< Use BTC/kvB fee rate unit ++ BTC_KVB, //!< Use BTC/kvB fee rate unit + SAT_VB, //!< Use sat/vB fee rate unit + }; + +@@ -65,7 +65,7 @@ public: + friend bool operator>=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK >= b.nSatoshisPerK; } + friend bool operator!=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK != b.nSatoshisPerK; } + CFeeRate& operator+=(const CFeeRate& a) { nSatoshisPerK += a.nSatoshisPerK; return *this; } +- std::string ToString(const FeeEstimateMode& fee_estimate_mode = FeeEstimateMode::BGL_KVB) const; ++ std::string ToString(const FeeEstimateMode& fee_estimate_mode = FeeEstimateMode::BTC_KVB) const; + + SERIALIZE_METHODS(CFeeRate, obj) { READWRITE(obj.nSatoshisPerK); } + }; +diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp +index 6635f7c8..4e33fd6c 100644 +--- a/src/policy/policy.cpp ++++ b/src/policy/policy.cpp +@@ -70,12 +70,6 @@ bool IsStandard(const CScript& scriptPubKey, TxoutType& whichType) + return false; + } + +- // Old (non-witness) transaction types are not supported +- if (whichType == TX_PUBKEY || whichType == TX_PUBKEYHASH || whichType == TX_SCRIPTHASH) +- { +- return false; +- } +- + return true; + } + +diff --git a/src/policy/policy.h b/src/policy/policy.h +index 414de02d..74cb6c99 100644 +--- a/src/policy/policy.h ++++ b/src/policy/policy.h +@@ -38,11 +38,11 @@ static const unsigned int DEFAULT_BYTES_PER_SIGOP = 20; + static const bool DEFAULT_PERMIT_BAREMULTISIG = true; + /** The maximum number of witness stack items in a standard P2WSH script */ + static const unsigned int MAX_STANDARD_P2WSH_STACK_ITEMS = 100; +-/** The maximum size in bytes of each witness stack item in a standard P2WSH script */ ++/** The maximum size of each witness stack item in a standard P2WSH script */ + static const unsigned int MAX_STANDARD_P2WSH_STACK_ITEM_SIZE = 80; +-/** The maximum size in bytes of each witness stack item in a standard BIP 342 script (Taproot, leaf version 0xc0) */ ++/** The maximum size of each witness stack item in a standard BIP 342 script (Taproot, leaf version 0xc0) */ + static const unsigned int MAX_STANDARD_TAPSCRIPT_STACK_ITEM_SIZE = 80; +-/** The maximum size in bytes of a standard witnessScript */ ++/** The maximum size of a standard witnessScript */ + static const unsigned int MAX_STANDARD_P2WSH_SCRIPT_SIZE = 3600; + /** The maximum size of a standard ScriptSig */ + static const unsigned int MAX_STANDARD_SCRIPTSIG_SIZE = 1650; +@@ -105,9 +105,7 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs, + /** + * Check if the transaction is over standard P2WSH resources limit: + * 3600bytes witnessScript size, 80bytes per witness stack element, 100 witness stack elements +- * These limits are adequate for multisignatures up to n-of-100 using OP_CHECKSIG, OP_ADD, and OP_EQUAL. +- * +- * Also enforce a maximum stack item size limit and no annexes for tapscript spends. ++ * These limits are adequate for multi-signature up to n-of-100 using OP_CHECKSIG, OP_ADD, and OP_EQUAL, + */ + bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs); + +diff --git a/src/protocol.h b/src/protocol.h +index cc56dd7b..afd4b6b9 100644 +--- a/src/protocol.h ++++ b/src/protocol.h +@@ -1,537 +1,465 @@ +-// Copyright (c) 2015-2020 The Bitcoin Core developers ++// Copyright (c) 2009-2010 Satoshi Nakamoto ++// Copyright (c) 2009-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. + +-#ifndef BGL_PREVECTOR_H +-#define BGL_PREVECTOR_H ++#ifndef __cplusplus ++#error This header can only be compiled as C++. ++#endif + +-#include +-#include +-#include +-#include +- +-#include +-#include +-#include +-#include +- +-/** Implements a drop-in replacement for std::vector which stores up to N +- * elements directly (without heap allocation). The types Size and Diff are +- * used to store element counts, and can be any unsigned + signed type. +- * +- * Storage layout is either: +- * - Direct allocation: +- * - Size _size: the number of used elements (between 0 and N) +- * - T direct[N]: an array of N elements of type T +- * (only the first _size are initialized). +- * - Indirect allocation: +- * - Size _size: the number of used elements plus N + 1 +- * - Size capacity: the number of allocated elements +- * - T* indirect: a pointer to an array of capacity elements of type T +- * (only the first _size are initialized). +- * +- * The data type T must be movable by memmove/realloc(). Once we switch to C++, +- * move constructors can be used instead. +- */ +-template +-class prevector { +-public: +- typedef Size size_type; +- typedef Diff difference_type; +- typedef T value_type; +- typedef value_type& reference; +- typedef const value_type& const_reference; +- typedef value_type* pointer; +- typedef const value_type* const_pointer; +- +- class iterator { +- T* ptr; +- public: +- typedef Diff difference_type; +- typedef T value_type; +- typedef T* pointer; +- typedef T& reference; +- typedef std::random_access_iterator_tag iterator_category; +- iterator(T* ptr_) : ptr(ptr_) {} +- T& operator*() const { return *ptr; } +- T* operator->() const { return ptr; } +- T& operator[](size_type pos) { return ptr[pos]; } +- const T& operator[](size_type pos) const { return ptr[pos]; } +- iterator& operator++() { ptr++; return *this; } +- iterator& operator--() { ptr--; return *this; } +- iterator operator++(int) { iterator copy(*this); ++(*this); return copy; } +- iterator operator--(int) { iterator copy(*this); --(*this); return copy; } +- difference_type friend operator-(iterator a, iterator b) { return (&(*a) - &(*b)); } +- iterator operator+(size_type n) { return iterator(ptr + n); } +- iterator& operator+=(size_type n) { ptr += n; return *this; } +- iterator operator-(size_type n) { return iterator(ptr - n); } +- iterator& operator-=(size_type n) { ptr -= n; return *this; } +- bool operator==(iterator x) const { return ptr == x.ptr; } +- bool operator!=(iterator x) const { return ptr != x.ptr; } +- bool operator>=(iterator x) const { return ptr >= x.ptr; } +- bool operator<=(iterator x) const { return ptr <= x.ptr; } +- bool operator>(iterator x) const { return ptr > x.ptr; } +- bool operator<(iterator x) const { return ptr < x.ptr; } +- }; +- +- class reverse_iterator { +- T* ptr; +- public: +- typedef Diff difference_type; +- typedef T value_type; +- typedef T* pointer; +- typedef T& reference; +- typedef std::bidirectional_iterator_tag iterator_category; +- reverse_iterator(T* ptr_) : ptr(ptr_) {} +- T& operator*() { return *ptr; } +- const T& operator*() const { return *ptr; } +- T* operator->() { return ptr; } +- const T* operator->() const { return ptr; } +- reverse_iterator& operator--() { ptr++; return *this; } +- reverse_iterator& operator++() { ptr--; return *this; } +- reverse_iterator operator++(int) { reverse_iterator copy(*this); ++(*this); return copy; } +- reverse_iterator operator--(int) { reverse_iterator copy(*this); --(*this); return copy; } +- bool operator==(reverse_iterator x) const { return ptr == x.ptr; } +- bool operator!=(reverse_iterator x) const { return ptr != x.ptr; } +- }; +- +- class const_iterator { +- const T* ptr; +- public: +- typedef Diff difference_type; +- typedef const T value_type; +- typedef const T* pointer; +- typedef const T& reference; +- typedef std::random_access_iterator_tag iterator_category; +- const_iterator(const T* ptr_) : ptr(ptr_) {} +- const_iterator(iterator x) : ptr(&(*x)) {} +- const T& operator*() const { return *ptr; } +- const T* operator->() const { return ptr; } +- const T& operator[](size_type pos) const { return ptr[pos]; } +- const_iterator& operator++() { ptr++; return *this; } +- const_iterator& operator--() { ptr--; return *this; } +- const_iterator operator++(int) { const_iterator copy(*this); ++(*this); return copy; } +- const_iterator operator--(int) { const_iterator copy(*this); --(*this); return copy; } +- difference_type friend operator-(const_iterator a, const_iterator b) { return (&(*a) - &(*b)); } +- const_iterator operator+(size_type n) { return const_iterator(ptr + n); } +- const_iterator& operator+=(size_type n) { ptr += n; return *this; } +- const_iterator operator-(size_type n) { return const_iterator(ptr - n); } +- const_iterator& operator-=(size_type n) { ptr -= n; return *this; } +- bool operator==(const_iterator x) const { return ptr == x.ptr; } +- bool operator!=(const_iterator x) const { return ptr != x.ptr; } +- bool operator>=(const_iterator x) const { return ptr >= x.ptr; } +- bool operator<=(const_iterator x) const { return ptr <= x.ptr; } +- bool operator>(const_iterator x) const { return ptr > x.ptr; } +- bool operator<(const_iterator x) const { return ptr < x.ptr; } +- }; +- +- class const_reverse_iterator { +- const T* ptr; +- public: +- typedef Diff difference_type; +- typedef const T value_type; +- typedef const T* pointer; +- typedef const T& reference; +- typedef std::bidirectional_iterator_tag iterator_category; +- const_reverse_iterator(const T* ptr_) : ptr(ptr_) {} +- const_reverse_iterator(reverse_iterator x) : ptr(&(*x)) {} +- const T& operator*() const { return *ptr; } +- const T* operator->() const { return ptr; } +- const_reverse_iterator& operator--() { ptr++; return *this; } +- const_reverse_iterator& operator++() { ptr--; return *this; } +- const_reverse_iterator operator++(int) { const_reverse_iterator copy(*this); ++(*this); return copy; } +- const_reverse_iterator operator--(int) { const_reverse_iterator copy(*this); --(*this); return copy; } +- bool operator==(const_reverse_iterator x) const { return ptr == x.ptr; } +- bool operator!=(const_reverse_iterator x) const { return ptr != x.ptr; } +- }; +- +-private: +-#pragma pack(push, 1) +- union direct_or_indirect { +- char direct[sizeof(T) * N]; +- struct { +- char* indirect; +- size_type capacity; +- } indirect_contents; +- }; +-#pragma pack(pop) +- alignas(char*) direct_or_indirect _union = {}; +- size_type _size = 0; +- +- static_assert(alignof(char*) % alignof(size_type) == 0 && sizeof(char*) % alignof(size_type) == 0, "size_type cannot have more restrictive alignment requirement than pointer"); +- static_assert(alignof(char*) % alignof(T) == 0, "value_type T cannot have more restrictive alignment requirement than pointer"); +- +- T* direct_ptr(difference_type pos) { return reinterpret_cast(_union.direct) + pos; } +- const T* direct_ptr(difference_type pos) const { return reinterpret_cast(_union.direct) + pos; } +- T* indirect_ptr(difference_type pos) { return reinterpret_cast(_union.indirect_contents.indirect) + pos; } +- const T* indirect_ptr(difference_type pos) const { return reinterpret_cast(_union.indirect_contents.indirect) + pos; } +- bool is_direct() const { return _size <= N; } +- +- void change_capacity(size_type new_capacity) { +- if (new_capacity <= N) { +- if (!is_direct()) { +- T* indirect = indirect_ptr(0); +- T* src = indirect; +- T* dst = direct_ptr(0); +- memcpy(dst, src, size() * sizeof(T)); +- free(indirect); +- _size -= N + 1; +- } +- } else { +- if (!is_direct()) { +- /* FIXME: Because malloc/realloc here won't call new_handler if allocation fails, assert +- success. These should instead use an allocator or new/delete so that handlers +- are called as necessary, but performance would be slightly degraded by doing so. */ +- _union.indirect_contents.indirect = static_cast(realloc(_union.indirect_contents.indirect, ((size_t)sizeof(T)) * new_capacity)); +- assert(_union.indirect_contents.indirect); +- _union.indirect_contents.capacity = new_capacity; +- } else { +- char* new_indirect = static_cast(malloc(((size_t)sizeof(T)) * new_capacity)); +- assert(new_indirect); +- T* src = direct_ptr(0); +- T* dst = reinterpret_cast(new_indirect); +- memcpy(dst, src, size() * sizeof(T)); +- _union.indirect_contents.indirect = new_indirect; +- _union.indirect_contents.capacity = new_capacity; +- _size += N + 1; +- } +- } +- } ++#ifndef BGL_PROTOCOL_H ++#define BGL_PROTOCOL_H + +- T* item_ptr(difference_type pos) { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); } +- const T* item_ptr(difference_type pos) const { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); } ++#include ++#include ++#include ++#include ++#include + +- void fill(T* dst, ptrdiff_t count, const T& value = T{}) { +- std::fill_n(dst, count, value); +- } +- +- template +- void fill(T* dst, InputIterator first, InputIterator last) { +- while (first != last) { +- new(static_cast(dst)) T(*first); +- ++dst; +- ++first; +- } +- } ++#include ++#include + ++/** Message header. ++ * (4) message start. ++ * (12) command. ++ * (4) size. ++ * (4) checksum. ++ */ ++class CMessageHeader ++{ + public: +- void assign(size_type n, const T& val) { +- clear(); +- if (capacity() < n) { +- change_capacity(n); +- } +- _size += n; +- fill(item_ptr(0), n, val); +- } +- +- template +- void assign(InputIterator first, InputIterator last) { +- size_type n = last - first; +- clear(); +- if (capacity() < n) { +- change_capacity(n); +- } +- _size += n; +- fill(item_ptr(0), first, last); +- } +- +- prevector() {} +- +- explicit prevector(size_type n) { +- resize(n); +- } +- +- explicit prevector(size_type n, const T& val) { +- change_capacity(n); +- _size += n; +- fill(item_ptr(0), n, val); +- } +- +- template +- prevector(InputIterator first, InputIterator last) { +- size_type n = last - first; +- change_capacity(n); +- _size += n; +- fill(item_ptr(0), first, last); +- } +- +- prevector(const prevector& other) { +- size_type n = other.size(); +- change_capacity(n); +- _size += n; +- fill(item_ptr(0), other.begin(), other.end()); +- } +- +- prevector(prevector&& other) { +- swap(other); +- } +- +- prevector& operator=(const prevector& other) { +- if (&other == this) { +- return *this; +- } +- assign(other.begin(), other.end()); +- return *this; +- } +- +- prevector& operator=(prevector&& other) { +- swap(other); +- return *this; +- } +- +- size_type size() const { +- return is_direct() ? _size : _size - N - 1; +- } +- +- bool empty() const { +- return size() == 0; +- } +- +- iterator begin() { return iterator(item_ptr(0)); } +- const_iterator begin() const { return const_iterator(item_ptr(0)); } +- iterator end() { return iterator(item_ptr(size())); } +- const_iterator end() const { return const_iterator(item_ptr(size())); } +- +- reverse_iterator rbegin() { return reverse_iterator(item_ptr(size() - 1)); } +- const_reverse_iterator rbegin() const { return const_reverse_iterator(item_ptr(size() - 1)); } +- reverse_iterator rend() { return reverse_iterator(item_ptr(-1)); } +- const_reverse_iterator rend() const { return const_reverse_iterator(item_ptr(-1)); } +- +- size_t capacity() const { +- if (is_direct()) { +- return N; +- } else { +- return _union.indirect_contents.capacity; +- } +- } +- +- T& operator[](size_type pos) { +- return *item_ptr(pos); +- } +- +- const T& operator[](size_type pos) const { +- return *item_ptr(pos); +- } ++ static constexpr size_t MESSAGE_START_SIZE = 4; ++ static constexpr size_t COMMAND_SIZE = 12; ++ static constexpr size_t MESSAGE_SIZE_SIZE = 4; ++ static constexpr size_t CHECKSUM_SIZE = 4; ++ static constexpr size_t MESSAGE_SIZE_OFFSET = MESSAGE_START_SIZE + COMMAND_SIZE; ++ static constexpr size_t CHECKSUM_OFFSET = MESSAGE_SIZE_OFFSET + MESSAGE_SIZE_SIZE; ++ static constexpr size_t HEADER_SIZE = MESSAGE_START_SIZE + COMMAND_SIZE + MESSAGE_SIZE_SIZE + CHECKSUM_SIZE; ++ typedef unsigned char MessageStartChars[MESSAGE_START_SIZE]; ++ ++ explicit CMessageHeader(); ++ ++ /** Construct a P2P message header from message-start characters, a command and the size of the message. ++ * @note Passing in a `pszCommand` longer than COMMAND_SIZE will result in a run-time assertion error. ++ */ ++ CMessageHeader(const MessageStartChars& pchMessageStartIn, const char* pszCommand, unsigned int nMessageSizeIn); ++ ++ std::string GetCommand() const; ++ bool IsCommandValid() const; ++ ++ SERIALIZE_METHODS(CMessageHeader, obj) { READWRITE(obj.pchMessageStart, obj.pchCommand, obj.nMessageSize, obj.pchChecksum); } ++ ++ char pchMessageStart[MESSAGE_START_SIZE]; ++ char pchCommand[COMMAND_SIZE]; ++ uint32_t nMessageSize; ++ uint8_t pchChecksum[CHECKSUM_SIZE]; ++}; + +- void resize(size_type new_size) { +- size_type cur_size = size(); +- if (cur_size == new_size) { +- return; +- } +- if (cur_size > new_size) { +- erase(item_ptr(new_size), end()); +- return; +- } +- if (new_size > capacity()) { +- change_capacity(new_size); +- } +- ptrdiff_t increase = new_size - cur_size; +- fill(item_ptr(cur_size), increase); +- _size += increase; +- } ++/** ++ * BGL protocol message types. When adding new message types, don't forget ++ * to update allNetMessageTypes in protocol.cpp. ++ */ ++namespace NetMsgType { + +- void reserve(size_type new_capacity) { +- if (new_capacity > capacity()) { +- change_capacity(new_capacity); +- } +- } ++/** ++ * The version message provides information about the transmitting node to the ++ * receiving node at the beginning of a connection. ++ */ ++extern const char* VERSION; ++/** ++ * The verack message acknowledges a previously-received version message, ++ * informing the connecting node that it can begin to send other messages. ++ */ ++extern const char* VERACK; ++/** ++ * The addr (IP address) message relays connection information for peers on the ++ * network. ++ */ ++extern const char* ADDR; ++/** ++ * The addrv2 message relays connection information for peers on the network just ++ * like the addr message, but is extended to allow gossiping of longer node ++ * addresses (see BIP155). ++ */ ++extern const char *ADDRV2; ++/** ++ * The sendaddrv2 message signals support for receiving ADDRV2 messages (BIP155). ++ * It also implies that its sender can encode as ADDRV2 and would send ADDRV2 ++ * instead of ADDR to a peer that has signaled ADDRV2 support by sending SENDADDRV2. ++ */ ++extern const char *SENDADDRV2; ++/** ++ * The inv message (inventory message) transmits one or more inventories of ++ * objects known to the transmitting peer. ++ */ ++extern const char* INV; ++/** ++ * The getdata message requests one or more data objects from another node. ++ */ ++extern const char* GETDATA; ++/** ++ * The merkleblock message is a reply to a getdata message which requested a ++ * block using the inventory type MSG_MERKLEBLOCK. ++ * @since protocol version 70001 as described by BIP37. ++ */ ++extern const char* MERKLEBLOCK; ++/** ++ * The getblocks message requests an inv message that provides block header ++ * hashes starting from a particular point in the block chain. ++ */ ++extern const char* GETBLOCKS; ++/** ++ * The getheaders message requests a headers message that provides block ++ * headers starting from a particular point in the block chain. ++ * @since protocol version 31800. ++ */ ++extern const char* GETHEADERS; ++/** ++ * The tx message transmits a single transaction. ++ */ ++extern const char* TX; ++/** ++ * The headers message sends one or more block headers to a node which ++ * previously requested certain headers with a getheaders message. ++ * @since protocol version 31800. ++ */ ++extern const char* HEADERS; ++/** ++ * The block message transmits a single serialized block. ++ */ ++extern const char* BLOCK; ++/** ++ * The getaddr message requests an addr message from the receiving node, ++ * preferably one with lots of IP addresses of other receiving nodes. ++ */ ++extern const char* GETADDR; ++/** ++ * The mempool message requests the TXIDs of transactions that the receiving ++ * node has verified as valid but which have not yet appeared in a block. ++ * @since protocol version 60002. ++ */ ++extern const char* MEMPOOL; ++/** ++ * The ping message is sent periodically to help confirm that the receiving ++ * peer is still connected. ++ */ ++extern const char* PING; ++/** ++ * The pong message replies to a ping message, proving to the pinging node that ++ * the ponging node is still alive. ++ * @since protocol version 60001 as described by BIP31. ++ */ ++extern const char* PONG; ++/** ++ * The notfound message is a reply to a getdata message which requested an ++ * object the receiving node does not have available for relay. ++ * @since protocol version 70001. ++ */ ++extern const char* NOTFOUND; ++/** ++ * The filterload message tells the receiving peer to filter all relayed ++ * transactions and requested merkle blocks through the provided filter. ++ * @since protocol version 70001 as described by BIP37. ++ * Only available with service bit NODE_BLOOM since protocol version ++ * 70011 as described by BIP111. ++ */ ++extern const char* FILTERLOAD; ++/** ++ * The filteradd message tells the receiving peer to add a single element to a ++ * previously-set bloom filter, such as a new public key. ++ * @since protocol version 70001 as described by BIP37. ++ * Only available with service bit NODE_BLOOM since protocol version ++ * 70011 as described by BIP111. ++ */ ++extern const char* FILTERADD; ++/** ++ * The filterclear message tells the receiving peer to remove a previously-set ++ * bloom filter. ++ * @since protocol version 70001 as described by BIP37. ++ * Only available with service bit NODE_BLOOM since protocol version ++ * 70011 as described by BIP111. ++ */ ++extern const char* FILTERCLEAR; ++/** ++ * Indicates that a node prefers to receive new block announcements via a ++ * "headers" message rather than an "inv". ++ * @since protocol version 70012 as described by BIP130. ++ */ ++extern const char* SENDHEADERS; ++/** ++ * The feefilter message tells the receiving peer not to inv us any txs ++ * which do not meet the specified min fee rate. ++ * @since protocol version 70013 as described by BIP133 ++ */ ++extern const char* FEEFILTER; ++/** ++ * Contains a 1-byte bool and 8-byte LE version number. ++ * Indicates that a node is willing to provide blocks via "cmpctblock" messages. ++ * May indicate that a node prefers to receive new block announcements via a ++ * "cmpctblock" message rather than an "inv", depending on message contents. ++ * @since protocol version 70014 as described by BIP 152 ++ */ ++extern const char* SENDCMPCT; ++/** ++ * Contains a CBlockHeaderAndShortTxIDs object - providing a header and ++ * list of "short txids". ++ * @since protocol version 70014 as described by BIP 152 ++ */ ++extern const char* CMPCTBLOCK; ++/** ++ * Contains a BlockTransactionsRequest ++ * Peer should respond with "blocktxn" message. ++ * @since protocol version 70014 as described by BIP 152 ++ */ ++extern const char* GETBLOCKTXN; ++/** ++ * Contains a BlockTransactions. ++ * Sent in response to a "getblocktxn" message. ++ * @since protocol version 70014 as described by BIP 152 ++ */ ++extern const char* BLOCKTXN; ++/** ++ * getcfilters requests compact filters for a range of blocks. ++ * Only available with service bit NODE_COMPACT_FILTERS as described by ++ * BIP 157 & 158. ++ */ ++extern const char* GETCFILTERS; ++/** ++ * cfilter is a response to a getcfilters request containing a single compact ++ * filter. ++ */ ++extern const char* CFILTER; ++/** ++ * getcfheaders requests a compact filter header and the filter hashes for a ++ * range of blocks, which can then be used to reconstruct the filter headers ++ * for those blocks. ++ * Only available with service bit NODE_COMPACT_FILTERS as described by ++ * BIP 157 & 158. ++ */ ++extern const char* GETCFHEADERS; ++/** ++ * cfheaders is a response to a getcfheaders request containing a filter header ++ * and a vector of filter hashes for each subsequent block in the requested range. ++ */ ++extern const char* CFHEADERS; ++/** ++ * getcfcheckpt requests evenly spaced compact filter headers, enabling ++ * parallelized download and validation of the headers between them. ++ * Only available with service bit NODE_COMPACT_FILTERS as described by ++ * BIP 157 & 158. ++ */ ++extern const char* GETCFCHECKPT; ++/** ++ * cfcheckpt is a response to a getcfcheckpt request containing a vector of ++ * evenly spaced filter headers for blocks on the requested chain. ++ */ ++extern const char* CFCHECKPT; ++/** ++ * Indicates that a node prefers to relay transactions via wtxid, rather than ++ * txid. ++ * @since protocol version 70016 as described by BIP 339. ++ */ ++extern const char* WTXIDRELAY; ++}; // namespace NetMsgType ++ ++/* Get a vector of all valid message types (see above) */ ++const std::vector& getAllNetMessageTypes(); ++ ++/** nServices flags */ ++enum ServiceFlags : uint64_t { ++ // NOTE: When adding here, be sure to update serviceFlagToStr too ++ // Nothing ++ NODE_NONE = 0, ++ // NODE_NETWORK means that the node is capable of serving the complete block chain. It is currently ++ // set by all BGL Core non pruned nodes, and is unset by SPV clients or other light clients. ++ NODE_NETWORK = (1 << 0), ++ // NODE_GETUTXO means the node is capable of responding to the getutxo protocol request. ++ // BGL Core does not support this but a patch set called BGL XT does. ++ // See BIP 64 for details on how this is implemented. ++ NODE_GETUTXO = (1 << 1), ++ // NODE_BLOOM means the node is capable and willing to handle bloom-filtered connections. ++ // BGL Core nodes used to support this by default, without advertising this bit, ++ // but no longer do as of protocol version 70011 (= NO_BLOOM_VERSION) ++ NODE_BLOOM = (1 << 2), ++ // NODE_WITNESS indicates that a node can be asked for blocks and transactions including ++ // witness data. ++ NODE_WITNESS = (1 << 3), ++ // NODE_COMPACT_FILTERS means the node will service basic block filter requests. ++ // See BIP157 and BIP158 for details on how this is implemented. ++ NODE_COMPACT_FILTERS = (1 << 6), ++ // NODE_NETWORK_LIMITED means the same as NODE_NETWORK with the limitation of only ++ // serving the last 288 (2 day) blocks ++ // See BIP159 for details on how this is implemented. ++ NODE_NETWORK_LIMITED = (1 << 10), ++ ++ // Bits 24-31 are reserved for temporary experiments. Just pick a bit that ++ // isn't getting used, or one not being used much, and notify the ++ // BGL-development mailing list. Remember that service bits are just ++ // unauthenticated advertisements, so your code must be robust against ++ // collisions and other cases where nodes may be advertising a service they ++ // do not actually support. Other service bits should be allocated via the ++ // BIP process. ++}; + +- void shrink_to_fit() { +- change_capacity(size()); +- } ++/** ++ * Convert service flags (a bitmask of NODE_*) to human readable strings. ++ * It supports unknown service flags which will be returned as "UNKNOWN[...]". ++ * @param[in] flags multiple NODE_* bitwise-OR-ed together ++ */ ++std::vector serviceFlagsToStr(uint64_t flags); + +- void clear() { +- resize(0); +- } ++/** ++ * Gets the set of service flags which are "desirable" for a given peer. ++ * ++ * These are the flags which are required for a peer to support for them ++ * to be "interesting" to us, ie for us to wish to use one of our few ++ * outbound connection slots for or for us to wish to prioritize keeping ++ * their connection around. ++ * ++ * Relevant service flags may be peer- and state-specific in that the ++ * version of the peer may determine which flags are required (eg in the ++ * case of NODE_NETWORK_LIMITED where we seek out NODE_NETWORK peers ++ * unless they set NODE_NETWORK_LIMITED and we are out of IBD, in which ++ * case NODE_NETWORK_LIMITED suffices). ++ * ++ * Thus, generally, avoid calling with peerServices == NODE_NONE, unless ++ * state-specific flags must absolutely be avoided. When called with ++ * peerServices == NODE_NONE, the returned desirable service flags are ++ * guaranteed to not change dependent on state - ie they are suitable for ++ * use when describing peers which we know to be desirable, but for which ++ * we do not have a confirmed set of service flags. ++ * ++ * If the NODE_NONE return value is changed, contrib/seeds/makeseeds.py ++ * should be updated appropriately to filter for the same nodes. ++ */ ++ServiceFlags GetDesirableServiceFlags(ServiceFlags services); + +- iterator insert(iterator pos, const T& value) { +- size_type p = pos - begin(); +- size_type new_size = size() + 1; +- if (capacity() < new_size) { +- change_capacity(new_size + (new_size >> 1)); +- } +- T* ptr = item_ptr(p); +- memmove(ptr + 1, ptr, (size() - p) * sizeof(T)); +- _size++; +- new(static_cast(ptr)) T(value); +- return iterator(ptr); +- } ++/** Set the current IBD status in order to figure out the desirable service flags */ ++void SetServiceFlagsIBDCache(bool status); + +- void insert(iterator pos, size_type count, const T& value) { +- size_type p = pos - begin(); +- size_type new_size = size() + count; +- if (capacity() < new_size) { +- change_capacity(new_size + (new_size >> 1)); +- } +- T* ptr = item_ptr(p); +- memmove(ptr + count, ptr, (size() - p) * sizeof(T)); +- _size += count; +- fill(item_ptr(p), count, value); +- } ++/** ++ * A shortcut for (services & GetDesirableServiceFlags(services)) ++ * == GetDesirableServiceFlags(services), ie determines whether the given ++ * set of service flags are sufficient for a peer to be "relevant". ++ */ ++static inline bool HasAllDesirableServiceFlags(ServiceFlags services) ++{ ++ return !(GetDesirableServiceFlags(services) & (~services)); ++} ++ ++/** ++ * Checks if a peer with the given service flags may be capable of having a ++ * robust address-storage DB. ++ */ ++static inline bool MayHaveUsefulAddressDB(ServiceFlags services) ++{ ++ return (services & NODE_NETWORK) || (services & NODE_NETWORK_LIMITED); ++} + +- template +- void insert(iterator pos, InputIterator first, InputIterator last) { +- size_type p = pos - begin(); +- difference_type count = last - first; +- size_type new_size = size() + count; +- if (capacity() < new_size) { +- change_capacity(new_size + (new_size >> 1)); +- } +- T* ptr = item_ptr(p); +- memmove(ptr + count, ptr, (size() - p) * sizeof(T)); +- _size += count; +- fill(ptr, first, last); +- } ++/** A CService with information about it as peer */ ++class CAddress : public CService ++{ ++ static constexpr uint32_t TIME_INIT{100000000}; + +- inline void resize_uninitialized(size_type new_size) { +- // resize_uninitialized changes the size of the prevector but does not initialize it. +- // If size < new_size, the added elements must be initialized explicitly. +- if (capacity() < new_size) { +- change_capacity(new_size); +- _size += new_size - size(); +- return; ++public: ++ CAddress() : CService{} {}; ++ CAddress(CService ipIn, ServiceFlags nServicesIn) : CService{ipIn}, nServices{nServicesIn} {}; ++ CAddress(CService ipIn, ServiceFlags nServicesIn, uint32_t nTimeIn) : CService{ipIn}, nTime{nTimeIn}, nServices{nServicesIn} {}; ++ ++ SERIALIZE_METHODS(CAddress, obj) ++ { ++ SER_READ(obj, obj.nTime = TIME_INIT); ++ int nVersion = s.GetVersion(); ++ if (s.GetType() & SER_DISK) { ++ READWRITE(nVersion); + } +- if (new_size < size()) { +- erase(item_ptr(new_size), end()); +- } else { +- _size += new_size - size(); ++ if ((s.GetType() & SER_DISK) || ++ (nVersion != INIT_PROTO_VERSION && !(s.GetType() & SER_GETHASH))) { ++ // The only time we serialize a CAddress object without nTime is in ++ // the initial VERSION messages which contain two CAddress records. ++ // At that point, the serialization version is INIT_PROTO_VERSION. ++ // After the version handshake, serialization version is >= ++ // MIN_PEER_PROTO_VERSION and all ADDR messages are serialized with ++ // nTime. ++ READWRITE(obj.nTime); + } +- } +- +- iterator erase(iterator pos) { +- return erase(pos, pos + 1); +- } +- +- iterator erase(iterator first, iterator last) { +- // Erase is not allowed to the change the object's capacity. That means +- // that when starting with an indirectly allocated prevector with +- // size and capacity > N, the result may be a still indirectly allocated +- // prevector with size <= N and capacity > N. A shrink_to_fit() call is +- // necessary to switch to the (more efficient) directly allocated +- // representation (with capacity N and size <= N). +- iterator p = first; +- char* endp = (char*)&(*end()); +- if (!std::is_trivially_destructible::value) { +- while (p != last) { +- (*p).~T(); +- _size--; +- ++p; +- } ++ if (nVersion & ADDRV2_FORMAT) { ++ uint64_t services_tmp; ++ SER_WRITE(obj, services_tmp = obj.nServices); ++ READWRITE(Using>(services_tmp)); ++ SER_READ(obj, obj.nServices = static_cast(services_tmp)); + } else { +- _size -= last - p; ++ READWRITE(Using>(obj.nServices)); + } +- memmove(&(*first), &(*last), endp - ((char*)(&(*last)))); +- return first; ++ READWRITEAS(CService, obj); + } + +- template +- void emplace_back(Args&&... args) { +- size_type new_size = size() + 1; +- if (capacity() < new_size) { +- change_capacity(new_size + (new_size >> 1)); +- } +- new(item_ptr(size())) T(std::forward(args)...); +- _size++; +- } ++ // disk and network only ++ uint32_t nTime{TIME_INIT}; + +- void push_back(const T& value) { +- emplace_back(value); +- } +- +- void pop_back() { +- erase(end() - 1, end()); +- } ++ ServiceFlags nServices{NODE_NONE}; ++}; + +- T& front() { +- return *item_ptr(0); +- } ++/** getdata message type flags */ ++const uint32_t MSG_WITNESS_FLAG = 1 << 30; ++const uint32_t MSG_TYPE_MASK = 0xffffffff >> 2; + +- const T& front() const { +- return *item_ptr(0); +- } +- +- T& back() { +- return *item_ptr(size() - 1); +- } +- +- const T& back() const { +- return *item_ptr(size() - 1); +- } ++/** getdata / inv message types. ++ * These numbers are defined by the protocol. When adding a new value, be sure ++ * to mention it in the respective BIP. ++ */ ++enum GetDataMsg : uint32_t { ++ UNDEFINED = 0, ++ MSG_TX = 1, ++ MSG_BLOCK = 2, ++ MSG_WTX = 5, //!< Defined in BIP 339 ++ // The following can only occur in getdata. Invs always use TX/WTX or BLOCK. ++ MSG_FILTERED_BLOCK = 3, //!< Defined in BIP37 ++ MSG_CMPCT_BLOCK = 4, //!< Defined in BIP152 ++ MSG_WITNESS_BLOCK = MSG_BLOCK | MSG_WITNESS_FLAG, //!< Defined in BIP144 ++ MSG_WITNESS_TX = MSG_TX | MSG_WITNESS_FLAG, //!< Defined in BIP144 ++ // MSG_FILTERED_WITNESS_BLOCK is defined in BIP144 as reserved for future ++ // use and remains unused. ++ // MSG_FILTERED_WITNESS_BLOCK = MSG_FILTERED_BLOCK | MSG_WITNESS_FLAG, ++}; + +- void swap(prevector& other) { +- std::swap(_union, other._union); +- std::swap(_size, other._size); +- } ++/** inv message data */ ++class CInv ++{ ++public: ++ CInv(); ++ CInv(uint32_t typeIn, const uint256& hashIn); + +- ~prevector() { +- if (!std::is_trivially_destructible::value) { +- clear(); +- } +- if (!is_direct()) { +- free(_union.indirect_contents.indirect); +- _union.indirect_contents.indirect = nullptr; +- } +- } ++ SERIALIZE_METHODS(CInv, obj) { READWRITE(obj.type, obj.hash); } + +- bool operator==(const prevector& other) const { +- if (other.size() != size()) { +- return false; +- } +- const_iterator b1 = begin(); +- const_iterator b2 = other.begin(); +- const_iterator e1 = end(); +- while (b1 != e1) { +- if ((*b1) != (*b2)) { +- return false; +- } +- ++b1; +- ++b2; +- } +- return true; +- } ++ friend bool operator<(const CInv& a, const CInv& b); + +- bool operator!=(const prevector& other) const { +- return !(*this == other); +- } ++ std::string GetCommand() const; ++ std::string ToString() const; + +- bool operator<(const prevector& other) const { +- if (size() < other.size()) { +- return true; +- } +- if (size() > other.size()) { +- return false; +- } +- const_iterator b1 = begin(); +- const_iterator b2 = other.begin(); +- const_iterator e1 = end(); +- while (b1 != e1) { +- if ((*b1) < (*b2)) { +- return true; +- } +- if ((*b2) < (*b1)) { +- return false; +- } +- ++b1; +- ++b2; +- } +- return false; +- } ++ // Single-message helper methods ++ bool IsMsgTx() const { return type == MSG_TX; } ++ bool IsMsgBlk() const { return type == MSG_BLOCK; } ++ bool IsMsgWtx() const { return type == MSG_WTX; } ++ bool IsMsgFilteredBlk() const { return type == MSG_FILTERED_BLOCK; } ++ bool IsMsgCmpctBlk() const { return type == MSG_CMPCT_BLOCK; } ++ bool IsMsgWitnessBlk() const { return type == MSG_WITNESS_BLOCK; } + +- size_t allocated_memory() const { +- if (is_direct()) { +- return 0; +- } else { +- return ((size_t)(sizeof(T))) * _union.indirect_contents.capacity; +- } ++ // Combined-message helper methods ++ bool IsGenTxMsg() const ++ { ++ return type == MSG_TX || type == MSG_WTX || type == MSG_WITNESS_TX; + } +- +- value_type* data() { +- return item_ptr(0); ++ bool IsGenBlkMsg() const ++ { ++ return type == MSG_BLOCK || type == MSG_FILTERED_BLOCK || type == MSG_CMPCT_BLOCK || type == MSG_WITNESS_BLOCK; + } + +- const value_type* data() const { +- return item_ptr(0); +- } ++ uint32_t type; ++ uint256 hash; + }; + +-#endif // BGL_PREVECTOR_H ++/** Convert a TX/WITNESS_TX/WTX CInv to a GenTxid. */ ++GenTxid ToGenTxid(const CInv& inv); ++ ++#endif // BGL_PROTOCOL_H +diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp +index 2765a090..20a51b74 100644 +--- a/src/rpc/mining.cpp ++++ b/src/rpc/mining.cpp +@@ -1,5 +1,5 @@ + // Copyright (c) 2010 Satoshi Nakamoto +-// Copyright (c) 2009-2020 The BGL Core developers ++// Copyright (c) 2009-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. + +@@ -164,15 +164,23 @@ static UniValue generateBlocks(ChainstateManager& chainman, const CTxMemPool& me + ++nHeight; + blockHashes.push_back(block_hash.GetHex()); + } +- while (nMaxTries > 0 && pblock->nNonce < std::numeric_limits::max() && !CheckProofOfWork(pblock->GetHash(), pblock->nBits, Params().GetConsensus()) && !ShutdownRequested()) { +- ++pblock->nNonce; +- --nMaxTries; +- } +- if (nMaxTries == 0 || ShutdownRequested()) { +- break; ++ } ++ return blockHashes; ++} ++ ++static bool getScriptFromDescriptor(const std::string& descriptor, CScript& script, std::string& error) ++{ ++ FlatSigningProvider key_provider; ++ const auto desc = Parse(descriptor, key_provider, error, /* require_checksum = */ false); ++ if (desc) { ++ if (desc->IsRange()) { ++ throw JSONRPCError(RPC_INVALID_PARAMETER, "Ranged descriptor not accepted. Maybe pass through deriveaddresses first?"); + } +- if (pblock->nNonce == std::numeric_limits::max()) { +- continue; ++ ++ FlatSigningProvider provider; ++ std::vector scripts; ++ if (!desc->Expand(0, key_provider, scripts, provider)) { ++ throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Cannot derive script without private keys")); + } + + // Combo descriptors can have 2 or 4 scripts, so we can't just check scripts.size() == 1 +@@ -187,13 +195,11 @@ static UniValue generateBlocks(ChainstateManager& chainman, const CTxMemPool& me + // Else take the 2nd script, since it is p2pkh + script = scripts.at(1); + } +- std::shared_ptr shared_pblock = std::make_shared(*pblock); +- if (!ProcessNewBlock(Params(), shared_pblock, true, nullptr)) +- throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted"); +- ++nHeight; +- blockHashes.push_back(pblock->GetHash().GetHex()); ++ ++ return true; ++ } else { ++ return false; + } +- return blockHashes; + } + + static RPCHelpMan generatetodescriptor() +@@ -219,21 +225,11 @@ static RPCHelpMan generatetodescriptor() + const int num_blocks{request.params[0].get_int()}; + const uint64_t max_tries{request.params[2].isNull() ? DEFAULT_MAX_TRIES : request.params[2].get_int()}; + +- FlatSigningProvider key_provider; ++ CScript coinbase_script; + std::string error; +- const auto desc = Parse(request.params[1].get_str(), key_provider, error, /* require_checksum = */ false); +- if (!desc) { ++ if (!getScriptFromDescriptor(request.params[1].get_str(), coinbase_script, error)) { + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, error); + } +- if (desc->IsRange()) { +- throw JSONRPCError(RPC_INVALID_PARAMETER, "Ranged descriptor not accepted. Maybe pass through deriveaddresses first?"); +- } +- +- FlatSigningProvider provider; +- std::vector coinbase_script; +- if (!desc->Expand(0, key_provider, coinbase_script, provider)) { +- throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Cannot derive script without private keys")); +- } + + const CTxMemPool& mempool = EnsureMemPool(request.context); + ChainstateManager& chainman = EnsureChainman(request.context); +@@ -246,12 +242,7 @@ static RPCHelpMan generatetodescriptor() + static RPCHelpMan generate() + { + return RPCHelpMan{"generate", "has been replaced by the -generate cli option. Refer to -help for more information.", {}, {}, RPCExamples{""}, [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue { +- +- if (request.fHelp) { +- throw std::runtime_error(self.ToString()); +- } else { + throw JSONRPCError(RPC_METHOD_NOT_FOUND, self.ToString()); +- } + }}; + } + +@@ -262,8 +253,12 @@ static RPCHelpMan generatetoaddress() + { + {"nblocks", RPCArg::Type::NUM, RPCArg::Optional::NO, "How many blocks are generated immediately."}, + {"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The address to send the newly generated BGL to."}, ++ {"maxtries", RPCArg::Type::NUM, /* default */ ToString(DEFAULT_MAX_TRIES), "How many iterations to try."}, ++ }, ++ RPCResult{ + RPCResult::Type::ARR, "", "hashes of blocks generated", + { ++ {RPCResult::Type::STR_HEX, "", "blockhash"}, + }}, + RPCExamples{ + "\nGenerate 11 blocks to myaddress\n" +@@ -812,6 +807,8 @@ static RPCHelpMan getblocktemplate() + result.pushKV("capabilities", aCaps); + + UniValue aRules(UniValue::VARR); ++ aRules.push_back("csv"); ++ if (!fPreSegWit) aRules.push_back("!segwit"); + UniValue vbavailable(UniValue::VOBJ); + for (int j = 0; j < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++j) { + Consensus::DeploymentPos pos = Consensus::DeploymentPos(j); +diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp +index 554ff7ad..40630496 100644 +--- a/src/rpc/net.cpp ++++ b/src/rpc/net.cpp +@@ -1,4 +1,4 @@ +-// Copyright (c) 2009-2020 The BGL Core developers ++// Copyright (c) 2009-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. + +@@ -288,10 +288,10 @@ static RPCHelpMan addnode() + std::string strCommand; + if (!request.params[1].isNull()) + strCommand = request.params[1].get_str(); +- if (request.fHelp || request.params.size() != 2 || +- (strCommand != "onetry" && strCommand != "add" && strCommand != "remove")) ++ if (strCommand != "onetry" && strCommand != "add" && strCommand != "remove") { + throw std::runtime_error( + self.ToString()); ++ } + + NodeContext& node = EnsureNodeContext(request.context); + if(!node.connman) +@@ -497,11 +497,9 @@ static RPCHelpMan getnettotals() + static UniValue GetNetworksInfo() + { + UniValue networks(UniValue::VARR); +- for(int n=0; n(n); +- if(network == NET_UNROUTABLE || network == NET_INTERNAL) +- continue; ++ if (network == NET_UNROUTABLE || network == NET_I2P || network == NET_CJDNS || network == NET_INTERNAL) continue; + proxyType proxy; + UniValue obj(UniValue::VOBJ); + GetProxy(network, proxy); +@@ -630,7 +628,7 @@ static RPCHelpMan setban() + std::string strCommand; + if (!request.params[1].isNull()) + strCommand = request.params[1].get_str(); +- if (request.fHelp || !help.IsValidNumArgs(request.params.size()) || (strCommand != "add" && strCommand != "remove")) { ++ if (strCommand != "add" && strCommand != "remove") { + throw std::runtime_error(help.ToString()); + } + NodeContext& node = EnsureNodeContext(request.context); +@@ -658,8 +656,7 @@ static RPCHelpMan setban() + + if (strCommand == "add") + { +- if ((isSubnet && node.banman->IsBanned(subNet)) || +- (!isSubnet && node.banman->IsBannedLevel(netAddr) == BanReasonManuallyAdded)) { ++ if (isSubnet ? node.banman->IsBanned(subNet) : node.banman->IsBanned(netAddr)) { + throw JSONRPCError(RPC_CLIENT_NODE_ALREADY_ADDED, "Error: IP/Subnet already banned"); + } + +diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp +index 3fd607bd..40aaf91e 100644 +--- a/src/script/interpreter.cpp ++++ b/src/script/interpreter.cpp +@@ -446,7 +446,7 @@ bool EvalScript(std::vector >& stack, const CScript& + CScript::const_iterator pbegincodehash = script.begin(); + opcodetype opcode; + valtype vchPushValue; +- std::vector vfExec; ++ ConditionStack vfExec; + std::vector altstack; + set_error(serror, SCRIPT_ERR_UNKNOWN_ERROR); + if ((sigversion == SigVersion::BASE || sigversion == SigVersion::WITNESS_V0) && script.size() > MAX_SCRIPT_SIZE) { +@@ -662,7 +662,7 @@ bool EvalScript(std::vector >& stack, const CScript& + { + if (vfExec.empty()) + return set_error(serror, SCRIPT_ERR_UNBALANCED_CONDITIONAL); +- vfExec.back() = !vfExec.back(); ++ vfExec.toggle_top(); + } + break; + +diff --git a/src/script/standard.cpp b/src/script/standard.cpp +index d860b6e7..f2f81664 100644 +--- a/src/script/standard.cpp ++++ b/src/script/standard.cpp +@@ -1,5 +1,5 @@ + // Copyright (c) 2009-2010 Satoshi Nakamoto +-// Copyright (c) 2009-2019 The BGL Core developers ++// Copyright (c) 2009-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. + +@@ -22,11 +22,8 @@ CScriptID::CScriptID(const ScriptHash& in) : BaseHash(static_cast(in)) + ScriptHash::ScriptHash(const CScript& in) : BaseHash(Hash160(in)) {} + ScriptHash::ScriptHash(const CScriptID& in) : BaseHash(static_cast(in)) {} + +-PKHash::PKHash(const CPubKey& pubkey) : uint160(pubkey.GetID()) {} +-PKHash::PKHash(const CKeyID& pubkey_id) : uint160(pubkey_id) {} +- +-WitnessV0KeyHash::WitnessV0KeyHash(const CPubKey& pubkey) : uint160(pubkey.GetID()) {} +-WitnessV0KeyHash::WitnessV0KeyHash(const PKHash& pubkey_hash) : uint160(static_cast(pubkey_hash)) {} ++PKHash::PKHash(const CPubKey& pubkey) : BaseHash(pubkey.GetID()) {} ++PKHash::PKHash(const CKeyID& pubkey_id) : BaseHash(pubkey_id) {} + + WitnessV0KeyHash::WitnessV0KeyHash(const CPubKey& pubkey) : BaseHash(pubkey.GetID()) {} + WitnessV0KeyHash::WitnessV0KeyHash(const PKHash& pubkey_hash) : BaseHash(static_cast(pubkey_hash)) {} +diff --git a/src/script/standard.h b/src/script/standard.h +index 41adf11c..9fe9892e 100644 +--- a/src/script/standard.h ++++ b/src/script/standard.h +@@ -1,5 +1,5 @@ + // Copyright (c) 2009-2010 Satoshi Nakamoto +-// Copyright (c) 2009-2020 The BGL Core developers ++// Copyright (c) 2009-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. + +@@ -28,7 +28,7 @@ protected: + + public: + BaseHash() : m_hash() {} +- explicit BaseHash(const HashType& in) : m_hash(in) {} ++ BaseHash(const HashType& in) : m_hash(in) {} + + unsigned char* begin() + { +@@ -90,7 +90,7 @@ class CScriptID : public BaseHash + public: + CScriptID() : BaseHash() {} + explicit CScriptID(const CScript& in); +- explicit CScriptID(const uint160& in) : uint160(in) {} ++ explicit CScriptID(const uint160& in) : BaseHash(in) {} + explicit CScriptID(const ScriptHash& in); + }; + +@@ -114,7 +114,7 @@ extern unsigned nMaxDatacarrierBytes; + * them to be valid. (but old blocks may not comply with) Currently just P2SH, + * but in the future other flags may be added. + * +- * Failing one of these tests may trigger a DoS ban - see CheckInputs() for ++ * Failing one of these tests may trigger a DoS ban - see CheckInputScripts() for + * details. + */ + static const unsigned int MANDATORY_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH; +@@ -209,7 +209,7 @@ struct WitnessUnknown + * * WitnessV0KeyHash: TxoutType::WITNESS_V0_KEYHASH destination (P2WPKH) + * * WitnessUnknown: TxoutType::WITNESS_UNKNOWN/WITNESS_V1_TAPROOT destination (P2W???) + * (taproot outputs do not require their own type as long as no wallet support exists) +- * A CTxDestination is the internal data type encoded in a bitcoin address ++ * A CTxDestination is the internal data type encoded in a BGL address + */ + typedef boost::variant CTxDestination; + +diff --git a/src/secp256k1/.gitignore b/src/secp256k1/.gitignore +index 55d325ae..ccdef02b 100644 +--- a/src/secp256k1/.gitignore ++++ b/src/secp256k1/.gitignore +@@ -1,14 +1,15 @@ + bench_inv + bench_ecdh + bench_ecmult ++bench_schnorrsig + bench_sign + bench_verify +-bench_schnorr_verify + bench_recover + bench_internal + tests + exhaustive_tests + gen_context ++valgrind_ctime_test + *.exe + *.so + *.a +@@ -30,6 +31,8 @@ libtool + *.lo + *.o + *~ ++*.log ++*.trs + src/libsecp256k1-config.h + src/libsecp256k1-config.h.in + src/ecmult_static_context.h +diff --git a/src/secp256k1/.travis.yml b/src/secp256k1/.travis.yml +index 74f658f4..ce8d6391 100644 +--- a/src/secp256k1/.travis.yml ++++ b/src/secp256k1/.travis.yml +@@ -1,68 +1,108 @@ + language: c +-os: linux ++os: ++ - linux ++ - osx ++ ++dist: bionic ++# Valgrind currently supports upto macOS 10.13, the latest xcode of that version is 10.1 ++osx_image: xcode10.1 + addons: + apt: +- packages: libgmp-dev ++ packages: ++ - libgmp-dev ++ - valgrind ++ - libtool-bin + compiler: + - clang + - gcc +-cache: +- directories: +- - src/java/guava/ + env: + global: +- - FIELD=auto BIGNUM=auto SCALAR=auto ENDOMORPHISM=no STATICPRECOMPUTATION=yes ASM=no BUILD=check EXTRAFLAGS= HOST= ECDH=no RECOVERY=no EXPERIMENTAL=no JNI=no +- - GUAVA_URL=https://search.maven.org/remotecontent?filepath=com/google/guava/guava/18.0/guava-18.0.jar GUAVA_JAR=src/java/guava/guava-18.0.jar ++ - WIDEMUL=auto BIGNUM=auto STATICPRECOMPUTATION=yes ECMULTGENPRECISION=auto ASM=no BUILD=check WITH_VALGRIND=yes RUN_VALGRIND=no EXTRAFLAGS= HOST= ECDH=no RECOVERY=no SCHNORRSIG=no EXPERIMENTAL=no CTIMETEST=yes BENCH=yes ITERS=2 + matrix: +- - SCALAR=32bit RECOVERY=yes +- - SCALAR=32bit FIELD=32bit ECDH=yes EXPERIMENTAL=yes +- - SCALAR=64bit +- - FIELD=64bit RECOVERY=yes +- - FIELD=64bit ENDOMORPHISM=yes +- - FIELD=64bit ENDOMORPHISM=yes ECDH=yes EXPERIMENTAL=yes +- - FIELD=64bit ASM=x86_64 +- - FIELD=64bit ENDOMORPHISM=yes ASM=x86_64 +- - FIELD=32bit ENDOMORPHISM=yes ++ - WIDEMUL=int64 RECOVERY=yes ++ - WIDEMUL=int64 ECDH=yes EXPERIMENTAL=yes SCHNORRSIG=yes ++ - WIDEMUL=int128 ++ - WIDEMUL=int128 RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes ++ - WIDEMUL=int128 ECDH=yes EXPERIMENTAL=yes SCHNORRSIG=yes ++ - WIDEMUL=int128 ASM=x86_64 + - BIGNUM=no +- - BIGNUM=no ENDOMORPHISM=yes RECOVERY=yes EXPERIMENTAL=yes ++ - BIGNUM=no RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes + - BIGNUM=no STATICPRECOMPUTATION=no +- - BUILD=distcheck +- - EXTRAFLAGS=CPPFLAGS=-DDETERMINISTIC +- - EXTRAFLAGS=CFLAGS=-O0 +- - BUILD=check-java JNI=yes ECDH=yes EXPERIMENTAL=yes ++ - BUILD=distcheck WITH_VALGRIND=no CTIMETEST=no BENCH=no ++ - CPPFLAGS=-DDETERMINISTIC ++ - CFLAGS=-O0 CTIMETEST=no ++ - ECMULTGENPRECISION=2 ++ - ECMULTGENPRECISION=8 ++ - RUN_VALGRIND=yes BIGNUM=no ASM=x86_64 ECDH=yes RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes EXTRAFLAGS="--disable-openssl-tests" BUILD= + matrix: + fast_finish: true + include: + - compiler: clang +- env: HOST=i686-linux-gnu ENDOMORPHISM=yes ++ os: linux ++ env: HOST=i686-linux-gnu + addons: + apt: + packages: + - gcc-multilib + - libgmp-dev:i386 ++ - valgrind ++ - libtool-bin ++ - libc6-dbg:i386 + - compiler: clang + env: HOST=i686-linux-gnu ++ os: linux + addons: + apt: + packages: + - gcc-multilib ++ - valgrind ++ - libtool-bin ++ - libc6-dbg:i386 + - compiler: gcc +- env: HOST=i686-linux-gnu ENDOMORPHISM=yes ++ env: HOST=i686-linux-gnu ++ os: linux + addons: + apt: + packages: + - gcc-multilib ++ - valgrind ++ - libtool-bin ++ - libc6-dbg:i386 + - compiler: gcc ++ os: linux + env: HOST=i686-linux-gnu + addons: + apt: + packages: + - gcc-multilib + - libgmp-dev:i386 +-before_install: mkdir -p `dirname $GUAVA_JAR` +-install: if [ ! -f $GUAVA_JAR ]; then wget $GUAVA_URL -O $GUAVA_JAR; fi ++ - valgrind ++ - libtool-bin ++ - libc6-dbg:i386 ++ # S390x build (big endian system) ++ - compiler: gcc ++ env: HOST=s390x-unknown-linux-gnu ECDH=yes RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes CTIMETEST= ++ arch: s390x ++ ++# We use this to install macOS dependencies instead of the built in `homebrew` plugin, ++# because in xcode earlier than 11 they have a bug requiring updating the system which overall takes ~8 minutes. ++# https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296 ++before_install: ++ - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install gmp valgrind gcc@9; fi ++ + before_script: ./autogen.sh ++ ++# travis auto terminates jobs that go for 10 minutes without printing to stdout, but travis_wait doesn't work well with forking programs like valgrind (https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received https://github.com/bitcoin-core/secp256k1/pull/750#issuecomment-623476860) + script: +- - if [ -n "$HOST" ]; then export USE_HOST="--host=$HOST"; fi +- - if [ "x$HOST" = "xi686-linux-gnu" ]; then export CC="$CC -m32"; fi +- - ./configure --enable-experimental=$EXPERIMENTAL --enable-endomorphism=$ENDOMORPHISM --with-field=$FIELD --with-bignum=$BIGNUM --with-scalar=$SCALAR --enable-ecmult-static-precomputation=$STATICPRECOMPUTATION --enable-module-ecdh=$ECDH --enable-module-recovery=$RECOVERY --enable-jni=$JNI $EXTRAFLAGS $USE_HOST && make -j2 $BUILD ++ - function keep_alive() { while true; do echo -en "\a"; sleep 60; done } ++ - keep_alive & ++ - ./contrib/travis.sh ++ - kill %keep_alive ++ ++after_script: ++ - cat ./tests.log ++ - cat ./exhaustive_tests.log ++ - cat ./valgrind_ctime_test.log ++ - cat ./bench.log ++ - $CC --version ++ - valgrind --version +diff --git a/src/secp256k1/Makefile.am b/src/secp256k1/Makefile.am +index b55a7f62..023fa606 100644 +--- a/src/secp256k1/Makefile.am ++++ b/src/secp256k1/Makefile.am +@@ -1,13 +1,8 @@ + ACLOCAL_AMFLAGS = -I build-aux/m4 + + lib_LTLIBRARIES = libsecp256k1.la +-if USE_JNI +-JNI_LIB = libsecp256k1_jni.la +-noinst_LTLIBRARIES = $(JNI_LIB) +-else +-JNI_LIB = +-endif + include_HEADERS = include/secp256k1.h ++include_HEADERS += include/secp256k1_preallocated.h + noinst_HEADERS = + noinst_HEADERS += src/scalar.h + noinst_HEADERS += src/scalar_4x64.h +@@ -39,11 +34,11 @@ noinst_HEADERS += src/field_5x52.h + noinst_HEADERS += src/field_5x52_impl.h + noinst_HEADERS += src/field_5x52_int128_impl.h + noinst_HEADERS += src/field_5x52_asm_impl.h +-noinst_HEADERS += src/java/org_BGL_NativeSecp256k1.h +-noinst_HEADERS += src/java/org_BGL_Secp256k1Context.h ++noinst_HEADERS += src/assumptions.h + noinst_HEADERS += src/util.h + noinst_HEADERS += src/scratch.h + noinst_HEADERS += src/scratch_impl.h ++noinst_HEADERS += src/selftest.h + noinst_HEADERS += src/testrand.h + noinst_HEADERS += src/testrand_impl.h + noinst_HEADERS += src/hash.h +@@ -74,16 +69,19 @@ endif + + libsecp256k1_la_SOURCES = src/secp256k1.c + libsecp256k1_la_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES) +-libsecp256k1_la_LIBADD = $(JNI_LIB) $(SECP_LIBS) $(COMMON_LIB) ++libsecp256k1_la_LIBADD = $(SECP_LIBS) $(COMMON_LIB) + +-libsecp256k1_jni_la_SOURCES = src/java/org_BGL_NativeSecp256k1.c src/java/org_BGL_Secp256k1Context.c +-libsecp256k1_jni_la_CPPFLAGS = -DSECP256K1_BUILD $(JNI_INCLUDES) ++if VALGRIND_ENABLED ++libsecp256k1_la_CPPFLAGS += -DVALGRIND ++endif + + noinst_PROGRAMS = + if USE_BENCHMARK + noinst_PROGRAMS += bench_verify bench_sign bench_internal bench_ecmult + bench_verify_SOURCES = src/bench_verify.c + bench_verify_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB) ++# SECP_TEST_INCLUDES are only used here for CRYPTO_CPPFLAGS ++bench_verify_CPPFLAGS = -DSECP256K1_BUILD $(SECP_TEST_INCLUDES) + bench_sign_SOURCES = src/bench_sign.c + bench_sign_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB) + bench_internal_SOURCES = src/bench_internal.c +@@ -99,6 +97,12 @@ if USE_TESTS + noinst_PROGRAMS += tests + tests_SOURCES = src/tests.c + tests_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/src -I$(top_srcdir)/include $(SECP_INCLUDES) $(SECP_TEST_INCLUDES) ++if VALGRIND_ENABLED ++tests_CPPFLAGS += -DVALGRIND ++noinst_PROGRAMS += valgrind_ctime_test ++valgrind_ctime_test_SOURCES = src/valgrind_ctime_test.c ++valgrind_ctime_test_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_LIBS) $(COMMON_LIB) ++endif + if !ENABLE_COVERAGE + tests_CPPFLAGS += -DVERIFY + endif +@@ -119,42 +123,12 @@ exhaustive_tests_LDFLAGS = -static + TESTS += exhaustive_tests + endif + +-JAVAROOT=src/java +-JAVAORG=org/BGL +-JAVA_GUAVA=$(srcdir)/$(JAVAROOT)/guava/guava-18.0.jar +-CLASSPATH_ENV=CLASSPATH=$(JAVA_GUAVA) +-JAVA_FILES= \ +- $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1.java \ +- $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1Test.java \ +- $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1Util.java \ +- $(JAVAROOT)/$(JAVAORG)/Secp256k1Context.java +- +-if USE_JNI +- +-$(JAVA_GUAVA): +- @echo Guava is missing. Fetch it via: \ +- wget https://search.maven.org/remotecontent?filepath=com/google/guava/guava/18.0/guava-18.0.jar -O $(@) +- @false +- +-.stamp-java: $(JAVA_FILES) +- @echo Compiling $^ +- $(AM_V_at)$(CLASSPATH_ENV) javac $^ +- @touch $@ +- +-if USE_TESTS +- +-check-java: libsecp256k1.la $(JAVA_GUAVA) .stamp-java +- $(AM_V_at)java -Djava.library.path="./:./src:./src/.libs:.libs/" -cp "$(JAVA_GUAVA):$(JAVAROOT)" $(JAVAORG)/NativeSecp256k1Test +- +-endif +-endif +- + if USE_ECMULT_STATIC_PRECOMPUTATION +-CPPFLAGS_FOR_BUILD +=-I$(top_srcdir) ++CPPFLAGS_FOR_BUILD +=-I$(top_srcdir) -I$(builddir)/src + + gen_context_OBJECTS = gen_context.o + gen_context_BIN = gen_context$(BUILD_EXEEXT) +-gen_%.o: src/gen_%.c ++gen_%.o: src/gen_%.c src/libsecp256k1-config.h + $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c $< -o $@ + + $(gen_context_BIN): $(gen_context_OBJECTS) +@@ -168,10 +142,10 @@ $(bench_ecmult_OBJECTS): src/ecmult_static_context.h + src/ecmult_static_context.h: $(gen_context_BIN) + ./$(gen_context_BIN) + +-CLEANFILES = $(gen_context_BIN) src/ecmult_static_context.h $(JAVAROOT)/$(JAVAORG)/*.class .stamp-java ++CLEANFILES = $(gen_context_BIN) src/ecmult_static_context.h + endif + +-EXTRA_DIST = autogen.sh src/gen_context.c src/basic-config.h $(JAVA_FILES) ++EXTRA_DIST = autogen.sh src/gen_context.c src/basic-config.h + + if ENABLE_MODULE_ECDH + include src/modules/ecdh/Makefile.am.include +@@ -180,3 +154,11 @@ endif + if ENABLE_MODULE_RECOVERY + include src/modules/recovery/Makefile.am.include + endif ++ ++if ENABLE_MODULE_EXTRAKEYS ++include src/modules/extrakeys/Makefile.am.include ++endif ++ ++if ENABLE_MODULE_SCHNORRSIG ++include src/modules/schnorrsig/Makefile.am.include ++endif +diff --git a/src/secp256k1/README.md b/src/secp256k1/README.md +index bfdc5e05..e0709372 100644 +--- a/src/secp256k1/README.md ++++ b/src/secp256k1/README.md +@@ -1,19 +1,24 @@ + libsecp256k1 + ============ + +-[![Build Status](https://travis-ci.org/BGL-core/secp256k1.svg?branch=master)](https://travis-ci.org/BGL-core/secp256k1) ++[![Build Status](https://travis-ci.org/bitcoin-core/secp256k1.svg?branch=master)](https://travis-ci.org/bitcoin-core/secp256k1) + +-Optimized C library for EC operations on curve secp256k1. ++Optimized C library for ECDSA signatures and secret/public key operations on curve secp256k1. + +-This library is a work in progress and is being used to research best practices. Use at your own risk. ++This library is intended to be the highest quality publicly available library for cryptography on the secp256k1 curve. However, the primary focus of its development has been for usage in the Bitcoin system and usage unlike Bitcoin's may be less well tested, verified, or suffer from a less well thought out interface. Correct usage requires some care and consideration that the library is fit for your application's purpose. + + Features: + * secp256k1 ECDSA signing/verification and key generation. +-* Adding/multiplying private/public keys. +-* Serialization/parsing of private keys, public keys, signatures. +-* Constant time, constant memory access signing and pubkey generation. +-* Derandomized DSA (via RFC6979 or with a caller provided function.) ++* Additive and multiplicative tweaking of secret/public keys. ++* Serialization/parsing of secret keys, public keys, signatures. ++* Constant time, constant memory access signing and public key generation. ++* Derandomized ECDSA (via RFC6979 or with a caller provided function.) + * Very efficient implementation. ++* Suitable for embedded systems. ++* Optional module for public key recovery. ++* Optional module for ECDH key exchange. ++ ++Experimental features have not received enough scrutiny to satisfy the standard of quality of this library but are made available for testing and review by the community. The APIs of these features should not be considered stable. + + Implementation details + ---------------------- +@@ -23,11 +28,12 @@ Implementation details + * Extensive testing infrastructure. + * Structured to facilitate review and analysis. + * Intended to be portable to any system with a C89 compiler and uint64_t support. ++ * No use of floating types. + * Expose only higher level interfaces to minimize the API surface and improve application security. ("Be difficult to use insecurely.") + * Field operations + * Optimized implementation of arithmetic modulo the curve's field size (2^256 - 0x1000003D1). + * Using 5 52-bit limbs (including hand-optimized assembly for x86_64, by Diederik Huys). +- * Using 10 26-bit limbs. ++ * Using 10 26-bit limbs (including hand-optimized assembly for 32-bit ARM, by Wladimir J. van der Laan). + * Field inverses and square roots using a sliding window over blocks of 1s (by Peter Dettman). + * Scalar operations + * Optimized implementation without data-dependent branches of arithmetic modulo the curve's order. +@@ -42,12 +48,14 @@ Implementation details + * Use wNAF notation for point multiplicands. + * Use a much larger window for multiples of G, using precomputed multiples. + * Use Shamir's trick to do the multiplication with the public key and the generator simultaneously. +- * Optionally (off by default) use secp256k1's efficiently-computable endomorphism to split the P multiplicand into 2 half-sized ones. ++ * Use secp256k1's efficiently-computable endomorphism to split the P multiplicand into 2 half-sized ones. + * Point multiplication for signing + * Use a precomputed table of multiples of powers of 16 multiplied with the generator, so general multiplication becomes a series of additions. +- * Access the table with branch-free conditional moves so memory access is uniform. +- * No data-dependent branches +- * The precomputed tables add and eventually subtract points for which no known scalar (private key) is known, preventing even an attacker with control over the private key used to control the data internally. ++ * Intended to be completely free of timing sidechannels for secret-key operations (on reasonable hardware/toolchains) ++ * Access the table with branch-free conditional moves so memory access is uniform. ++ * No data-dependent branches ++ * Optional runtime blinding which attempts to frustrate differential power analysis. ++ * The precomputed tables add and eventually subtract points for which no known scalar (secret key) is known, preventing even an attacker with control over the secret key used to control the data internally. + + Build steps + ----------- +@@ -57,5 +65,40 @@ libsecp256k1 is built using autotools: + $ ./autogen.sh + $ ./configure + $ make +- $ ./tests ++ $ make check + $ sudo make install # optional ++ ++Exhaustive tests ++----------- ++ ++ $ ./exhaustive_tests ++ ++With valgrind, you might need to increase the max stack size: ++ ++ $ valgrind --max-stackframe=2500000 ./exhaustive_tests ++ ++Test coverage ++----------- ++ ++This library aims to have full coverage of the reachable lines and branches. ++ ++To create a test coverage report, configure with `--enable-coverage` (use of GCC is necessary): ++ ++ $ ./configure --enable-coverage ++ ++Run the tests: ++ ++ $ make check ++ ++To create a report, `gcovr` is recommended, as it includes branch coverage reporting: ++ ++ $ gcovr --exclude 'src/bench*' --print-summary ++ ++To create a HTML report with coloured and annotated source code: ++ ++ $ gcovr --exclude 'src/bench*' --html --html-details -o coverage.html ++ ++Reporting a vulnerability ++------------ ++ ++See [SECURITY.md](SECURITY.md) +diff --git a/src/secp256k1/build-aux/m4/BGL_secp.m4 b/src/secp256k1/build-aux/m4/BGL_secp.m4 +deleted file mode 100644 +index ece3d655..00000000 +--- a/src/secp256k1/build-aux/m4/BGL_secp.m4 ++++ /dev/null +@@ -1,89 +0,0 @@ +-dnl escape "$0x" below using the m4 quadrigaph @S|@, and escape it again with a \ for the shell. +-AC_DEFUN([SECP_64BIT_ASM_CHECK],[ +-AC_MSG_CHECKING(for x86_64 assembly availability) +-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +- #include ]],[[ +- uint64_t a = 11, tmp; +- __asm__ __volatile__("movq \@S|@0x100000000,%1; mulq %%rsi" : "+a"(a) : "S"(tmp) : "cc", "%rdx"); +- ]])],[has_64bit_asm=yes],[has_64bit_asm=no]) +-AC_MSG_RESULT([$has_64bit_asm]) +-]) +- +-dnl +-AC_DEFUN([SECP_OPENSSL_CHECK],[ +- has_libcrypto=no +- m4_ifdef([PKG_CHECK_MODULES],[ +- PKG_CHECK_MODULES([CRYPTO], [libcrypto], [has_libcrypto=yes],[has_libcrypto=no]) +- if test x"$has_libcrypto" = x"yes"; then +- TEMP_LIBS="$LIBS" +- LIBS="$LIBS $CRYPTO_LIBS" +- AC_CHECK_LIB(crypto, main,[AC_DEFINE(HAVE_LIBCRYPTO,1,[Define this symbol if libcrypto is installed])],[has_libcrypto=no]) +- LIBS="$TEMP_LIBS" +- fi +- ]) +- if test x$has_libcrypto = xno; then +- AC_CHECK_HEADER(openssl/crypto.h,[ +- AC_CHECK_LIB(crypto, main,[ +- has_libcrypto=yes +- CRYPTO_LIBS=-lcrypto +- AC_DEFINE(HAVE_LIBCRYPTO,1,[Define this symbol if libcrypto is installed]) +- ]) +- ]) +- LIBS= +- fi +-if test x"$has_libcrypto" = x"yes" && test x"$has_openssl_ec" = x; then +- AC_MSG_CHECKING(for EC functions in libcrypto) +- CPPFLAGS_TEMP="$CPPFLAGS" +- CPPFLAGS="$CRYPTO_CPPFLAGS $CPPFLAGS" +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +- #include +- #include +- #include +- #include ]],[[ +- # if OPENSSL_VERSION_NUMBER < 0x10100000L +- void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) {(void)sig->r; (void)sig->s;} +- # endif +- +- unsigned int zero = 0; +- const unsigned char *zero_ptr = (unsigned char*)&zero; +- EC_KEY_free(EC_KEY_new_by_curve_name(NID_secp256k1)); +- EC_KEY *eckey = EC_KEY_new(); +- EC_GROUP *group = EC_GROUP_new_by_curve_name(NID_secp256k1); +- EC_KEY_set_group(eckey, group); +- ECDSA_sign(0, NULL, 0, NULL, &zero, eckey); +- ECDSA_verify(0, NULL, 0, NULL, 0, eckey); +- o2i_ECPublicKey(&eckey, &zero_ptr, 0); +- d2i_ECPrivateKey(&eckey, &zero_ptr, 0); +- EC_KEY_check_key(eckey); +- EC_KEY_free(eckey); +- EC_GROUP_free(group); +- ECDSA_SIG *sig_openssl; +- sig_openssl = ECDSA_SIG_new(); +- d2i_ECDSA_SIG(&sig_openssl, &zero_ptr, 0); +- i2d_ECDSA_SIG(sig_openssl, NULL); +- ECDSA_SIG_get0(sig_openssl, NULL, NULL); +- ECDSA_SIG_free(sig_openssl); +- const BIGNUM *bignum = BN_value_one(); +- BN_is_negative(bignum); +- BN_num_bits(bignum); +- if (sizeof(zero) >= BN_num_bytes(bignum)) { +- BN_bn2bin(bignum, (unsigned char*)&zero); +- } +- ]])],[has_openssl_ec=yes],[has_openssl_ec=no]) +- AC_MSG_RESULT([$has_openssl_ec]) +- CPPFLAGS="$CPPFLAGS_TEMP" +-fi +-]) +- +-dnl +-AC_DEFUN([SECP_GMP_CHECK],[ +-if test x"$has_gmp" != x"yes"; then +- CPPFLAGS_TEMP="$CPPFLAGS" +- CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS" +- LIBS_TEMP="$LIBS" +- LIBS="$GMP_LIBS $LIBS" +- AC_CHECK_HEADER(gmp.h,[AC_CHECK_LIB(gmp, __gmpz_init,[has_gmp=yes; GMP_LIBS="$GMP_LIBS -lgmp"; AC_DEFINE(HAVE_LIBGMP,1,[Define this symbol if libgmp is installed])])]) +- CPPFLAGS="$CPPFLAGS_TEMP" +- LIBS="$LIBS_TEMP" +-fi +-]) +diff --git a/src/secp256k1/configure.ac b/src/secp256k1/configure.ac +index 3b7a328c..eb3b449b 100644 +--- a/src/secp256k1/configure.ac ++++ b/src/secp256k1/configure.ac +@@ -7,6 +7,11 @@ AH_TOP([#ifndef LIBSECP256K1_CONFIG_H]) + AH_TOP([#define LIBSECP256K1_CONFIG_H]) + AH_BOTTOM([#endif /*LIBSECP256K1_CONFIG_H*/]) + AM_INIT_AUTOMAKE([foreign subdir-objects]) ++ ++# Set -g if CFLAGS are not already set, which matches the default autoconf ++# behavior (see PROG_CC in the Autoconf manual) with the exception that we don't ++# set -O2 here because we set it in any case (see further down). ++: ${CFLAGS="-g"} + LT_INIT + + dnl make the compilation flags quiet unless V=1 is used +@@ -19,10 +24,6 @@ AC_PATH_TOOL(RANLIB, ranlib) + AC_PATH_TOOL(STRIP, strip) + AX_PROG_CC_FOR_BUILD + +-if test "x$CFLAGS" = "x"; then +- CFLAGS="-g" +-fi +- + AM_PROG_CC_C_O + + AC_PROG_CC_C89 +@@ -45,6 +46,7 @@ case $host_os in + if test x$openssl_prefix != x; then + PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH" + export PKG_CONFIG_PATH ++ CRYPTO_CPPFLAGS="-I$openssl_prefix/include" + fi + if test x$gmp_prefix != x; then + GMP_CPPFLAGS="-I$gmp_prefix/include" +@@ -63,11 +65,11 @@ case $host_os in + ;; + esac + +-CFLAGS="$CFLAGS -W" ++CFLAGS="-W $CFLAGS" + +-warn_CFLAGS="-std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings" ++warn_CFLAGS="-std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-unused-function -Wno-long-long -Wno-overlength-strings" + saved_CFLAGS="$CFLAGS" +-CFLAGS="$CFLAGS $warn_CFLAGS" ++CFLAGS="$warn_CFLAGS $CFLAGS" + AC_MSG_CHECKING([if ${CC} supports ${warn_CFLAGS}]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], + [ AC_MSG_RESULT([yes]) ], +@@ -76,7 +78,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], + ]) + + saved_CFLAGS="$CFLAGS" +-CFLAGS="$CFLAGS -fvisibility=hidden" ++CFLAGS="-fvisibility=hidden $CFLAGS" + AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], + [ AC_MSG_RESULT([yes]) ], +@@ -85,80 +87,114 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], + ]) + + AC_ARG_ENABLE(benchmark, +- AS_HELP_STRING([--enable-benchmark],[compile benchmark (default is yes)]), ++ AS_HELP_STRING([--enable-benchmark],[compile benchmark [default=yes]]), + [use_benchmark=$enableval], + [use_benchmark=yes]) + + AC_ARG_ENABLE(coverage, +- AS_HELP_STRING([--enable-coverage],[enable compiler flags to support kcov coverage analysis]), ++ AS_HELP_STRING([--enable-coverage],[enable compiler flags to support kcov coverage analysis [default=no]]), + [enable_coverage=$enableval], + [enable_coverage=no]) + + AC_ARG_ENABLE(tests, +- AS_HELP_STRING([--enable-tests],[compile tests (default is yes)]), ++ AS_HELP_STRING([--enable-tests],[compile tests [default=yes]]), + [use_tests=$enableval], + [use_tests=yes]) + + AC_ARG_ENABLE(openssl_tests, +- AS_HELP_STRING([--enable-openssl-tests],[enable OpenSSL tests, if OpenSSL is available (default is auto)]), ++ AS_HELP_STRING([--enable-openssl-tests],[enable OpenSSL tests [default=auto]]), + [enable_openssl_tests=$enableval], + [enable_openssl_tests=auto]) + + AC_ARG_ENABLE(experimental, +- AS_HELP_STRING([--enable-experimental],[allow experimental configure options (default is no)]), ++ AS_HELP_STRING([--enable-experimental],[allow experimental configure options [default=no]]), + [use_experimental=$enableval], + [use_experimental=no]) + + AC_ARG_ENABLE(exhaustive_tests, +- AS_HELP_STRING([--enable-exhaustive-tests],[compile exhaustive tests (default is yes)]), ++ AS_HELP_STRING([--enable-exhaustive-tests],[compile exhaustive tests [default=yes]]), + [use_exhaustive_tests=$enableval], + [use_exhaustive_tests=yes]) + +-AC_ARG_ENABLE(endomorphism, +- AS_HELP_STRING([--enable-endomorphism],[enable endomorphism (default is no)]), +- [use_endomorphism=$enableval], +- [use_endomorphism=no]) +- + AC_ARG_ENABLE(ecmult_static_precomputation, +- AS_HELP_STRING([--enable-ecmult-static-precomputation],[enable precomputed ecmult table for signing (default is yes)]), ++ AS_HELP_STRING([--enable-ecmult-static-precomputation],[enable precomputed ecmult table for signing [default=auto]]), + [use_ecmult_static_precomputation=$enableval], + [use_ecmult_static_precomputation=auto]) + + AC_ARG_ENABLE(module_ecdh, +- AS_HELP_STRING([--enable-module-ecdh],[enable ECDH shared secret computation (experimental)]), ++ AS_HELP_STRING([--enable-module-ecdh],[enable ECDH shared secret computation]), + [enable_module_ecdh=$enableval], + [enable_module_ecdh=no]) + + AC_ARG_ENABLE(module_recovery, +- AS_HELP_STRING([--enable-module-recovery],[enable ECDSA pubkey recovery module (default is no)]), ++ AS_HELP_STRING([--enable-module-recovery],[enable ECDSA pubkey recovery module [default=no]]), + [enable_module_recovery=$enableval], + [enable_module_recovery=no]) + +-AC_ARG_ENABLE(jni, +- AS_HELP_STRING([--enable-jni],[enable libsecp256k1_jni (default is no)]), +- [use_jni=$enableval], +- [use_jni=no]) ++AC_ARG_ENABLE(module_extrakeys, ++ AS_HELP_STRING([--enable-module-extrakeys],[enable extrakeys module (experimental)]), ++ [enable_module_extrakeys=$enableval], ++ [enable_module_extrakeys=no]) + +-AC_ARG_WITH([field], [AS_HELP_STRING([--with-field=64bit|32bit|auto], +-[Specify Field Implementation. Default is auto])],[req_field=$withval], [req_field=auto]) ++AC_ARG_ENABLE(module_schnorrsig, ++ AS_HELP_STRING([--enable-module-schnorrsig],[enable schnorrsig module (experimental)]), ++ [enable_module_schnorrsig=$enableval], ++ [enable_module_schnorrsig=no]) + +-AC_ARG_WITH([bignum], [AS_HELP_STRING([--with-bignum=gmp|no|auto], +-[Specify Bignum Implementation. Default is auto])],[req_bignum=$withval], [req_bignum=auto]) +- +-AC_ARG_WITH([scalar], [AS_HELP_STRING([--with-scalar=64bit|32bit|auto], +-[Specify scalar implementation. Default is auto])],[req_scalar=$withval], [req_scalar=auto]) ++AC_ARG_ENABLE(external_default_callbacks, ++ AS_HELP_STRING([--enable-external-default-callbacks],[enable external default callback functions [default=no]]), ++ [use_external_default_callbacks=$enableval], ++ [use_external_default_callbacks=no]) + +-AC_ARG_WITH([asm], [AS_HELP_STRING([--with-asm=x86_64|arm|no|auto] +-[Specify assembly optimizations to use. Default is auto (experimental: arm)])],[req_asm=$withval], [req_asm=auto]) ++dnl Test-only override of the (autodetected by the C code) "widemul" setting. ++dnl Legal values are int64 (for [u]int64_t), int128 (for [unsigned] __int128), and auto (the default). ++AC_ARG_WITH([test-override-wide-multiply], [] ,[set_widemul=$withval], [set_widemul=auto]) + +-AC_CHECK_TYPES([__int128]) ++AC_ARG_WITH([bignum], [AS_HELP_STRING([--with-bignum=gmp|no|auto], ++[bignum implementation to use [default=auto]])],[req_bignum=$withval], [req_bignum=auto]) ++ ++AC_ARG_WITH([asm], [AS_HELP_STRING([--with-asm=x86_64|arm|no|auto], ++[assembly optimizations to use (experimental: arm) [default=auto]])],[req_asm=$withval], [req_asm=auto]) ++ ++AC_ARG_WITH([ecmult-window], [AS_HELP_STRING([--with-ecmult-window=SIZE|auto], ++[window size for ecmult precomputation for verification, specified as integer in range [2..24].] ++[Larger values result in possibly better performance at the cost of an exponentially larger precomputed table.] ++[The table will store 2^(SIZE-1) * 64 bytes of data but can be larger in memory due to platform-specific padding and alignment.] ++["auto" is a reasonable setting for desktop machines (currently 15). [default=auto]] ++)], ++[req_ecmult_window=$withval], [req_ecmult_window=auto]) ++ ++AC_ARG_WITH([ecmult-gen-precision], [AS_HELP_STRING([--with-ecmult-gen-precision=2|4|8|auto], ++[Precision bits to tune the precomputed table size for signing.] ++[The size of the table is 32kB for 2 bits, 64kB for 4 bits, 512kB for 8 bits of precision.] ++[A larger table size usually results in possible faster signing.] ++["auto" is a reasonable setting for desktop machines (currently 4). [default=auto]] ++)], ++[req_ecmult_gen_precision=$withval], [req_ecmult_gen_precision=auto]) ++ ++AC_ARG_WITH([valgrind], [AS_HELP_STRING([--with-valgrind=yes|no|auto], ++[Build with extra checks for running inside Valgrind [default=auto]] ++)], ++[req_valgrind=$withval], [req_valgrind=auto]) ++ ++if test x"$req_valgrind" = x"no"; then ++ enable_valgrind=no ++else ++ AC_CHECK_HEADER([valgrind/memcheck.h], [enable_valgrind=yes], [ ++ if test x"$req_valgrind" = x"yes"; then ++ AC_MSG_ERROR([Valgrind support explicitly requested but valgrind/memcheck.h header not available]) ++ fi ++ enable_valgrind=no ++ ], []) ++fi ++AM_CONDITIONAL([VALGRIND_ENABLED],[test "$enable_valgrind" = "yes"]) + + if test x"$enable_coverage" = x"yes"; then + AC_DEFINE(COVERAGE, 1, [Define this symbol to compile out all VERIFY code]) +- CFLAGS="$CFLAGS -O0 --coverage" +- LDFLAGS="--coverage" ++ CFLAGS="-O0 --coverage $CFLAGS" ++ LDFLAGS="--coverage $LDFLAGS" + else +- CFLAGS="$CFLAGS -O3" ++ CFLAGS="-O2 $CFLAGS" + fi + + if test x"$use_ecmult_static_precomputation" != x"no"; then +@@ -176,7 +212,7 @@ if test x"$use_ecmult_static_precomputation" != x"no"; then + + warn_CFLAGS_FOR_BUILD="-Wall -Wextra -Wno-unused-function" + saved_CFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS $warn_CFLAGS_FOR_BUILD" ++ CFLAGS="$warn_CFLAGS_FOR_BUILD $CFLAGS" + AC_MSG_CHECKING([if native ${CC_FOR_BUILD} supports ${warn_CFLAGS_FOR_BUILD}]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], + [ AC_MSG_RESULT([yes]) ], +@@ -188,7 +224,7 @@ if test x"$use_ecmult_static_precomputation" != x"no"; then + AC_RUN_IFELSE( + [AC_LANG_PROGRAM([], [])], + [working_native_cc=yes], +- [working_native_cc=no],[dnl]) ++ [working_native_cc=no],[:]) + + CFLAGS_FOR_BUILD="$CFLAGS" + +@@ -243,63 +279,6 @@ else + esac + fi + +-if test x"$req_field" = x"auto"; then +- if test x"set_asm" = x"x86_64"; then +- set_field=64bit +- fi +- if test x"$set_field" = x; then +- SECP_INT128_CHECK +- if test x"$has_int128" = x"yes"; then +- set_field=64bit +- fi +- fi +- if test x"$set_field" = x; then +- set_field=32bit +- fi +-else +- set_field=$req_field +- case $set_field in +- 64bit) +- if test x"$set_asm" != x"x86_64"; then +- SECP_INT128_CHECK +- if test x"$has_int128" != x"yes"; then +- AC_MSG_ERROR([64bit field explicitly requested but neither __int128 support or x86_64 assembly available]) +- fi +- fi +- ;; +- 32bit) +- ;; +- *) +- AC_MSG_ERROR([invalid field implementation selection]) +- ;; +- esac +-fi +- +-if test x"$req_scalar" = x"auto"; then +- SECP_INT128_CHECK +- if test x"$has_int128" = x"yes"; then +- set_scalar=64bit +- fi +- if test x"$set_scalar" = x; then +- set_scalar=32bit +- fi +-else +- set_scalar=$req_scalar +- case $set_scalar in +- 64bit) +- SECP_INT128_CHECK +- if test x"$has_int128" != x"yes"; then +- AC_MSG_ERROR([64bit scalar explicitly requested but __int128 support not available]) +- fi +- ;; +- 32bit) +- ;; +- *) +- AC_MSG_ERROR([invalid scalar implementation selected]) +- ;; +- esac +-fi +- + if test x"$req_bignum" = x"auto"; then + SECP_GMP_CHECK + if test x"$has_gmp" = x"yes"; then +@@ -343,16 +322,18 @@ no) + ;; + esac + +-# select field implementation +-case $set_field in +-64bit) +- AC_DEFINE(USE_FIELD_5X52, 1, [Define this symbol to use the FIELD_5X52 implementation]) ++# select wide multiplication implementation ++case $set_widemul in ++int128) ++ AC_DEFINE(USE_FORCE_WIDEMUL_INT128, 1, [Define this symbol to force the use of the (unsigned) __int128 based wide multiplication implementation]) + ;; +-32bit) +- AC_DEFINE(USE_FIELD_10X26, 1, [Define this symbol to use the FIELD_10X26 implementation]) ++int64) ++ AC_DEFINE(USE_FORCE_WIDEMUL_INT64, 1, [Define this symbol to force the use of the (u)int64_t based wide multiplication implementation]) ++ ;; ++auto) + ;; + *) +- AC_MSG_ERROR([invalid field implementation]) ++ AC_MSG_ERROR([invalid wide multiplication implementation]) + ;; + esac + +@@ -374,25 +355,50 @@ no) + ;; + esac + +-#select scalar implementation +-case $set_scalar in +-64bit) +- AC_DEFINE(USE_SCALAR_4X64, 1, [Define this symbol to use the 4x64 scalar implementation]) ++#set ecmult window size ++if test x"$req_ecmult_window" = x"auto"; then ++ set_ecmult_window=15 ++else ++ set_ecmult_window=$req_ecmult_window ++fi ++ ++error_window_size=['window size for ecmult precomputation not an integer in range [2..24] or "auto"'] ++case $set_ecmult_window in ++''|*[[!0-9]]*) ++ # no valid integer ++ AC_MSG_ERROR($error_window_size) ++ ;; ++*) ++ if test "$set_ecmult_window" -lt 2 -o "$set_ecmult_window" -gt 24 ; then ++ # not in range ++ AC_MSG_ERROR($error_window_size) ++ fi ++ AC_DEFINE_UNQUOTED(ECMULT_WINDOW_SIZE, $set_ecmult_window, [Set window size for ecmult precomputation]) + ;; +-32bit) +- AC_DEFINE(USE_SCALAR_8X32, 1, [Define this symbol to use the 8x32 scalar implementation]) ++esac ++ ++#set ecmult gen precision ++if test x"$req_ecmult_gen_precision" = x"auto"; then ++ set_ecmult_gen_precision=4 ++else ++ set_ecmult_gen_precision=$req_ecmult_gen_precision ++fi ++ ++case $set_ecmult_gen_precision in ++2|4|8) ++ AC_DEFINE_UNQUOTED(ECMULT_GEN_PREC_BITS, $set_ecmult_gen_precision, [Set ecmult gen precision bits]) + ;; + *) +- AC_MSG_ERROR([invalid scalar implementation]) ++ AC_MSG_ERROR(['ecmult gen precision not 2, 4, 8 or "auto"']) + ;; + esac + + if test x"$use_tests" = x"yes"; then + SECP_OPENSSL_CHECK +- if test x"$has_openssl_ec" = x"yes"; then +- if test x"$enable_openssl_tests" != x"no"; then ++ if test x"$enable_openssl_tests" != x"no" && test x"$has_openssl_ec" = x"yes"; then ++ enable_openssl_tests=yes + AC_DEFINE(ENABLE_OPENSSL_TESTS, 1, [Define this symbol if OpenSSL EC functions are available]) +- SECP_TEST_INCLUDES="$SSL_CFLAGS $CRYPTO_CFLAGS" ++ SECP_TEST_INCLUDES="$SSL_CFLAGS $CRYPTO_CFLAGS $CRYPTO_CPPFLAGS" + SECP_TEST_LIBS="$CRYPTO_LIBS" + + case $host in +@@ -400,39 +406,17 @@ if test x"$use_tests" = x"yes"; then + SECP_TEST_LIBS="$SECP_TEST_LIBS -lgdi32" + ;; + esac +- fi + else + if test x"$enable_openssl_tests" = x"yes"; then + AC_MSG_ERROR([OpenSSL tests requested but OpenSSL with EC support is not available]) + fi ++ enable_openssl_tests=no + fi + else + if test x"$enable_openssl_tests" = x"yes"; then + AC_MSG_ERROR([OpenSSL tests requested but tests are not enabled]) + fi +-fi +- +-if test x"$use_jni" != x"no"; then +- AX_JNI_INCLUDE_DIR +- have_jni_dependencies=yes +- if test x"$enable_module_ecdh" = x"no"; then +- have_jni_dependencies=no +- fi +- if test "x$JNI_INCLUDE_DIRS" = "x"; then +- have_jni_dependencies=no +- fi +- if test "x$have_jni_dependencies" = "xno"; then +- if test x"$use_jni" = x"yes"; then +- AC_MSG_ERROR([jni support explicitly requested but headers/dependencies were not found. Enable ECDH and try again.]) +- fi +- AC_MSG_WARN([jni headers/dependencies not found. jni support disabled]) +- use_jni=no +- else +- use_jni=yes +- for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS; do +- JNI_INCLUDES="$JNI_INCLUDES -I$JNI_INCLUDE_DIR" +- done +- fi ++ enable_openssl_tests=no + fi + + if test x"$set_bignum" = x"gmp"; then +@@ -440,10 +424,6 @@ if test x"$set_bignum" = x"gmp"; then + SECP_INCLUDES="$SECP_INCLUDES $GMP_CPPFLAGS" + fi + +-if test x"$use_endomorphism" = x"yes"; then +- AC_DEFINE(USE_ENDOMORPHISM, 1, [Define this symbol to use endomorphism optimization]) +-fi +- + if test x"$set_precomp" = x"yes"; then + AC_DEFINE(USE_ECMULT_STATIC_PRECOMPUTATION, 1, [Define this symbol to use a statically generated ecmult table]) + fi +@@ -456,21 +436,38 @@ if test x"$enable_module_recovery" = x"yes"; then + AC_DEFINE(ENABLE_MODULE_RECOVERY, 1, [Define this symbol to enable the ECDSA pubkey recovery module]) + fi + +-AC_C_BIGENDIAN() ++if test x"$enable_module_schnorrsig" = x"yes"; then ++ AC_DEFINE(ENABLE_MODULE_SCHNORRSIG, 1, [Define this symbol to enable the schnorrsig module]) ++ enable_module_extrakeys=yes ++fi ++ ++# Test if extrakeys is set after the schnorrsig module to allow the schnorrsig ++# module to set enable_module_extrakeys=yes ++if test x"$enable_module_extrakeys" = x"yes"; then ++ AC_DEFINE(ENABLE_MODULE_EXTRAKEYS, 1, [Define this symbol to enable the extrakeys module]) ++fi + + if test x"$use_external_asm" = x"yes"; then + AC_DEFINE(USE_EXTERNAL_ASM, 1, [Define this symbol if an external (non-inline) assembly implementation is used]) + fi + ++if test x"$use_external_default_callbacks" = x"yes"; then ++ AC_DEFINE(USE_EXTERNAL_DEFAULT_CALLBACKS, 1, [Define this symbol if an external implementation of the default callbacks is used]) ++fi ++ + if test x"$enable_experimental" = x"yes"; then + AC_MSG_NOTICE([******]) + AC_MSG_NOTICE([WARNING: experimental build]) + AC_MSG_NOTICE([Experimental features do not have stable APIs or properties, and may not be safe for production use.]) +- AC_MSG_NOTICE([Building ECDH module: $enable_module_ecdh]) ++ AC_MSG_NOTICE([Building extrakeys module: $enable_module_extrakeys]) ++ AC_MSG_NOTICE([Building schnorrsig module: $enable_module_schnorrsig]) + AC_MSG_NOTICE([******]) + else +- if test x"$enable_module_ecdh" = x"yes"; then +- AC_MSG_ERROR([ECDH module is experimental. Use --enable-experimental to allow.]) ++ if test x"$enable_module_extrakeys" = x"yes"; then ++ AC_MSG_ERROR([extrakeys module is experimental. Use --enable-experimental to allow.]) ++ fi ++ if test x"$enable_module_schnorrsig" = x"yes"; then ++ AC_MSG_ERROR([schnorrsig module is experimental. Use --enable-experimental to allow.]) + fi + if test x"$set_asm" = x"arm"; then + AC_MSG_ERROR([ARM assembly optimization is experimental. Use --enable-experimental to allow.]) +@@ -479,7 +476,6 @@ fi + + AC_CONFIG_HEADERS([src/libsecp256k1-config.h]) + AC_CONFIG_FILES([Makefile libsecp256k1.pc]) +-AC_SUBST(JNI_INCLUDES) + AC_SUBST(SECP_INCLUDES) + AC_SUBST(SECP_LIBS) + AC_SUBST(SECP_TEST_LIBS) +@@ -491,7 +487,8 @@ AM_CONDITIONAL([USE_BENCHMARK], [test x"$use_benchmark" = x"yes"]) + AM_CONDITIONAL([USE_ECMULT_STATIC_PRECOMPUTATION], [test x"$set_precomp" = x"yes"]) + AM_CONDITIONAL([ENABLE_MODULE_ECDH], [test x"$enable_module_ecdh" = x"yes"]) + AM_CONDITIONAL([ENABLE_MODULE_RECOVERY], [test x"$enable_module_recovery" = x"yes"]) +-AM_CONDITIONAL([USE_JNI], [test x"$use_jni" = x"yes"]) ++AM_CONDITIONAL([ENABLE_MODULE_EXTRAKEYS], [test x"$enable_module_extrakeys" = x"yes"]) ++AM_CONDITIONAL([ENABLE_MODULE_SCHNORRSIG], [test x"$enable_module_schnorrsig" = x"yes"]) + AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$use_external_asm" = x"yes"]) + AM_CONDITIONAL([USE_ASM_ARM], [test x"$set_asm" = x"arm"]) + +@@ -504,21 +501,29 @@ AC_OUTPUT + + echo + echo "Build Options:" +-echo " with endomorphism = $use_endomorphism" +-echo " with ecmult precomp = $set_precomp" +-echo " with jni = $use_jni" +-echo " with benchmarks = $use_benchmark" +-echo " with coverage = $enable_coverage" +-echo " module ecdh = $enable_module_ecdh" +-echo " module recovery = $enable_module_recovery" ++echo " with ecmult precomp = $set_precomp" ++echo " with external callbacks = $use_external_default_callbacks" ++echo " with benchmarks = $use_benchmark" ++echo " with tests = $use_tests" ++echo " with openssl tests = $enable_openssl_tests" ++echo " with coverage = $enable_coverage" ++echo " module ecdh = $enable_module_ecdh" ++echo " module recovery = $enable_module_recovery" ++echo " module extrakeys = $enable_module_extrakeys" ++echo " module schnorrsig = $enable_module_schnorrsig" + echo +-echo " asm = $set_asm" +-echo " bignum = $set_bignum" +-echo " field = $set_field" +-echo " scalar = $set_scalar" ++echo " asm = $set_asm" ++echo " bignum = $set_bignum" ++echo " ecmult window size = $set_ecmult_window" ++echo " ecmult gen prec. bits = $set_ecmult_gen_precision" ++dnl Hide test-only options unless they're used. ++if test x"$set_widemul" != xauto; then ++echo " wide multiplication = $set_widemul" ++fi + echo +-echo " CC = $CC" +-echo " CFLAGS = $CFLAGS" +-echo " CPPFLAGS = $CPPFLAGS" +-echo " LDFLAGS = $LDFLAGS" ++echo " valgrind = $enable_valgrind" ++echo " CC = $CC" ++echo " CFLAGS = $CFLAGS" ++echo " CPPFLAGS = $CPPFLAGS" ++echo " LDFLAGS = $LDFLAGS" + echo +diff --git a/src/secp256k1/contrib/lax_der_parsing.h b/src/secp256k1/contrib/lax_der_parsing.h +index 959fc36e..7eaf63bf 100644 +--- a/src/secp256k1/contrib/lax_der_parsing.h ++++ b/src/secp256k1/contrib/lax_der_parsing.h +@@ -68,7 +68,7 @@ extern "C" { + * This function will accept any valid DER encoded signature, even if the + * encoded numbers are out of range. In addition, it will accept signatures + * which violate the DER spec in various ways. Its purpose is to allow +- * validation of the BGL blockchain, which includes non-DER signatures ++ * validation of the Bitcoin blockchain, which includes non-DER signatures + * from before the network rules were updated to enforce DER. Note that + * the set of supported violations is a strict subset of what OpenSSL will + * accept. +diff --git a/src/secp256k1/libsecp256k1.pc.in b/src/secp256k1/libsecp256k1.pc.in +index a3841a30..694e98ee 100644 +--- a/src/secp256k1/libsecp256k1.pc.in ++++ b/src/secp256k1/libsecp256k1.pc.in +@@ -5,7 +5,7 @@ includedir=@includedir@ + + Name: libsecp256k1 + Description: Optimized C library for EC operations on curve secp256k1 +-URL: https://github.com/BGL-core/secp256k1 ++URL: https://github.com/bitcoin-core/secp256k1 + Version: @PACKAGE_VERSION@ + Cflags: -I${includedir} + Libs: -L${libdir} -lsecp256k1 +diff --git a/src/secp256k1/src/java/org_BGL_NativeSecp256k1.h b/src/secp256k1/src/java/org_BGL_NativeSecp256k1.h +deleted file mode 100644 +index 5d10567d..00000000 +--- a/src/secp256k1/src/java/org_BGL_NativeSecp256k1.h ++++ /dev/null +@@ -1,119 +0,0 @@ +-/* DO NOT EDIT THIS FILE - it is machine generated */ +-#include +-#include "include/secp256k1.h" +-/* Header for class org_BGL_NativeSecp256k1 */ +- +-#ifndef _Included_org_BGL_NativeSecp256k1 +-#define _Included_org_BGL_NativeSecp256k1 +-#ifdef __cplusplus +-extern "C" { +-#endif +-/* +- * Class: org_BGL_NativeSecp256k1 +- * Method: secp256k1_ctx_clone +- * Signature: (J)J +- */ +-SECP256K1_API jlong JNICALL Java_org_BGL_NativeSecp256k1_secp256k1_1ctx_1clone +- (JNIEnv *, jclass, jlong); +- +-/* +- * Class: org_BGL_NativeSecp256k1 +- * Method: secp256k1_context_randomize +- * Signature: (Ljava/nio/ByteBuffer;J)I +- */ +-SECP256K1_API jint JNICALL Java_org_BGL_NativeSecp256k1_secp256k1_1context_1randomize +- (JNIEnv *, jclass, jobject, jlong); +- +-/* +- * Class: org_BGL_NativeSecp256k1 +- * Method: secp256k1_privkey_tweak_add +- * Signature: (Ljava/nio/ByteBuffer;J)[[B +- */ +-SECP256K1_API jobjectArray JNICALL Java_org_BGL_NativeSecp256k1_secp256k1_1privkey_1tweak_1add +- (JNIEnv *, jclass, jobject, jlong); +- +-/* +- * Class: org_BGL_NativeSecp256k1 +- * Method: secp256k1_privkey_tweak_mul +- * Signature: (Ljava/nio/ByteBuffer;J)[[B +- */ +-SECP256K1_API jobjectArray JNICALL Java_org_BGL_NativeSecp256k1_secp256k1_1privkey_1tweak_1mul +- (JNIEnv *, jclass, jobject, jlong); +- +-/* +- * Class: org_BGL_NativeSecp256k1 +- * Method: secp256k1_pubkey_tweak_add +- * Signature: (Ljava/nio/ByteBuffer;JI)[[B +- */ +-SECP256K1_API jobjectArray JNICALL Java_org_BGL_NativeSecp256k1_secp256k1_1pubkey_1tweak_1add +- (JNIEnv *, jclass, jobject, jlong, jint); +- +-/* +- * Class: org_BGL_NativeSecp256k1 +- * Method: secp256k1_pubkey_tweak_mul +- * Signature: (Ljava/nio/ByteBuffer;JI)[[B +- */ +-SECP256K1_API jobjectArray JNICALL Java_org_BGL_NativeSecp256k1_secp256k1_1pubkey_1tweak_1mul +- (JNIEnv *, jclass, jobject, jlong, jint); +- +-/* +- * Class: org_BGL_NativeSecp256k1 +- * Method: secp256k1_destroy_context +- * Signature: (J)V +- */ +-SECP256K1_API void JNICALL Java_org_BGL_NativeSecp256k1_secp256k1_1destroy_1context +- (JNIEnv *, jclass, jlong); +- +-/* +- * Class: org_BGL_NativeSecp256k1 +- * Method: secp256k1_ecdsa_verify +- * Signature: (Ljava/nio/ByteBuffer;JII)I +- */ +-SECP256K1_API jint JNICALL Java_org_BGL_NativeSecp256k1_secp256k1_1ecdsa_1verify +- (JNIEnv *, jclass, jobject, jlong, jint, jint); +- +-/* +- * Class: org_BGL_NativeSecp256k1 +- * Method: secp256k1_ecdsa_sign +- * Signature: (Ljava/nio/ByteBuffer;J)[[B +- */ +-SECP256K1_API jobjectArray JNICALL Java_org_BGL_NativeSecp256k1_secp256k1_1ecdsa_1sign +- (JNIEnv *, jclass, jobject, jlong); +- +-/* +- * Class: org_BGL_NativeSecp256k1 +- * Method: secp256k1_ec_seckey_verify +- * Signature: (Ljava/nio/ByteBuffer;J)I +- */ +-SECP256K1_API jint JNICALL Java_org_BGL_NativeSecp256k1_secp256k1_1ec_1seckey_1verify +- (JNIEnv *, jclass, jobject, jlong); +- +-/* +- * Class: org_BGL_NativeSecp256k1 +- * Method: secp256k1_ec_pubkey_create +- * Signature: (Ljava/nio/ByteBuffer;J)[[B +- */ +-SECP256K1_API jobjectArray JNICALL Java_org_BGL_NativeSecp256k1_secp256k1_1ec_1pubkey_1create +- (JNIEnv *, jclass, jobject, jlong); +- +-/* +- * Class: org_BGL_NativeSecp256k1 +- * Method: secp256k1_ec_pubkey_parse +- * Signature: (Ljava/nio/ByteBuffer;JI)[[B +- */ +-SECP256K1_API jobjectArray JNICALL Java_org_BGL_NativeSecp256k1_secp256k1_1ec_1pubkey_1parse +- (JNIEnv *, jclass, jobject, jlong, jint); +- +-/* +- * Class: org_BGL_NativeSecp256k1 +- * Method: secp256k1_ecdh +- * Signature: (Ljava/nio/ByteBuffer;JI)[[B +- */ +-SECP256K1_API jobjectArray JNICALL Java_org_BGL_NativeSecp256k1_secp256k1_1ecdh +- (JNIEnv* env, jclass classObject, jobject byteBufferObject, jlong ctx_l, jint publen); +- +- +-#ifdef __cplusplus +-} +-#endif +-#endif +diff --git a/src/secp256k1/src/java/org_BGL_Secp256k1Context.h b/src/secp256k1/src/java/org_BGL_Secp256k1Context.h +deleted file mode 100644 +index f1e09521..00000000 +--- a/src/secp256k1/src/java/org_BGL_Secp256k1Context.h ++++ /dev/null +@@ -1,22 +0,0 @@ +-/* DO NOT EDIT THIS FILE - it is machine generated */ +-#include +-#include "include/secp256k1.h" +-/* Header for class org_BGL_Secp256k1Context */ +- +-#ifndef _Included_org_BGL_Secp256k1Context +-#define _Included_org_BGL_Secp256k1Context +-#ifdef __cplusplus +-extern "C" { +-#endif +-/* +- * Class: org_BGL_Secp256k1Context +- * Method: secp256k1_init_context +- * Signature: ()J +- */ +-SECP256K1_API jlong JNICALL Java_org_BGL_Secp256k1Context_secp256k1_1init_1context +- (JNIEnv *, jclass); +- +-#ifdef __cplusplus +-} +-#endif +-#endif +diff --git a/src/secp256k1/src/tests.c b/src/secp256k1/src/tests.c +index 67c5c36b..bb4b5b4c 100644 +--- a/src/secp256k1/src/tests.c ++++ b/src/secp256k1/src/tests.c +@@ -2355,7 +2355,7 @@ void test_add_neg_y_diff_x(void) { + * of the sum to be wrong (since infinity has no xy coordinates). + * HOWEVER, if the x-coordinates are different, infinity is the + * wrong answer, and such degeneracies are exposed. This is the +- * root of https://github.com/BGL-core/secp256k1/issues/257 ++ * root of https://github.com/bitcoin-core/secp256k1/issues/257 + * which this test is a regression test for. + * + * These points were generated in sage as +diff --git a/src/serialize.h b/src/serialize.h +index 23292bbc..89d2676f 100644 +--- a/src/serialize.h ++++ b/src/serialize.h +@@ -174,6 +174,8 @@ template const X& ReadWriteAsHelper(const X& x) { return x; } + + #define READWRITE(...) (::SerReadWriteMany(s, ser_action, __VA_ARGS__)) + #define READWRITEAS(type, obj) (::SerReadWriteMany(s, ser_action, ReadWriteAsHelper(obj))) ++#define SER_READ(obj, code) ::SerRead(s, ser_action, obj, [&](Stream& s, typename std::remove_const::type& obj) { code; }) ++#define SER_WRITE(obj, code) ::SerWrite(s, ser_action, obj, [&](Stream& s, const Type& obj) { code; }) + + /** + * Implement the Ser and Unser methods needed for implementing a formatter (see Using below). +@@ -511,52 +513,31 @@ struct CustomUintFormatter + template void Ser(Stream& s, I v) + { + if (v < 0 || v > MAX) throw std::ios_base::failure("CustomUintFormatter value out of range"); +- uint64_t raw = htole64(v); +- s.write((const char*)&raw, Bytes); ++ if (BigEndian) { ++ uint64_t raw = htobe64(v); ++ s.write(((const char*)&raw) + 8 - Bytes, Bytes); ++ } else { ++ uint64_t raw = htole64(v); ++ s.write((const char*)&raw, Bytes); ++ } + } + + template void Unser(Stream& s, I& v) + { +- static_assert(std::numeric_limits::max() >= MAX && std::numeric_limits::min() <= 0, "CustomUintFormatter type too small"); ++ using U = typename std::conditional::value, std::underlying_type, std::common_type>::type::type; ++ static_assert(std::numeric_limits::max() >= MAX && std::numeric_limits::min() <= 0, "Assigned type too small"); + uint64_t raw = 0; +- s.read((char*)&raw, Bytes); +- v = le64toh(raw); ++ if (BigEndian) { ++ s.read(((char*)&raw) + 8 - Bytes, Bytes); ++ v = static_cast(be64toh(raw)); ++ } else { ++ s.read((char*)&raw, Bytes); ++ v = static_cast(le64toh(raw)); ++ } + } + }; + +-/** Serialization wrapper class for big-endian integers. +- * +- * Use this wrapper around integer types that are stored in memory in native +- * byte order, but serialized in big endian notation. This is only intended +- * to implement serializers that are compatible with existing formats, and +- * its use is not recommended for new data structures. +- * +- * Only 16-bit types are supported for now. +- */ +-template +-class BigEndian +-{ +-protected: +- I& m_val; +-public: +- explicit BigEndian(I& val) : m_val(val) +- { +- static_assert(std::is_unsigned::value, "BigEndian type must be unsigned integer"); +- static_assert(sizeof(I) == 2 && std::numeric_limits::min() == 0 && std::numeric_limits::max() == std::numeric_limits::max(), "Unsupported BigEndian size"); +- } +- +- template +- void Serialize(Stream& s) const +- { +- ser_writedata16be(s, m_val); +- } +- +- template +- void Unserialize(Stream& s) +- { +- m_val = ser_readdata16be(s); +- } +-}; ++template using BigEndianFormatter = CustomUintFormatter; + + /** Formatter for integers in CompactSize format. */ + template +@@ -603,9 +584,6 @@ struct LimitedStringFormatter + } + }; + +-template +-BigEndian WrapBigEndian(I& n) { return BigEndian(n); } +- + /** Formatter to serialize/deserialize vector elements using another formatter + * + * Example: +@@ -1101,6 +1079,28 @@ inline void SerReadWriteMany(Stream& s, CSerActionUnserialize ser_action, Args&& + ::UnserializeMany(s, args...); + } + ++template ++inline void SerRead(Stream& s, CSerActionSerialize ser_action, Type&&, Fn&&) ++{ ++} ++ ++template ++inline void SerRead(Stream& s, CSerActionUnserialize ser_action, Type&& obj, Fn&& fn) ++{ ++ fn(s, std::forward(obj)); ++} ++ ++template ++inline void SerWrite(Stream& s, CSerActionSerialize ser_action, Type&& obj, Fn&& fn) ++{ ++ fn(s, std::forward(obj)); ++} ++ ++template ++inline void SerWrite(Stream& s, CSerActionUnserialize ser_action, Type&&, Fn&&) ++{ ++} ++ + template + inline void WriteVarInt(CSizeComputer &s, I n) + { +diff --git a/src/validation.cpp b/src/validation.cpp +index 05060445..58633e09 100644 +--- a/src/validation.cpp ++++ b/src/validation.cpp +@@ -1,5 +1,5 @@ + // Copyright (c) 2009-2010 Satoshi Nakamoto +-// Copyright (c) 2009-2020 The BGL Core developers ++// Copyright (c) 2009-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. + +@@ -52,7 +52,7 @@ + #include + + #include +- ++ + #define MICRO 0.000001 + #define MILLI 0.001 + +@@ -101,20 +101,19 @@ bool CBlockIndexWorkComparator::operator()(const CBlockIndex *pa, const CBlockIn + return false; + } + +-namespace { +-BlockManager g_blockman; +-} // anon namespace ++ChainstateManager g_chainman; + +-std::unique_ptr g_chainstate; +- +-CChainState& ChainstateActive() { +- assert(g_chainstate); +- return *g_chainstate; ++CChainState& ChainstateActive() ++{ ++ LOCK(::cs_main); ++ assert(g_chainman.m_active_chainstate); ++ return *g_chainman.m_active_chainstate; + } + +-CChain& ChainActive() { +- assert(g_chainstate); +- return g_chainstate->m_chain; ++CChain& ChainActive() ++{ ++ LOCK(::cs_main); ++ return ::ChainstateActive().m_chain; + } + + /** +@@ -174,8 +173,8 @@ namespace { + CBlockIndex* LookupBlockIndex(const uint256& hash) + { + AssertLockHeld(cs_main); +- BlockMap::const_iterator it = g_blockman.m_block_index.find(hash); +- return it == g_blockman.m_block_index.end() ? nullptr : it->second; ++ BlockMap::const_iterator it = g_chainman.BlockIndex().find(hash); ++ return it == g_chainman.BlockIndex().end() ? nullptr : it->second; + } + + CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& locator) +@@ -450,7 +449,7 @@ namespace { + class MemPoolAccept + { + public: +- explicit MemPoolAccept(CTxMemPool& mempool) : m_pool(mempool), m_view(&m_dummy), m_viewmempool(&::ChainstateActive().CoinsTip(), m_pool), ++ MemPoolAccept(CTxMemPool& mempool) : m_pool(mempool), m_view(&m_dummy), m_viewmempool(&::ChainstateActive().CoinsTip(), m_pool), + m_limit_ancestors(gArgs.GetArg("-limitancestorcount", DEFAULT_ANCESTOR_LIMIT)), + m_limit_ancestor_size(gArgs.GetArg("-limitancestorsize", DEFAULT_ANCESTOR_SIZE_LIMIT)*1000), + m_limit_descendants(gArgs.GetArg("-limitdescendantcount", DEFAULT_DESCENDANT_LIMIT)), +@@ -483,7 +482,7 @@ private: + // All the intermediate state that gets passed between the various levels + // of checking a given transaction. + struct Workspace { +- explicit Workspace(const CTransactionRef& ptx) : m_ptx(ptx), m_hash(ptx->GetHash()) {} ++ Workspace(const CTransactionRef& ptx) : m_ptx(ptx), m_hash(ptx->GetHash()) {} + std::set m_conflicts; + CTxMemPool::setEntries m_all_conflicting; + CTxMemPool::setEntries m_ancestors; +@@ -697,7 +696,7 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws) + return state.Invalid(TxValidationResult::TX_INPUTS_NOT_STANDARD, "bad-txns-nonstandard-inputs"); + } + +- // Check for non-standard witnesses. ++ // Check for non-standard witness in P2WSH + if (tx.HasWitness() && fRequireStandard && !IsWitnessStandard(tx, m_view)) + return state.Invalid(TxValidationResult::TX_WITNESS_MUTATED, "bad-witness-nonstandard"); + +@@ -1260,7 +1259,6 @@ void CoinsViews::InitCache() + m_cacheview = MakeUnique(&m_catcherview); + } + +- + CChainState::CChainState(CTxMemPool& mempool, BlockManager& blockman, uint256 from_snapshot_blockhash) + : m_blockman(blockman), + m_mempool(mempool), +@@ -1272,6 +1270,10 @@ void CChainState::InitCoinsDB( + bool should_wipe, + std::string leveldb_name) + { ++ if (!m_from_snapshot_blockhash.IsNull()) { ++ leveldb_name += "_" + m_from_snapshot_blockhash.ToString(); ++ } ++ + m_coins_views = MakeUnique( + leveldb_name, cache_size_bytes, in_memory, should_wipe); + } +@@ -1708,19 +1710,24 @@ DisconnectResult CChainState::DisconnectBlock(const CBlock& block, const CBlockI + return fClean ? DISCONNECT_OK : DISCONNECT_UNCLEAN; + } + +-void static FlushBlockFile(bool fFinalize = false) ++static void FlushUndoFile(int block_file, bool finalize = false) + { +- LOCK(cs_LastBlockFile); ++ FlatFilePos undo_pos_old(block_file, vinfoBlockFile[block_file].nUndoSize); ++ if (!UndoFileSeq().Flush(undo_pos_old, finalize)) { ++ AbortNode("Flushing undo file to disk failed. This is likely the result of an I/O error."); ++ } ++} + ++static void FlushBlockFile(bool fFinalize = false, bool finalize_undo = false) ++{ ++ LOCK(cs_LastBlockFile); + FlatFilePos block_pos_old(nLastBlockFile, vinfoBlockFile[nLastBlockFile].nSize); +- FlatFilePos undo_pos_old(nLastBlockFile, vinfoBlockFile[nLastBlockFile].nUndoSize); +- +- bool status = true; +- status &= BlockFileSeq().Flush(block_pos_old, fFinalize); +- status &= UndoFileSeq().Flush(undo_pos_old, fFinalize); +- if (!status) { ++ if (!BlockFileSeq().Flush(block_pos_old, fFinalize)) { + AbortNode("Flushing block file to disk failed. This is likely the result of an I/O error."); + } ++ // we do not always flush the undo file, as the chain tip may be lagging behind the incoming blocks, ++ // e.g. during IBD or a sync after a node going offline ++ if (!fFinalize || finalize_undo) FlushUndoFile(nLastBlockFile, finalize_undo); + } + + static bool FindUndoPos(BlockValidationState &state, int nFile, FlatFilePos &pos, unsigned int nAddSize); +@@ -1734,6 +1741,14 @@ static bool WriteUndoDataForBlock(const CBlockUndo& blockundo, BlockValidationSt + return error("ConnectBlock(): FindUndoPos failed"); + if (!UndoWriteToDisk(blockundo, _pos, pindex->pprev->GetBlockHash(), chainparams.MessageStart())) + return AbortNode(state, "Failed to write undo data"); ++ // rev files are written in block height order, whereas blk files are written as blocks come in (often out of order) ++ // we want to flush the rev (undo) file once we've written the last block, which is indicated by the last height ++ // in the block file info as below; note that this does not catch the case where the undo writes are keeping up ++ // with the block writes (usually when a synced up node is getting newly mined blocks) -- this case is caught in ++ // the FindBlockPos function ++ if (_pos.nFile < nLastBlockFile && static_cast(pindex->nHeight) == vinfoBlockFile[_pos.nFile].nHeightLast) { ++ FlushUndoFile(_pos.nFile, true); ++ } + + // update nUndoPos in block index + pindex->nUndoPos = _pos.nPos; +@@ -2383,9 +2398,7 @@ static void UpdateTip(CTxMemPool& mempool, const CBlockIndex* pindexNew, const C + } + + bilingual_str warning_messages; +- int num_unexpected_version = 0; +- if (!::ChainstateActive().IsInitialBlockDownload()) +- { ++ if (!::ChainstateActive().IsInitialBlockDownload()) { + const CBlockIndex* pindex = pindexNew; + for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { + WarningBitsConditionChecker checker(bit); +@@ -2399,14 +2412,6 @@ static void UpdateTip(CTxMemPool& mempool, const CBlockIndex* pindexNew, const C + } + } + } +- // Check the version of the last 100 blocks to see if we need to upgrade: +- for (int i = 0; i < 100 && pindex != nullptr; i++) +- { +- int32_t nExpectedVersion = ComputeBlockVersion(pindex->pprev, chainParams.GetConsensus()); +- if (pindex->nVersion > VERSIONBITS_LAST_OLD_BLOCK_VERSION && (pindex->nVersion & ~nExpectedVersion) != 0) +- ++num_unexpected_version; +- pindex = pindex->pprev; +- } + } + LogPrintf("%s: new best=%s height=%d version=0x%08x log2_work=%f tx=%lu date='%s' progress=%f cache=%.1fMiB(%utxo)%s\n", __func__, + pindexNew->GetBlockHash().ToString(), pindexNew->nHeight, pindexNew->nVersion, +@@ -2414,10 +2419,6 @@ static void UpdateTip(CTxMemPool& mempool, const CBlockIndex* pindexNew, const C + FormatISO8601DateTime(pindexNew->GetBlockTime()), + GuessVerificationProgress(chainParams.TxData(), pindexNew), ::ChainstateActive().CoinsTip().DynamicMemoryUsage() * (1.0 / (1<<20)), ::ChainstateActive().CoinsTip().GetCacheSize(), + !warning_messages.empty() ? strprintf(" warning='%s'", warning_messages.original) : ""); +- +- if (num_unexpected_version > 0) { +- LogPrint(BCLog::VALIDATION, "%d of last 100 blocks have unexpected version\n", num_unexpected_version); +- } + } + + /** Disconnect m_chain's tip. +@@ -3193,8 +3194,13 @@ static bool FindBlockPos(FlatFilePos &pos, unsigned int nAddSize, unsigned int n + vinfoBlockFile.resize(nFile + 1); + } + ++ bool finalize_undo = false; + if (!fKnown) { + while (vinfoBlockFile[nFile].nSize + nAddSize >= MAX_BLOCKFILE_SIZE) { ++ // when the undo file is keeping up with the block file, we want to flush it explicitly ++ // when it is lagging behind (more blocks arrive than are being connected), we let the ++ // undo block write case handle it ++ finalize_undo = (vinfoBlockFile[nFile].nHeightLast == (unsigned int)ChainActive().Tip()->nHeight); + nFile++; + if (vinfoBlockFile.size() <= nFile) { + vinfoBlockFile.resize(nFile + 1); +@@ -3208,7 +3214,7 @@ static bool FindBlockPos(FlatFilePos &pos, unsigned int nAddSize, unsigned int n + if (!fKnown) { + LogPrintf("Leaving block file %i: %s\n", nLastBlockFile, vinfoBlockFile[nLastBlockFile].ToString()); + } +- FlushBlockFile(!fKnown); ++ FlushBlockFile(!fKnown, finalize_undo); + nLastBlockFile = nFile; + } + +@@ -3424,7 +3430,7 @@ static bool ContextualCheckBlockHeader(const CBlockHeader& block, BlockValidatio + if (fCheckpointsEnabled) { + // Don't accept any forks from the main chain prior to last checkpoint. + // GetLastCheckpoint finds the last checkpoint in MapCheckpoints that's in our +- // g_blockman.m_block_index. ++ // BlockIndex(). + CBlockIndex* pcheckpoint = GetLastCheckpoint(params.Checkpoints()); + if (pcheckpoint && nHeight < pcheckpoint->nHeight) { + LogPrintf("ERROR: %s: forked chain older than last checkpoint (height %d)\n", __func__, nHeight); +@@ -4087,6 +4093,7 @@ bool static LoadBlockIndexDB(ChainstateManager& chainman, const CChainParams& ch + chainparams.GetConsensus(), *pblocktree, + ::ChainstateActive().setBlockIndexCandidates)) { + return false; ++ } + + // Load block file info + pblocktree->ReadLastBlockFile(nLastBlockFile); +@@ -4491,26 +4498,15 @@ bool CChainState::RewindBlockIndex(const CChainParams& params) + PruneBlockIndexCandidates(); + + CheckBlockIndex(params.GetConsensus()); +- } +- } + +- return true; +-} +- +-bool RewindBlockIndex(const CChainParams& params) { +- if (!::ChainstateActive().RewindBlockIndex(params)) { +- return false; +- } +- +- LOCK(cs_main); +- if (::ChainActive().Tip() != nullptr) { +- // FlushStateToDisk can possibly read ::ChainActive(). Be conservative +- // and skip it here, we're about to -reindex-chainstate anyway, so +- // it'll get called a bunch real soon. +- BlockValidationState state; +- if (!::ChainstateActive().FlushStateToDisk(params, state, FlushStateMode::ALWAYS)) { +- LogPrintf("RewindBlockIndex: unable to flush state to disk (%s)\n", state.ToString()); +- return false; ++ // FlushStateToDisk can possibly read ::ChainActive(). Be conservative ++ // and skip it here, we're about to -reindex-chainstate anyway, so ++ // it'll get called a bunch real soon. ++ BlockValidationState state; ++ if (!FlushStateToDisk(params, state, FlushStateMode::ALWAYS)) { ++ LogPrintf("RewindBlockIndex: unable to flush state to disk (%s)\n", state.ToString()); ++ return false; ++ } + } + } + +@@ -4541,8 +4537,6 @@ void UnloadBlockIndex(CTxMemPool* mempool, ChainstateManager& chainman) + warningcache[b].clear(); + } + fHavePruned = false; +- +- ::ChainstateActive().UnloadBlockIndex(); + } + + bool ChainstateManager::LoadBlockIndex(const CChainParams& chainparams) +@@ -4673,7 +4667,7 @@ void LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, FlatFi + // Activate the genesis block so normal node progress can continue + if (hash == chainparams.GetConsensus().hashGenesisBlock) { + BlockValidationState state; +- if (!ActivateBestChain(state, chainparams)) { ++ if (!ActivateBestChain(state, chainparams, nullptr)) { + break; + } + } +@@ -5116,9 +5110,7 @@ bool DumpMempool(const CTxMemPool& pool) + if (!FileCommit(file.Get())) + throw std::runtime_error("FileCommit failed"); + file.fclose(); +- if (!RenameOver(GetDataDir() / "mempool.dat.new", GetDataDir() / "mempool.dat")) { +- throw std::runtime_error("Rename failed"); +- } ++ RenameOver(GetDataDir() / "mempool.dat.new", GetDataDir() / "mempool.dat"); + int64_t last = GetTimeMicros(); + LogPrintf("Dumped mempool: %gs to copy, %gs to dump\n", (mid-start)*MICRO, (last-mid)*MICRO); + } catch (const std::exception& e) { +diff --git a/src/validation.h b/src/validation.h +index 5b68b6a9..3602e53b 100644 +--- a/src/validation.h ++++ b/src/validation.h +@@ -1,5 +1,5 @@ + // Copyright (c) 2009-2010 Satoshi Nakamoto +-// Copyright (c) 2009-2020 The BGL Core developers ++// Copyright (c) 2009-2020 The Bitcoin Core developers + // Distributed under the MIT software license, see the accompanying + // file COPYING or http://www.opensource.org/licenses/mit-license.php. + +@@ -14,6 +14,7 @@ + #include + #include // for ReadLE64 + #include ++#include + #include + #include // For CMessageHeader::MessageStartChars + #include " - << "
" - << ""; + std::cout << "Created '" << filename << "'" << std::endl; } +} // namespace benchmark::BenchRunner::BenchmarkMap& benchmark::BenchRunner::benchmarks() { - static std::map benchmarks_map; + static std::map benchmarks_map; return benchmarks_map; } -benchmark::BenchRunner::BenchRunner(std::string name, benchmark::BenchFunction func, uint64_t num_iters_for_one_second) +benchmark::BenchRunner::BenchRunner(std::string name, benchmark::BenchFunction func) { - benchmarks().insert(std::make_pair(name, Bench{func, num_iters_for_one_second})); + benchmarks().insert(std::make_pair(name, func)); } -void benchmark::BenchRunner::RunAll(Printer& printer, uint64_t num_evals, double scaling, const std::string& filter, bool is_list_only) +void benchmark::BenchRunner::RunAll(const Args& args) { - if (!std::ratio_less_equal::value) { - std::cerr << "WARNING: Clock precision is worse than microsecond - benchmarks may be less accurate!\n"; - } -#ifdef DEBUG - std::cerr << "WARNING: This is a debug build - may result in slower benchmarks.\n"; -#endif - - std::regex reFilter(filter); + std::regex reFilter(args.regex_filter); std::smatch baseMatch; - printer.header(); - + std::vector benchmarkResults; for (const auto& p : benchmarks()) { - RegTestingSetup test{}; - { - LOCK(cs_main); - assert(::ChainActive().Height() == 0); - const bool witness_enabled{IsWitnessEnabled(::ChainActive().Tip(), Params().GetConsensus())}; - assert(witness_enabled); - } - if (!std::regex_match(p.first, baseMatch, reFilter)) { continue; } - uint64_t num_iters = static_cast(p.second.num_iters_for_one_second * scaling); - if (0 == num_iters) { - num_iters = 1; - } - State state(p.first, num_evals, num_iters, printer); - if (!is_list_only) { - p.second.func(state); + if (args.is_list_only) { + std::cout << p.first << std::endl; + continue; } - printer.result(state); - } - printer.footer(); -} - -bool benchmark::State::UpdateTimer(const benchmark::time_point current_time) -{ - if (m_start_time != time_point()) { - std::chrono::duration diff = current_time - m_start_time; - m_elapsed_results.push_back(diff.count() / m_num_iters); + Bench bench; + bench.name(p.first); + if (args.asymptote.empty()) { + p.second(bench); + } else { + for (auto n : args.asymptote) { + bench.complexityN(n); + p.second(bench); + } + std::cout << bench.complexityBigO() << std::endl; + } - if (m_elapsed_results.size() == m_num_evals) { - return false; + if (!bench.results().empty()) { + benchmarkResults.push_back(bench.results().back()); } } - m_num_iters_left = m_num_iters - 1; - return true; + GenerateTemplateResults(benchmarkResults, args.output_csv, "# Benchmark, evals, iterations, total, min, max, median\n" + "{{#result}}{{name}}, {{epochs}}, {{average(iterations)}}, {{sumProduct(iterations, elapsed)}}, {{minimum(elapsed)}}, {{maximum(elapsed)}}, {{median(elapsed)}}\n" + "{{/result}}"); + GenerateTemplateResults(benchmarkResults, args.output_json, ankerl::nanobench::templates::json()); } diff --git a/src/bench/bench.h b/src/bench/bench.h index f09316bcb8..38c052f88a 100644 --- a/src/bench/bench.h +++ b/src/bench/bench.h @@ -1,141 +1,63 @@ -// Copyright (c) 2015-2018 The Bitcoin Core developers +// Copyright (c) 2015-2020 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BGL_BENCH_BENCH_H #define BGL_BENCH_BENCH_H +#include #include #include #include #include -#include +#include #include #include -// Simple micro-benchmarking framework; API mostly matches a subset of the Google Benchmark -// framework (see https://github.com/google/benchmark) -// Why not use the Google Benchmark framework? Because adding Yet Another Dependency -// (that uses cmake as its build system and has lots of features we don't need) isn't -// worth it. - /* * Usage: -static void CODE_TO_TIME(benchmark::State& state) +static void CODE_TO_TIME(benchmark::Bench& bench) { ... do any setup needed... - while (state.KeepRunning()) { + nanobench::Config().run([&] { ... do stuff you want to time... - } + }); ... do any cleanup needed... } -// default to running benchmark for 5000 iterations -BENCHMARK(CODE_TO_TIME, 5000); +BENCHMARK(CODE_TO_TIME); */ namespace benchmark { -// In case high_resolution_clock is steady, prefer that, otherwise use steady_clock. -struct best_clock { - using hi_res_clock = std::chrono::high_resolution_clock; - using steady_clock = std::chrono::steady_clock; - using type = std::conditional::type; -}; -using clock = best_clock::type; -using time_point = clock::time_point; -using duration = clock::duration; -class Printer; - -class State -{ -public: - std::string m_name; - uint64_t m_num_iters_left; - const uint64_t m_num_iters; - const uint64_t m_num_evals; - std::vector m_elapsed_results; - time_point m_start_time; +using ankerl::nanobench::Bench; - bool UpdateTimer(time_point finish_time); +typedef std::function BenchFunction; - State(std::string name, uint64_t num_evals, double num_iters, Printer& printer) : m_name(name), m_num_iters_left(0), m_num_iters(num_iters), m_num_evals(num_evals) - { - } - - inline bool KeepRunning() - { - if (m_num_iters_left--) { - return true; - } - - bool result = UpdateTimer(clock::now()); - // measure again so runtime of UpdateTimer is not included - m_start_time = clock::now(); - return result; - } +struct Args { + std::string regex_filter; + bool is_list_only; + std::vector asymptote; + std::string output_csv; + std::string output_json; }; -typedef std::function BenchFunction; - class BenchRunner { - struct Bench { - BenchFunction func; - uint64_t num_iters_for_one_second; - }; - typedef std::map BenchmarkMap; + typedef std::map BenchmarkMap; static BenchmarkMap& benchmarks(); public: - BenchRunner(std::string name, BenchFunction func, uint64_t num_iters_for_one_second); + BenchRunner(std::string name, BenchFunction func); - static void RunAll(Printer& printer, uint64_t num_evals, double scaling, const std::string& filter, bool is_list_only); -}; - -// interface to output benchmark results. -class Printer -{ -public: - virtual ~Printer() {} - virtual void header() = 0; - virtual void result(const State& state) = 0; - virtual void footer() = 0; -}; - -// default printer to console, shows min, max, median. -class ConsolePrinter : public Printer -{ -public: - void header() override; - void result(const State& state) override; - void footer() override; -}; - -// creates box plot with plotly.js -class PlotlyPrinter : public Printer -{ -public: - PlotlyPrinter(std::string plotly_url, int64_t width, int64_t height); - void header() override; - void result(const State& state) override; - void footer() override; - -private: - std::string m_plotly_url; - int64_t m_width; - int64_t m_height; + static void RunAll(const Args& args); }; } - - -// BENCHMARK(foo, num_iters_for_one_second) expands to: benchmark::BenchRunner bench_11foo("foo", num_iterations); -// Choose a num_iters_for_one_second that takes roughly 1 second. The goal is that all benchmarks should take approximately -// the same time, and scaling factor can be used that the total time is appropriate for your system. -#define BENCHMARK(n, num_iters_for_one_second) \ - benchmark::BenchRunner BOOST_PP_CAT(bench_, BOOST_PP_CAT(__LINE__, n))(BOOST_PP_STRINGIZE(n), n, (num_iters_for_one_second)); +// BENCHMARK(foo) expands to: benchmark::BenchRunner bench_11foo("foo"); +#define BENCHMARK(n) \ + benchmark::BenchRunner BOOST_PP_CAT(bench_, BOOST_PP_CAT(__LINE__, n))(BOOST_PP_STRINGIZE(n), n); #endif // BGL_BENCH_BENCH_H diff --git a/src/bench/bench_BGL.cpp b/src/bench/bench_BGL.cpp index 9235d5fe6a..ed768be9cb 100644 --- a/src/bench/bench_BGL.cpp +++ b/src/bench/bench_BGL.cpp @@ -4,76 +4,63 @@ #include +#include #include #include #include -static const int64_t DEFAULT_BENCH_EVALUATIONS = 5; static const char* DEFAULT_BENCH_FILTER = ".*"; -static const char* DEFAULT_BENCH_SCALING = "1.0"; -static const char* DEFAULT_BENCH_PRINTER = "console"; -static const char* DEFAULT_PLOT_PLOTLYURL = "https://cdn.plot.ly/plotly-latest.min.js"; -static const int64_t DEFAULT_PLOT_WIDTH = 1024; -static const int64_t DEFAULT_PLOT_HEIGHT = 768; -static void SetupBenchArgs() +static void SetupBenchArgs(ArgsManager& argsman) { - SetupHelpOptions(gArgs); + SetupHelpOptions(argsman); - gArgs.AddArg("-list", "List benchmarks without executing them. Can be combined with -scaling and -filter", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); - gArgs.AddArg("-evals=", strprintf("Number of measurement evaluations to perform. (default: %u)", DEFAULT_BENCH_EVALUATIONS), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); - gArgs.AddArg("-filter=", strprintf("Regular expression filter to select benchmark by name (default: %s)", DEFAULT_BENCH_FILTER), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); - gArgs.AddArg("-scaling=", strprintf("Scaling factor for benchmark's runtime (default: %u)", DEFAULT_BENCH_SCALING), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); - gArgs.AddArg("-printer=(console|plot)", strprintf("Choose printer format. console: print data to console. plot: Print results as HTML graph (default: %s)", DEFAULT_BENCH_PRINTER), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); - gArgs.AddArg("-plot-plotlyurl=", strprintf("URL to use for plotly.js (default: %s)", DEFAULT_PLOT_PLOTLYURL), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); - gArgs.AddArg("-plot-width=", strprintf("Plot width in pixel (default: %u)", DEFAULT_PLOT_WIDTH), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); - gArgs.AddArg("-plot-height=", strprintf("Plot height in pixel (default: %u)", DEFAULT_PLOT_HEIGHT), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); + argsman.AddArg("-list", "List benchmarks without executing them", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); + argsman.AddArg("-filter=", strprintf("Regular expression filter to select benchmark by name (default: %s)", DEFAULT_BENCH_FILTER), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); + argsman.AddArg("-asymptote=n1,n2,n3,...", strprintf("Test asymptotic growth of the runtime of an algorithm, if supported by the benchmark"), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); + argsman.AddArg("-output_csv=", "Generate CSV file with the most important benchmark results.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); + argsman.AddArg("-output_json=", "Generate JSON file with all benchmark results.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); +} + +// parses a comma separated list like "10,20,30,50" +static std::vector parseAsymptote(const std::string& str) { + std::stringstream ss(str); + std::vector numbers; + double d; + char c; + while (ss >> d) { + numbers.push_back(d); + ss >> c; + } + return numbers; } int main(int argc, char** argv) { - SetupBenchArgs(); + ArgsManager argsman; + SetupBenchArgs(argsman); + SHA256AutoDetect(); std::string error; - if (!gArgs.ParseParameters(argc, argv, error)) { + if (!argsman.ParseParameters(argc, argv, error)) { tfm::format(std::cerr, "Error parsing command line arguments: %s\n", error); return EXIT_FAILURE; } - if (HelpRequested(gArgs)) { - std::cout << gArgs.GetHelpMessage(); - - return EXIT_SUCCESS; - } - - int64_t evaluations = gArgs.GetArg("-evals", DEFAULT_BENCH_EVALUATIONS); - std::string regex_filter = gArgs.GetArg("-filter", DEFAULT_BENCH_FILTER); - std::string scaling_str = gArgs.GetArg("-scaling", DEFAULT_BENCH_SCALING); - bool is_list_only = gArgs.GetBoolArg("-list", false); + if (HelpRequested(argsman)) { + std::cout << argsman.GetHelpMessage(); - if (evaluations == 0) { return EXIT_SUCCESS; - } else if (evaluations < 0) { - tfm::format(std::cerr, "Error parsing evaluations argument: %d\n", evaluations); - return EXIT_FAILURE; - } - - double scaling_factor; - if (!ParseDouble(scaling_str, &scaling_factor)) { - tfm::format(std::cerr, "Error parsing scaling factor as double: %s\n", scaling_str); - return EXIT_FAILURE; } - std::unique_ptr printer = MakeUnique(); - std::string printer_arg = gArgs.GetArg("-printer", DEFAULT_BENCH_PRINTER); - if ("plot" == printer_arg) { - printer.reset(new benchmark::PlotlyPrinter( - gArgs.GetArg("-plot-plotlyurl", DEFAULT_PLOT_PLOTLYURL), - gArgs.GetArg("-plot-width", DEFAULT_PLOT_WIDTH), - gArgs.GetArg("-plot-height", DEFAULT_PLOT_HEIGHT))); - } + benchmark::Args args; + args.regex_filter = argsman.GetArg("-filter", DEFAULT_BENCH_FILTER); + args.is_list_only = argsman.GetBoolArg("-list", false); + args.asymptote = parseAsymptote(argsman.GetArg("-asymptote", "")); + args.output_csv = argsman.GetArg("-output_csv", ""); + args.output_json = argsman.GetArg("-output_json", ""); - benchmark::BenchRunner::RunAll(*printer, evaluations, scaling_factor, regex_filter, is_list_only); + benchmark::BenchRunner::RunAll(args); return EXIT_SUCCESS; } diff --git a/src/bench/block_assemble.cpp b/src/bench/block_assemble.cpp index 184367e1e5..99a7ad237b 100644 --- a/src/bench/block_assemble.cpp +++ b/src/bench/block_assemble.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -13,8 +14,16 @@ #include -static void AssembleBlock(benchmark::State& state) +static void AssembleBlock(benchmark::Bench& bench) { + TestingSetup test_setup{ + CBaseChainParams::REGTEST, + /* extra_args */ { + "-nodebuglogfile", + "-nodebug", + }, + }; + const std::vector op_true{OP_TRUE}; CScriptWitness witness; witness.stack.push_back(op_true); @@ -29,7 +38,7 @@ static void AssembleBlock(benchmark::State& state) std::array txs; for (size_t b{0}; b < NUM_BLOCKS; ++b) { CMutableTransaction tx; - tx.vin.push_back(MineBlock(SCRIPT_PUB)); + tx.vin.push_back(MineBlock(test_setup.m_node, SCRIPT_PUB)); tx.vin.back().scriptWitness = witness; tx.vout.emplace_back(1337, SCRIPT_PUB); if (NUM_BLOCKS - b >= COINBASE_MATURITY) @@ -40,14 +49,14 @@ static void AssembleBlock(benchmark::State& state) for (const auto& txr : txs) { TxValidationState state; - bool ret{::AcceptToMemoryPool(::mempool, state, txr, nullptr /* plTxnReplaced */, false /* bypass_limits */, /* nAbsurdFee */ 0)}; + bool ret{::AcceptToMemoryPool(*test_setup.m_node.mempool, state, txr, nullptr /* plTxnReplaced */, false /* bypass_limits */)}; assert(ret); } } - while (state.KeepRunning()) { - PrepareBlock(SCRIPT_PUB); - } + bench.run([&] { + PrepareBlock(test_setup.m_node, SCRIPT_PUB); + }); } -BENCHMARK(AssembleBlock, 700); +BENCHMARK(AssembleBlock); diff --git a/src/bench/ccoins_caching.cpp b/src/bench/ccoins_caching.cpp index 4c56e8bcb4..849e3dfa12 100644 --- a/src/bench/ccoins_caching.cpp +++ b/src/bench/ccoins_caching.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2018 The Bitcoin Core developers +// Copyright (c) 2016-2020 The BGL Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -6,59 +6,26 @@ #include #include #include + + + +
+ + + +)DELIM"; +} + +char const* json() noexcept { + return R"DELIM({ + "results": [ +{{#result}} { + "title": "{{title}}", + "name": "{{name}}", + "unit": "{{unit}}", + "batch": {{batch}}, + "complexityN": {{complexityN}}, + "epochs": {{epochs}}, + "clockResolution": {{clockResolution}}, + "clockResolutionMultiple": {{clockResolutionMultiple}}, + "maxEpochTime": {{maxEpochTime}}, + "minEpochTime": {{minEpochTime}}, + "minEpochIterations": {{minEpochIterations}}, + "epochIterations": {{epochIterations}}, + "warmup": {{warmup}}, + "relative": {{relative}}, + "median(elapsed)": {{median(elapsed)}}, + "medianAbsolutePercentError(elapsed)": {{medianAbsolutePercentError(elapsed)}}, + "median(instructions)": {{median(instructions)}}, + "medianAbsolutePercentError(instructions)": {{medianAbsolutePercentError(instructions)}}, + "median(cpucycles)": {{median(cpucycles)}}, + "median(contextswitches)": {{median(contextswitches)}}, + "median(pagefaults)": {{median(pagefaults)}}, + "median(branchinstructions)": {{median(branchinstructions)}}, + "median(branchmisses)": {{median(branchmisses)}}, + "totalTime": {{sumProduct(iterations, elapsed)}}, + "measurements": [ +{{#measurement}} { + "iterations": {{iterations}}, + "elapsed": {{elapsed}}, + "pagefaults": {{pagefaults}}, + "cpucycles": {{cpucycles}}, + "contextswitches": {{contextswitches}}, + "instructions": {{instructions}}, + "branchinstructions": {{branchinstructions}}, + "branchmisses": {{branchmisses}} + }{{^-last}},{{/-last}} +{{/measurement}} ] + }{{^-last}},{{/-last}} +{{/result}} ] +})DELIM"; +} + +ANKERL_NANOBENCH(IGNORE_PADDED_PUSH) +struct Node { + enum class Type { tag, content, section, inverted_section }; + + char const* begin; + char const* end; + std::vector children; + Type type; + + template + // NOLINTNEXTLINE(hicpp-avoid-c-arrays,modernize-avoid-c-arrays,cppcoreguidelines-avoid-c-arrays) + bool operator==(char const (&str)[N]) const noexcept { + return static_cast(std::distance(begin, end) + 1) == N && 0 == strncmp(str, begin, N - 1); + } +}; +ANKERL_NANOBENCH(IGNORE_PADDED_POP) + +static std::vector parseMustacheTemplate(char const** tpl) { + std::vector nodes; + + while (true) { + auto begin = std::strstr(*tpl, "{{"); + auto end = begin; + if (begin != nullptr) { + begin += 2; + end = std::strstr(begin, "}}"); + } + + if (begin == nullptr || end == nullptr) { + // nothing found, finish node + nodes.emplace_back(Node{*tpl, *tpl + std::strlen(*tpl), std::vector{}, Node::Type::content}); + return nodes; + } + + nodes.emplace_back(Node{*tpl, begin - 2, std::vector{}, Node::Type::content}); + + // we found a tag + *tpl = end + 2; + switch (*begin) { + case '/': + // finished! bail out + return nodes; + + case '#': + nodes.emplace_back(Node{begin + 1, end, parseMustacheTemplate(tpl), Node::Type::section}); + break; + + case '^': + nodes.emplace_back(Node{begin + 1, end, parseMustacheTemplate(tpl), Node::Type::inverted_section}); + break; + + default: + nodes.emplace_back(Node{begin, end, std::vector{}, Node::Type::tag}); + break; + } + } +} + +static bool generateFirstLast(Node const& n, size_t idx, size_t size, std::ostream& out) { + bool matchFirst = n == "-first"; + bool matchLast = n == "-last"; + if (!matchFirst && !matchLast) { + return false; + } + + bool doWrite = false; + if (n.type == Node::Type::section) { + doWrite = (matchFirst && idx == 0) || (matchLast && idx == size - 1); + } else if (n.type == Node::Type::inverted_section) { + doWrite = (matchFirst && idx != 0) || (matchLast && idx != size - 1); + } + + if (doWrite) { + for (auto const& child : n.children) { + if (child.type == Node::Type::content) { + out.write(child.begin, std::distance(child.begin, child.end)); + } + } + } + return true; +} + +static bool matchCmdArgs(std::string const& str, std::vector& matchResult) { + matchResult.clear(); + auto idxOpen = str.find('('); + auto idxClose = str.find(')', idxOpen); + if (idxClose == std::string::npos) { + return false; + } + + matchResult.emplace_back(str.substr(0, idxOpen)); + + // split by comma + matchResult.emplace_back(std::string{}); + for (size_t i = idxOpen + 1; i != idxClose; ++i) { + if (str[i] == ' ' || str[i] == '\t') { + // skip whitespace + continue; + } + if (str[i] == ',') { + // got a comma => new string + matchResult.emplace_back(std::string{}); + continue; + } + // no whitespace no comma, append + matchResult.back() += str[i]; + } + return true; +} + +static bool generateConfigTag(Node const& n, Config const& config, std::ostream& out) { + using detail::d; + + if (n == "title") { + out << config.mBenchmarkTitle; + return true; + } else if (n == "name") { + out << config.mBenchmarkName; + return true; + } else if (n == "unit") { + out << config.mUnit; + return true; + } else if (n == "batch") { + out << config.mBatch; + return true; + } else if (n == "complexityN") { + out << config.mComplexityN; + return true; + } else if (n == "epochs") { + out << config.mNumEpochs; + return true; + } else if (n == "clockResolution") { + out << d(detail::clockResolution()); + return true; + } else if (n == "clockResolutionMultiple") { + out << config.mClockResolutionMultiple; + return true; + } else if (n == "maxEpochTime") { + out << d(config.mMaxEpochTime); + return true; + } else if (n == "minEpochTime") { + out << d(config.mMinEpochTime); + return true; + } else if (n == "minEpochIterations") { + out << config.mMinEpochIterations; + return true; + } else if (n == "epochIterations") { + out << config.mEpochIterations; + return true; + } else if (n == "warmup") { + out << config.mWarmup; + return true; + } else if (n == "relative") { + out << config.mIsRelative; + return true; + } + return false; +} + +static std::ostream& generateResultTag(Node const& n, Result const& r, std::ostream& out) { + if (generateConfigTag(n, r.config(), out)) { + return out; + } + // match e.g. "median(elapsed)" + // g++ 4.8 doesn't implement std::regex :( + // static std::regex const regOpArg1("^([a-zA-Z]+)\\(([a-zA-Z]*)\\)$"); + // std::cmatch matchResult; + // if (std::regex_match(n.begin, n.end, matchResult, regOpArg1)) { + std::vector matchResult; + if (matchCmdArgs(std::string(n.begin, n.end), matchResult)) { + if (matchResult.size() == 2) { + auto m = Result::fromString(matchResult[1]); + if (m == Result::Measure::_size) { + return out << 0.0; + } + + if (matchResult[0] == "median") { + return out << r.median(m); + } + if (matchResult[0] == "average") { + return out << r.average(m); + } + if (matchResult[0] == "medianAbsolutePercentError") { + return out << r.medianAbsolutePercentError(m); + } + if (matchResult[0] == "sum") { + return out << r.sum(m); + } + if (matchResult[0] == "minimum") { + return out << r.minimum(m); + } + if (matchResult[0] == "maximum") { + return out << r.maximum(m); + } + } else if (matchResult.size() == 3) { + auto m1 = Result::fromString(matchResult[1]); + auto m2 = Result::fromString(matchResult[2]); + if (m1 == Result::Measure::_size || m2 == Result::Measure::_size) { + return out << 0.0; + } + + if (matchResult[0] == "sumProduct") { + return out << r.sumProduct(m1, m2); + } + } + } + + // match e.g. "sumProduct(elapsed, iterations)" + // static std::regex const regOpArg2("^([a-zA-Z]+)\\(([a-zA-Z]*)\\s*,\\s+([a-zA-Z]*)\\)$"); + + // nothing matches :( + throw std::runtime_error("command '" + std::string(n.begin, n.end) + "' not understood"); +} + +static void generateResultMeasurement(std::vector const& nodes, size_t idx, Result const& r, std::ostream& out) { + for (auto const& n : nodes) { + if (!generateFirstLast(n, idx, r.size(), out)) { + ANKERL_NANOBENCH_LOG("n.type=" << static_cast(n.type)); + switch (n.type) { + case Node::Type::content: + out.write(n.begin, std::distance(n.begin, n.end)); + break; + + case Node::Type::inverted_section: + throw std::runtime_error("got a inverted section inside measurement"); + + case Node::Type::section: + throw std::runtime_error("got a section inside measurement"); + + case Node::Type::tag: { + auto m = Result::fromString(std::string(n.begin, n.end)); + if (m == Result::Measure::_size || !r.has(m)) { + out << 0.0; + } else { + out << r.get(idx, m); + } + break; + } + } + } + } +} + +static void generateResult(std::vector const& nodes, size_t idx, std::vector const& results, std::ostream& out) { + auto const& r = results[idx]; + for (auto const& n : nodes) { + if (!generateFirstLast(n, idx, results.size(), out)) { + ANKERL_NANOBENCH_LOG("n.type=" << static_cast(n.type)); + switch (n.type) { + case Node::Type::content: + out.write(n.begin, std::distance(n.begin, n.end)); + break; + + case Node::Type::inverted_section: + throw std::runtime_error("got a inverted section inside result"); + + case Node::Type::section: + if (n == "measurement") { + for (size_t i = 0; i < r.size(); ++i) { + generateResultMeasurement(n.children, i, r, out); + } + } else { + throw std::runtime_error("got a section inside result"); + } + break; + + case Node::Type::tag: + generateResultTag(n, r, out); + break; + } + } + } +} + +} // namespace templates + +// helper stuff that only intended to be used internally +namespace detail { + +char const* getEnv(char const* name); +bool isEndlessRunning(std::string const& name); + +template +T parseFile(std::string const& filename); + +void gatherStabilityInformation(std::vector& warnings, std::vector& recommendations); +void printStabilityInformationOnce(std::ostream* os); + +// remembers the last table settings used. When it changes, a new table header is automatically written for the new entry. +uint64_t& singletonHeaderHash() noexcept; + +// determines resolution of the given clock. This is done by measuring multiple times and returning the minimum time difference. +Clock::duration calcClockResolution(size_t numEvaluations) noexcept; + +// formatting utilities +namespace fmt { + +// adds thousands separator to numbers +ANKERL_NANOBENCH(IGNORE_PADDED_PUSH) +class NumSep : public std::numpunct { +public: + explicit NumSep(char sep); + char do_thousands_sep() const override; + std::string do_grouping() const override; + +private: + char mSep; +}; +ANKERL_NANOBENCH(IGNORE_PADDED_POP) + +// RAII to save & restore a stream's state +ANKERL_NANOBENCH(IGNORE_PADDED_PUSH) +class StreamStateRestorer { +public: + explicit StreamStateRestorer(std::ostream& s); + ~StreamStateRestorer(); + + // sets back all stream info that we remembered at construction + void restore(); + + // don't allow copying / moving + StreamStateRestorer(StreamStateRestorer const&) = delete; + StreamStateRestorer& operator=(StreamStateRestorer const&) = delete; + StreamStateRestorer(StreamStateRestorer&&) = delete; + StreamStateRestorer& operator=(StreamStateRestorer&&) = delete; + +private: + std::ostream& mStream; + std::locale mLocale; + std::streamsize const mPrecision; + std::streamsize const mWidth; + std::ostream::char_type const mFill; + std::ostream::fmtflags const mFmtFlags; +}; +ANKERL_NANOBENCH(IGNORE_PADDED_POP) + +// Number formatter +class Number { +public: + Number(int width, int precision, double value); + Number(int width, int precision, int64_t value); + std::string to_s() const; + +private: + friend std::ostream& operator<<(std::ostream& os, Number const& n); + std::ostream& write(std::ostream& os) const; + + int mWidth; + int mPrecision; + double mValue; +}; + +// helper replacement for std::to_string of signed/unsigned numbers so we are locale independent +std::string to_s(uint64_t s); + +std::ostream& operator<<(std::ostream& os, Number const& n); + +class MarkDownColumn { +public: + MarkDownColumn(int w, int prec, std::string const& tit, std::string const& suff, double val); + std::string title() const; + std::string separator() const; + std::string invalid() const; + std::string value() const; + +private: + int mWidth; + int mPrecision; + std::string mTitle; + std::string mSuffix; + double mValue; +}; + +// Formats any text as markdown code, escaping backticks. +class MarkDownCode { +public: + explicit MarkDownCode(std::string const& what); + +private: + friend std::ostream& operator<<(std::ostream& os, MarkDownCode const& mdCode); + std::ostream& write(std::ostream& os) const; + + std::string mWhat{}; +}; + +std::ostream& operator<<(std::ostream& os, MarkDownCode const& mdCode); + +} // namespace fmt +} // namespace detail +} // namespace nanobench +} // namespace ankerl + +// implementation ///////////////////////////////////////////////////////////////////////////////// + +namespace ankerl { +namespace nanobench { + +void render(char const* mustacheTemplate, std::vector const& results, std::ostream& out) { + detail::fmt::StreamStateRestorer restorer(out); + + out.precision(std::numeric_limits::digits10); + auto nodes = templates::parseMustacheTemplate(&mustacheTemplate); + + for (auto const& n : nodes) { + ANKERL_NANOBENCH_LOG("n.type=" << static_cast(n.type)); + switch (n.type) { + case templates::Node::Type::content: + out.write(n.begin, std::distance(n.begin, n.end)); + break; + + case templates::Node::Type::inverted_section: + throw std::runtime_error("unknown list '" + std::string(n.begin, n.end) + "'"); + + case templates::Node::Type::section: + if (n == "result") { + const size_t nbResults = results.size(); + for (size_t i = 0; i < nbResults; ++i) { + generateResult(n.children, i, results, out); + } + } else { + throw std::runtime_error("unknown section '" + std::string(n.begin, n.end) + "'"); + } + break; + + case templates::Node::Type::tag: + // This just uses the last result's config. + if (!generateConfigTag(n, results.back().config(), out)) { + throw std::runtime_error("unknown tag '" + std::string(n.begin, n.end) + "'"); + } + break; + } + } +} + +void render(char const* mustacheTemplate, const Bench& bench, std::ostream& out) { + render(mustacheTemplate, bench.results(), out); +} + +namespace detail { + +PerformanceCounters& performanceCounters() { +# if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wexit-time-destructors" +# endif + static PerformanceCounters pc; +# if defined(__clang__) +# pragma clang diagnostic pop +# endif + return pc; +} + +// Windows version of doNotOptimizeAway +// see https://github.com/google/benchmark/blob/master/include/benchmark/benchmark.h#L307 +// see https://github.com/facebook/folly/blob/master/folly/Benchmark.h#L280 +// see https://docs.microsoft.com/en-us/cpp/preprocessor/optimize +# if defined(_MSC_VER) +# pragma optimize("", off) +void doNotOptimizeAwaySink(void const*) {} +# pragma optimize("", on) +# endif + +template +T parseFile(std::string const& filename) { + std::ifstream fin(filename); + T num{}; + fin >> num; + return num; +} + +char const* getEnv(char const* name) { +# if defined(_MSC_VER) +# pragma warning(push) +# pragma warning(disable : 4996) // getenv': This function or variable may be unsafe. +# endif + return std::getenv(name); +# if defined(_MSC_VER) +# pragma warning(pop) +# endif +} + +bool isEndlessRunning(std::string const& name) { + auto endless = getEnv("NANOBENCH_ENDLESS"); + return nullptr != endless && endless == name; +} + +void gatherStabilityInformation(std::vector& warnings, std::vector& recommendations) { + warnings.clear(); + recommendations.clear(); + + bool recommendCheckFlags = false; + +# if defined(DEBUG) + warnings.emplace_back("DEBUG defined"); + recommendCheckFlags = true; +# endif + + bool recommendPyPerf = false; +# if defined(__linux__) + auto nprocs = sysconf(_SC_NPROCESSORS_CONF); + if (nprocs <= 0) { + warnings.emplace_back("couldn't figure out number of processors - no governor, turbo check possible"); + } else { + + // check frequency scaling + for (long id = 0; id < nprocs; ++id) { + auto idStr = detail::fmt::to_s(static_cast(id)); + auto sysCpu = "/sys/devices/system/cpu/cpu" + idStr; + auto minFreq = parseFile(sysCpu + "/cpufreq/scaling_min_freq"); + auto maxFreq = parseFile(sysCpu + "/cpufreq/scaling_max_freq"); + if (minFreq != maxFreq) { + auto minMHz = static_cast(minFreq) / 1000.0; + auto maxMHz = static_cast(maxFreq) / 1000.0; + warnings.emplace_back("CPU frequency scaling enabled: CPU " + idStr + " between " + + detail::fmt::Number(1, 1, minMHz).to_s() + " and " + detail::fmt::Number(1, 1, maxMHz).to_s() + + " MHz"); + recommendPyPerf = true; + break; + } + } + + auto currentGovernor = parseFile("/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"); + if ("performance" != currentGovernor) { + warnings.emplace_back("CPU governor is '" + currentGovernor + "' but should be 'performance'"); + recommendPyPerf = true; + } + + if (0 == parseFile("/sys/devices/system/cpu/intel_pstate/no_turbo")) { + warnings.emplace_back("Turbo is enabled, CPU frequency will fluctuate"); + recommendPyPerf = true; + } + } +# endif + + if (recommendCheckFlags) { + recommendations.emplace_back("Make sure you compile for Release"); + } + if (recommendPyPerf) { + recommendations.emplace_back("Use 'pyperf system tune' before benchmarking. See https://github.com/vstinner/pyperf"); + } +} + +void printStabilityInformationOnce(std::ostream* outStream) { + static bool shouldPrint = true; + if (shouldPrint && outStream) { + auto& os = *outStream; + shouldPrint = false; + std::vector warnings; + std::vector recommendations; + gatherStabilityInformation(warnings, recommendations); + if (warnings.empty()) { + return; + } + + os << "Warning, results might be unstable:" << std::endl; + for (auto const& w : warnings) { + os << "* " << w << std::endl; + } + + os << std::endl << "Recommendations" << std::endl; + for (auto const& r : recommendations) { + os << "* " << r << std::endl; + } + } +} + +// remembers the last table settings used. When it changes, a new table header is automatically written for the new entry. +uint64_t& singletonHeaderHash() noexcept { + static uint64_t sHeaderHash{}; + return sHeaderHash; +} + +ANKERL_NANOBENCH_NO_SANITIZE("integer") +inline uint64_t fnv1a(std::string const& str) noexcept { + auto val = UINT64_C(14695981039346656037); + for (auto c : str) { + val = (val ^ static_cast(c)) * UINT64_C(1099511628211); + } + return val; +} + +ANKERL_NANOBENCH_NO_SANITIZE("integer") +inline uint64_t hash_combine(uint64_t seed, uint64_t val) { + return seed ^ (val + UINT64_C(0x9e3779b9) + (seed << 6U) + (seed >> 2U)); +} + +// determines resolution of the given clock. This is done by measuring multiple times and returning the minimum time difference. +Clock::duration calcClockResolution(size_t numEvaluations) noexcept { + auto bestDuration = Clock::duration::max(); + Clock::time_point tBegin; + Clock::time_point tEnd; + for (size_t i = 0; i < numEvaluations; ++i) { + tBegin = Clock::now(); + do { + tEnd = Clock::now(); + } while (tBegin == tEnd); + bestDuration = (std::min)(bestDuration, tEnd - tBegin); + } + return bestDuration; +} + +// Calculates clock resolution once, and remembers the result +Clock::duration clockResolution() noexcept { + static Clock::duration sResolution = calcClockResolution(20); + return sResolution; +} + +ANKERL_NANOBENCH(IGNORE_PADDED_PUSH) +struct IterationLogic::Impl { + enum class State { warmup, upscaling_runtime, measuring, endless }; + + explicit Impl(Bench const& bench) + : mBench(bench) + , mResult(bench.config()) { + printStabilityInformationOnce(mBench.output()); + + // determine target runtime per epoch + mTargetRuntimePerEpoch = detail::clockResolution() * mBench.clockResolutionMultiple(); + if (mTargetRuntimePerEpoch > mBench.maxEpochTime()) { + mTargetRuntimePerEpoch = mBench.maxEpochTime(); + } + if (mTargetRuntimePerEpoch < mBench.minEpochTime()) { + mTargetRuntimePerEpoch = mBench.minEpochTime(); + } + + if (isEndlessRunning(mBench.name())) { + std::cerr << "NANOBENCH_ENDLESS set: running '" << mBench.name() << "' endlessly" << std::endl; + mNumIters = (std::numeric_limits::max)(); + mState = State::endless; + } else if (0 != mBench.warmup()) { + mNumIters = mBench.warmup(); + mState = State::warmup; + } else if (0 != mBench.epochIterations()) { + // exact number of iterations + mNumIters = mBench.epochIterations(); + mState = State::measuring; + } else { + mNumIters = mBench.minEpochIterations(); + mState = State::upscaling_runtime; + } + } + + // directly calculates new iters based on elapsed&iters, and adds a 10% noise. Makes sure we don't underflow. + ANKERL_NANOBENCH(NODISCARD) uint64_t calcBestNumIters(std::chrono::nanoseconds elapsed, uint64_t iters) noexcept { + auto doubleElapsed = d(elapsed); + auto doubleTargetRuntimePerEpoch = d(mTargetRuntimePerEpoch); + auto doubleNewIters = doubleTargetRuntimePerEpoch / doubleElapsed * d(iters); + + auto doubleMinEpochIters = d(mBench.minEpochIterations()); + if (doubleNewIters < doubleMinEpochIters) { + doubleNewIters = doubleMinEpochIters; + } + doubleNewIters *= 1.0 + 0.2 * mRng.uniform01(); + + // +0.5 for correct rounding when casting + // NOLINTNEXTLINE(bugprone-incorrect-roundings) + return static_cast(doubleNewIters + 0.5); + } + + ANKERL_NANOBENCH_NO_SANITIZE("integer") void upscale(std::chrono::nanoseconds elapsed) { + if (elapsed * 10 < mTargetRuntimePerEpoch) { + // we are far below the target runtime. Multiply iterations by 10 (with overflow check) + if (mNumIters * 10 < mNumIters) { + // overflow :-( + showResult("iterations overflow. Maybe your code got optimized away?"); + mNumIters = 0; + return; + } + mNumIters *= 10; + } else { + mNumIters = calcBestNumIters(elapsed, mNumIters); + } + } + + void add(std::chrono::nanoseconds elapsed, PerformanceCounters const& pc) noexcept { +# if defined(ANKERL_NANOBENCH_LOG_ENABLED) + auto oldIters = mNumIters; +# endif + + switch (mState) { + case State::warmup: + if (isCloseEnoughForMeasurements(elapsed)) { + // if elapsed is close enough, we can skip upscaling and go right to measurements + // still, we don't add the result to the measurements. + mState = State::measuring; + mNumIters = calcBestNumIters(elapsed, mNumIters); + } else { + // not close enough: switch to upscaling + mState = State::upscaling_runtime; + upscale(elapsed); + } + break; + + case State::upscaling_runtime: + if (isCloseEnoughForMeasurements(elapsed)) { + // if we are close enough, add measurement and switch to always measuring + mState = State::measuring; + mTotalElapsed += elapsed; + mTotalNumIters += mNumIters; + mResult.add(elapsed, mNumIters, pc); + mNumIters = calcBestNumIters(mTotalElapsed, mTotalNumIters); + } else { + upscale(elapsed); + } + break; + + case State::measuring: + // just add measurements - no questions asked. Even when runtime is low. But we can't ignore + // that fluctuation, or else we would bias the result + mTotalElapsed += elapsed; + mTotalNumIters += mNumIters; + mResult.add(elapsed, mNumIters, pc); + if (0 != mBench.epochIterations()) { + mNumIters = mBench.epochIterations(); + } else { + mNumIters = calcBestNumIters(mTotalElapsed, mTotalNumIters); + } + break; + + case State::endless: + mNumIters = (std::numeric_limits::max)(); + break; + } + + if (static_cast(mResult.size()) == mBench.epochs()) { + // we got all the results that we need, finish it + showResult(""); + mNumIters = 0; + } + + ANKERL_NANOBENCH_LOG(mBench.name() << ": " << detail::fmt::Number(20, 3, static_cast(elapsed.count())) << " elapsed, " + << detail::fmt::Number(20, 3, static_cast(mTargetRuntimePerEpoch.count())) + << " target. oldIters=" << oldIters << ", mNumIters=" << mNumIters + << ", mState=" << static_cast(mState)); + } + + void showResult(std::string const& errorMessage) const { + ANKERL_NANOBENCH_LOG(errorMessage); + + if (mBench.output() != nullptr) { + // prepare column data /////// + std::vector columns; + + auto rMedian = mResult.median(Result::Measure::elapsed); + + if (mBench.relative()) { + double d = 100.0; + if (!mBench.results().empty()) { + d = rMedian <= 0.0 ? 0.0 : mBench.results().front().median(Result::Measure::elapsed) / rMedian * 100.0; + } + columns.emplace_back(11, 1, "relative", "%", d); + } + + if (mBench.complexityN() > 0) { + columns.emplace_back(14, 0, "complexityN", "", mBench.complexityN()); + } + + columns.emplace_back(22, 2, "ns/" + mBench.unit(), "", 1e9 * rMedian / mBench.batch()); + columns.emplace_back(22, 2, mBench.unit() + "/s", "", rMedian <= 0.0 ? 0.0 : mBench.batch() / rMedian); + + double rErrorMedian = mResult.medianAbsolutePercentError(Result::Measure::elapsed); + columns.emplace_back(10, 1, "err%", "%", rErrorMedian * 100.0); + + double rInsMedian = -1.0; + if (mResult.has(Result::Measure::instructions)) { + rInsMedian = mResult.median(Result::Measure::instructions); + columns.emplace_back(18, 2, "ins/" + mBench.unit(), "", rInsMedian / mBench.batch()); + } + + double rCycMedian = -1.0; + if (mResult.has(Result::Measure::cpucycles)) { + rCycMedian = mResult.median(Result::Measure::cpucycles); + columns.emplace_back(18, 2, "cyc/" + mBench.unit(), "", rCycMedian / mBench.batch()); + } + if (rInsMedian > 0.0 && rCycMedian > 0.0) { + columns.emplace_back(9, 3, "IPC", "", rCycMedian <= 0.0 ? 0.0 : rInsMedian / rCycMedian); + } + if (mResult.has(Result::Measure::branchinstructions)) { + double rBraMedian = mResult.median(Result::Measure::branchinstructions); + columns.emplace_back(17, 2, "bra/" + mBench.unit(), "", rBraMedian / mBench.batch()); + if (mResult.has(Result::Measure::branchmisses)) { + double p = 0.0; + if (rBraMedian >= 1e-9) { + p = 100.0 * mResult.median(Result::Measure::branchmisses) / rBraMedian; + } + columns.emplace_back(10, 1, "miss%", "%", p); + } + } + + columns.emplace_back(12, 2, "total", "", mResult.sum(Result::Measure::elapsed)); + + // write everything + auto& os = *mBench.output(); + + uint64_t hash = 0; + hash = hash_combine(fnv1a(mBench.unit()), hash); + hash = hash_combine(fnv1a(mBench.title()), hash); + hash = hash_combine(mBench.relative(), hash); + hash = hash_combine(mBench.performanceCounters(), hash); + + if (hash != singletonHeaderHash()) { + singletonHeaderHash() = hash; + + // no result yet, print header + os << std::endl; + for (auto const& col : columns) { + os << col.title(); + } + os << "| " << mBench.title() << std::endl; + + for (auto const& col : columns) { + os << col.separator(); + } + os << "|:" << std::string(mBench.title().size() + 1U, '-') << std::endl; + } + + if (!errorMessage.empty()) { + for (auto const& col : columns) { + os << col.invalid(); + } + os << "| :boom: " << fmt::MarkDownCode(mBench.name()) << " (" << errorMessage << ')' << std::endl; + } else { + for (auto const& col : columns) { + os << col.value(); + } + os << "| "; + auto showUnstable = rErrorMedian >= 0.05; + if (showUnstable) { + os << ":wavy_dash: "; + } + os << fmt::MarkDownCode(mBench.name()); + if (showUnstable) { + auto avgIters = static_cast(mTotalNumIters) / static_cast(mBench.epochs()); + // NOLINTNEXTLINE(bugprone-incorrect-roundings) + auto suggestedIters = static_cast(avgIters * 10 + 0.5); + + os << " (Unstable with ~" << detail::fmt::Number(1, 1, avgIters) + << " iters. Increase `minEpochIterations` to e.g. " << suggestedIters << ")"; + } + os << std::endl; + } + } + } + + ANKERL_NANOBENCH(NODISCARD) bool isCloseEnoughForMeasurements(std::chrono::nanoseconds elapsed) const noexcept { + return elapsed * 3 >= mTargetRuntimePerEpoch * 2; + } + + uint64_t mNumIters = 1; + Bench const& mBench; + std::chrono::nanoseconds mTargetRuntimePerEpoch{}; + Result mResult; + Rng mRng{123}; + std::chrono::nanoseconds mTotalElapsed{}; + uint64_t mTotalNumIters = 0; + + State mState = State::upscaling_runtime; +}; +ANKERL_NANOBENCH(IGNORE_PADDED_POP) + +IterationLogic::IterationLogic(Bench const& bench) noexcept + : mPimpl(new Impl(bench)) {} + +IterationLogic::~IterationLogic() { + if (mPimpl) { + delete mPimpl; + } +} + +uint64_t IterationLogic::numIters() const noexcept { + ANKERL_NANOBENCH_LOG(mPimpl->mBench.name() << ": mNumIters=" << mPimpl->mNumIters); + return mPimpl->mNumIters; +} + +void IterationLogic::add(std::chrono::nanoseconds elapsed, PerformanceCounters const& pc) noexcept { + mPimpl->add(elapsed, pc); +} + +void IterationLogic::moveResultTo(std::vector& results) noexcept { + results.emplace_back(std::move(mPimpl->mResult)); +} + +# if ANKERL_NANOBENCH(PERF_COUNTERS) + +ANKERL_NANOBENCH(IGNORE_PADDED_PUSH) +class LinuxPerformanceCounters { +public: + struct Target { + Target(uint64_t* targetValue_, bool correctMeasuringOverhead_, bool correctLoopOverhead_) + : targetValue(targetValue_) + , correctMeasuringOverhead(correctMeasuringOverhead_) + , correctLoopOverhead(correctLoopOverhead_) {} + + uint64_t* targetValue{}; + bool correctMeasuringOverhead{}; + bool correctLoopOverhead{}; + }; + + ~LinuxPerformanceCounters(); + + // quick operation + inline void start() {} + + inline void stop() {} + + bool monitor(perf_sw_ids swId, Target target); + bool monitor(perf_hw_id hwId, Target target); + + bool hasError() const noexcept { + return mHasError; + } + + // Just reading data is faster than enable & disabling. + // we subtract data ourselves. + inline void beginMeasure() { + if (mHasError) { + return; + } + + // NOLINTNEXTLINE(hicpp-signed-bitwise) + mHasError = -1 == ioctl(mFd, PERF_EVENT_IOC_RESET, PERF_IOC_FLAG_GROUP); + if (mHasError) { + return; + } + + // NOLINTNEXTLINE(hicpp-signed-bitwise) + mHasError = -1 == ioctl(mFd, PERF_EVENT_IOC_ENABLE, PERF_IOC_FLAG_GROUP); + } + + inline void endMeasure() { + if (mHasError) { + return; + } + + // NOLINTNEXTLINE(hicpp-signed-bitwise) + mHasError = (-1 == ioctl(mFd, PERF_EVENT_IOC_DISABLE, PERF_IOC_FLAG_GROUP)); + if (mHasError) { + return; + } + + auto const numBytes = sizeof(uint64_t) * mCounters.size(); + auto ret = read(mFd, mCounters.data(), numBytes); + mHasError = ret != static_cast(numBytes); + } + + void updateResults(uint64_t numIters); + + // rounded integer division + template + static inline T divRounded(T a, T divisor) { + return (a + divisor / 2) / divisor; + } + + template + ANKERL_NANOBENCH_NO_SANITIZE("integer") + void calibrate(Op&& op) { + // clear current calibration data, + for (auto& v : mCalibratedOverhead) { + v = UINT64_C(0); + } + + // create new calibration data + auto newCalibration = mCalibratedOverhead; + for (auto& v : newCalibration) { + v = (std::numeric_limits::max)(); + } + for (size_t iter = 0; iter < 100; ++iter) { + beginMeasure(); + op(); + endMeasure(); + if (mHasError) { + return; + } + + for (size_t i = 0; i < newCalibration.size(); ++i) { + auto diff = mCounters[i]; + if (newCalibration[i] > diff) { + newCalibration[i] = diff; + } + } + } + + mCalibratedOverhead = std::move(newCalibration); + + { + // calibrate loop overhead. For branches & instructions this makes sense, not so much for everything else like cycles. + // marsaglia's xorshift: mov, sal/shr, xor. Times 3. + // This has the nice property that the compiler doesn't seem to be able to optimize multiple calls any further. + // see https://godbolt.org/z/49RVQ5 + uint64_t const numIters = 100000U + (std::random_device{}() & 3); + uint64_t n = numIters; + uint32_t x = 1234567; + auto fn = [&]() { + x ^= x << 13; + x ^= x >> 17; + x ^= x << 5; + }; + + beginMeasure(); + while (n-- > 0) { + fn(); + } + endMeasure(); + detail::doNotOptimizeAway(x); + auto measure1 = mCounters; + + n = numIters; + beginMeasure(); + while (n-- > 0) { + // we now run *twice* so we can easily calculate the overhead + fn(); + fn(); + } + endMeasure(); + detail::doNotOptimizeAway(x); + auto measure2 = mCounters; + + for (size_t i = 0; i < mCounters.size(); ++i) { + // factor 2 because we have two instructions per loop + auto m1 = measure1[i] > mCalibratedOverhead[i] ? measure1[i] - mCalibratedOverhead[i] : 0; + auto m2 = measure2[i] > mCalibratedOverhead[i] ? measure2[i] - mCalibratedOverhead[i] : 0; + auto overhead = m1 * 2 > m2 ? m1 * 2 - m2 : 0; + + mLoopOverhead[i] = divRounded(overhead, numIters); + } + } + } + +private: + bool monitor(uint32_t type, uint64_t eventid, Target target); + + std::map mIdToTarget{}; + + // start with minimum size of 3 for read_format + std::vector mCounters{3}; + std::vector mCalibratedOverhead{3}; + std::vector mLoopOverhead{3}; + + uint64_t mTimeEnabledNanos = 0; + uint64_t mTimeRunningNanos = 0; + int mFd = -1; + bool mHasError = false; +}; +ANKERL_NANOBENCH(IGNORE_PADDED_POP) + +LinuxPerformanceCounters::~LinuxPerformanceCounters() { + if (-1 != mFd) { + close(mFd); + } +} + +bool LinuxPerformanceCounters::monitor(perf_sw_ids swId, LinuxPerformanceCounters::Target target) { + return monitor(PERF_TYPE_SOFTWARE, swId, target); +} + +bool LinuxPerformanceCounters::monitor(perf_hw_id hwId, LinuxPerformanceCounters::Target target) { + return monitor(PERF_TYPE_HARDWARE, hwId, target); +} + +// overflow is ok, it's checked +ANKERL_NANOBENCH_NO_SANITIZE("integer") +void LinuxPerformanceCounters::updateResults(uint64_t numIters) { + // clear old data + for (auto& id_value : mIdToTarget) { + *id_value.second.targetValue = UINT64_C(0); + } + + if (mHasError) { + return; + } + + mTimeEnabledNanos = mCounters[1] - mCalibratedOverhead[1]; + mTimeRunningNanos = mCounters[2] - mCalibratedOverhead[2]; + + for (uint64_t i = 0; i < mCounters[0]; ++i) { + auto idx = static_cast(3 + i * 2 + 0); + auto id = mCounters[idx + 1U]; + + auto it = mIdToTarget.find(id); + if (it != mIdToTarget.end()) { + + auto& tgt = it->second; + *tgt.targetValue = mCounters[idx]; + if (tgt.correctMeasuringOverhead) { + if (*tgt.targetValue >= mCalibratedOverhead[idx]) { + *tgt.targetValue -= mCalibratedOverhead[idx]; + } else { + *tgt.targetValue = 0U; + } + } + if (tgt.correctLoopOverhead) { + auto correctionVal = mLoopOverhead[idx] * numIters; + if (*tgt.targetValue >= correctionVal) { + *tgt.targetValue -= correctionVal; + } else { + *tgt.targetValue = 0U; + } + } + } + } +} + +bool LinuxPerformanceCounters::monitor(uint32_t type, uint64_t eventid, Target target) { + *target.targetValue = (std::numeric_limits::max)(); + if (mHasError) { + return false; + } + + auto pea = perf_event_attr(); + std::memset(&pea, 0, sizeof(perf_event_attr)); + pea.type = type; + pea.size = sizeof(perf_event_attr); + pea.config = eventid; + pea.disabled = 1; // start counter as disabled + pea.exclude_kernel = 1; + pea.exclude_hv = 1; + + // NOLINTNEXTLINE(hicpp-signed-bitwise) + pea.read_format = PERF_FORMAT_GROUP | PERF_FORMAT_ID | PERF_FORMAT_TOTAL_TIME_ENABLED | PERF_FORMAT_TOTAL_TIME_RUNNING; + + const int pid = 0; // the current process + const int cpu = -1; // all CPUs +# if defined(PERF_FLAG_FD_CLOEXEC) // since Linux 3.14 + const unsigned long flags = PERF_FLAG_FD_CLOEXEC; +# else + const unsigned long flags = 0; +# endif + + auto fd = static_cast(syscall(__NR_perf_event_open, &pea, pid, cpu, mFd, flags)); + if (-1 == fd) { + return false; + } + if (-1 == mFd) { + // first call: set to fd, and use this from now on + mFd = fd; + } + uint64_t id = 0; + // NOLINTNEXTLINE(hicpp-signed-bitwise) + if (-1 == ioctl(fd, PERF_EVENT_IOC_ID, &id)) { + // couldn't get id + return false; + } + + // insert into map, rely on the fact that map's references are constant. + mIdToTarget.emplace(id, target); + + // prepare readformat with the correct size (after the insert) + auto size = 3 + 2 * mIdToTarget.size(); + mCounters.resize(size); + mCalibratedOverhead.resize(size); + mLoopOverhead.resize(size); + + return true; +} + +PerformanceCounters::PerformanceCounters() + : mPc(new LinuxPerformanceCounters()) + , mVal() + , mHas() { + + mHas.pageFaults = mPc->monitor(PERF_COUNT_SW_PAGE_FAULTS, LinuxPerformanceCounters::Target(&mVal.pageFaults, true, false)); + mHas.cpuCycles = mPc->monitor(PERF_COUNT_HW_REF_CPU_CYCLES, LinuxPerformanceCounters::Target(&mVal.cpuCycles, true, false)); + mHas.contextSwitches = + mPc->monitor(PERF_COUNT_SW_CONTEXT_SWITCHES, LinuxPerformanceCounters::Target(&mVal.contextSwitches, true, false)); + mHas.instructions = mPc->monitor(PERF_COUNT_HW_INSTRUCTIONS, LinuxPerformanceCounters::Target(&mVal.instructions, true, true)); + mHas.branchInstructions = + mPc->monitor(PERF_COUNT_HW_BRANCH_INSTRUCTIONS, LinuxPerformanceCounters::Target(&mVal.branchInstructions, true, false)); + mHas.branchMisses = mPc->monitor(PERF_COUNT_HW_BRANCH_MISSES, LinuxPerformanceCounters::Target(&mVal.branchMisses, true, false)); + // mHas.branchMisses = false; + + mPc->start(); + mPc->calibrate([] { + auto before = ankerl::nanobench::Clock::now(); + auto after = ankerl::nanobench::Clock::now(); + (void)before; + (void)after; + }); + + if (mPc->hasError()) { + // something failed, don't monitor anything. + mHas = PerfCountSet{}; + } +} + +PerformanceCounters::~PerformanceCounters() { + if (nullptr != mPc) { + delete mPc; + } +} + +void PerformanceCounters::beginMeasure() { + mPc->beginMeasure(); +} + +void PerformanceCounters::endMeasure() { + mPc->endMeasure(); +} + +void PerformanceCounters::updateResults(uint64_t numIters) { + mPc->updateResults(numIters); +} + +# else + +PerformanceCounters::PerformanceCounters() = default; +PerformanceCounters::~PerformanceCounters() = default; +void PerformanceCounters::beginMeasure() {} +void PerformanceCounters::endMeasure() {} +void PerformanceCounters::updateResults(uint64_t) {} + +# endif + +ANKERL_NANOBENCH(NODISCARD) PerfCountSet const& PerformanceCounters::val() const noexcept { + return mVal; +} +ANKERL_NANOBENCH(NODISCARD) PerfCountSet const& PerformanceCounters::has() const noexcept { + return mHas; +} + +// formatting utilities +namespace fmt { + +// adds thousands separator to numbers +NumSep::NumSep(char sep) + : mSep(sep) {} + +char NumSep::do_thousands_sep() const { + return mSep; +} + +std::string NumSep::do_grouping() const { + return "\003"; +} + +// RAII to save & restore a stream's state +StreamStateRestorer::StreamStateRestorer(std::ostream& s) + : mStream(s) + , mLocale(s.getloc()) + , mPrecision(s.precision()) + , mWidth(s.width()) + , mFill(s.fill()) + , mFmtFlags(s.flags()) {} + +StreamStateRestorer::~StreamStateRestorer() { + restore(); +} + +// sets back all stream info that we remembered at construction +void StreamStateRestorer::restore() { + mStream.imbue(mLocale); + mStream.precision(mPrecision); + mStream.width(mWidth); + mStream.fill(mFill); + mStream.flags(mFmtFlags); +} + +Number::Number(int width, int precision, int64_t value) + : mWidth(width) + , mPrecision(precision) + , mValue(static_cast(value)) {} + +Number::Number(int width, int precision, double value) + : mWidth(width) + , mPrecision(precision) + , mValue(value) {} + +std::ostream& Number::write(std::ostream& os) const { + StreamStateRestorer restorer(os); + os.imbue(std::locale(os.getloc(), new NumSep(','))); + os << std::setw(mWidth) << std::setprecision(mPrecision) << std::fixed << mValue; + return os; +} + +std::string Number::to_s() const { + std::stringstream ss; + write(ss); + return ss.str(); +} + +std::string to_s(uint64_t n) { + std::string str; + do { + str += static_cast('0' + static_cast(n % 10)); + n /= 10; + } while (n != 0); + std::reverse(str.begin(), str.end()); + return str; +} + +std::ostream& operator<<(std::ostream& os, Number const& n) { + return n.write(os); +} + +MarkDownColumn::MarkDownColumn(int w, int prec, std::string const& tit, std::string const& suff, double val) + : mWidth(w) + , mPrecision(prec) + , mTitle(tit) + , mSuffix(suff) + , mValue(val) {} + +std::string MarkDownColumn::title() const { + std::stringstream ss; + ss << '|' << std::setw(mWidth - 2) << std::right << mTitle << ' '; + return ss.str(); +} + +std::string MarkDownColumn::separator() const { + std::string sep(static_cast(mWidth), '-'); + sep.front() = '|'; + sep.back() = ':'; + return sep; +} + +std::string MarkDownColumn::invalid() const { + std::string sep(static_cast(mWidth), ' '); + sep.front() = '|'; + sep[sep.size() - 2] = '-'; + return sep; +} + +std::string MarkDownColumn::value() const { + std::stringstream ss; + auto width = mWidth - 2 - static_cast(mSuffix.size()); + ss << '|' << Number(width, mPrecision, mValue) << mSuffix << ' '; + return ss.str(); +} + +// Formats any text as markdown code, escaping backticks. +MarkDownCode::MarkDownCode(std::string const& what) { + mWhat.reserve(what.size() + 2); + mWhat.push_back('`'); + for (char c : what) { + mWhat.push_back(c); + if ('`' == c) { + mWhat.push_back('`'); + } + } + mWhat.push_back('`'); +} + +std::ostream& MarkDownCode::write(std::ostream& os) const { + return os << mWhat; +} + +std::ostream& operator<<(std::ostream& os, MarkDownCode const& mdCode) { + return mdCode.write(os); +} +} // namespace fmt +} // namespace detail + +// provide implementation here so it's only generated once +Config::Config() = default; +Config::~Config() = default; +Config& Config::operator=(Config const&) = default; +Config& Config::operator=(Config&&) = default; +Config::Config(Config const&) = default; +Config::Config(Config&&) noexcept = default; + +// provide implementation here so it's only generated once +Result::~Result() = default; +Result& Result::operator=(Result const&) = default; +Result& Result::operator=(Result&&) = default; +Result::Result(Result const&) = default; +Result::Result(Result&&) noexcept = default; + +namespace detail { +template +inline constexpr typename std::underlying_type::type u(T val) noexcept { + return static_cast::type>(val); +} +} // namespace detail + +// Result returned after a benchmark has finished. Can be used as a baseline for relative(). +Result::Result(Config const& benchmarkConfig) + : mConfig(benchmarkConfig) + , mNameToMeasurements{detail::u(Result::Measure::_size)} {} + +void Result::add(Clock::duration totalElapsed, uint64_t iters, detail::PerformanceCounters const& pc) { + using detail::d; + using detail::u; + + double dIters = d(iters); + mNameToMeasurements[u(Result::Measure::iterations)].push_back(dIters); + + mNameToMeasurements[u(Result::Measure::elapsed)].push_back(d(totalElapsed) / dIters); + if (pc.has().pageFaults) { + mNameToMeasurements[u(Result::Measure::pagefaults)].push_back(d(pc.val().pageFaults) / dIters); + } + if (pc.has().cpuCycles) { + mNameToMeasurements[u(Result::Measure::cpucycles)].push_back(d(pc.val().cpuCycles) / dIters); + } + if (pc.has().contextSwitches) { + mNameToMeasurements[u(Result::Measure::contextswitches)].push_back(d(pc.val().contextSwitches) / dIters); + } + if (pc.has().instructions) { + mNameToMeasurements[u(Result::Measure::instructions)].push_back(d(pc.val().instructions) / dIters); + } + if (pc.has().branchInstructions) { + double branchInstructions = 0.0; + // correcting branches: remove branch introduced by the while (...) loop for each iteration. + if (pc.val().branchInstructions > iters + 1U) { + branchInstructions = d(pc.val().branchInstructions - (iters + 1U)); + } + mNameToMeasurements[u(Result::Measure::branchinstructions)].push_back(branchInstructions / dIters); + + if (pc.has().branchMisses) { + // correcting branch misses + double branchMisses = d(pc.val().branchMisses); + if (branchMisses > branchInstructions) { + // can't have branch misses when there were branches... + branchMisses = branchInstructions; + } + + // assuming at least one missed branch for the loop + branchMisses -= 1.0; + if (branchMisses < 1.0) { + branchMisses = 1.0; + } + mNameToMeasurements[u(Result::Measure::branchmisses)].push_back(branchMisses / dIters); + } + } +} + +Config const& Result::config() const noexcept { + return mConfig; +} + +inline double calcMedian(std::vector& data) { + if (data.empty()) { + return 0.0; + } + std::sort(data.begin(), data.end()); + + auto midIdx = data.size() / 2U; + if (1U == (data.size() & 1U)) { + return data[midIdx]; + } + return (data[midIdx - 1U] + data[midIdx]) / 2U; +} + +double Result::median(Measure m) const { + // create a copy so we can sort + auto data = mNameToMeasurements[detail::u(m)]; + return calcMedian(data); +} + +double Result::average(Measure m) const { + using detail::d; + auto const& data = mNameToMeasurements[detail::u(m)]; + if (data.empty()) { + return 0.0; + } + + // create a copy so we can sort + return sum(m) / d(data.size()); +} + +double Result::medianAbsolutePercentError(Measure m) const { + // create copy + auto data = mNameToMeasurements[detail::u(m)]; + + // calculates MdAPE which is the median of percentage error + // see https://www.spiderfinancial.com/support/documentation/numxl/reference-manual/forecasting-performance/mdape + auto med = calcMedian(data); + + // transform the data to absolute error + for (auto& x : data) { + x = (x - med) / x; + if (x < 0) { + x = -x; + } + } + return calcMedian(data); +} + +double Result::sum(Measure m) const noexcept { + auto const& data = mNameToMeasurements[detail::u(m)]; + return std::accumulate(data.begin(), data.end(), 0.0); +} + +double Result::sumProduct(Measure m1, Measure m2) const noexcept { + auto const& data1 = mNameToMeasurements[detail::u(m1)]; + auto const& data2 = mNameToMeasurements[detail::u(m2)]; + + if (data1.size() != data2.size()) { + return 0.0; + } + + double result = 0.0; + for (size_t i = 0, s = data1.size(); i != s; ++i) { + result += data1[i] * data2[i]; + } + return result; +} + +bool Result::has(Measure m) const noexcept { + return !mNameToMeasurements[detail::u(m)].empty(); +} + +double Result::get(size_t idx, Measure m) const { + auto const& data = mNameToMeasurements[detail::u(m)]; + return data.at(idx); +} + +bool Result::empty() const noexcept { + return 0U == size(); +} + +size_t Result::size() const noexcept { + auto const& data = mNameToMeasurements[detail::u(Measure::elapsed)]; + return data.size(); +} + +double Result::minimum(Measure m) const noexcept { + auto const& data = mNameToMeasurements[detail::u(m)]; + if (data.empty()) { + return 0.0; + } + + // here its save to assume that at least one element is there + return *std::min_element(data.begin(), data.end()); +} + +double Result::maximum(Measure m) const noexcept { + auto const& data = mNameToMeasurements[detail::u(m)]; + if (data.empty()) { + return 0.0; + } + + // here its save to assume that at least one element is there + return *std::max_element(data.begin(), data.end()); +} + +Result::Measure Result::fromString(std::string const& str) { + if (str == "elapsed") { + return Measure::elapsed; + } else if (str == "iterations") { + return Measure::iterations; + } else if (str == "pagefaults") { + return Measure::pagefaults; + } else if (str == "cpucycles") { + return Measure::cpucycles; + } else if (str == "contextswitches") { + return Measure::contextswitches; + } else if (str == "instructions") { + return Measure::instructions; + } else if (str == "branchinstructions") { + return Measure::branchinstructions; + } else if (str == "branchmisses") { + return Measure::branchmisses; + } else { + // not found, return _size + return Measure::_size; + } +} + +// Configuration of a microbenchmark. +Bench::Bench() { + mConfig.mOut = &std::cout; +} + +Bench::Bench(Bench&&) = default; +Bench& Bench::operator=(Bench&&) = default; +Bench::Bench(Bench const&) = default; +Bench& Bench::operator=(Bench const&) = default; +Bench::~Bench() noexcept = default; + +double Bench::batch() const noexcept { + return mConfig.mBatch; +} + +double Bench::complexityN() const noexcept { + return mConfig.mComplexityN; +} + +// Set a baseline to compare it to. 100% it is exactly as fast as the baseline, >100% means it is faster than the baseline, <100% +// means it is slower than the baseline. +Bench& Bench::relative(bool isRelativeEnabled) noexcept { + mConfig.mIsRelative = isRelativeEnabled; + return *this; +} +bool Bench::relative() const noexcept { + return mConfig.mIsRelative; +} + +Bench& Bench::performanceCounters(bool showPerformanceCounters) noexcept { + mConfig.mShowPerformanceCounters = showPerformanceCounters; + return *this; +} +bool Bench::performanceCounters() const noexcept { + return mConfig.mShowPerformanceCounters; +} + +// Operation unit. Defaults to "op", could be e.g. "byte" for string processing. +// If u differs from currently set unit, the stored results will be cleared. +// Use singular (byte, not bytes). +Bench& Bench::unit(char const* u) { + if (u != mConfig.mUnit) { + mResults.clear(); + } + mConfig.mUnit = u; + return *this; +} + +Bench& Bench::unit(std::string const& u) { + return unit(u.c_str()); +} + +std::string const& Bench::unit() const noexcept { + return mConfig.mUnit; +} + +// If benchmarkTitle differs from currently set title, the stored results will be cleared. +Bench& Bench::title(const char* benchmarkTitle) { + if (benchmarkTitle != mConfig.mBenchmarkTitle) { + mResults.clear(); + } + mConfig.mBenchmarkTitle = benchmarkTitle; + return *this; +} +Bench& Bench::title(std::string const& benchmarkTitle) { + if (benchmarkTitle != mConfig.mBenchmarkTitle) { + mResults.clear(); + } + mConfig.mBenchmarkTitle = benchmarkTitle; + return *this; +} + +std::string const& Bench::title() const noexcept { + return mConfig.mBenchmarkTitle; +} + +Bench& Bench::name(const char* benchmarkName) { + mConfig.mBenchmarkName = benchmarkName; + return *this; +} + +Bench& Bench::name(std::string const& benchmarkName) { + mConfig.mBenchmarkName = benchmarkName; + return *this; +} + +std::string const& Bench::name() const noexcept { + return mConfig.mBenchmarkName; +} + +// Number of epochs to evaluate. The reported result will be the median of evaluation of each epoch. +Bench& Bench::epochs(size_t numEpochs) noexcept { + mConfig.mNumEpochs = numEpochs; + return *this; +} +size_t Bench::epochs() const noexcept { + return mConfig.mNumEpochs; +} + +// Desired evaluation time is a multiple of clock resolution. Default is to be 1000 times above this measurement precision. +Bench& Bench::clockResolutionMultiple(size_t multiple) noexcept { + mConfig.mClockResolutionMultiple = multiple; + return *this; +} +size_t Bench::clockResolutionMultiple() const noexcept { + return mConfig.mClockResolutionMultiple; +} + +// Sets the maximum time each epoch should take. Default is 100ms. +Bench& Bench::maxEpochTime(std::chrono::nanoseconds t) noexcept { + mConfig.mMaxEpochTime = t; + return *this; +} +std::chrono::nanoseconds Bench::maxEpochTime() const noexcept { + return mConfig.mMaxEpochTime; +} + +// Sets the maximum time each epoch should take. Default is 100ms. +Bench& Bench::minEpochTime(std::chrono::nanoseconds t) noexcept { + mConfig.mMinEpochTime = t; + return *this; +} +std::chrono::nanoseconds Bench::minEpochTime() const noexcept { + return mConfig.mMinEpochTime; +} + +Bench& Bench::minEpochIterations(uint64_t numIters) noexcept { + mConfig.mMinEpochIterations = (numIters == 0) ? 1 : numIters; + return *this; +} +uint64_t Bench::minEpochIterations() const noexcept { + return mConfig.mMinEpochIterations; +} + +Bench& Bench::epochIterations(uint64_t numIters) noexcept { + mConfig.mEpochIterations = numIters; + return *this; +} +uint64_t Bench::epochIterations() const noexcept { + return mConfig.mEpochIterations; +} + +Bench& Bench::warmup(uint64_t numWarmupIters) noexcept { + mConfig.mWarmup = numWarmupIters; + return *this; +} +uint64_t Bench::warmup() const noexcept { + return mConfig.mWarmup; +} + +Bench& Bench::config(Config const& benchmarkConfig) { + mConfig = benchmarkConfig; + return *this; +} +Config const& Bench::config() const noexcept { + return mConfig; +} + +Bench& Bench::output(std::ostream* outstream) noexcept { + mConfig.mOut = outstream; + return *this; +} + +ANKERL_NANOBENCH(NODISCARD) std::ostream* Bench::output() const noexcept { + return mConfig.mOut; +} + +std::vector const& Bench::results() const noexcept { + return mResults; +} + +Bench& Bench::render(char const* templateContent, std::ostream& os) { + ::ankerl::nanobench::render(templateContent, *this, os); + return *this; +} + +std::vector Bench::complexityBigO() const { + std::vector bigOs; + auto rangeMeasure = BigO::collectRangeMeasure(mResults); + bigOs.emplace_back("O(1)", rangeMeasure, [](double) { + return 1.0; + }); + bigOs.emplace_back("O(n)", rangeMeasure, [](double n) { + return n; + }); + bigOs.emplace_back("O(log n)", rangeMeasure, [](double n) { + return std::log2(n); + }); + bigOs.emplace_back("O(n log n)", rangeMeasure, [](double n) { + return n * std::log2(n); + }); + bigOs.emplace_back("O(n^2)", rangeMeasure, [](double n) { + return n * n; + }); + bigOs.emplace_back("O(n^3)", rangeMeasure, [](double n) { + return n * n * n; + }); + std::sort(bigOs.begin(), bigOs.end()); + return bigOs; +} + +Rng::Rng() + : mX(0) + , mY(0) { + std::random_device rd; + std::uniform_int_distribution dist; + do { + mX = dist(rd); + mY = dist(rd); + } while (mX == 0 && mY == 0); +} + +ANKERL_NANOBENCH_NO_SANITIZE("integer") +uint64_t splitMix64(uint64_t& state) noexcept { + uint64_t z = (state += UINT64_C(0x9e3779b97f4a7c15)); + z = (z ^ (z >> 30U)) * UINT64_C(0xbf58476d1ce4e5b9); + z = (z ^ (z >> 27U)) * UINT64_C(0x94d049bb133111eb); + return z ^ (z >> 31U); +} + +// Seeded as described in romu paper (update april 2020) +Rng::Rng(uint64_t seed) noexcept + : mX(splitMix64(seed)) + , mY(splitMix64(seed)) { + for (size_t i = 0; i < 10; ++i) { + operator()(); + } +} + +// only internally used to copy the RNG. +Rng::Rng(uint64_t x, uint64_t y) noexcept + : mX(x) + , mY(y) {} + +Rng Rng::copy() const noexcept { + return Rng{mX, mY}; +} + +BigO::RangeMeasure BigO::collectRangeMeasure(std::vector const& results) { + BigO::RangeMeasure rangeMeasure; + for (auto const& result : results) { + if (result.config().mComplexityN > 0.0) { + rangeMeasure.emplace_back(result.config().mComplexityN, result.median(Result::Measure::elapsed)); + } + } + return rangeMeasure; +} + +BigO::BigO(std::string const& bigOName, RangeMeasure const& rangeMeasure) + : mName(bigOName) { + + // estimate the constant factor + double sumRangeMeasure = 0.0; + double sumRangeRange = 0.0; + + for (size_t i = 0; i < rangeMeasure.size(); ++i) { + sumRangeMeasure += rangeMeasure[i].first * rangeMeasure[i].second; + sumRangeRange += rangeMeasure[i].first * rangeMeasure[i].first; + } + mConstant = sumRangeMeasure / sumRangeRange; + + // calculate root mean square + double err = 0.0; + double sumMeasure = 0.0; + for (size_t i = 0; i < rangeMeasure.size(); ++i) { + auto diff = mConstant * rangeMeasure[i].first - rangeMeasure[i].second; + err += diff * diff; + + sumMeasure += rangeMeasure[i].second; + } + + auto n = static_cast(rangeMeasure.size()); + auto mean = sumMeasure / n; + mNormalizedRootMeanSquare = std::sqrt(err / n) / mean; +} + +BigO::BigO(const char* bigOName, RangeMeasure const& rangeMeasure) + : BigO(std::string(bigOName), rangeMeasure) {} + +std::string const& BigO::name() const noexcept { + return mName; +} + +double BigO::constant() const noexcept { + return mConstant; +} + +double BigO::normalizedRootMeanSquare() const noexcept { + return mNormalizedRootMeanSquare; +} + +bool BigO::operator<(BigO const& other) const noexcept { + return std::tie(mNormalizedRootMeanSquare, mName) < std::tie(other.mNormalizedRootMeanSquare, other.mName); +} + +std::ostream& operator<<(std::ostream& os, BigO const& bigO) { + return os << bigO.constant() << " * " << bigO.name() << ", rms=" << bigO.normalizedRootMeanSquare(); +} + +std::ostream& operator<<(std::ostream& os, std::vector const& bigOs) { + detail::fmt::StreamStateRestorer restorer(os); + os << std::endl << "| coefficient | err% | complexity" << std::endl << "|--------------:|-------:|------------" << std::endl; + for (auto const& bigO : bigOs) { + os << "|" << std::setw(14) << std::setprecision(7) << std::scientific << bigO.constant() << " "; + os << "|" << detail::fmt::Number(6, 1, bigO.normalizedRootMeanSquare() * 100.0) << "% "; + os << "| " << bigO.name(); + os << std::endl; + } + return os; +} + +} // namespace nanobench +} // namespace ankerl + +#endif // ANKERL_NANOBENCH_IMPLEMENT +#endif // ANKERL_NANOBENCH_H_INCLUDED diff --git a/src/bench/poly1305.cpp b/src/bench/poly1305.cpp index 02e5fecc0d..d8db99e7d4 100644 --- a/src/bench/poly1305.cpp +++ b/src/bench/poly1305.cpp @@ -11,30 +11,31 @@ static constexpr uint64_t BUFFER_SIZE_TINY = 64; static constexpr uint64_t BUFFER_SIZE_SMALL = 256; static constexpr uint64_t BUFFER_SIZE_LARGE = 1024*1024; -static void POLY1305(benchmark::State& state, size_t buffersize) +static void POLY1305(benchmark::Bench& bench, size_t buffersize) { std::vector tag(POLY1305_TAGLEN, 0); std::vector key(POLY1305_KEYLEN, 0); std::vector in(buffersize, 0); - while (state.KeepRunning()) + bench.batch(in.size()).unit("byte").run([&] { poly1305_auth(tag.data(), in.data(), in.size(), key.data()); + }); } -static void POLY1305_64BYTES(benchmark::State& state) +static void POLY1305_64BYTES(benchmark::Bench& bench) { - POLY1305(state, BUFFER_SIZE_TINY); + POLY1305(bench, BUFFER_SIZE_TINY); } -static void POLY1305_256BYTES(benchmark::State& state) +static void POLY1305_256BYTES(benchmark::Bench& bench) { - POLY1305(state, BUFFER_SIZE_SMALL); + POLY1305(bench, BUFFER_SIZE_SMALL); } -static void POLY1305_1MB(benchmark::State& state) +static void POLY1305_1MB(benchmark::Bench& bench) { - POLY1305(state, BUFFER_SIZE_LARGE); + POLY1305(bench, BUFFER_SIZE_LARGE); } -BENCHMARK(POLY1305_64BYTES, 500000); -BENCHMARK(POLY1305_256BYTES, 250000); -BENCHMARK(POLY1305_1MB, 340); +BENCHMARK(POLY1305_64BYTES); +BENCHMARK(POLY1305_256BYTES); +BENCHMARK(POLY1305_1MB); diff --git a/src/bench/prevector.cpp b/src/bench/prevector.cpp index 00e5d7e7a0..73af244ce0 100644 --- a/src/bench/prevector.cpp +++ b/src/bench/prevector.cpp @@ -9,74 +9,57 @@ #include -// GCC 4.8 is missing some C++11 type_traits, -// https://www.gnu.org/software/gcc/gcc-5/changes.html -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 5 -#define IS_TRIVIALLY_CONSTRUCTIBLE std::has_trivial_default_constructor -#else -#define IS_TRIVIALLY_CONSTRUCTIBLE std::is_trivially_default_constructible -#endif - struct nontrivial_t { int x; nontrivial_t() :x(-1) {} - ADD_SERIALIZE_METHODS - template - inline void SerializationOp(Stream& s, Operation ser_action) {READWRITE(x);} + SERIALIZE_METHODS(nontrivial_t, obj) { READWRITE(obj.x); } }; -static_assert(!IS_TRIVIALLY_CONSTRUCTIBLE::value, +static_assert(!std::is_trivially_default_constructible::value, "expected nontrivial_t to not be trivially constructible"); typedef unsigned char trivial_t; -static_assert(IS_TRIVIALLY_CONSTRUCTIBLE::value, +static_assert(std::is_trivially_default_constructible::value, "expected trivial_t to be trivially constructible"); template -static void PrevectorDestructor(benchmark::State& state) +static void PrevectorDestructor(benchmark::Bench& bench) { - while (state.KeepRunning()) { - for (auto x = 0; x < 1000; ++x) { - prevector<28, T> t0; - prevector<28, T> t1; - t0.resize(28); - t1.resize(29); - } - } + bench.batch(2).run([&] { + prevector<28, T> t0; + prevector<28, T> t1; + t0.resize(28); + t1.resize(29); + }); } template -static void PrevectorClear(benchmark::State& state) +static void PrevectorClear(benchmark::Bench& bench) { - - while (state.KeepRunning()) { - for (auto x = 0; x < 1000; ++x) { - prevector<28, T> t0; - prevector<28, T> t1; - t0.resize(28); - t0.clear(); - t1.resize(29); - t1.clear(); - } - } + prevector<28, T> t0; + prevector<28, T> t1; + bench.batch(2).run([&] { + t0.resize(28); + t0.clear(); + t1.resize(29); + t1.clear(); + }); } template -static void PrevectorResize(benchmark::State& state) +static void PrevectorResize(benchmark::Bench& bench) { - while (state.KeepRunning()) { - prevector<28, T> t0; - prevector<28, T> t1; - for (auto x = 0; x < 1000; ++x) { - t0.resize(28); - t0.resize(0); - t1.resize(29); - t1.resize(0); - } - } + prevector<28, T> t0; + prevector<28, T> t1; + bench.batch(4).run([&] { + t0.resize(28); + t0.resize(0); + t1.resize(29); + t1.resize(0); + }); } template -static void PrevectorDeserialize(benchmark::State& state) +static void PrevectorDeserialize(benchmark::Bench& bench) { CDataStream s0(SER_NETWORK, 0); prevector<28, T> t0; @@ -88,26 +71,28 @@ static void PrevectorDeserialize(benchmark::State& state) for (auto x = 0; x < 101; ++x) { s0 << t0; } - while (state.KeepRunning()) { + bench.batch(1000).run([&] { prevector<28, T> t1; for (auto x = 0; x < 1000; ++x) { s0 >> t1; } s0.Init(SER_NETWORK, 0); - } + }); } -#define PREVECTOR_TEST(name, nontrivops, trivops) \ - static void Prevector ## name ## Nontrivial(benchmark::State& state) { \ - Prevector ## name(state); \ - } \ - BENCHMARK(Prevector ## name ## Nontrivial, nontrivops); \ - static void Prevector ## name ## Trivial(benchmark::State& state) { \ - Prevector ## name(state); \ - } \ - BENCHMARK(Prevector ## name ## Trivial, trivops); +#define PREVECTOR_TEST(name) \ + static void Prevector##name##Nontrivial(benchmark::Bench& bench) \ + { \ + Prevector##name(bench); \ + } \ + BENCHMARK(Prevector##name##Nontrivial); \ + static void Prevector##name##Trivial(benchmark::Bench& bench) \ + { \ + Prevector##name(bench); \ + } \ + BENCHMARK(Prevector##name##Trivial); -PREVECTOR_TEST(Clear, 28300, 88600) -PREVECTOR_TEST(Destructor, 28800, 88900) -PREVECTOR_TEST(Resize, 28900, 90300) -PREVECTOR_TEST(Deserialize, 6800, 52000) +PREVECTOR_TEST(Clear) +PREVECTOR_TEST(Destructor) +PREVECTOR_TEST(Resize) +PREVECTOR_TEST(Deserialize) diff --git a/src/bench/rollingbloom.cpp b/src/bench/rollingbloom.cpp index cffdb388f8..9b43951e6e 100644 --- a/src/bench/rollingbloom.cpp +++ b/src/bench/rollingbloom.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2018 The Bitcoin Core developers +// Copyright (c) 2016-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. @@ -6,12 +6,12 @@ #include #include -static void RollingBloom(benchmark::State& state) +static void RollingBloom(benchmark::Bench& bench) { CRollingBloomFilter filter(120000, 0.000001); std::vector data(32); uint32_t count = 0; - while (state.KeepRunning()) { + bench.run([&] { count++; data[0] = count; data[1] = count >> 8; @@ -24,16 +24,16 @@ static void RollingBloom(benchmark::State& state) data[2] = count >> 8; data[3] = count; filter.contains(data); - } + }); } -static void RollingBloomReset(benchmark::State& state) +static void RollingBloomReset(benchmark::Bench& bench) { CRollingBloomFilter filter(120000, 0.000001); - while (state.KeepRunning()) { + bench.run([&] { filter.reset(); - } + }); } -BENCHMARK(RollingBloom, 1500 * 1000); -BENCHMARK(RollingBloomReset, 20000); +BENCHMARK(RollingBloom); +BENCHMARK(RollingBloomReset); diff --git a/src/bench/rpc_blockchain.cpp b/src/bench/rpc_blockchain.cpp index 2fc6f116a4..4b45264a3c 100644 --- a/src/bench/rpc_blockchain.cpp +++ b/src/bench/rpc_blockchain.cpp @@ -1,17 +1,18 @@ -// Copyright (c) 2016-2019 The Bitcoin Core developers +// Copyright (c) 2016-2020 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include #include -#include -#include #include +#include +#include #include -static void BlockToJsonVerbose(benchmark::State& state) { +static void BlockToJsonVerbose(benchmark::Bench& bench) +{ CDataStream stream(benchmark::data::block413567, SER_NETWORK, PROTOCOL_VERSION); char a = '\0'; stream.write(&a, 1); // Prevent compaction @@ -24,9 +25,9 @@ static void BlockToJsonVerbose(benchmark::State& state) { blockindex.phashBlock = &blockHash; blockindex.nBits = 403014710; - while (state.KeepRunning()) { + bench.run([&] { (void)blockToJSON(block, &blockindex, &blockindex, /*verbose*/ true); - } + }); } -BENCHMARK(BlockToJsonVerbose, 10); +BENCHMARK(BlockToJsonVerbose); diff --git a/src/bench/rpc_mempool.cpp b/src/bench/rpc_mempool.cpp index bf63cccf09..1ff41765cf 100644 --- a/src/bench/rpc_mempool.cpp +++ b/src/bench/rpc_mempool.cpp @@ -15,7 +15,7 @@ static void AddTx(const CTransactionRef& tx, const CAmount& fee, CTxMemPool& poo pool.addUnchecked(CTxMemPoolEntry(tx, fee, /* time */ 0, /* height */ 1, /* spendsCoinbase */ false, /* sigOpCost */ 4, lp)); } -static void RpcMempool(benchmark::State& state) +static void RpcMempool(benchmark::Bench& bench) { CTxMemPool pool; LOCK2(cs_main, pool.cs); @@ -32,9 +32,9 @@ static void RpcMempool(benchmark::State& state) AddTx(tx_r, /* fee */ i, pool); } - while (state.KeepRunning()) { + bench.run([&] { (void)MempoolToJSON(pool, /*verbose*/ true); - } + }); } -BENCHMARK(RpcMempool, 40); +BENCHMARK(RpcMempool); diff --git a/src/bench/util_time.cpp b/src/bench/util_time.cpp index 72d97354aa..fad179eb87 100644 --- a/src/bench/util_time.cpp +++ b/src/bench/util_time.cpp @@ -6,37 +6,37 @@ #include -static void BenchTimeDeprecated(benchmark::State& state) +static void BenchTimeDeprecated(benchmark::Bench& bench) { - while (state.KeepRunning()) { + bench.run([&] { (void)GetTime(); - } + }); } -static void BenchTimeMock(benchmark::State& state) +static void BenchTimeMock(benchmark::Bench& bench) { SetMockTime(111); - while (state.KeepRunning()) { + bench.run([&] { (void)GetTime(); - } + }); SetMockTime(0); } -static void BenchTimeMillis(benchmark::State& state) +static void BenchTimeMillis(benchmark::Bench& bench) { - while (state.KeepRunning()) { + bench.run([&] { (void)GetTime(); - } + }); } -static void BenchTimeMillisSys(benchmark::State& state) +static void BenchTimeMillisSys(benchmark::Bench& bench) { - while (state.KeepRunning()) { + bench.run([&] { (void)GetTimeMillis(); - } + }); } -BENCHMARK(BenchTimeDeprecated, 100000000); -BENCHMARK(BenchTimeMillis, 6000000); -BENCHMARK(BenchTimeMillisSys, 6000000); -BENCHMARK(BenchTimeMock, 300000000); +BENCHMARK(BenchTimeDeprecated); +BENCHMARK(BenchTimeMillis); +BENCHMARK(BenchTimeMillisSys); +BENCHMARK(BenchTimeMock); diff --git a/src/bench/verify_script.cpp b/src/bench/verify_script.cpp index 9411215cac..b1e1403892 100644 --- a/src/bench/verify_script.cpp +++ b/src/bench/verify_script.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2018 The Bitcoin Core developers +// Copyright (c) 2016-2020 The BGL Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -16,8 +16,11 @@ // Microbenchmark for verification of a basic P2WPKH script. Can be easily // modified to measure performance of other types of scripts. -static void VerifyScriptBench(benchmark::State& state) +static void VerifyScriptBench(benchmark::Bench& bench) { + const ECCVerifyHandle verify_handle; + ECC_Start(); + const int flags = SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH; const int witnessversion = 0; @@ -31,7 +34,7 @@ static void VerifyScriptBench(benchmark::State& state) key.Set(vchKey.begin(), vchKey.end(), false); CPubKey pubkey = key.GetPubKey(); uint160 pubkeyHash; - CHash160().Write(pubkey.begin(), pubkey.size()).Finalize(pubkeyHash.begin()); + CHash160().Write(pubkey).Finalize(pubkeyHash); // Script. CScript scriptPubKey = CScript() << witnessversion << ToByteVector(pubkeyHash); @@ -46,7 +49,7 @@ static void VerifyScriptBench(benchmark::State& state) witness.stack.push_back(ToByteVector(pubkey)); // Benchmark. - while (state.KeepRunning()) { + bench.run([&] { ScriptError err; bool success = VerifyScript( txSpend.vin[0].scriptSig, @@ -68,7 +71,30 @@ static void VerifyScriptBench(benchmark::State& state) (const unsigned char*)stream.data(), stream.size(), 0, flags, nullptr); assert(csuccess == 1); #endif + }); + ECC_Stop(); +} + +static void VerifyNestedIfScript(benchmark::Bench& bench) +{ + std::vector> stack; + CScript script; + for (int i = 0; i < 100; ++i) { + script << OP_1 << OP_IF; + } + for (int i = 0; i < 1000; ++i) { + script << OP_1; + } + for (int i = 0; i < 100; ++i) { + script << OP_ENDIF; } + bench.run([&] { + auto stack_copy = stack; + ScriptError error; + bool ret = EvalScript(stack_copy, script, 0, BaseSignatureChecker(), SigVersion::BASE, &error); + assert(ret); + }); } -BENCHMARK(VerifyScriptBench, 6300); +BENCHMARK(VerifyScriptBench); +BENCHMARK(VerifyNestedIfScript); diff --git a/src/bench/wallet_balance.cpp b/src/bench/wallet_balance.cpp index f39dcc0b71..b3b73284d8 100644 --- a/src/bench/wallet_balance.cpp +++ b/src/bench/wallet_balance.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 The Bitcoin Core developers +// Copyright (c) 2012-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. @@ -7,49 +7,58 @@ #include #include #include +#include #include #include #include -static void WalletBalance(benchmark::State& state, const bool set_dirty, const bool add_watchonly, const bool add_mine) +static void WalletBalance(benchmark::Bench& bench, const bool set_dirty, const bool add_watchonly, const bool add_mine) { + TestingSetup test_setup{ + CBaseChainParams::REGTEST, + /* extra_args */ { + "-nodebuglogfile", + "-nodebug", + }, + }; + const auto& ADDRESS_WATCHONLY = ADDRESS_BCRT1_UNSPENDABLE; NodeContext node; std::unique_ptr chain = interfaces::MakeChain(node); - CWallet wallet{chain.get(), WalletLocation(), WalletDatabase::CreateMock()}; + CWallet wallet{chain.get(), "", CreateMockWalletDatabase()}; { + wallet.SetupLegacyScriptPubKeyMan(); bool first_run; if (wallet.LoadWallet(first_run) != DBErrors::LOAD_OK) assert(false); - wallet.handleNotifications(); } - + auto handler = chain->handleNotifications({&wallet, [](CWallet*) {}}); const Optional address_mine{add_mine ? Optional{getnewaddress(wallet)} : nullopt}; if (add_watchonly) importaddress(wallet, ADDRESS_WATCHONLY); for (int i = 0; i < 100; ++i) { - generatetoaddress(address_mine.get_value_or(ADDRESS_WATCHONLY)); - generatetoaddress(ADDRESS_WATCHONLY); + generatetoaddress(test_setup.m_node, address_mine.get_value_or(ADDRESS_WATCHONLY)); + generatetoaddress(test_setup.m_node, ADDRESS_WATCHONLY); } SyncWithValidationInterfaceQueue(); auto bal = wallet.GetBalance(); // Cache - while (state.KeepRunning()) { + bench.run([&] { if (set_dirty) wallet.MarkDirty(); bal = wallet.GetBalance(); if (add_mine) assert(bal.m_mine_trusted > 0); if (add_watchonly) assert(bal.m_watchonly_trusted > 0); - } + }); } -static void WalletBalanceDirty(benchmark::State& state) { WalletBalance(state, /* set_dirty */ true, /* add_watchonly */ true, /* add_mine */ true); } -static void WalletBalanceClean(benchmark::State& state) { WalletBalance(state, /* set_dirty */ false, /* add_watchonly */ true, /* add_mine */ true); } -static void WalletBalanceMine(benchmark::State& state) { WalletBalance(state, /* set_dirty */ false, /* add_watchonly */ false, /* add_mine */ true); } -static void WalletBalanceWatch(benchmark::State& state) { WalletBalance(state, /* set_dirty */ false, /* add_watchonly */ true, /* add_mine */ false); } +static void WalletBalanceDirty(benchmark::Bench& bench) { WalletBalance(bench, /* set_dirty */ true, /* add_watchonly */ true, /* add_mine */ true); } +static void WalletBalanceClean(benchmark::Bench& bench) { WalletBalance(bench, /* set_dirty */ false, /* add_watchonly */ true, /* add_mine */ true); } +static void WalletBalanceMine(benchmark::Bench& bench) { WalletBalance(bench, /* set_dirty */ false, /* add_watchonly */ false, /* add_mine */ true); } +static void WalletBalanceWatch(benchmark::Bench& bench) { WalletBalance(bench, /* set_dirty */ false, /* add_watchonly */ true, /* add_mine */ false); } -BENCHMARK(WalletBalanceDirty, 2500); -BENCHMARK(WalletBalanceClean, 8000); -BENCHMARK(WalletBalanceMine, 16000); -BENCHMARK(WalletBalanceWatch, 8000); +BENCHMARK(WalletBalanceDirty); +BENCHMARK(WalletBalanceClean); +BENCHMARK(WalletBalanceMine); +BENCHMARK(WalletBalanceWatch); diff --git a/src/bench_schnorrsig.c b/src/bench_schnorrsig.c new file mode 100644 index 0000000000..315f5af28e --- /dev/null +++ b/src/bench_schnorrsig.c @@ -0,0 +1,102 @@ +/********************************************************************** + * Copyright (c) 2018-2020 Andrew Poelstra, Jonas Nick * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#include +#include + + +#include "include/secp256k1.h" +#include "include/secp256k1_schnorrsig.h" +#include "util.h" +#include "bench.h" + +typedef struct { + secp256k1_context *ctx; + int n; + + const secp256k1_keypair **keypairs; + const unsigned char **pk; + const unsigned char **sigs; + const unsigned char **msgs; +} bench_schnorrsig_data; + +void bench_schnorrsig_sign(void* arg, int iters) { + bench_schnorrsig_data *data = (bench_schnorrsig_data *)arg; + int i; + unsigned char msg[32] = "benchmarkexamplemessagetemplate"; + unsigned char sig[64]; + + for (i = 0; i < iters; i++) { + msg[0] = i; + msg[1] = i >> 8; + CHECK(secp256k1_schnorrsig_sign(data->ctx, sig, msg, data->keypairs[i], NULL, NULL)); + } +} + +void bench_schnorrsig_verify(void* arg, int iters) { + bench_schnorrsig_data *data = (bench_schnorrsig_data *)arg; + int i; + + for (i = 0; i < iters; i++) { + secp256k1_xonly_pubkey pk; + CHECK(secp256k1_xonly_pubkey_parse(data->ctx, &pk, data->pk[i]) == 1); + CHECK(secp256k1_schnorrsig_verify(data->ctx, data->sigs[i], data->msgs[i], &pk)); + } +} + +int main(void) { + int i; + bench_schnorrsig_data data; + int iters = get_iters(10000); + + data.ctx = secp256k1_context_create(SECP256K1_CONTEXT_VERIFY | SECP256K1_CONTEXT_SIGN); + data.keypairs = (const secp256k1_keypair **)malloc(iters * sizeof(secp256k1_keypair *)); + data.pk = (const unsigned char **)malloc(iters * sizeof(unsigned char *)); + data.msgs = (const unsigned char **)malloc(iters * sizeof(unsigned char *)); + data.sigs = (const unsigned char **)malloc(iters * sizeof(unsigned char *)); + + for (i = 0; i < iters; i++) { + unsigned char sk[32]; + unsigned char *msg = (unsigned char *)malloc(32); + unsigned char *sig = (unsigned char *)malloc(64); + secp256k1_keypair *keypair = (secp256k1_keypair *)malloc(sizeof(*keypair)); + unsigned char *pk_char = (unsigned char *)malloc(32); + secp256k1_xonly_pubkey pk; + msg[0] = sk[0] = i; + msg[1] = sk[1] = i >> 8; + msg[2] = sk[2] = i >> 16; + msg[3] = sk[3] = i >> 24; + memset(&msg[4], 'm', 28); + memset(&sk[4], 's', 28); + + data.keypairs[i] = keypair; + data.pk[i] = pk_char; + data.msgs[i] = msg; + data.sigs[i] = sig; + + CHECK(secp256k1_keypair_create(data.ctx, keypair, sk)); + CHECK(secp256k1_schnorrsig_sign(data.ctx, sig, msg, keypair, NULL, NULL)); + CHECK(secp256k1_keypair_xonly_pub(data.ctx, &pk, NULL, keypair)); + CHECK(secp256k1_xonly_pubkey_serialize(data.ctx, pk_char, &pk) == 1); + } + + run_benchmark("schnorrsig_sign", bench_schnorrsig_sign, NULL, NULL, (void *) &data, 10, iters); + run_benchmark("schnorrsig_verify", bench_schnorrsig_verify, NULL, NULL, (void *) &data, 10, iters); + + for (i = 0; i < iters; i++) { + free((void *)data.keypairs[i]); + free((void *)data.pk[i]); + free((void *)data.msgs[i]); + free((void *)data.sigs[i]); + } + free(data.keypairs); + free(data.pk); + free(data.msgs); + free(data.sigs); + + secp256k1_context_destroy(data.ctx); + return 0; +} diff --git a/src/blockencodings.cpp b/src/blockencodings.cpp index bf13297582..a47709cd82 100644 --- a/src/blockencodings.cpp +++ b/src/blockencodings.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2018 The Bitcoin Core developers +// Copyright (c) 2016-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. @@ -105,13 +105,12 @@ ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& c std::vector have_txn(txn_available.size()); { LOCK(pool->cs); - const std::vector >& vTxHashes = pool->vTxHashes; - for (size_t i = 0; i < vTxHashes.size(); i++) { - uint64_t shortid = cmpctblock.GetShortID(vTxHashes[i].first); + for (size_t i = 0; i < pool->vTxHashes.size(); i++) { + uint64_t shortid = cmpctblock.GetShortID(pool->vTxHashes[i].first); std::unordered_map::iterator idit = shorttxids.find(shortid); if (idit != shorttxids.end()) { if (!have_txn[idit->second]) { - txn_available[idit->second] = vTxHashes[i].second->GetSharedTx(); + txn_available[idit->second] = pool->vTxHashes[i].second->GetSharedTx(); have_txn[idit->second] = true; mempool_count++; } else { diff --git a/src/blockencodings.h b/src/blockencodings.h index cd00e0a8d2..e573fd789a 100644 --- a/src/blockencodings.h +++ b/src/blockencodings.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2018 The Bitcoin Core developers +// Copyright (c) 2016-2020 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -10,18 +10,29 @@ class CTxMemPool; -// Dumb helper to handle CTransaction compression at serialize-time -struct TransactionCompressor { -private: - CTransactionRef& tx; -public: - explicit TransactionCompressor(CTransactionRef& txIn) : tx(txIn) {} +// Transaction compression schemes for compact block relay can be introduced by writing +// an actual formatter here. +using TransactionCompression = DefaultFormatter; - ADD_SERIALIZE_METHODS; +class DifferenceFormatter +{ + uint64_t m_shift = 0; - template - inline void SerializationOp(Stream& s, Operation ser_action) { - READWRITE(tx); //TODO: Compress tx encoding +public: + template + void Ser(Stream& s, I v) + { + if (v < m_shift || v >= std::numeric_limits::max()) throw std::ios_base::failure("differential value overflow"); + WriteCompactSize(s, v - m_shift); + m_shift = uint64_t(v) + 1; + } + template + void Unser(Stream& s, I& v) + { + uint64_t n = ReadCompactSize(s); + m_shift += n; + if (m_shift < n || m_shift >= std::numeric_limits::max() || m_shift < std::numeric_limits::min() || m_shift > std::numeric_limits::max()) throw std::ios_base::failure("differential value overflow"); + v = I(m_shift++); } }; @@ -31,39 +42,9 @@ class BlockTransactionsRequest { uint256 blockhash; std::vector indexes; - ADD_SERIALIZE_METHODS; - - template - inline void SerializationOp(Stream& s, Operation ser_action) { - READWRITE(blockhash); - uint64_t indexes_size = (uint64_t)indexes.size(); - READWRITE(COMPACTSIZE(indexes_size)); - if (ser_action.ForRead()) { - size_t i = 0; - while (indexes.size() < indexes_size) { - indexes.resize(std::min((uint64_t)(1000 + indexes.size()), indexes_size)); - for (; i < indexes.size(); i++) { - uint64_t index = 0; - READWRITE(COMPACTSIZE(index)); - if (index > std::numeric_limits::max()) - throw std::ios_base::failure("index overflowed 16 bits"); - indexes[i] = index; - } - } - - int32_t offset = 0; - for (size_t j = 0; j < indexes.size(); j++) { - if (int32_t(indexes[j]) + offset > std::numeric_limits::max()) - throw std::ios_base::failure("indexes overflowed 16 bits"); - indexes[j] = indexes[j] + offset; - offset = int32_t(indexes[j]) + 1; - } - } else { - for (size_t i = 0; i < indexes.size(); i++) { - uint64_t index = indexes[i] - (i == 0 ? 0 : (indexes[i - 1] + 1)); - READWRITE(COMPACTSIZE(index)); - } - } + SERIALIZE_METHODS(BlockTransactionsRequest, obj) + { + READWRITE(obj.blockhash, Using>(obj.indexes)); } }; @@ -77,24 +58,9 @@ class BlockTransactions { explicit BlockTransactions(const BlockTransactionsRequest& req) : blockhash(req.blockhash), txn(req.indexes.size()) {} - ADD_SERIALIZE_METHODS; - - template - inline void SerializationOp(Stream& s, Operation ser_action) { - READWRITE(blockhash); - uint64_t txn_size = (uint64_t)txn.size(); - READWRITE(COMPACTSIZE(txn_size)); - if (ser_action.ForRead()) { - size_t i = 0; - while (txn.size() < txn_size) { - txn.resize(std::min((uint64_t)(1000 + txn.size()), txn_size)); - for (; i < txn.size(); i++) - READWRITE(TransactionCompressor(txn[i])); - } - } else { - for (size_t i = 0; i < txn.size(); i++) - READWRITE(TransactionCompressor(txn[i])); - } + SERIALIZE_METHODS(BlockTransactions, obj) + { + READWRITE(obj.blockhash, Using>(obj.txn)); } }; @@ -105,17 +71,7 @@ struct PrefilledTransaction { uint16_t index; CTransactionRef tx; - ADD_SERIALIZE_METHODS; - - template - inline void SerializationOp(Stream& s, Operation ser_action) { - uint64_t idx = index; - READWRITE(COMPACTSIZE(idx)); - if (idx > std::numeric_limits::max()) - throw std::ios_base::failure("index overflowed 16-bits"); - index = idx; - READWRITE(TransactionCompressor(tx)); - } + SERIALIZE_METHODS(PrefilledTransaction, obj) { READWRITE(COMPACTSIZE(obj.index), Using(obj.tx)); } }; typedef enum ReadStatus_t @@ -136,12 +92,13 @@ class CBlockHeaderAndShortTxIDs { friend class PartiallyDownloadedBlock; - static const int SHORTTXIDS_LENGTH = 6; protected: std::vector shorttxids; std::vector prefilledtxn; public: + static constexpr int SHORTTXIDS_LENGTH = 6; + CBlockHeader header; // Dummy for deserialization @@ -153,43 +110,15 @@ class CBlockHeaderAndShortTxIDs { size_t BlockTxCount() const { return shorttxids.size() + prefilledtxn.size(); } - ADD_SERIALIZE_METHODS; - - template - inline void SerializationOp(Stream& s, Operation ser_action) { - READWRITE(header); - READWRITE(nonce); - - uint64_t shorttxids_size = (uint64_t)shorttxids.size(); - READWRITE(COMPACTSIZE(shorttxids_size)); + SERIALIZE_METHODS(CBlockHeaderAndShortTxIDs, obj) + { + READWRITE(obj.header, obj.nonce, Using>>(obj.shorttxids), obj.prefilledtxn); if (ser_action.ForRead()) { - size_t i = 0; - while (shorttxids.size() < shorttxids_size) { - shorttxids.resize(std::min((uint64_t)(1000 + shorttxids.size()), shorttxids_size)); - for (; i < shorttxids.size(); i++) { - uint32_t lsb = 0; uint16_t msb = 0; - READWRITE(lsb); - READWRITE(msb); - shorttxids[i] = (uint64_t(msb) << 32) | uint64_t(lsb); - static_assert(SHORTTXIDS_LENGTH == 6, "shorttxids serialization assumes 6-byte shorttxids"); - } - } - } else { - for (size_t i = 0; i < shorttxids.size(); i++) { - uint32_t lsb = shorttxids[i] & 0xffffffff; - uint16_t msb = (shorttxids[i] >> 32) & 0xffff; - READWRITE(lsb); - READWRITE(msb); + if (obj.BlockTxCount() > std::numeric_limits::max()) { + throw std::ios_base::failure("indexes overflowed 16 bits"); } + obj.FillShortTxIDSelector(); } - - READWRITE(prefilledtxn); - - if (BlockTxCount() > std::numeric_limits::max()) - throw std::ios_base::failure("indexes overflowed 16 bits"); - - if (ser_action.ForRead()) - FillShortTxIDSelector(); } }; @@ -197,7 +126,7 @@ class PartiallyDownloadedBlock { protected: std::vector txn_available; size_t prefilled_count = 0, mempool_count = 0, extra_count = 0; - CTxMemPool* pool; + const CTxMemPool* pool; public: CBlockHeader header; explicit PartiallyDownloadedBlock(CTxMemPool* poolIn) : pool(poolIn) {} diff --git a/src/blockfilter.cpp b/src/blockfilter.cpp index 5ad22d46eb..9a6fb4abd0 100644 --- a/src/blockfilter.cpp +++ b/src/blockfilter.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018 The Bitcoin Core developers +// Copyright (c) 2018-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -12,6 +12,7 @@ #include #include