Felix Lange
73f94f3755
p2p: disable encryption handshake
...
The diff is a bit bigger than expected because the protocol handshake
logic has moved out of Peer. This is necessary because the protocol
handshake will have custom framing in the final protocol.
2015-02-19 16:54:53 +01:00
obscuren
09e53367a2
Use a mutex write-lock for a write operation
2015-02-15 02:13:24 +01:00
Felix Lange
5cc1256fd6
p2p: ensure we don't dial ourself
...
addPeer doesn't allow self connects, but we can avoid opening
connections in the first place.
2015-02-13 15:06:47 +01:00
Felix Lange
7101f44998
p2p: add I/O timeout for encrytion handshake
2015-02-13 15:06:47 +01:00
Felix Lange
22ee366ed6
p2p: fix goroutine leak for invalid peers
...
The deflect logic called Disconnect on the peer, but the peer never ran
and wouldn't process the disconnect request.
2015-02-13 15:06:46 +01:00
Felix Lange
170eb3ac68
p2p/discover: map listening port using configured mechanism
2015-02-13 11:39:32 +01:00
Felix Lange
d0a2e655c9
cmd/ethereum, cmd/mist, eth, p2p: use package p2p/nat
...
This deletes the old NAT implementation.
2015-02-13 11:39:31 +01:00
Felix Lange
028775a086
cmd/ethereum, cmd/mist: add flag for discovery bootstrap nodes
2015-02-07 00:52:49 +01:00
Felix Lange
2cf4fed11b
cmd/mist, eth, javascript, p2p: use Node URLs for peer suggestions
2015-02-07 00:46:56 +01:00
Felix Lange
e34d134102
p2p: fixes for actual connections
...
The unit test hooks were turned on 'in production'.
2015-02-07 00:43:52 +01:00
Felix Lange
8564eb9f7e
p2p/discover: add node URL functions, distinguish TCP/UDP ports
...
The discovery RPC protocol does not yet distinguish TCP and UDP ports.
But it can't hurt to do so in our internal model.
2015-02-07 00:12:23 +01:00
Felix Lange
5bdc115943
p2p: integrate p2p/discover
...
Overview of changes:
- ClientIdentity has been removed, use discover.NodeID
- Server now requires a private key to be set (instead of public key)
- Server performs the encryption handshake before launching Peer
- Dial logic takes peers from discover table
- Encryption handshake code has been cleaned up a bit
- baseProtocol is gone because we don't exchange peers anymore
- Some parts of baseProtocol have moved into Peer instead
2015-02-06 00:00:36 +01:00
obscuren
8d1637f567
Moved connection errors to DebugDetail level
2015-01-19 11:21:46 +01:00
obscuren
6abf8ef78f
Merge
2015-01-05 17:10:42 +01:00
Felix Lange
aa3b91b802
p2p: fix call to Server.removePeer (might help with #209 )
2014-12-15 22:36:59 +01:00
obscuren
56dac74f71
made mist in a compilable, workable state using the new refactored packages
2014-12-15 13:00:29 +01:00
Felix Lange
59b63caf5e
p2p: API cleanup and PoC 7 compatibility
...
Whoa, one more big commit. I didn't manage to untangle the
changes while working towards compatibility.
2014-11-21 21:52:45 +01:00
Felix Lange
f38052c499
p2p: rework protocol API
2014-11-21 21:52:45 +01:00
Felix Lange
f3473312ba
all: fix rename breakage
2014-10-31 18:52:58 +01:00
zelig
771fbcc02e
initial commit of p2p package
2014-10-23 16:57:54 +01:00