Commit Graph

27 Commits

Author SHA1 Message Date
kdeme 3bbe757fe3
Add record size check on init + add insertFieldPair call + tests 2020-07-07 17:19:15 +02:00
Jacek Sieka 484fbcab1b
use bearssl rng throughout (#265)
* use bearssl rng throughout

* seeder can fail

* imports and exports

* modules, sigh

* one more try

* move var

* even fewer thread vars

* remove out-of-date genrated files
2020-07-07 10:56:26 +02:00
Jacek Sieka 61feae0f21
secp: requiresInit updates (#258)
* secp: requiresInit updates

* fixup!

* clean up mapconverts
2020-06-22 18:07:48 +02:00
Kim De Mey 225a9ad41c
Add predicate filter option for randomNodes (#251)
* Add predicate filter option for randomNodes

* Further ValidIpAddress fixes

* Add gcsafe/noSideEffect and add test case
2020-06-11 21:24:52 +02:00
Kim De Mey 1c77cc1d3d
Fix discovery after introduction of ValidIpAddress (#248) 2020-06-09 11:09:35 +02:00
Zahary Karadjov 4e31a86533
IpAddress -> ValidIpAddress 2020-06-05 19:35:43 +03: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
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
Zahary Karadjov 6513cd9eff
Allow application-supplied ENR fields in discv5 2020-04-15 05:32:52 +03: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 65bed1ae94 discv5: allow creation of node without external ip 2020-03-30 13:32:15 +02:00
kdeme c3f23e5912 Minor adjustments to store bootnode records + deletion test 2020-03-24 16:45:15 +02:00
kdeme 713f2e3bff Add getNode and tests for findNode and getNode 2020-03-24 16:45:15 +02:00
kdeme b951ec45dc
Address review comments from Enterlist PR 2020-03-01 11:46:38 +01:00
Zahary Karadjov e89e59aa59
`enterList` now returns a bool 2020-02-27 20:09:05 +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
Zahary Karadjov 7b18d6e642 Oops, copying and pasting code is evil 2020-02-12 11:58:14 +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 5795054dbf Per @kdeme's comments. Limit ENR size, fix rlp len check 2020-01-08 17:22:43 +02:00
Zahary Karadjov 988d743c9a Introduce enr.TypedRecord that can replace enr.Record in the future 2020-01-08 17:22:43 +02:00
Zahary Karadjov 54bb1adac9 Export some private APIs needed in nim-beacon-node 2020-01-08 17:22:43 +02:00
Yuriy Glukhov eda6c2906c Discv5 WIP 2020-01-08 17:22:43 +02:00
Zahary Karadjov edd674662a Handle missing keys in enr.Record.get() 2020-01-08 17:22:43 +02:00
Yuriy Glukhov 992aeecd29 ENR parsing and serialization 2020-01-08 17:22:43 +02:00