Commit Graph

26 Commits

Author SHA1 Message Date
Felix Lange
56a48101dc cmd/rlpdump, cmd/utils, eth, p2p, whisper: use rlp input limit 2015-04-17 14:45:09 +02:00
obscuren
a7ad9c309b Merge branch 'develop' into conversion 2015-03-21 14:52:42 +01:00
obscuren
4f5b362bda %#x => %x 2015-03-20 12:52:03 +01:00
Felix Lange
b9e0b11e7d p2p: interrupt MsgPipe payload read/write
This is better because protocols might not actually read the payload for
some errors (msg too big, etc.) which can be a pain to test with the old
behaviour.
2015-03-19 15:16:06 +01:00
Felix Lange
5ba51594c7 p2p: use package rlp to encode messages
Message encoding functions have been renamed to catch any uses.
The switch to the new encoder can cause subtle incompatibilities.
If there are any users outside of our tree, they will at least be
alerted that there was a change.

NewMsg no longer exists. The replacements for EncodeMsg are called
Send and SendItems.
2015-03-19 15:11:02 +01:00
Felix Lange
4811f460e7 p2p: export ExpectMsg (for eth protocol testing) 2015-03-19 15:08:04 +01:00
obscuren
b523441361 Moved ethutil => common 2015-03-16 11:27:38 +01:00
Felix Lange
22659a7fea p2p: restore read/write timeouts
They got lost in the transition to rlpxFrameRW.
2015-03-04 16:42:00 +01:00
Felix Lange
7964f30dcb p2p: msg.Payload contains list data
With RLPx frames, the message code is contained in the
frame and is no longer part of the encoded data.

EncodeMsg, Msg.Decode have been updated to match.
Code that decodes RLP directly from Msg.Payload will need
to change.
2015-03-04 12:27:24 +01:00
Felix Lange
d084aed5e9 p2p: delete frameRW 2015-03-04 12:27:24 +01:00
Felix Lange
736e632215 p2p: use RLPx frames for messaging 2015-03-04 12:27:23 +01:00
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
Felix Lange
5110f80bba p2p: improve read deadlines
There are now two deadlines, frameReadTimeout and payloadReadTimeout.

The frame timeout is longer and allows for connections that are idle.
The message timeout is still short and ensures that we don't get stuck
in the middle of a message.
2015-02-13 14:44:00 +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
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
Felix Lange
eb0e7b1b81 eth, p2p: remove EncodeMsg from p2p.MsgWriter
...and make it a top-level function instead.

The original idea behind having EncodeMsg in the interface was that
implementations might be able to encode RLP data to their underlying
writer directly instead of buffering the encoded data. The encoder
will buffer anyway, so that doesn't matter anymore.

Given the recent problems with EncodeMsg (copy-pasted implementation
bug) I'd rather implement once, correctly.
2015-01-06 12:23:38 +01:00
obscuren
6abf8ef78f Merge 2015-01-05 17:10:42 +01:00
Felix Lange
65e39bf20e p2p: add MsgPipe for protocol testing 2014-12-15 00:28:20 +01:00
Felix Lange
9b85002b70 p2p: remove Msg.Value and MsgLoop 2014-11-25 16:01:39 +01:00
Felix Lange
6049fcd52a p2p: use package rlp for baseProtocol 2014-11-25 12:25:31 +01:00
Felix Lange
c1fca72552 p2p: use package rlp 2014-11-24 19:03:20 +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
7149191dd9 p2p: fix issues found during review 2014-11-21 21:52:45 +01:00
Felix Lange
f38052c499 p2p: rework protocol API 2014-11-21 21:52:45 +01:00
obscuren
429dd2a100 Implemented new miner w/ ui interface for merged mining. Closes #177
* Miner has been rewritten
* Added new miner pane
* Added option for local txs
* Added option to read from MergeMining contract and list them for
  merged mining
2014-11-07 12:18:48 +01:00
zelig
771fbcc02e initial commit of p2p package 2014-10-23 16:57:54 +01:00