Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | p2p: restore read/write timeouts | Felix Lange | 2015-03-04 | 5 | -37/+37 |
| | | | | They got lost in the transition to rlpxFrameRW. | ||||
* | p2p: msg.Payload contains list data | Felix Lange | 2015-03-04 | 7 | -75/+25 |
| | | | | | | | | | 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. | ||||
* | p2p: verify protocol handshake node ID | Felix Lange | 2015-03-04 | 1 | -0/+3 |
| | |||||
* | p2p: make encryption handshake code easier to follow | Felix Lange | 2015-03-04 | 2 | -302/+272 |
| | | | | | | | | | This mostly changes how information is passed around. Instead of using many function parameters and return values, put the entire state in a struct and pass that. This also adds back derivation of ecdhe-shared-secret. I deleted it by accident in a previous refactoring. | ||||
* | p2p/discover: add NodeID.Pubkey | Felix Lange | 2015-03-04 | 2 | -0/+33 |
| | |||||
* | p2p: make RLPx frame MAC 16 bytes as defined in the spec | Felix Lange | 2015-03-04 | 2 | -13/+19 |
| | |||||
* | p2p: delete frameRW | Felix Lange | 2015-03-04 | 2 | -184/+0 |
| | |||||
* | p2p: use RLPx frames for messaging | Felix Lange | 2015-03-04 | 6 | -50/+73 |
| | |||||
* | p2p: encrypted and authenticated RLPx frame I/O | Felix Lange | 2015-03-04 | 4 | -172/+197 |
| | |||||
* | p2p: add basic RLPx frame I/O | Felix Lange | 2015-03-04 | 2 | -0/+252 |
| | |||||
* | p2p: emit JSON connect/disconnect events | Felix Lange | 2015-02-20 | 1 | -0/+13 |
| | |||||
* | p2p: initialize Server.ourHandshake before accepting connections | Felix Lange | 2015-02-20 | 1 | -8/+9 |
| | |||||
* | p2p: enable devp2p ping | Felix Lange | 2015-02-19 | 1 | -11/+26 |
| | | | | This should prevent connection drops. | ||||
* | p2p: disable encryption handshake | Felix Lange | 2015-02-19 | 7 | -313/+273 |
| | | | | | | 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. | ||||
* | Merge pull request #325 from fjl/deps-cleanup | Jeffrey Wilcke | 2015-02-18 | 2 | -4/+4 |
|\ | | | | | Cleanup imports | ||||
| * | p2p/nat: switch to github.com/huin/goupnp | Felix Lange | 2015-02-17 | 1 | -3/+3 |
| | | | | | | | | My temporary fix was merged upstream. | ||||
| * | p2p: fix ecies dependency in tests | Felix Lange | 2015-02-17 | 1 | -1/+1 |
| | | | | | | | | | | We forgot to update this reference when moving ecies into the go-ethereum repo. | ||||
* | | p2p/discover: fix pending replies iteration | Felix Lange | 2015-02-17 | 1 | -1/+2 |
|/ | | | | | | Range expressions capture the length of the slice once before the first iteration. A range expression cannot be used here since the loop modifies the slice variable (including length changes). | ||||
* | Use a mutex write-lock for a write operation | obscuren | 2015-02-15 | 1 | -4/+4 |
| | |||||
* | Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop | obscuren | 2015-02-14 | 1 | -0/+6 |
|\ | |||||
| * | p2p: print Cap as name/version | Felix Lange | 2015-02-14 | 1 | -0/+6 |
| | | |||||
* | | Moved ECIES to repo & added secondary title for webview | obscuren | 2015-02-14 | 1 | -1/+1 |
|/ | | | | | * ECIES moved from obscuren to ethereum * Added html META[name=badge] to reflect menuItem.secondaryTitle | ||||
* | p2p: bump devp2p protcol version to 3 | Felix Lange | 2015-02-13 | 1 | -1/+1 |
| | | | | For compatibility with cpp-ethereum | ||||
* | p2p: handle disconnect before protocol handshake | Felix Lange | 2015-02-13 | 1 | -0/+7 |
| | |||||
* | p2p/discover: fix race in ListenUDP | Felix Lange | 2015-02-13 | 1 | -24/+17 |
| | | | | | udp.Table was assigned after the readLoop started, so packets could arrive and be processed before the Table was there. | ||||
* | p2p: ensure we don't dial ourself | Felix Lange | 2015-02-13 | 1 | -1/+4 |
| | | | | | addPeer doesn't allow self connects, but we can avoid opening connections in the first place. | ||||
* | p2p: add I/O timeout for encrytion handshake | Felix Lange | 2015-02-13 | 1 | -1/+3 |
| | |||||
* | p2p: fix goroutine leak for invalid peers | Felix Lange | 2015-02-13 | 1 | -6/+5 |
| | | | | | The deflect logic called Disconnect on the peer, but the peer never ran and wouldn't process the disconnect request. | ||||
* | p2p: improve read deadlines | Felix Lange | 2015-02-13 | 2 | -15/+27 |
| | | | | | | | | 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. | ||||
* | p2p/discover: map listening port using configured mechanism | Felix Lange | 2015-02-13 | 3 | -15/+25 |
| | |||||
* | p2p/discover: code review fixes | Felix Lange | 2015-02-13 | 3 | -7/+9 |
| | |||||
* | cmd/ethereum, cmd/mist, eth, p2p: use package p2p/nat | Felix Lange | 2015-02-13 | 4 | -478/+11 |
| | | | | This deletes the old NAT implementation. | ||||
* | p2p/nat: new package for port mapping stuff | Felix Lange | 2015-02-13 | 3 | -0/+499 |
| | | | | | | I have verified that UPnP and NAT-PMP work against an older version of the MiniUPnP daemon running on pfSense. This code is kind of hard to test automatically. | ||||
* | p2p/discover: deflake UDP tests | Felix Lange | 2015-02-09 | 4 | -59/+123 |
| | |||||
* | cmd/ethereum, cmd/mist: add flag for discovery bootstrap nodes | Felix Lange | 2015-02-07 | 2 | -3/+3 |
| | |||||
* | cmd/mist, eth, javascript, p2p: use Node URLs for peer suggestions | Felix Lange | 2015-02-07 | 2 | -3/+3 |
| | |||||
* | p2p: fixes for actual connections | Felix Lange | 2015-02-07 | 6 | -29/+38 |
| | | | | The unit test hooks were turned on 'in production'. | ||||
* | p2p/discover: add node URL functions, distinguish TCP/UDP ports | Felix Lange | 2015-02-07 | 8 | -326/+532 |
| | | | | | The discovery RPC protocol does not yet distinguish TCP and UDP ports. But it can't hurt to do so in our internal model. | ||||
* | p2p: integrate p2p/discover | Felix Lange | 2015-02-06 | 15 | -1659/+1056 |
| | | | | | | | | | | | | 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 | ||||
* | p2p/discover: add some helper functions | Felix Lange | 2015-02-06 | 4 | -20/+41 |
| | |||||
* | p2p/discover: new package implementing the Node Discovery Protocol | Felix Lange | 2015-02-06 | 4 | -0/+1428 |
| | |||||
* | key generation abstracted out, for testing with deterministic keys | zelig | 2015-02-06 | 2 | -12/+92 |
| | |||||
* | fix clientidentity test after privkey removed | zelig | 2015-02-06 | 1 | -6/+2 |
| | |||||
* | get rid of Private Key in ClientIdentity | zelig | 2015-02-06 | 1 | -5/+3 |
| | |||||
* | make crypto handshake calls package level, store privateKey on peer + tests ok | zelig | 2015-02-06 | 3 | -87/+52 |
| | |||||
* | apply handshake related improvements from p2p.crypto branch | zelig | 2015-02-06 | 3 | -29/+31 |
| | |||||
* | add temporary forced session token generation | zelig | 2015-02-06 | 2 | -0/+8 |
| | |||||
* | peer-level integration test for crypto handshake | zelig | 2015-02-06 | 3 | -15/+71 |
| | | | | | | | | | - add const length params for handshake messages - add length check to fail early - add debug logs to help interop testing (!ABSOLUTELY SHOULD BE DELETED LATER) - wrap connection read/writes in error check - add cryptoReady channel in peer to signal when secure session setup is finished - wait for cryptoReady or timeout in TestPeersHandshake | ||||
* | chop first byte when cryptoid.PubKeyS is set from identity.Pubkey() since ↵ | zelig | 2015-02-06 | 1 | -1/+11 |
| | | | | this is directly copied in the auth message | ||||
* | add initial peer level test (failing) | zelig | 2015-02-06 | 1 | -1/+52 |
| | |||||
* | add code documentation | zelig | 2015-02-06 | 1 | -15/+47 |
| | |||||
* | changes that fix it all: | zelig | 2015-02-06 | 2 | -57/+146 |
| | | | | | | | | | | | - set proper public key serialisation length in pubLen = 64 - reset all sizes and offsets - rename from DER to S (we are not using DER encoding) - add remoteInitRandomPubKey as return value to respondToHandshake - add ImportPublicKey with error return to read both EC golang.elliptic style 65 byte encoding and 64 byte one - add ExportPublicKey falling back to go-ethereum/crypto.FromECDSAPub() chopping off the first byte - add Import - Export tests - all tests pass | ||||
* | important fix for peer pubkey. when taken from identity, chop first format byte! | zelig | 2015-02-06 | 1 | -1/+1 |
| | |||||
* | add equality check for nonce and remote nonce | zelig | 2015-02-06 | 1 | -0/+6 |
| | |||||
* | add minor comments to the test | zelig | 2015-02-06 | 1 | -0/+4 |
| | |||||
* | first stab at integrating crypto in our p2p | zelig | 2015-02-06 | 3 | -44/+79 |
| | | | | | | | - abstract the entire handshake logic in cryptoId.Run() taking session-relevant parameters - changes in peer to accomodate how the encryption layer would be switched on - modify arguments of handshake components - fixed test getting the wrong pubkey but it till crashes on DH in newSession() | ||||
* | integrate cryptoId into peer and connection lifecycle | zelig | 2015-02-06 | 2 | -3/+33 |
| | |||||
* | completed the test. FAIL now. it crashes at diffie-hellman. ECIES -> ↵ | zelig | 2015-02-06 | 2 | -43/+57 |
| | | | | secp256k1-go panics | ||||
* | handshake test to crypto | zelig | 2015-02-06 | 1 | -1/+1 |
| | |||||
* | handshake test to crypto | zelig | 2015-02-06 | 2 | -2/+54 |
| | |||||
* | fix crash | zelig | 2015-02-06 | 1 | -22/+29 |
| | | | | | | - add session token check and fallback to shared secret in responder call too - use explicit length for the types of new messages - fix typo resp[resLen-1] = tokenFlag | ||||
* | rewrite to comply with latest spec | zelig | 2015-02-06 | 1 | -53/+138 |
| | | | | | | | | - correct sizes for the blocks : sec signature 65, ecies sklen 16, keylength 32 - added allocation to Xor (should be optimized later) - no pubkey reader needed, just do with copy - restructuring now into INITIATE, RESPOND, COMPLETE -> newSession initialises the encryption/authentication layer - crypto identity can be part of client identity, some initialisation when server created | ||||
* | add crypto auth logic to p2p | zelig | 2015-02-06 | 1 | -0/+174 |
| | |||||
* | fix protocol to accomodate privkey | zelig | 2015-02-06 | 2 | -1/+14 |
| | |||||
* | add privkey to clientIdentity + tests | zelig | 2015-02-06 | 2 | -5/+21 |
| | |||||
* | initial hook for crypto handshake (void, off by default) | zelig | 2015-02-06 | 1 | -0/+26 |
| | |||||
* | Moved `obscuren` secp256k1-go | obscuren | 2015-01-22 | 1 | -1/+1 |
| | |||||
* | Moved connection errors to DebugDetail level | obscuren | 2015-01-19 | 1 | -2/+2 |
| | |||||
* | p2p: improve test for peers message | Felix Lange | 2015-01-06 | 1 | -21/+43 |
| | | | | | The test now checks that the number of of addresses is correct and terminates cleanly. | ||||
* | p2p: move peerList back into baseProtocol | Felix Lange | 2015-01-06 | 2 | -23/+23 |
| | | | | It had been moved to Peer, probably for debugging. | ||||
* | eth, p2p: remove EncodeMsg from p2p.MsgWriter | Felix Lange | 2015-01-06 | 5 | -23/+21 |
| | | | | | | | | | | | | ...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. | ||||
* | Merge | obscuren | 2015-01-06 | 8 | -54/+144 |
| | |||||
* | Cleaned up some of that util | obscuren | 2015-01-04 | 2 | -2/+25 |
| | |||||
* | p2p: fix call to Server.removePeer (might help with #209) | Felix Lange | 2014-12-16 | 1 | -7/+2 |
| | |||||
* | made mist in a compilable, workable state using the new refactored packages | obscuren | 2014-12-15 | 1 | -0/+1 |
| | |||||
* | Merge pull request #204 from fjl/fix-p2p-disconnect | Jeffrey Wilcke | 2014-12-15 | 7 | -8/+277 |
|\ | | | | | p2p: fix decoding of disconnect reason | ||||
| * | p2p: add test for base protocol disconnect | Felix Lange | 2014-12-15 | 1 | -0/+58 |
| | | |||||
| * | p2p: use an error type for disconnect requests | Felix Lange | 2014-12-15 | 2 | -2/+10 |
| | | | | | | | | Test-tastic. | ||||
| * | p2p: add MsgPipe for protocol testing | Felix Lange | 2014-12-15 | 2 | -0/+140 |
| | | |||||
| * | p2p: improve and test eofSignal | Felix Lange | 2014-12-12 | 2 | -5/+68 |
| | | |||||
| * | p2p: fix decoding of disconnect reason (fixes #200) | Felix Lange | 2014-12-12 | 1 | -2/+2 |
| | | |||||
* | | Fixed tests | obscuren | 2014-12-10 | 1 | -1/+1 |
|/ | |||||
* | p2p: add test for NewPeer | Felix Lange | 2014-11-27 | 1 | -0/+15 |
| | |||||
* | p2p: make Disconnect not hang for peers created with NewPeer | Felix Lange | 2014-11-27 | 1 | -0/+1 |
| | |||||
* | p2p: remove Msg.Value and MsgLoop | Felix Lange | 2014-11-25 | 3 | -49/+19 |
| | |||||
* | p2p: use package rlp for baseProtocol | Felix Lange | 2014-11-25 | 4 | -58/+71 |
| | |||||
* | p2p: use package rlp | Felix Lange | 2014-11-25 | 3 | -67/+31 |
| | |||||
* | p2p: API cleanup and PoC 7 compatibility | Felix Lange | 2014-11-22 | 17 | -1902/+1665 |
| | | | | | Whoa, one more big commit. I didn't manage to untangle the changes while working towards compatibility. | ||||
* | p2p: disable failing Server tests for now | Felix Lange | 2014-11-22 | 1 | -0/+3 |
| | |||||
* | p2p: fix issues found during review | Felix Lange | 2014-11-22 | 4 | -53/+96 |
| | |||||
* | p2p: rework protocol API | Felix Lange | 2014-11-22 | 14 | -1282/+1017 |
| | |||||
* | Implemented new miner w/ ui interface for merged mining. Closes #177 | obscuren | 2014-11-07 | 3 | -3/+4 |
| | | | | | | | | * 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 | ||||
* | all: fix rename breakage | Felix Lange | 2014-11-01 | 1 | -2/+2 |
| | |||||
* | initial commit of p2p package | zelig | 2014-10-23 | 19 | -0/+3015 |