aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge #7958: Remove useless argument to AlertNotify.Wladimir J. van der Laan2016-05-091-9/+6
|\ | | | | | | b02119e Remove useless argument to AlertNotify. (Pavel Janík)
| * Remove useless argument to AlertNotify.Pavel Janík2016-04-271-9/+6
| | | | | | | | It is always 'true', so useless.
* | Merge #7976: Remove obsolete reference to CValidationState from UpdateCoins.Wladimir J. van der Laan2016-05-094-9/+8
|\ \ | | | | | | | | | c8b9248 Remove obsolete reference to CValidationState from UpdateCoins. (21E14)
| * | Remove obsolete reference to CValidationState from UpdateCoins.21E142016-04-304-9/+8
| | |
* | | Merge #7934: Improve rolling bloom filter performance and benchmarkWladimir J. van der Laan2016-05-095-27/+77
|\ \ \ | | | | | | | | | | | | | | | | 1953c40 More efficient bitsliced rolling Bloom filter (Pieter Wuille) aa62b68 Benchmark rolling bloom filter (Pieter Wuille)
| * | | More efficient bitsliced rolling Bloom filterPieter Wuille2016-04-283-26/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the implementation from one that stores 16 2-bit integers in one uint32_t's, to one that stores the first bit of 64 2-bit integers in one uint64_t and the second bit in another. This allows for 450x faster refreshing and 2.2x faster average speed.
| * | | Benchmark rolling bloom filterPieter Wuille2016-04-282-1/+45
| | | |
* | | | Merge #8011: don't run ThreadMessageHandler at lowered priorityWladimir J. van der Laan2016-05-064-26/+0
|\ \ \ \ | | | | | | | | | | | | | | | e53e7c5 don't run ThreadMessageHandler at lowered priority (Kaz Wesley)
| * | | | don't run ThreadMessageHandler at lowered priorityKaz Wesley2016-05-054-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | There's no clear reason ThreadMessageHandler should be low priority. Fixes #8010 (priority inversion).
* | | | | Merge #7815: Break circular dependency main ↔ txdbWladimir J. van der Laan2016-05-065-89/+87
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 99e7075 Break circular dependency main ↔ txdb (Wladimir J. van der Laan)
| * | | | | Break circular dependency main ↔ txdbWladimir J. van der Laan2016-04-155-89/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Break the circular dependency between main and txdb by: - Moving `CBlockFileInfo` from `main.h` to `chain.h`. I think this makes sense, as the other block-file stuff is there too. - Moving `CDiskTxPos` from `main.h` to `txdb.h`. This type seems specific to txdb. - Pass a functor `insertBlockIndex` to `LoadBlockIndexGuts`. This leaves it up to the caller how to insert block indices.
* | | | | | Merge #7907: Optimize and Cleanup CScript::FindAndDeleteWladimir J. van der Laan2016-05-052-3/+129
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | d1d7775 Improve worst-case behavior of CScript::FindAndDelete (Patrick Strateman) e2a30bc Unit test for CScript::FindAndDelete (Gavin Andresen) c0f660c Replace c-style cast with c++ style static_cast. (Patrick Strateman) ec9ad5f Replace memcmp with std::equal in CScript::FindAndDelete (Patrick Strateman)
| * | | | | Improve worst-case behavior of CScript::FindAndDeletePatrick Strateman2016-04-211-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | Thanks to Sergio Lerner for identifying this issue and suggesting this kind of solution.
| * | | | | Unit test for CScript::FindAndDeleteGavin Andresen2016-04-191-0/+117
| | | | | |
| * | | | | Replace c-style cast with c++ style static_cast.Patrick Strateman2016-04-191-1/+1
| | | | | |
| * | | | | Replace memcmp with std::equal in CScript::FindAndDeletePatrick Strateman2016-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Function is stl; std::equal just makes more sense.
* | | | | | Merge #7840: Several performance and privacy improvements to inv/mempool ↵Wladimir J. van der Laan2016-05-056-86/+189
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handling b559914 Move bloom and feerate filtering to just prior to tx sending. (Gregory Maxwell) 4578215 Return mempool queries in dependency order (Pieter Wuille) ed70683 Handle mempool requests in send loop, subject to trickle (Pieter Wuille) dc13dcd Split up and optimize transaction and block inv queues (Pieter Wuille) f2d3ba7 Eliminate TX trickle bypass, sort TX invs for privacy and priority. (Gregory Maxwell)
| * | | | | | Move bloom and feerate filtering to just prior to tx sending.Gregory Maxwell2016-04-213-21/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will avoid sending more pointless INVs around updates, and prevents using filter updates to timetag transactions. Also adds locking for fRelayTxes.
| * | | | | | Return mempool queries in dependency orderPieter Wuille2016-04-211-0/+12
| | | | | | |
| * | | | | | Handle mempool requests in send loop, subject to tricklePieter Wuille2016-04-213-28/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By eliminating queued entries from the mempool response and responding only at trickle time, this makes the mempool no longer leak transaction arrival order information (as the mempool itself is also sorted)-- at least no more than relay itself leaks it.
| * | | | | | Split up and optimize transaction and block inv queuesPieter Wuille2016-04-212-37/+59
| | | | | | |
| * | | | | | Eliminate TX trickle bypass, sort TX invs for privacy and priority.Gregory Maxwell2016-04-204-27/+58
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously Bitcoin would send 1/4 of transactions out to all peers instantly. This causes high overhead because it makes >80% of INVs size 1. Doing so harms privacy, because it limits the amount of source obscurity a transaction can receive. These randomized broadcasts also disobeyed transaction dependencies and required use of the orphan pool. Because the orphan pool is so small this leads to poor propagation for dependent transactions. When the bypass wasn't in effect, transactions were sent in the order they were received. This avoided creating orphans but undermines privacy fairly significantly. This commit: Eliminates the bypass. The bypass is replaced by halving the average delay for outbound peers. Sorts candidate transactions for INV by their topological depth then by their feerate (then hash); removing the information leakage and providing priority service to higher fee transactions. Limits the amount of transactions sent in a single INV to 7tx/sec (and twice that for outbound); this limits the harm of low fee transaction floods, gives faster relay service to higher fee transactions. The 7 sounds lower than it really is because received advertisements need not be sent, and because the aggregate rate is multipled by the number of peers.
* | | | | | Merge #7966: http: Do a pending c++11 simplification handling work itemsWladimir J. van der Laan2016-05-051-17/+12
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f0188f9 http: use std::move to move HTTPRequest into HTTPWorkItem (Wladimir J. van der Laan) 37b2137 http: Change boost::scoped_ptr to std::unique_ptr in HTTPRequest (Wladimir J. van der Laan) f97b410 http: Add log message when work queue is full (Wladimir J. van der Laan) 091d6e0 http: Do a pending c++11 simplification (Wladimir J. van der Laan)
| * | | | | | http: use std::move to move HTTPRequest into HTTPWorkItemWladimir J. van der Laan2016-05-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Cory Fields for the idea.
| * | | | | | http: Change boost::scoped_ptr to std::unique_ptr in HTTPRequestWladimir J. van der Laan2016-05-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | No need for boost here.
| * | | | | | http: Add log message when work queue is fullWladimir J. van der Laan2016-05-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | More useful error reporting.
| * | | | | | http: Do a pending c++11 simplificationWladimir J. van der Laan2016-05-051-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use std::unique_ptr for handling work items. This makes the code more RAII and, as mentioned in the comment, is what I planned when I wrote the code in the first place.
* | | | | | | Merge #7953: Create signmessagewithprivkey rpcWladimir J. van der Laan2016-05-051-0/+43
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7db0ecb Test for signing messages (Andrew Chow) f90efbf Create signmessagewithprivkey rpc (Andrew)
| * | | | | | | Create signmessagewithprivkey rpcAndrew2016-04-271-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New rpc 'signmessagewithprivkey' which takes a private key to sign a message without using the wallet.
* | | | | | | | Merge #7977: [trivial] Add missing const qualifiers.Wladimir J. van der Laan2016-05-053-4/+4
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | f7c4f79 [trivial] Add missing const qualifiers. (Daniel Kraft)
| * | | | | | | | [trivial] Add missing const qualifiers.Daniel Kraft2016-04-303-4/+4
| | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some const qualifiers to references that are not modified and should be marked as const.
* | | | | | | | Merge #8000: tinyformat: force USE_VARIADIC_TEMPLATESWladimir J. van der Laan2016-05-052-26/+19
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | 08d7b56 util: switch LogPrint and error to variadic templates (Wladimir J. van der Laan) 9eaa0af tinyformat: force USE_VARIADIC_TEMPLATES (Wladimir J. van der Laan)
| * | | | | | | util: switch LogPrint and error to variadic templatesWladimir J. van der Laan2016-05-041-25/+18
| | | | | | | |
| * | | | | | | tinyformat: force USE_VARIADIC_TEMPLATESWladimir J. van der Laan2016-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we started using c++11, force use of variadic templates. The autodetection may be wonky on some compilers, see discussion [here](https://github.com/bitcoin/bitcoin/pull/7982#issuecomment-216222357) and is unnecessary for us anyhow.
* | | | | | | | Merge #7974: More comments on the design of AttemptToEvictConnection.Wladimir J. van der Laan2016-05-041-2/+11
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | | | | | | | | | d90351f More comments on the design of AttemptToEvictConnection. (Gregory Maxwell)
| * | | | | | | More comments on the design of AttemptToEvictConnection.Gregory Maxwell2016-04-291-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some developers clearly don't get this and have been posting "improvements" that create clear vulnerabilities. It should have been better explained in the code, since the design is somewhat subtle and getting it right is important.
* | | | | | | | Merge #7982: build: No need to check for leveldb atomicsWladimir J. van der Laan2016-05-041-5/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | de98290 build: No need to check for leveldb atomics (Cory Fields)
| * | | | | | | | build: No need to check for leveldb atomicsCory Fields2016-04-301-5/+2
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | They're guaranteed with c++11
* | | | | | | | bitcoin-cli.cpp: Use symbolic constant for exit codePuru2016-05-021-1/+1
| | | | | | | |
* | | | | | | | Merge #7959: fix race that could fail to persist a banWladimir J. van der Laan2016-05-021-2/+3
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | f4ac02e fix race that could fail to persist a ban (Kaz Wesley)
| * | | | | | | | fix race that could fail to persist a banKaz Wesley2016-04-271-2/+3
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DumpBanList currently does this: - with lock: take a copy of the banmap - perform I/O (write out the banmap) - with lock: mark the banmap non-dirty If a new ban is added during the I/O operation, it may never be persisted to disk. Reorder operations so that the data to be persisted cannot be older than the time at which the banmap was marked non-dirty.
* | | | | | | | Merge #7964: Minor changes for c++11 consistencyWladimir J. van der Laan2016-05-024-5/+5
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | 07e4edb auto_ptr → unique_ptr (Wladimir J. van der Laan) 073225c chain: define enum used as bit field as uint32_t (Wladimir J. van der Laan)
| * | | | | | | auto_ptr → unique_ptrWladimir J. van der Laan2016-04-283-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the few occurrences of the deprecated `auto_ptr` to c++11 `unique_ptr`. Silences the deprecation warnings. Also add a missing `std::` for consistency.
| * | | | | | | chain: define enum used as bit field as uint32_tWladimir J. van der Laan2016-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bitwise logic combined with `<` with undefined signedness will potentially results in undefined behavior. Fix this by defining the type as a c++11 typed enum. Fixes #6017.
* | | | | | | | Merge #7807: Fixed miner test values, gave constants for less error-prone ↵MarcoFalke2016-04-291-24/+29
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | values. f8536a6 Corrected values (instagibbs) 617deeb Gave miner test values constants for less error-prone values. (instagibbs)
| * | | | | | | Corrected valuesinstagibbs2016-04-071-2/+2
| | | | | | | |
| * | | | | | | Gave miner test values constants for less error-prone values.instagibbs2016-04-071-24/+29
| | | | | | | |
* | | | | | | | Merge #7962: CalculateNextWorkRequired CleanupWladimir J. van der Laan2016-04-281-2/+0
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | c7aac2d Deprecating the remaining LogPrintf dependencies that were made obsolete in PR #7459. (21E14)
| * | | | | | | Deprecating the remaining LogPrintf dependencies that were made obsolete in ↵21E142016-04-271-2/+0
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | PR #7459.
* | | | | | | Merge #7926: [RPC] push back getaddednodeinfo dead valueWladimir J. van der Laan2016-04-281-0/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 9c0bcb6 push back getaddednodeinfo dead value (instagibbs)