Commit Graph

7215 Commits

Author SHA1 Message Date
EthanHeilman f4119c6c98 Remove non-determinism which is breaking net_tests #8069 2016-05-18 12:26:41 -04:00
Wladimir J. van der Laan 239d419864
Merge #7917: Optimize reindex
b4d24e1 Report reindexing progress in GUI (Pieter Wuille)
d3d7547 Add -reindex-chainstate that does not rebuild block index (Pieter Wuille)
fb8fad1 Optimize ActivateBestChain for long chains (Pieter Wuille)
316623f Switch reindexing to AcceptBlock in-loop and ActivateBestChain afterwards (Pieter Wuille)
d253ec4 Make ProcessNewBlock dbp const and update comment (Pieter Wuille)
2016-05-18 12:31:32 +02:00
Wladimir J. van der Laan 8e8bebc040
Merge #8054: net: Avoid duplicate getheaders requests.
f93c2a1 net: Avoid duplicate getheaders requests. (Daniel Kraft)
2016-05-18 12:28:19 +02:00
Wladimir J. van der Laan 83121cca75
Merge #7906: net: prerequisites for p2p encapsulation changes
5d5e7a0 net: No need to export ConnectNode (Cory Fields)
e9ed620 net: No need to export DumpBanlist (Cory Fields)
8b8f877 net: make Ban/Unban/ClearBan functionality consistent (Cory Fields)
cca221f net: Drop CNodeRef for AttemptToEvictConnection (Cory Fields)
563f375 net: use the exposed GetNodeSignals() rather than g_signals directly (Cory Fields)
9faa490 net: remove unused set (Cory Fields)
52cbce2 net: don't import std namespace (Cory Fields)
2016-05-18 12:13:05 +02:00
Wladimir J. van der Laan ed749bdb64
Merge #7932: CAddrMan::Deserialize handle corrupt serializations better.
fb26bf0 CAddrMan::Deserialize handle corrupt serializations better. (Patrick Strateman)
2016-05-18 11:53:48 +02:00
Wladimir J. van der Laan 5e374f7306
Merge #8020: Use SipHash-2-4 for various non-cryptographic hashes
a68ec21 Use SipHash-2-4 for address relay selection (Pieter Wuille)
8cc9cfe Switch CTxMempool::mapTx to use a hash index for txids (Pieter Wuille)
382c871 Use SipHash-2-4 for CCoinsCache index (Pieter Wuille)
0b1295b Add SipHash-2-4 primitives to hash (Pieter Wuille)
2016-05-18 11:01:42 +02:00
Pieter Wuille a68ec21f7e Use SipHash-2-4 for address relay selection 2016-05-17 20:04:46 +02:00
Pieter Wuille 8cc9cfe160 Switch CTxMempool::mapTx to use a hash index for txids 2016-05-17 20:04:46 +02:00
Pieter Wuille 382c871d28 Use SipHash-2-4 for CCoinsCache index
This is ~1.7x slower than the Lookup3-of-Xor-with-salt construct we were
using before, but it is a primitive designed for exactly this.
2016-05-17 20:04:46 +02:00
Pieter Wuille 0b1295b066 Add SipHash-2-4 primitives to hash 2016-05-17 20:04:42 +02:00
Pieter Wuille 5c3f8ddcaa
Merge #7696: Fix de-serialization bug where AddrMan is left corrupted
1475ecf Fix de-serialization bug where AddrMan is corrupted after exception * CAddrDB modified so that when de-serialization code throws an exception Addrman is reset to a clean state * CAddrDB modified to make unit tests possible * Regression test created to ensure bug is fixed * StartNode modifed to clear adrman if CAddrDB::Read returns an error code. (EthanHeilman)
2016-05-17 10:53:00 +02:00
MarcoFalke e2bf830bb6
Merge #8038: [qa, doc] Various minor fixes
fa83a5d [qa] wallet: Temporarily disable salvagewallet test (MarcoFalke)
fadd048 [doc] Link to clang-format in the developer notes (MarcoFalke)
fa72f7d [doc] Remove outdated line from listunspent RPC help, fix typo (MarcoFalke)
ac40ed7 Increase timeout waiting for pruned blk00000.dat (error10)
2016-05-17 09:27:25 +02:00
Pieter Wuille 1f01443567
Merge #7994: Add op csv tests to script_tests.json
10e83d7 Adding basic tests for OP_CSV inside of script_tests.json (Chris Stewart)
2016-05-17 01:32:35 +02:00
Pieter Wuille b4d24e142e Report reindexing progress in GUI 2016-05-17 00:45:58 +02:00
Pieter Wuille d3d7547911 Add -reindex-chainstate that does not rebuild block index 2016-05-17 00:45:57 +02:00
Pieter Wuille fb8fad1586 Optimize ActivateBestChain for long chains 2016-05-17 00:45:57 +02:00
Pieter Wuille 316623f2c1 Switch reindexing to AcceptBlock in-loop and ActivateBestChain afterwards 2016-05-17 00:45:49 +02:00
Pieter Wuille d253ec4baa Make ProcessNewBlock dbp const and update comment 2016-05-17 00:40:55 +02:00
Gregory Maxwell d87b198b73 Remove unneeded feerate param from RelayTransaction/AcceptToMemoryPool. 2016-05-16 04:10:06 +00:00
Daniel Kraft f93c2a1b7e net: Avoid duplicate getheaders requests.
The current logic for syncing headers may lead to lots of duplicate
getheaders requests being sent:  If a new block arrives while the node
is in headers sync, it will send getheaders in response to the block
announcement.  When the headers arrive, the message will be of maximum
size and so a follow-up request will be sent---all of that in addition
to the existing headers syncing.  This will create a second "chain" of
getheaders requests.  If more blocks arrive, this may even lead to
arbitrarily many parallel chains of redundant requests.

This patch changes the behaviour to only request more headers after a
maximum-sized message when it contained at least one unknown header.
This avoids sustaining parallel chains of redundant requests.

Note that this patch avoids the issues raised in the discussion of
https://github.com/bitcoin/bitcoin/pull/6821:  There is no risk of the
node being permanently blocked.  At the latest when a new block arrives
this will trigger a new getheaders request and restart syncing.
2016-05-15 20:15:02 +02:00
Jonas Schnelli 169d379c98
Merge #8046: [Qt][OSX] Fix Cmd-Q / Menu Quit shutdown on OSX
34ebceb [Qt][OSX] Fix Cmd-Q / Menu Quit shutdown on OSX (Jonas Schnelli)
2016-05-12 13:15:39 +02:00
Wladimir J. van der Laan 7c8558da36
Merge #8006: Qt: Add option to disable the system tray icon
8b0e497 Qt: Add option to hide the system tray icon (Tyler Hardin)
2016-05-12 11:56:21 +02:00
Wladimir J. van der Laan 2efe38b832
Merge #8004: signal handling: fReopenDebugLog and fRequestShutdown should be type sig_atomic_t
3262316 fReopenDebugLog and fRequestShutdown should be type sig_atomic_t (Chirag Davé)
2016-05-12 11:46:10 +02:00
Jonas Schnelli 34ebceb25a
[Qt][OSX] Fix Cmd-Q / Menu Quit shutdown on OSX 2016-05-12 11:42:31 +02:00
Tyler Hardin 8b0e497028 Qt: Add option to hide the system tray icon
My changes leave all tray icon and menu creation/initialization logic
untouched. It only shows or hides the icon according to the setting.

A new checkbox was added to the OptionsDialog under the Window tab. A
bool option named "hideTrayIcon" was added to OptionsModel. This
checkbox was mapped like other all options to the OptionsModel.

A signal was added to the OptionsModel for broadcasting changes the the
hideTrayIcon option. This signal was connected to a new slot added to
BitcoinGUI named setTrayIconVisible(bool). The slot simply hides or
shows the trayIcon in BitcoinGUI according to the parameter recieved.
2016-05-11 22:28:02 -04:00
Wladimir J. van der Laan 32114dd634 bench: Add crypto hash benchmarks
Add benchmarks for the cryptographic hash algorithms:

- RIPEMD160
- SHA1
- SHA256
- SHA512

Continues work on #7883.
2016-05-11 19:47:25 +02:00
Chris Stewart 10e83d7956 Adding basic tests for OP_CSV inside of script_tests.json
Changing NOP3 op name to OP_CHECKSEQUENCEVERIFY, renaming instances of OP_NOP3 in script_tests.json to CHECKSEQUENCEVERIFY

Cleaning up NOP3 comment

Re-adding test cases that were accidentally deleted, removing dupicated test case, fixing formatting

Removing re-labeling of OP_NOP3 to OP_CSV

Fixing whitespace issues
2016-05-11 08:00:48 -05:00
Cory Fields 5d5e7a097a net: No need to export ConnectNode 2016-05-10 12:28:23 -04:00
Cory Fields e9ed6206b3 net: No need to export DumpBanlist 2016-05-10 12:28:22 -04:00
Cory Fields 8b8f87714d net: make Ban/Unban/ClearBan functionality consistent
- Ban/Unban/ClearBan call uiInterface.BannedListChanged() as necessary
- Ban/Unban/ClearBan sync to disk if the operation is user-invoked
- Mark node for disconnection automatically when banning
- Lock cs_vNodes while setting disconnected
- Don't spin in a tight loop while setting disconnected
2016-05-10 12:28:22 -04:00
MarcoFalke fa72f7d99d [doc] Remove outdated line from listunspent RPC help, fix typo 2016-05-10 17:59:02 +02:00
Wladimir J. van der Laan 373b50deba
Merge #8028: Fix insanity of CWalletDB::WriteTx and CWalletTx::WriteToDisk
0fd5997 Fix insanity of CWalletDB::WriteTx and CWalletTx::WriteToDisk (Patrick Strateman)
2016-05-10 15:51:34 +02:00
Wladimir J. van der Laan 3e2c946cfd init: Move berkeleydb version reporting to wallet
Move the version reporting to Wallet::Verify, before starting
verification of the wallet.

This removes the dependency of init on a specific wallet database
library.

A further, trivial step towards resolving #7965.
2016-05-10 12:57:07 +02:00
Wladimir J. van der Laan f7a21dae5d
Merge #8019: Remove state arg from ReconsiderBlock, rename to ResetBlockFailureFlags
657e07e Rename ReconsiderBlock func to reflect real behavior (instagibbs)
addb9d2 Remove state arg from ReconsiderBlock (instagibbs)
2016-05-10 12:43:22 +02:00
Wladimir J. van der Laan 5767e80dda
Merge #8016: Fix multithread CScheduler and reenable test
166e4b0 Notify other serviceQueue thread we are finished to prevent deadlocks. (Pavel Janík)
db18ab2 Reenable multithread scheduler test. (Pavel Janík)
2016-05-10 12:08:08 +02:00
Jonas Schnelli b33824b76c
Merge #8012: Qt: Delay user confirmation of send
3902a29 Qt: Delay user confirmation of send (Tyler Hardin)
2016-05-10 10:33:21 +02:00
Tyler Hardin 3902a291ab Qt: Delay user confirmation of send
I made a subclass of QMessageBox that disables the send button in
exec() and starts a timer that calls a slot to re-enable it after a
configurable delay.

It also has a countdown in the send/yes button while it is disabled
to hint to the user why the send button is disabled (and that it is
actually supposed to be disabled).
2016-05-09 22:26:57 -04:00
instagibbs 657e07efa3 Rename ReconsiderBlock func to reflect real behavior 2016-05-09 11:26:37 -04:00
Chirag Davé 326231611b fReopenDebugLog and fRequestShutdown should be type sig_atomic_t
This allows access as an atomic variable in the presence
of async interrupts.

See issue #7433 for more details
fixes: #7433
2016-05-09 08:20:58 -07:00
Wladimir J. van der Laan a68f56e727
Merge #7958: Remove useless argument to AlertNotify.
b02119e Remove useless argument to AlertNotify. (Pavel Janík)
2016-05-09 13:34:00 +02:00
Wladimir J. van der Laan e29cfc48fc
Merge #7976: Remove obsolete reference to CValidationState from UpdateCoins.
c8b9248 Remove obsolete reference to CValidationState from UpdateCoins. (21E14)
2016-05-09 11:59:03 +02:00
Patrick Strateman 0fd599767d Fix insanity of CWalletDB::WriteTx and CWalletTx::WriteToDisk 2016-05-09 00:20:17 -07:00
Wladimir J. van der Laan f17032f703
Merge #7934: Improve rolling bloom filter performance and benchmark
1953c40 More efficient bitsliced rolling Bloom filter (Pieter Wuille)
aa62b68 Benchmark rolling bloom filter (Pieter Wuille)
2016-05-09 08:52:31 +02:00
Pavel Janík 166e4b0dfa Notify other serviceQueue thread we are finished to prevent deadlocks. 2016-05-06 20:44:40 +02:00
Pavel Janík db18ab28c7 Reenable multithread scheduler test. 2016-05-06 20:44:39 +02:00
instagibbs addb9d2a09 Remove state arg from ReconsiderBlock 2016-05-06 12:53:23 -04:00
Wladimir J. van der Laan 65aecda52d
Merge #8011: don't run ThreadMessageHandler at lowered priority
e53e7c5 don't run ThreadMessageHandler at lowered priority (Kaz Wesley)
2016-05-06 10:04:09 +02:00
Wladimir J. van der Laan efee32f381
Merge #7815: Break circular dependency main ↔ txdb
99e7075 Break circular dependency main ↔ txdb (Wladimir J. van der Laan)
2016-05-06 10:03:09 +02:00
Kaz Wesley e53e7c5473 don't run ThreadMessageHandler at lowered priority
There's no clear reason ThreadMessageHandler should be low priority.
Fixes #8010 (priority inversion).
2016-05-05 13:25:35 -07:00
Cory Fields cca221fd21 net: Drop CNodeRef for AttemptToEvictConnection
Locking for each operation here is unnecessary, and solves the wrong problem.
Additionally, it introduces a problem when cs_vNodes is held in an owning
class, to which invididual CNodeRefs won't have access.

These should be weak pointers anyway, once vNodes contain shared pointers.

Rather than using a refcounting class, use a 3-step process instead.

1. Lock vNodes long enough to snapshot the fields necessary for comparing
2. Unlock and do the comparison
3. Re-lock and mark the resulting node for disconnection if it still exists
2016-05-05 13:22:25 -04:00