Commit Graph

12058 Commits

Author SHA1 Message Date
jl777
66294e69b2 Remove prints 2017-03-25 19:32:17 +02:00
jl777
67478d4a4c Test 2017-03-25 19:06:21 +02:00
jl777
1812efacf4 Test 2017-03-25 18:50:05 +02:00
jl777
b020e6a38e Test 2017-03-25 18:49:16 +02:00
jl777
1a9890f534 Test 2017-03-25 18:49:00 +02:00
jl777
dd98c02d47 test 2017-03-25 18:46:14 +02:00
jl777
a85440acf8 Test 2017-03-25 18:32:22 +02:00
jl777
8b51b9e489 Test 2017-03-25 18:31:20 +02:00
jl777
ca3bf7ed8f Test 2017-03-25 18:30:12 +02:00
jl777
f0100e72e6 Test 2017-03-25 18:29:49 +02:00
jl777
4ab9dbe9b2 Test 2017-03-25 18:19:05 +02:00
jl777
902ac92da3 Test 2017-03-25 18:14:15 +02:00
jl777
2eb6b74a26 Test 2017-03-25 18:09:52 +02:00
jl777
37f823fba7 Test 2017-03-25 18:01:19 +02:00
jl777
0bba91a407 Test 2017-03-25 17:59:24 +02:00
jl777
c49a34c04a Test 2017-03-25 17:58:53 +02:00
jl777
44cc3bc7e6 Test 2017-03-25 17:57:28 +02:00
jl777
2e8e57576e Test 2017-03-25 17:55:07 +02: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
jl777
de65ff9543 Test 2017-03-25 17:51:17 +02:00
jl777
73326d0273 Test 2017-03-25 17:50:58 +02:00
jl777
1c5a00ced9 Test 2017-03-25 17:44:01 +02: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
jl777
39d28b0641 Expand time window 2017-03-25 13:25:37 +02:00
jl777
0af2786dc4 Fix miner 2017-03-25 10:35:45 +02:00
jl777
abdf25c80c Test 2017-03-25 10:28:21 +02: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
Daniel Cousens
65fd8eb134 torcontrol: only output disconnect if -debug=tor 2017-03-25 20:25:35 +13:00
Peter Todd
2b30758b2f Connect to Tor hidden services by default
Adds 127.0.0.1:9050 for the .onion proxy if we can succesfully connect
to the control port.

Natural followup to creating hidden services automatically.
2017-03-25 20:24:58 +13:00
Wladimir J. van der Laan
975dc649af torcontrol improvements and fixes
- Force AUTHCOOKIE size to be 32 bytes: This provides protection against
  an attack where a process pretends to be Tor and uses the cookie
  authentication method to nab arbitrary files such as the
  wallet
- torcontrol logging
- fix cookie auth
- add HASHEDPASSWORD auth, fix fd leak when fwrite() fails
- better error reporting when cookie file is not ok
- better init/shutdown flow
- stop advertizing service when disconnected from tor control port
- COOKIE->SAFECOOKIE auth
2017-03-25 20:22:12 +13:00
Peter Todd
77e5601e9e Better error message if Tor version too old 2017-03-25 20:22:11 +13:00
Wladimir J. van der Laan
eb5f63fe58 net: Automatically create hidden service, listen on Tor
Starting with Tor version 0.2.7.1 it is possible, through Tor's control socket
API, to create and destroy 'ephemeral' hidden services programmatically.
https://stem.torproject.org/api/control.html#stem.control.Controller.create_ephemeral_hidden_service

This means that if Tor is running (and proper authorization is available),
bitcoin automatically creates a hidden service to listen on, without user
manual configuration. This will positively affect the number of available
.onion nodes.

- When the node is started, connect to Tor through control socket
- Send `ADD_ONION` command
- First time:
    - Make it create a hidden service key
    - Save the key in the data directory for later usage
- Make it redirect port 8333 to the local port 8333 (or whatever port we're listening on).
- Keep control socket connection open for as long node is running. The hidden service will
  (by default) automatically go away when the connection is closed.
2017-03-25 20:22:09 +13:00
Matt Quinn
8a5ae3c7a9 Consolidate individual references to the current maximum peer connection
value of 125 into a single constant declaration.
2017-03-25 20:22:07 +13:00
zkbot
f9f48667be Auto merge of #2176 - str4d:1593-libevent, r=bitcartel
libevent-based http server

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#5677
- bitcoin/bitcoin#6695
- bitcoin/bitcoin#6899
- bitcoin/bitcoin#7016
- bitcoin/bitcoin#7964
- bitcoin/bitcoin#8722
- bitcoin/bitcoin#8730
- bitcoin/bitcoin#9073
- bitcoin/bitcoin#9265
- bitcoin/bitcoin#9387
- bitcoin/bitcoin#9471
- bitcoin/bitcoin#9647
- bitcoin/bitcoin#9903
- bitcoin/bitcoin#6640
- bitcoin/bitcoin#8139
- bitcoin/bitcoin#8839

Closes #1593 and #1856.
2017-03-25 04:52:16 +00:00
Jack Grigg
3da13e885e Fix typo 2017-03-25 17:40:27 +13:00
Jack Grigg
206e2b9737 Wrap error string 2017-03-25 17:39:56 +13:00
jl777
b366cab901 Disable updating template time 2017-03-25 02:08:58 +02:00
zkbot
2bdb37276e Auto merge of #2198 - str4d:2139-timer, r=str4d
Improve mining metrics

Closes #2139.
2017-03-25 00:08:47 +00:00