aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml80
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--Makefile.am3
-rw-r--r--contrib/README.md10
-rw-r--r--contrib/debian/README.md21
-rw-r--r--contrib/debian/bitcoin-qt.desktop14
-rw-r--r--contrib/debian/bitcoin-qt.install6
-rw-r--r--contrib/debian/bitcoin-qt.lintian-overrides2
-rw-r--r--contrib/debian/bitcoin-qt.manpages1
-rw-r--r--contrib/debian/bitcoin-qt.protocol11
-rw-r--r--contrib/debian/bitcoin-tx.bash-completion1
-rw-r--r--contrib/debian/bitcoin-tx.install1
-rw-r--r--contrib/debian/bitcoin-tx.manpages1
-rw-r--r--contrib/debian/bitcoind.bash-completion2
-rw-r--r--contrib/debian/bitcoind.examples1
-rw-r--r--contrib/debian/bitcoind.install2
-rw-r--r--contrib/debian/bitcoind.lintian-overrides2
-rw-r--r--contrib/debian/bitcoind.manpages2
-rw-r--r--contrib/debian/changelog578
-rw-r--r--contrib/debian/compat1
-rw-r--r--contrib/debian/control70
-rw-r--r--contrib/debian/gbp.conf5
-rw-r--r--contrib/debian/patches/README3
-rw-r--r--contrib/debian/patches/series1
-rwxr-xr-xcontrib/debian/rules23
-rw-r--r--contrib/debian/source/format1
-rw-r--r--contrib/debian/watch5
-rwxr-xr-xcontrib/devtools/security-check.py2
-rwxr-xr-xcontrib/devtools/test-security-check.py16
-rw-r--r--contrib/gitian-descriptors/gitian-linux.yml1
-rw-r--r--contrib/gitian-descriptors/gitian-osx.yml1
-rw-r--r--contrib/gitian-descriptors/gitian-win-signer.yml3
-rw-r--r--contrib/gitian-descriptors/gitian-win.yml1
-rw-r--r--contrib/rpm/README.md185
-rw-r--r--contrib/rpm/bitcoin-0.12.0-libressl.patch24
-rw-r--r--contrib/rpm/bitcoin.fc8
-rw-r--r--contrib/rpm/bitcoin.if157
-rw-r--r--contrib/rpm/bitcoin.spec442
-rw-r--r--contrib/rpm/bitcoin.te81
-rw-r--r--depends/packages/qt.mk4
-rw-r--r--depends/patches/qt/fix_rcc_determinism.patch15
-rw-r--r--doc/bips.md3
-rw-r--r--doc/init.md2
-rw-r--r--doc/release-notes/release-notes-0.16.2.md116
-rw-r--r--share/examples/bitcoin.conf (renamed from contrib/debian/examples/bitcoin.conf)0
-rw-r--r--src/bench/block_assemble.cpp12
-rw-r--r--src/bench/coin_selection.cpp2
-rw-r--r--src/bench/mempool_eviction.cpp3
-rw-r--r--src/bitcoind.cpp2
-rw-r--r--src/chainparams.cpp25
-rw-r--r--src/chainparams.h6
-rw-r--r--src/httpserver.cpp9
-rw-r--r--src/httpserver.h2
-rw-r--r--src/init.cpp8
-rw-r--r--src/interfaces/node.cpp2
-rw-r--r--src/miner.cpp4
-rw-r--r--src/net.cpp3
-rw-r--r--src/net.h2
-rw-r--r--src/netaddress.cpp3
-rw-r--r--src/rpc/server.cpp3
-rw-r--r--src/rpc/server.h2
-rw-r--r--src/scheduler.h17
-rw-r--r--src/script/interpreter.cpp6
-rw-r--r--src/test/blockencodings_tests.cpp6
-rw-r--r--src/test/mempool_tests.cpp7
-rw-r--r--src/test/miner_tests.cpp3
-rw-r--r--src/test/policyestimator_tests.cpp1
-rw-r--r--src/test/scheduler_tests.cpp44
-rw-r--r--src/torcontrol.cpp5
-rw-r--r--src/txdb.cpp3
-rw-r--r--src/txdb.h2
-rw-r--r--src/txmempool.cpp10
-rw-r--r--src/txmempool.h6
-rw-r--r--src/util.cpp10
-rw-r--r--src/validation.cpp8
-rw-r--r--src/validation.h2
-rw-r--r--src/validationinterface.h15
-rw-r--r--src/wallet/wallet.cpp50
-rw-r--r--src/wallet/wallet.h14
-rw-r--r--src/wallet/walletdb.cpp12
-rwxr-xr-xtest/functional/feature_includeconf.py8
-rwxr-xr-xtest/functional/wallet_groups.py26
82 files changed, 434 insertions, 1819 deletions
diff --git a/.travis.yml b/.travis.yml
index d8216bc00d..bdb76220ab 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,24 +27,74 @@ env:
- DOCKER_PACKAGES="build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache"
matrix:
# ARM
- - HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
+ - >-
+ HOST=arm-linux-gnueabihf
+ PACKAGES="g++-arm-linux-gnueabihf"
+ DEP_OPTS="NO_QT=1"
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
# Win32
- - HOST=i686-w64-mingw32 DPKG_ADD_ARCH="i386" DEP_OPTS="NO_QT=1" PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-reduce-exports"
+ - >-
+ HOST=i686-w64-mingw32
+ DPKG_ADD_ARCH="i386"
+ DEP_OPTS="NO_QT=1"
+ PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32"
+ RUN_TESTS=true
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-reduce-exports"
# Win64
- - HOST=x86_64-w64-mingw32 DEP_OPTS="NO_QT=1" PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-reduce-exports"
+ - >-
+ HOST=x86_64-w64-mingw32
+ DEP_OPTS="NO_QT=1"
+ PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64"
+ RUN_TESTS=true
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-reduce-exports"
# 32-bit + dash
- - HOST=i686-pc-linux-gnu PACKAGES="g++-multilib python3-zmq" DEP_OPTS="NO_QT=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++" CONFIG_SHELL="/bin/dash"
+ - >-
+ HOST=i686-pc-linux-gnu
+ PACKAGES="g++-multilib python3-zmq"
+ DEP_OPTS="NO_QT=1"
+ RUN_TESTS=true
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
+ CONFIG_SHELL="/bin/dash"
# x86_64 Linux (uses qt5 dev package instead of depends Qt to speed up build and avoid timeout)
- - HOST=x86_64-unknown-linux-gnu PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --enable-debug CXXFLAGS=\"-g0 -O2\""
+ - >-
+ HOST=x86_64-unknown-linux-gnu
+ PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev"
+ DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1"
+ RUN_TESTS=true
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --enable-debug CXXFLAGS=\"-g0 -O2\""
# x86_64 Linux (Qt5 & system libs)
- - HOST=x86_64-unknown-linux-gnu PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev 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 libprotobuf-dev protobuf-compiler libqrencode-dev" NO_DEPENDS=1 RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --enable-glibc-back-compat --enable-reduce-exports --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER"
+ - >-
+ HOST=x86_64-unknown-linux-gnu
+ PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev 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 libprotobuf-dev protobuf-compiler libqrencode-dev"
+ NO_DEPENDS=1
+ RUN_TESTS=true
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --enable-glibc-back-compat --enable-reduce-exports --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER"
# x86_64 Linux, No wallet
- - HOST=x86_64-unknown-linux-gnu PACKAGES="python3" DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
+ - >-
+ HOST=x86_64-unknown-linux-gnu
+ PACKAGES="python3"
+ DEP_OPTS="NO_WALLET=1"
+ RUN_TESTS=true
+ GOAL="install"
+ BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
# Cross-Mac
- - HOST=x86_64-apple-darwin14 PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git" BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror" OSX_SDK=10.11 GOAL="all deploy"
+ - >-
+ HOST=x86_64-apple-darwin14
+ PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"
+ BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror"
+ OSX_SDK=10.11
+ GOAL="all deploy"
before_install:
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
+ - BEGIN_FOLD () { echo ""; CURRENT_FOLD_NAME=$1; echo "travis_fold:start:${CURRENT_FOLD_NAME}"; }
+ - END_FOLD () { RET=$?; echo "travis_fold:end:${CURRENT_FOLD_NAME}"; return $RET; }
install:
- travis_retry docker pull $DOCKER_NAME_TAG
- env | grep -E '^(CCACHE_|WINEDEBUG|BOOST_TEST_RANDOM|CONFIG_SHELL)' | tee /tmp/env
@@ -66,16 +116,16 @@ script:
- OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
- BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib"
- if [ -z "$NO_DEPENDS" ]; then DOCKER_EXEC ccache --max-size=$CCACHE_SIZE; fi
- - test -n "$CONFIG_SHELL" && DOCKER_EXEC "$CONFIG_SHELL" -c "./autogen.sh" || DOCKER_EXEC ./autogen.sh
+ - BEGIN_FOLD autogen; test -n "$CONFIG_SHELL" && DOCKER_EXEC "$CONFIG_SHELL" -c "./autogen.sh" || DOCKER_EXEC ./autogen.sh; END_FOLD
- mkdir build && cd build
- - DOCKER_EXEC ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
- - DOCKER_EXEC make distdir VERSION=$HOST
+ - BEGIN_FOLD configure; DOCKER_EXEC ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false); END_FOLD
+ - BEGIN_FOLD distdir; DOCKER_EXEC make distdir VERSION=$HOST; END_FOLD
- cd bitcoin-$HOST
- - DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
- - DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false )
- - if [ "$RUN_TESTS" = "true" ]; then DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1; fi
+ - BEGIN_FOLD configure; DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false); END_FOLD
+ - BEGIN_FOLD build; DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false ); END_FOLD
+ - if [ "$RUN_TESTS" = "true" ]; then BEGIN_FOLD unit-tests; DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1; END_FOLD; fi
- if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then extended="--extended --exclude feature_pruning,feature_dbcrash"; fi
- - if [ "$RUN_TESTS" = "true" ]; then DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet --failfast ${extended}; fi
+ - if [ "$RUN_TESTS" = "true" ]; then BEGIN_FOLD functional-tests; DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet --failfast ${extended}; END_FOLD; fi
after_script:
- echo $TRAVIS_COMMIT_RANGE
- echo $TRAVIS_COMMIT_LOG
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3ee5a04796..3d5dc3221b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -119,6 +119,8 @@ 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.
+
Squashing Commits
---------------------------
If your pull request is accepted for merging, you may be asked by a maintainer
diff --git a/Makefile.am b/Makefile.am
index f3f3302fce..10dda65b21 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,8 +42,7 @@ DIST_CONTRIB = $(top_srcdir)/contrib/bitcoin-cli.bash-completion \
$(top_srcdir)/contrib/bitcoin-tx.bash-completion \
$(top_srcdir)/contrib/bitcoind.bash-completion \
$(top_srcdir)/contrib/init \
- $(top_srcdir)/contrib/install_db4.sh \
- $(top_srcdir)/contrib/rpm
+ $(top_srcdir)/contrib/install_db4.sh
DIST_SHARE = \
$(top_srcdir)/share/genbuild.sh \
$(top_srcdir)/share/rpcauth
diff --git a/contrib/README.md b/contrib/README.md
index bcf9186fa1..8915919766 100644
--- a/contrib/README.md
+++ b/contrib/README.md
@@ -21,9 +21,10 @@ Utility to generate the pnSeed[] array that is compiled into the client.
Build Tools and Keys
---------------------
-### [Debian](/contrib/debian) ###
-Contains files used to package bitcoind/bitcoin-qt
-for Debian-based Linux systems. If you compile bitcoind/bitcoin-qt yourself, there are some useful files here.
+### Packaging ###
+The [Debian](/contrib/debian) subfolder contains the copyright file.
+
+All other packaging related files can be found in the [bitcoin-core/packaging](https://github.com/bitcoin-core/packaging) repository.
### [Gitian-descriptors](/contrib/gitian-descriptors) ###
Files used during the gitian build process. For more information about gitian, see the [the Bitcoin Core documentation repository](https://github.com/bitcoin-core/docs).
@@ -34,9 +35,6 @@ PGP keys used for signing Bitcoin Core [Gitian release](/doc/release-process.md)
### [MacDeploy](/contrib/macdeploy) ###
Scripts and notes for Mac builds.
-### [RPM](/contrib/rpm) ###
-RPM spec file for building bitcoin-core on RPM based distributions.
-
### [Gitian-build](/contrib/gitian-build.py) ###
Script for running full Gitian builds.
diff --git a/contrib/debian/README.md b/contrib/debian/README.md
deleted file mode 100644
index fab9cc2381..0000000000
--- a/contrib/debian/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-
-Debian
-====================
-This directory contains files used to package bitcoind/bitcoin-qt
-for Debian-based Linux systems. If you compile bitcoind/bitcoin-qt yourself, there are some useful files here.
-
-## bitcoin: URI support ##
-
-
-bitcoin-qt.desktop (Gnome / Open Desktop)
-To install:
-
- sudo desktop-file-install bitcoin-qt.desktop
- sudo update-desktop-database
-
-If you build yourself, you will either need to modify the paths in
-the .desktop file or copy or symlink your bitcoin-qt binary to `/usr/bin`
-and the `../../share/pixmaps/bitcoin128.png` to `/usr/share/pixmaps`
-
-bitcoin-qt.protocol (KDE)
-
diff --git a/contrib/debian/bitcoin-qt.desktop b/contrib/debian/bitcoin-qt.desktop
deleted file mode 100644
index 8b31222648..0000000000
--- a/contrib/debian/bitcoin-qt.desktop
+++ /dev/null
@@ -1,14 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Name=Bitcoin Core
-Comment=Connect to the Bitcoin P2P Network
-Comment[de]=Verbinde mit dem Bitcoin peer-to-peer Netzwerk
-Comment[fr]=Bitcoin, monnaie virtuelle cryptographique pair à pair
-Comment[tr]=Bitcoin, eşten eşe kriptografik sanal para birimi
-Exec=bitcoin-qt %u
-Terminal=false
-Type=Application
-Icon=bitcoin128
-MimeType=x-scheme-handler/bitcoin;
-Categories=Office;Finance;P2P;Network;Qt;
-StartupWMClass=Bitcoin-qt
diff --git a/contrib/debian/bitcoin-qt.install b/contrib/debian/bitcoin-qt.install
deleted file mode 100644
index e0b32373be..0000000000
--- a/contrib/debian/bitcoin-qt.install
+++ /dev/null
@@ -1,6 +0,0 @@
-usr/local/bin/bitcoin-qt usr/bin
-share/pixmaps/bitcoin32.xpm usr/share/pixmaps
-share/pixmaps/bitcoin16.xpm usr/share/pixmaps
-share/pixmaps/bitcoin128.png usr/share/pixmaps
-debian/bitcoin-qt.desktop usr/share/applications
-debian/bitcoin-qt.protocol usr/share/kde4/services/
diff --git a/contrib/debian/bitcoin-qt.lintian-overrides b/contrib/debian/bitcoin-qt.lintian-overrides
deleted file mode 100644
index 7fb230eca8..0000000000
--- a/contrib/debian/bitcoin-qt.lintian-overrides
+++ /dev/null
@@ -1,2 +0,0 @@
-# Linked code is Expat - only Debian packaging is GPL-2+
-bitcoin-qt: possible-gpl-code-linked-with-openssl
diff --git a/contrib/debian/bitcoin-qt.manpages b/contrib/debian/bitcoin-qt.manpages
deleted file mode 100644
index 9a3cc31c09..0000000000
--- a/contrib/debian/bitcoin-qt.manpages
+++ /dev/null
@@ -1 +0,0 @@
-doc/man/bitcoin-qt.1
diff --git a/contrib/debian/bitcoin-qt.protocol b/contrib/debian/bitcoin-qt.protocol
deleted file mode 100644
index 014588d536..0000000000
--- a/contrib/debian/bitcoin-qt.protocol
+++ /dev/null
@@ -1,11 +0,0 @@
-[Protocol]
-exec=bitcoin-qt '%u'
-protocol=bitcoin
-input=none
-output=none
-helper=true
-listing=
-reading=false
-writing=false
-makedir=false
-deleting=false
diff --git a/contrib/debian/bitcoin-tx.bash-completion b/contrib/debian/bitcoin-tx.bash-completion
deleted file mode 100644
index 7acb0b0aea..0000000000
--- a/contrib/debian/bitcoin-tx.bash-completion
+++ /dev/null
@@ -1 +0,0 @@
-contrib/bitcoin-tx.bash-completion bitcoin-tx
diff --git a/contrib/debian/bitcoin-tx.install b/contrib/debian/bitcoin-tx.install
deleted file mode 100644
index 2c21052a68..0000000000
--- a/contrib/debian/bitcoin-tx.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/local/bin/bitcoin-tx usr/bin
diff --git a/contrib/debian/bitcoin-tx.manpages b/contrib/debian/bitcoin-tx.manpages
deleted file mode 100644
index 861d49d070..0000000000
--- a/contrib/debian/bitcoin-tx.manpages
+++ /dev/null
@@ -1 +0,0 @@
-doc/man/bitcoin-tx.1
diff --git a/contrib/debian/bitcoind.bash-completion b/contrib/debian/bitcoind.bash-completion
deleted file mode 100644
index 5c69d78fbb..0000000000
--- a/contrib/debian/bitcoind.bash-completion
+++ /dev/null
@@ -1,2 +0,0 @@
-contrib/bitcoind.bash-completion bitcoind
-contrib/bitcoin-cli.bash-completion bitcoin-cli
diff --git a/contrib/debian/bitcoind.examples b/contrib/debian/bitcoind.examples
deleted file mode 100644
index 4ded67d98e..0000000000
--- a/contrib/debian/bitcoind.examples
+++ /dev/null
@@ -1 +0,0 @@
-debian/examples/bitcoin.conf
diff --git a/contrib/debian/bitcoind.install b/contrib/debian/bitcoind.install
deleted file mode 100644
index 798ea851f6..0000000000
--- a/contrib/debian/bitcoind.install
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/local/bin/bitcoind usr/bin
-usr/local/bin/bitcoin-cli usr/bin
diff --git a/contrib/debian/bitcoind.lintian-overrides b/contrib/debian/bitcoind.lintian-overrides
deleted file mode 100644
index 3f9f140bd8..0000000000
--- a/contrib/debian/bitcoind.lintian-overrides
+++ /dev/null
@@ -1,2 +0,0 @@
-# Linked code is Expat - only Debian packaging is GPL-2+
-bitcoind: possible-gpl-code-linked-with-openssl
diff --git a/contrib/debian/bitcoind.manpages b/contrib/debian/bitcoind.manpages
deleted file mode 100644
index bab644ece1..0000000000
--- a/contrib/debian/bitcoind.manpages
+++ /dev/null
@@ -1,2 +0,0 @@
-doc/man/bitcoind.1
-doc/man/bitcoin-cli.1
diff --git a/contrib/debian/changelog b/contrib/debian/changelog
deleted file mode 100644
index 33dab9b638..0000000000
--- a/contrib/debian/changelog
+++ /dev/null
@@ -1,578 +0,0 @@
-bitcoin (0.14.1-trusty4) trusty; urgency=medium
-
- * Re-enable UPnP support.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Fri, 05 May 2017 13:28:00 -0400
-
-bitcoin (0.14.1-trusty3) trusty; urgency=medium
-
- * Build with qt5 if we are on a non-Ubuntu (ie non-Unity) distro.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Thu, 04 May 2017 17:13:00 -0400
-
-bitcoin (0.14.1-trusty2) trusty; urgency=medium
-
- * Bump minimum boost version in deps.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Thu, 04 May 2017 17:12:00 -0400
-
-bitcoin (0.14.1-trusty1) trusty; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Sat, 22 Apr 2017 17:10:00 -0400
-
-bitcoin (0.14.0-trusty1) trusty; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Wed, 08 Mar 2017 10:30:00 -0500
-
-bitcoin (0.13.2-trusty1) trusty; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Thu, 05 Jan 2017 09:59:00 -0500
-
-bitcoin (0.13.1-trusty2) trusty; urgency=medium
-
- * Revert to Qt4, due to https://github.com/bitcoin/bitcoin/issues/9038
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Mon, 31 Oct 2016 11:16:00 -0400
-
-bitcoin (0.13.1-trusty1) trusty; urgency=medium
-
- * New upstream release.
- * Backport updated bitcoin-qt.desktop from upstream master
- * Add zmq dependency
- * Switch to Qt5 (breaks precise, but that was already broken by C++11)
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Thu, 27 Oct 2016 17:32:00 -0400
-
-bitcoin (0.13.0-trusty1) trusty; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Sun, 04 Sep 2016 22:09:00 -0400
-
-bitcoin (0.12.1-trusty1) trusty; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Mon, 18 Apr 2016 14:26:00 -0700
-
-bitcoin (0.12.0-trusty6) trusty; urgency=medium
-
- * Fix program-options dep.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Fri, 25 Mar 2016 21:41:00 -0700
-
-bitcoin (0.12.0-trusty5) trusty; urgency=medium
-
- * Test explicit --with-gui
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 23 Feb 2015 23:25:00 -0800
-
-bitcoin (0.12.0-trusty4) trusty; urgency=medium
-
- * Fix libevent-dev dep.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 23 Feb 2015 23:25:00 -0800
-
-bitcoin (0.12.0-trusty3) trusty; urgency=medium
-
- * Fix precise boost dep.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 23 Feb 2015 19:55:00 -0800
-
-bitcoin (0.12.0-trusty2) trusty; urgency=medium
-
- * Fix libevent dep.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 23 Feb 2015 19:53:00 -0800
-
-bitcoin (0.12.0-trusty1) trusty; urgency=medium
-
- * New upstream release
- * Various updates to contrib/debian were merged, a few were not
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 23 Feb 2015 19:29:00 -0800
-
-bitcoin (0.11.2-trusty1) trusty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Fri, 13 Nov 2015 18:39:00 -0800
-
-bitcoin (0.11.1-trusty2) trusty; urgency=low
-
- * Remove minupnpc builddep.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Wed, 14 Oct 2015 23:06:00 -1000
-
-bitcoin (0.11.1-trusty1) trusty; urgency=high
-
- * New upstream release.
- * Disable all UPnP support.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Wed, 14 Oct 2015 13:57:00 -1000
-
-bitcoin (0.11.0-precise1) precise; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 14 Jul 2015 14:39:00 -1000
-
-bitcoin (0.10.2-precise1) precise; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Mon, 29 Jun 2015 17:33:00 -1000
-
-bitcoin (0.10.1-precise3) precise; urgency=medium
-
- * Fix build dep (include python).
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 5 May 2015 09:28:00 -1000
-
-bitcoin (0.10.1-precise2) precise; urgency=medium
-
- * Fix miniupnpc dep.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 5 May 2015 00:33:00 -1000
-
-bitcoin (0.10.1-precise1) precise; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Tue, 5 May 2015 00:07:00 -1000
-
-bitcoin (0.10.0-precise1) precise; urgency=medium
-
- * New upstream releases.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Wed, 18 Feb 2015 13:22:00 -1000
-
-bitcoin (0.9.4-precise1) precise; urgency=high
-
- * New upstream releases.
-
- -- Matt Corallo (laptop - only while traveling) <matt@mattcorallo.com> Mon, 12 Jan 2015 23:30:00 -1000
-
-bitcoin (0.9.3-precise1) precise; urgency=medium
-
- * New upstream releases.
-
- -- Matt Corallo (BlueMatt) <matt@mattcorallo.com> Fri, 26 Sep 2014 12:01:00 -0700
-
-bitcoin (0.9.1-precise1) precise; urgency=medium
-
- * New upstream release.
- * Backport pull #4019
-
- -- Matt Corallo <matt@bluematt.me> Sat, 19 Apr 2014 17:29:00 -0400
-
-bitcoin (0.9.0-precise1) precise; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo <matt@bluematt.me> Thu, 20 Mar 2014 13:10:00 -0400
-
-bitcoin (0.8.6-precise1) precise; urgency=medium
-
- * New upstream release.
- * Make .desktop paths non-fixed (suggested by prusnak@github)
-
- -- Matt Corallo <matt@bluematt.me> Fri, 13 Dec 2013 13:31:00 -0400
-
-bitcoin (0.8.5-precise1) precise; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo <matt@bluematt.me> Sun, 15 Sep 2013 14:02:00 -0400
-
-bitcoin (0.8.4-precise1) precise; urgency=medium
-
- * New upstream release.
-
- -- Matt Corallo <matt@bluematt.me> Wed, 4 Sep 2013 10:25:00 -0400
-
-bitcoin (0.8.3-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo <matt@bluematt.me> Wed, 26 Jun 2013 00:18:00 +0100
-
-bitcoin (0.8.2-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo <matt@bluematt.me> Wed, 29 Mar 2013 23:23:00 +0100
-
-bitcoin (0.8.1-natty3) natty; urgency=low
-
- * New pixmaps
-
- -- Jonas Schnelli <jonas.schnelli@include7.ch> Mon, 13 May 2013 16:14:00 +0100
-
-bitcoin (0.8.1-natty2) natty; urgency=low
-
- * Remove dumb broken launcher script
-
- -- Matt Corallo <matt@bluematt.me> Sun, 24 Mar 2013 20:01:00 -0400
-
-bitcoin (0.8.1-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo <matt@bluematt.me> Tue, 19 Mar 2013 13:03:00 -0400
-
-bitcoin (0.8.0-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo <matt@bluematt.me> Sat, 23 Feb 2013 16:01:00 -0500
-
-bitcoin (0.7.2-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo <matt@bluematt.me> Sat, 15 Dec 2012 10:59:00 -0400
-
-bitcoin (0.7.1-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo <matt@bluematt.me> Wed, 24 Oct 2012 15:06:00 -0400
-
-bitcoin (0.7.0-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo <matt@bluematt.me> Mon, 17 Sep 2012 13:45:00 +0200
-
-bitcoin (0.6.3-natty1) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo <matt@bluematt.me> Mon, 25 Jun 2012 23:47:00 +0200
-
-bitcoin (0.6.2-natty1) natty; urgency=low
-
- * Update package description and launch scripts.
-
- -- Matt Corallo <matt@bluematt.me> Sat, 2 Jun 2012 16:41:00 +0200
-
-bitcoin (0.6.2-natty0) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo <matt@bluematt.me> Tue, 8 May 2012 16:27:00 -0500
-
-bitcoin (0.6.1-natty0) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo <matt@bluematt.me> Sun, 6 May 2012 20:09:00 -0500
-
-bitcoin (0.6.0-natty0) natty; urgency=low
-
- * New upstream release.
- * Add GNOME/KDE support for bitcoin-qt's bitcoin: URI support.
- Thanks to luke-jr for the KDE .protocol file.
-
- -- Matt Corallo <matt@bluematt.me> Sat, 31 Mar 2012 15:35:00 -0500
-
-bitcoin (0.5.3-natty1) natty; urgency=low
-
- * Mark for upload to PPA.
-
- -- Matt Corallo <matt@bluematt.me> Wed, 14 Mar 2012 23:06:00 -0400
-
-bitcoin (0.5.3-natty0) natty; urgency=low
-
- * New upstream release.
-
- -- Luke Dashjr <luke+bitcoin+deb@dashjr.org> Tue, 10 Jan 2012 15:57:00 -0500
-
-bitcoin (0.5.2-natty1) natty; urgency=low
-
- * Remove mentions on anonymity in package descriptions and manpage.
- These should never have been there, bitcoin isnt anonymous without
- a ton of work that virtually no users will ever be willing and
- capable of doing
-
- -- Matt Corallo <matt@bluematt.me> Sat, 7 Jan 2012 13:37:00 -0500
-
-bitcoin (0.5.2-natty0) natty; urgency=low
-
- * New upstream release.
-
- -- Luke Dashjr <luke+bitcoin+deb@dashjr.org> Fri, 16 Dec 2011 17:57:00 -0500
-
-bitcoin (0.5.1-natty0) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo <matt@bluematt.me> Fri, 16 Dec 2011 13:27:00 -0500
-
-bitcoin (0.5.0-natty0) natty; urgency=low
-
- * New upstream release.
-
- -- Matt Corallo <matt@bluematt.me> Mon, 21 Nov 2011 11:32:00 -0500
-
-bitcoin (0.5.0~rc7-natty0) natty; urgency=low
-
- * New upstream release candidate.
-
- -- Matt Corallo <matt@bluematt.me> Sun, 20 Nov 2011 17:08:00 -0500
-
-bitcoin (0.5.0~rc3-natty0) natty; urgency=low
-
- * New upstream release candidate.
- * Don't set rpcpassword for bitcoin-qt.
-
- -- Matt Corallo <matt@bluematt.me> Tue, 8 Nov 2011 11:56:00 -0400
-
-bitcoin (0.5.0~rc1-natty1) natty; urgency=low
-
- * Add test_bitcoin to build test
- * Fix clean
- * Remove uneccessary build-dependancies
-
- -- Matt Corallo <matt@bluematt.me> Wed, 26 Oct 2011 14:37:18 -0400
-
-bitcoin (0.5.0~rc1-natty0) natty; urgency=low
-
- * Mark for natty
- * Fix broken build
- * Fix copyright listing
- * Remove bitcoin: URL handler until bitcoin actually has support for it (Oops)
-
- -- Matt Corallo <matt@bluematt.me> Wed, 26 Oct 2011 14:37:18 -0400
-
-bitcoin (0.5.0~rc1-2) experimental; urgency=low
-
- * Add bitcoin-qt
-
- -- Matt Corallo <matt@bluematt.me> Tue, 25 Oct 2011 15:24:18 -0400
-
-bitcoin (0.5.0~rc1-1) experimental; urgency=low
-
- * New upstream prerelease.
- * Add Github as alternate upstream source in watch file.
- * Stop build-depending on libcrypto++-dev, and drop patch 1000:
- Upstream no longer use crypto++.
- * Drop patch 1003: Upstream builds dynamic by default now.
- * Update copyright file: Drop notes on longer included sources.
-
- -- Jonas Smedegaard <dr@jones.dk> Fri, 14 Oct 2011 00:16:18 +0200
-
-bitcoin (0.4.0-1) unstable; urgency=low
-
- * New upstream release.
- * Stop repackaging source tarballs: No DFSG-violating stripping left.
- * Update copyright file:
- + Add Github URL to Source.
- * Drop dpkg-source local-options hint: Declared options are default
- since dpkg-source 1.16.1.
- + Add irc URL to Upstream-Contact.
- + Add comment on Bitcoin Developers to catch-all Files section.
- + Add Files sections for newly readded src/cryptopp/* (new custom
- BSD-like license), and newly added doc/build-osx.txt and
- src/makefile.osx (Expat).
- * Bump debhelper compatibility level to 7.
- * Suppress binary icns and gpg files.
- * Enable regression tests:
- + Build-depend on libboost-test-dev.
- + Extend patch 1003 to also dynamically link test binary.
- + Build and invoke test binary unless tests are disabled.
- * Tighten build-dependency on cdbs: Recent version needed to support
- debhelper 7.
- * Relax build-depend unversioned on debhelper: needed version
- satisfied even in oldstable.
- * Stop suppress optional build-dependencies: Satisfied in stable.
- Build-depend on devscripts (enabling copyright-check).
-
- -- Jonas Smedegaard <dr@jones.dk> Wed, 05 Oct 2011 01:48:53 +0200
-
-bitcoin (0.3.24~dfsg-1) unstable; urgency=low
-
- * New upstream release.
-
- [ Jonas Smedegaard ]
- * Improve various usage hints:
- + Explicitly mention in long description that bitcoind contains
- daemon and command-line interface.
- + Extend README.Debian with section on lack of GUI, and add primary
- headline.
- + Avoid installing upstream README: contains no parts relevant for
- Debian usage.
- Thanks to richard for suggestions (see bug#629443).
- * Favor final releases over prereleases in rules and watch file.
- Thanks to Jan Dittberner.
- * Track -src (not -linux) tarballs in rules and watch file.
- Thanks to Jan Dittberner.
- * Drop patches 1004 and 1005 (integrated upstream) and simplify
- CXXFLAGS in rules file.
- * Stop stripping no longer included source-less binaries from upstream
- tarballs.
-
- [ Jan Dittberner ]
- * refresh debian/patches/1000_use_system_crypto++.patch
-
- -- Jonas Smedegaard <dr@jones.dk> Tue, 19 Jul 2011 15:08:54 +0200
-
-bitcoin (0.3.21~dfsg-2) unstable; urgency=low
-
- * Enable UPNP support:
- + Drop patch 1006.
- + Build-depend on libminiupnpc-dev.
- Thanks to Matt Corallo.
-
- -- Jonas Smedegaard <dr@jones.dk> Sat, 28 May 2011 15:52:44 +0200
-
-bitcoin (0.3.21~dfsg-1) unstable; urgency=low
-
- * New upstream release.
- * Refresh patches.
- * Drop patch 1002: no longer needed, as upstream use pkgconfig now.
- * Add patch 1006 to really unset USE_UPNP as aparently intended.
- * Adjust cleanup rule to preserve .gitignore files.
- * Update copyright file:
- + Bump format to draft 174 of DEP-5.
- + Shorten comments.
- * Bump policy compliance to standards-version 3.9.2.
- * Shorten Vcs-Browser paragraph in control file.
- * Fix mention daemon (not CLI tools) in short description.
- * Stop conflicting with or replace bitcoin-cli: Only transitional, no
- longer needed.
- * Link against unversioned berkeleydb. Update NEWS and README.Debian
- accordingly (and improve wording while at it).
- Closes: Bug#621425. Thanks to Ondřej Surý.
- * This release also implicitly updates linkage against libcrypto++,
- which closes: bug#626953, #627024.
- * Disable linkage against not yet Debian packaged MiniUPnP.
- * Silence seemingly harmless noise about unused variables.
-
- -- Jonas Smedegaard <dr@jones.dk> Tue, 17 May 2011 15:31:24 +0200
-
-bitcoin (0.3.20.2~dfsg-2) unstable; urgency=medium
-
- * Fix have wrapper script execute real binary (not loop executing
- itself).
- Closes: bug#617290. Thanks to Philippe Gauthier and Etienne Laurin.
- * Set urgency=medium as the only (user-exposed) binary is useless
- without this fix and has been for some time.
-
- -- Jonas Smedegaard <dr@jones.dk> Wed, 16 Mar 2011 09:11:06 +0100
-
-bitcoin (0.3.20.2~dfsg-1) unstable; urgency=low
-
- * New upstream release.
- * Fix provide and replace former package name bitcoin-cli.
- Closes: bug#618439. Thanks to Shane Wegner.
-
- -- Jonas Smedegaard <dr@jones.dk> Tue, 15 Mar 2011 11:41:43 +0100
-
-bitcoin (0.3.20.01~dfsg-1) unstable; urgency=low
-
- * New upstream release.
-
- [ Micah Anderson ]
- * Add myself as uploader.
-
- [ Jonas Smedegaard ]
- * Add wrapper for bitcoind to ease initial startup.
- * Update patches:
- + Drop patch 2002: Applied upstream.
- + Add patch 1005 to add phtread linker option.
- Closes: bug#615619. Thanks to Shane Wegner.
- + Refresh patches.
- * Extend copyright years in rules file header.
- * Rewrite copyright file using draft svn166 of DEP5 format.
- * Rename binary package to bitcoind (from bincoin-cli).
- Closes: bug#614025. Thanks to Luke-Jr.
-
- -- Jonas Smedegaard <dr@jones.dk> Tue, 01 Mar 2011 15:55:04 +0100
-
-bitcoin (0.3.19~dfsg-6) unstable; urgency=low
-
- * Fix override agressive optimizations.
- * Fix tighten build-dependencies to really fit backporting to Lenny:
- + Add fallback build-dependency on libdb4.6++-dev.
- + Tighten unversioned Boost build-dependencies to recent versions,
- To force use of versioned Boost when backporting to Lenny.
- ...needs more love, though: actual build fails.
-
- -- Jonas Smedegaard <dr@jones.dk> Mon, 17 Jan 2011 19:48:35 +0100
-
-bitcoin (0.3.19~dfsg-5) unstable; urgency=low
-
- * Fix lower Boost fallback-build-dependencies to 1.35, really
- available in Lenny.
- * Correct comment in rules file regarding reason for versioned Boost
- fallback-build-dependency.
- * Add patch 2002 adding -mt decoration to Boost flags, to ease
- backporting to Lenny.
- * Respect DEB_BUILD_OPTIONS, and suppress arch-specific optimizations:
- + Add patch 1004 to allow overriding optimization flags.
- + Set optimization flags conditionally at build time.
- + Drop patch 2002 unconditionally suppressing arch-optimizations.
-
- -- Jonas Smedegaard <dr@jones.dk> Mon, 17 Jan 2011 16:04:48 +0100
-
-bitcoin (0.3.19~dfsg-4) unstable; urgency=low
-
- [ Micah Anderson ]
- * Provide example bitcoin.conf.
- * Add bitcoind(1) and bitcoin.conf(5) man pages.
-
- [ Jonas Smedegaard ]
- * Ease backporting:
- + Suppress optional build-dependencies.
- + Add fallback build-dependencies on the most recent Boost libs
- available in Lenny (where unversioned Boost libs are missing).
- * Add Micah as copyright holder for manpages, licensed as GPL-3+.
- * Bump copyright format to Subversion candidate draft 162 of DEP5.
-
- -- Jonas Smedegaard <dr@jones.dk> Mon, 17 Jan 2011 14:00:48 +0100
-
-bitcoin (0.3.19~dfsg-3) unstable; urgency=low
-
- * Document in copyright file files excluded from repackaged source.
- * Update copyright file:
- + Bump DEP5 format hint to Subversion draft rev. 153.
- + Consistently wrap at 72 chars.
- + Refer to GPL-2 file (not GPL symlink).
- * Link against Berkeley DB 4.8 (not 4.7):
- + Build-depend on libdb4.8++-dev (and on on libdb4.7++-dev).
- + Suggest libdb4.8-util and db4.7-util.
- + Add README.Debian note on (untested) upgrade routine.
- + Add NEWS entry on changed db version, referring to README.Debian.
-
- -- Jonas Smedegaard <dr@jones.dk> Fri, 07 Jan 2011 22:50:57 +0100
-
-bitcoin (0.3.19~dfsg-2) unstable; urgency=low
-
- * Adjust build options to use optimized miner only for amd64. Fixes
- FTBFS on i386 (and other archs, if compiling anywhere else at all).
- * Avoid static linking.
- * Adjust patch 2001 to avoid only arch-specific optimizations (keep
- -O3).
- * Extend long description to mention disk consumption and initial use
- of IRC.
- All of above changes thanks to Helmuth Grohne.
- * Add lintian override regarding OpenSSL and GPL: Linked code is Expat
- - only Debian packaging is GPL-2+.
-
- -- Jonas Smedegaard <dr@jones.dk> Wed, 29 Dec 2010 00:27:54 +0100
-
-bitcoin (0.3.19~dfsg-1) unstable; urgency=low
-
- [ Jonas Smedegaard ]
- * Initial release.
- Closes: bug#578157.
-
- -- Jonas Smedegaard <dr@jones.dk> Tue, 28 Dec 2010 15:49:22 +0100
diff --git a/contrib/debian/compat b/contrib/debian/compat
deleted file mode 100644
index 7f8f011eb7..0000000000
--- a/contrib/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-7
diff --git a/contrib/debian/control b/contrib/debian/control
deleted file mode 100644
index 0d6ad25e24..0000000000
--- a/contrib/debian/control
+++ /dev/null
@@ -1,70 +0,0 @@
-Source: bitcoin
-Section: utils
-Priority: optional
-Maintainer: Matt Corallo <matt@mattcorallo.com>
-Uploaders: Matt Corallo <matt@mattcorallo.com>
-Build-Depends: debhelper,
- devscripts,
- automake,
- libtool,
- bash-completion,
- libdb4.8++-dev,
- libssl-dev,
- pkg-config,
- libevent-dev,
- libboost-system1.48-dev | libboost-system-dev (>> 1.47),
- libboost-filesystem1.48-dev | libboost-filesystem-dev (>> 1.47),
- libboost-program-options1.48-dev | libboost-program-options-dev (>> 1.47),
- libboost-thread1.48-dev | libboost-thread-dev (>> 1.47),
- libboost-test1.48-dev | libboost-test-dev (>> 1.47),
- libboost-chrono1.48-dev | libboost-chrono-dev (>> 1.47),
- libminiupnpc8-dev | libminiupnpc-dev,
- qt4-qmake, libqt4-dev,
- qttools5-dev-tools, qttools5-dev,
- libqrencode-dev,
- libprotobuf-dev, protobuf-compiler,
- python,
- libzmq3-dev
-Standards-Version: 3.9.2
-Homepage: https://bitcoincore.org/
-Vcs-Git: git://github.com/bitcoin/bitcoin.git
-Vcs-Browser: https://github.com/bitcoin/bitcoin
-
-Package: bitcoind
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: peer-to-peer network based digital currency - daemon
- Bitcoin is a free open source peer-to-peer electronic cash system that
- is completely decentralized, without the need for a central server or
- trusted parties. Users hold the crypto keys to their own money and
- transact directly with each other, with the help of a P2P network to
- check for double-spending.
- .
- This package provides the daemon, bitcoind, and the CLI tool
- bitcoin-cli to interact with the daemon.
-
-Package: bitcoin-qt
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: peer-to-peer network based digital currency - Qt GUI
- Bitcoin is a free open source peer-to-peer electronic cash system that
- is completely decentralized, without the need for a central server or
- trusted parties. Users hold the crypto keys to their own money and
- transact directly with each other, with the help of a P2P network to
- check for double-spending.
- .
- This package provides Bitcoin-Qt, a GUI for Bitcoin based on Qt.
-
-Package: bitcoin-tx
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: peer-to-peer digital currency - standalone transaction tool
- Bitcoin is a free open source peer-to-peer electronic cash system that
- is completely decentralized, without the need for a central server or
- trusted parties. Users hold the crypto keys to their own money and
- transact directly with each other, with the help of a P2P network to
- check for double-spending.
- .
- This package provides bitcoin-tx, a command-line transaction creation
- tool which can be used without a bitcoin daemon. Some means of
- exchanging minimal transaction data with peers is still required.
diff --git a/contrib/debian/gbp.conf b/contrib/debian/gbp.conf
deleted file mode 100644
index a7281f94b2..0000000000
--- a/contrib/debian/gbp.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-# Configuration file for git-buildpackage and friends
-
-[DEFAULT]
-pristine-tar = True
-sign-tags = True
diff --git a/contrib/debian/patches/README b/contrib/debian/patches/README
deleted file mode 100644
index 80c1584376..0000000000
--- a/contrib/debian/patches/README
+++ /dev/null
@@ -1,3 +0,0 @@
-0xxx: Grabbed from upstream development.
-1xxx: Possibly relevant for upstream adoption.
-2xxx: Only relevant for official Debian release.
diff --git a/contrib/debian/patches/series b/contrib/debian/patches/series
deleted file mode 100644
index 8b13789179..0000000000
--- a/contrib/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/contrib/debian/rules b/contrib/debian/rules
deleted file mode 100755
index 6885e38521..0000000000
--- a/contrib/debian/rules
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/make -f
-# -*- mode: makefile; coding: utf-8 -*-
-
-#DEB_MAKE_CHECK_TARGET = test_bitcoin
-#build/bitcoind::
-# $(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),,src/test_bitcoin)
-
-%:
- dh --with bash-completion $@
-
-override_dh_auto_clean:
- if [ -f Makefile ]; then $(MAKE) distclean; fi
- rm -rf Makefile.in aclocal.m4 configure src/Makefile.in src/bitcoin-config.h.in src/build-aux src/qt/Makefile.in src/qt/test/Makefile.in src/test/Makefile.in
-
-QT=$(shell dpkg-vendor --derives-from Ubuntu && echo qt4 || echo qt5)
-
-# Yea, autogen should be run on the source archive, but I like doing git archive
-override_dh_auto_configure:
- ./autogen.sh
- ./configure --with-gui=$(QT)
-
-override_dh_auto_test:
- make check
diff --git a/contrib/debian/source/format b/contrib/debian/source/format
deleted file mode 100644
index 163aaf8d82..0000000000
--- a/contrib/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (quilt)
diff --git a/contrib/debian/watch b/contrib/debian/watch
deleted file mode 100644
index 4d9e0cfa57..0000000000
--- a/contrib/debian/watch
+++ /dev/null
@@ -1,5 +0,0 @@
-# Run the "uscan" command to check for upstream updates and more.
-version=3
-# use qa.debian.org redirector; see man uscan
-opts=uversionmangle=s/(\d)(alpha|beta|rc)/$1~$2/,dversionmangle=s/~dfsg\d*// \
- http://githubredir.debian.net/github/bitcoin/bitcoin v(.*).tar.gz
diff --git a/contrib/devtools/security-check.py b/contrib/devtools/security-check.py
index 47195f73c8..391984a8f2 100755
--- a/contrib/devtools/security-check.py
+++ b/contrib/devtools/security-check.py
@@ -14,7 +14,7 @@ import os
READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
OBJDUMP_CMD = os.getenv('OBJDUMP', '/usr/bin/objdump')
-NONFATAL = {'HIGH_ENTROPY_VA'} # checks which are non-fatal for now but only generate a warning
+NONFATAL = {} # checks which are non-fatal for now but only generate a warning
def check_ELF_PIE(executable):
'''
diff --git a/contrib/devtools/test-security-check.py b/contrib/devtools/test-security-check.py
index 9b6d6bf665..4cf51378c0 100755
--- a/contrib/devtools/test-security-check.py
+++ b/contrib/devtools/test-security-check.py
@@ -32,11 +32,11 @@ class TestSecurityChecks(unittest.TestCase):
cc = 'gcc'
write_testcode(source)
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro']),
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE']),
(1, executable+': failed PIE NX RELRO Canary'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fno-stack-protector','-Wl,-znorelro']),
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE']),
(1, executable+': failed PIE RELRO Canary'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro']),
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-no-pie','-fno-PIE']),
(1, executable+': failed PIE RELRO'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-pie','-fPIE']),
(1, executable+': failed RELRO'))
@@ -49,9 +49,9 @@ class TestSecurityChecks(unittest.TestCase):
cc = 'i686-w64-mingw32-gcc'
write_testcode(source)
- self.assertEqual(call_security_check(cc, source, executable, []),
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--no-nxcompat','-Wl,--no-dynamicbase']),
(1, executable+': failed DYNAMIC_BASE NX'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat']),
+ self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--no-dynamicbase']),
(1, executable+': failed DYNAMIC_BASE'))
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase']),
(0, ''))
@@ -61,9 +61,9 @@ class TestSecurityChecks(unittest.TestCase):
cc = 'x86_64-w64-mingw32-gcc'
write_testcode(source)
- self.assertEqual(call_security_check(cc, source, executable, []), (1, executable+': failed DYNAMIC_BASE NX\n'+executable+': warning HIGH_ENTROPY_VA'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat']), (1, executable+': failed DYNAMIC_BASE\n'+executable+': warning HIGH_ENTROPY_VA'))
- self.assertEqual(call_security_check(cc, source, executable, ['-Wl,--nxcompat','-Wl,--dynamicbase']), (0, executable+': warning HIGH_ENTROPY_VA'))
+ 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, ''))
if __name__ == '__main__':
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index 1c8aca6f65..4255fb0c9a 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -43,6 +43,7 @@ script: |
HOST_LDFLAGS=-static-libstdc++
export QT_RCC_TEST=1
+ export QT_RCC_SOURCE_DATE_OVERRIDE=1
export GZIP="-9n"
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
export TZ="UTC"
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index e2695b6f7b..fb59cf671b 100644
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -40,6 +40,7 @@ script: |
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
export QT_RCC_TEST=1
+ export QT_RCC_SOURCE_DATE_OVERRIDE=1
export GZIP="-9n"
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
export TZ="UTC"
diff --git a/contrib/gitian-descriptors/gitian-win-signer.yml b/contrib/gitian-descriptors/gitian-win-signer.yml
index 2f3ec3e8ff..045be873e9 100644
--- a/contrib/gitian-descriptors/gitian-win-signer.yml
+++ b/contrib/gitian-descriptors/gitian-win-signer.yml
@@ -5,7 +5,8 @@ suites:
architectures:
- "amd64"
packages:
-- "libssl-dev"
+# Once osslsigncode supports openssl 1.1, we can change this back to libssl-dev
+- "libssl1.0-dev"
- "autoconf"
remotes:
- "url": "https://github.com/bitcoin-core/bitcoin-detached-sigs.git"
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index 9c588afcda..2d48170649 100644
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -36,6 +36,7 @@ script: |
HOST_CXXFLAGS="-O2 -g"
export QT_RCC_TEST=1
+ export QT_RCC_SOURCE_DATE_OVERRIDE=1
export GZIP="-9n"
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
export TZ="UTC"
diff --git a/contrib/rpm/README.md b/contrib/rpm/README.md
deleted file mode 100644
index e1e0745fd6..0000000000
--- a/contrib/rpm/README.md
+++ /dev/null
@@ -1,185 +0,0 @@
-RPM Spec File Notes
--------------------
-
-The RPM spec file provided here is for Bitcoin-Core 0.12.0 and builds on CentOS
-7 with either the CentOS provided OpenSSL library or with LibreSSL as packaged
-at [LibreLAMP.com](https://librelamp.com/). It should hopefully not be too
-difficult to port the RPM spec file to most RPM based Linux distributions.
-
-When porting the spec file to build for a particular distribution, there are
-some important notes.
-
-## Sources
-
-It is considered good form for all sources to reference a URL where the source
-can be downloaded.
-
-Sources 0-9 should be reserved for source code tarballs. `Source0` should
-reference the release tarball available from https://bitcoin.org/bin/ and
-`Source1` should reference the BerkeleyDB source.
-
-Sources 10-99 are for source files that are maintained in the
-[Bitcoin git repository](https://github.com/bitcoin/bitcoin) but are not part of
-the release tarball. Most of these will reside in the `contrib` sub-directory.
-
-Sources 10-19 should be reserved for miscellaneous configuration files.
-Currently only `Source10` is used, for the example `bitcoin.conf` file.
-
-Sources 20-29 should be reserved for man pages. Currently only `Source20`
-through `Source23` are used.
-
-Sources 30-39 should be reserved for SELinux related files. Currently only
-`Source30` through `Source32` are used. Until those files are in a tagged
-release, the full URL specified in the RPM spec file will not work. You can get
-them from the git repository where you retrieved this file.
-
-Sources 100+ are for files that are not source tarballs and are not maintained
-in the bitcoin git repository. At present only an SVG version of the Bitcoin
-icon is used.
-
-## Patches
-
-In general, patches should be avoided. When a packager feels a patch is
-necessary, the packager should bring the problem to the attention of the bitcoin
-developers so that an official fix to the issue can make it into the next
-release.
-
-### Patch0 bitcoin-0.12.0-libressl.patch
-
-This patch is only needed if building against LibreSSL. LibreSSL is not the
-standard TLS library on most Linux distributions. The patch will likely not be
-needed when 0.12.1 is released, a proper fix is already in the Bitcoin git
-master branch.
-
-## BuildRequires
-
-The packages specified in the `BuildRequires` are specified according to the
-package naming convention currently used in CentOS 7 and EPEL for CentOS 7. You
-may need to change some of the package names for other distributions. This is
-most likely to be the case with the Qt packages.
-
-## BerkeleyDB
-
-The `build-unix.md` file recommends building against BerkeleyDB 4.8.30. Even if
-that is the version your Linux distribution ships with, it probably is a good
-idea to build Bitcoin Core against a static version of that library compiled
-according to the instructions in the `build-unix.md` file so that any changes
-the distribution may make in the future will not result in a problem for users.
-
-The problem that can exist, clients built against different versions of
-BerkeleyDB may not be able read each other's `wallet.dat` file which can make it
-difficult for a user to recover from backup in the event of a system failure.
-
-## Graphical User Interface and Qt Version
-
-The RPM spec file will by default build the GUI client linked against the Qt5
-libraries. If you wish instead to link against the Qt4 libraries you need to
-pass the switch `-D '_use_qt4 1'` at build time to the `rpmbuild` or `mock`
-command used to build the packages.
-
-If you would prefer not to build the GUI at all, you can pass the switch
-`-D '_no_gui 1'` to the `rpmbuild` or `mock` build command.
-
-## Desktop and KDE Files
-
-The desktop and KDE meta files are created in the spec file itself with the
-`cat` command. This is done to allow easy distribution specific changes without
-needing to use any patches. A specific timestamp is given to the files so that
-it does not they do not appear to have been updated every time the package is
-built. If you do make changes to them, you probably should update timestamp
-assigned to them in the `touch` command that specifies the timestamp.
-
-## SVG, PNG, and XPM Icons
-
-The `bitcoin.svg` file is from the source listed as `Source100`. It is used as
-the source for the PNG and XPM files. The generated PNG and XPM files are given
-the same timestamp as the source SVG file as a means of indicating they are
-derived from it.
-
-## Systemd
-
-This spec file assumes the target distribution uses systemd. That really only
-matters for the `bitcoin-server` package. At this point, most RPM based
-distributions that still receive vendor updates do in fact use systemd.
-
-The files to control the service are created in the RPM spec file itself using
-the `cat` command. This is done to make it easy to modify for other
-distributions that may implement things differently without needing to patch
-source. A specific timestamp is given to the files so that they do not appear
-to have been updated every time the package is built. If you do make changes to
-them, you probably should update the timestamp assigned to them in the `touch`
-command that specifies the timestamp.
-
-## SELinux
-
-The `bitcoin-server` package should have SELinux support. How to properly do
-that *may* vary by distribution and version of distribution.
-
-The SELinux stuff in this RPM spec file *should* be correct for CentOS, RHEL,
-and Fedora but it would be a good idea to review it before building the package
-on other distributions.
-
-## Tests
-
-The `%check` section takes a very long time to run. If your build system has a
-time limit for package build, you may need to make an exception for this
-package. On CentOS 7 the `%check` section completes successfully with both
-OpenSSL and LibreSSL, a failure really does mean something is wrong.
-
-## LibreSSL Build Notes
-
-To build against LibreSSL you will need to pass the switch
-`-D '_use_libressl 1'` to the `rpmbuild` or `mock` command or the spec file will
-want the OpenSSL development files.
-
-### LibreSSL and Boost
-
-LibreSSL (and some newer builds of OpenSSL) do not have support for SSLv3. This
-can cause issues with the Boost package if the Boost package has not been
-patched accordingly. On those distributions, you will either need to build
-Bitcoin-Core against OpenSSL or use a patched version of Boost in the build
-system.
-
-As SSLv3 is no longer safe, distributions that have not patched Boost to work
-with TLS libraries that do not support SSLv3 should have bug reports filed
-against the Boost package. This bug report has already been filed for RHEL 7 but
-it may need to be filed for other distributions.
-
-A patch for Boost: https://github.com/boostorg/asio/pull/23/files
-
-## ZeroMQ
-
-At this time, this RPM spec file does not support the ZeroMQ build options. A
-suitable version of ZeroMQ is not available for the platform this spec file was
-developed on (CentOS 7).
-
-## Legacy Credit
-
-This RPM spec file is largely based upon the work of Michael Hampton at
-[Ringing Liberty](https://www.ringingliberty.com/bitcoin/). He has been
-packaging Bitcoin for Fedora at least since 2012.
-
-Most of the differences between his packaging and this package are stylistic in
-nature. The major differences:
-
-1. He builds from a github tagged release rather than a release tarball. This
-should not result in different source code.
-
-2. He does not build BerkeleyDB but instead uses the BerkeleyDB provided by the
-Linux distribution. For the distributions he packages for, they currently all
-use the same version of BerkeleyDB so that difference is *probably* just
-academic.
-
-3. As of his 10.11.2 package he did not allow for building against LibreSSL,
-specifying a build without the Qt GUI, or specifying which version of the Qt
-libraries to use.
-
-4. I renamed the `bitcoin` package that contains the Qt GUI to `bitcoin-core` as
-that appears to be how the general population refers to it, in contrast to
-`bitcoin-xt` or `bitcoin-classic`. I wanted to make sure the general population
-knows what they are getting when installing the GUI package.
-
-As far as minor differences, I generally prefer to assign the file permissions
-in the `%files` portion of an RPM spec file rather than specifying the
-permissions of a file during `%install` and other minor things like that
-are largely just cosmetic.
diff --git a/contrib/rpm/bitcoin-0.12.0-libressl.patch b/contrib/rpm/bitcoin-0.12.0-libressl.patch
deleted file mode 100644
index 555614a06d..0000000000
--- a/contrib/rpm/bitcoin-0.12.0-libressl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -ur bitcoin-0.12.0.orig/src/init.cpp bitcoin-0.12.0/src/init.cpp
---- bitcoin-0.12.0.orig/src/init.cpp 2015-12-31 16:00:00.000000000 -0800
-+++ bitcoin-0.12.0/src/init.cpp 2016-02-23 06:03:47.133227757 -0800
-@@ -1075,7 +1075,7 @@
- if (fPrintToDebugLog)
- OpenDebugLog();
-
--#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
-+#if defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x10100000L)
- LogPrintf("Using OpenSSL version %s\n", SSLeay_version(SSLEAY_VERSION));
- #else
- LogPrintf("Using OpenSSL version %s\n", OpenSSL_version(OPENSSL_VERSION));
-diff -ur bitcoin-0.12.0.orig/src/qt/rpcconsole.cpp bitcoin-0.12.0/src/qt/rpcconsole.cpp
---- bitcoin-0.12.0.orig/src/qt/rpcconsole.cpp 2015-12-31 16:00:00.000000000 -0800
-+++ bitcoin-0.12.0/src/qt/rpcconsole.cpp 2016-02-23 15:09:42.881126841 -0800
-@@ -264,7 +264,7 @@
-
- // set library version labels
-
--#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
-+#if defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x10100000L)
- ui->openSSLVersion->setText(SSLeay_version(SSLEAY_VERSION));
- #else
- ui->openSSLVersion->setText(OpenSSL_version(OPENSSL_VERSION));
diff --git a/contrib/rpm/bitcoin.fc b/contrib/rpm/bitcoin.fc
deleted file mode 100644
index 6f5eef6375..0000000000
--- a/contrib/rpm/bitcoin.fc
+++ /dev/null
@@ -1,8 +0,0 @@
-/usr/bin/bitcoin-cli -- gen_context(system_u:object_r:bitcoin_exec_t,s0)
-/usr/sbin/bitcoind -- gen_context(system_u:object_r:bitcoin_exec_t,s0)
-/usr/lib(64)?/bitcoin/bitcoind -- gen_context(system_u:object_r:bitcoin_exec_t,s0)
-
-/etc/bitcoin(/.*)? gen_context(system_u:object_r:bitcoin_conf_t,s0)
-/var/lib/bitcoin(/.*)? gen_context(system_u:object_r:bitcoin_var_lib_t,s0)
-
-(/var)?/run/bitcoind(/.*)? gen_context(system_u:object_r:bitcoin_var_run_t,s0)
diff --git a/contrib/rpm/bitcoin.if b/contrib/rpm/bitcoin.if
deleted file mode 100644
index b206866cc5..0000000000
--- a/contrib/rpm/bitcoin.if
+++ /dev/null
@@ -1,157 +0,0 @@
-
-## <summary>policy for bitcoin</summary>
-
-
-########################################
-## <summary>
-## Transition to bitcoin.
-## </summary>
-## <param name="domain">
-## <summary>
-## Domain allowed to transition.
-## </summary>
-## </param>
-#
-interface(`bitcoin_domtrans',`
- gen_require(`
- type bitcoin_t, bitcoin_exec_t;
- ')
-
- corecmd_search_bin($1)
- domtrans_pattern($1, bitcoin_exec_t, bitcoin_t)
-')
-
-
-########################################
-## <summary>
-## Execute bitcoin server in the bitcoin domain.
-## </summary>
-## <param name="domain">
-## <summary>
-## Domain allowed access.
-## </summary>
-## </param>
-#
-interface(`bitcoin_initrc_domtrans',`
- gen_require(`
- type bitcoin_initrc_exec_t;
- ')
-
- init_labeled_script_domtrans($1, bitcoin_initrc_exec_t)
-')
-
-
-########################################
-## <summary>
-## Search bitcoin lib directories.
-## </summary>
-## <param name="domain">
-## <summary>
-## Domain allowed access.
-## </summary>
-## </param>
-#
-interface(`bitcoin_search_lib',`
- gen_require(`
- type bitcoin_var_lib_t;
- ')
-
- allow $1 bitcoin_var_lib_t:dir search_dir_perms;
- files_search_var_lib($1)
-')
-
-########################################
-## <summary>
-## Read bitcoin lib files.
-## </summary>
-## <param name="domain">
-## <summary>
-## Domain allowed access.
-## </summary>
-## </param>
-#
-interface(`bitcoin_read_lib_files',`
- gen_require(`
- type bitcoin_var_lib_t;
- ')
-
- files_search_var_lib($1)
- read_files_pattern($1, bitcoin_var_lib_t, bitcoin_var_lib_t)
-')
-
-########################################
-## <summary>
-## Manage bitcoin lib files.
-## </summary>
-## <param name="domain">
-## <summary>
-## Domain allowed access.
-## </summary>
-## </param>
-#
-interface(`bitcoin_manage_lib_files',`
- gen_require(`
- type bitcoin_var_lib_t;
- ')
-
- files_search_var_lib($1)
- manage_files_pattern($1, bitcoin_var_lib_t, bitcoin_var_lib_t)
-')
-
-########################################
-## <summary>
-## Manage bitcoin lib directories.
-## </summary>
-## <param name="domain">
-## <summary>
-## Domain allowed access.
-## </summary>
-## </param>
-#
-interface(`bitcoin_manage_lib_dirs',`
- gen_require(`
- type bitcoin_var_lib_t;
- ')
-
- files_search_var_lib($1)
- manage_dirs_pattern($1, bitcoin_var_lib_t, bitcoin_var_lib_t)
-')
-
-
-########################################
-## <summary>
-## All of the rules required to administrate
-## a bitcoin environment
-## </summary>
-## <param name="domain">
-## <summary>
-## Domain allowed access.
-## </summary>
-## </param>
-## <param name="role">
-## <summary>
-## Role allowed access.
-## </summary>
-## </param>
-## <rolecap/>
-#
-interface(`bitcoin_admin',`
- gen_require(`
- type bitcoin_t;
- type bitcoin_initrc_exec_t;
- type bitcoin_var_lib_t;
- ')
-
- allow $1 bitcoin_t:process { ptrace signal_perms };
- ps_process_pattern($1, bitcoin_t)
-
- bitcoin_initrc_domtrans($1)
- domain_system_change_exemption($1)
- role_transition $2 bitcoin_initrc_exec_t system_r;
- allow $2 system_r;
-
- files_search_var_lib($1)
- admin_pattern($1, bitcoin_var_lib_t)
-
-')
-
diff --git a/contrib/rpm/bitcoin.spec b/contrib/rpm/bitcoin.spec
deleted file mode 100644
index 7c4d933ee0..0000000000
--- a/contrib/rpm/bitcoin.spec
+++ /dev/null
@@ -1,442 +0,0 @@
-%define bdbv 4.8.30
-%global selinux_variants mls strict targeted
-
-%if 0%{?_no_gui:1}
-%define _buildqt 0
-%define buildargs --with-gui=no
-%else
-%define _buildqt 1
-%if 0%{?_use_qt4}
-%define buildargs --with-qrencode --with-gui=qt4
-%else
-%define buildargs --with-qrencode --with-gui=qt5
-%endif
-%endif
-
-Name: bitcoin
-Version: 0.12.0
-Release: 2%{?dist}
-Summary: Peer to Peer Cryptographic Currency
-
-Group: Applications/System
-License: MIT
-URL: https://bitcoin.org/
-Source0: https://bitcoin.org/bin/bitcoin-core-%{version}/bitcoin-%{version}.tar.gz
-Source1: http://download.oracle.com/berkeley-db/db-%{bdbv}.NC.tar.gz
-
-Source10: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/debian/examples/bitcoin.conf
-
-#man pages
-Source20: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/doc/man/bitcoind.1
-Source21: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/doc/man/bitcoin-cli.1
-Source22: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/doc/man/bitcoin-qt.1
-
-#selinux
-Source30: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/rpm/bitcoin.te
-# Source31 - what about bitcoin-tx and bench_bitcoin ???
-Source31: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/rpm/bitcoin.fc
-Source32: https://raw.githubusercontent.com/bitcoin/bitcoin/v%{version}/contrib/rpm/bitcoin.if
-
-Source100: https://upload.wikimedia.org/wikipedia/commons/4/46/Bitcoin.svg
-
-%if 0%{?_use_libressl:1}
-BuildRequires: libressl-devel
-%else
-BuildRequires: openssl-devel
-%endif
-BuildRequires: boost-devel
-BuildRequires: miniupnpc-devel
-BuildRequires: autoconf automake libtool
-BuildRequires: libevent-devel
-
-
-Patch0: bitcoin-0.12.0-libressl.patch
-
-
-%description
-Bitcoin is a digital cryptographic currency that uses peer-to-peer technology to
-operate with no central authority or banks; managing transactions and the
-issuing of bitcoins is carried out collectively by the network.
-
-%if %{_buildqt}
-%package core
-Summary: Peer to Peer Cryptographic Currency
-Group: Applications/System
-Obsoletes: %{name} < %{version}-%{release}
-Provides: %{name} = %{version}-%{release}
-%if 0%{?_use_qt4}
-BuildRequires: qt-devel
-%else
-BuildRequires: qt5-qtbase-devel
-# for /usr/bin/lrelease-qt5
-BuildRequires: qt5-linguist
-%endif
-BuildRequires: protobuf-devel
-BuildRequires: qrencode-devel
-BuildRequires: %{_bindir}/desktop-file-validate
-# for icon generation from SVG
-BuildRequires: %{_bindir}/inkscape
-BuildRequires: %{_bindir}/convert
-
-%description core
-Bitcoin is a digital cryptographic currency that uses peer-to-peer technology to
-operate with no central authority or banks; managing transactions and the
-issuing of bitcoins is carried out collectively by the network.
-
-This package contains the Qt based graphical client and node. If you are looking
-to run a Bitcoin wallet, this is probably the package you want.
-%endif
-
-
-%package libs
-Summary: Bitcoin shared libraries
-Group: System Environment/Libraries
-
-%description libs
-This package provides the bitcoinconsensus shared libraries. These libraries
-may be used by third party software to provide consensus verification
-functionality.
-
-Unless you know need this package, you probably do not.
-
-%package devel
-Summary: Development files for bitcoin
-Group: Development/Libraries
-Requires: %{name}-libs = %{version}-%{release}
-
-%description devel
-This package contains the header files and static library for the
-bitcoinconsensus shared library. If you are developing or compiling software
-that wants to link against that library, then you need this package installed.
-
-Most people do not need this package installed.
-
-%package server
-Summary: The bitcoin daemon
-Group: System Environment/Daemons
-Requires: bitcoin-utils = %{version}-%{release}
-Requires: selinux-policy policycoreutils-python
-Requires(pre): shadow-utils
-Requires(post): %{_sbindir}/semodule %{_sbindir}/restorecon %{_sbindir}/fixfiles %{_sbindir}/sestatus
-Requires(postun): %{_sbindir}/semodule %{_sbindir}/restorecon %{_sbindir}/fixfiles %{_sbindir}/sestatus
-BuildRequires: systemd
-BuildRequires: checkpolicy
-BuildRequires: %{_datadir}/selinux/devel/Makefile
-
-%description server
-This package provides a stand-alone bitcoin-core daemon. For most users, this
-package is only needed if they need a full-node without the graphical client.
-
-Some third party wallet software will want this package to provide the actual
-bitcoin-core node they use to connect to the network.
-
-If you use the graphical bitcoin-core client then you almost certainly do not
-need this package.
-
-%package utils
-Summary: Bitcoin utilities
-Group: Applications/System
-
-%description utils
-This package provides several command line utilities for interacting with a
-bitcoin-core daemon.
-
-The bitcoin-cli utility allows you to communicate and control a bitcoin daemon
-over RPC, the bitcoin-tx utility allows you to create a custom transaction, and
-the bench_bitcoin utility can be used to perform some benchmarks.
-
-This package contains utilities needed by the bitcoin-server package.
-
-
-%prep
-%setup -q
-%patch0 -p1 -b .libressl
-cp -p %{SOURCE10} ./bitcoin.conf.example
-tar -zxf %{SOURCE1}
-cp -p db-%{bdbv}.NC/LICENSE ./db-%{bdbv}.NC-LICENSE
-mkdir db4 SELinux
-cp -p %{SOURCE30} %{SOURCE31} %{SOURCE32} SELinux/
-
-
-%build
-CWD=`pwd`
-cd db-%{bdbv}.NC/build_unix/
-../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${CWD}/db4
-make install
-cd ../..
-
-./autogen.sh
-%configure LDFLAGS="-L${CWD}/db4/lib/" CPPFLAGS="-I${CWD}/db4/include/" --with-miniupnpc --enable-glibc-back-compat %{buildargs}
-make %{?_smp_mflags}
-
-pushd SELinux
-for selinuxvariant in %{selinux_variants}; do
- make NAME=${selinuxvariant} -f %{_datadir}/selinux/devel/Makefile
- mv bitcoin.pp bitcoin.pp.${selinuxvariant}
- make NAME=${selinuxvariant} -f %{_datadir}/selinux/devel/Makefile clean
-done
-popd
-
-
-%install
-make install DESTDIR=%{buildroot}
-
-mkdir -p -m755 %{buildroot}%{_sbindir}
-mv %{buildroot}%{_bindir}/bitcoind %{buildroot}%{_sbindir}/bitcoind
-
-# systemd stuff
-mkdir -p %{buildroot}%{_tmpfilesdir}
-cat <<EOF > %{buildroot}%{_tmpfilesdir}/bitcoin.conf
-d /run/bitcoind 0750 bitcoin bitcoin -
-EOF
-touch -a -m -t 201504280000 %{buildroot}%{_tmpfilesdir}/bitcoin.conf
-
-mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
-cat <<EOF > %{buildroot}%{_sysconfdir}/sysconfig/bitcoin
-# Provide options to the bitcoin daemon here, for example
-# OPTIONS="-testnet -disable-wallet"
-
-OPTIONS=""
-
-# System service defaults.
-# Don't change these unless you know what you're doing.
-CONFIG_FILE="%{_sysconfdir}/bitcoin/bitcoin.conf"
-DATA_DIR="%{_localstatedir}/lib/bitcoin"
-PID_FILE="/run/bitcoind/bitcoind.pid"
-EOF
-touch -a -m -t 201504280000 %{buildroot}%{_sysconfdir}/sysconfig/bitcoin
-
-mkdir -p %{buildroot}%{_unitdir}
-cat <<EOF > %{buildroot}%{_unitdir}/bitcoin.service
-[Unit]
-Description=Bitcoin daemon
-After=syslog.target network.target
-
-[Service]
-Type=forking
-ExecStart=%{_sbindir}/bitcoind -daemon -conf=\${CONFIG_FILE} -datadir=\${DATA_DIR} -pid=\${PID_FILE} \$OPTIONS
-EnvironmentFile=%{_sysconfdir}/sysconfig/bitcoin
-User=bitcoin
-Group=bitcoin
-
-Restart=on-failure
-PrivateTmp=true
-TimeoutStopSec=120
-TimeoutStartSec=60
-StartLimitInterval=240
-StartLimitBurst=5
-
-[Install]
-WantedBy=multi-user.target
-EOF
-touch -a -m -t 201504280000 %{buildroot}%{_unitdir}/bitcoin.service
-#end systemd stuff
-
-mkdir %{buildroot}%{_sysconfdir}/bitcoin
-mkdir -p %{buildroot}%{_localstatedir}/lib/bitcoin
-
-#SELinux
-for selinuxvariant in %{selinux_variants}; do
- install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
- install -p -m 644 SELinux/bitcoin.pp.${selinuxvariant} %{buildroot}%{_datadir}/selinux/${selinuxvariant}/bitcoin.pp
-done
-
-%if %{_buildqt}
-# qt icons
-install -D -p share/pixmaps/bitcoin.ico %{buildroot}%{_datadir}/pixmaps/bitcoin.ico
-install -p share/pixmaps/nsis-header.bmp %{buildroot}%{_datadir}/pixmaps/
-install -p share/pixmaps/nsis-wizard.bmp %{buildroot}%{_datadir}/pixmaps/
-install -p %{SOURCE100} %{buildroot}%{_datadir}/pixmaps/bitcoin.svg
-%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/bitcoin16.png -w16 -h16
-%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/bitcoin32.png -w32 -h32
-%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/bitcoin64.png -w64 -h64
-%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/bitcoin128.png -w128 -h128
-%{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps/bitcoin256.png -w256 -h256
-%{_bindir}/convert -resize 16x16 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/bitcoin16.xpm
-%{_bindir}/convert -resize 32x32 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/bitcoin32.xpm
-%{_bindir}/convert -resize 64x64 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/bitcoin64.xpm
-%{_bindir}/convert -resize 128x128 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/bitcoin128.xpm
-%{_bindir}/convert %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/bitcoin256.xpm
-touch %{buildroot}%{_datadir}/pixmaps/*.png -r %{SOURCE100}
-touch %{buildroot}%{_datadir}/pixmaps/*.xpm -r %{SOURCE100}
-
-# Desktop File - change the touch timestamp if modifying
-mkdir -p %{buildroot}%{_datadir}/applications
-cat <<EOF > %{buildroot}%{_datadir}/applications/bitcoin-core.desktop
-[Desktop Entry]
-Encoding=UTF-8
-Name=Bitcoin
-Comment=Bitcoin P2P Cryptocurrency
-Comment[fr]=Bitcoin, monnaie virtuelle cryptographique pair à pair
-Comment[tr]=Bitcoin, eşten eşe kriptografik sanal para birimi
-Exec=bitcoin-qt %u
-Terminal=false
-Type=Application
-Icon=bitcoin128
-MimeType=x-scheme-handler/bitcoin;
-Categories=Office;Finance;
-EOF
-# change touch date when modifying desktop
-touch -a -m -t 201511100546 %{buildroot}%{_datadir}/applications/bitcoin-core.desktop
-%{_bindir}/desktop-file-validate %{buildroot}%{_datadir}/applications/bitcoin-core.desktop
-
-# KDE protocol - change the touch timestamp if modifying
-mkdir -p %{buildroot}%{_datadir}/kde4/services
-cat <<EOF > %{buildroot}%{_datadir}/kde4/services/bitcoin-core.protocol
-[Protocol]
-exec=bitcoin-qt '%u'
-protocol=bitcoin
-input=none
-output=none
-helper=true
-listing=
-reading=false
-writing=false
-makedir=false
-deleting=false
-EOF
-# change touch date when modifying protocol
-touch -a -m -t 201511100546 %{buildroot}%{_datadir}/kde4/services/bitcoin-core.protocol
-%endif
-
-# man pages
-install -D -p %{SOURCE20} %{buildroot}%{_mandir}/man1/bitcoind.1
-install -p %{SOURCE21} %{buildroot}%{_mandir}/man1/bitcoin-cli.1
-%if %{_buildqt}
-install -p %{SOURCE22} %{buildroot}%{_mandir}/man1/bitcoin-qt.1
-%endif
-
-# nuke these, we do extensive testing of binaries in %%check before packaging
-rm -f %{buildroot}%{_bindir}/test_*
-
-%check
-make check
-srcdir=src test/bitcoin-util-test.py
-test/functional/test_runner.py --extended
-
-%post libs -p /sbin/ldconfig
-
-%postun libs -p /sbin/ldconfig
-
-%pre server
-getent group bitcoin >/dev/null || groupadd -r bitcoin
-getent passwd bitcoin >/dev/null ||
- useradd -r -g bitcoin -d /var/lib/bitcoin -s /sbin/nologin \
- -c "Bitcoin wallet server" bitcoin
-exit 0
-
-%post server
-%systemd_post bitcoin.service
-# SELinux
-if [ `%{_sbindir}/sestatus |grep -c "disabled"` -eq 0 ]; then
-for selinuxvariant in %{selinux_variants}; do
- %{_sbindir}/semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/bitcoin.pp &> /dev/null || :
-done
-%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 8332
-%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 8333
-%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 18332
-%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 18333
-%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 18443
-%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 18444
-%{_sbindir}/fixfiles -R bitcoin-server restore &> /dev/null || :
-%{_sbindir}/restorecon -R %{_localstatedir}/lib/bitcoin || :
-fi
-
-%posttrans server
-%{_bindir}/systemd-tmpfiles --create
-
-%preun server
-%systemd_preun bitcoin.service
-
-%postun server
-%systemd_postun bitcoin.service
-# SELinux
-if [ $1 -eq 0 ]; then
- if [ `%{_sbindir}/sestatus |grep -c "disabled"` -eq 0 ]; then
- %{_sbindir}/semanage port -d -p tcp 8332
- %{_sbindir}/semanage port -d -p tcp 8333
- %{_sbindir}/semanage port -d -p tcp 18332
- %{_sbindir}/semanage port -d -p tcp 18333
- %{_sbindir}/semanage port -d -p tcp 18443
- %{_sbindir}/semanage port -d -p tcp 18444
- for selinuxvariant in %{selinux_variants}; do
- %{_sbindir}/semodule -s ${selinuxvariant} -r bitcoin &> /dev/null || :
- done
- %{_sbindir}/fixfiles -R bitcoin-server restore &> /dev/null || :
- [ -d %{_localstatedir}/lib/bitcoin ] && \
- %{_sbindir}/restorecon -R %{_localstatedir}/lib/bitcoin &> /dev/null || :
- fi
-fi
-
-%clean
-rm -rf %{buildroot}
-
-%if %{_buildqt}
-%files core
-%defattr(-,root,root,-)
-%license COPYING db-%{bdbv}.NC-LICENSE
-%doc COPYING bitcoin.conf.example doc/README.md doc/bips.md doc/files.md doc/multiwallet-qt.md doc/reduce-traffic.md doc/release-notes.md doc/tor.md
-%attr(0755,root,root) %{_bindir}/bitcoin-qt
-%attr(0644,root,root) %{_datadir}/applications/bitcoin-core.desktop
-%attr(0644,root,root) %{_datadir}/kde4/services/bitcoin-core.protocol
-%attr(0644,root,root) %{_datadir}/pixmaps/*.ico
-%attr(0644,root,root) %{_datadir}/pixmaps/*.bmp
-%attr(0644,root,root) %{_datadir}/pixmaps/*.svg
-%attr(0644,root,root) %{_datadir}/pixmaps/*.png
-%attr(0644,root,root) %{_datadir}/pixmaps/*.xpm
-%attr(0644,root,root) %{_mandir}/man1/bitcoin-qt.1*
-%endif
-
-%files libs
-%defattr(-,root,root,-)
-%license COPYING
-%doc COPYING doc/README.md doc/shared-libraries.md
-%{_libdir}/lib*.so.*
-
-%files devel
-%defattr(-,root,root,-)
-%license COPYING
-%doc COPYING doc/README.md doc/developer-notes.md doc/shared-libraries.md
-%attr(0644,root,root) %{_includedir}/*.h
-%{_libdir}/*.so
-%{_libdir}/*.a
-%{_libdir}/*.la
-%attr(0644,root,root) %{_libdir}/pkgconfig/*.pc
-
-%files server
-%defattr(-,root,root,-)
-%license COPYING db-%{bdbv}.NC-LICENSE
-%doc COPYING bitcoin.conf.example doc/README.md doc/REST-interface.md doc/bips.md doc/dnsseed-policy.md doc/files.md doc/reduce-traffic.md doc/release-notes.md doc/tor.md
-%attr(0755,root,root) %{_sbindir}/bitcoind
-%attr(0644,root,root) %{_tmpfilesdir}/bitcoin.conf
-%attr(0644,root,root) %{_unitdir}/bitcoin.service
-%dir %attr(0750,bitcoin,bitcoin) %{_sysconfdir}/bitcoin
-%dir %attr(0750,bitcoin,bitcoin) %{_localstatedir}/lib/bitcoin
-%config(noreplace) %attr(0600,root,root) %{_sysconfdir}/sysconfig/bitcoin
-%attr(0644,root,root) %{_datadir}/selinux/*/*.pp
-%attr(0644,root,root) %{_mandir}/man1/bitcoind.1*
-
-%files utils
-%defattr(-,root,root,-)
-%license COPYING
-%doc COPYING bitcoin.conf.example doc/README.md
-%attr(0755,root,root) %{_bindir}/bitcoin-cli
-%attr(0755,root,root) %{_bindir}/bitcoin-tx
-%attr(0755,root,root) %{_bindir}/bench_bitcoin
-%attr(0644,root,root) %{_mandir}/man1/bitcoin-cli.1*
-
-
-
-%changelog
-* Fri Feb 26 2016 Alice Wonder <buildmaster@librelamp.com> - 0.12.0-2
-- Rename Qt package from bitcoin to bitcoin-core
-- Make building of the Qt package optional
-- When building the Qt package, default to Qt5 but allow building
-- against Qt4
-- Only run SELinux stuff in post scripts if it is not set to disabled
-
-* Wed Feb 24 2016 Alice Wonder <buildmaster@librelamp.com> - 0.12.0-1
-- Initial spec file for 0.12.0 release
-
-# This spec file is written from scratch but a lot of the packaging decisions are directly
-# based upon the 0.11.2 package spec file from https://www.ringingliberty.com/bitcoin/
diff --git a/contrib/rpm/bitcoin.te b/contrib/rpm/bitcoin.te
deleted file mode 100644
index d6231c591a..0000000000
--- a/contrib/rpm/bitcoin.te
+++ /dev/null
@@ -1,81 +0,0 @@
-policy_module(bitcoin, 1.100.1)
-
-########################################
-#
-# Declarations
-#
-
-type bitcoin_t;
-type bitcoin_exec_t;
-init_daemon_domain(bitcoin_t, bitcoin_exec_t)
-
-permissive bitcoin_t;
-
-type bitcoin_initrc_exec_t;
-init_script_file(bitcoin_initrc_exec_t)
-
-type bitcoin_conf_t;
-files_type(bitcoin_conf_t)
-
-type bitcoin_var_lib_t;
-files_type(bitcoin_var_lib_t)
-
-type bitcoin_var_run_t;
-files_type(bitcoin_var_run_t)
-
-type bitcoin_port_t;
-corenet_port(bitcoin_port_t)
-
-########################################
-#
-# bitcoin local policy
-#
-allow bitcoin_t self:process { fork };
-
-allow bitcoin_t self:fifo_file rw_fifo_file_perms;
-allow bitcoin_t self:unix_stream_socket create_stream_socket_perms;
-
-manage_dirs_pattern(bitcoin_t, bitcoin_conf_t, bitcoin_conf_t)
-manage_files_pattern(bitcoin_t, bitcoin_conf_t, bitcoin_conf_t)
-
-manage_dirs_pattern(bitcoin_t, bitcoin_var_lib_t, bitcoin_var_lib_t)
-manage_files_pattern(bitcoin_t, bitcoin_var_lib_t, bitcoin_var_lib_t)
-files_var_lib_filetrans(bitcoin_t, bitcoin_var_lib_t, { dir file })
-
-manage_dirs_pattern(bitcoin_t, bitcoin_var_run_t, bitcoin_var_run_t)
-manage_files_pattern(bitcoin_t, bitcoin_var_run_t, bitcoin_var_run_t)
-
-sysnet_dns_name_resolve(bitcoin_t)
-corenet_all_recvfrom_unlabeled(bitcoin_t)
-
-allow bitcoin_t self:tcp_socket create_stream_socket_perms;
-corenet_tcp_sendrecv_generic_if(bitcoin_t)
-corenet_tcp_sendrecv_generic_node(bitcoin_t)
-corenet_tcp_sendrecv_all_ports(bitcoin_t)
-corenet_tcp_bind_generic_node(bitcoin_t)
-
-gen_require(`
- type bitcoin_port_t;
-')
-allow bitcoin_t bitcoin_port_t:tcp_socket name_bind;
-
-gen_require(`
- type bitcoin_port_t;
-')
-allow bitcoin_t bitcoin_port_t:tcp_socket name_connect;
-
-domain_use_interactive_fds(bitcoin_t)
-
-files_read_etc_files(bitcoin_t)
-
-miscfiles_read_localization(bitcoin_t)
-
-sysnet_dns_name_resolve(bitcoin_t)
-
-allow bitcoin_t bitcoin_exec_t:file execute_no_trans;
-allow bitcoin_t self:process setsched;
-corecmd_exec_ls(bitcoin_t)
-corenet_tcp_connect_http_port(bitcoin_t)
-dev_read_urand(bitcoin_t)
-fs_getattr_xattr_fs(bitcoin_t)
-kernel_read_system_state(bitcoin_t)
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index c7982d4523..7fdd7612c3 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -8,7 +8,7 @@ $(package)_dependencies=openssl zlib
$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext
$(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
+$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_rcc_determinism.patch
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
$(package)_qttranslations_sha256_hash=9822084f8e2d2939ba39f4af4c0c2320e45d5996762a9423f833055607604ed8
@@ -94,6 +94,7 @@ $(package)_config_opts_i686_linux = -xplatform linux-g++-32
$(package)_config_opts_x86_64_linux = -xplatform linux-g++-64
$(package)_config_opts_mingw32 = -no-opengl -xplatform win32-g++ -device-option CROSS_COMPILE="$(host)-"
$(package)_build_env = QT_RCC_TEST=1
+$(package)_build_env += QT_RCC_SOURCE_DATE_OVERRIDE=1
endef
define $(package)_fetch_cmds
@@ -133,6 +134,7 @@ define $(package)_preprocess_cmds
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 &&\
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 && \
diff --git a/depends/patches/qt/fix_rcc_determinism.patch b/depends/patches/qt/fix_rcc_determinism.patch
new file mode 100644
index 0000000000..c1b07fe23a
--- /dev/null
+++ b/depends/patches/qt/fix_rcc_determinism.patch
@@ -0,0 +1,15 @@
+--- old/qtbase/src/tools/rcc/rcc.cpp
++++ new/qtbase/src/tools/rcc/rcc.cpp
+@@ -207,7 +207,11 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib)
+ if (lib.formatVersion() >= 2) {
+ // last modified time stamp
+ const QDateTime lastModified = m_fileInfo.lastModified();
+- lib.writeNumber8(quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0));
++ quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0);
++ static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong();
++ if (sourceDate != 0)
++ lastmod = sourceDate;
++ lib.writeNumber8(lastmod);
+ if (text || pass1)
+ lib.writeChar('\n');
+ }
diff --git a/doc/bips.md b/doc/bips.md
index 272cf4de29..eb29b036cc 100644
--- a/doc/bips.md
+++ b/doc/bips.md
@@ -1,4 +1,4 @@
-BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.16.0**):
+BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.17.0**):
* [`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)).
@@ -35,4 +35,5 @@ BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.16.0**):
* [`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 159`](https://github.com/bitcoin/bips/blob/master/bip-0159.mediawiki): NODE_NETWORK_LIMITED service bit [signaling only] is supported as of **v0.16.0** ([PR 11740](https://github.com/bitcoin/bitcoin/pull/11740)).
* [`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)).
+* [`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)).
diff --git a/doc/init.md b/doc/init.md
index d04f7d186a..239b74e4e1 100644
--- a/doc/init.md
+++ b/doc/init.md
@@ -44,7 +44,7 @@ This allows for running bitcoind without having to do any manual configuration.
relative to the data directory. `wallet` *only* supports relative paths.
For an example configuration file that describes the configuration settings,
-see `contrib/debian/examples/bitcoin.conf`.
+see `share/examples/bitcoin.conf`.
Paths
---------------------------------
diff --git a/doc/release-notes/release-notes-0.16.2.md b/doc/release-notes/release-notes-0.16.2.md
new file mode 100644
index 0000000000..d549748d25
--- /dev/null
+++ b/doc/release-notes/release-notes-0.16.2.md
@@ -0,0 +1,116 @@
+Bitcoin Core version 0.16.2 is now available from:
+
+ <https://bitcoincore.org/bin/bitcoin-core-0.16.2/>
+
+This is a new minor version release, with various bugfixes
+as well as updated translations.
+
+Please report bugs using the issue tracker at GitHub:
+
+ <https://github.com/bitcoin/bitcoin/issues>
+
+To receive security and update notifications, please subscribe to:
+
+ <https://bitcoincore.org/en/list/announcements/join/>
+
+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).
+
+The first time you run version 0.15.0 or newer, your chainstate database will be converted to a
+new format, which will take anywhere from a few minutes to half an hour,
+depending on the speed of your machine.
+
+Note that the block database format also changed in version 0.8.0 and there is no
+automatic upgrade code from before version 0.8 to version 0.15.0 or higher. Upgrading
+directly from 0.7.x and earlier without re-downloading the blockchain is not supported.
+However, as usual, old wallet versions are still supported.
+
+Downgrading warning
+-------------------
+
+Wallets created in 0.16 and later are not compatible with versions prior to 0.16
+and will not work if you try to use newly created wallets in older versions. Existing
+wallets that were created with older versions are not affected by this.
+
+Compatibility
+==============
+
+Bitcoin Core is extensively tested on multiple operating systems using
+the Linux kernel, macOS 10.8+, and Windows Vista and later. Windows XP is not supported.
+
+Bitcoin Core should also work on most other Unix-like systems but is not
+frequently tested on them.
+
+0.16.2 change log
+------------------
+
+### Wallet
+- #13622 `c04a4a5` Remove mapRequest tracking that just effects Qt display. (TheBlueMatt)
+- #12905 `cfc6f74` [rpcwallet] Clamp walletpassphrase value at 100M seconds (sdaftuar)
+- #13437 `ed82e71` wallet: Erase wtxOrderd wtx pointer on removeprunedfunds (MarcoFalke)
+
+### RPC and other APIs
+- #13451 `cbd2f70` rpc: expose CBlockIndex::nTx in getblock(header) (instagibbs)
+- #13507 `f7401c8` RPC: Fix parameter count check for importpubkey (kristapsk)
+- #13452 `6b9dc8c` rpc: have verifytxoutproof check the number of txns in proof structure (instagibbs)
+- #12837 `bf1f150` rpc: fix type mistmatch in `listreceivedbyaddress` (joemphilips)
+- #12743 `657dfc5` Fix csBestBlock/cvBlockChange waiting in rpc/mining (sipa)
+
+### GUI
+- #12432 `f78e7f6` [qt] send: Clear All also resets coin control options (Sjors)
+- #12617 `21dd512` gui: Show messages as text not html (laanwj)
+- #12793 `cf6feb7` qt: Avoid reseting on resetguisettigs=0 (MarcoFalke)
+
+### Build system
+- #13544 `9fd3e00` depends: Update Qt download url (fanquake)
+- #12573 `88d1a64` Fix compilation when compiler do not support `__builtin_clz*` (532479301)
+
+### Tests and QA
+- #13061 `170b309` Make tests pass after 2020 (bmwiedemann)
+- #13192 `79c4fff` [tests] Fixed intermittent failure in `p2p_sendheaders.py` (lmanners)
+- #13300 `d9c5630` qa: Initialize lockstack to prevent null pointer deref (MarcoFalke)
+- #13545 `e15e3a9` tests: Fix test case `streams_serializedata_xor` Remove Boost dependency. (practicalswift)
+- #13304 `cbdabef` qa: Fix `wallet_listreceivedby` race (MarcoFalke)
+
+### Miscellaneous
+- #12887 `2291774` Add newlines to end of log messages (jnewbery)
+- #12859 `18b0c69` Bugfix: Include <memory> for `std::unique_ptr` (luke-jr)
+- #13131 `ce8aa54` Add Windows shutdown handler (ken2812221)
+- #13652 `20461fc` rpc: Fix that CWallet::AbandonTransaction would leave the grandchildren, etc. active (Empact)
+
+Credits
+=======
+
+Thanks to everyone who directly contributed to this release:
+
+- 532479301
+- Ben Woosley
+- Bernhard M. Wiedemann
+- Chun Kuan Lee
+- Cory Fields
+- fanquake
+- Gregory Sanders
+- joemphilips
+- John Newbery
+- Kristaps Kaupe
+- lmanners
+- Luke Dashjr
+- MarcoFalke
+- Matt Corallo
+- Pieter Wuille
+- practicalswift
+- Sjors Provoost
+- Suhas Daftuar
+- Wladimir J. van der Laan
+
+And to those that reported security issues:
+
+- Braydon Fuller
+- Himanshu Mehta
+
+As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/).
diff --git a/contrib/debian/examples/bitcoin.conf b/share/examples/bitcoin.conf
index 4dd73162a2..4dd73162a2 100644
--- a/contrib/debian/examples/bitcoin.conf
+++ b/share/examples/bitcoin.conf
diff --git a/src/bench/block_assemble.cpp b/src/bench/block_assemble.cpp
index 36fa175a76..9b53c6b023 100644
--- a/src/bench/block_assemble.cpp
+++ b/src/bench/block_assemble.cpp
@@ -97,10 +97,14 @@ static void AssembleBlock(benchmark::State& state)
if (NUM_BLOCKS - b >= COINBASE_MATURITY)
txs.at(b) = MakeTransactionRef(tx);
}
- for (const auto& txr : txs) {
- CValidationState state;
- bool ret{::AcceptToMemoryPool(::mempool, state, txr, nullptr /* pfMissingInputs */, nullptr /* plTxnReplaced */, false /* bypass_limits */, /* nAbsurdFee */ 0)};
- assert(ret);
+ {
+ LOCK(::cs_main); // Required for ::AcceptToMemoryPool.
+
+ for (const auto& txr : txs) {
+ CValidationState state;
+ bool ret{::AcceptToMemoryPool(::mempool, state, txr, nullptr /* pfMissingInputs */, nullptr /* plTxnReplaced */, false /* bypass_limits */, /* nAbsurdFee */ 0)};
+ assert(ret);
+ }
}
while (state.KeepRunning()) {
diff --git a/src/bench/coin_selection.cpp b/src/bench/coin_selection.cpp
index 7510d53c88..20013d702b 100644
--- a/src/bench/coin_selection.cpp
+++ b/src/bench/coin_selection.cpp
@@ -21,7 +21,7 @@ static void addCoin(const CAmount& nValue, const CWallet& wallet, std::vector<Ou
int nAge = 6 * 24;
COutput output(wtx, nInput, nAge, true /* spendable */, true /* solvable */, true /* safe */);
- groups.emplace_back(output.GetInputCoin(), 0, false, 0, 0);
+ groups.emplace_back(output.GetInputCoin(), 6, false, 0, 0);
}
// Simple benchmark for wallet coin selection. Note that it maybe be necessary
diff --git a/src/bench/mempool_eviction.cpp b/src/bench/mempool_eviction.cpp
index 4c947a519f..d37291b900 100644
--- a/src/bench/mempool_eviction.cpp
+++ b/src/bench/mempool_eviction.cpp
@@ -9,7 +9,7 @@
#include <list>
#include <vector>
-static void AddTx(const CTransactionRef& tx, const CAmount& nFee, CTxMemPool& pool)
+static void AddTx(const CTransactionRef& tx, const CAmount& nFee, CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(pool.cs)
{
int64_t nTime = 0;
unsigned int nHeight = 1;
@@ -108,6 +108,7 @@ static void MempoolEviction(benchmark::State& state)
tx7.vout[1].nValue = 10 * COIN;
CTxMemPool pool;
+ LOCK(pool.cs);
// Create transaction references outside the "hot loop"
const CTransactionRef tx1_r{MakeTransactionRef(tx1)};
const CTransactionRef tx2_r{MakeTransactionRef(tx2)};
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 5c711c0773..4d010c0d14 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -96,7 +96,7 @@ static bool AppInit(int argc, char* argv[])
fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", gArgs.GetArg("-datadir", "").c_str());
return false;
}
- if (!gArgs.ReadConfigFiles(error)) {
+ if (!gArgs.ReadConfigFiles(error, true)) {
fprintf(stderr, "Error reading configuration file: %s\n", error.c_str());
return false;
}
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 71762158f0..b517717c97 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -102,10 +102,10 @@ public:
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1510704000; // November 15th, 2017.
// The best chain should have at least this much work.
- consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000f91c579d57cad4bc5278cc");
+ consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000028822fef1c230963535a90d");
// By default assume that the signatures in ancestors of this block are valid.
- consensus.defaultAssumeValid = uint256S("0x0000000000000000005214481d2d96f898e3d5416e43359c145944a909d242e0"); //506067
+ consensus.defaultAssumeValid = uint256S("0x0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8"); //534292
/**
* The message start string is designed to be unlikely to occur in normal data.
@@ -170,11 +170,10 @@ public:
};
chainTxData = ChainTxData{
- // Data as of block 0000000000000000002d6cca6761c99b3c2e936f9a0e304b7c7651a993f461de (height 506081).
- 1516903077, // * UNIX timestamp of last known number of transactions
- 295363220, // * total number of transactions between genesis and that timestamp
- // (the tx=... number in the ChainStateFlushed debug.log lines)
- 3.5 // * estimated number of transactions per second after that timestamp
+ // Data from rpc: getchaintxstats 4096 0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8
+ /* nTime */ 1532884444,
+ /* nTxCount */ 331282217,
+ /* dTxRate */ 2.4
};
/* disable fallback fee on mainnet */
@@ -217,10 +216,10 @@ public:
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1493596800; // May 1st 2017
// The best chain should have at least this much work.
- consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000002830dab7f76dbb7d63");
+ consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000007dbe94253893cbd463");
// By default assume that the signatures in ancestors of this block are valid.
- consensus.defaultAssumeValid = uint256S("0x0000000002e9e7b00e1f6dc5123a04aad68dd0f0968d8c7aa45f6640795c37b1"); //1135275
+ consensus.defaultAssumeValid = uint256S("0x0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75"); //1354312
pchMessageStart[0] = 0x0b;
pchMessageStart[1] = 0x11;
@@ -264,10 +263,10 @@ public:
};
chainTxData = ChainTxData{
- // Data as of block 000000000000033cfa3c975eb83ecf2bb4aaedf68e6d279f6ed2b427c64caff9 (height 1260526)
- 1516903490,
- 17082348,
- 0.09
+ // Data from rpc: getchaintxstats 4096 0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75
+ /* nTime */ 1531929919,
+ /* nTxCount */ 19438708,
+ /* dTxRate */ 0.626
};
/* enable fallback fee on testnet */
diff --git a/src/chainparams.h b/src/chainparams.h
index dd029b9d5b..344cbb1a8a 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -32,9 +32,9 @@ struct CCheckpointData {
* See also: CChainParams::TxData, GuessVerificationProgress.
*/
struct ChainTxData {
- int64_t nTime;
- int64_t nTxCount;
- double dTxRate;
+ int64_t nTime; //!< UNIX timestamp of last known number of transactions
+ int64_t nTxCount; //!< total number of transactions between genesis and that timestamp
+ double dTxRate; //!< estimated number of transactions per second after that timestamp
};
/**
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index bd08b04c0f..9daf3d1968 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -279,7 +279,7 @@ static void http_reject_request_cb(struct evhttp_request* req, void*)
}
/** Event dispatcher thread */
-static bool ThreadHTTP(struct event_base* base, struct evhttp* http)
+static bool ThreadHTTP(struct event_base* base)
{
RenameThread("bitcoin-http");
LogPrint(BCLog::HTTP, "Entering http event loop\n");
@@ -423,19 +423,18 @@ std::thread threadHTTP;
std::future<bool> threadResult;
static std::vector<std::thread> g_thread_http_workers;
-bool StartHTTPServer()
+void StartHTTPServer()
{
LogPrint(BCLog::HTTP, "Starting HTTP server\n");
int rpcThreads = std::max((long)gArgs.GetArg("-rpcthreads", DEFAULT_HTTP_THREADS), 1L);
LogPrintf("HTTP: starting %d worker threads\n", rpcThreads);
- std::packaged_task<bool(event_base*, evhttp*)> task(ThreadHTTP);
+ std::packaged_task<bool(event_base*)> task(ThreadHTTP);
threadResult = task.get_future();
- threadHTTP = std::thread(std::move(task), eventBase, eventHTTP);
+ threadHTTP = std::thread(std::move(task), eventBase);
for (int i = 0; i < rpcThreads; i++) {
g_thread_http_workers.emplace_back(HTTPWorkQueueRun, workQueue);
}
- return true;
}
void InterruptHTTPServer()
diff --git a/src/httpserver.h b/src/httpserver.h
index 8132c887b5..8a3adaf91f 100644
--- a/src/httpserver.h
+++ b/src/httpserver.h
@@ -26,7 +26,7 @@ bool InitHTTPServer();
* This is separate from InitHTTPServer to give users race-condition-free time
* to register their handlers between InitHTTPServer and StartHTTPServer.
*/
-bool StartHTTPServer();
+void StartHTTPServer();
/** Interrupt HTTP server threads */
void InterruptHTTPServer();
/** Stop HTTP server */
diff --git a/src/init.cpp b/src/init.cpp
index c7ea40817d..18402ef5d7 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -731,14 +731,12 @@ static bool AppInitServers()
RPCServer::OnStopped(&OnRPCStopped);
if (!InitHTTPServer())
return false;
- if (!StartRPC())
- return false;
+ StartRPC();
if (!StartHTTPRPC())
return false;
if (gArgs.GetBoolArg("-rest", DEFAULT_REST_ENABLE) && !StartREST())
return false;
- if (!StartHTTPServer())
- return false;
+ StartHTTPServer();
return true;
}
@@ -927,7 +925,7 @@ bool AppInitParameterInteraction()
// also see: InitParameterInteraction()
if (!fs::is_directory(GetBlocksDir(false))) {
- return InitError(strprintf(_("Specified blocks directory \"%s\" does not exist.\n"), gArgs.GetArg("-blocksdir", "").c_str()));
+ return InitError(strprintf(_("Specified blocks directory \"%s\" does not exist."), gArgs.GetArg("-blocksdir", "").c_str()));
}
// if using block pruning, then disallow txindex
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp
index db371d104e..106dd38f60 100644
--- a/src/interfaces/node.cpp
+++ b/src/interfaces/node.cpp
@@ -53,7 +53,7 @@ class NodeImpl : public Node
{
return gArgs.ParseParameters(argc, argv, error);
}
- bool readConfigFiles(std::string& error) override { return gArgs.ReadConfigFiles(error); }
+ bool readConfigFiles(std::string& error) override { return gArgs.ReadConfigFiles(error, true); }
bool softSetArg(const std::string& arg, const std::string& value) override { return gArgs.SoftSetArg(arg, value); }
bool softSetBoolArg(const std::string& arg, bool value) override { return gArgs.SoftSetBoolArg(arg, value); }
void selectParams(const std::string& network) override { SelectParams(network); }
diff --git a/src/miner.cpp b/src/miner.cpp
index 738ccad1b9..c32dc26f86 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -64,7 +64,7 @@ BlockAssembler::BlockAssembler(const CChainParams& params, const Options& option
nBlockMaxWeight = std::max<size_t>(4000, std::min<size_t>(MAX_BLOCK_WEIGHT - 4000, options.nBlockMaxWeight));
}
-static BlockAssembler::Options DefaultOptions(const CChainParams& params)
+static BlockAssembler::Options DefaultOptions()
{
// Block resource limits
// If -blockmaxweight is not given, limit to DEFAULT_BLOCK_MAX_WEIGHT
@@ -80,7 +80,7 @@ static BlockAssembler::Options DefaultOptions(const CChainParams& params)
return options;
}
-BlockAssembler::BlockAssembler(const CChainParams& params) : BlockAssembler(params, DefaultOptions(params)) {}
+BlockAssembler::BlockAssembler(const CChainParams& params) : BlockAssembler(params, DefaultOptions()) {}
void BlockAssembler::resetBlock()
{
diff --git a/src/net.cpp b/src/net.cpp
index 67a73fa9fc..0ebfefa757 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -235,12 +235,11 @@ bool AddLocal(const CNetAddr &addr, int nScore)
return AddLocal(CService(addr, GetListenPort()), nScore);
}
-bool RemoveLocal(const CService& addr)
+void RemoveLocal(const CService& addr)
{
LOCK(cs_mapLocalHost);
LogPrintf("RemoveLocal(%s)\n", addr.ToString());
mapLocalHost.erase(addr);
- return true;
}
/** Make a particular network entirely off-limits (no automatic connects to it) */
diff --git a/src/net.h b/src/net.h
index 607b2fc53c..36c2a4b8f5 100644
--- a/src/net.h
+++ b/src/net.h
@@ -505,7 +505,7 @@ bool IsLimited(enum Network net);
bool IsLimited(const CNetAddr& addr);
bool AddLocal(const CService& addr, int nScore = LOCAL_NONE);
bool AddLocal(const CNetAddr& addr, int nScore = LOCAL_NONE);
-bool RemoveLocal(const CService& addr);
+void RemoveLocal(const CService& addr);
bool SeenLocal(const CService& addr);
bool IsLocal(const CService& addr);
bool GetLocal(CService &addr, const CNetAddr *paddrPeer = nullptr);
diff --git a/src/netaddress.cpp b/src/netaddress.cpp
index 5ccbabd03d..193582d14e 100644
--- a/src/netaddress.cpp
+++ b/src/netaddress.cpp
@@ -300,6 +300,9 @@ bool CNetAddr::GetInAddr(struct in_addr* pipv4Addr) const
bool CNetAddr::GetIn6Addr(struct in6_addr* pipv6Addr) const
{
+ if (!IsIPv6()) {
+ return false;
+ }
memcpy(pipv6Addr, ip, 16);
return true;
}
diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp
index b420e9d8b3..e46bf2f765 100644
--- a/src/rpc/server.cpp
+++ b/src/rpc/server.cpp
@@ -301,12 +301,11 @@ bool CRPCTable::appendCommand(const std::string& name, const CRPCCommand* pcmd)
return true;
}
-bool StartRPC()
+void StartRPC()
{
LogPrint(BCLog::RPC, "Starting RPC\n");
fRPCRunning = true;
g_rpcSignals.Started();
- return true;
}
void InterruptRPC()
diff --git a/src/rpc/server.h b/src/rpc/server.h
index 373914885c..a9dbfbd21f 100644
--- a/src/rpc/server.h
+++ b/src/rpc/server.h
@@ -198,7 +198,7 @@ extern CAmount AmountFromValue(const UniValue& value);
extern std::string HelpExampleCli(const std::string& methodname, const std::string& args);
extern std::string HelpExampleRpc(const std::string& methodname, const std::string& args);
-bool StartRPC();
+void StartRPC();
void InterruptRPC();
void StopRPC();
std::string JSONRPCExecBatch(const JSONRPCRequest& jreq, const UniValue& vReq);
diff --git a/src/scheduler.h b/src/scheduler.h
index 7169dceee5..421002ec17 100644
--- a/src/scheduler.h
+++ b/src/scheduler.h
@@ -86,9 +86,13 @@ private:
/**
* Class used by CScheduler clients which may schedule multiple jobs
- * which are required to be run serially. Does not require such jobs
- * to be executed on the same thread, but no two jobs will be executed
- * at the same time.
+ * which are required to be run serially. Jobs may not be run on the
+ * same thread, but no two jobs will be executed
+ * at the same time and memory will be release-acquire consistent
+ * (the scheduler will internally do an acquire before invoking a callback
+ * as well as a release at the end). In practice this means that a callback
+ * B() will be able to observe all of the effects of callback A() which executed
+ * before it.
*/
class SingleThreadedSchedulerClient {
private:
@@ -103,6 +107,13 @@ private:
public:
explicit SingleThreadedSchedulerClient(CScheduler *pschedulerIn) : m_pscheduler(pschedulerIn) {}
+
+ /**
+ * Add a callback to be executed. Callbacks are executed serially
+ * and memory is sequentially consistent between callback executions.
+ * Practially, this means that callbacks can behave as if they are executed
+ * in order by a single thread.
+ */
void AddToProcessQueue(std::function<void (void)> func);
// Processes all remaining queue members on the calling thread, blocking until queue is empty
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 1936d44cd5..be2138d502 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -1588,7 +1588,7 @@ bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const C
return set_success(serror);
}
-size_t static WitnessSigOps(int witversion, const std::vector<unsigned char>& witprogram, const CScriptWitness& witness, int flags)
+size_t static WitnessSigOps(int witversion, const std::vector<unsigned char>& witprogram, const CScriptWitness& witness)
{
if (witversion == 0) {
if (witprogram.size() == WITNESS_V0_KEYHASH_SIZE)
@@ -1616,7 +1616,7 @@ size_t CountWitnessSigOps(const CScript& scriptSig, const CScript& scriptPubKey,
int witnessversion;
std::vector<unsigned char> witnessprogram;
if (scriptPubKey.IsWitnessProgram(witnessversion, witnessprogram)) {
- return WitnessSigOps(witnessversion, witnessprogram, witness ? *witness : witnessEmpty, flags);
+ return WitnessSigOps(witnessversion, witnessprogram, witness ? *witness : witnessEmpty);
}
if (scriptPubKey.IsPayToScriptHash() && scriptSig.IsPushOnly()) {
@@ -1628,7 +1628,7 @@ size_t CountWitnessSigOps(const CScript& scriptSig, const CScript& scriptPubKey,
}
CScript subscript(data.begin(), data.end());
if (subscript.IsWitnessProgram(witnessversion, witnessprogram)) {
- return WitnessSigOps(witnessversion, witnessprogram, witness ? *witness : witnessEmpty, flags);
+ return WitnessSigOps(witnessversion, witnessprogram, witness ? *witness : witnessEmpty);
}
}
diff --git a/src/test/blockencodings_tests.cpp b/src/test/blockencodings_tests.cpp
index 3dd5356164..df839884fe 100644
--- a/src/test/blockencodings_tests.cpp
+++ b/src/test/blockencodings_tests.cpp
@@ -62,8 +62,8 @@ BOOST_AUTO_TEST_CASE(SimpleRoundTripTest)
TestMemPoolEntryHelper entry;
CBlock block(BuildBlockTestCase());
- pool.addUnchecked(block.vtx[2]->GetHash(), entry.FromTx(block.vtx[2]));
LOCK(pool.cs);
+ pool.addUnchecked(block.vtx[2]->GetHash(), entry.FromTx(block.vtx[2]));
BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[2]->GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 0);
// Do a simple ShortTxIDs RT
@@ -162,8 +162,8 @@ BOOST_AUTO_TEST_CASE(NonCoinbasePreforwardRTTest)
TestMemPoolEntryHelper entry;
CBlock block(BuildBlockTestCase());
- pool.addUnchecked(block.vtx[2]->GetHash(), entry.FromTx(block.vtx[2]));
LOCK(pool.cs);
+ pool.addUnchecked(block.vtx[2]->GetHash(), entry.FromTx(block.vtx[2]));
BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[2]->GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 0);
uint256 txhash;
@@ -232,8 +232,8 @@ BOOST_AUTO_TEST_CASE(SufficientPreforwardRTTest)
TestMemPoolEntryHelper entry;
CBlock block(BuildBlockTestCase());
- pool.addUnchecked(block.vtx[1]->GetHash(), entry.FromTx(block.vtx[1]));
LOCK(pool.cs);
+ pool.addUnchecked(block.vtx[1]->GetHash(), entry.FromTx(block.vtx[1]));
BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[1]->GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 0);
uint256 txhash;
diff --git a/src/test/mempool_tests.cpp b/src/test/mempool_tests.cpp
index e2d76dc293..fb80599af7 100644
--- a/src/test/mempool_tests.cpp
+++ b/src/test/mempool_tests.cpp
@@ -55,6 +55,7 @@ BOOST_AUTO_TEST_CASE(MempoolRemoveTest)
CTxMemPool testPool;
+ LOCK(testPool.cs);
// Nothing in pool, remove should do nothing:
unsigned int poolSize = testPool.size();
@@ -119,6 +120,7 @@ static void CheckSort(CTxMemPool &pool, std::vector<std::string> &sortedOrder) E
BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
{
CTxMemPool pool;
+ LOCK(pool.cs);
TestMemPoolEntryHelper entry;
/* 3rd highest fee */
@@ -165,7 +167,6 @@ BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
sortedOrder[2] = tx1.GetHash().ToString(); // 10000
sortedOrder[3] = tx4.GetHash().ToString(); // 15000
sortedOrder[4] = tx2.GetHash().ToString(); // 20000
- LOCK(pool.cs);
CheckSort<descendant_score>(pool, sortedOrder);
/* low fee but with high fee child */
@@ -292,6 +293,7 @@ BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)
{
CTxMemPool pool;
+ LOCK(pool.cs);
TestMemPoolEntryHelper entry;
/* 3rd highest fee */
@@ -347,7 +349,6 @@ BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)
}
sortedOrder[4] = tx3.GetHash().ToString(); // 0
- LOCK(pool.cs);
CheckSort<ancestor_score>(pool, sortedOrder);
/* low fee parent with high fee child */
@@ -421,6 +422,7 @@ BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)
BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
{
CTxMemPool pool;
+ LOCK(pool.cs);
TestMemPoolEntryHelper entry;
CMutableTransaction tx1 = CMutableTransaction();
@@ -593,6 +595,7 @@ BOOST_AUTO_TEST_CASE(MempoolAncestryTests)
size_t ancestors, descendants;
CTxMemPool pool;
+ LOCK(pool.cs);
TestMemPoolEntryHelper entry;
/* Base transaction */
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index 10c7fd00e8..e2424f012d 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -99,7 +99,7 @@ static bool TestSequenceLocks(const CTransaction &tx, int flags)
// Test suite for ancestor feerate transaction selection.
// Implemented as an additional function, rather than a separate test case,
// to allow reusing the blockchain created in CreateNewBlock_validity.
-static void TestPackageSelection(const CChainParams& chainparams, CScript scriptPubKey, std::vector<CTransactionRef>& txFirst)
+static void TestPackageSelection(const CChainParams& chainparams, const CScript& scriptPubKey, const std::vector<CTransactionRef>& txFirst) EXCLUSIVE_LOCKS_REQUIRED(::mempool.cs)
{
// Test the ancestor feerate transaction selection.
TestMemPoolEntryHelper entry;
@@ -253,6 +253,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
}
LOCK(cs_main);
+ LOCK(::mempool.cs);
// Just to make sure we can still make simple blocks
BOOST_CHECK(pblocktemplate = AssemblerForTest(chainparams).CreateNewBlock(scriptPubKey));
diff --git a/src/test/policyestimator_tests.cpp b/src/test/policyestimator_tests.cpp
index 8d288ec993..e45fb6d17e 100644
--- a/src/test/policyestimator_tests.cpp
+++ b/src/test/policyestimator_tests.cpp
@@ -18,6 +18,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
{
CBlockPolicyEstimator feeEst;
CTxMemPool mpool(&feeEst);
+ LOCK(mpool.cs);
TestMemPoolEntryHelper entry;
CAmount basefee(2000);
CAmount deltaFee(100);
diff --git a/src/test/scheduler_tests.cpp b/src/test/scheduler_tests.cpp
index 179df7dd38..b1ea4b6fab 100644
--- a/src/test/scheduler_tests.cpp
+++ b/src/test/scheduler_tests.cpp
@@ -65,7 +65,7 @@ BOOST_AUTO_TEST_CASE(manythreads)
size_t nTasks = microTasks.getQueueInfo(first, last);
BOOST_CHECK(nTasks == 0);
- for (int i = 0; i < 100; i++) {
+ for (int i = 0; i < 100; ++i) {
boost::chrono::system_clock::time_point t = now + boost::chrono::microseconds(randomMsec(rng));
boost::chrono::system_clock::time_point tReschedule = now + boost::chrono::microseconds(500 + randomMsec(rng));
int whichCounter = zeroToNine(rng);
@@ -112,4 +112,46 @@ BOOST_AUTO_TEST_CASE(manythreads)
BOOST_CHECK_EQUAL(counterSum, 200);
}
+BOOST_AUTO_TEST_CASE(singlethreadedscheduler_ordered)
+{
+ CScheduler scheduler;
+
+ // each queue should be well ordered with respect to itself but not other queues
+ SingleThreadedSchedulerClient queue1(&scheduler);
+ SingleThreadedSchedulerClient queue2(&scheduler);
+
+ // create more threads than queues
+ // if the queues only permit execution of one task at once then
+ // the extra threads should effectively be doing nothing
+ // if they don't we'll get out of order behaviour
+ boost::thread_group threads;
+ for (int i = 0; i < 5; ++i) {
+ threads.create_thread(boost::bind(&CScheduler::serviceQueue, &scheduler));
+ }
+
+ // these are not atomic, if SinglethreadedSchedulerClient prevents
+ // parallel execution at the queue level no synchronization should be required here
+ int counter1 = 0;
+ int counter2 = 0;
+
+ // just simply count up on each queue - if execution is properly ordered then
+ // the callbacks should run in exactly the order in which they were enqueued
+ for (int i = 0; i < 100; ++i) {
+ queue1.AddToProcessQueue([i, &counter1]() {
+ BOOST_CHECK_EQUAL(i, counter1++);
+ });
+
+ queue2.AddToProcessQueue([i, &counter2]() {
+ BOOST_CHECK_EQUAL(i, counter2++);
+ });
+ }
+
+ // finish up
+ scheduler.stop(true);
+ threads.join_all();
+
+ BOOST_CHECK_EQUAL(counter1, 100);
+ BOOST_CHECK_EQUAL(counter2, 100);
+}
+
BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp
index 1f42ab8fa8..fbc193c2cf 100644
--- a/src/torcontrol.cpp
+++ b/src/torcontrol.cpp
@@ -91,7 +91,7 @@ public:
/**
* Disconnect from Tor control port.
*/
- bool Disconnect();
+ void Disconnect();
/** Send a command, register a handler for the reply.
* A trailing CRLF is automatically added.
@@ -223,12 +223,11 @@ bool TorControlConnection::Connect(const std::string &target, const ConnectionCB
return true;
}
-bool TorControlConnection::Disconnect()
+void TorControlConnection::Disconnect()
{
if (b_conn)
bufferevent_free(b_conn);
b_conn = nullptr;
- return true;
}
bool TorControlConnection::Command(const std::string &cmd, const ReplyHandlerCB& reply_handler)
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 1fc7919442..cbea550739 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -160,9 +160,8 @@ bool CBlockTreeDB::WriteReindexing(bool fReindexing) {
return Erase(DB_REINDEX_FLAG);
}
-bool CBlockTreeDB::ReadReindexing(bool &fReindexing) {
+void CBlockTreeDB::ReadReindexing(bool &fReindexing) {
fReindexing = Exists(DB_REINDEX_FLAG);
- return true;
}
bool CBlockTreeDB::ReadLastBlockFile(int &nFile) {
diff --git a/src/txdb.h b/src/txdb.h
index 100adb428d..84011097ce 100644
--- a/src/txdb.h
+++ b/src/txdb.h
@@ -92,7 +92,7 @@ public:
bool ReadBlockFileInfo(int nFile, CBlockFileInfo &info);
bool ReadLastBlockFile(int &nFile);
bool WriteReindexing(bool fReindexing);
- bool ReadReindexing(bool &fReindexing);
+ void ReadReindexing(bool &fReindexing);
bool WriteFlag(const std::string &name, bool fValue);
bool ReadFlag(const std::string &name, bool &fValue);
bool LoadBlockIndexGuts(const Consensus::Params& consensusParams, std::function<CBlockIndex*(const uint256&)> insertBlockIndex);
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 2108e6ba2d..d68c38ad4e 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -151,8 +151,6 @@ void CTxMemPool::UpdateTransactionsFromBlock(const std::vector<uint256> &vHashes
bool CTxMemPool::CalculateMemPoolAncestors(const CTxMemPoolEntry &entry, setEntries &setAncestors, uint64_t limitAncestorCount, uint64_t limitAncestorSize, uint64_t limitDescendantCount, uint64_t limitDescendantSize, std::string &errString, bool fSearchForParents /* = true */) const
{
- LOCK(cs);
-
setEntries parentHashes;
const CTransaction &tx = entry.GetTx();
@@ -357,13 +355,12 @@ void CTxMemPool::AddTransactionsUpdated(unsigned int n)
nTransactionsUpdated += n;
}
-bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, setEntries &setAncestors, bool validFeeEstimate)
+void CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, setEntries &setAncestors, bool validFeeEstimate)
{
NotifyEntryAdded(entry.GetSharedTx());
// Add to memory pool without checking anything.
// Used by AcceptToMemoryPool(), which DOES do
// all the appropriate checks.
- LOCK(cs);
indexed_transaction_set::iterator newit = mapTx.insert(entry).first;
mapLinks.insert(make_pair(newit, TxLinks()));
@@ -412,8 +409,6 @@ bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry,
vTxHashes.emplace_back(tx.GetWitnessHash(), newit);
newit->vTxHashesIdx = vTxHashes.size() - 1;
-
- return true;
}
void CTxMemPool::removeUnchecked(txiter it, MemPoolRemovalReason reason)
@@ -933,9 +928,8 @@ int CTxMemPool::Expire(int64_t time) {
return stage.size();
}
-bool CTxMemPool::addUnchecked(const uint256&hash, const CTxMemPoolEntry &entry, bool validFeeEstimate)
+void CTxMemPool::addUnchecked(const uint256&hash, const CTxMemPoolEntry &entry, bool validFeeEstimate)
{
- LOCK(cs);
setEntries setAncestors;
uint64_t nNoLimit = std::numeric_limits<uint64_t>::max();
std::string dummy;
diff --git a/src/txmempool.h b/src/txmempool.h
index f3b8a68a9d..0feea08f0b 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -539,8 +539,8 @@ public:
// Note that addUnchecked is ONLY called from ATMP outside of tests
// and any other callers may break wallet's in-mempool tracking (due to
// lack of CValidationInterface::TransactionAddedToMempool callbacks).
- bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, bool validFeeEstimate = true);
- bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, setEntries &setAncestors, bool validFeeEstimate = true);
+ void addUnchecked(const uint256& hash, const CTxMemPoolEntry& entry, bool validFeeEstimate = true) EXCLUSIVE_LOCKS_REQUIRED(cs);
+ void addUnchecked(const uint256& hash, const CTxMemPoolEntry& entry, setEntries& setAncestors, bool validFeeEstimate = true) EXCLUSIVE_LOCKS_REQUIRED(cs);
void removeRecursive(const CTransaction &tx, MemPoolRemovalReason reason = MemPoolRemovalReason::UNKNOWN);
void removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMemPoolHeight, int flags);
@@ -596,7 +596,7 @@ public:
* fSearchForParents = whether to search a tx's vin for in-mempool parents, or
* look up parents from mapLinks. Must be true for entries not in the mempool
*/
- bool CalculateMemPoolAncestors(const CTxMemPoolEntry &entry, setEntries &setAncestors, uint64_t limitAncestorCount, uint64_t limitAncestorSize, uint64_t limitDescendantCount, uint64_t limitDescendantSize, std::string &errString, bool fSearchForParents = true) const;
+ bool CalculateMemPoolAncestors(const CTxMemPoolEntry& entry, setEntries& setAncestors, uint64_t limitAncestorCount, uint64_t limitAncestorSize, uint64_t limitDescendantCount, uint64_t limitDescendantSize, std::string& errString, bool fSearchForParents = true) const EXCLUSIVE_LOCKS_REQUIRED(cs);
/** Populate setDescendants with all in-mempool descendants of hash.
* Assumes that setDescendants includes all in-mempool descendants of anything
diff --git a/src/util.cpp b/src/util.cpp
index 2f81f50a71..238554ee4a 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -859,9 +859,13 @@ bool ArgsManager::ReadConfigStream(std::istream& stream, std::string& error, boo
}
// Check that the arg is known
- if (!IsArgKnown(strKey) && !ignore_invalid_keys) {
- error = strprintf("Invalid configuration value %s", option.first.c_str());
- return false;
+ if (!IsArgKnown(strKey)) {
+ if (!ignore_invalid_keys) {
+ error = strprintf("Invalid configuration value %s", option.first.c_str());
+ return false;
+ } else {
+ LogPrintf("Ignoring unknown configuration value %s\n", option.first);
+ }
}
}
return true;
diff --git a/src/validation.cpp b/src/validation.cpp
index f1b63b5b44..702a8d7e05 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -178,7 +178,7 @@ public:
// Manual block validity manipulation:
bool PreciousBlock(CValidationState& state, const CChainParams& params, CBlockIndex* pindex) LOCKS_EXCLUDED(cs_main);
bool InvalidateBlock(CValidationState& state, const CChainParams& chainparams, CBlockIndex* pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
- bool ResetBlockFailureFlags(CBlockIndex* pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
+ void ResetBlockFailureFlags(CBlockIndex* pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
bool ReplayBlocks(const CChainParams& params, CCoinsView* view);
bool RewindBlockIndex(const CChainParams& params);
@@ -2882,7 +2882,7 @@ bool InvalidateBlock(CValidationState& state, const CChainParams& chainparams, C
return g_chainstate.InvalidateBlock(state, chainparams, pindex);
}
-bool CChainState::ResetBlockFailureFlags(CBlockIndex *pindex) {
+void CChainState::ResetBlockFailureFlags(CBlockIndex *pindex) {
AssertLockHeld(cs_main);
int nHeight = pindex->nHeight;
@@ -2914,9 +2914,9 @@ bool CChainState::ResetBlockFailureFlags(CBlockIndex *pindex) {
}
pindex = pindex->pprev;
}
- return true;
}
-bool ResetBlockFailureFlags(CBlockIndex *pindex) {
+
+void ResetBlockFailureFlags(CBlockIndex *pindex) {
return g_chainstate.ResetBlockFailureFlags(pindex);
}
diff --git a/src/validation.h b/src/validation.h
index 1aff10f025..ce46a5a782 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -449,7 +449,7 @@ bool PreciousBlock(CValidationState& state, const CChainParams& params, CBlockIn
bool InvalidateBlock(CValidationState& state, const CChainParams& chainparams, CBlockIndex* pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
/** Remove invalidity status from a block and its descendants. */
-bool ResetBlockFailureFlags(CBlockIndex* pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
+void ResetBlockFailureFlags(CBlockIndex* pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
/** The currently-connected chain of blocks (protected by cs_main). */
extern CChain& chainActive;
diff --git a/src/validationinterface.h b/src/validationinterface.h
index 42cc2e9a20..bddc28d24a 100644
--- a/src/validationinterface.h
+++ b/src/validationinterface.h
@@ -53,6 +53,21 @@ void CallFunctionInValidationInterfaceQueue(std::function<void ()> func);
*/
void SyncWithValidationInterfaceQueue();
+/**
+ * Implement this to subscribe to events generated in validation
+ *
+ * Each CValidationInterface() subscriber will receive event callbacks
+ * in the order in which the events were generated by validation.
+ * Furthermore, each ValidationInterface() subscriber may assume that
+ * callbacks effectively run in a single thread with single-threaded
+ * memory consistency. That is, for a given ValidationInterface()
+ * instantiation, each callback will complete before the next one is
+ * invoked. This means, for example when a block is connected that the
+ * UpdatedBlockTip() callback may depend on an operation performed in
+ * the BlockConnected() callback without worrying about explicit
+ * synchronization. No ordering should be assumed across
+ * ValidationInterface() subscribers.
+ */
class CValidationInterface {
protected:
/**
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 3ec6aefaec..218684fdf1 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -304,20 +304,18 @@ bool CWallet::AddCryptedKey(const CPubKey &vchPubKey,
}
}
-bool CWallet::LoadKeyMetadata(const CKeyID& keyID, const CKeyMetadata &meta)
+void CWallet::LoadKeyMetadata(const CKeyID& keyID, const CKeyMetadata &meta)
{
AssertLockHeld(cs_wallet); // mapKeyMetadata
UpdateTimeFirstKey(meta.nCreateTime);
mapKeyMetadata[keyID] = meta;
- return true;
}
-bool CWallet::LoadScriptMetadata(const CScriptID& script_id, const CKeyMetadata &meta)
+void CWallet::LoadScriptMetadata(const CScriptID& script_id, const CKeyMetadata &meta)
{
AssertLockHeld(cs_wallet); // m_script_metadata
UpdateTimeFirstKey(meta.nCreateTime);
m_script_metadata[script_id] = meta;
- return true;
}
bool CWallet::LoadCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret)
@@ -470,11 +468,11 @@ void CWallet::ChainStateFlushed(const CBlockLocator& loc)
batch.WriteBestBlock(loc);
}
-bool CWallet::SetMinVersion(enum WalletFeature nVersion, WalletBatch* batch_in, bool fExplicit)
+void CWallet::SetMinVersion(enum WalletFeature nVersion, WalletBatch* batch_in, bool fExplicit)
{
LOCK(cs_wallet); // nWalletVersion
if (nWalletVersion >= nVersion)
- return true;
+ return;
// when doing an explicit upgrade, if we pass the max version permitted, upgrade all the way
if (fExplicit && nVersion > nWalletMaxVersion)
@@ -492,8 +490,6 @@ bool CWallet::SetMinVersion(enum WalletFeature nVersion, WalletBatch* batch_in,
if (!batch_in)
delete batch;
}
-
- return true;
}
bool CWallet::SetMaxVersion(int nVersion)
@@ -703,9 +699,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
// if we are using HD, replace the HD seed with a new one
if (IsHDEnabled()) {
- if (!SetHDSeed(GenerateNewSeed())) {
- return false;
- }
+ SetHDSeed(GenerateNewSeed());
}
NewKeyPool();
@@ -1006,7 +1000,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFlushOnClose)
return true;
}
-bool CWallet::LoadToWallet(const CWalletTx& wtxIn)
+void CWallet::LoadToWallet(const CWalletTx& wtxIn)
{
uint256 hash = wtxIn.GetHash();
const auto& ins = mapWallet.emplace(hash, wtxIn);
@@ -1025,8 +1019,6 @@ bool CWallet::LoadToWallet(const CWalletTx& wtxIn)
}
}
}
-
- return true;
}
bool CWallet::AddToWalletIfInvolvingMe(const CTransactionRef& ptx, const CBlockIndex* pIndex, int posInBlock, bool fUpdate)
@@ -1478,7 +1470,7 @@ CPubKey CWallet::DeriveNewSeed(const CKey& key)
return seed;
}
-bool CWallet::SetHDSeed(const CPubKey& seed)
+void CWallet::SetHDSeed(const CPubKey& seed)
{
LOCK(cs_wallet);
// store the keyid (hash160) together with
@@ -1488,18 +1480,15 @@ bool CWallet::SetHDSeed(const CPubKey& seed)
newHdChain.nVersion = CanSupportFeature(FEATURE_HD_SPLIT) ? CHDChain::VERSION_HD_CHAIN_SPLIT : CHDChain::VERSION_HD_BASE;
newHdChain.seed_id = seed.GetID();
SetHDChain(newHdChain, false);
-
- return true;
}
-bool CWallet::SetHDChain(const CHDChain& chain, bool memonly)
+void CWallet::SetHDChain(const CHDChain& chain, bool memonly)
{
LOCK(cs_wallet);
if (!memonly && !WalletBatch(*database).WriteHDChain(chain))
throw std::runtime_error(std::string(__func__) + ": writing chain failed");
hdChain = chain;
- return true;
}
bool CWallet::IsHDEnabled() const
@@ -3029,7 +3018,8 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CTransac
size_t nLimitDescendants = gArgs.GetArg("-limitdescendantcount", DEFAULT_DESCENDANT_LIMIT);
size_t nLimitDescendantSize = gArgs.GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT)*1000;
std::string errString;
- if (!mempool.CalculateMemPoolAncestors(entry, setAncestors, nLimitAncestors, nLimitAncestorSize, nLimitDescendants, nLimitDescendantSize, errString)) {
+ LOCK(::mempool.cs);
+ if (!::mempool.CalculateMemPoolAncestors(entry, setAncestors, nLimitAncestors, nLimitAncestorSize, nLimitDescendants, nLimitDescendantSize, errString)) {
strFailReason = _("Transaction has too long of a mempool chain");
return false;
}
@@ -3899,10 +3889,9 @@ bool CWallet::EraseDestData(const CTxDestination &dest, const std::string &key)
return WalletBatch(*database).EraseDestData(EncodeDestination(dest), key);
}
-bool CWallet::LoadDestData(const CTxDestination &dest, const std::string &key, const std::string &value)
+void CWallet::LoadDestData(const CTxDestination &dest, const std::string &key, const std::string &value)
{
mapAddressBook[dest].destdata.insert(std::make_pair(key, value));
- return true;
}
bool CWallet::GetDestData(const CTxDestination &dest, const std::string &key, std::string *value) const
@@ -4091,9 +4080,7 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(const std::string& name,
// generate a new master key
CPubKey masterPubKey = walletInstance->GenerateNewSeed();
- if (!walletInstance->SetHDSeed(masterPubKey)) {
- throw std::runtime_error(std::string(__func__) + ": Storing master key failed");
- }
+ walletInstance->SetHDSeed(masterPubKey);
hd_upgrade = true;
}
// Upgrade to HD chain split if necessary
@@ -4109,7 +4096,7 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(const std::string& name,
// Regenerate the keypool if upgraded to HD
if (hd_upgrade) {
if (!walletInstance->TopUpKeyPool()) {
- InitError(_("Unable to generate keys") += "\n");
+ InitError(_("Unable to generate keys"));
return nullptr;
}
}
@@ -4130,14 +4117,12 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(const std::string& name,
} else {
// generate a new seed
CPubKey seed = walletInstance->GenerateNewSeed();
- if (!walletInstance->SetHDSeed(seed)) {
- throw std::runtime_error(std::string(__func__) + ": Storing HD seed failed");
- }
+ walletInstance->SetHDSeed(seed);
}
// Top up the keypool
if (!walletInstance->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS) && !walletInstance->TopUpKeyPool()) {
- InitError(_("Unable to generate initial keys") += "\n");
+ InitError(_("Unable to generate initial keys"));
return nullptr;
}
@@ -4439,7 +4424,10 @@ std::vector<OutputGroup> CWallet::GroupOutputs(const std::vector<COutput>& outpu
size_t ancestors, descendants;
mempool.GetTransactionAncestry(output.tx->GetHash(), ancestors, descendants);
if (!single_coin && ExtractDestination(output.tx->tx->vout[output.i].scriptPubKey, dst)) {
- if (gmap.count(dst) == 10) {
+ // Limit output groups to no more than 10 entries, to protect
+ // against inadvertently creating a too-large transaction
+ // when using -avoidpartialspends
+ if (gmap[dst].m_outputs.size() >= 10) {
groups.push_back(gmap[dst]);
gmap.erase(dst);
}
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 2ada233514..9f9501cf72 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -885,8 +885,8 @@ public:
//! Adds a key to the store, without saving it to disk (used by LoadWallet)
bool LoadKey(const CKey& key, const CPubKey &pubkey) { return CCryptoKeyStore::AddKeyPubKey(key, pubkey); }
//! Load metadata (used by LoadWallet)
- bool LoadKeyMetadata(const CKeyID& keyID, const CKeyMetadata &metadata) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
- bool LoadScriptMetadata(const CScriptID& script_id, const CKeyMetadata &metadata) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
+ void LoadKeyMetadata(const CKeyID& keyID, const CKeyMetadata &metadata) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
+ void LoadScriptMetadata(const CScriptID& script_id, const CKeyMetadata &metadata) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
bool LoadMinVersion(int nVersion) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) { AssertLockHeld(cs_wallet); nWalletVersion = nVersion; nWalletMaxVersion = std::max(nWalletMaxVersion, nVersion); return true; }
void UpdateTimeFirstKey(int64_t nCreateTime) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
@@ -903,7 +903,7 @@ public:
//! Erases a destination data tuple in the store and on disk
bool EraseDestData(const CTxDestination &dest, const std::string &key);
//! Adds a destination data tuple to the store, without saving it to disk
- bool LoadDestData(const CTxDestination &dest, const std::string &key, const std::string &value);
+ void LoadDestData(const CTxDestination &dest, const std::string &key, const std::string &value);
//! Look up a destination data tuple in the store, return true if found false otherwise
bool GetDestData(const CTxDestination &dest, const std::string &key, std::string *value) const;
//! Get all destination values matching a prefix.
@@ -936,7 +936,7 @@ public:
void MarkDirty();
bool AddToWallet(const CWalletTx& wtxIn, bool fFlushOnClose=true);
- bool LoadToWallet(const CWalletTx& wtxIn);
+ void LoadToWallet(const CWalletTx& wtxIn);
void TransactionAddedToMempool(const CTransactionRef& tx) override;
void BlockConnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex *pindex, const std::vector<CTransactionRef>& vtxConflicted) override;
void BlockDisconnected(const std::shared_ptr<const CBlock>& pblock) override;
@@ -1075,7 +1075,7 @@ public:
}
//! signify that a particular wallet feature is now used. this may change nWalletVersion and nWalletMaxVersion if those are lower
- bool SetMinVersion(enum WalletFeature, WalletBatch* batch_in = nullptr, bool fExplicit = false);
+ void SetMinVersion(enum WalletFeature, WalletBatch* batch_in = nullptr, bool fExplicit = false);
//! change which version we're allowed to upgrade to (note that this does not immediately imply upgrading to that format)
bool SetMaxVersion(int nVersion);
@@ -1146,7 +1146,7 @@ public:
bool BackupWallet(const std::string& strDest);
/* Set the HD chain model (chain child index counters) */
- bool SetHDChain(const CHDChain& chain, bool memonly);
+ void SetHDChain(const CHDChain& chain, bool memonly);
const CHDChain& GetHDChain() const { return hdChain; }
/* Returns true if HD is enabled */
@@ -1162,7 +1162,7 @@ public:
Sets the seed's version based on the current wallet version (so the
caller must ensure the current wallet version is correct before calling
this function). */
- bool SetHDSeed(const CPubKey& key);
+ void SetHDSeed(const CPubKey& key);
/**
* Blocks until the wallet state is up-to-date to /at least/ the current
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp
index 67fcaa725b..43e4747317 100644
--- a/src/wallet/walletdb.cpp
+++ b/src/wallet/walletdb.cpp
@@ -495,21 +495,13 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
ssKey >> strAddress;
ssKey >> strKey;
ssValue >> strValue;
- if (!pwallet->LoadDestData(DecodeDestination(strAddress), strKey, strValue))
- {
- strErr = "Error reading wallet database: LoadDestData failed";
- return false;
- }
+ pwallet->LoadDestData(DecodeDestination(strAddress), strKey, strValue);
}
else if (strType == "hdchain")
{
CHDChain chain;
ssValue >> chain;
- if (!pwallet->SetHDChain(chain, true))
- {
- strErr = "Error reading wallet database: SetHDChain failed";
- return false;
- }
+ pwallet->SetHDChain(chain, true);
} else if (strType == "flags") {
uint64_t flags;
ssValue >> flags;
diff --git a/test/functional/feature_includeconf.py b/test/functional/feature_includeconf.py
index 9a7a0ca103..d06f6826f0 100755
--- a/test/functional/feature_includeconf.py
+++ b/test/functional/feature_includeconf.py
@@ -55,9 +55,11 @@ class IncludeConfTest(BitcoinTestFramework):
self.stop_node(0, expected_stderr="warning: -includeconf cannot be used from included files; ignoring -includeconf=relative2.conf")
self.log.info("-includeconf cannot contain invalid arg")
- with open(os.path.join(self.options.tmpdir, "node0", "relative.conf"), "w", encoding="utf8") as f:
- f.write("foo=bar\n")
- self.nodes[0].assert_start_raises_init_error(expected_msg="Error reading configuration file: Invalid configuration value foo")
+
+ # Commented out as long as we ignore invalid arguments in configuration files
+ #with open(os.path.join(self.options.tmpdir, "node0", "relative.conf"), "w", encoding="utf8") as f:
+ # f.write("foo=bar\n")
+ #self.nodes[0].assert_start_raises_init_error(expected_msg="Error reading configuration file: Invalid configuration value foo")
self.log.info("-includeconf cannot be invalid path")
os.remove(os.path.join(self.options.tmpdir, "node0", "relative.conf"))
diff --git a/test/functional/wallet_groups.py b/test/functional/wallet_groups.py
index 0d27815da0..408e9dfef0 100755
--- a/test/functional/wallet_groups.py
+++ b/test/functional/wallet_groups.py
@@ -5,6 +5,8 @@
"""Test wallet group functionality."""
from test_framework.test_framework import BitcoinTestFramework
+from test_framework.mininode import FromHex, ToHex
+from test_framework.messages import CTransaction
from test_framework.util import (
assert_equal,
)
@@ -63,5 +65,29 @@ class WalletGroupTest(BitcoinTestFramework):
assert_approx(v[0], 0.2)
assert_approx(v[1], 1.3, 0.0001)
+ # Empty out node2's wallet
+ self.nodes[2].sendtoaddress(address=self.nodes[0].getnewaddress(), amount=self.nodes[2].getbalance(), subtractfeefromamount=True)
+ self.sync_all()
+ self.nodes[0].generate(1)
+
+ # Fill node2's wallet with 10000 outputs corresponding to the same
+ # scriptPubKey
+ for i in range(5):
+ raw_tx = self.nodes[0].createrawtransaction([{"txid":"0"*64, "vout":0}], [{addr2[0]: 0.05}])
+ tx = FromHex(CTransaction(), raw_tx)
+ tx.vin = []
+ tx.vout = [tx.vout[0]] * 2000
+ funded_tx = self.nodes[0].fundrawtransaction(ToHex(tx))
+ signed_tx = self.nodes[0].signrawtransactionwithwallet(funded_tx['hex'])
+ self.nodes[0].sendrawtransaction(signed_tx['hex'])
+ self.nodes[0].generate(1)
+
+ self.sync_all()
+
+ # Check that we can create a transaction that only requires ~100 of our
+ # utxos, without pulling in all outputs and creating a transaction that
+ # is way too big.
+ assert self.nodes[2].sendtoaddress(address=addr2[0], amount=5)
+
if __name__ == '__main__':
WalletGroupTest().main ()