Commit graph

12973 commits

Author SHA1 Message Date
Pieter Wuille f873564231
Make KEY_SIZE a compile-time constant
Github-Pull: #9785
Rebased-From: 914fad155d
2017-02-17 21:50:14 +01:00
Wladimir J. van der Laan 04396bcc05
Merge #9784: Restore removed release notes.
1577f07 Restore removed release notes. (Gregory Maxwell)
2017-02-17 21:46:44 +01:00
Wladimir J. van der Laan 6187091411
doc: Add changelog for 0.14.0 to release notes 2017-02-17 21:44:05 +01:00
Gregory Maxwell 1577f0731a Restore removed release notes. 2017-02-17 18:54:36 +00:00
Wladimir J. van der Laan 871e19ac84
doc: Add list of authors to release notes
Generated from git, so there may be duplicate authors
if someone used multiple mail addresses.
2017-02-17 19:28:27 +01:00
Wladimir J. van der Laan 6d61a2b8c5
Merge #9783: release: bump gitian descriptors for a new 0.14 package cache
42f5f21 release: bump gitian descriptors for a new 0.14 package cache (Cory Fields)
2017-02-17 19:14:34 +01:00
Cory Fields 42f5f21287 release: bump gitian descriptors for a new 0.14 package cache 2017-02-17 12:48:04 -05:00
Wladimir J. van der Laan 268c390d02
doc: Update manpages for 0.14.0 2017-02-17 18:21:51 +01:00
Wladimir J. van der Laan 1a02ecc73a
doc: Update release notes from wiki 2017-02-17 17:48:30 +01:00
Wladimir J. van der Laan f68e4414d7
qt: pre-rc1 translations update 2017-02-17 17:43:06 +01:00
Wladimir J. van der Laan bc69f34b35
build: bump version to 0.14.0 2017-02-17 17:24:00 +01:00
Wladimir J. van der Laan 9828f9a996
Merge #9761: Use 2 hour grace period for key timestamps in importmulti rescans
e662af3 Use 2 hour grace period for key timestamps in importmulti rescans (Russell Yanofsky)
38d3e9e [qa] Extend import-rescan.py to test imports on pruned nodes. (Russell Yanofsky)
c28583d [qa] Extend import-rescan.py to test specific key timestamps (Russell Yanofsky)
8be0866 [qa] Simplify import-rescan.py (Russell Yanofsky)
2017-02-17 12:53:41 +01:00
Wladimir J. van der Laan ad168ef4e3
Merge #9778: Add two hour buffer to manual pruning
91fb506 Add two hour buffer to manual pruning (Alex Morcos)
2017-02-17 12:51:08 +01:00
Wladimir J. van der Laan 3c02b95740
Merge #9779: Update nMinimumChainWork and defaultAssumeValid.
3f78e46 Update nMinimumChainWork and defaultAssumeValid. (Gregory Maxwell)
2017-02-17 12:41:49 +01:00
Wladimir J. van der Laan 8dee822177
Merge #9777: Handle unusual maxsigcachesize gracefully
55c403b Ensure `-maxsigcachesize` is in valid range (John Newbery)
2017-02-17 09:05:48 +01:00
John Newbery 55c403b8fe Ensure -maxsigcachesize is in valid range
- If the -maxsigcachesize parameter is set to zero, setup a minimum sized
sigcache (2 elements) rather than segfaulting.
- Handle maxsigcachesize being negative
- Handle maxsigcachesize being too large
2017-02-17 09:04:37 +01:00
Alex Morcos 91fb506e0a Add two hour buffer to manual pruning 2017-02-16 17:47:56 -05:00
Gregory Maxwell 3f78e460ba Update nMinimumChainWork and defaultAssumeValid. 2017-02-16 19:31:03 +00:00
Russell Yanofsky e662af3583 Use 2 hour grace period for key timestamps in importmulti rescans
Gregory Maxwell <greg@xiph.org> pointed out the lack of grace period in
https://github.com/bitcoin/bitcoin/pull/9490#issue-199407998.

The importwallet RPC which uses key timestamps in a similar way already has a 2
hour grace period.
2017-02-16 09:05:55 -05:00
Wladimir J. van der Laan afae75fd3d
Merge #9675: Fix typo and spelling inconsistency in CONTRIBUTING.md
36164fa Fix typo and spelling inconsistency in CONTRIBUTING.md (Koki Takahashi)
2017-02-16 15:05:55 +01:00
Russell Yanofsky 38d3e9ee59 [qa] Extend import-rescan.py to test imports on pruned nodes. 2017-02-16 09:05:55 -05:00
Russell Yanofsky c28583d062 [qa] Extend import-rescan.py to test specific key timestamps 2017-02-16 09:05:55 -05:00
Russell Yanofsky 8be0866883 [qa] Simplify import-rescan.py
Get rid of partial functions so the test can be more easily extended to add
more variants of imports with options that affect rescanning (e.g. different
key timestamps).

Also change the second half of the test to send /to/ the imported addresses,
instead of /from/ the imported addresses. The goal of this part of the test was
to confirm that the wallet would pick up new transactions after an import
regardless of whether or not a rescan happened during the import. But because
the wallet can only do this reliably for incoming transactions and not outgoing
transactions (which require the wallet to look up transaction inputs) the test
previously was less meaningful than it should have been.
2017-02-16 09:05:55 -05:00
Wladimir J. van der Laan 8743320d6c
Merge #9763: [Trivial] Update comments referencing main.cpp
00e623d [Trivial] Update comments referencing main.cpp (CryptAxe)
2017-02-16 14:01:14 +01:00
CryptAxe 00e623d0b8 [Trivial] Update comments referencing main.cpp 2017-02-16 13:52:38 +01:00
Wladimir J. van der Laan e43a58514d
Merge #9771: Add missing cs_wallet lock that triggers new lock held assertion
07afcd6 Add missing cs_wallet lock that triggers new lock held assertion (Russell Yanofsky)
2017-02-16 10:30:33 +01:00
Wladimir J. van der Laan f8af89a918
Merge #9764: wallet: Prevent "overrides a member function but is not marked 'override'" warnings
6c5427d wallet: Prevent "overrides a member function but is not marked 'override'" warnings (Wladimir J. van der Laan)
2017-02-16 10:24:24 +01:00
Wladimir J. van der Laan 1e92e041dd
Merge #9765: Harden against mistakes handling invalid blocks
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
2017-02-16 10:23:41 +01:00
Russell Yanofsky 07afcd6379 Add missing cs_wallet lock that triggers new lock held assertion
A new AssertLockHeld(cs_wallet) call was added in commit a58370e
"Dedup nTimeFirstKey update logic" (part of PR #9108).

The lock held assertion will fail when loading prexisting wallets files from
before the #9108 merge that have watch-only keys.
2017-02-15 17:01:30 -05:00
Wladimir J. van der Laan 7a93af8340
Merge #9756: Return error when importmulti called with invalid address.
9acf25c Return error when importmulti called with invalid address. (Russell Yanofsky)
2017-02-15 16:29:16 +01:00
Wladimir J. van der Laan 476cc47da0
Merge #9758: Selectively suppress deprecation warnings
4b6cccc Selectively suppress deprecation warnings (Jonas Schnelli)
2017-02-15 15:08:59 +01:00
Suhas Daftuar ba803efb68 Harden against mistakes handling invalid blocks
Fixes a bug in AcceptBlock() in invoking CheckBlock() with incorrect
arguments, and restores a call to CheckBlock() from ProcessNewBlock()
as belt-and-suspenders.

Updates the (overspecified) tests to match behavior.
2017-02-15 08:17:57 -05:00
Wladimir J. van der Laan 6c5427d24c wallet: Prevent "overrides a member function but is not marked 'override'" warnings
Because it is used inconsistently at least version 5.4.0 of g++ to
complains about methods that don't use override. There is two ways to go
about this: remove override from the methods having it, or add it to the
methods missing it. I chose the second.
2017-02-15 11:31:28 +01:00
Wladimir J. van der Laan d8e8b06bd0
Merge #9108: Use importmulti timestamp when importing watch only keys (on top of #9682)
a80f98b Use importmulti timestamp when importing watch only keys (Russell Yanofsky)
a58370e Dedup nTimeFirstKey update logic (Russell Yanofsky)
2017-02-15 11:13:48 +01:00
Wladimir J. van der Laan 4c69d683f2
Merge #9553: Use z = std::max(x - y, 0) instead of z = x - y; if (z < 0) z = 0;
a47da4b Use z = std::max(x - y, 0); instead of z = x - y; if (z < 0) z = 0; (practicalswift)
2017-02-15 09:27:47 +01:00
Jonas Schnelli a441db01b5
Merge #9755: Bugfix: Qt/Options: Restore persistent "restart required" notice
0b4f273 Bugfix: Qt/Options: Restore persistent "restart required" notice (Luke Dashjr)
2017-02-14 15:57:02 +01:00
Wladimir J. van der Laan e87ce95fbd
Merge #9720: net: fix banning and disallow sending messages before receiving verack
d943491 qa: add a test to detect leaky p2p messages (Cory Fields)
8650bbb qa: Expose on-connection to mininode listeners (Matt Corallo)
5b5e4f8 qa: mininode learns when a socket connects, not its first action (Matt Corallo)
cbfc5a6 net: require a verack before responding to anything else (Cory Fields)
8502e7a net: parse reject earlier (Cory Fields)
c45b9fb net: correctly ban before the handshake is complete (Cory Fields)
2017-02-14 14:42:29 +01:00
Wladimir J. van der Laan b08656e343
Merge #9715: Disconnect peers which we do not receive VERACKs from within 60 sec
66f861a Add a test for P2P inactivity timeouts (Matt Corallo)
b436f92 qa: Expose on-connection to mininode listeners (Matt Corallo)
8aaba7a qa: mininode learns when a socket connects, not its first action (Matt Corallo)
2cbd119 Disconnect peers which we do not receive VERACKs from within 60 sec (Matt Corallo)
2017-02-14 14:35:15 +01:00
Wladimir J. van der Laan edc9e63c57
Merge #9682: Require timestamps for importmulti keys
266a811 Use MTP for importmulti "now" timestamps (Russell Yanofsky)
3cf9917 Add test to check new importmulti "now" value (Russell Yanofsky)
442887f Require timestamps for importmulti keys (Russell Yanofsky)
2017-02-14 14:32:22 +01:00
Jonas Schnelli 4b6ccccc16
Selectively suppress deprecation warnings 2017-02-14 13:50:57 +01:00
Wladimir J. van der Laan ec66d06e6e
Merge #9735: devtools: Handle Qt formatting characters edge-case in update-translations.py
7179e7c qt: Periodic translations update (Wladimir J. van der Laan)
5e903a5 devtools: Handle Qt formatting characters edge-case in update-translations.py (Wladimir J. van der Laan)
2017-02-14 12:21:34 +01:00
Cory Fields d9434918d2 qa: add a test to detect leaky p2p messages
This is certainly not exhaustive, but it's better than nothing. Adds checks
for:

- Any message received before sending a version
- Any message received other than version/reject before sending a verack

It also tries to goad the remote into sending a pong, address, or block
announcement.
2017-02-13 18:56:03 -05:00
Matt Corallo 8650bbb660 qa: Expose on-connection to mininode listeners 2017-02-13 18:56:03 -05:00
Matt Corallo 5b5e4f8330 qa: mininode learns when a socket connects, not its first action 2017-02-13 18:56:03 -05:00
Cory Fields cbfc5a6728 net: require a verack before responding to anything else
7a8c251901 made this logic hard to follow. After that change, messages would
not be sent to a peer via SendMessages() before the handshake was complete, but
messages could still be sent as a response to an incoming message.

For example, if a peer had not yet sent a verack, we wouldn't notify it about
new blocks, but we would respond to a PING with a PONG.

This change makes the behavior straightforward: until we've received a verack,
never send any message other than version/verack/reject.

The behavior until a VERACK is received has always been undefined, this change
just tightens our policy.

This also makes testing much easier, because we can now connect but not send
version/verack, and anything sent to us is an error.
2017-02-13 18:55:35 -05:00
Cory Fields 8502e7acbe net: parse reject earlier
Prior to this change, all messages were ignored until a VERSION message was
received, as well as possibly incurring a ban score.

Since REJECT messages can be sent at any time (including as a response to a bad
VERSION message), make sure to always parse them.

Moving this parsing up keeps it from being caught in the
if (pfrom->nVersion == 0) check below.
2017-02-13 18:55:35 -05:00
Cory Fields c45b9fb54c net: correctly ban before the handshake is complete
7a8c251901 made a change to avoid getting into SendMessages() until the
version handshake (VERSION + VERACK) is complete. That was done to avoid
leaking out messages to nodes who could connect, but never bothered sending
us their version/verack.

Unfortunately, the ban tally and possible disconnect are done as part of
SendMessages(). So after 7a8c251901, if a peer managed to do something
bannable before completing the handshake (say send 100 non-version messages
before their version), they wouldn't actually end up getting
disconnected/banned. That's fixed here by checking the banscore as part of
ProcessMessages() in addition to SendMessages().
2017-02-13 18:55:34 -05:00
Russell Yanofsky 9acf25cc01 Return error when importmulti called with invalid address.
Lack of error checking noticed by Alex Morcos <morcos@chaincode.com>
2017-02-13 17:54:51 -05:00
Luke Dashjr 0b4f273e9c Bugfix: Qt/Options: Restore persistent "restart required" notice 2017-02-13 22:50:16 +00:00
Wladimir J. van der Laan d978c41e1e
Merge #9736: Pre-0.14.0 hardcoded seeds update
a60677e Pre-0.14.0 hardcoded seeds update (Wladimir J. van der Laan)
bfa9393 contrib/seeds: Update PATTERN_AGENT (Wladimir J. van der Laan)
4dfac2c Update seeds tooling to Python 3 (Wladimir J. van der Laan)
2017-02-11 08:46:10 +01:00