33 Commits

Author SHA1 Message Date
kdeme
6dd820840a
Add simple auth header encode/decode test 2020-06-04 15:03:41 +02:00
kdeme
12627b34d3
Don't allow to use HandshareSecrets if auth response is invalid 2020-06-04 13:38:04 +02:00
kdeme
47602e634c
Add node id check and id-nonce-sig verification #204 2020-06-04 12:19:06 +02:00
Kim De Mey
a110f091af
Discv5 eh2 (#240)
* Discv5: More error handling improvements

- More results usage and raises pragma annotations
- Remove ENode related code and adjust Node object
- Misc.

* Add sendMessage and catch RlpError when decoding WhoAreYou

* Make the receive proc exception free

Except for `Exception` hah...

* Address review comments

* And another bunch of results and raises annotations

* Send Nodes Message also on 0 nodes and remove usage of broken require
2020-05-28 10:19:36 +02:00
kdeme
887cbba563
discv5: Address review comments 2020-05-01 22:34:26 +02:00
kdeme
74df90e16d
discv5: further prepping for results error handling 2020-04-30 00:11:03 +02:00
kdeme
3a6d4336bc
Bunch of renames to use same nomenclature as spec 2020-04-27 14:13:00 +02:00
kdeme
09a127ef1b
Pass packet as decoding result 2020-04-24 16:52:41 +02:00
kdeme
5dec5c5a9b discv5 encoding: First steps to move to result based error handling 2020-04-24 15:51:04 +02:00
Jacek Sieka
fd6caa0fdc
Rlp experimental (#227)
* rlp: remove experimental features

* avoid range library

* trie: avoid reference-unsafe bitrange type
2020-04-20 20:14:39 +02:00
Jacek Sieka
0b110f3287
Secp more refactor (#211)
* simplify some modules

* mark several modules with raises
* fix clearing of keys in auth.nim
* fix keyfile case dropping off
* fix keyfile stream storage
* uuid should be output in lowercase

* enode: simplify API
2020-04-06 18:24:15 +02:00
Jacek Sieka
ac5bbe4d3d
keys: get rid of deprecated calls (#213) 2020-04-04 18:44:01 +02:00
kdeme
a9ff761d68 For now use directly address/id instead of Node to workaround node isNil problem in edge cases 2020-03-24 16:45:15 +02:00
kdeme
55b8e3e23f Update address to UDP endpoint and delete keys on removal from DHT 2020-03-24 16:45:15 +02:00
kdeme
267a06dbe6 discv5: Pass bootstrap nodes and add deletion of nodes 2020-03-24 16:45:15 +02:00
kdeme
172173b863
Discv5: set recordSeq in whoareyou to 0 so we receive always an ENR 2020-03-10 22:44:10 +01:00
kdeme
596f148974
Discv5: Specifically handle decryption errors 2020-03-10 16:01:04 +01:00
kdeme
0d63ff4db4 (Quick)fix hashing for handshakes by adding Ports + tests 2020-02-29 14:16:27 +01:00
kdeme
6b01ada194 Add address to handshakes key 2020-02-29 14:16:27 +01:00
kdeme
1fab56f894 Introduce more constants and type aliases 2020-02-29 14:16:27 +01:00
kdeme
ad99b96e12 Drop additional handshakes with same nodeid and add timeout on handshakes 2020-02-29 14:09:12 +01:00
kdeme
fc844347a4 Don't send Whoareyou on handshake failure 2020-02-29 14:09:12 +01:00
Zahary Karadjov
e89e59aa59
enterList now returns a bool 2020-02-27 20:09:05 +02:00
Zahary Karadjov
74d0247e6b
Tweak some retry limits and timeouts 2020-02-22 20:49:14 +02:00
kdeme
3dd26e8526 Attempt to further add the discv5 wire test vectors 2020-02-20 15:09:31 +02:00
Zahary Karadjov
cca931d0b5
Reduce the use of the general Exception type and improve the exception tarcking in protocol.receive 2020-02-18 00:47:13 +02:00
kdeme
79dfe88ec8 Add Packet encodings tests 2020-02-17 22:38:56 +02:00
kdeme
5daaf73d2e Clean up logging and some exception handling 2020-02-17 22:38:56 +02:00
Zahary Karadjov
a1a6862c7c More spec compliant ENR
* Don't use signed integers in RLP
* Don't store IP addresses as var-sized ints (use fixed-sized blobs instead)
* Allow constructing ENR from ENode.Address
2020-02-12 11:58:14 +02:00
Yuriy Glukhov
3527d47cb5 Added packet encoding tests 2020-01-08 17:22:43 +02:00
Yuriy Glukhov
129710d3e4 Liveness checks 2020-01-08 17:22:43 +02:00
Yuriy Glukhov
9772fbe470 Use addresses instead of stubs as db keys 2020-01-08 17:22:43 +02:00
Yuriy Glukhov
eda6c2906c Discv5 WIP 2020-01-08 17:22:43 +02:00