diff --git a/codexdht.nim b/codexdht.nim index a907dd1..a4a4a9d 100644 --- a/codexdht.nim +++ b/codexdht.nim @@ -1,5 +1,5 @@ import - ./libp2pdht/dht, - ./libp2pdht/discv5 + ./codexdht/dht, + ./codexdht/discv5 export dht, discv5 diff --git a/codexdht.nimble b/codexdht.nimble index 6ad94a8..fb9fa7e 100644 --- a/codexdht.nimble +++ b/codexdht.nimble @@ -1,6 +1,6 @@ # Package -version = "0.2.1" +version = "0.3.0" author = "Status Research & Development GmbH" description = "DHT based on the libp2p Kademlia spec" license = "MIT" @@ -56,8 +56,8 @@ task testAll, "Run DHT tests": # exec("cd nimcache; rm *.c; cd ..") # mkDir("coverage") # exec("lcov --capture --directory nimcache --output-file coverage/coverage.info") -# exec("$(which bash) -c 'shopt -s globstar; ls $(pwd)/libp2pdht/{*,**/*}.nim'") -# exec("$(which bash) -c 'shopt -s globstar; lcov --extract coverage/coverage.info $(pwd)/libp2pdht/{*,**/*}.nim --output-file coverage/coverage.f.info'") +# exec("$(which bash) -c 'shopt -s globstar; ls $(pwd)/codexdht/{*,**/*}.nim'") +# exec("$(which bash) -c 'shopt -s globstar; lcov --extract coverage/coverage.info $(pwd)/codexdht/{*,**/*}.nim --output-file coverage/coverage.f.info'") # echo "Generating HTML coverage report" # exec("genhtml coverage/coverage.f.info --output-directory coverage/report") # echo "Opening HTML coverage report in browser..." diff --git a/libp2pdht/dht.nim b/codexdht/dht.nim similarity index 100% rename from libp2pdht/dht.nim rename to codexdht/dht.nim diff --git a/libp2pdht/dht/providers_encoding.nim b/codexdht/dht/providers_encoding.nim similarity index 100% rename from libp2pdht/dht/providers_encoding.nim rename to codexdht/dht/providers_encoding.nim diff --git a/libp2pdht/dht/providers_messages.nim b/codexdht/dht/providers_messages.nim similarity index 100% rename from libp2pdht/dht/providers_messages.nim rename to codexdht/dht/providers_messages.nim diff --git a/libp2pdht/discv5.nim b/codexdht/discv5.nim similarity index 100% rename from libp2pdht/discv5.nim rename to codexdht/discv5.nim diff --git a/libp2pdht/discv5/crypto.nim b/codexdht/discv5/crypto.nim similarity index 100% rename from libp2pdht/discv5/crypto.nim rename to codexdht/discv5/crypto.nim diff --git a/libp2pdht/discv5/encoding.nim b/codexdht/discv5/encoding.nim similarity index 100% rename from libp2pdht/discv5/encoding.nim rename to codexdht/discv5/encoding.nim diff --git a/libp2pdht/discv5/messages.nim b/codexdht/discv5/messages.nim similarity index 100% rename from libp2pdht/discv5/messages.nim rename to codexdht/discv5/messages.nim diff --git a/libp2pdht/discv5/messages_encoding.nim b/codexdht/discv5/messages_encoding.nim similarity index 100% rename from libp2pdht/discv5/messages_encoding.nim rename to codexdht/discv5/messages_encoding.nim diff --git a/libp2pdht/discv5/node.nim b/codexdht/discv5/node.nim similarity index 100% rename from libp2pdht/discv5/node.nim rename to codexdht/discv5/node.nim diff --git a/libp2pdht/discv5/nodes_verification.nim b/codexdht/discv5/nodes_verification.nim similarity index 100% rename from libp2pdht/discv5/nodes_verification.nim rename to codexdht/discv5/nodes_verification.nim diff --git a/libp2pdht/discv5/protocol.nim b/codexdht/discv5/protocol.nim similarity index 100% rename from libp2pdht/discv5/protocol.nim rename to codexdht/discv5/protocol.nim diff --git a/libp2pdht/discv5/routing_table.nim b/codexdht/discv5/routing_table.nim similarity index 100% rename from libp2pdht/discv5/routing_table.nim rename to codexdht/discv5/routing_table.nim diff --git a/libp2pdht/discv5/sessions.nim b/codexdht/discv5/sessions.nim similarity index 100% rename from libp2pdht/discv5/sessions.nim rename to codexdht/discv5/sessions.nim diff --git a/libp2pdht/discv5/spr.nim b/codexdht/discv5/spr.nim similarity index 100% rename from libp2pdht/discv5/spr.nim rename to codexdht/discv5/spr.nim diff --git a/libp2pdht/discv5/transport.nim b/codexdht/discv5/transport.nim similarity index 100% rename from libp2pdht/discv5/transport.nim rename to codexdht/discv5/transport.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/crypto.nim b/codexdht/private/eth/p2p/discoveryv5/crypto.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/crypto.nim rename to codexdht/private/eth/p2p/discoveryv5/crypto.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/encoding.nim b/codexdht/private/eth/p2p/discoveryv5/encoding.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/encoding.nim rename to codexdht/private/eth/p2p/discoveryv5/encoding.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/hkdf.nim b/codexdht/private/eth/p2p/discoveryv5/hkdf.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/hkdf.nim rename to codexdht/private/eth/p2p/discoveryv5/hkdf.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/ip_vote.nim b/codexdht/private/eth/p2p/discoveryv5/ip_vote.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/ip_vote.nim rename to codexdht/private/eth/p2p/discoveryv5/ip_vote.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/lru.nim b/codexdht/private/eth/p2p/discoveryv5/lru.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/lru.nim rename to codexdht/private/eth/p2p/discoveryv5/lru.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/messages.nim b/codexdht/private/eth/p2p/discoveryv5/messages.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/messages.nim rename to codexdht/private/eth/p2p/discoveryv5/messages.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/messages_encoding.nim b/codexdht/private/eth/p2p/discoveryv5/messages_encoding.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/messages_encoding.nim rename to codexdht/private/eth/p2p/discoveryv5/messages_encoding.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/node.nim b/codexdht/private/eth/p2p/discoveryv5/node.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/node.nim rename to codexdht/private/eth/p2p/discoveryv5/node.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/nodes_verification.nim b/codexdht/private/eth/p2p/discoveryv5/nodes_verification.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/nodes_verification.nim rename to codexdht/private/eth/p2p/discoveryv5/nodes_verification.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/protocol.nim b/codexdht/private/eth/p2p/discoveryv5/protocol.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/protocol.nim rename to codexdht/private/eth/p2p/discoveryv5/protocol.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/providers.nim b/codexdht/private/eth/p2p/discoveryv5/providers.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/providers.nim rename to codexdht/private/eth/p2p/discoveryv5/providers.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/providers/cache.nim b/codexdht/private/eth/p2p/discoveryv5/providers/cache.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/providers/cache.nim rename to codexdht/private/eth/p2p/discoveryv5/providers/cache.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/providers/common.nim b/codexdht/private/eth/p2p/discoveryv5/providers/common.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/providers/common.nim rename to codexdht/private/eth/p2p/discoveryv5/providers/common.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/providers/maintenance.nim b/codexdht/private/eth/p2p/discoveryv5/providers/maintenance.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/providers/maintenance.nim rename to codexdht/private/eth/p2p/discoveryv5/providers/maintenance.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/providers/manager.nim b/codexdht/private/eth/p2p/discoveryv5/providers/manager.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/providers/manager.nim rename to codexdht/private/eth/p2p/discoveryv5/providers/manager.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/random2.nim b/codexdht/private/eth/p2p/discoveryv5/random2.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/random2.nim rename to codexdht/private/eth/p2p/discoveryv5/random2.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/routing_table.nim b/codexdht/private/eth/p2p/discoveryv5/routing_table.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/routing_table.nim rename to codexdht/private/eth/p2p/discoveryv5/routing_table.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/sessions.nim b/codexdht/private/eth/p2p/discoveryv5/sessions.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/sessions.nim rename to codexdht/private/eth/p2p/discoveryv5/sessions.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/spr.nim b/codexdht/private/eth/p2p/discoveryv5/spr.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/spr.nim rename to codexdht/private/eth/p2p/discoveryv5/spr.nim diff --git a/libp2pdht/private/eth/p2p/discoveryv5/transport.nim b/codexdht/private/eth/p2p/discoveryv5/transport.nim similarity index 100% rename from libp2pdht/private/eth/p2p/discoveryv5/transport.nim rename to codexdht/private/eth/p2p/discoveryv5/transport.nim diff --git a/tests/dht/test_helper.nim b/tests/dht/test_helper.nim index 89f5797..df1fd86 100644 --- a/tests/dht/test_helper.nim +++ b/tests/dht/test_helper.nim @@ -3,9 +3,9 @@ import chronos, libp2p/crypto/[crypto, secp], libp2p/multiaddress, - libp2pdht/discv5/[node, routing_table, spr], - libp2pdht/discv5/crypto as dhtcrypto, - libp2pdht/discv5/protocol as discv5_protocol, + codexdht/discv5/[node, routing_table, spr], + codexdht/discv5/crypto as dhtcrypto, + codexdht/discv5/protocol as discv5_protocol, stew/shims/net export net diff --git a/tests/dht/test_providermngr.nim b/tests/dht/test_providermngr.nim index 7ec742c..ea2456d 100644 --- a/tests/dht/test_providermngr.nim +++ b/tests/dht/test_providermngr.nim @@ -6,11 +6,11 @@ import pkg/asynctest import pkg/datastore import pkg/libp2p -import libp2pdht/dht -import libp2pdht/private/eth/p2p/discoveryv5/spr -import libp2pdht/private/eth/p2p/discoveryv5/providers -import libp2pdht/discv5/node -import libp2pdht/private/eth/p2p/discoveryv5/lru +import codexdht/dht +import codexdht/private/eth/p2p/discoveryv5/spr +import codexdht/private/eth/p2p/discoveryv5/providers +import codexdht/discv5/node +import codexdht/private/eth/p2p/discoveryv5/lru import ./test_helper suite "Test Providers Manager simple": diff --git a/tests/dht/test_providers.nim b/tests/dht/test_providers.nim index fecb9b9..dab5174 100644 --- a/tests/dht/test_providers.nim +++ b/tests/dht/test_providers.nim @@ -18,9 +18,9 @@ import nimcrypto, libp2p/crypto/[crypto, secp], libp2p/[multiaddress, multicodec, multihash, routing_record, signed_envelope], - libp2pdht/dht, - libp2pdht/discv5/crypto as dhtcrypto, - libp2pdht/discv5/protocol as discv5_protocol, + codexdht/dht, + codexdht/discv5/crypto as dhtcrypto, + codexdht/discv5/protocol as discv5_protocol, stew/byteutils, test_helper diff --git a/tests/discv5/test_discoveryv5.nim b/tests/discv5/test_discoveryv5.nim index ad0066d..5be5b39 100644 --- a/tests/discv5/test_discoveryv5.nim +++ b/tests/discv5/test_discoveryv5.nim @@ -5,9 +5,9 @@ import chronos, chronicles, stint, asynctest, stew/shims/net, stew/byteutils, bearssl/rand, libp2p/crypto/crypto, - libp2pdht/discv5/[transport, spr, node, routing_table, encoding, sessions, nodes_verification], - libp2pdht/discv5/crypto as dhtcrypto, - libp2pdht/discv5/protocol as discv5_protocol, + codexdht/discv5/[transport, spr, node, routing_table, encoding, sessions, nodes_verification], + codexdht/discv5/crypto as dhtcrypto, + codexdht/discv5/protocol as discv5_protocol, ../dht/test_helper suite "Discovery v5 Tests": diff --git a/tests/discv5/test_discoveryv5_encoding.nim b/tests/discv5/test_discoveryv5_encoding.nim index 3eb2380..68bf95c 100644 --- a/tests/discv5/test_discoveryv5_encoding.nim +++ b/tests/discv5/test_discoveryv5_encoding.nim @@ -6,8 +6,8 @@ import bearssl/rand, chronos, libp2p/crypto/secp, - libp2pdht/discv5/[messages, messages_encoding, encoding, spr, node, sessions], - libp2pdht/discv5/crypto, + codexdht/discv5/[messages, messages_encoding, encoding, spr, node, sessions], + codexdht/discv5/crypto, stew/byteutils, stew/shims/net, stint,