11446 Commits

Author SHA1 Message Date
Pieter Wuille
2cad5db6f7 Align constant names for maximum compact block / blocktxn depth
Github-Pull: #8637
Rebased-From: 3ac6de0a045cc9b2047ceb19af970e7ffbf905fa
2016-11-20 15:08:16 +01:00
instagibbs
3d23a0eaa3 Add cmpctblock to debug help list
Github-Pull: #8637
Rebased-From: b2e93a343ec2dc7d255b970e6ee45e9c390f7ed0
2016-11-20 15:08:03 +01:00
Matt Corallo
76ba1c9739 More agressively filter compact block requests
Unit test adaptations by Pieter Wuille.

Github-Pull: #8637
Rebased-From: fe998e962dc015978f104b782afb7daec3c4d4df
2016-11-20 15:07:53 +01:00
Matt Corallo
36e3b95103 Dont remove a "preferred" cmpctblock peer if they provide a block
Github-Pull: #8637
Rebased-From: 02a337defdd854efc78ecba6d1fb19cb1c075f16
2016-11-20 15:07:39 +01:00
Russell Yanofsky
286e548d87 [qa] Fix stale data bug in test_compactblocks_not_at_tip
Clear test_node.last_block before requesting blocks in the
compactblocks_not_at_tip test so comparisons won't fail if a blocks were received
before the test started.

The bug doesn't currently cause any problems due to the order tests run, but
this will change in the next commit.

Github-Pull: #9058
Rebased-From: 55bfddcabbf9e8a3743f77167ba4a43aaba9f948
2016-11-19 23:55:07 +01:00
Russell Yanofsky
2ba5d78427 [qa] Fix bug in compactblocks v2 merge
Bug caused the wait_for_block_announcement to be called on the wrong node,
leading to nondeterminism and occasional test failures. Bug was introduced in
merge commit:

d075479 Merge #8882: [qa] Fix race conditions in p2p-compactblocks.py and sendheaders.py

Underlying commits which conflicted were:

27acfc1 [qa] Update p2p-compactblocks.py for compactblocks v2
6976db2 [qa] Another attempt to fix race condition in p2p-compactblocks.py

The first commit changed the test_compactblock_construction function signature
and second commit added code which wasn't updated during the merge to use the
new arguments.

Suhas Daftuar <sdaftuar@chaincode.com> noticed the bug and suggested the fix.

Github-Pull: #9058
Rebased-From: 47e9659ecfbe07077a4564591095bd5510e0f917
2016-11-19 23:53:01 +01:00
Russell Yanofsky
eca9b46537 [qa] Wait for specific block announcement in p2p-compactblocks
Change check_announcement_of_new_block() to wait specifically for the
announcement of the newly created block, instead of waiting for any
announcement at all. A difficult to reproduce failure in
check_announcement_of_new_block() that happened in a travis build
(https://travis-ci.org/bitcoin/bitcoin/jobs/175198367) might have happened
because an older announcement was mistaken for the expected one. The error
looked like:

  Assertion failed: Failed

  File ".../bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 145, in main
    self.run_test()
  File ".../bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 787, in run_test
    self.test_sendcmpct(self.nodes[1], self.segwit_node, 2, old_node=self.old_node)
  File ".../bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 201, in test_sendcmpct
    check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is None and p.last_inv is not None)
  File ".../bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 194, in check_announcement_of_new_block
    assert(predicate(peer))

This commit also changes the assertion failed message above to include more
detailed information for debug.

Github-Pull: #9159
Rebased-From: dfa44d1b07a6d1022005dba63dd6372739eee8a0
2016-11-19 23:34:58 +01:00
Wladimir J. van der Laan
dccdc3aa34 test: Fix use-after-free in scheduler tests
Make a copy of the boost time-point to wait for, otherwise the head of
the queue may be deleted by another thread while this one is waiting,
while the boost function still has a reference to it.

Although this problem is in non-test code, this is not an actual problem
outside of the tests because we use the thread scheduler with only one
service thread, so there will never be threads fighting at the head of
the queue.

The old boost fallback escapes this problem because it passes a scalar
value to wait_until instead of a const object reference.

Found by running the tests in LLVM-4.0-master asan.

Github-Pull: #9186
Rebased-From: 12519bf62b8c49b1c1744eca6ea5b3162a61f962
2016-11-19 23:24:35 +01:00
Russell Yanofsky
da4926b1d2 [qa] Add more helpful RPC timeout message
Replace previous timeout('timed out',) exception with more detailed error.

Github-Pull: #9077
Rebased-From: e89614b6abf28d7fe201c3db44a0df6e4db6de03
2016-11-19 23:21:19 +01:00
Russell Yanofsky
1d4c884cd3 [qa] Increase wallet-dump RPC timeout
Increase wallet-dump RPC timeout from 30 seconds to 1 minute. This avoids a
timeout error that seemed to happen regularly (around 50% of builds) on a
particular jenkins server during the first getnewaddress RPC call made by the
test.

The failing stack trace looked like:

    Unexpected exception caught during testing: timeout('timed out',)

    File ".../bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 146, in main
      self.run_test()
    File ".../bitcoin/qa/rpc-tests/wallet-dump.py", line 73, in run_test
      addr = self.nodes[0].getnewaddress()
    File ".../bitcoin/qa/rpc-tests/test_framework/coverage.py", line 49, in __call__
      return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
    File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 145, in __call__
      response = self._request('POST', self.__url.path, postdata.encode('utf-8'))
    File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 121, in _request
      return self._get_response()
    File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 160, in _get_response
      http_response = self.__conn.getresponse()
    File "/usr/lib/python3.4/http/client.py", line 1171, in getresponse
      response.begin()
    File "/usr/lib/python3.4/http/client.py", line 351, in begin
      version, status, reason = self._read_status()
    File "/usr/lib/python3.4/http/client.py", line 313, in _read_status
      line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
    File "/usr/lib/python3.4/socket.py", line 374, in readinto
      return self._sock.recv_into(b)

Github-Pull: #9077
Rebased-From: 8463aaa63c5ac76421c4d2754ea9e17a31584c93
2016-11-19 23:21:07 +01:00
mrbandrews
3107280e14 [qa] add assert_raises_message to check specific error message
Github-Pull: #9168
Rebased-From: 307acdd3df03082295ac0f7fe9eba7dd35973bc4
2016-11-19 23:20:14 +01:00
Wladimir J. van der Laan
9460771a60
Merge #9048: [0.13 backport] Fix handling of invalid compact blocks
e8ef50b Bump the protocol version to distinguish new banning behavior. (Suhas Daftuar)
015865e Fix compact block handling to not ban if block is invalid (Suhas Daftuar)
8290506 [qa] Test that invalid compactblocks don't result in ban (Suhas Daftuar)
2016-11-09 22:11:47 +01:00
Wladimir J. van der Laan
59ce53c13c
Merge #9011: 0.13.2 backports
b16cdb7 Add MIT license to build-aux/m4 scripts (Luke Dashjr)
2cfcca7 Trivial: build-aux/m4/l_atomic: Fix typo (Luke Dashjr)
fa58e55 Add MIT license to autogen.sh and share/genbuild.sh (Luke Dashjr)
6d05fe1 Add MIT license to Makefiles (Luke Dashjr)
1d048b9 Don't return the address of a P2SH of a P2SH. (jnewbery)
ce0d817 Fix relaypriority calculation error (maiiz)
9ef3875 Add missing cs_main lock to ::GETBLOCKTXN processing (Matt Corallo)
2016-11-02 15:15:44 +01:00
Suhas Daftuar
e8ef50ba51 Bump the protocol version to distinguish new banning behavior.
This allows future software that would relay compact blocks before
full validation to announce only to peers that will not ban if the
block turns out to be invalid.
2016-11-01 15:27:20 -04:00
Suhas Daftuar
015865ee9e Fix compact block handling to not ban if block is invalid 2016-11-01 13:20:21 -04:00
Suhas Daftuar
82905069bf [qa] Test that invalid compactblocks don't result in ban 2016-10-31 10:05:29 -04:00
Wladimir J. van der Laan
2e2388a5cb
Move release notes to release-notes/release-notes-0.13.1.md
And clean out current release notes, ready for next release from this
branch.
2016-10-27 14:55:10 +02:00
Luke Dashjr
b16cdb71ff Add MIT license to build-aux/m4 scripts
Github-Pull: #8784
Rebased-From: 0c4e6ce88f58c13ed81807e3a5bef28b673aa503
2016-10-27 14:47:22 +02:00
Luke Dashjr
2cfcca7ca6 Trivial: build-aux/m4/l_atomic: Fix typo
Github-Pull: #8784
Rebased-From: 3f8a5d8f6e95c3c1aa62433abc5edb0c93caae11
2016-10-27 14:47:22 +02:00
Luke Dashjr
fa58e55cef Add MIT license to autogen.sh and share/genbuild.sh
Github-Pull: #8784
Rebased-From: 3b4b6dcdd77f3ba76fb0cda6f2c277ec1629d8d3
2016-10-27 14:47:22 +02:00
Luke Dashjr
6d05fe115b Add MIT license to Makefiles
Github-Pull: #8784
Rebased-From: f4dffdd6bffc58377b7505b639f0431244321c32
2016-10-27 14:47:22 +02:00
jnewbery
1d048b917b Don't return the address of a P2SH of a P2SH.
Github-Pull: #8845
Rebased-From: d51f18246165b580761af824f1bb4a49b6908f28
2016-10-27 14:47:22 +02:00
maiiz
ce0d817b9b Fix relaypriority calculation error
Github-Pull: #8357
Rebased-From: 94a34a5d951cee59ef9c9274c5ad49ac2a91ab8a
2016-10-27 14:47:22 +02:00
Matt Corallo
9ef38758a6 Add missing cs_main lock to ::GETBLOCKTXN processing
Note that this is not a major issue as, in order for the missing
lock to cause issues, you have to receive a GETBLOCKTXN message
while reindexing, adding a block header via RPC, etc, which results
in either a table rehash or an insert into the bucket which you are
currently looking at.

Github-Pull: #8995
Rebased-From: dfe79060a62c8de098e75d527d97b99c3b10de50
2016-10-27 14:47:22 +02:00
Wladimir J. van der Laan
03422e564b
Merge #9022: Update release notes to mention dropping OS X 10.7 support
1d12463 Update release notes for dropping osx 10.7 support (Michael Ford)
2016-10-27 08:10:55 +02:00
Michael Ford
1d1246314f
Update release notes for dropping osx 10.7 support 2016-10-27 10:34:18 +08:00
Cory Fields
a32d7c23fc
release: bump required osx version to 10.8. Credit jonasschnelli.
libc++ on 10.7 causes too many issues.

See #8577 for discussion/details.

Github-Pull: #9015
Rebased-From: 339c4b6c3a8e68e4bba1969d144e413a462b68f1
2016-10-26 10:07:20 +02:00
MarcoFalke
58d4fa7da3
[net] Remove assert(nMaxInbound > 0)
nMaxInbound might very well be 0 or -1, if the user prefers to keep
a small number of maxconnections.

Note: nMaxInbound of -1 means that the user set maxconnections
to 8 or less, but we still want to keep an additional slot for
the feeler connection.

Github-Pull: #9008
Rebased-From: fa1c3c2eb0a1853ed0e0662fc2bdbca51e05ccf5
2016-10-25 19:29:23 +02:00
Wladimir J. van der Laan
cb69988572
Merge #9012: release-notes: Update from blog draft
99f5cf1 release-notes: Update from blog draft (Luke Dashjr)
2016-10-25 14:12:12 +02:00
Luke Dashjr
99f5cf1893 release-notes: Update from blog draft 2016-10-25 11:31:34 +00:00
Wladimir J. van der Laan
c9a5baddee
doc: Update blurb in release notes
Minor version, not major version.
2016-10-20 13:03:21 +02:00
Wladimir J. van der Laan
5f6b312e51
doc: Add missing credit to release notes
(Eric participated in Segwit work but has no direct commits, so should
be mentioned)
2016-10-20 12:27:43 +02:00
Wladimir J. van der Laan
6e8936032f
doc: Update release notes for rc2 2016-10-19 11:58:19 +02:00
Wladimir J. van der Laan
0dbc48a5bd
nMaxOutbound is MAX_OUTBOUND_CONNECTIONS on 0.13
Github-Pull: #8949
2016-10-19 11:50:15 +02:00
Wladimir J. van der Laan
53e6196a90
qt: pre-rc2 translations update 2016-10-19 11:48:12 +02:00
Luke Dashjr
7c2bf4b175
RPC/Mining: getblocktemplate: Update and fix formatting of help
Github-Pull: #8951
Rebased-From: 59daa58d6a17bb1170c724f2d01d43c2ec21a9b4
2016-10-19 11:24:22 +02:00
Gregory Maxwell
91ae0b06b9
Make dnsseed's definition of acute need include relevant services.
We normally prefer to connect to peers offering the relevant services.

If we're not connected to enough peers with relevant services, we
 probably don't know about them and could use dnsseed's help.

Github-Pull: #8949
Rebased-From: 46304791353d2bb61004a035869612620c30b4eb
2016-10-19 11:24:12 +02:00
Gregory Maxwell
33cd5539b2
Be more aggressive in connecting to peers with relevant services.
Only allow skipping relevant services until there are four outbound
 connections up.

This avoids quickly filling up with peers lacking the relevant
 services when addrman has few or none of them.

Github-Pull: #8949
Rebased-From: 9583477288072e203541b747fcffe8d50cfefb8d
2016-10-19 11:23:53 +02:00
Wladimir J. van der Laan
2c0913d0b3
Merge #8960: doc: update 0.13.1 release note info on linux arm builds
d179eed doc: update 0.13.1 release note info on linux arm builds [skip ci] (mruddy)
2016-10-18 18:35:31 +02:00
mruddy
d179eed6ca doc: update 0.13.1 release note info on linux arm builds
[skip ci]
2016-10-18 11:20:47 -04:00
Matt Corallo
685e4c78f8
Remove bogus assert on number of oubound connections.
This value can be significantly higher if the users uses addnode

Github-Pull: #8944
Rebased-From: 1ab21cf344ed0547de5ae679b7e479cb4b1a923b
2016-10-18 14:41:42 +02:00
Wladimir J. van der Laan
3f508edcfb
rpc: Generate auth cookie in hex instead of base64
Base64 contains '/', and the '/' character in credentials is problematic
for AuthServiceProxy which represents the RPC endpoint as an URI with
user and password embedded.

Closes #8399.

Github-Pull: #8858
Rebased-From: 1c80386bceb216ca5b5da657e03a29f9c779d58b
2016-10-18 14:41:17 +02:00
Wladimir J. van der Laan
907c314057
Merge #8947: Add historical release notes for v0.13.0
c9ffe90 Add historical release notes for v0.13.0 (Micha)
2016-10-18 10:46:29 +02:00
Wladimir J. van der Laan
c418c0550d
Merge #8943: Release notes: add info about segwit and null dummy soft forks
bf86073 Release notes: correct segwit signalling period start conditions (David A. Harding)
2de93f0 Relase notes: correct segwit activation point (David A. Harding)
5f9c7b0 Release notes: add info about segwit and null dummy soft forks (David A. Harding)
2016-10-18 00:28:05 +02:00
Wladimir J. van der Laan
a5cef7b077
Bump version to 0.13.1 2016-10-18 00:15:59 +02:00
Micha
c9ffe9044d
Add historical release notes for v0.13.0
[skip ci]
2016-10-18 00:34:32 +03:00
David A. Harding
bf86073e45 Release notes: correct segwit signalling period start conditions
[ci skip]
2016-10-17 14:14:14 -04:00
David A. Harding
2de93f0a9b Relase notes: correct segwit activation point 2016-10-17 14:05:21 -04:00
David A. Harding
5f9c7b0abd Release notes: add info about segwit and null dummy soft forks
[no ci]
2016-10-17 13:54:22 -04:00
Wladimir J. van der Laan
e1169b0529
doc: Update release notes for last-minute pulls 2016-10-17 19:49:52 +02:00