Commit graph

965 commits

Author SHA1 Message Date
Wladimir J. van der Laan
e2b8c394d6
Merge #8817: update bitcoin-tx to output witness data
4408558 Update bitcoin-tx to output witness data. (jonnynewbs)
2016-10-13 18:56:43 +02:00
Pieter Wuille
6429cfa8a7
Merge #8393: Support for compact blocks together with segwit
27acfc1 [qa] Update p2p-compactblocks.py for compactblocks v2 (Suhas Daftuar)
422fac6 [qa] Add support for compactblocks v2 to mininode (Suhas Daftuar)
f5b9b8f [qa] Fix bug in mininode witness deserialization (Suhas Daftuar)
6aa28ab Use cmpctblock type 2 for segwit-enabled transfer (Pieter Wuille)
be7555f Fix overly-prescriptive p2p-segwit test for new fetch logic (Matt Corallo)
06128da Make GetFetchFlags always request witness objects from witness peers (Matt Corallo)
2016-10-10 13:16:40 +02:00
jnewbery
621441a7a7 add verbose mode to bitcoin-util-test.py 2016-10-05 09:16:08 -04:00
jonnynewbs
4408558843 Update bitcoin-tx to output witness data. 2016-10-05 09:00:34 -04:00
Pieter Wuille
6aa28abf53 Use cmpctblock type 2 for segwit-enabled transfer
Contains version negotiation logic by Matt Corallo and bugfixes by
Suhas Daftuar.
2016-10-04 19:10:41 +02:00
Wladimir J. van der Laan
ef0801bd13
Merge #8830: [test] Add option to run bitcoin-util-test.py manually
b82f493 Add option to run bitcoin-util-test.py manually (jnewbery)
2016-09-30 17:03:21 +02:00
jnewbery
da94697708 bitcoin-util-test.py should fail if the output file is empty 2016-09-29 10:16:56 -04:00
jnewbery
b82f493938 Add option to run bitcoin-util-test.py manually 2016-09-29 08:54:56 -04:00
MarcoFalke
8ca69a2a88
Merge #8829: Add bitcoin-tx JSON tests
54e5d7c Add bitcoin-tx JSON tests (jnewbery)
2016-09-29 10:50:05 +02:00
jnewbery
54e5d7c1b8 Add bitcoin-tx JSON tests 2016-09-28 13:38:42 -04:00
Johnson Lau
e41bd449ab Add policy: null signature for failed CHECK(MULTI)SIG 2016-09-27 23:40:59 +08:00
Wladimir J. van der Laan
5a4f6d72e6
Merge #8526: Make non-minimal OP_IF/NOTIF argument non-standard for P2WSH
c72c5b1 Make non-minimal OP_IF/NOTIF argument non-standard for P2WSH (Johnson Lau)
2016-09-27 17:10:15 +02:00
Pavel Janík
4731cab8fb Do not shadow variables 2016-09-27 09:25:15 +02:00
Johnson Lau
c72c5b1e3b Make non-minimal OP_IF/NOTIF argument non-standard for P2WSH 2016-09-23 13:07:38 +08:00
MarcoFalke
3333bd2d15 [test] Remove redundant print in addrman_tests 2016-09-22 12:50:39 +02:00
Pieter Wuille
d9ff591d42 Move static global randomizer seeds into CConnman 2016-09-19 15:53:47 +02:00
Cory Fields
f60b9059e4 net: Pass best block known height into CConnman
CConnman then passes the current best height into CNode at creation time.

This way CConnman/CNode have no dependency on main for height, and the signals
only move in one direction.

This also helps to prevent identity leakage a tiny bit. Before this change, an
attacker could theoretically make 2 connections on different interfaces. They
would connect fully on one, and only establish the initial connection on the
other. Once they receive a new block, they would relay it to your first
connection, and immediately commence the version handshake on the second. Since
the new block height is reflected immediately, they could attempt to learn
whether the two connections were correlated.

This is, of course, incredibly unlikely to work due to the small timings
involved and receipt from other senders. But it doesn't hurt to lock-in
nBestHeight at the time of connection, rather than letting the remote choose
the time.
2016-09-08 12:24:06 -04:00
Cory Fields
bd72937dc4 net: move nLocalServices/nRelevantServices to CConnman
These are in-turn passed to CNode at connection time. This allows us to offer
different services to different peers (or test the effects of doing so).
2016-09-08 12:24:06 -04:00
Cory Fields
551e0887db net: move nLastNodeId to CConnman 2016-09-08 12:24:06 -04:00
Cory Fields
a0f3d3cdad net: move ban and addrman functions into CConnman 2016-09-08 12:12:57 -04:00
Cory Fields
aaf018e3b7 net: handle nodesignals in CConnman 2016-09-08 12:06:24 -04:00
Cory Fields
8d58c4d81f net: Pass CConnman around as needed 2016-09-08 12:04:35 -04:00
Cory Fields
cd16f48028 net: Create CConnman to encapsulate p2p connections 2016-09-08 12:04:35 -04:00
MarcoFalke
ddc308068d
Merge #8671: Minimal fix to slow prevector tests as stopgap measure
f71d4a3 Minimal fix to slow prevector tests as stopgap measure (Jeremy Rubin)
2016-09-08 11:12:50 +02:00
Jeremy Rubin
426e7bce0e Fix obvious assignment/equality error in test 2016-09-06 16:22:13 -04:00
Jeremy Rubin
f71d4a3786 Minimal fix to slow prevector tests as stopgap measure 2016-09-06 16:19:25 -04:00
Wladimir J. van der Laan
381d0ddc8a
Merge #8449: [Trivial] Do not shadow local variable, cleanup
a159f25 Remove redundand (and shadowing) declaration (Pavel Janík)
cce3024 Do not shadow local variable, cleanup (Pavel Janík)
2016-09-02 12:25:59 +02:00
Wladimir J. van der Laan
6f939c9080
Merge #8629: C++11: s/boost::scoped_ptr/std::unique_ptr/
cdd79eb C++11: s/boost::scoped_ptr/std::unique_ptr/ (Jorge Timón)
2016-09-02 09:56:33 +02:00
Jorge Timón
cdd79eb70f C++11: s/boost::scoped_ptr/std::unique_ptr/ 2016-09-01 19:05:07 +02:00
Pieter Wuille
19b0f33de0
Merge #8524: Precompute sighashes
35fe039 Rename to PrecomputedTransactionData (Pieter Wuille)
ab48c5e Unit test for sighash caching (Nicolas DORIER)
d2c5d04 Precompute sighashes (Pieter Wuille)
2016-09-01 12:20:43 +02:00
Pieter Wuille
35fe0393f2 Rename to PrecomputedTransactionData 2016-08-26 18:44:10 +02:00
MarcoFalke
95a983d56d
Merge #8578: [test] Remove unused code
fa1cf9e [test] Remove unused code (MarcoFalke)
2016-08-25 11:00:21 +02:00
MarcoFalke
fa1cf9e7b8 [test] Remove unused code 2016-08-24 20:21:31 +02:00
Ethan Heilman
dbb1f640e6 Added feeler connections increasing good addrs in the tried table.
Tests if addresses are online or offline by briefly connecting to them. These short lived connections are referred to as feeler connections. Feeler connections are designed to increase the number of fresh online addresses in tried by selecting and connecting to addresses in new. One feeler connection is attempted on average once every two minutes.

This change was suggested as Countermeasure 4 in
Eclipse Attacks on Bitcoin’s Peer-to-Peer Network, Ethan Heilman,
Alison Kendler, Aviv Zohar, Sharon Goldberg. ePrint Archive Report
2015/263. March 2015.
2016-08-23 16:26:42 -04:00
Nicolas DORIER
ab48c5e721 Unit test for sighash caching 2016-08-16 15:37:56 +02:00
Pieter Wuille
d2c5d044d0 Precompute sighashes
Original version by Nicolas Dorier. Precomputing version by Pieter Wuille.
2016-08-16 15:35:45 +02:00
MarcoFalke
6e5e5abba6
Merge #8270: Tests: Use portable #! in python scripts (/usr/bin/env)
7b01ce2 Favour python over python2 as per PR #7723 (Matthew King)
873e81f Use portable #! in python scripts (/usr/bin/env) (Matthew King)
2016-08-15 15:45:20 +02:00
Wladimir J. van der Laan
1030fa718c
Merge #8128: Net: Turn net structures into dumb storage classes
9e9d644 net: fixup nits (Cory Fields)
8945384 net: Have LookupNumeric return a CService directly (Cory Fields)
21ba407 net: narrow include scope after moving to netaddress (Cory Fields)
21e5b96 net: move CNetAddr/CService/CSubNet out of netbase (Cory Fields)
1017b8a net: Add direct tests for new CSubNet constructors (Cory Fields)
b6c3ff3 net: Split resolving out of CSubNet (Cory Fields)
f96c7c4 net: Split resolving out of CService (Cory Fields)
31d6b1d net: Split resolving out of CNetAddr (Cory Fields)
2016-08-15 13:35:27 +02:00
Pavel Janík
a159f25e19 Remove redundand (and shadowing) declaration 2016-08-05 20:03:01 +02:00
Cory Fields
8945384bca net: Have LookupNumeric return a CService directly
Also fix up a few small issues:
- Lookup with "badip:port" now sets the port to 0
- Don't allow assert to have side-effects
2016-08-04 16:41:39 -04:00
Wladimir J. van der Laan
f97d335942
Merge #8392: Fix several node initialization issues
9d4eb9a Do diskspace check before import thread is started (Pieter Wuille)
aa59f2e Add extra message to avoid a long 'Loading banlist' (Pieter Wuille)
0fd2a33 Use a signal to continue init after genesis activation (Pieter Wuille)
2016-08-04 12:33:21 +02:00
Wladimir J. van der Laan
fc93486d2a
Merge #8428: Update README.md inside of src/test/
b8db185 Update README.md (Chris Stewart)
2016-08-03 11:00:30 +02:00
Wladimir J. van der Laan
63c03dd41c
Merge #8418: Add tests for compact blocks
45c7ddd Add p2p test for BIP 152 (compact blocks) (Suhas Daftuar)
9a22a6c Add support for compactblocks to mininode (Suhas Daftuar)
a8689fd Tests: refactor compact size serialization in mininode (Suhas Daftuar)
9c8593d Implement SipHash in Python (Pieter Wuille)
56c87e9 Allow changing BIP9 parameters on regtest (Suhas Daftuar)
2016-08-02 08:26:57 +02:00
Cory Fields
21ba407a73 net: narrow include scope after moving to netaddress
Net functionality is no longer needed for CAddress/CAddrman/etc. now that
CNetAddr/CService/CSubNet are dumb storage classes.
2016-07-31 14:01:44 -04:00
Cory Fields
1017b8a960 net: Add direct tests for new CSubNet constructors 2016-07-31 14:01:43 -04:00
Cory Fields
b6c3ff3dae net: Split resolving out of CSubNet 2016-07-31 14:01:43 -04:00
Chris Stewart
b8db185952 Update README.md
Updating documentation for adding new unit test files

Removing unneeded sentence from README

Removing uint160_tests.cpp as it DNE

Formatting command line instructions to use ``

fixing 80 char formatting issue in README

fixing more nits
2016-07-31 12:43:45 -05:00
Cory Fields
f96c7c4d91 net: Split resolving out of CService 2016-07-31 13:24:07 -04:00
Cory Fields
31d6b1d5f0 net: Split resolving out of CNetAddr 2016-07-31 13:24:07 -04:00
Pieter Wuille
0fd2a33648 Use a signal to continue init after genesis activation 2016-07-30 02:17:47 +02:00