Make dht compile with new new (0.14+) nimble.
Compilation with Nimble <0.14 can't work, as
the many of the libraries on the dependency
tree are not version tagged. As we can't change
that, two paths remain:
1, use nimbus-build-system (i.e. git submodules)
2, use lock files introduced in nimble 0.14+
First was already working, this fixes second
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
It seems lockfile was generated wrong or not updated,
broken in 76bff752a2
setting it to version used in nimbus build system based build
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
initialize wait for response before sending request.
This is needed in cases where the response arrives before
moving to the next instruction, such as a directly connected
test.
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
run e.g. as
```
nim c -r -d:debug -d:chronicles_enabled=on -d:chronicles_log_level=TRACE -d:chronicles_sinks=textlines[nocolors,stdout] tests/dht/test_providers.nim >err
```
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
* track nim-libp2p's unstable branch and nim-bearssl's master branch
refactor accordingly: mainly switching from `import bearssl` to
`import bearssl/rand`, `BrHmacDrbgContext` to `HmacDrbgContext`, and related
changes
* fix ambiguous identifier
* nim 1.4 is deprecated
Co-authored-by: Michael Bradley, Jr <michaelsbradleyjr@gmail.com>
* initial providers manager implementation
* misc license update
* spelling
* rename provider tests
* add provider tests
* reexport provider manager
* only update provider record if it changed
* small bug in getProvByKey
* pass providers to both constructors
* fix records retrieval
* disable cache during tests
* avoid redefining data
* adding back tests with cache
* use `.errorOption`
* proper err msg unpacking
Closes: #2.
Libp2p supports multiple cryptographic curves, however we have currently only implented support for secp256k1.
This needs to be run with the compiler flag `libp2p_pki_schemes` set to `secp256k1`. If running the tests, this can be run like so: `nimble test —libp2p_pki_schemes=secp256k1` to put secp as the first supported crypto scheme.
This patch adds a findNode message sending the actual
target ID as in traditional Kademlia lookup. This in
contrast to the actual findNode message that send information
about the distance only, leading to more secure but slower lookups.
Having both primitives allows us to select which to use per use case.
Current naming is findNode for the distance based message and
findNodeFast for the message added in this patch.