aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | Merge #8499: Add several policy limits and disable uncompressed keys for ↵Wladimir J. van der Laan2016-10-171-1/+5
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | segwit scripts 67d6ee1 remove redundant tests in p2p-segwit.py (Johnson Lau) 9260085 test segwit uncompressed key fixes (Johnson Lau) 248f3a7 Fix ismine and addwitnessaddress: no uncompressed keys in segwit (Pieter Wuille) b811124 [qa] Add tests for uncompressed pubkeys in segwit (Suhas Daftuar) 9f0397a Make test framework produce lowS signatures (Johnson Lau) 4c0c25a Require compressed keys in segwit as policy and disable signing with uncompressed keys for segwit scripts (Johnson Lau) 3ade2f6 Add standard limits for P2WSH with tests (Johnson Lau)
| * | | | | Add standard limits for P2WSH with testsJohnson Lau2016-10-161-1/+5
| |/ / / /
* | | | | Merge #8880: protocol.h: Move MESSAGE_START_SIZE into CMessageHeaderWladimir J. van der Laan2016-10-151-3/+3
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | 1df3111 protocol.h: Make enums in GetDataMsg concrete values (Wladimir J. van der Laan) 2c09a52 protocol.h: Move MESSAGE_START_SIZE into CMessageHeader (Wladimir J. van der Laan) f9bd92d version.h: s/shord/short/ in comment (Wladimir J. van der Laan)
| * | | | protocol.h: Move MESSAGE_START_SIZE into CMessageHeaderWladimir J. van der Laan2016-10-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Also move the enum to the top, and remove a deceptive TODO comment.
* | | | | Use cmpctblock type 2 for segwit-enabled transferPieter Wuille2016-10-041-22/+56
| | | | | | | | | | | | | | | | | | | | | | | | | Contains version negotiation logic by Matt Corallo and bugfixes by Suhas Daftuar.
* | | | | Make GetFetchFlags always request witness objects from witness peersMatt Corallo2016-10-041-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | This fixes a bug where we might (in exceedingly rare circumstances) accidentally ban a node for sending us the first (potentially few) segwit blocks in non-segwit mode.
* | / / net: fix a few cases where messages were sent rather than dropped upon ↵Cory Fields2016-10-011-2/+2
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | disconnection 75ead758 turned these into crashes in the event of a handshake failure, most notably when a peer does not offer the expected services. There are likely other cases that these assertions will find as well.
* | | net: Consistent checksum handlingWladimir J. van der Laan2016-09-281-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In principle, the checksums of P2P packets are simply 4-byte blobs which are the first four bytes of SHA256(SHA256(payload)). Currently they are handled as little-endian 32-bit integers half of the time, as blobs the other half, sometimes copying the one to the other, resulting in somewhat confused code. This PR changes the handling to be consistent both at packet creation and receiving, making it (I think) easier to understand.
* | | Do not shadow variablesPavel Janík2016-09-271-14/+14
| | |
* | | Merge #8636: Implement NULLDUMMY softfork (BIP147)Wladimir J. van der Laan2016-09-221-0/+1
|\ \ \ | | | | | | | | | | | | 482f852 Implement NULLDUMMY softfork (Johnson Lau)
| * | | Implement NULLDUMMY softforkJohnson Lau2016-08-311-0/+1
| | | |
* | | | Merge #8688: Move static global randomizer seeds into CConnmanWladimir J. van der Laan2016-09-191-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | d9ff591 Move static global randomizer seeds into CConnman (Pieter Wuille)
| * | | | Move static global randomizer seeds into CConnmanPieter Wuille2016-09-191-3/+3
| | | | |
* | | | | UndoReadFromDisk works on undo files (rev), not on block files.Pavel Janík2016-09-151-1/+1
|/ / / /
* | | / fix op order to append first alertrodasmith2016-09-101-2/+2
| |_|/ |/| |
* | | Merge #8681: Performance Regression Fix: Pre-Allocate txChanged vectorPieter Wuille2016-09-091-4/+7
|\ \ \ | | | | | | | | | | | | ec81881 Performance Regression Fix: Pre-Allocate txChanged vector (Jeremy Rubin)
| * | | Performance Regression Fix: Pre-Allocate txChanged vectorJeremy Rubin2016-09-071-4/+7
| | | |
* | | | Merge #8085: p2p: Begin encapsulationWladimir J. van der Laan2016-09-091-76/+93
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0103c5b net: move MAX_FEELER_CONNECTIONS into connman (Cory Fields) e700cd0 Convert ForEachNode* functions to take a templated function argument rather than a std::function to eliminate std::function overhead (Jeremy Rubin) d1a2295 Made the ForEachNode* functions in src/net.cpp more pragmatic and self documenting (Jeremy Rubin) 98591c5 net: move vNodesDisconnected into CConnman (Cory Fields) fa2f8bc net: add nSendBufferMaxSize/nReceiveFloodSize to CConnection::Options (Cory Fields) a19553b net: Introduce CConnection::Options to avoid passing so many params (Cory Fields) bafa5fc net: Drop StartNode/StopNode and use CConnman directly (Cory Fields) e81a602 net: pass CClientUIInterface into CConnman (Cory Fields) f60b905 net: Pass best block known height into CConnman (Cory Fields) fdf69ff net: move max/max-outbound to CConnman (Cory Fields) 8a59369 net: move semOutbound to CConnman (Cory Fields) bd72937 net: move nLocalServices/nRelevantServices to CConnman (Cory Fields) be9c796 net: move SendBufferSize/ReceiveFloodSize to CConnman (Cory Fields) 63cafa6 net: move send/recv statistics to CConnman (Cory Fields) adf5d4c net: SocketSendData returns written size (Cory Fields) ee44fa9 net: move messageHandlerCondition to CConnman (Cory Fields) 960cf2e net: move nLocalHostNonce to CConnman (Cory Fields) 551e088 net: move nLastNodeId to CConnman (Cory Fields) 6c19d92 net: move whitelist functions into CConnman (Cory Fields) 53347f0 net: create generic functor accessors and move vNodes to CConnman (Cory Fields) c0569c7 net: Add most functions needed for vNodes to CConnman (Cory Fields) 8ae2dac net: move added node functions to CConnman (Cory Fields) 502dd3a net: Add oneshot functions to CConnman (Cory Fields) a0f3d3c net: move ban and addrman functions into CConnman (Cory Fields) aaf018e net: handle nodesignals in CConnman (Cory Fields) b1a5f43 net: move OpenNetworkConnection into CConnman (Cory Fields) 02137f1 net: Move socket binding into CConnman (Cory Fields) 5b446dd net: Pass CConnection to wallet rather than using the global (Cory Fields) 8d58c4d net: Pass CConnman around as needed (Cory Fields) d7349ca net: Add rpc error for missing/disabled p2p functionality (Cory Fields) cd16f48 net: Create CConnman to encapsulate p2p connections (Cory Fields) d93b14d net: move CBanDB and CAddrDB out of net.h/cpp (Cory Fields) 531214f gui: add NodeID to the peer table (Cory Fields)
| * | | | Made the ForEachNode* functions in src/net.cpp more pragmatic and self ↵Jeremy Rubin2016-09-081-3/+0
| | | | | | | | | | | | | | | | | | | | documenting
| * | | | net: Pass best block known height into CConnmanCory Fields2016-09-081-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | net: move nLocalServices/nRelevantServices to CConnmanCory Fields2016-09-081-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | 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).
| * | | | net: move SendBufferSize/ReceiveFloodSize to CConnmanCory Fields2016-09-081-3/+7
| | | | |
| * | | | net: move send/recv statistics to CConnmanCory Fields2016-09-081-5/+5
| | | | |
| * | | | net: move nLocalHostNonce to CConnmanCory Fields2016-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This behavior seems to have been quite racy and broken. Move nLocalHostNonce into CNode, and check received nonces against all non-fully-connected nodes. If there's a match, assume we've connected to ourself.
| * | | | net: create generic functor accessors and move vNodes to CConnmanCory Fields2016-09-081-32/+53
| | | | |
| * | | | net: move ban and addrman functions into CConnmanCory Fields2016-09-081-7/+7
| | | | |
| * | | | net: handle nodesignals in CConnmanCory Fields2016-09-081-2/+3
| | | | |
| * | | | net: Pass CConnection to wallet rather than using the globalCory Fields2016-09-081-1/+1
| | | | |
| * | | | net: Pass CConnman around as neededCory Fields2016-09-081-11/+11
| |/ / /
* | | | Merge #8677: Do not shadow upper local variable 'send', prevent -Wshadow ↵Wladimir J. van der Laan2016-09-091-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | compiler warning. 125b946 Do not shadow upper local variable 'send', prevent -Wshadow compiler warning. (Pavel Janík)
| * | | | Do not shadow upper local variable 'send', prevent -Wshadow compiler warning.Pavel Janík2016-09-071-3/+3
| |/ / /
* | | | Merge #8525: Do not store witness txn in rejection cacheWladimir J. van der Laan2016-09-091-8/+12
|\ \ \ \ | |/ / / |/| | | | | | | | | | | ca10a03 Add basic test for IsStandard witness transaction blinding (instagibbs) 34521e4 Do not store witness txn in rejection cache (Pieter Wuille)
| * | | Do not store witness txn in rejection cachePieter Wuille2016-09-051-8/+12
| | | |
* | | | Merge #8594: Do not add random inbound peers to addrman.Pieter Wuille2016-09-071-6/+0
|\ \ \ \ | | | | | | | | | | | | | | | eb3596f Do not add random inbound peers to addrman. (Gregory Maxwell)
| * | | | Do not add random inbound peers to addrman.Gregory Maxwell2016-08-251-6/+0
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge #8606: Fix some locksPieter Wuille2016-09-071-15/+21
|\ \ \ \ | |_|/ / |/| | | | | | | 144ed76 Fix some locks (Pieter Wuille)
| * | | Fix some locksPieter Wuille2016-08-261-15/+21
| | |/ | |/| | | | | | | | | | This makes sure that cs_filter is never held while taking cs_main or CNode::cs_vSend.
* | | Merge #8629: C++11: s/boost::scoped_ptr/std::unique_ptr/Wladimir J. van der Laan2016-09-021-1/+1
|\ \ \ | | | | | | | | | | | | cdd79eb C++11: s/boost::scoped_ptr/std::unique_ptr/ (Jorge Timón)
| * | | C++11: s/boost::scoped_ptr/std::unique_ptr/Jorge Timón2016-09-011-1/+1
| |/ /
* | | Merge #8524: Precompute sighashesPieter Wuille2016-09-011-9/+13
|\ \ \ | | | | | | | | | | | | | | | | | | | | 35fe039 Rename to PrecomputedTransactionData (Pieter Wuille) ab48c5e Unit test for sighash caching (Nicolas DORIER) d2c5d04 Precompute sighashes (Pieter Wuille)
| * | | Rename to PrecomputedTransactionDataPieter Wuille2016-08-261-13/+13
| | | |
| * | | Precompute sighashesPieter Wuille2016-08-161-9/+13
| | | | | | | | | | | | | | | | Original version by Nicolas Dorier. Precomputing version by Pieter Wuille.
* | | | Check for compatibility with download in FindNextBlocksToDownloadPieter Wuille2016-08-261-9/+11
| |/ / |/| |
* | | Merge #8561: Show "end" instead of many zeros when getheaders request ↵Wladimir J. van der Laan2016-08-261-1/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | 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)
| * | Show "end" instead of many zeros when getheaders request received with a ↵R E Broadley2016-08-231-1/+1
| | | | | | | | | | | | hashStop of Null.
* | | Merge #8462: Move AdvertiseLocal debug output to net categoryPieter Wuille2016-08-251-2/+2
|\ \ \ | | | | | | | | | | | | f13c1ba Move AdvertiseLocal debug output to net category (Michael Rotarius)
| * | | Move AdvertiseLocal debug output to net categoryMichael Rotarius2016-08-051-2/+2
| | | |
* | | | Merge #7579: [Qt] show network/chain errors in the GUIJonas Schnelli2016-08-251-3/+5
|\ \ \ \ | | | | | | | | | | | | | | | 2f32c82 [Qt] show network/chain errors in the GUI (Jonas Schnelli)
| * | | | [Qt] show network/chain errors in the GUIJonas Schnelli2016-07-201-3/+5
| | | | |
* | | | | Merge #8282: net: Feeler connections to increase online addrs in the tried ↵Wladimir J. van der Laan2016-08-251-0/+6
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | table. dbb1f64 Added feeler connections increasing good addrs in the tried table. (Ethan Heilman)