Merge 4ec5bcf14a0a864a7a3de9820f60aba44b1f8f6d into fe8a3e66258757aa1eedde2657de71793d0f4f38

This commit is contained in:
Arnaud 2026-06-26 11:09:06 -03:00 committed by GitHub
commit 32b48f1602
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 19 additions and 8 deletions

View File

@ -140,7 +140,7 @@ switch("warning", "ObservableStores:off")
# Too many false positives for "Warning: method has lock level <unknown>, but another method has 0 [LockLevel]"
switch("warning", "LockLevel:off")
switch("define", "libp2p_pki_schemes=secp256k1")
switch("define", "libp2p_pki_schemes=secp256k1,rsa")
#TODO this infects everything in this folder, ideally it would only
# apply to storage.nim, but since storage.nims is used for other purpose
# we can't use it. And storage.cfg doesn't work

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 placeholder only exists until then.
proc placeholder(
conn: Connection, proto: string
): Future[void] {.async: (raises: [CancelledError]).} =
discard
let self = lp_protocol.new(
BlockExcNetwork, @[Codec], nil, maxIncomingStreamsTotal = maxInflight
BlockExcNetwork, @[Codec], placeholder, 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

@ -239,7 +239,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 c470b1146fa2ef23ab88c5a0940923cf7645e9c5

2
vendor/nim-lsquic vendored

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