diff --git a/library/storage_thread_requests/requests/node_debug_request.nim b/library/storage_thread_requests/requests/node_debug_request.nim index a60b34bf..c8f9d95a 100644 --- a/library/storage_thread_requests/requests/node_debug_request.nim +++ b/library/storage_thread_requests/requests/node_debug_request.nim @@ -5,7 +5,6 @@ ## The PEER type is available only with storage_enable_api_debug_peers flag. ## It will return info about a specific peer if available. -import std/[options] import chronos import chronicles import codexdht/discv5/spr diff --git a/library/storage_thread_requests/requests/node_lifecycle_request.nim b/library/storage_thread_requests/requests/node_lifecycle_request.nim index cccfd3fb..7856e00f 100644 --- a/library/storage_thread_requests/requests/node_lifecycle_request.nim +++ b/library/storage_thread_requests/requests/node_lifecycle_request.nim @@ -3,7 +3,7 @@ ## START_NODE: start the provided Logos Storage node. ## STOP_NODE: stop the provided Logos Storage node. -import std/[options, json, strutils, net, os] +import std/[options, strutils, net, os] import codexdht/discv5/spr import std/parseutils import contractabi/address diff --git a/library/storage_thread_requests/storage_thread_request.nim b/library/storage_thread_requests/storage_thread_request.nim index c5aa1728..52b6bf33 100644 --- a/library/storage_thread_requests/storage_thread_request.nim +++ b/library/storage_thread_requests/storage_thread_request.nim @@ -2,7 +2,6 @@ ## The requests are created by the main thread and processed by ## the Logos Storage Thread. -import std/json import results import chronos import ../ffi_types diff --git a/storage/blockexchange/network/network.nim b/storage/blockexchange/network/network.nim index 2a5e326b..4f070c97 100644 --- a/storage/blockexchange/network/network.nim +++ b/storage/blockexchange/network/network.nim @@ -324,8 +324,15 @@ proc new*( ## Create a new BlockExcNetwork instance ## + # libp2p now requires a non-nil handler at construction; the real one is set + # by self.init() below. This nullHander only exists until then. + proc nullHander( + conn: Connection, proto: string + ): Future[void] {.async: (raises: [CancelledError]).} = + discard + let self = lp_protocol.new( - BlockExcNetwork, @[Codec], nil, maxIncomingStreamsTotal = maxInflight + BlockExcNetwork, @[Codec], nullHander, maxIncomingStreamsTotal = maxInflight ) self.switch = switch self.getConn = connProvider diff --git a/storage/logutils.nim b/storage/logutils.nim index ebf41fd1..cbf41916 100644 --- a/storage/logutils.nim +++ b/storage/logutils.nim @@ -94,7 +94,7 @@ import std/typetraits import pkg/chronicles except toJson, `%` import json_serialization/writer as json_serialization_writer from pkg/chronos import TransportAddress -from pkg/libp2p import Cid, MultiAddress, `$` +from pkg/libp2p import Cid, MultiAddress, SignedPeerRecord, `$` import pkg/questionable import pkg/questionable/results import ./utils/json except formatIt # TODO: remove exception? @@ -248,6 +248,8 @@ formatIt(UInt256): $it formatIt(MultiAddress): $it +formatIt(SignedPeerRecord): + $it formatIt(LogFormat.textLines, array[32, byte]): it.short0xHexLog formatIt(LogFormat.json, array[32, byte]): diff --git a/storage/storage.nim b/storage/storage.nim index 6ef0bd47..398a98ba 100644 --- a/storage/storage.nim +++ b/storage/storage.nim @@ -242,7 +242,8 @@ proc new*( let switch = SwitchBuilder .new() .withPrivateKey(privateKey) - .withAddresses(@[listenMultiAddr], enableWildcardResolver = true) + .withAddresses(@[listenMultiAddr]) + .withWildcardResolver(true) .withIdentifyPusher(false) .withRng(random.Rng.instance().libp2pRng) .withNoise() diff --git a/tests/storage/helpers/switchutils.nim b/tests/storage/helpers/switchutils.nim index 380913bf..faf8bc31 100644 --- a/tests/storage/helpers/switchutils.nim +++ b/tests/storage/helpers/switchutils.nim @@ -9,7 +9,8 @@ proc newStandardSwitch*( ): Switch = SwitchBuilder .new() - .withAddresses(@[addrs], enableWildcardResolver = true) + .withAddresses(@[addrs]) + .withWildcardResolver(true) .withSignedPeerRecord(sendSignedPeerRecord) .withIdentifyPusher(false) .withRng(storage_rng.Rng.instance().libp2pRng) diff --git a/vendor/nim-boringssl b/vendor/nim-boringssl index f8111056..e77caaba 160000 --- a/vendor/nim-boringssl +++ b/vendor/nim-boringssl @@ -1 +1 @@ -Subproject commit f8111056182cf6abd9e35de77a919e873ef94652 +Subproject commit e77caabae78fbc9aa5b78a0a521181b077c82571 diff --git a/vendor/nim-libp2p b/vendor/nim-libp2p index c4319937..3b5ae1da 160000 --- a/vendor/nim-libp2p +++ b/vendor/nim-libp2p @@ -1 +1 @@ -Subproject commit c43199378f46d0aaf61be1cad1ee1d63e8f665d6 +Subproject commit 3b5ae1da95f0614af06221be7a3bb2aeab03f4c7 diff --git a/vendor/nim-libp2p-mix b/vendor/nim-libp2p-mix index fc220354..c387ca67 160000 --- a/vendor/nim-libp2p-mix +++ b/vendor/nim-libp2p-mix @@ -1 +1 @@ -Subproject commit fc22035416ac3df258e043ad8a53cf929f225e9d +Subproject commit c387ca67cf477dc53ec6228027c45d8eda067917 diff --git a/vendor/nim-lsquic b/vendor/nim-lsquic index 00e4b7df..2f01046b 160000 --- a/vendor/nim-lsquic +++ b/vendor/nim-lsquic @@ -1 +1 @@ -Subproject commit 00e4b7dfaa197cd120267aa897b33b0914166b45 +Subproject commit 2f01046bf1d513de8b5f8296c3d8bec819ab0cb9