Commit Graph

10722 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 c74837b724
Merge #8048: doc: Remove outdated qt4 install information from README.md
6075bc4 doc: 32 and 64 bit packages are seperate (Wladimir J. van der Laan)
e5764e6 doc: Remove outdated qt4 install information from README.md (Wladimir J. van der Laan)
2016-05-18 12:16:00 +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 457b9df6b5
Merge #8031: improvement to readability
fe80102 changing "(tests are) automatically run" to correspond to the earlier instance of "run automatically (on the build server)" (Matthew English)
2016-05-18 11:27:00 +02:00
Wladimir J. van der Laan 6075bc4d67 doc: 32 and 64 bit packages are seperate 2016-05-18 11:11:35 +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
Pieter Wuille b3e42b6d02
Merge #8059: Remove unneeded feerate param from RelayTransaction/AcceptToMemoryPool.
d87b198 Remove unneeded feerate param from RelayTransaction/AcceptToMemoryPool. (Gregory Maxwell)
2016-05-16 22:55:58 +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
Wladimir J. van der Laan e5764e69cb doc: Remove outdated qt4 install information from README.md
This text is aimed at users installing the binaries.

Now that Qt5 is linked statically, there is no need to install Qt
as a run-time dependency.
2016-05-12 13:48:58 +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
Wladimir J. van der Laan 5b736ddaa1
Merge #8041: [qa] Fix bip9-softforks blockstore issue
fad60b3 [qa] Fix bip9-softforks blockstore issue (MarcoFalke)
2016-05-12 11:45:31 +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
Pieter Wuille 69b3a6dd9d
Merge #8039: bench: Add crypto hash benchmarks
32114dd bench: Add crypto hash benchmarks (Wladimir J. van der Laan)
2016-05-12 02:00:08 +02: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
MarcoFalke fad60b3911 [qa] Fix bip9-softforks blockstore issue 2016-05-11 16:43:32 +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
MarcoFalke 423ca302a3
Merge #7972: [qa] pull-tester: Run rpc test in parallel
ccccc59 [qa] Add option --portseed to test_framework (MarcoFalke)
fa494de [qa] pull-tester: Run rpc test in parallel (MarcoFalke)
2016-05-10 18:28:48 +02: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 fa83a5dbce [qa] wallet: Temporarily disable salvagewallet test 2016-05-10 18:09:18 +02:00
MarcoFalke fadd048592 [doc] Link to clang-format in the developer notes 2016-05-10 17:59:07 +02:00
MarcoFalke fa72f7d99d [doc] Remove outdated line from listunspent RPC help, fix typo 2016-05-10 17:59:02 +02:00
error10 ac40ed7800 Increase timeout waiting for pruned blk00000.dat
In my ever-growing list of test failures, I was seeing this one intermittently.

```
Running 2nd level testscript pruning.py...
Initializing test directory /tmp/testY5ypCv
Warning! This test requires 4GB of disk space and takes over 30 mins (up to 2 hours)
Mining a big blockchain of 995 blocks
Check that we haven't started pruning yet because we're below PruneAfterHeight
Success
Though we're already using more than 550MB, current usage: 587
Mining 25 more blocks should cause the first block file to be pruned
Assertion failed: blk00000.dat not pruned when it should be
  File "/home/error/bitcoinxt-0.11D/qa/rpc-tests/test_framework/test_framework.py", line 118, in main
    self.run_test()
  File "/home/error/bitcoinxt-0.11D/qa/rpc-tests/pruning.py", line 272, in run_test
    self.test_height_min()
  File "/home/error/bitcoinxt-0.11D/qa/rpc-tests/pruning.py", line 94, in test_height_min
    raise AssertionError("blk00000.dat not pruned when it should be")
Stopping nodes
Failed
```

After digging into the test, I found that the code is waiting 10 seconds for blk00000.dat to be deleted, and then throwing this failure if it still exists after 10 seconds.

I increased this amount, had the script print the actual time taken, and ran the test a few more times. The time taken ranged between 8 to 12 seconds. So, I feel that this timeout is too short.

After changing the timeout to 30 seconds, the test passes consistently.
(cherry picked from commit 3469911c89a48dd2fefe4d1c2a0c176256e14ee0)
2016-05-10 17:49:12 +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 41138f914d
Merge #8036: init: Move berkeleydb version reporting to wallet
3e2c946 init: Move berkeleydb version reporting to wallet (Wladimir J. van der Laan)
2016-05-10 15:15:47 +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