Commit Graph

11 Commits

Author SHA1 Message Date
Kim De Mey 8088fe72d7
Update discv5 to use non deprecated ENR calls and simplify code (#710)
And due to avoiding an extra PublicKey.fromRaw call we get a
little performance boost also.
2024-06-27 16:18:21 +02:00
Kim De Mey d7577f59d7
Rework of ENR decoding code (#709)
- Rework to have exception raise only at rlp decoding and use
result types from then onwards
- Adjust the current API to have result versions and deprecated
the ones which had var Record + bool
- Add PublickKey to the Record object, as this allows us to skip
fromRaw calls whenever access is needed to the public key
- Add a TypedRecord.fromRecord which cannot fail and deprecate
the old one
- Some other minor clean-up & re-ordering
2024-06-27 15:15:23 +02:00
Kim De Mey 26212c881b
Use results.Opt instead of option in discv5, utp and nat (#705)
+ some other minor cleanups
2024-06-18 18:09:27 +02:00
Kim De Mey 50e71b2daa
Add async raises annotations for discv5 (#690) 2024-06-10 13:47:35 +02:00
Kim De Mey 496bcdab74
Fix chronos related deprecated warnings in discv5 and uTP (#667)
* Fix chronos related deprecated warnings in discv5

* Fix chronos related deprecated warnings in uTP code

* Improve discv5 closeWait order of events and add noCancel
2024-01-22 17:08:08 +01:00
Kim De Mey 159ae697c5
Remove last leftovers of ValidIpAddress (#664) 2024-01-19 11:15:57 +01:00
tersec ca4898e24a
switch NAT module from ValidIpAddress to IpAddress (#647)
* switch NAT module from ValidIpAddress to IpAddress

* fix dcli build

* switch discv5 from ValidIpAddress to IpAddress

* fix fuzzers build

* mostly finish nim-eth to IpAddress transition
2023-11-10 09:28:21 +03:00
Etan Kissling f133d7ab8d
fix build for `dcli` and instructions for new path (#638)
`dcli` got moved and the guide is no longer accurate. Update the paths.
Also, relative imports were incorret inside `dcli.nim`, and error when
using Nim 2.0 compiler.
2023-09-22 10:32:43 +00:00
Kim De Mey c5dd5e4115
Enable tests with also json sink and fix failures (#624)
And a few minor cleanups
2023-06-22 16:13:16 +00:00
Etan Kissling 99d980c3f6
use correct exception in `parseCmdArg` (#614)
`parseCmdArg` is expected to raise `ValueError` but for `enr.Record`,
`Node`, `PrivateKey`, and `NatConfig`, we raise `ConfigurationError`.
Change to `ValueError` instead.
2023-06-06 22:28:14 +02:00
Kim De Mey 4d55bfc9e8
Move dcli tool to a tools folder (#584) 2023-01-27 18:40:40 +01:00