Commit graph

1464 commits

Author SHA1 Message Date
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 5b446dd5b1 net: Pass CConnection to wallet rather than using the global 2016-09-08 12:04:35 -04:00
Cory Fields 8d58c4d81f net: Pass CConnman around as needed 2016-09-08 12:04:35 -04:00
Pieter Wuille 5b2ea29cf4
Merge #8594: Do not add random inbound peers to addrman.
eb3596f Do not add random inbound peers to addrman. (Gregory Maxwell)
2016-09-07 13:19:53 +02:00
Pieter Wuille e2a1a1ee89
Merge #8606: Fix some locks
144ed76 Fix some locks (Pieter Wuille)
2016-09-07 13:10:10 +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 887919c7b7 Check for compatibility with download in FindNextBlocksToDownload 2016-08-26 21:44:44 +02:00
Pieter Wuille 144ed76ea0 Fix some locks
This makes sure that cs_filter is never held while taking cs_main
or CNode::cs_vSend.
2016-08-26 21:11:57 +02:00
Pieter Wuille 35fe0393f2 Rename to PrecomputedTransactionData 2016-08-26 18:44:10 +02:00
Wladimir J. van der Laan 6c9f1b8c24
Merge #8561: Show "end" instead of many zeros when getheaders request received with a hashStop of Null
259ee09 Show "end" instead of many zeros when getheaders request received with a hashStop of Null. (R E Broadley)
2016-08-26 10:04:26 +02:00
Gregory Maxwell eb3596f7c2 Do not add random inbound peers to addrman.
We should learn about new peers via address messages.

An inbound peer connecting to us tells us nothing about
 its ability to accept incoming connections from us, so
 we shouldn't assume that we can connect to it based on
 this.

The vast majority of nodes on the network do not accept
 incoming connections, adding them will only slow down
 the process of making a successful connection in the
 future.

Nodes which have configured themselves to not announce would prefer we
 not violate their privacy by announcing them in GETADDR responses.
2016-08-25 23:48:59 +00:00
Pieter Wuille 53f8f226bd
Merge #8462: Move AdvertiseLocal debug output to net category
f13c1ba Move AdvertiseLocal debug output to net category (Michael Rotarius)
2016-08-25 15:15:16 +02:00
Jonas Schnelli 0606f95b1e
Merge #7579: [Qt] show network/chain errors in the GUI
2f32c82 [Qt] show network/chain errors in the GUI (Jonas Schnelli)
2016-08-25 14:55:26 +02:00
Wladimir J. van der Laan 026c6edac9
Merge #8282: net: Feeler connections to increase online addrs in the tried table.
dbb1f64 Added feeler connections increasing good addrs in the tried table. (Ethan Heilman)
2016-08-25 10:48:24 +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
R E Broadley 259ee09f88 Show "end" instead of many zeros when getheaders request received with a hashStop of Null. 2016-08-23 13:14:07 +07:00
Wladimir J. van der Laan a55a018d5f
Merge #8548: [wallet] Use __func__ to get function name for output printing
fa785d1 Use __func__ to get function name for output printing (MarcoFalke)
2016-08-22 09:58:28 +02:00
MarcoFalke fa785d1211 Use __func__ to get function name for output printing 2016-08-19 18:59:00 +02:00
Wladimir J. van der Laan e753eaeb34
Merge #8505: Trivial: Fix typos in various files
1aacfc2 various typos (leijurv)
2016-08-17 12:51:16 +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
leijurv 1aacfc2da5
various typos 2016-08-14 07:57:11 -06:00
Jonas Schnelli b3b3c2a562
Reduce cs_main locks during ConnectTip/SyncWithWallets 2016-08-12 14:53:10 +02:00
Michael Rotarius f13c1bae52 Move AdvertiseLocal debug output to net category 2016-08-05 18:34:32 +02: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 37d83bb0a9
Merge #8391: Consensus: Remove ISM
122786d Consensus: Remove ISM (NicolasDorier)
2016-08-04 12:20:35 +02:00
Pieter Wuille 8ea7d31e38
Merge #8413: Trivial: pass Consensus::Params& instead of CChainParams& in ContextualCheckBlock
c8664ee Trivial: pass Consensus::Params& instead of CChainParams& in ContextualCheckBlock (Jorge Timón)
2016-08-01 01:53:29 +02:00
Pieter Wuille 0fd2a33648 Use a signal to continue init after genesis activation 2016-07-30 02:17:47 +02:00
Wladimir J. van der Laan 5c9e49d12c net: Ignore notfound P2P messages 2016-07-29 17:44:01 +02:00
Wladimir J. van der Laan 7a2d402727
Merge #8274: util: Update tinyformat
a5072a7 util: Remove zero-argument versions of LogPrint and error (Wladimir J. van der Laan)
695041e util: Update tinyformat (Wladimir J. van der Laan)
2016-07-29 12:32:47 +02:00
Wladimir J. van der Laan 842bf8d2c5
Merge #8408: Prevent fingerprinting, disk-DoS with compact blocks
1d06e49 Ignore CMPCTBLOCK messages for pruned blocks (Suhas Daftuar)
1de2a46 Ignore GETBLOCKTXN requests for unknown blocks (Suhas Daftuar)
2016-07-29 08:21:03 +02:00
Wladimir J. van der Laan 64d660a43f
Merge #8348: Trivial: Segwit: Don't call IsWitnessEnabled from ContextualCheckBlock
38c4c8b Trivial: Segwit: Don't call IsWitnessEnabled from ContextualCheckBlock (Jorge Timón)
2016-07-28 09:51:04 +02:00
Jorge Timón c8664eeac7 Trivial: pass Consensus::Params& instead of CChainParams& in ContextualCheckBlock 2016-07-27 23:58:04 +02:00
Suhas Daftuar 1d06e49834 Ignore CMPCTBLOCK messages for pruned blocks
Also ignores CMPCTBLOCK announcements that have too little work.  This is to
prevent disk-exhaustion DoS.
2016-07-26 16:52:35 -04:00
Suhas Daftuar 1de2a46632 Ignore GETBLOCKTXN requests for unknown blocks
Don't disconnect peers, or else we leak information that could be
used for fingerprinting.
2016-07-26 16:50:48 -04:00
Wladimir J. van der Laan 4b1a4d8810
Merge #8381: Make witness v0 outputs non-standard
c59c434 qa: Add test for standardness of segwit v0 outputs (Suhas Daftuar)
1ffaff2 Make witness v0 outputs non-standard before segwit activation (Johnson Lau)
2016-07-26 14:24:11 +02:00
Wladimir J. van der Laan 618c9dd8c6
Merge #8365: Treat high-sigop transactions as larger rather than rejecting them
ab942c1 Treat high-sigop transactions as larger rather than rejecting them (Pieter Wuille)
2016-07-26 11:27:30 +02:00
NicolasDorier 122786d0e0 Consensus: Remove ISM 2016-07-23 01:02:53 +09:00
Johnson Lau 1ffaff2f74 Make witness v0 outputs non-standard before segwit activation 2016-07-22 06:35:07 +00:00
Wladimir J. van der Laan 381917f610
Merge #8347: Trivial: Make CBlockIndex param const in ContextualCheckBlockHeader and ContextualCheckBlock
6f3d616 Trivial: Make CBlockIndex param const in ContextualCheckBlockHeader and ContextualCheckBlock (Jorge Timón)
2016-07-21 14:31:40 +02:00
NicolasDorier 7821889bce Consensus: Remove calls to error() from ContextualCheckBlock 2016-07-21 20:57:08 +09:00
Wladimir J. van der Laan 6f4092da80
Merge #8342: Consensus: Trivial transform BOOST_FOREACH into for loop
a3e1984 Consensus: Trivial transform BOOST_FOREACH into for loop (NicolasDorier)
2016-07-21 11:56:33 +02:00
Jonas Schnelli 2f32c82b3d
[Qt] show network/chain errors in the GUI 2016-07-20 14:42:19 +02:00
Pieter Wuille ab942c15bd Treat high-sigop transactions as larger rather than rejecting them 2016-07-19 12:31:49 +02:00
Suhas Daftuar 2c06bae39e Rename "block cost" to "block weight" 2016-07-18 13:28:26 -04:00
Wladimir J. van der Laan 37303934fe
Merge #8305: Improve handling of unconnecting headers
e91cf4b Add test for handling of unconnecting headers (Suhas Daftuar)
96fa953 Improve handling of unconnecting headers (Suhas Daftuar)
2016-07-18 07:46:12 +02:00
Jorge Timón 38c4c8b701 Trivial: Segwit: Don't call IsWitnessEnabled from ContextualCheckBlock 2016-07-17 02:41:58 +02:00
Jorge Timón 6f3d616dc8 Trivial: Make CBlockIndex param const in ContextualCheckBlockHeader and ContextualCheckBlock 2016-07-17 01:43:15 +02:00