diff --git a/atlas.lock b/atlas.lock index 05ff852..c97210b 100644 --- a/atlas.lock +++ b/atlas.lock @@ -1,144 +1,230 @@ { "items": { - "nim-zlib": { - "dir": "vendor/nim-zlib", + "zlib": { + "dir": "$deps/nim-zlib", "url": "https://github.com/status-im/nim-zlib", - "commit": "f34ca261efd90f118dc1647beefd2f7a69b05d93" + "commit": "a2f44bb7f65571a894227ff6fde9298a104e03a5", + "version": "0.1.0" }, - "nim-stew": { - "dir": "vendor/nim-stew", + "stew": { + "dir": "$deps/nim-stew", "url": "https://github.com/status-im/nim-stew", - "commit": "7afe7e3c070758cac1f628e4330109f3ef6fc853" + "commit": "2c2544aec13536304438be045bfdd22452741466", + "version": "0.1.0" }, - "nim-http-utils": { - "dir": "vendor/nim-http-utils", + "httputils": { + "dir": "$deps/nim-http-utils", "url": "https://github.com/status-im/nim-http-utils", - "commit": "3b491a40c60aad9e8d3407443f46f62511e63b18" + "commit": "77a59297ad635d91a6352ef48ee09c6bde0c5d86", + "version": "0.3.0" }, - "nim-chronos": { - "dir": "vendor/nim-chronos", + "chronos": { + "dir": "$deps/nim-chronos", "url": "https://github.com/status-im/nim-chronos", - "commit": "0277b65be2c7a365ac13df002fba6e172be55537" + "commit": "e15dc3b41fea95348b58f32244962c1c6df310a7", + "version": "3.2.0" }, "upraises": { - "dir": "vendor/upraises", + "dir": "$deps/upraises", "url": "https://github.com/markspanbroek/upraises", - "commit": "ff4f8108e44fba9b35cac535ab63d3927e8fd3c2" + "commit": "bc2628989b63854d980e92dadbd58f83e34b6f25", + "version": "0.1.0" }, - "nim-sqlite3-abi": { - "dir": "vendor/nim-sqlite3-abi", + "sqlite3_abi": { + "dir": "$deps/nim-sqlite3-abi", "url": "https://github.com/arnetheduck/nim-sqlite3-abi", - "commit": "362e1bd9f689ad9f5380d9d27f0705b3d4dfc7d3" + "commit": "362e1bd9f689ad9f5380d9d27f0705b3d4dfc7d3", + "version": "3.40.1.1" }, "questionable": { - "dir": "vendor/questionable", + "dir": "$deps/questionable", "url": "https://github.com/codex-storage/questionable", - "commit": "b3cf35ac450fd42c9ea83dc084f5cba2efc55da3" + "commit": "1f0afff48bf80ab1149a0957f9743f345bc14b71", + "version": "0.10.12" }, - "nim-results": { - "dir": "vendor/nim-results", - "url": "https://github.com/arnetheduck/nim-results", - "commit": "f3c666a272c69d70cb41e7245e7f6844797303ad" - }, - "nim-unittest2": { - "dir": "vendor/nim-unittest2", - "url": "https://github.com/status-im/nim-unittest2", - "commit": "b178f47527074964f76c395ad0dfc81cf118f379" - }, - "nim-websock": { - "dir": "vendor/nim-websock", + "websock": { + "dir": "$deps/nim-websock", "url": "https://github.com/status-im/nim-websock", - "commit": "2c3ae3137f3c9cb48134285bd4a47186fa51f0e8" + "commit": "f8ed9b40a5ff27ad02a3c237c4905b0924e3f982", + "version": "0.1.0" }, - "nim-secp256k1": { - "dir": "vendor/nim-secp256k1", + "secp256k1": { + "dir": "$deps/nim-secp256k1", "url": "https://github.com/status-im/nim-secp256k1", - "commit": "2acbbdcc0e63002a013fff49f015708522875832" + "commit": "7246d91c667f4cc3759fdd50339caa45a2ecd8be", + "version": "0.6.0.3.2" }, - "nim-bearssl": { - "dir": "vendor/nim-bearssl", + "bearssl": { + "dir": "$deps/nim-bearssl", "url": "https://github.com/status-im/nim-bearssl", - "commit": "99fcb3405c55b27cfffbf60f5368c55da7346f23" + "commit": "d55d3a86d7ec3ad11b244e17b3bad490bfbd076d", + "version": "0.2.1" }, - "dnsclient.nim": { - "dir": "vendor/dnsclient.nim", + "dnsclient": { + "dir": "$deps/dnsclient.nim", "url": "https://github.com/ba0f3/dnsclient.nim", - "commit": "23214235d4784d24aceed99bbfe153379ea557c8" + "commit": "23214235d4784d24aceed99bbfe153379ea557c8", + "version": "0.3.4" }, "nimcrypto": { - "dir": "vendor/nimcrypto", + "dir": "$deps/nimcrypto", "url": "https://github.com/status-im/nimcrypto", - "commit": "24e006df85927f64916e60511620583b11403178" + "commit": "24e006df85927f64916e60511620583b11403178", + "version": "0.5.4" }, - "nim-json-serialization": { - "dir": "vendor/nim-json-serialization", + "results": { + "dir": "$deps/nim-results", + "url": "https://github.com/arnetheduck/nim-results", + "commit": "113d433f48894ee8e7da3e340c8fe19ad7b9db4d", + "version": "0.4.0" + }, + "json_serialization": { + "dir": "$deps/nim-json-serialization", "url": "https://github.com/status-im/nim-json-serialization", - "commit": "bb53d49caf2a6c6cf1df365ba84af93cdcfa7aa3" + "commit": "3f1ce24ee116daedbc9c8be525e63ec03e185a28", + "version": "0.2.2" }, - "nim-testutils": { - "dir": "vendor/nim-testutils", + "testutils": { + "dir": "$deps/nim-testutils", "url": "https://github.com/status-im/nim-testutils", - "commit": "b56a5953e37fc5117bd6ea6dfa18418c5e112815" + "commit": "b56a5953e37fc5117bd6ea6dfa18418c5e112815", + "version": "0.5.0" + }, + "unittest2": { + "dir": "$deps/nim-unittest2", + "url": "https://github.com/status-im/nim-unittest2", + "commit": "262b697f38d6b6f1e7462d3b3ab81d79b894e336", + "version": "0.2.1" }, "npeg": { - "dir": "vendor/npeg", + "dir": "$deps/npeg", "url": "https://github.com/zevv/npeg", - "commit": "b15a10e388b91b898c581dbbcb6a718d46b27d2f" + "commit": "b9051a64376d277912ec7616bbb21688754160c7", + "version": "1.2.1" }, - "nim-serialization": { - "dir": "vendor/nim-serialization", + "serialization": { + "dir": "$deps/nim-serialization", "url": "https://github.com/status-im/nim-serialization", - "commit": "384eb2561ee755446cff512a8e057325848b86a7" + "commit": "4d541ec43454809904fc4c3c0a7436410ad597d2", + "version": "0.2.2" }, - "nim-faststreams": { - "dir": "vendor/nim-faststreams", + "faststreams": { + "dir": "$deps/nim-faststreams", "url": "https://github.com/status-im/nim-faststreams", - "commit": "720fc5e5c8e428d9d0af618e1e27c44b42350309" + "commit": "720fc5e5c8e428d9d0af618e1e27c44b42350309", + "version": "0.3.0" }, - "nim-datastore": { - "dir": "vendor/nim-datastore", + "datastore": { + "dir": "$deps/nim-datastore", "url": "https://github.com/codex-storage/nim-datastore", - "commit": "0cde8aeb67c59fd0ac95496dc6b5e1168d6632aa" + "commit": "cadf38db576a2cf6145188f285f042e56aad7c91", + "version": "0.0.1" }, "asynctest": { - "dir": "vendor/asynctest", - "url": "https://github.com/codex-storage/asynctest", - "commit": "fe1a34caf572b05f8bdba3b650f1871af9fce31e" + "dir": "$deps/asynctest", + "url": "https://github.com/markspanbroek/asynctest", + "commit": "c9423b198f1a7fad128396ffaaa92077a1dda869", + "version": "0.4.3" }, - "nim-stint": { - "dir": "vendor/nim-stint", + "stint": { + "dir": "$deps/nim-stint", "url": "https://github.com/status-im/nim-stint", - "commit": "86621eced1dcfb5e25903019ebcfc76ed9128ec5" + "commit": "711cda4456c32d3ba3c6c4524135b3453dffeb9c", + "version": "2.0.0" }, - "nim-metrics": { - "dir": "vendor/nim-metrics", + "metrics": { + "dir": "$deps/nim-metrics", "url": "https://github.com/status-im/nim-metrics", - "commit": "6142e433fc8ea9b73379770a788017ac528d46ff" + "commit": "51f1227d0fd04ce84b1ef784b11280cb7875348c", + "version": "0.0.1" }, - "nim-libp2p": { - "dir": "vendor/nim-libp2p", + "libp2p": { + "dir": "$deps/nim-libp2p", "url": "https://github.com/status-im/nim-libp2p", - "commit": "440461b24b9e66542b34d26a0b908c17f6549d05" + "commit": "e3c967ad1939fb33b8e13759037d193734acd202", + "version": "1.1.0" }, - "nim-chronicles": { - "dir": "vendor/nim-chronicles", + "chronicles": { + "dir": "$deps/nim-chronicles", "url": "https://github.com/status-im/nim-chronicles", - "commit": "c9c8e58ec3f89b655a046c485f622f9021c68b61" + "commit": "ccbb7566d1a06bfc1ec42dd8da74a47f1d3b3f4b", + "version": "0.10.3" }, - "nim-protobuf-serialization": { - "dir": "vendor/nim-protobuf-serialization", + "protobuf_serialization": { + "dir": "$deps/nim-protobuf-serialization", "url": "https://github.com/status-im/nim-protobuf-serialization", - "commit": "28214b3e40c755a9886d2ec8f261ec48fbb6bec6" + "commit": "5a31137a82c2b6a989c9ed979bb636c7a49f570e", + "version": "0.3.0" } }, - "nimcfg": "############# begin Atlas config section ##########\n--noNimblePath\n--path:\"vendor/nim-secp256k1\"\n--path:\"vendor/nim-protobuf-serialization\"\n--path:\"vendor/nimcrypto\"\n--path:\"vendor/nim-bearssl\"\n--path:\"vendor/nim-chronicles\"\n--path:\"vendor/nim-chronos\"\n--path:\"vendor/nim-libp2p\"\n--path:\"vendor/nim-metrics\"\n--path:\"vendor/nim-stew\"\n--path:\"vendor/nim-stint\"\n--path:\"vendor/asynctest\"\n--path:\"vendor/nim-datastore\"\n--path:\"vendor/questionable\"\n--path:\"vendor/nim-faststreams\"\n--path:\"vendor/nim-serialization\"\n--path:\"vendor/npeg/src\"\n--path:\"vendor/nim-unittest2\"\n--path:\"vendor/nim-testutils\"\n--path:\"vendor/nim-json-serialization\"\n--path:\"vendor/nim-http-utils\"\n--path:\"vendor/dnsclient.nim/src\"\n--path:\"vendor/nim-websock\"\n--path:\"vendor/nim-results\"\n--path:\"vendor/nim-sqlite3-abi\"\n--path:\"vendor/upraises\"\n--path:\"vendor/nim-zlib\"\n############# end Atlas config section ##########\n", + "nimcfg": [ + "############# begin Atlas config section ##########", + "--noNimblePath", + "--path:\"vendor/nim-unittest2\"", + "--path:\"vendor/nim-secp256k1\"", + "--path:\"vendor/nim-protobuf-serialization\"", + "--path:\"vendor/nimcrypto\"", + "--path:\"vendor/nim-bearssl\"", + "--path:\"vendor/nim-chronicles\"", + "--path:\"vendor/nim-chronos\"", + "--path:\"vendor/nim-libp2p\"", + "--path:\"vendor/nim-metrics\"", + "--path:\"vendor/nim-stew\"", + "--path:\"vendor/nim-stint\"", + "--path:\"vendor/asynctest\"", + "--path:\"vendor/nim-datastore\"", + "--path:\"vendor/questionable\"", + "--path:\"vendor/nim-faststreams\"", + "--path:\"vendor/nim-serialization\"", + "--path:\"vendor/npeg/src\"", + "--path:\"vendor/nim-testutils\"", + "--path:\"vendor/nim-json-serialization\"", + "--path:\"vendor/nim-results\"", + "--path:\"vendor/nim-http-utils\"", + "--path:\"vendor/dnsclient.nim/src\"", + "--path:\"vendor/nim-websock\"", + "--path:\"vendor/nim-sqlite3-abi\"", + "--path:\"vendor/upraises\"", + "--path:\"vendor/nim-zlib\"", + "############# end Atlas config section ##########", + "" + ], "nimbleFile": { - "filename": "", - "content": "# Package\n\nversion = \"0.3.2\"\nauthor = \"Status Research & Development GmbH\"\ndescription = \"DHT based on the libp2p Kademlia spec\"\nlicense = \"MIT\"\nskipDirs = @[\"tests\"]\n\n\n# Dependencies\nrequires \"nim >= 1.2.0\"\nrequires \"secp256k1#2acbbdcc0e63002a013fff49f015708522875832\" # >= 0.5.2 & < 0.6.0\nrequires \"protobuf_serialization\" # >= 0.2.0 & < 0.3.0\nrequires \"nimcrypto == 0.5.4\"\nrequires \"bearssl#head\"\nrequires \"chronicles >= 0.10.2 & < 0.11.0\"\nrequires \"chronos == 3.2.0\" # >= 3.0.11 & < 3.1.0\nrequires \"libp2p#unstable\"\nrequires \"metrics\"\nrequires \"stew#head\"\nrequires \"stint\"\nrequires \"asynctest >= 0.3.1 & < 0.4.0\"\nrequires \"https://github.com/codex-storage/nim-datastore#head\"\nrequires \"questionable\"\n\ninclude \"build.nims\"\n\n" + "filename": "codexdht.nimble", + "content": [ + "# Package", + "", + "version = \"0.4.0\"", + "author = \"Status Research & Development GmbH\"", + "description = \"DHT based on Eth discv5 implementation\"", + "license = \"MIT\"", + "skipDirs = @[\"tests\"]", + "installFiles = @[\"build.nims\"]", + "", + "# Dependencies", + "requires \"nim >= 1.6.18\"", + "requires \"unittest2 <= 0.0.9\"", + "requires \"secp256k1#2acbbdcc0e63002a013fff49f015708522875832\" # >= 0.5.2 & < 0.6.0", + "requires \"protobuf_serialization\" # >= 0.2.0 & < 0.3.0", + "requires \"nimcrypto >= 0.5.4\"", + "requires \"bearssl#head\"", + "requires \"chronicles >= 0.10.2 & < 0.11.0\"", + "requires \"chronos#e15dc3b41fea95348b58f32244962c1c6df310a7\" # Change to >= 4.0.0 & < 5.0.0 when available", + "requires \"libp2p#unstable\"", + "requires \"metrics\"", + "requires \"stew#head\"", + "requires \"stint\"", + "requires \"asynctest >= 0.4.3 & < 0.5.0\"", + "requires \"https://github.com/codex-storage/nim-datastore#head\"", + "requires \"questionable\"", + "", + "include \"build.nims\"", + " " + ] }, - "hostOS": "macosx", - "hostCPU": "arm64", - "nimVersion": "1.6.14", - "gccVersion": "", + "hostOS": "linux", + "hostCPU": "amd64", + "nimVersion": "1.6.18 a749a8b742bd0a4272c26a65517275db4720e58a", + "gccVersion": "11.4.0", "clangVersion": "" } \ No newline at end of file diff --git a/codexdht.nimble b/codexdht.nimble index 422f5c2..bee2094 100644 --- a/codexdht.nimble +++ b/codexdht.nimble @@ -8,19 +8,21 @@ skipDirs = @["tests"] installFiles = @["build.nims"] # Dependencies -requires "nim >= 1.2.0" +requires "nim >= 1.6.18" +requires "unittest2 <= 0.0.9" requires "secp256k1#2acbbdcc0e63002a013fff49f015708522875832" # >= 0.5.2 & < 0.6.0 requires "protobuf_serialization" # >= 0.2.0 & < 0.3.0 -requires "nimcrypto == 0.5.4" +requires "nimcrypto >= 0.5.4" requires "bearssl#head" requires "chronicles >= 0.10.2 & < 0.11.0" -requires "chronos == 3.2.0" # >= 3.0.11 & < 3.1.0 +requires "chronos#e15dc3b41fea95348b58f32244962c1c6df310a7" # Change to >= 4.0.0 & < 5.0.0 when available requires "libp2p#unstable" requires "metrics" requires "stew#head" requires "stint" -requires "asynctest >= 0.3.1 & < 0.4.0" +requires "asynctest >= 0.4.3 & < 0.5.0" requires "https://github.com/codex-storage/nim-datastore#head" requires "questionable" include "build.nims" + \ No newline at end of file diff --git a/codexdht/private/eth/p2p/discoveryv5/transport.nim b/codexdht/private/eth/p2p/discoveryv5/transport.nim index 461335c..418b593 100644 --- a/codexdht/private/eth/p2p/discoveryv5/transport.nim +++ b/codexdht/private/eth/p2p/discoveryv5/transport.nim @@ -35,23 +35,25 @@ type node: Node message: seq[byte] -proc sendToA(t: Transport, a: Address, data: seq[byte]) = +proc sendToA(t: Transport, a: Address, msg: seq[byte]) = trace "Send packet", myport = t.bindAddress.port, address = a let ta = initTAddress(a.ip, a.port) - let f = t.transp.sendTo(ta, data) - f.callback = proc(data: pointer) {.gcsafe.} = - if f.failed: - # Could be `TransportUseClosedError` in case the transport is already - # closed, or could be `TransportOsError` in case of a socket error. - # In the latter case this would probably mostly occur if the network - # interface underneath gets disconnected or similar. - # TODO: Should this kind of error be propagated upwards? Probably, but - # it should not stop the process as that would reset the discovery - # progress in case there is even a small window of no connection. - # One case that needs this error available upwards is when revalidating - # nodes. Else the revalidation might end up clearing the routing tabl - # because of ping failures due to own network connection failure. - warn "Discovery send failed", msg = f.readError.msg + let f = t.transp.sendTo(ta, msg) + f.addCallback( + proc(data: pointer) = + if f.failed: + # Could be `TransportUseClosedError` in case the transport is already + # closed, or could be `TransportOsError` in case of a socket error. + # In the latter case this would probably mostly occur if the network + # interface underneath gets disconnected or similar. + # TODO: Should this kind of error be propagated upwards? Probably, but + # it should not stop the process as that would reset the discovery + # progress in case there is even a small window of no connection. + # One case that needs this error available upwards is when revalidating + # nodes. Else the revalidation might end up clearing the routing tabl + # because of ping failures due to own network connection failure. + warn "Discovery send failed", msg = f.readError.msg + ) proc send(t: Transport, n: Node, data: seq[byte]) = doAssert(n.address.isSome()) @@ -138,6 +140,7 @@ proc sendPending(t:Transport, toNode: Node): t.registerRequest(toNode, message, nonce) t.send(toNode, data) t.pendingRequestsByNode.del(toNode.id) + proc receive*(t: Transport, a: Address, packet: openArray[byte]) = let decoded = t.codec.decodePacket(a, packet) if decoded.isOk: @@ -215,11 +218,12 @@ proc processClient[T](transp: DatagramTransport, raddr: TransportAddress): let t = getUserData[Transport[T]](transp) # TODO: should we use `peekMessage()` to avoid allocation? - let buf = try: transp.getMessage() - except TransportOsError as e: - # This is likely to be local network connection issues. - warn "Transport getMessage", exception = e.name, msg = e.msg - return + let buf = try: + transp.getMessage() + except TransportOsError as e: + # This is likely to be local network connection issues. + warn "Transport getMessage", exception = e.name, msg = e.msg + return let ip = try: raddr.address() except ValueError as e: diff --git a/nimble.lock b/nimble.lock index 6fccf9a..1bc1879 100644 --- a/nimble.lock +++ b/nimble.lock @@ -1,67 +1,135 @@ { + "version": 2, "packages": { "nim": { - "version": "1.6.14", - "vcsRevision": "71ba2e7f3c5815d956b1ae0341b0743242b8fec6", + "version": "1.6.18", + "vcsRevision": "a749a8b742bd0a4272c26a65517275db4720e58a", "url": "https://github.com/nim-lang/Nim.git", "downloadMethod": "git", "dependencies": [], "checksums": { - "sha1": "f9ce6fa986a4e75514fe26d4c773789b8897eb18" + "sha1": "58115cfda490735d846a2116ab53e814bb5559d3" } }, - "zlib": { - "version": "0.1.0", - "vcsRevision": "f34ca261efd90f118dc1647beefd2f7a69b05d93", - "url": "https://github.com/status-im/nim-zlib", + "asynctest": { + "version": "0.4.3", + "vcsRevision": "9f31323a5f38bf9d7402676f8171aceea45fa091", + "url": "https://github.com/markspanbroek/asynctest", "downloadMethod": "git", - "dependencies": [ - "stew" - ], + "dependencies": [], "checksums": { - "sha1": "bffa9edcea9c879d827ec64a44d342dafd04ce7a" + "sha1": "55d18b230dd63a1bebefed235aceee6e986b9193" + } + }, + "results": { + "version": "0.4.0", + "vcsRevision": "113d433f48894ee8e7da3e340c8fe19ad7b9db4d", + "url": "https://github.com/arnetheduck/nim-results", + "downloadMethod": "git", + "dependencies": [], + "checksums": { + "sha1": "bb03f4dd49b66ba6973257ae1fc121756704b0b1" + } + }, + "unittest2": { + "version": "0.0.9", + "vcsRevision": "299bc9a5741f1cd34e5014187e66d904b2f00b37", + "url": "https://github.com/status-im/nim-unittest2", + "downloadMethod": "git", + "dependencies": [], + "checksums": { + "sha1": "2f316e59b1c61a6a51d0c1bfa8b4fea24a7c60ea" } }, "stew": { "version": "0.1.0", - "vcsRevision": "7afe7e3c070758cac1f628e4330109f3ef6fc853", + "vcsRevision": "2c2544aec13536304438be045bfdd22452741466", "url": "https://github.com/status-im/nim-stew", "downloadMethod": "git", "dependencies": [ - "results" + "results", + "unittest2" ], "checksums": { - "sha1": "00ced0b61233f6c57d50bbda170fee644ccc2934" + "sha1": "0d3c4f15a4cff934ec30e5b2d5fe590922839a4e" + } + }, + "faststreams": { + "version": "0.3.0", + "vcsRevision": "720fc5e5c8e428d9d0af618e1e27c44b42350309", + "url": "https://github.com/status-im/nim-faststreams", + "downloadMethod": "git", + "dependencies": [ + "stew", + "unittest2" + ], + "checksums": { + "sha1": "ab178ba25970b95d953434b5d86b4d60396ccb64" + } + }, + "serialization": { + "version": "0.2.2", + "vcsRevision": "4d541ec43454809904fc4c3c0a7436410ad597d2", + "url": "https://github.com/status-im/nim-serialization", + "downloadMethod": "git", + "dependencies": [ + "faststreams", + "unittest2", + "stew" + ], + "checksums": { + "sha1": "1dcdb29f17d0aff295e7e57edf530b1e16fb6c59" + } + }, + "bearssl": { + "version": "0.2.1", + "vcsRevision": "d55d3a86d7ec3ad11b244e17b3bad490bfbd076d", + "url": "https://github.com/status-im/nim-bearssl", + "downloadMethod": "git", + "dependencies": [ + "unittest2" + ], + "checksums": { + "sha1": "5327c983483c4dd465347c6b8a974239c7c6c612" } }, "httputils": { "version": "0.3.0", - "vcsRevision": "3b491a40c60aad9e8d3407443f46f62511e63b18", + "vcsRevision": "77a59297ad635d91a6352ef48ee09c6bde0c5d86", "url": "https://github.com/status-im/nim-http-utils", "downloadMethod": "git", - "dependencies": [], + "dependencies": [ + "stew", + "unittest2" + ], "checksums": { - "sha1": "1331f33585eda05d1e50385fa7871c3bf2a449d7" + "sha1": "f53480dd7ed0ac9b3ca7972f8b5e0f1862ce99ac" } }, "chronos": { "version": "3.2.0", - "vcsRevision": "0277b65be2c7a365ac13df002fba6e172be55537", + "vcsRevision": "c41599a6d6d8b11c729032bf8913e06f4171e0fb", "url": "https://github.com/status-im/nim-chronos", "downloadMethod": "git", - "dependencies": [], + "dependencies": [ + "results", + "stew", + "bearssl", + "httputils", + "unittest2" + ], "checksums": { - "sha1": "78a41db7fb05b937196d4fa2f1e3fb4353b36a07" + "sha1": "41227a7f20f19cbc6f343c9cae86861f81b7a7d0" } }, - "upraises": { - "version": "0.1.0", - "vcsRevision": "ff4f8108e44fba9b35cac535ab63d3927e8fd3c2", - "url": "https://github.com/markspanbroek/upraises", + "questionable": { + "version": "0.10.12", + "vcsRevision": "2dd6b6b220f9f14a1231f6cafdf24f012bcc8414", + "url": "https://github.com/markspanbroek/questionable", "downloadMethod": "git", "dependencies": [], "checksums": { - "sha1": "a0243c8039e12d547dbb2e9c73789c16bb8bc956" + "sha1": "3860fae4394990982d878182f3d3931b8fcb5a10" } }, "sqlite3_abi": { @@ -74,50 +142,110 @@ "sha1": "8e91db8156a82383d9c48f53b33e48f4e93077b1" } }, - "questionable": { - "version": "0.10.10", - "vcsRevision": "b3cf35ac450fd42c9ea83dc084f5cba2efc55da3", - "url": "https://github.com/codex-storage/questionable", + "upraises": { + "version": "0.1.0", + "vcsRevision": "d9f268db1021959fe0f2c7a5e49fba741f9932a0", + "url": "https://github.com/markspanbroek/upraises", "downloadMethod": "git", "dependencies": [], "checksums": { - "sha1": "8bb23a05d7f21619010471aa009e27d3fa73d93a" + "sha1": "176234f808b44a0be763df706ed634d6e8df17bb" } }, - "results": { - "version": "0.4.0", - "vcsRevision": "f3c666a272c69d70cb41e7245e7f6844797303ad", - "url": "https://github.com/arnetheduck/nim-results", + "datastore": { + "version": "0.0.1", + "vcsRevision": "cadf38db576a2cf6145188f285f042e56aad7c91", + "url": "https://github.com/codex-storage/nim-datastore", "downloadMethod": "git", - "dependencies": [], + "dependencies": [ + "asynctest", + "chronos", + "questionable", + "sqlite3_abi", + "stew", + "unittest2", + "upraises" + ], "checksums": { - "sha1": "51e08ca9524db98dc909fb39192272cc2b5451c7" + "sha1": "5b5bc0576f7d0565bb624a4ae7ad2717805b6849" } }, - "unittest2": { - "version": "0.0.7", - "vcsRevision": "b178f47527074964f76c395ad0dfc81cf118f379", - "url": "https://github.com/status-im/nim-unittest2", + "testutils": { + "version": "0.5.0", + "vcsRevision": "dfc4c1b39f9ded9baf6365014de2b4bfb4dafc34", + "url": "https://github.com/status-im/nim-testutils", + "downloadMethod": "git", + "dependencies": [ + "unittest2" + ], + "checksums": { + "sha1": "756d0757c4dd06a068f9d38c7f238576ba5ee897" + } + }, + "json_serialization": { + "version": "0.2.2", + "vcsRevision": "3f1ce24ee116daedbc9c8be525e63ec03e185a28", + "url": "https://github.com/status-im/nim-json-serialization", + "downloadMethod": "git", + "dependencies": [ + "serialization", + "stew" + ], + "checksums": { + "sha1": "da0d38b775f222703784b273225fe89267430482" + } + }, + "chronicles": { + "version": "0.10.3", + "vcsRevision": "32ac8679680ea699f7dbc046e8e0131cac97d41a", + "url": "https://github.com/status-im/nim-chronicles", + "downloadMethod": "git", + "dependencies": [ + "testutils", + "json_serialization" + ], + "checksums": { + "sha1": "79f09526d4d9b9196dd2f6a75310d71a890c4f88" + } + }, + "nimcrypto": { + "version": "0.6.0", + "vcsRevision": "a079df92424968d46a6ac258299ce9380aa153f2", + "url": "https://github.com/cheatfate/nimcrypto", "downloadMethod": "git", "dependencies": [], "checksums": { - "sha1": "b6d4a5cbe28b43c166d6442ba6804aafd4abe368" + "sha1": "be9a4654dd5839b97f39d5060d98f18ba868623c" + } + }, + "zlib": { + "version": "0.1.0", + "vcsRevision": "a2f44bb7f65571a894227ff6fde9298a104e03a5", + "url": "https://github.com/status-im/nim-zlib", + "downloadMethod": "git", + "dependencies": [ + "stew" + ], + "checksums": { + "sha1": "edbf76ebdecb63d302d1883fe4b23b2eb0608cb7" } }, "websock": { "version": "0.1.0", - "vcsRevision": "2c3ae3137f3c9cb48134285bd4a47186fa51f0e8", + "vcsRevision": "f8ed9b40a5ff27ad02a3c237c4905b0924e3f982", "url": "https://github.com/status-im/nim-websock", "downloadMethod": "git", "dependencies": [ - "httputils", - "stew", "chronos", + "httputils", "chronicles", + "stew", + "nimcrypto", + "bearssl", "zlib" ], "checksums": { - "sha1": "6ea200c4a34315a3c8fd3e63db991546144fbd2c" + "sha1": "94f836ae589056b2deb04bdfdcd614fff80adaf5" } }, "secp256k1": { @@ -125,21 +253,14 @@ "vcsRevision": "2acbbdcc0e63002a013fff49f015708522875832", "url": "https://github.com/status-im/nim-secp256k1", "downloadMethod": "git", - "dependencies": [], + "dependencies": [ + "stew", + "nimcrypto" + ], "checksums": { "sha1": "146818431dec16ededb951f42fc36832949bcc8f" } }, - "bearssl": { - "version": "0.2.0", - "vcsRevision": "99fcb3405c55b27cfffbf60f5368c55da7346f23", - "url": "https://github.com/status-im/nim-bearssl", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "919dc7c8b6f5e774932b211574eb9c5886f29cc2" - } - }, "dnsclient": { "version": "0.3.4", "vcsRevision": "23214235d4784d24aceed99bbfe153379ea557c8", @@ -150,161 +271,77 @@ "sha1": "65262c7e533ff49d6aca5539da4bc6c6ce132f40" } }, - "nimcrypto": { - "version": "0.5.4", - "vcsRevision": "24e006df85927f64916e60511620583b11403178", - "url": "https://github.com/status-im/nimcrypto", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "a4db2105de265930f1578bb7957f49fa39b10d9b" - } - }, - "json_serialization": { - "version": "0.1.5", - "vcsRevision": "bb53d49caf2a6c6cf1df365ba84af93cdcfa7aa3", - "url": "https://github.com/status-im/nim-json-serialization", - "downloadMethod": "git", - "dependencies": [ - "serialization" - ], - "checksums": { - "sha1": "a3369eafda12e4aa57215019b4e27ac536c909ee" - } - }, - "testutils": { - "version": "0.5.0", - "vcsRevision": "b56a5953e37fc5117bd6ea6dfa18418c5e112815", - "url": "https://github.com/status-im/nim-testutils", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "5969947aac865bacf9487b5fb5c33e4a59463f0f" - } - }, "npeg": { - "version": "1.2.1", - "vcsRevision": "b15a10e388b91b898c581dbbcb6a718d46b27d2f", + "version": "1.2.0", + "vcsRevision": "22449099d92d8bbd535fcd950287274c8d11daed", "url": "https://github.com/zevv/npeg", "downloadMethod": "git", "dependencies": [], "checksums": { - "sha1": "6a413c727f23ea913421753a13bc394b148f74a7" - } - }, - "serialization": { - "version": "0.2.0", - "vcsRevision": "384eb2561ee755446cff512a8e057325848b86a7", - "url": "https://github.com/status-im/nim-serialization", - "downloadMethod": "git", - "dependencies": [ - "faststreams" - ], - "checksums": { - "sha1": "feef734e39589686712b052286ed5c947cbaa380" - } - }, - "faststreams": { - "version": "0.3.0", - "vcsRevision": "720fc5e5c8e428d9d0af618e1e27c44b42350309", - "url": "https://github.com/status-im/nim-faststreams", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "ab178ba25970b95d953434b5d86b4d60396ccb64" - } - }, - "datastore": { - "version": "0.0.1", - "vcsRevision": "0cde8aeb67c59fd0ac95496dc6b5e1168d6632aa", - "url": "https://github.com/codex-storage/nim-datastore", - "downloadMethod": "git", - "dependencies": [ - "questionable", - "asynctest", - "upraises", - "sqlite3_abi" - ], - "checksums": { - "sha1": "2c03bb47de97962d2a64be1ed0a8161cd9d65159" - } - }, - "asynctest": { - "version": "0.4.1", - "vcsRevision": "fe1a34caf572b05f8bdba3b650f1871af9fce31e", - "url": "https://github.com/codex-storage/asynctest", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "1203c9fce32d96e8ed71190aea1b314cfba915ba" + "sha1": "bfe84b7b89a4f92e9ca6d9be8256bdda032e556b" } }, "stint": { - "version": "0.0.1", - "vcsRevision": "86621eced1dcfb5e25903019ebcfc76ed9128ec5", + "version": "2.0.0", + "vcsRevision": "711cda4456c32d3ba3c6c4524135b3453dffeb9c", "url": "https://github.com/status-im/nim-stint", "downloadMethod": "git", - "dependencies": [], + "dependencies": [ + "stew" + ], "checksums": { - "sha1": "6b4a6fdd317202b7c092dc32b74a6573f81cca62" + "sha1": "432d8fa883c807932fc78ecd33fc944637e2d328" } }, "metrics": { "version": "0.0.1", - "vcsRevision": "6142e433fc8ea9b73379770a788017ac528d46ff", + "vcsRevision": "51f1227d0fd04ce84b1ef784b11280cb7875348c", "url": "https://github.com/status-im/nim-metrics", "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "16ba266012d32d49631ca00add8e4698343758e0" - } - }, - "libp2p": { - "version": "1.1.0", - "vcsRevision": "440461b24b9e66542b34d26a0b908c17f6549d05", - "url": "https://github.com/vacp2p/nim-libp2p", - "downloadMethod": "git", "dependencies": [ - "metrics", - "unittest2", - "nimcrypto", - "bearssl", - "websock", - "dnsclient", - "secp256k1", - "chronicles" + "chronos" ], "checksums": { - "sha1": "f68a38d5704eae32f196254b1e46d853273752bb" - } - }, - "chronicles": { - "version": "0.10.3", - "vcsRevision": "c9c8e58ec3f89b655a046c485f622f9021c68b61", - "url": "https://github.com/status-im/nim-chronicles", - "downloadMethod": "git", - "dependencies": [ - "testutils", - "json_serialization" - ], - "checksums": { - "sha1": "03bc6acab0af1f362fa3323399804e16de1d98f1" + "sha1": "948aaca1763c838a7752251bab9a8bcfda66acfe" } }, "protobuf_serialization": { "version": "0.3.0", - "vcsRevision": "28214b3e40c755a9886d2ec8f261ec48fbb6bec6", + "vcsRevision": "5a31137a82c2b6a989c9ed979bb636c7a49f570e", "url": "https://github.com/status-im/nim-protobuf-serialization", "downloadMethod": "git", "dependencies": [ + "stew", "faststreams", "serialization", - "npeg" + "npeg", + "unittest2" ], "checksums": { - "sha1": "86e064ec560c1241453d2cd8f82b36b61a8a90e0" + "sha1": "ed8270a5f874af35c5e9c04b50020c8a27ba61f5" + } + }, + "libp2p": { + "version": "1.1.0", + "vcsRevision": "e3c967ad1939fb33b8e13759037d193734acd202", + "url": "https://github.com/status-im/nim-libp2p", + "downloadMethod": "git", + "dependencies": [ + "nimcrypto", + "dnsclient", + "bearssl", + "chronicles", + "chronos", + "metrics", + "secp256k1", + "stew", + "websock", + "unittest2" + ], + "checksums": { + "sha1": "fbc9aef1a5d8e9cc79fed0328266eacc0339de47" } } }, - "version": 1 -} \ No newline at end of file + "tasks": {} +} diff --git a/tests/discv5/test_discoveryv5.nim b/tests/discv5/test_discoveryv5.nim index 34aeeb1..771f975 100644 --- a/tests/discv5/test_discoveryv5.nim +++ b/tests/discv5/test_discoveryv5.nim @@ -287,7 +287,7 @@ suite "Discovery v5 Tests": await mainNode.closeWait() await testNode.closeWait() - proc testLookupTargets(fast: bool = false) {.async.} = + proc testLookupTargets(fast: bool = false) {.async: (raises: [Exception]).} = const nodeCount = 17 diff --git a/vendor/urls.rules b/vendor/urls.rules new file mode 100644 index 0000000..7636ff3 --- /dev/null +++ b/vendor/urls.rules @@ -0,0 +1,8 @@ +https://github.com/status-im/nim-libp2p-dht.git -> https://github.com/codex-storage/nim-codex-dht.git +https://github.com/markspanbroek/questionable -> https://github.com/codex-storage/questionable +https://github.com/status-im/questionable -> https://github.com/codex-storage/questionable +https://github.com/status-im/asynctest -> https://github.com/codex-storage/asynctest +https://github.com/status-im/nim-datastore -> https://github.com/codex-storage/nim-datastore +https://github.com/cheatfate/nimcrypto -> https://github.com/status-im/nimcrypto +protobufserialization -> protobuf_serialization +protobufserialization -> https://github.com/status-im/nim-protobuf-serialization