chore: update libp2p to 2.1.4 (#1449)

This commit is contained in:
Arnaud 2026-07-21 03:46:22 +04:00 committed by GitHub
parent 673823d600
commit 81f0d0530f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 20 additions and 11 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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]):

View File

@ -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()

View File

@ -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)

@ -1 +1 @@
Subproject commit f8111056182cf6abd9e35de77a919e873ef94652
Subproject commit e77caabae78fbc9aa5b78a0a521181b077c82571

2
vendor/nim-libp2p vendored

@ -1 +1 @@
Subproject commit c43199378f46d0aaf61be1cad1ee1d63e8f665d6
Subproject commit 3b5ae1da95f0614af06221be7a3bb2aeab03f4c7

@ -1 +1 @@
Subproject commit fc22035416ac3df258e043ad8a53cf929f225e9d
Subproject commit c387ca67cf477dc53ec6228027c45d8eda067917

2
vendor/nim-lsquic vendored

@ -1 +1 @@
Subproject commit 00e4b7dfaa197cd120267aa897b33b0914166b45
Subproject commit 2f01046bf1d513de8b5f8296c3d8bec819ab0cb9