7551 Commits

Author SHA1 Message Date
rodasmith
41fd852d3f fix op order to append first alert
Github-Pull: #8697
Rebased-From: 1d635ae61b26d1dd613c1cc1cac796627af2a31e
2016-09-13 11:35:52 +02:00
Pieter Wuille
a9429ca26d
Reduce default number of blocks to check at startup
Github-Pull: #8611
Rebased-From: 203f2121be0a84e85f7dff9cca9a30387005954f
2016-09-09 12:04:55 +02:00
Gregory Maxwell
ab295bb4be 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-09-07 16:43:15 +02:00
Pieter Wuille
bbf379b055 Fix some locks
This makes sure that cs_filter is never held while taking cs_main
or CNode::cs_vSend.
2016-09-07 16:42:42 +02:00
Pieter Wuille
2215c22a00 Check for compatibility with download in FindNextBlocksToDownload 2016-09-07 16:42:42 +02:00
Pieter Wuille
b8c79a057c Precompute sighashes
Original version by Nicolas Dorier. Precomputing version by Pieter Wuille.
2016-09-07 16:42:41 +02:00
MarcoFalke
a9874310c0 [util] CopyrightHolders: Check for untranslated substitution
Also, remove check which is always true
2016-09-07 16:20:36 +02:00
Jonas Schnelli
f1c0d78b2d [Qt] show network/chain errors in the GUI 2016-09-07 16:18:12 +02:00
Ethan Heilman
2611ad79a5 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-09-07 16:17:40 +02:00
Wladimir J. van der Laan
1db3352cc6 qt: Fix random segfault when closing "Choose data directory" dialog
The `pickDataDirectory()` function was calling `exit(0)` to quit
the application when the user closes the dialog without choosing
a data directory.

This is a bad idea because a background thread is created (to
check free space on the drive of the currently selected datadir).
The thread is not stopped and unwound properly, resulting in a potential
race condition somewhere deep in Qt.

So replace the `exit()` by a boolean return value, and let the
stack unwind normally.
2016-09-07 16:17:09 +02:00
MarcoFalke
526d2b0472 [wallet] rpc: Drop misleading option
Github-Pull: #8581
Rebased-From: fab5ecb7719063aa72751df1258dfa4cf4a9a4a9
2016-08-26 11:30:25 +02:00
Wladimir J. van der Laan
9058617afb
qt: translations update pre-rc3 2016-08-11 23:16:21 +02:00
Luke Dashjr
8b0eee66e9
Bugfix: Use pre-BIP141 sigops until segwit activates
qa/rpc-tests/segwit: Test GBT sigops before and after activation

Github-Pull: #8489
Rebased-From: 160f895a80660e4e3904a2624e4110960d051902 239cbd2e5c2a36843b45b356e9aea6e8d35f0968
2016-08-10 14:59:29 +02:00
Pieter Wuille
3f65ba2b3b
Treat high-sigop transactions as larger rather than rejecting them 2016-07-31 21:47:21 +02:00
Wladimir J. van der Laan
ced6c940da
qt: Translations update pre-rc2 2016-07-29 09:56:23 +02:00
Suhas Daftuar
b7e201181b
Prevent fingerprinting, disk-DoS with compact blocks
- Ignore GETBLOCKTXN requests for unknown blocks

Don't disconnect peers, or else we leak information that could be
used for fingerprinting.

- Ignore CMPCTBLOCK messages for pruned blocks

Also ignores CMPCTBLOCK announcements that have too little work.  This is to
prevent disk-exhaustion DoS.

Github-Pull: #8408
Rebased-From: 1de2a46632946990a7863020b61172232f8c5796 1d06e49834814eed45e07393dcffd7b6683311b2
2016-07-29 08:27:57 +02:00
Jorge Timón
8360d5b37d
libconsensus: Expose a flag for BIP112
We added the segwit one, but we forgot CHECKSEQUENCEVERIFY

Github-Pull: #8412
Rebased-From: d12b732ac287a1ed7543481b79801c9afc333b7f
2016-07-29 01:16:57 +02:00
Wladimir J. van der Laan
c3c82c48d9
Merge #8389: [0.13] Create a new HD seed after encrypting the wallet
de45c06 [Wallet] Add CKeyMetadata record for HDMasterKey(s), factor out HD key generation (Jonas Schnelli)
f142c11 [0.13] Create a new HD seed after encrypting the wallet (Jonas Schnelli)
2016-07-28 13:10:31 +02:00
Jonas Schnelli
45eba4b1e0
[Qt] Add dbcache migration path
Github-Pull: #8407
Rebased-From: 893f379ba0befef5301208b6bee8206ac4e76329
2016-07-28 11:30:03 +02:00
Wladimir J. van der Laan
0179a39f9d
qt: periodic translations update 2016-07-27 18:33:22 +02:00
Jonas Schnelli
de45c065f0
[Wallet] Add CKeyMetadata record for HDMasterKey(s), factor out HD key generation 2016-07-27 16:02:41 +02:00
Jonas Schnelli
f142c11ac6
[0.13] Create a new HD seed after encrypting the wallet 2016-07-27 15:56:57 +02:00
Jonas Schnelli
18b8ee1cd1
[Wallet] add HD xpriv to dumpwallet
Github-Pull: #8206
Rebased-From: 77c912d21c8cd153f4503c65225a5a46990cc85a
2016-07-27 15:29:02 +02:00
Suhas Daftuar
4f7f531af6
qa: Add test for standardness of segwit v0 outputs
Github-Pull: #8381
Rebased-From: c59c434b7d1211c13f7904b9bc675e16910a1c0a
2016-07-26 14:25:38 +02:00
Johnson Lau
f84ee3dab6
Make witness v0 outputs non-standard before segwit activation
Github-Pull: #8381
Rebased-From: 1ffaff2f747af683513d6d74a7241d41e3f6e051
2016-07-26 14:25:28 +02:00
Suhas Daftuar
86edc20a17
Scale legacy sigop count in CreateNewBlock
Github-Pull: #8362
Rebased-From: 682aa0f289c550c029733966a2ce3449e4a471df
2016-07-25 18:08:41 +02:00
Jonas Schnelli
73adfe3bb9
[Wallet] Correct hdmasterkeyid/masterkeyid name confusion
Github-Pull: #8390
Rebased-From: b50e1ac298363a7733069f82709674d3a8cb3058
2016-07-25 13:04:45 +02:00
Patrick Strateman
ebea65121e
Move SetMinVersion for FEATURE_HD to SetHDMasterKey
Github-Pull: #8378
Rebased-From: 6523fcaab2f0808d4e47b9cb9ebbef7ed69a309e
2016-07-20 11:58:11 +02:00
Wladimir J. van der Laan
24f117ef05
Merge #8366: [0.13] [Wallet] Ensure <0.13 clients can't open HD wallets
3b38a6a [Wallet] Ensure <0.13 clients can't open HD wallets (Jonas Schnelli)
2016-07-19 12:14:09 +02:00
Suhas Daftuar
fca1a415ce
Rename "block cost" to "block weight"
Github-Pull: #8363
Rebased-From: 2c06bae39edfaa9c0855d83377ad8fda09e4fa08
2016-07-19 12:10:28 +02:00
Jonas Schnelli
3b38a6a96a
[Wallet] Ensure <0.13 clients can't open HD wallets 2016-07-18 22:52:49 +02:00
Wladimir J. van der Laan
084d1ddf8f
build: bump version to 0.13.0 2016-07-18 12:24:28 +02:00
Wladimir J. van der Laan
e4382fbef5
qt: periodic translations update 2016-07-18 12:13:08 +02:00
Wladimir J. van der Laan
8cef5bd58a mining: Improve -blockmaxcost help message
One-word replacement to #8354.
2016-07-18 10:56:25 +02:00
Wladimir J. van der Laan
f5660d381a
Merge #8295: Mining-related fixups for 0.13.0
c1d61fb Add warning if -blockminsize is used. (Suhas Daftuar)
27362dd Remove -blockminsize option (Suhas Daftuar)
d2e46e1 Remove addScoreTxs() (Suhas Daftuar)
6dd4bc2 Exclude witness transactions in addPackageTxs() pre-segwit activation (Suhas Daftuar)
f15c2cd CreateNewBlock: add support for size-accounting to addPackageTxs (Suhas Daftuar)
2016-07-18 08:23:45 +02:00
Wladimir J. van der Laan
238300b398
Merge #8323: Add HD keypath to CKeyMetadata, report metadata in validateaddress
7945088 [Wallet] comsetic non-code changes for the HD feature (Jonas Schnelli)
68d7682 [Wallet] ensure CKeyMetadata.hdMasterKeyID will be cleared during SetNull() (Jonas Schnelli)
f708085 [QA] extend wallet-hd test to cover HD metadata (Jonas Schnelli)
986c223 [Wallet] print hd masterkeyid in getwalletinfo (Jonas Schnelli)
b1c7b24 [Wallet] report optional HDKeypath/HDMasterKeyId in validateaddress (Jonas Schnelli)
5b95dd2 [Wallet] extend CKeyMetadata with HD keypath (Jonas Schnelli)
2016-07-18 07:58:33 +02: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
Jonas Schnelli
7945088d41
[Wallet] comsetic non-code changes for the HD feature 2016-07-15 10:34:08 +02:00
Jonas Schnelli
68d7682b9f
[Wallet] ensure CKeyMetadata.hdMasterKeyID will be cleared during SetNull() 2016-07-15 10:33:25 +02:00
Wladimir J. van der Laan
bc94b87487
Merge #8324: [Wallet] keep HD seed during salvagewallet
b993671 [Wallet] keep HD seed during salvagewallet (Jonas Schnelli)
2016-07-14 11:37:48 +02:00
Wladimir J. van der Laan
ca40ef6029
Merge #8312: Fix mempool DoS vulnerability from malleated transactions
46c9620 Test that unnecessary witnesses can't be used for mempool DoS (Suhas Daftuar)
bb66a11 Fix DoS vulnerability in mempool acceptance (Suhas Daftuar)
2016-07-14 08:21:13 +02:00
Wladimir J. van der Laan
4324bd237c
Merge #8311: Rename CTxinWitness -> CTxInWitness
36ae37a Rename CTxinWitness -> CTxInWitness (Bob McElrath)
2016-07-14 08:18:38 +02:00
Wladimir J. van der Laan
1bc9c8085f
Merge #8271: [bugfix] Do not send witnesses in cmpctblock
252675e Do not send witnesses in cmpctblock (Pieter Wuille)
2016-07-14 08:17:22 +02:00
Suhas Daftuar
96fa95361f Improve handling of unconnecting headers
When processing a headers message that looks like a block announcement,
send peer a getheaders if the headers message won't connect.

Apply DoS points after too many consecutive unconnecting headers messages.
2016-07-12 13:12:40 -04:00
Wladimir J. van der Laan
4831a16223
qt: periodic translation update
Added languages:
- `bg_BG`: Bulgarian (Bulgaria)
2016-07-12 11:40:33 +02:00
Jonas Schnelli
b993671921
[Wallet] keep HD seed during salvagewallet 2016-07-09 12:58:03 +02:00
Jonas Schnelli
986c223214
[Wallet] print hd masterkeyid in getwalletinfo 2016-07-09 12:12:36 +02:00
Jonas Schnelli
b1c7b244e2
[Wallet] report optional HDKeypath/HDMasterKeyId in validateaddress 2016-07-09 12:12:32 +02:00
Jonas Schnelli
5b95dd2c25
[Wallet] extend CKeyMetadata with HD keypath 2016-07-09 11:52:17 +02:00
MarcoFalke
477777f250 [rpcwallet] Don't use floating point 2016-07-08 12:01:25 +02:00