Skip to content

Commit

Permalink
Merge pull request #20 from bitcoin/0.14
Browse files Browse the repository at this point in the history
Update to Core 0.14.2
  • Loading branch information
mkwia authored Jun 17, 2017
2 parents 1809845 + fc61c83 commit 3a051b8
Show file tree
Hide file tree
Showing 39 changed files with 2,815 additions and 207 deletions.
3 changes: 0 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ $(BITCOIN_WIN_INSTALLER): all-recursive
echo error: could not build $@
@echo built $@

$(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
$(MAKE) -C src $(patsubst src/%,%,$@)

$(OSX_APP)/Contents/PkgInfo:
$(MKDIR_P) $(@D)
@echo "APPL????" > $@
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 14)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_REVISION, 2)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2017)
Expand Down
4 changes: 2 additions & 2 deletions depends/packages/miniupnpc.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package=miniupnpc
$(package)_version=2.0
$(package)_version=2.0.20170509
$(package)_download_path=http://miniupnp.free.fr/files
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=d434ceb8986efbe199c5ca53f90ed53eab290b1e6d0530b717eb6fa49d61f93b
$(package)_sha256_hash=d3c368627f5cdfb66d3ebd64ca39ba54d6ff14a61966dbecb8dd296b7039f16a

define $(package)_set_vars
$(package)_build_opts=CC="$($(package)_cc)"
Expand Down
2 changes: 1 addition & 1 deletion doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Bitcoin Core"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.14.1
PROJECT_NUMBER = 0.14.2

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Bitcoin Core 0.14.1
Bitcoin Core 0.14.2
=====================

Setup
Expand Down
2 changes: 1 addition & 1 deletion doc/README_windows.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Bitcoin Core 0.14.1
Bitcoin Core 0.14.2
=====================

Intro
Expand Down
6 changes: 4 additions & 2 deletions doc/build-unix.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,10 @@ Clang is installed by default as `cc` compiler, this makes it easier to get
started than on [OpenBSD](build-openbsd.md). Installing dependencies:

pkg install autoconf automake libtool pkgconf
pkg install boost-libs openssl libevent2
pkg install boost-libs openssl libevent
pkg install gmake

You need to use GNU make (`gmake`) instead of `make`.
(`libressl` instead of `openssl` will also work)

For the wallet (optional):
Expand All @@ -338,7 +340,7 @@ Then build using:

./autogen.sh
./configure --with-incompatible-bdb BDB_CFLAGS="-I/usr/local/include/db5" BDB_LIBS="-L/usr/local/lib -ldb_cxx-5"
make
gmake

*Note on debugging*: The version of `gdb` installed by default is [ancient and considered harmful](https://wiki.freebsd.org/GdbRetirement).
It is not suitable for debugging a multi-threaded C++ program, not even for getting backtraces. Please install the package `gdb` and
Expand Down
6 changes: 3 additions & 3 deletions doc/man/bitcoin-cli.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
.TH BITCOIN-CLI "1" "February 2017" "bitcoin-cli v0.14.0.0" "User Commands"
.TH BITCOIN-CLI "1" "June 2017" "bitcoin-cli v0.14.2.0" "User Commands"
.SH NAME
bitcoin-cli \- manual page for bitcoin-cli v0.14.0.0
bitcoin-cli \- manual page for bitcoin-cli v0.14.2.0
.SH DESCRIPTION
Bitcoin Core RPC client version v0.14.0.0\-dirty
Bitcoin Core RPC client version v0.14.2.0
.SS "Usage:"
.TP
bitcoin\-cli [options] <command> [params]
Expand Down
8 changes: 4 additions & 4 deletions doc/man/bitcoin-qt.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
.TH BITCOIN-QT "1" "February 2017" "bitcoin-qt v0.14.0.0" "User Commands"
.TH BITCOIN-QT "1" "June 2017" "bitcoin-qt v0.14.2.0" "User Commands"
.SH NAME
bitcoin-qt \- manual page for bitcoin-qt v0.14.0.0
bitcoin-qt \- manual page for bitcoin-qt v0.14.2.0
.SH DESCRIPTION
Bitcoin Core version v0.14.0.0\-dirty (64\-bit)
Bitcoin Core version v0.14.2.0 (64\-bit)
Usage:
.IP
bitcoin\-qt [command\-line options]
Expand Down Expand Up @@ -46,7 +46,7 @@ Specify data directory
.HP
\fB\-dbcache=\fR<n>
.IP
Set database cache size in megabytes (4 to 16384, default: 300)
Set database cache size in megabytes (4 to 16384, default: 450)
.HP
\fB\-loadblock=\fR<file>
.IP
Expand Down
6 changes: 3 additions & 3 deletions doc/man/bitcoin-tx.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
.TH BITCOIN-TX "1" "February 2017" "bitcoin-tx v0.14.0.0" "User Commands"
.TH BITCOIN-TX "1" "June 2017" "bitcoin-tx v0.14.2.0" "User Commands"
.SH NAME
bitcoin-tx \- manual page for bitcoin-tx v0.14.0.0
bitcoin-tx \- manual page for bitcoin-tx v0.14.2.0
.SH DESCRIPTION
Bitcoin Core bitcoin\-tx utility version v0.14.0.0\-dirty
Bitcoin Core bitcoin\-tx utility version v0.14.2.0
.SS "Usage:"
.TP
bitcoin\-tx [options] <hex\-tx> [commands]
Expand Down
8 changes: 4 additions & 4 deletions doc/man/bitcoind.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
.TH BITCOIND "1" "February 2017" "bitcoind v0.14.0.0" "User Commands"
.TH BITCOIND "1" "June 2017" "bitcoind v0.14.2.0" "User Commands"
.SH NAME
bitcoind \- manual page for bitcoind v0.14.0.0
bitcoind \- manual page for bitcoind v0.14.2.0
.SH DESCRIPTION
Bitcoin Core Daemon version v0.14.0.0\-dirty
Bitcoin Core Daemon version v0.14.2.0
.SS "Usage:"
.TP
bitcoind [options]
Expand Down Expand Up @@ -51,7 +51,7 @@ Specify data directory
.HP
\fB\-dbcache=\fR<n>
.IP
Set database cache size in megabytes (4 to 16384, default: 300)
Set database cache size in megabytes (4 to 16384, default: 450)
.HP
\fB\-loadblock=\fR<file>
.IP
Expand Down
59 changes: 54 additions & 5 deletions doc/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Bitcoin Core version 0.14.x is now available from:
Bitcoin Core version 0.14.2 is now available from:

<https://bitcoin.org/bin/bitcoin-core-0.14.x/>
<https://bitcoin.org/bin/bitcoin-core-0.14.2/>

This is a new minor version release, including various bugfixes and
performance improvements, as well as updated translations.
Expand Down Expand Up @@ -30,24 +30,73 @@ frequently tested on them.
Notable changes
===============

Example item
------------
miniupnp CVE-2017-8798
----------------------------

Bundled miniupnpc was updated to 2.0.20170509. This fixes an integer signedness error
(present in MiniUPnPc v1.4.20101221 through v2.0) that allows remote attackers
(within the LAN) to cause a denial of service or possibly have unspecified
other impact.

0.14.x Change log
This only affects users that have explicitly enabled UPnP through the GUI
setting or through the `-upnp` option, as since the last UPnP vulnerability
(in Bitcoin Core 0.10.3) it has been disabled by default.

If you use this option, it is recommended to upgrade to this version as soon as
possible.

Known Bugs
==========

Since 0.14.0 the approximate transaction fee shown in Bitcoin-Qt when using coin
control and smart fee estimation does not reflect any change in target from the
smart fee slider. It will only present an approximate fee calculated using the
default target. The fee calculated using the correct target is still applied to
the transaction and shown in the final send confirmation dialog.

0.14.2 Change log
=================

Detailed release notes follow. This overview includes changes that affect
behavior, not code moves, refactors and string updates. For convenience in locating
the code changes and accompanying discussion, both the pull request and
git merge commit are mentioned.

### RPC and other APIs
- #10410 `321419b` Fix importwallet edge case rescan bug (ryanofsky)

### P2P protocol and network code
- #10424 `37a8fc5` Populate services in GetLocalAddress (morcos)
- #10441 `9e3ad50` Only enforce expected services for half of outgoing connections (theuni)

### Build system
- #10414 `ffb0c4b` miniupnpc 2.0.20170509 (fanquake)
- #10228 `ae479bc` Regenerate bitcoin-config.h as necessary (theuni)

### Miscellaneous
- #10245 `44a17f2` Minor fix in build documentation for FreeBSD 11 (shigeya)
- #10215 `0aee4a1` Check interruptNet during dnsseed lookups (TheBlueMatt)

### GUI
- #10231 `1e936d7` Reduce a significant cs_main lock freeze (jonasschnelli)

### Wallet
- #10294 `1847642` Unset change position when there is no change (instagibbs)

Credits
=======

Thanks to everyone who directly contributed to this release:

- Alex Morcos
- Cory Fields
- fanquake
- Gregory Sanders
- Jonas Schnelli
- Matt Corallo
- Russell Yanofsky
- Shigeya Suzuki
- Wladimir J. van der Laan

As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/).

5 changes: 5 additions & 0 deletions qa/rpc-tests/fundrawtransaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ def run_test(self):
self.nodes[0].generate(121)
self.sync_all()

# ensure that setting changePosition in fundraw with an exact match is handled properly
rawmatch = self.nodes[2].createrawtransaction([], {self.nodes[2].getnewaddress():50})
rawmatch = self.nodes[2].fundrawtransaction(rawmatch, {"changePosition":1, "subtractFeeFromOutputs":[0]})
assert_equal(rawmatch["changepos"], -1)

watchonly_address = self.nodes[0].getnewaddress()
watchonly_pubkey = self.nodes[0].validateaddress(watchonly_address)["pubkey"]
watchonly_amount = Decimal(200)
Expand Down
8 changes: 8 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,14 @@ DISTCLEANFILES = obj/build.h

EXTRA_DIST = $(CTAES_DIST)


config/bitcoin-config.h: config/stamp-h1
@$(MAKE) -C $(top_builddir) $(subdir)/$(@)
config/stamp-h1: $(top_srcdir)/$(subdir)/config/bitcoin-config.h.in $(top_builddir)/config.status
$(AM_V_at)$(MAKE) -C $(top_builddir) $(subdir)/$(@)
$(top_srcdir)/$(subdir)/config/bitcoin-config.h.in: $(am__configure_deps)
$(AM_V_at)$(MAKE) -C $(top_srcdir) $(subdir)/config/bitcoin-config.h.in

clean-local:
-$(MAKE) -C secp256k1 clean
-$(MAKE) -C univalue clean
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 14
#define CLIENT_VERSION_REVISION 1
#define CLIENT_VERSION_REVISION 2
#define CLIENT_VERSION_BUILD 0

//! Set to true for release, false for prerelease or test build
Expand Down
29 changes: 27 additions & 2 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static std::vector<CAddress> convertSeed6(const std::vector<SeedSpec6> &vSeedsIn
// one by discovery.
CAddress GetLocalAddress(const CNetAddr *paddrPeer, ServiceFlags nLocalServices)
{
CAddress ret(CService(CNetAddr(),GetListenPort()), NODE_NONE);
CAddress ret(CService(CNetAddr(),GetListenPort()), nLocalServices);
CService addr;
if (GetLocal(addr, paddrPeer))
{
Expand Down Expand Up @@ -1579,6 +1579,9 @@ void CConnman::ThreadDNSAddressSeed()
LogPrintf("Loading addresses from DNS seeds (could take a while)\n");

BOOST_FOREACH(const CDNSSeedData &seed, vSeeds) {
if (interruptNet) {
return;
}
if (HaveNameProxy()) {
AddOneShot(seed.host);
} else {
Expand All @@ -1596,6 +1599,9 @@ void CConnman::ThreadDNSAddressSeed()
found++;
}
}
if (interruptNet) {
return;
}
// TODO: The seed name resolve may fail, yielding an IP of [::], which results in
// addrman assigning the same source to results from different seeds.
// This should switch to a hard-coded stable dummy IP for each seed name, so that the
Expand Down Expand Up @@ -1716,11 +1722,17 @@ void CConnman::ThreadOpenConnections()
// Only connect out to one peer per network group (/16 for IPv4).
// Do this here so we don't have to critsect vNodes inside mapAddresses critsect.
int nOutbound = 0;
int nOutboundRelevant = 0;
std::set<std::vector<unsigned char> > setConnected;
{
LOCK(cs_vNodes);
BOOST_FOREACH(CNode* pnode, vNodes) {
if (!pnode->fInbound && !pnode->fAddnode) {

// Count the peers that have all relevant services
if (pnode->fSuccessfullyConnected && !pnode->fFeeler && ((pnode->nServices & nRelevantServices) == nRelevantServices)) {
nOutboundRelevant++;
}
// Netgroups for inbound and addnode peers are not excluded because our goal here
// is to not use multiple of our limited outbound slots on a single netgroup
// but inbound and addnode peers do not use our outbound slots. Inbound peers
Expand Down Expand Up @@ -1784,14 +1796,27 @@ void CConnman::ThreadOpenConnections()
continue;

// only consider nodes missing relevant services after 40 failed attempts and only if less than half the outbound are up.
if ((addr.nServices & nRelevantServices) != nRelevantServices && (nTries < 40 || nOutbound >= (nMaxOutbound >> 1)))
ServiceFlags nRequiredServices = nRelevantServices;
if (nTries >= 40 && nOutbound < (nMaxOutbound >> 1)) {
nRequiredServices = REQUIRED_SERVICES;
}

if ((addr.nServices & nRequiredServices) != nRequiredServices) {
continue;
}

// do not allow non-default ports, unless after 50 invalid addresses selected already
if (addr.GetPort() != Params().GetDefaultPort() && nTries < 50)
continue;

addrConnect = addr;

// regardless of the services assumed to be available, only require the minimum if half or more outbound have relevant services
if (nOutboundRelevant >= (nMaxOutbound >> 1)) {
addrConnect.nServices = REQUIRED_SERVICES;
} else {
addrConnect.nServices = nRequiredServices;
}
break;
}

Expand Down
3 changes: 1 addition & 2 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel)
connect(_clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int)));
connect(_clientModel, SIGNAL(networkActiveChanged(bool)), this, SLOT(setNetworkActive(bool)));

modalOverlay->setKnownBestHeight(_clientModel->getHeaderTipHeight(), QDateTime::fromTime_t(_clientModel->getHeaderTipTime()));
setNumBlocks(_clientModel->getNumBlocks(), _clientModel->getLastBlockDate(), _clientModel->getVerificationProgress(NULL), false);
connect(_clientModel, SIGNAL(numBlocksChanged(int,QDateTime,double,bool)), this, SLOT(setNumBlocks(int,QDateTime,double,bool)));

Expand Down Expand Up @@ -505,8 +506,6 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel)
// initialize the disable state of the tray icon with the current value in the model.
setTrayIconVisible(optionsModel->getHideTrayIcon());
}

modalOverlay->setKnownBestHeight(clientModel->getHeaderTipHeight(), QDateTime::fromTime_t(clientModel->getHeaderTipTime()));
} else {
// Disable possibility to show main window via action
toggleHideAction->setEnabled(false);
Expand Down
Loading

0 comments on commit 3a051b8

Please sign in to comment.