Commit Graph

38 Commits

Author SHA1 Message Date
kdeme 8cad437112 Fix, improve and enable tshh_connect + other improvements:
- minePow fix
- random padding
- random IV (phew!)
- other small changes + comments
2018-12-06 14:30:55 +02:00
kdeme 420298dca0 Address PR #52 review comments 2018-11-28 20:16:21 +02:00
Zahary Karadjov ccea6dc7b6 Whisper post-review changes (PR #52) 2018-11-28 02:23:03 +02:00
deme 1e5eeec6bb Untie filter code from EthereumNode + add unit tests 2018-11-27 13:56:25 +02:00
deme bc9db02411 Add more unit tests, change unnecessary vars to let and some general cleanup 2018-11-27 13:56:25 +02:00
deme 3d2abbdfdd Add access to set/get the message padding + tests 2018-11-27 13:56:25 +02:00
deme 4f53236233 Filter queue and other improvements:
- Add filter queue and getFilterMessages
- Improve some procs that can return failures
- Add + improve tests
2018-11-27 13:56:25 +02:00
deme 8c273b2a2d Improvements and some cleanup
- Added sendP2PMessage + test
- Timeout on waiting for status message
2018-11-27 13:56:25 +02:00
deme 70fc6874be Add Whisper implementation 2018-11-27 13:56:25 +02:00
andri lim c3a49d187d fixes wrong logic 2018-11-09 14:45:35 +02:00
andri lim e8bd614021 improve readability 2018-11-09 14:45:35 +02:00
andri lim f590bf0154 add snappy compression 2018-11-09 14:45:35 +02:00
deme f91091de44 Fix import of shh_protocol 2018-11-04 12:31:03 +02:00
Jacek Sieka 7342c46fd9 whisper: updates
* add some logging
* add some error and bounds checking
* move tests where they belong
* add symmetric encryption
* add signature public key recovery
2018-10-21 01:35:35 +03:00
Zahary Karadjov 7828ef0481 Initial implementation of the LES protocol and its flow control.
This also restores the old module structure of having separate
`peer_pool` and `rlpx` modules. This is made possible by the
new Nim package `package_visible_types` (please refer to its
README for an explanation).

Also introduces more error handling in the low-level RLPx routines.
All detected errors will result in immediate disconnection of the
corresponding peer, which may be detected in the protocols though
the `onPeerDisconnected` event handler.
2018-10-16 02:52:11 +03:00
Yuriy Glukhov 253bea9c8e More fixes. Block headers download works! 2018-08-14 16:45:08 +03:00
Zahary Karadjov 4335052e9f Move the code from rlpx.nim in the base module as it now represents
a wider set of APIs.
2018-07-12 14:14:22 +03:00
Zahary Karadjov 72016046fb Merge peer_pool and server into rlpx
This was done because a cycle was formed between the structures
of the three modules:

- A Peer holds a reference to its Network
- The Network holds a reference to its PeerPool
- The PeerPool keeps a table of connected Peers

I could have resolved the issue by introducing a new types module,
but it would have required all of the currently private fields to
become public (due to lack of package-level visibility in Nim).

Instead I decided to merge the modules because they were relatively
small anyway. Please note that the former `P2PServer` type is now
called `NetworkConnection`. There are slight changes in the APIs
that will be carried out in Nimbus when merging this.
2018-07-06 15:25:21 +03:00
cheatfate 28759422bc Move clientId from constant. 2018-06-19 14:16:36 +03:00
cheatfate 24d762da34 Moved eth_p2p to asyncdispatch2.
Fix some warnings at rlpx.nim.
Commented debug echo in rlpx.nim.
2018-06-18 12:05:38 +03:00
Zahary Karadjov 812c6284c0 rename package to eth_p2p to make it consistent with our naming scheme 2018-06-16 21:58:41 +03:00
data-man b6b511c1ad Fix tests 2018-05-17 15:49:22 +03:00
Yuriy Glukhov 128460099a Fixed rlpx send, perform handshake in a test. ENode allows zero ports now. 2018-05-10 22:02:12 +03:00
Yuriy Glukhov 5ac3163920 Server updates 2018-05-10 15:51:33 +03:00
Yuriy Glukhov 45886d2a16 Fixed findNode msg handling, minor optimization, added a test 2018-05-08 20:58:45 +03:00
Yuriy Glukhov 7c09171906 Fixed compilation error 2018-05-02 11:52:38 +03:00
cheatfate 950e0c2d46 Add ENode type/procedures/tests.
Fixed header with proper licenses.
Fixed nimble to allow ENode tests.
2018-04-30 20:40:04 +03:00
Zahary Karadjov 8050440614 integrate the RLPx encryption with the rest of the framework 2018-04-19 15:43:24 +03:00
cheatfate c07b9f4457 RLPx encryption/decryption module with tests. 2018-04-19 15:43:24 +03:00
cheatfate d7bd43c334 Remove ecc.nim.
Remove testecc.nim.
Switch auth/ecies to use eth_keys instead of ecc.nim.
Fix tests according to new API.
2018-04-11 00:29:46 +03:00
cheatfate 59d65df3f4 Final version for review. 2018-04-02 10:15:16 +03:00
cheatfate b89d42b633 Merge branch 'master' into review 2018-03-30 23:12:05 +03:00
cheatfate d8c63e7da1 Some fixes and tests for ECIES. 2018-03-30 18:42:23 +03:00
Yuriy Glukhov 3615515fd9 Moved discovery from p2p-discobus 2018-03-30 16:58:06 +03:00
cheatfate f020ff4712 Finished with ECIES review and adopted tests. 2018-03-30 10:03:32 +03:00
cheatfate 1afd8b67e1 first attempt 2018-03-29 23:53:19 +03:00
cheatfate a027af3a73 Remove trailing spaces. 2018-03-28 03:22:20 +03:00
cheatfate 56f034f57a Initial commit 2018-03-28 03:17:01 +03:00