Commit Graph

7166 Commits

Author SHA1 Message Date
Homu
8214ebc61c Auto merge of #2372 - str4d:2355-connectblock-bench, r=nathan-at-least
Benchmark for calling ConnectBlock on a block with many inputs

Requires placing `block-107134.tar.gz` (containing the block, and a fake CoinsDB containing its inputs) into the base directory of the repository.

To facilitate generation of the fake CoinsDB, an additional field `valuesZat` has been added to `getrawtransaction` containing the integer number of zatoshis instead of a decimal number of ZEC.

Closes #2355.
2017-05-18 20:13:26 -07:00
Jack Grigg
c66c731adf Add a benchmark for calling ConnectBlock on a block with many inputs
Requires placing block-107134.tar.gz (containing the block, and a fake CoinsDB
containing its inputs) into the base directory of the repository. This can be
generated using qa/zcash/create_benchmark_archive.py (see the script for usage
details).

To facilitate generation of the fake CoinsDB, an additional field 'valueZat' has
been added to 'getrawtransaction' containing the integer number of zatoshis
instead of a decimal number of ZEC.

Closes #2355.
2017-05-18 11:03:46 +12:00
Jack Grigg
2857f6960d Regenerate miner tests
Closes #2271.
2017-05-16 22:38:07 +12:00
Homu
38684e4c42 Auto merge of #2293 - daira:alerts-for-2017-04-11.a, r=nathan-at-least
Alerts for 2017-04-11.a security issue (fixed in 1.0.8-1)

Alert 1002 (versions 1.0.0-1.0.2 inclusive).
Alert 1003 (versions 1.0.3-1.0.8 inclusive).

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-05-15 16:08:29 -07:00
Homu
e209ba4951 Auto merge of #2338 - amgadabdelhafez:patch-1, r=nathan-at-least
Update timedata.cpp to fix error message string from bitcoin core to zcash

Changing error message string from bitcoin core to zcash. fixes issue #2336
2017-05-15 09:42:19 -07:00
Homu
3a98e3b4c2 Auto merge of #2297 - str4d:2274-apoptosis, r=nathan-at-least
Implement automatic shutdown of deprecated Zcash versions

Closes #2274.
2017-05-14 18:39:14 -07:00
Homu
01bc99205a Auto merge of #2251 - str4d:2210-tor-quotedstring-escapes, r=nathan-at-least
Handle escapes in Tor QuotedStrings

Also adds a missing copyright header.

Closes #2210.
2017-05-13 15:24:58 -07:00
Jack Grigg
b4f861d191 Wrap messages nicely on metrics screen 2017-05-12 14:41:50 +12:00
Jack Grigg
5b3bc9716e Implement automatic shutdown of deprecated Zcash versions
Closes #2274.
2017-05-12 14:41:46 +12:00
Amgad Abdelhafez
8dafb9c6ce Update timedata.cpp
Capitalizing the 'z' in "Zcash" string
2017-05-05 11:24:48 -04:00
Amgad Abdelhafez
bed9dd2cd2 Update timedata.cpp
Changing error message string from botcoin core to zcash
2017-05-02 19:33:52 -04:00
Daira Hopwood
8d8318c947 Alert 1003 (versions 1.0.3-1.0.8 inclusive).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-04-24 19:55:20 +01:00
Daira Hopwood
fa151bc517 Alert 1002 (versions 1.0.0-1.0.2 inclusive).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-04-24 19:42:12 +01:00
Jack Grigg
409606118b Check that >3-digit octals are truncated. 2017-04-21 13:23:29 +12:00
Jack Grigg
8df5fd1116 Correctly handle three-digit octals with leading digit 4-7 2017-04-21 13:22:51 +12:00
Jack Grigg
d15cab21bc Address Daira's further comments 2017-04-21 13:15:39 +12:00
zkbot
20d61ac0ea Auto merge of #2270 - bitcartel:2269_change_regtest_port, r=daira
Change regtest port to 18344.  Closes #2269.
2017-04-19 11:07:49 +00:00
Jack Grigg
0b431fbdb5 Address Daira's comments 2017-04-19 15:23:28 +12:00
Jack Grigg
519713d32e torcontrol: Add missing copyright header 2017-04-18 12:54:22 +12:00
Jack Grigg
b93cedafe4 torcontrol: Handle escapes in Tor QuotedStrings
https://trac.torproject.org/projects/tor/ticket/14999 is tracking an encoding
bug with the Tor control protocol, where many of the QuotedString instances that
Tor outputs are in fact CStrings, but it is not documented which ones are which.

https://spec.torproject.org/control-spec section 2.1.1 provides a future-proofed
rule for handing QuotedStrings, which this commit implements.
2017-04-18 12:54:16 +12:00
zkbot
8e96dc44dd Auto merge of #2205 - arcalinea:1804_zcash_addresses_in_help, r=daira
Change help text examples to use Zcash addresses

Closes #1804 and #2109

Ensures command line help text addresses are Zcash addresses.

Didn't change the text strings that say bitcoin or btc, leaving that for #2150 to close

Did I get all the addresses?
2017-04-17 15:49:37 +00:00
Simon
05844ba53b Change regtest port to 18344. Closes #2269. 2017-04-16 14:48:04 -07:00
zkbot
f7f764e0b2 Auto merge of #2189 - bitcartel:1.0.7_with_apache_qpid, r=bitcartel
Add AMQP 1.0 support via Apache Qpid Proton C++ API 0.17.0

Closes #2188
2017-04-16 15:09:19 +00:00
Nathan Wilcox
451047d14a Bump version numbers for v1.0.8-1. 2017-04-13 17:10:32 -07:00
Daira Hopwood
60b7410cce Add check for JoinSplit priority as calculated by CCoinsViewCache::GetPriority.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-04-13 22:40:37 +01:00
Daira Hopwood
ec19e8e283 Simplify JoinSplit priority calculation. refs 1896
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-04-13 22:40:20 +01:00
str4d
c83c5932e4 Add unit test for security issue 2017-04-11.a 2017-04-13 17:59:36 +01:00
str4d
e40180aa0f Update tests to check actual infinity as well as INF_FEERATE 2017-04-13 17:59:36 +01:00
Daira Hopwood
0090c64534 Don't rely on a finite upper bound on fee rate or priority.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-04-13 17:59:36 +01:00
Daira Hopwood
83aac13083 Update version numbers.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-27 21:01:18 +01:00
zkbot
45faa928ec Auto merge of #2177 - str4d:2061-tor-ephemeral-hs, r=daira
Tor ephemeral hidden services

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6503 (included to reduce merge conflicts)
- bitcoin/bitcoin#6639
- bitcoin/bitcoin#6643
- bitcoin/bitcoin#7090
- bitcoin/bitcoin#7035
- bitcoin/bitcoin#7170
- bitcoin/bitcoin#7218 (non-QT part)
- bitcoin/bitcoin#7313
- bitcoin/bitcoin#7438
- bitcoin/bitcoin#7553
- bitcoin/bitcoin#7637
- bitcoin/bitcoin#7683
- bitcoin/bitcoin#7813
- bitcoin/bitcoin#7703
- bitcoin/bitcoin#8203
- bitcoin/bitcoin#9004
- bitcoin/bitcoin#9234
- bitcoin/bitcoin#9911 (partial)

Closes #2061.
2017-03-26 02:44:06 +00:00
zkbot
f7fcad709b Auto merge of #2203 - arcalinea:2142_security_log_message, r=daira
Add message directing users to security guide

Addresses #2142, which was blocking on updates to zcash/support/security.html. That page has now been added, so this message directing users to the site can be included.

It displays in the zcash-cli --help and --version message text, and on the zcashd metrics screen.
2017-03-26 01:36:24 +00:00
Jack Grigg
87b7f4d878 torcontrol: Log invalid parameters in Tor reply strings where meaningful 2017-03-26 14:35:13 +13:00
Daira Hopwood
f0d1accb7d Line-wrap privacy notice. Use <> around URL and end sentence with '.'.
Include privacy notice in help text for zcashd -help.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-26 02:08:29 +01:00
Jack Grigg
3290567bbd torcontrol: Check for reading errors in ReadBinaryFile
This ensures that ReadBinaryFile never returns exactly TOR_COOKIE_SIZE bytes if
the file was larger than that.
2017-03-26 13:53:13 +13:00
Simon
99eb947a98 Add AMQP 1.0 support via Apache Qpid Proton C++ API 0.17.0 2017-03-25 08:51:40 -07:00
Jack Grigg
64101d0407 torcontrol: Fix ParseTorReplyMapping
- Ignore remaining input if it is an OptArguments
- Correctly handle escapes
2017-03-26 00:35:13 +13:00
Jack Grigg
6dbd95afa1 torcontrol: Add unit tests for Tor reply parsers 2017-03-26 00:34:53 +13:00
Jack Grigg
8966598033 torcontrol: Improve comments 2017-03-25 20:25:59 +13:00
Pavel Janík
4b5ba449bb Make some global variables less-global (static) 2017-03-25 20:25:57 +13:00
Pavel Janík
f0e9019223 Prevent -Wshadow warnings with gcc versions 4.8.5, 5.3.1 and 6.2.1.
Zcash: partial (ignoring src/test/script_tests.cpp due to merge conflicts)
2017-03-25 20:25:56 +13:00
Wladimir J. van der Laan
9e5c9d0a04 torcontrol: Explicitly request RSA1024 private key
When generating a new service key, explicitly request a RSA1024 one.

The bitcoin P2P protocol has no support for the longer hidden service names
that will come with ed25519 keys, until it does, we depend on the old
hidden service type so make this explicit.

See #9214.
2017-03-25 20:25:55 +13:00
Wladimir J. van der Laan
ca5e229514 tor: Change auth order to only use HASHEDPASSWORD if -torpassword
Change authentication order to make it more clear (see #7700).

- If the `-torpassword` option is provided, force use of
  `HASHEDPASSWORD` auth.

- Give error message if `-torpassword` provided, but
  `HASHEDPASSWORD` auth is not available.

- Give error message if only `HASHEDPASSWORD` available, but
  `-torpassword` not given.
2017-03-25 20:25:50 +13:00
Jonas Schnelli
1a41e3f660 Fix torcontrol.cpp unused private field warning 2017-03-25 20:25:48 +13:00
Wladimir J. van der Laan
3d7cddcaa2 Fix memleak in TorController [rework]
It looks like, TorController::disconnected_cb(TorControlConnection&
conn) gets called multiple times which results in multiple event_new().

Avoid this by creating the event only once in the constructore, and
deleting it only once in the destructor (thanks to Cory Fields for the
idea).

Replaces the fix by Jonas Schnelli in #7610, see discussion there.
2017-03-25 20:25:46 +13:00
Patrick Strateman
a05be280e7 Remove vfReachable and modify IsReachable to only use vfLimited.
We do not know that a class of Network is reachable, only that it is not.
2017-03-25 20:25:45 +13:00
Gregory Maxwell
f28a87b4ba Decide eviction group ties based on time.
This corrects a bug the case of tying group size where the code may
 fail to select the group with the newest member. Since newest time
 is the final selection criteria, failing to break ties on it
 on the step before can undermine the final selection.

Tied netgroups are very common.
2017-03-25 20:25:44 +13:00
Gregory Maxwell
35db253fb6 Do not absolutely protect local peers from eviction.
With automatic tor HS support in place we should probably not be providing
 absolute protection for local peers, since HS inbound could be used to
 attack pretty easily.  Instead, this counts on the latency metric inside
 AttemptToEvictConnection to privilege actually local peers.
2017-03-25 20:25:42 +13:00
calebogden
e10e212470 Fixing typos on security-check.py and torcontrol.cpp 2017-03-25 20:25:41 +13:00
MarcoFalke
9b46a35b8d torcontrol debug: Change to a blanket message that covers both cases 2017-03-25 20:25:39 +13:00