diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | contrib/gitian-descriptors/boost-win.yml | 19 | ||||
-rw-r--r-- | contrib/gitian-descriptors/deps-win.yml | 15 | ||||
-rw-r--r-- | contrib/gitian-descriptors/gitian-win.yml | 19 | ||||
-rw-r--r-- | contrib/gitian-descriptors/protobuf-win.yml | 15 | ||||
-rw-r--r-- | contrib/gitian-descriptors/qt-win.yml | 33 | ||||
-rw-r--r-- | doc/build-osx.md | 2 | ||||
-rw-r--r-- | doc/release-notes.md | 284 | ||||
-rw-r--r-- | doc/release-notes/release-notes-0.8.2.md | 2 | ||||
-rw-r--r-- | doc/release-process.md | 2 | ||||
-rw-r--r-- | doc/tor.md | 2 | ||||
-rw-r--r-- | src/main.cpp | 28 | ||||
-rw-r--r-- | src/main.h | 2 | ||||
-rw-r--r-- | src/qt/bitcoin.cpp | 3 | ||||
-rw-r--r-- | src/qt/optionsmodel.cpp | 66 | ||||
-rw-r--r-- | src/qt/optionsmodel.h | 3 | ||||
-rw-r--r-- | src/rpcblockchain.cpp | 4 | ||||
-rw-r--r-- | src/rpcnet.cpp | 2 | ||||
-rw-r--r-- | src/rpcwallet.cpp | 4 | ||||
-rw-r--r-- | src/wallet.cpp | 19 | ||||
-rw-r--r-- | src/walletdb.cpp | 6 | ||||
-rw-r--r-- | src/walletdb.h | 16 |
23 files changed, 396 insertions, 156 deletions
diff --git a/Makefile.am b/Makefile.am index d222daf28c..4f623f6c64 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,7 +16,7 @@ OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed -DIST_DOCS = $(wildcard doc/*.md) +DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md) WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \ $(top_srcdir)/share/pixmaps/nsis-header.bmp \ diff --git a/configure.ac b/configure.ac index a182a3e79a..3ed4549a88 100644 --- a/configure.ac +++ b/configure.ac @@ -303,8 +303,8 @@ if test x$use_hardening != xno; then AX_CHECK_LINK_FLAG([[-Wl,--dynamicbase]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"]) AX_CHECK_LINK_FLAG([[-Wl,--nxcompat]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"]) - AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [LDFLAGS="-Wl,-z,relro"]) - AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [LDFLAGS="-Wl,-z,now"]) + AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"]) + AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"]) if test x$TARGET_OS != xwindows; then # -pie will link successfully with MinGW, but it's unsupported and leads to undeterministic binaries diff --git a/contrib/gitian-descriptors/boost-win.yml b/contrib/gitian-descriptors/boost-win.yml index 15aeccf543..db5d6bab1d 100644 --- a/contrib/gitian-descriptors/boost-win.yml +++ b/contrib/gitian-descriptors/boost-win.yml @@ -16,8 +16,11 @@ files: - "boost-mingw-gas-cross-compile-2013-03-03.patch" script: | # Defines + export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 + export FAKETIME=$REFERENCE_DATETIME export TZ=UTC INDIR=$HOME/build + TEMPDIR=$HOME/tmp # Input Integrity Check echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52 boost_1_55_0.tar.bz2" | shasum -c echo "d2b7f6a1d7051faef3c9cf41a92fa3671d905ef1e1da920d07651a43299f6268 boost-mingw-gas-cross-compile-2013-03-03.patch" | shasum -c @@ -35,7 +38,7 @@ script: | mkdir -p $INSTALLPREFIX $BUILDDIR cd $BUILDDIR # - tar xjf $INDIR/boost_1_55_0.tar.bz2 + tar --warning=no-timestamp -xjf $INDIR/boost_1_55_0.tar.bz2 cd boost_1_55_0 GCCVERSION=$($HOST-g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2) echo "using gcc : $GCCVERSION : $HOST-g++ @@ -68,12 +71,16 @@ script: | # http://statmt.org/~s0565741/software/boost_1_52_0/libs/context/doc/html/context/requirements.html # "For cross-compiling the lib you must specify certain additional properties at bjam command line: target-os, abi, binary-format, architecture and address-model." ./bjam toolset=gcc binary-format=pe target-os=windows threadapi=win32 address-model=$BITS threading=multi variant=release link=static runtime-link=static --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete --prefix="$INSTALLPREFIX" $MAKEOPTS install + # post-process all generated libraries to be deterministic + # extract them to a temporary directory then re-build them deterministically + for LIB in $(find $INSTALLPREFIX -name \*.a); do + rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR + $HOST-ar xv $LIB | cut -b5- > /tmp/list.txt + rm $LIB + $HOST-ar crsD $LIB $(cat /tmp/list.txt) + done # cd "$INSTALLPREFIX" - export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 - export FAKETIME=$REFERENCE_DATETIME - zip -r $OUTDIR/boost-win$BITS-1.55.0-gitian-r6.zip * - unset LD_PRELOAD - unset FAKETIME + find | sort | zip -X@ $OUTDIR/boost-win$BITS-1.55.0-gitian-r6.zip done # for BITS in diff --git a/contrib/gitian-descriptors/deps-win.yml b/contrib/gitian-descriptors/deps-win.yml index 13d3a86fd9..87ebf3e87b 100644 --- a/contrib/gitian-descriptors/deps-win.yml +++ b/contrib/gitian-descriptors/deps-win.yml @@ -26,6 +26,7 @@ script: | export FAKETIME=$REFERENCE_DATETIME export TZ=UTC INDIR=$HOME/build + TEMPDIR=$HOME/tmp # Input Integrity Check echo "f74f15e8c8ff11aa3d5bb5f276d202ec18d7246e95f961db76054199c69c1ae3 openssl-1.0.1e.tar.gz" | sha256sum -c echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz" | sha256sum -c @@ -107,11 +108,21 @@ script: | # tar xjf $INDIR/qrencode-3.4.3.tar.bz2 cd qrencode-3.4.3 - png_CFLAGS="-I$INSTALLPREFIX/include" png_LIBS="-L$INSTALLPREFIX/lib -lpng" ./configure --prefix=$INSTALLPREFIX --host=$HOST --enable-static --disable-shared --without-tools --disable-maintainer-mode --disable-dependency-tracking + png_CFLAGS="-I$INSTALLPREFIX/include" png_LIBS="-L$INSTALLPREFIX/lib -lpng" ./configure --prefix=$INSTALLPREFIX --host=$HOST --enable-static --disable-shared --without-tools --disable-dependency-tracking + # Workaround to prevent re-configuring by make (resulting in missing m4 error); make all files have a date in the past + find . -print0 | xargs -r0 touch -t 200001010000 make make install cd .. + # post-process all generated libraries to be deterministic + # extract them to a temporary directory then re-build them deterministically + for LIB in $(find $INSTALLPREFIX -name \*.a); do + rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR + $HOST-ar xv $LIB | cut -b5- > /tmp/list.txt + rm $LIB + $HOST-ar crsD $LIB $(cat /tmp/list.txt) + done # cd $INSTALLPREFIX - zip -r $OUTDIR/bitcoin-deps-win$BITS-gitian-r10.zip include lib + find include lib | sort | zip -X@ $OUTDIR/bitcoin-deps-win$BITS-gitian-r10.zip done # for BITS in diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index db0966c201..6e43c21823 100644 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -35,6 +35,7 @@ script: | export TZ=UTC INDIR=$HOME/build OPTFLAGS='-O2' + TEMPDIR="$HOME/tempdir" NEEDDIST=1 # Qt: workaround for determinism in resource ordering # Qt5's rcc uses a QHash to store the files for the resource. @@ -54,6 +55,7 @@ script: | else HOST=x86_64-w64-mingw32 fi + export PATH=$STAGING/host/bin:$PATH mkdir -p $STAGING $BUILDDIR $BINDIR # cd $STAGING @@ -63,22 +65,18 @@ script: | unzip $INDIR/protobuf-win${BITS}-2.5.0-gitian-r4.zip if [ "$NEEDDIST" == "1" ]; then # Make source code archive which is architecture independent so it only needs to be done once - cd $HOME/build/ - cd bitcoin - export PATH=$STAGING/host/bin:$PATH - export TAR_OPTIONS=--mtime=`echo $REFERENCE_DATETIME | awk '{ print $1 }'` + cd $HOME/build/bitcoin ./autogen.sh ./configure --bindir=$OUTDIR --prefix=$STAGING --host=$HOST --with-qt-plugindir=$STAGING/plugins --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}" make dist - mkdir -p $OUTDIR/src - cp -f bitcoin-*.tar.* $OUTDIR/src + DISTNAME=`echo bitcoin-*.tar.gz` NEEDDIST=0 fi # Build platform-dependent executables from source archive cd $BUILDDIR mkdir -p distsrc cd distsrc - tar --strip-components=1 -xf $HOME/build/bitcoin/bitcoin-*.tar.* + tar --strip-components=1 -xf $HOME/build/bitcoin/$DISTNAME ./configure --bindir=$BINDIR --prefix=$STAGING --host=$HOST --with-qt-plugindir=$STAGING/plugins --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}" export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 export FAKETIME=$REFERENCE_DATETIME @@ -90,3 +88,10 @@ script: | unset FAKETIME done # for BITS in + # sort distribution tar file and normalize user/group/mtime information for deterministic output + mkdir -p $OUTDIR/src + rm -rf $TEMPDIR + mkdir -p $TEMPDIR + cd $TEMPDIR + tar -xvf $HOME/build/bitcoin/$DISTNAME | sort | tar --no-recursion -cT /dev/stdin --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 --mtime="$REFERENCE_DATETIME" | gzip -n > $OUTDIR/src/$DISTNAME + diff --git a/contrib/gitian-descriptors/protobuf-win.yml b/contrib/gitian-descriptors/protobuf-win.yml index 7fcac72fea..543f20b394 100644 --- a/contrib/gitian-descriptors/protobuf-win.yml +++ b/contrib/gitian-descriptors/protobuf-win.yml @@ -17,6 +17,7 @@ script: | # export TZ=UTC INDIR=$HOME/build + TEMPDIR=$HOME/tmp OPTFLAGS="-O2" # Integrity Check echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c @@ -44,13 +45,21 @@ script: | # Now recompile with the mingw cross-compiler: make distclean ./configure --prefix=$INSTALLPREFIX --enable-shared=no --disable-dependency-tracking --with-protoc=$INSTALLPREFIX/host/bin/protoc --host=$HOST CXXFLAGS="-frandom-seed=11 ${OPTFLAGS}" + export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 + export FAKETIME=$REFERENCE_DATETIME make make install + # post-process all generated libraries to be deterministic + # extract them to a temporary directory then re-build them deterministically + for LIB in $(find $INSTALLPREFIX -name \*.a); do + rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR + $HOST-ar xv $LIB | cut -b5- > /tmp/list.txt + rm $LIB + $HOST-ar crsD $LIB $(cat /tmp/list.txt) + done # cd $INSTALLPREFIX - export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 - export FAKETIME=$REFERENCE_DATETIME - zip -r $OUTDIR/protobuf-win$BITS-2.5.0-gitian-r4.zip include lib host + find include lib host | sort | zip -X@ $OUTDIR/protobuf-win$BITS-2.5.0-gitian-r4.zip unset LD_PRELOAD unset FAKETIME done # for BITS in diff --git a/contrib/gitian-descriptors/qt-win.yml b/contrib/gitian-descriptors/qt-win.yml index fed39cbc7c..e3de2c02ef 100644 --- a/contrib/gitian-descriptors/qt-win.yml +++ b/contrib/gitian-descriptors/qt-win.yml @@ -21,6 +21,7 @@ script: | # Defines export TZ=UTC INDIR=$HOME/build + TEMPDIR=$HOME/tmp # Qt: workaround for determinism in resource ordering # Qt5's rcc uses a QHash to store the files for the resource. # A security fix in QHash makes the ordering of keys to be different on every run @@ -55,31 +56,37 @@ script: | cd qt-everywhere-opensource-src-5.2.0 SPECNAME="win32-g++" SPECFILE="qtbase/mkspecs/${SPECNAME}/qmake.conf" - sed 's/$TODAY/2011-01-30/' -i configure + sed 's/qt_instdate=`date +%Y-%m-%d`/qt_instdate=2011-01-30/' -i qtbase/configure sed --posix "s|QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport|QMAKE_CFLAGS\t\t= -pipe -fno-keep-inline-dllexport -isystem /usr/$HOST/include/ -frandom-seed=qtbuild -I$DEPSDIR/include|" -i ${SPECFILE} sed --posix "s|QMAKE_LFLAGS =|QMAKE_LFLAGS\t\t= -L$DEPSDIR/lib|" -i ${SPECFILE} - # ar adds timestamps to every object file included in the static library - # providing -D as ar argument is supposed to solve it, but doesn't work as qmake strips off the arguments and adds -M to pass a script... - # which somehow cannot be combined with other flags. - # use faketime only for ar, as it confuses make/qmake into hanging sometimes - sed --posix "s|QMAKE_LIB = \\\$\\\${CROSS_COMPILE}ar -ru|QMAKE_LIB\t\t= $HOME/ar -Dr|" -i ${SPECFILE} - echo '#!/bin/bash' > $HOME/ar - echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ar - echo "$HOST-ar \"\$@\"" >> $HOME/ar - chmod +x $HOME/ar + # Before we tried to pass arguments to ar (static linking) in using QMAKE_LIB, however + # qt removes the arguments for ar and provides a script which makes it impossible to pass the determinism flag - + # so rather than try to replace ar, post-process all libraries and plugins at the end. + # # Don't load faketime while compiling Qt, qmake will get stuck in nearly infinite loops #export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 - export FAKETIME=$REFERENCE_DATETIME + #export FAKETIME=$REFERENCE_DATETIME # # Compile static libraries, and use statically linked openssl (-openssl-linked): OPENSSL_LIBS="-L$DEPSDIR/lib -lssl -lcrypto -lgdi32" ./configure -prefix $INSTALLPREFIX -bindir $INSTALLPREFIX/host/bin -confirm-license -release -opensource -static -xplatform $SPECNAME -device-option CROSS_COMPILE="$HOST-" -no-audio-backend -no-javascript-jit -no-sql-sqlite -no-sql-odbc -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-opengl -no-compile-examples -no-feature-style-windowsce -no-feature-style-windowsmobile -no-qml-debug -openssl-linked -skip qtsvg -skip qtwebkit -skip qtwebkit-examples -skip qtserialport -skip qtdeclarative -skip qtmultimedia -skip qtimageformats -skip qtlocation -skip qtsensors -skip qtquick1 -skip qtquickcontrols -skip qtactiveqt -skip qtconnectivity -skip qtwinextras -skip qtxmlpatterns -skip qtscript -skip qtdoc -system-libpng -system-zlib make $MAKEOPTS install + # post-process all generated libraries and plugins to be deterministic + # extract them to a temporary directory then re-build them deterministically + for LIB in $(find $INSTALLPREFIX -name *.a); do + rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR + $HOST-ar xv $LIB | cut -b5- > /tmp/list.txt + rm $LIB + $HOST-ar crsD $LIB $(cat /tmp/list.txt) + done # cd $INSTALLPREFIX - + # Remove unused non-deterministic stuff + rm host/bin/qtpaths.exe lib/libQt5Bootstrap.a lib/libQt5Bootstrap.la # as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 - zip -r $OUTDIR/qt-win${BITS}-5.2.0-gitian-r2.zip * + export FAKETIME=$REFERENCE_DATETIME + find -print0 | xargs -r0 touch # fix up timestamps before packaging + find | sort | zip -X@ $OUTDIR/qt-win${BITS}-5.2.0-gitian-r2.zip unset LD_PRELOAD unset FAKETIME done # for BITS in diff --git a/doc/build-osx.md b/doc/build-osx.md index dd343dca5f..fcb9a37f3d 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -69,7 +69,7 @@ Instructions: Homebrew #### Install dependencies using Homebrew - brew install autoconf automake berkeley-db4 boost miniupnpc openssl pkg-config protobuf + brew install autoconf automake berkeley-db4 boost miniupnpc openssl pkg-config protobuf qt Note: After you have installed the dependencies, you should check that the Homebrew installed version of OpenSSL is the one available for compilation. You can check this by typing diff --git a/doc/release-notes.md b/doc/release-notes.md index 1cb517e5c7..40bb26e28e 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,3 +1,283 @@ -(note: this is a temporary file, to be added-to by anybody, and moved to -release-notes at release time) +Bitcoin Core version 0.9.0rc1 is now available from: + http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.9.0rc1/ + +This is a release candidate for a new major version. A major version brings +both new features and bug fixes. + +Please report bugs using the issue tracker at github: + + https://github.com/bitcoin/bitcoin/issues + +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), uninstall all +earlier versions of Bitcoin, then run the installer (on Windows) or just copy +over /Applications/Bitcoin-Qt (on Mac) or bitcoind/bitcoin-qt (on Linux). + +If you are upgrading from version 0.7.2 or earlier, the first time you run +0.9.0 your blockchain files will be re-indexed, which will take anywhere from +30 minutes to several hours, depending on the speed of your machine. + +On Windows, do not forget to uninstall all earlier versions of the Bitcoin +client first, especially if you are switching to the 64-bit version. + +Windows 64-bit installer +------------------------- + +New in 0.9.0 is the Windows 64-bit version of the client. There have been +frequent reports of users running out of virtual memory on 32-bit systems +during the initial sync. Because of this it is recommended to install the +64-bit version if your system supports it. + +Rebranding to Bitcoin Core +--------------------------- + +To reduce confusion between Bitcoin-the-network and Bitcoin-the-software we +have renamed the reference client to Bitcoin Core. + +Autotools build system +----------------------- + +For 0.9.0 we switched to an autotools-based build system instead of individual +(q)makefiles. + +Using the standard “./autogen.sh; ./configure; make” to build Bitcoin-Qt and +bitcoind makes it easier for experienced open source developers to contribute +to the project. + +Be sure to check doc/build-*.md for your platform before building from source. + +Bitcoin-cli +------------- + +Another change in the 0.9 release is moving away from the bitcoind executable +functioning both as a server and as a RPC client. The RPC client functionality +(“tell the running bitcoin daemon to do THIS”) was split into a separate +executable, 'bitcoin-cli'. The RPC client code will eventually be removed from +bitcoind, but will be kept for backwards compatibility for a release or two. + +0.9.0rc1 Release notes +======================= + +RPC: + +- 'listreceivedbyaddress' now provides tx ids +- Updated help and tests for 'getreceivedby(account|address)' +- In 'getblock', accept 2nd 'verbose' parameter, similar to getrawtransaction, + but defaulting to 1 for backward compatibility +- Add 'verifychain', to verify chain database at runtime +- Add 'dumpwallet' and 'importwallet' RPCs +- 'keypoolrefill' gains optional size parameter +- Add 'getbestblockhash', to return tip of best chain +- Add 'chainwork' (the total work done by all blocks since the genesis block) + to 'getblock' output +- Make RPC password resistant to timing attacks +- Clarify help messages and add examples +- Add 'getrawchangeaddress' call for raw transaction change destinations +- Reject insanely high fees by default in 'sendrawtransaction' +- Add RPC call 'decodescript' to decode a hex-encoded transaction script +- Make 'validateaddress' provide redeemScript +- Add 'getnetworkhashps' to get the calculated network hashrate +- New RPC 'ping' command to request ping, new 'pingtime' and 'pingwait' fields + in 'getpeerinfo' output +- Adding new 'addrlocal' field to 'getpeerinfo' output +- Add verbose boolean to 'getrawmempool' +- Add rpc command 'getunconfirmedbalance' to obtain total unconfirmed balance +- Explicitly ensure that wallet is unlocked in `importprivkey` +- Add check for valid keys in `importprivkey` + +Command-line options: + +- Rename option '-tor' to '-onion' to better reflect what it does +- Add '-disablewallet' mode to let bitcoind run entirely without wallet (when + built with wallet) +- Update default '-rpcsslciphers' to include TLSv1.2 +- make '-logtimestamps' default on and rework help-message +- RPC client option: '-rpcwait', to wait for server start +- Remove '-logtodebugger' +- Allow `-noserver` with bitcoind + +Block-chain handling and storage: + +- Update leveldb to 1.15 +- Check for correct genesis (prevent cases where a datadir from the wrong + network is accidentally loaded) +- Allow txindex to be removed and add a reindex dialog +- Log aborted block database rebuilds +- Store orphan blocks in serialized form, to save memory +- Limit the number of orphan blocks in memory to 750 +- Fix non-standard disconnected transactions causing mempool orphans +- Add a new checkpoint at block 279,000 + +Wallet: + +- Store key creation time. Calculate whole-wallet birthday. +- Optimize rescan to skip blocks prior to birthday +- Let user select wallet file with -wallet=foo.dat +- Consider generated coins mature at 101 instead of 120 blocks +- Improve wallet load time +- Don't count txins for priority to encourage sweeping +- Don't create empty transactions when reading a corrupted wallet +- Fix rescan to start from beginning after importprivkey +- Only create signatures with low S values. + +Mining: + +- Increase default -blockmaxsize/prioritysize to 750K/50K +- 'getblocktemplate' does not require a key to create a block template + +Protocol and network: + +- Send tx relay flag with version +- New 'reject' P2P message (BIP 0061, see https://gist.github.com/gavinandresen/7079034 for draft) +- Dump addresses every 15 minutes instead of 10 seconds +- Relay OP_RETURN data TxOut as standard transaction type +- Remove CENT-output free transaction rule when relaying +- Lower maximum size for free transaction creation +- Send multiple inv messages if mempool.size > MAX_INV_SZ +- Split MIN_PROTO_VERSION into INIT_PROTO_VERSION and MIN_PEER_PROTO_VERSION +- Do not treat fFromMe transaction differently when broadcasting +- Process received messages one at a time without sleeping between messages +- Improve logging of failed connections +- Bump protocol version to 70002 +- Add some additional logging to give extra network insight +- Added new DNS seed from bitcoinstats.com + +Validation: + +- Log reason for non-standard transaction rejection +- Prune provably-unspendable outputs, and adapt consistency check for it. +- Detect any sufficiently long fork and add a warning +- Call the -alertnotify script when we see a long or invalid fork +- Fix multi-block reorg transaction resurrection +- Reject non-canonically-encoded serialization sizes +- Reject dust amounts during validation +- Accept nLockTime transactions that finalize in the next block + +Build system: + +- Switch to autotools-based build system +- Build without wallet by passing `--disable-wallet` to configure, this removes + the BerkeleyDB dependency +- Upgrade gitian dependencies (libpng, libz, libupnpc, boost, openssl) to more + recent versions +- Windows 64-bit build support +- Solaris compatibility fixes +- Check integrity of gitian input source tarballs +- Enable full GCC Stack-smashing protection for all OSes + +GUI: + +- Switch to Qt 5.2.0 for Windows build +- Add payment request (BIP 0070) support +- Improve options dialog +- Show transaction fee in new send confirmation dialog +- Add total balance in overview page +- Allow user to choose data directory on first start, when data directory is + missing, or when the -choosedatadir option is passed +- Save and restore window positions +- Add vout index to transaction id in transactions details dialog +- Add network traffic graph in debug window +- Add open URI dialog +- Add Coin Control Features +- Improve receive coins workflow: make the 'Receive' tab into a form to request + payments, and move historical address list functionality to File menu. +- Rebrand to `Bitcoin Core` +- Move initialization/shutdown to a thread. This prevents “Not responding” + messages during startup. Also show a window during shutdown. +- Don't regenerate autostart link on every client startup +- Show and store message of normal bitcoin:URI +- Fix richtext detection hang issue on very old Qt versions +- osx: Make use of the 10.8+ user notification center to display growl like + notifications +- osx: Added NSHighResolutionCapable flag to Info.plist for better font + rendering on Retina displays. +- osx: Fix bitcoin-qt startup crash when clicking dock icon +- linux: Fix Gnome bitcoin: URI handler + +Miscellaneous: + +- Add Linux script (contrib/qos/tc.sh) to limit outgoing bandwidth +- Add '-regtest' mode, similar to testnet but private with instant block + generation with 'setgenerate' RPC. +- Add 'linearize.py' script to contrib, for creating bootstrap.dat +- Add separate bitcoin-cli client + +Credits +-------- + +Thanks to everyone who contributed to this release: + +- Andrey +- bitsofproof +- Brandon Dahler +- Christian Decker +- Christopher Latham +- Chuck +- coblee +- constantined +- Cory Fields +- Cozz Lovan +- Daniel Larimer +- David Hill +- Dmitry Smirnov +- Eric Lombrozo +- fanquake +- fcicq +- Florin +- Gavin Andresen +- Gregory Maxwell +- Guillermo Céspedes Tabárez +- HaltingState +- Han Lin Yap +- harry +- Jeff Garzik +- Johnathan Corgan +- Jonas Schnelli +- Josh Lehan +- Josh Triplett +- Julian Langschaedel +- Kangmo +- Lake Denman +- Luke Dashjr +- Mark Friedenbach +- Matt Corallo +- Michael Bauer +- Michael Ford +- Michagogo +- Mike Hearn +- Nils Schneider +- Olivier Langlois +- patrick s +- Patrick Strateman +- Peter Todd +- phantomcircuit +- phelixbtc +- Philip Kaufmann +- Pieter Wuille +- Rav3nPL +- regergregregerrge +- Robert Backhaus +- Roman Mindalev +- Rune K. Svendsen +- Ryan Niebur +- Scott Ellis +- Scott Willeke +- Sergey Kazenyuk +- Shawn Wilkinson +- Sined +- sje +- super3 +- Tamas Blummer +- theuni +- Thomas Holenstein +- Timon Rapp +- Timothy Stranex +- Vaclav Vobornik +- vhf / victor felder +- Vinnie Falco +- Warren Togami +- Wladimir J. van der Laan diff --git a/doc/release-notes/release-notes-0.8.2.md b/doc/release-notes/release-notes-0.8.2.md index 596ce8835f..eea9ba2a2c 100644 --- a/doc/release-notes/release-notes-0.8.2.md +++ b/doc/release-notes/release-notes-0.8.2.md @@ -74,7 +74,7 @@ Command-line options JSON-RPC API changes * fixed a getblocktemplate bug that caused excessive CPU creating blocks. -* listunspent now lists account and address infromation. +* listunspent now lists account and address information. * getinfo now also returns the time adjustment estimated from your peers. * getpeerinfo now returns bytessent, bytesrecv and syncnode. * gettxoutsetinfo returns statistics about the unspent transaction output database. diff --git a/doc/release-process.md b/doc/release-process.md index aadacf05f8..459819e596 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -43,7 +43,7 @@ Release Process wget 'https://www.openssl.org/source/openssl-1.0.1e.tar.gz' wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' wget 'http://zlib.net/zlib-1.2.8.tar.gz' - wget 'ftp://ftp.simplesystems.org/pub/png/src/libpng16/libpng-1.6.8.tar.gz' + wget 'ftp://ftp.simplesystems.org/pub/png/src/history/libpng16/libpng-1.6.8.tar.gz' wget 'https://fukuchi.org/works/qrencode/qrencode-3.4.3.tar.bz2' wget 'https://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2' wget 'https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch' -O \ diff --git a/doc/tor.md b/doc/tor.md index 41dd71209f..b5eb91e12e 100644 --- a/doc/tor.md +++ b/doc/tor.md @@ -11,7 +11,7 @@ configure Tor. --------------------------------- The first step is running Bitcoin behind a Tor proxy. This will already make all -outgoing connections be anonimized, but more is possible. +outgoing connections be anonymized, but more is possible. -socks=5 SOCKS5 supports connecting-to-hostname, which can be used instead of doing a (leaking) local DNS lookup. SOCKS5 is the default, diff --git a/src/main.cpp b/src/main.cpp index 4532b776c6..d33ad2fa95 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1054,6 +1054,31 @@ uint256 static GetOrphanRoot(const uint256& hash) } while(true); } +// Remove a random orphan block (which does not have any dependent orphans). +void static PruneOrphanBlocks() +{ + if (mapOrphanBlocksByPrev.size() <= MAX_ORPHAN_BLOCKS) + return; + + // Pick a random orphan block. + int pos = insecure_rand() % mapOrphanBlocksByPrev.size(); + std::multimap<uint256, COrphanBlock*>::iterator it = mapOrphanBlocksByPrev.begin(); + while (pos--) it++; + + // As long as this block has other orphans depending on it, move to one of those successors. + do { + std::multimap<uint256, COrphanBlock*>::iterator it2 = mapOrphanBlocksByPrev.find(it->second->hashBlock); + if (it2 == mapOrphanBlocksByPrev.end()) + break; + it = it2; + } while(1); + + uint256 hash = it->second->hashBlock; + delete it->second; + mapOrphanBlocksByPrev.erase(it); + mapOrphanBlocks.erase(hash); +} + int64_t GetBlockValue(int nHeight, int64_t nFees) { int64_t nSubsidy = 50 * COIN; @@ -2373,10 +2398,11 @@ bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBl // If we don't already have its previous block, shunt it off to holding area until we get it if (pblock->hashPrevBlock != 0 && !mapBlockIndex.count(pblock->hashPrevBlock)) { - LogPrintf("ProcessBlock: ORPHAN BLOCK, prev=%s\n", pblock->hashPrevBlock.ToString()); + LogPrintf("ProcessBlock: ORPHAN BLOCK %lu, prev=%s\n", (unsigned long)mapOrphanBlocks.size(), pblock->hashPrevBlock.ToString()); // Accept orphans as long as there is a node to request its parents from if (pfrom) { + PruneOrphanBlocks(); COrphanBlock* pblock2 = new COrphanBlock(); { CDataStream ss(SER_DISK, CLIENT_VERSION); diff --git a/src/main.h b/src/main.h index bbf6fce48b..05210e5164 100644 --- a/src/main.h +++ b/src/main.h @@ -45,6 +45,8 @@ static const unsigned int MAX_STANDARD_TX_SIZE = 100000; static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50; /** The maximum number of orphan transactions kept in memory */ static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100; +/** The maximum number of orphan blocks kept in memory */ +static const unsigned int MAX_ORPHAN_BLOCKS = 750; /** The maximum size of a blk?????.dat file (since 0.8) */ static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB /** The pre-allocation chunk size for blk?????.dat files (since 0.8) */ diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index e274b7626a..dda79e3d0e 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -376,9 +376,6 @@ void BitcoinApplication::initializeResult(int retval) returnValue = retval ? 0 : 1; if(retval) { - // Miscellaneous initialization after core is initialized - optionsModel->Upgrade(); // Must be done after AppInit2 - #ifdef ENABLE_WALLET PaymentServer::LoadRootCAs(); paymentServer->setOptionsModel(optionsModel); diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index a18fd1d514..a2a2732b1c 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -73,6 +73,9 @@ void OptionsModel::Init() #ifdef ENABLE_WALLET if (!settings.contains("nTransactionFee")) settings.setValue("nTransactionFee", 0); + nTransactionFee = settings.value("nTransactionFee").toLongLong(); // if -paytxfee is set, this will be overridden later in init.cpp + if (mapArgs.count("-paytxfee")) + strOverriddenByCommandLine += "-paytxfee "; #endif if (!settings.contains("nDatabaseCache")) @@ -127,69 +130,6 @@ void OptionsModel::Reset() // default setting for OptionsModel::StartAtStartup - disabled if (GUIUtil::GetStartOnSystemStartup()) GUIUtil::SetStartOnSystemStartup(false); - - // Ensure Upgrade() is not running again by setting the bImportFinished flag - settings.setValue("bImportFinished", true); -} - -void OptionsModel::Upgrade() -{ - QSettings settings; - - // Already upgraded - if (settings.contains("bImportFinished")) - return; - - settings.setValue("bImportFinished", true); - -#ifdef ENABLE_WALLET - // Move settings from old wallet.dat (if any): - CWalletDB walletdb(strWalletFile); - - QList<QString> intOptions; - intOptions << "nDisplayUnit" << "nTransactionFee"; - foreach(QString key, intOptions) - { - int value = 0; - if (walletdb.ReadSetting(key.toStdString(), value)) - { - settings.setValue(key, value); - walletdb.EraseSetting(key.toStdString()); - } - } - QList<QString> boolOptions; - boolOptions << "bDisplayAddresses" << "fMinimizeToTray" << "fMinimizeOnClose" << "fUseProxy" << "fUseUPnP"; - foreach(QString key, boolOptions) - { - bool value = false; - if (walletdb.ReadSetting(key.toStdString(), value)) - { - settings.setValue(key, value); - walletdb.EraseSetting(key.toStdString()); - } - } - try - { - CAddress addrProxyAddress; - if (walletdb.ReadSetting("addrProxy", addrProxyAddress)) - { - settings.setValue("addrProxy", addrProxyAddress.ToStringIPPort().c_str()); - walletdb.EraseSetting("addrProxy"); - } - } - catch (std::ios_base::failure &e) - { - // 0.6.0rc1 saved this as a CService, which causes failure when parsing as a CAddress - CService addrProxy; - if (walletdb.ReadSetting("addrProxy", addrProxy)) - { - settings.setValue("addrProxy", addrProxy.ToStringIPPort().c_str()); - walletdb.EraseSetting("addrProxy"); - } - } -#endif - - Init(); } int OptionsModel::rowCount(const QModelIndex & parent) const diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h index 7a71b772b2..e5c1e3e8b9 100644 --- a/src/qt/optionsmodel.h +++ b/src/qt/optionsmodel.h @@ -46,9 +46,6 @@ public: void Init(); void Reset(); - /* Migrate settings from wallet.dat after app initialization */ - void Upgrade(); - int rowCount(const QModelIndex & parent = QModelIndex()) const; QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const; bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole); diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index 661deffb19..78a92ce1e9 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -410,8 +410,8 @@ Value verifychain(const Array& params, bool fHelp) "verifychain ( checklevel numblocks )\n" "\nVerifies blockchain database.\n" "\nArguments:\n" - "1. checklevel (numeric, optional, default=3) The level\n" - "2. numblocks (numeric, optional, 288) The number of blocks\n" + "1. checklevel (numeric, optional, 0-4, default=3) How thorough the block verification is.\n" + "2. numblocks (numeric, optional, default=288, 0=all) The number of blocks to check.\n" "\nResult:\n" "true|false (boolean) Verified or not\n" "\nExamples:\n" diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp index a3b37aa9e5..d9bcc3429d 100644 --- a/src/rpcnet.cpp +++ b/src/rpcnet.cpp @@ -47,7 +47,7 @@ Value ping(const Array& params, bool fHelp) "ping\n" "\nRequests that a ping be sent to all other nodes, to measure ping time.\n" "Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds.\n" - "Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping." + "Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.\n" "\nExamples:\n" + HelpExampleCli("ping", "") + HelpExampleRpc("ping", "") diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 8311b39c4e..7045225825 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -1850,9 +1850,9 @@ Value settxfee(const Array& params, bool fHelp) if (fHelp || params.size() < 1 || params.size() > 1) throw runtime_error( "settxfee amount\n" - "\nSet the transaction fee per KB.\n" + "\nSet the transaction fee per kB.\n" "\nArguments:\n" - "1. amount (numeric, required) The transaction fee in BTC/KB rounded to the nearest 0.00000001\n" + "1. amount (numeric, required) The transaction fee in BTC/kB rounded to the nearest 0.00000001\n" "\nResult\n" "true|false (boolean) Returns true if successful\n" "\nExamples:\n" diff --git a/src/wallet.cpp b/src/wallet.cpp index 9648f6f88d..979560651c 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -191,18 +191,6 @@ void CWallet::SetBestChain(const CBlockLocator& loc) walletdb.WriteBestBlock(loc); } -// This class implements an addrIncoming entry that causes pre-0.4 -// clients to crash on startup if reading a private-key-encrypted wallet. -class CCorruptAddress -{ -public: - IMPLEMENT_SERIALIZE - ( - if (nType & SER_DISK) - READWRITE(nVersion); - ) -}; - bool CWallet::SetMinVersion(enum WalletFeature nVersion, CWalletDB* pwalletdbIn, bool fExplicit) { AssertLockHeld(cs_wallet); // nWalletVersion @@ -221,13 +209,6 @@ bool CWallet::SetMinVersion(enum WalletFeature nVersion, CWalletDB* pwalletdbIn, if (fFileBacked) { CWalletDB* pwalletdb = pwalletdbIn ? pwalletdbIn : new CWalletDB(strWalletFile); - if (nWalletVersion >= 40000) - { - // Versions prior to 0.4.0 did not support the "minversion" record. - // Use a CCorruptAddress to make them crash instead. - CCorruptAddress corruptAddress; - pwalletdb->WriteSetting("addrIncoming", corruptAddress); - } if (nWalletVersion > 40000) pwalletdb->WriteMinVersion(nWalletVersion); if (!pwalletdbIn) diff --git a/src/walletdb.cpp b/src/walletdb.cpp index d912317a55..56349fcfbd 100644 --- a/src/walletdb.cpp +++ b/src/walletdb.cpp @@ -154,12 +154,6 @@ bool CWalletDB::ErasePool(int64_t nPool) return Erase(std::make_pair(std::string("pool"), nPool)); } -bool CWalletDB::EraseSetting(const std::string& strKey) -{ - nWalletDBUpdated++; - return Erase(std::make_pair(std::string("setting"), strKey)); -} - bool CWalletDB::WriteMinVersion(int nVersion) { return Write(std::string("minversion"), nVersion); diff --git a/src/walletdb.h b/src/walletdb.h index 15af287245..4f3e29283e 100644 --- a/src/walletdb.h +++ b/src/walletdb.h @@ -104,22 +104,6 @@ public: bool WritePool(int64_t nPool, const CKeyPool& keypool); bool ErasePool(int64_t nPool); - // Settings are no longer stored in wallet.dat; these are - // used only for backwards compatibility: - template<typename T> - bool ReadSetting(const std::string& strKey, T& value) - { - return Read(std::make_pair(std::string("setting"), strKey), value); - } - template<typename T> - bool WriteSetting(const std::string& strKey, const T& value) - { - nWalletDBUpdated++; - return Write(std::make_pair(std::string("setting"), strKey), value); - } - - bool EraseSetting(const std::string& strKey); - bool WriteMinVersion(int nVersion); bool ReadAccount(const std::string& strAccount, CAccount& account); |