Skip to content

Commit

Permalink
Merge pull request #865 from qtumproject/time/core0.20
Browse files Browse the repository at this point in the history
Port Qtum to Bitcoin core 0.20.1
  • Loading branch information
qtum-neil authored Oct 13, 2020
2 parents 34fd05c + 5082a42 commit b247f55
Show file tree
Hide file tree
Showing 1,236 changed files with 73,474 additions and 32,077 deletions.
71 changes: 23 additions & 48 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,81 +5,56 @@ 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_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_COMMIT_ID: 'f3f329a048eaff759c1992c458f2e12351486bc7'
install:
- cmd: pip install --quiet git+https://github.com/frerich/[email protected]
# 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,
# a. Checkout the vcpkg source (including port files) for the specific checkout and build the vcpkg binary,
# b. Install the missing packages.
- 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
Write-Host "vcpkg installing packages: $env:PACKAGES"
cd c:\tools\vcpkg
$env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead.
git pull origin master > $null
git -c advice.detachedHead=false checkout $env:VCPKG_COMMIT_ID
.\bootstrap-vcpkg.bat > $null
Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)"
.\vcpkg install --triplet $env:PLATFORM-windows-static $env:PACKAGES.split() > $null
Write-Host "vcpkg packages installed successfully."
.\vcpkg integrate install
cd "$env:APPVEYOR_BUILD_FOLDER"
before_build:
- 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\bitcoin.sln /m /v:q /nologo
- cmd: msbuild /p:TrackFileAccess=false build_msvc\bitcoin.sln /m /v:q /nologo
after_build:
- ps: fsutil behavior set disablelastaccess 1 # Disable Access time feature on Windows (better performance)
- ps: clcache -z
#- 7z a bitcoin-%APPVEYOR_BUILD_VERSION%.zip %APPVEYOR_BUILD_FOLDER%\build_msvc\%platform%\%configuration%\*.exe
test_script:
- cmd: src\test_bitcoin.exe -k stdout -e stdout 2> NUL
- cmd: src\test_bitcoin.exe -l test_suite
- cmd: src\bench_bitcoin.exe -evals=1 -scaling=0 > NUL
- ps: python test\util\bitcoin-util-test.py
- cmd: python test\util\rpcauth-test.py
Expand Down
34 changes: 1 addition & 33 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
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 openssl 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:
Expand All @@ -37,16 +7,14 @@ task:
timeout_in: 60m
env:
MAKEJOBS: "-j9"
RUN_CI_ON_HOST: "1"
DANGER_RUN_CI_ON_HOST: "1"
TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache
CCACHE_SIZE: "200M"
CCACHE_DIR: "/tmp/ccache_dir"
ccache_cache:
folder: "/tmp/ccache_dir"
depends_built_cache:
folder: "/tmp/cirrus-ci-build/depends/built"
depends_sdk_cache:
folder: "/tmp/cirrus-ci-build/depends/sdk-sources"
install_script:
- apt-get update
- apt-get -y install git bash ccache
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug report
about: Create a report to help us improve
about: Create a report to help us improve (use this for suspected bugs only, if not sure, open a regular issue below)
title: ''
labels: Bug
assignees: ''
Expand Down
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/good_first_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Good first issue
about: '(Regular devs only): Suggest a new good first issue'
title: ''
labels: good first issue
assignees: ''

---


#### Useful skills:

<!-- (For example, “C++11 std::thread”, “Qt5 GUI and async GUI design” or “basic understanding of Bitcoin mining and the Bitcoin Core RPC interface”.) -->

#### Want to work on this issue?

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.

You do not need to request permission to start working on this. You are encouraged to comment on the issue 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.

For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ src/bitcoind
src/bitcoin-cli
src/bitcoin-tx
src/bitcoin-wallet
src/test/fuzz
!src/test/fuzz/*.*
src/test/test_bitcoin
src/test/test_bitcoin_fuzzy
src/qt/test/test_bitcoin-qt

# autoreconf
Expand All @@ -28,6 +29,7 @@ build-aux/m4/ltversion.m4
build-aux/missing
build-aux/compile
build-aux/test-driver
config.cache
config.log
config.status
configure
Expand Down Expand Up @@ -88,7 +90,7 @@ src/qt/bitcoin-qt.includes
*.qm
Makefile
!depends/Makefile
bitcoin-qt
src/qt/bitcoin-qt
Bitcoin-Qt.app
background.tiff*

Expand All @@ -106,6 +108,9 @@ qrc_*.cpp
.DS_Store
build

# Previous releases
releases

#lcov
*.gcno
*.gcda
Expand Down
93 changes: 61 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,29 @@
# [1] https://docs.travis-ci.com/user/caching/#build-phases
# [2] https://docs.travis-ci.com/user/customizing-the-build#build-timeouts

version: ~> 1.0

dist: xenial
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
- $TRAVIS_BUILD_DIR/releases/$HOST
before_cache:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
stages:
- lint
- test
- extended-lint
env:
global:
- CI_RETRY_EXE="travis_retry"
- CACHE_ERR_MSG="Error! Initial build successful, but not enough time remains to run later build stages and tests. Please manually re-run this job by using the travis restart button or asking a bitcoin maintainer to restart. The next run should not time out because the build cache has been saved."
- 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
Expand Down Expand Up @@ -75,66 +81,89 @@ jobs:
script:
- set -o errexit; source ./ci/lint/06_script.sh

- stage: extended-lint
name: 'extended lint [runtime >= 60 seconds]'
env:
cache: false
language: python
python: '3.5'
install:
- set -o errexit; source ./ci/extended_lint/04_install.sh
before_script:
- set -o errexit; source ./ci/lint/05_before_script.sh
script:
- set -o errexit; source ./ci/extended_lint/06_script.sh

- stage: test
name: 'ARM [GOAL: install] [no unit or functional tests]'
name: 'ARM [GOAL: install] [buster] [unit tests, functional tests]'
arch: arm64 # Can disable QEMU_USER_CMD and run the tests natively without qemu
env: >-
FILE_ENV="./ci/test/00_setup_env_arm.sh"
QEMU_USER_CMD=""
- stage: test
name: 'Win64 [GOAL: deploy] [no gui or functional tests]'
env: >-
FILE_ENV="./ci/test/00_setup_env_win64.sh"
# s390 build was disabled temporarily because of disk space issues on the Travis VM
#
# - stage: test
# name: 'S390x [GOAL: install] [buster] [unit tests, functional tests]'
# arch: s390x # Can disable QEMU_USER_CMD and run the tests natively without qemu
# env: >-
# FILE_ENV="./ci/test/00_setup_env_s390x.sh"
# QEMU_USER_CMD=""

- stage: test
name: '32-bit + dash [GOAL: install] [GUI: BIP70 enabled]'
name: 'Win64 [GOAL: deploy] [unit tests, no gui, no functional tests]'
env: >-
FILE_ENV="./ci/test/00_setup_env_i686.sh"
FILE_ENV="./ci/test/00_setup_env_win64.sh"
- stage: test
name: 'x86_64 Linux [GOAL: install] [bionic] [uses qt5 dev package instead of depends Qt to speed up build and avoid timeout] [unsigned char]'
name: '32-bit + dash [GOAL: install] [CentOS 7] [gui]'
env: >-
FILE_ENV="./ci/test/00_setup_env_amd64_qt5.sh"
FILE_ENV="./ci/test/00_setup_env_i686_centos.sh"
- stage: test
name: 'x86_64 Linux [GOAL: install] [trusty] [no functional tests, no depends, only system libs]'
name: 'x86_64 Linux [GOAL: install] [bionic] [previous releases, uses qt5 dev package and some depends packages] [unsigned char]'
env: >-
FILE_ENV="./ci/test/00_setup_env_amd64_trusty.sh"
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_amd64_tsan.sh"
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_amd64_asan.sh"
FILE_ENV="./ci/test/00_setup_env_native_asan.sh"
- stage: test
name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: fuzzer,address,undefined]'
name: 'x86_64 Linux [GOAL: install] [focal] [no depends, only system libs, sanitizers: fuzzer,address,undefined]'
env: >-
FILE_ENV="./ci/test/00_setup_env_amd64_fuzz.sh"
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_amd64_nowallet.sh"
FILE_ENV="./ci/test/00_setup_env_native_nowallet.sh"
- stage: test
name: 'macOS 10.10 [GOAL: deploy] [no functional tests]'
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.3.1, macOS 10.14, SDK 10.15
# https://docs.travis-ci.com/user/reference/osx/#macos-version
osx_image: xcode11.3
cache:
directories:
- $TRAVIS_BUILD_DIR/ci/scratch/.ccache
- $TRAVIS_BUILD_DIR/releases/$HOST
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
addons:
homebrew:
packages:
- libtool
- berkeley-db4
- boost
- miniupnpc
- qt
- qrencode
- python3
- ccache
- zeromq
env: >-
DANGER_RUN_CI_ON_HOST=true
CI_USE_APT_INSTALL=no
FILE_ENV="./ci/test/00_setup_env_mac_host.sh"
2 changes: 1 addition & 1 deletion .tx/config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com

[bitcoin.qt-translation-019x]
[bitcoin.qt-translation-020x]
file_filter = src/qt/locale/bitcoin_<lang>.ts
source_file = src/qt/locale/bitcoin_en.ts
source_lang = en
Loading

0 comments on commit b247f55

Please sign in to comment.