mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-06-14 01:49:36 +00:00
Fixes
* Fix libp2p bump to v2.0.0 tag * Fix libp2p_mix bump to commit that references libp2p v2.0.0 * Fix lint
This commit is contained in:
parent
69e4d959b1
commit
1f5f4c2816
@ -28,7 +28,7 @@ requires "nim >= 2.2.4",
|
||||
"toml_serialization",
|
||||
"faststreams",
|
||||
# Networking & P2P
|
||||
"https://github.com/vacp2p/nim-libp2p.git#c43199378f46d0aaf61be1cad1ee1d63e8f665d6",
|
||||
"https://github.com/vacp2p/nim-libp2p.git#v2.0.0",
|
||||
"eth",
|
||||
"nat_traversal",
|
||||
"dnsdisc",
|
||||
@ -71,7 +71,7 @@ requires "https://github.com/NagyZoltanPeter/nim-brokers.git#v3.1.1"
|
||||
|
||||
requires "https://github.com/vacp2p/nim-lsquic"
|
||||
requires "https://github.com/vacp2p/nim-jwt.git#057ec95eb5af0eea9c49bfe9025b3312c95dc5f2"
|
||||
requires "https://github.com/logos-co/nim-libp2p-mix#7cb7556d9a228573fc5622af7ffb2dd11741e043"
|
||||
requires "https://github.com/logos-co/nim-libp2p-mix#380513117d556bf8f70066f5e72a7fd74fe36ba6"
|
||||
|
||||
proc getMyCPU(): string =
|
||||
## Need to set cpu more explicit manner to avoid arch issues between dependencies
|
||||
|
||||
@ -55,7 +55,8 @@ proc new*(
|
||||
switch,
|
||||
bootstrapNodes = params.bootstrapNodes,
|
||||
config = KadDHTConfig.new(
|
||||
validator = svdisc_types.ExtEntryValidator(), selector = svdisc_types.ExtEntrySelector()
|
||||
validator = svdisc_types.ExtEntryValidator(),
|
||||
selector = svdisc_types.ExtEntrySelector(),
|
||||
),
|
||||
rng = switch.rng,
|
||||
codec = ExtendedServiceDiscoveryCodec,
|
||||
|
||||
@ -212,9 +212,7 @@ proc initProtocolHandler(wfc: WakuFilterClient) =
|
||||
wfc.handler = handler
|
||||
wfc.codec = WakuFilterPushCodec
|
||||
|
||||
proc new*(
|
||||
T: type WakuFilterClient, peerManager: PeerManager, rng: crypto.Rng
|
||||
): T =
|
||||
proc new*(T: type WakuFilterClient, peerManager: PeerManager, rng: crypto.Rng): T =
|
||||
let brokerCtx = globalBrokerContext()
|
||||
let wfc = WakuFilterClient(
|
||||
brokerCtx: brokerCtx, rng: rng, peerManager: peerManager, pushHandlers: @[]
|
||||
|
||||
@ -21,9 +21,7 @@ type WakuLightPushClient* = ref object
|
||||
rng*: crypto.Rng
|
||||
peerManager*: PeerManager
|
||||
|
||||
proc new*(
|
||||
T: type WakuLightPushClient, peerManager: PeerManager, rng: crypto.Rng
|
||||
): T =
|
||||
proc new*(T: type WakuLightPushClient, peerManager: PeerManager, rng: crypto.Rng): T =
|
||||
WakuLightPushClient(peerManager: peerManager, rng: rng)
|
||||
|
||||
proc ensureTimestampSet(message: var WakuMessage) =
|
||||
|
||||
@ -22,9 +22,7 @@ type WakuLegacyLightPushClient* = ref object
|
||||
rng*: crypto.Rng
|
||||
|
||||
proc new*(
|
||||
T: type WakuLegacyLightPushClient,
|
||||
peerManager: PeerManager,
|
||||
rng: crypto.Rng,
|
||||
T: type WakuLegacyLightPushClient, peerManager: PeerManager, rng: crypto.Rng
|
||||
): T =
|
||||
WakuLegacyLightPushClient(peerManager: peerManager, rng: rng)
|
||||
|
||||
|
||||
@ -93,7 +93,9 @@ proc new*(
|
||||
localMixNodeInfo,
|
||||
peermgr.switch,
|
||||
delayStrategy = Opt.some(
|
||||
DelayStrategy(ExponentialDelayStrategy.new(meanDelay = 50'u16, rng = crypto.newRng()))
|
||||
DelayStrategy(
|
||||
ExponentialDelayStrategy.new(meanDelay = 50'u16, rng = crypto.newRng())
|
||||
)
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@ -583,7 +583,7 @@
|
||||
}
|
||||
},
|
||||
"libp2p": {
|
||||
"version": "#c43199378f46d0aaf61be1cad1ee1d63e8f665d6",
|
||||
"version": "2.0.0",
|
||||
"vcsRevision": "c43199378f46d0aaf61be1cad1ee1d63e8f665d6",
|
||||
"url": "https://github.com/vacp2p/nim-libp2p.git",
|
||||
"downloadMethod": "git",
|
||||
@ -700,7 +700,7 @@
|
||||
},
|
||||
"libp2p_mix": {
|
||||
"version": "0.1.0",
|
||||
"vcsRevision": "7cb7556d9a228573fc5622af7ffb2dd11741e043",
|
||||
"vcsRevision": "380513117d556bf8f70066f5e72a7fd74fe36ba6",
|
||||
"url": "https://github.com/logos-co/nim-libp2p-mix",
|
||||
"downloadMethod": "git",
|
||||
"dependencies": [
|
||||
@ -715,7 +715,7 @@
|
||||
"unittest2"
|
||||
],
|
||||
"checksums": {
|
||||
"sha1": "8287dda862a4398966cd66a5b3d7d66834c9a9a6"
|
||||
"sha1": "ccfb0f0160ac15ac970471964c730d57edacad91"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -29,11 +29,10 @@ import
|
||||
|
||||
# nim-libp2p 2.0.0 enables the IdentifyPush protocol by default, so every node
|
||||
# now also advertises "/ipfs/id/push/1.0.0" (prepended to the identify list).
|
||||
const DEFAULT_PROTOCOLS: seq[string] =
|
||||
@[
|
||||
"/ipfs/id/push/1.0.0", "/ipfs/id/1.0.0", "/libp2p/autonat/1.0.0",
|
||||
"/libp2p/circuit/relay/0.2.0/hop",
|
||||
]
|
||||
const DEFAULT_PROTOCOLS: seq[string] = @[
|
||||
"/ipfs/id/push/1.0.0", "/ipfs/id/1.0.0", "/libp2p/autonat/1.0.0",
|
||||
"/libp2p/circuit/relay/0.2.0/hop",
|
||||
]
|
||||
|
||||
let
|
||||
listenIp = parseIpAddress("0.0.0.0")
|
||||
|
||||
@ -955,7 +955,8 @@ procSuite "Peer Manager":
|
||||
|
||||
# Create peer manager
|
||||
let pm = PeerManager.new(
|
||||
switch = SwitchBuilder.new().withRng(crypto.newRng()).withMplex().withNoise().build(),
|
||||
switch =
|
||||
SwitchBuilder.new().withRng(crypto.newRng()).withMplex().withNoise().build(),
|
||||
storage = nil,
|
||||
)
|
||||
|
||||
@ -1040,7 +1041,9 @@ procSuite "Peer Manager":
|
||||
|
||||
# Create 30 peers and add them to the peerstore
|
||||
let peers = toSeq(1 .. 30)
|
||||
.mapIt(parsePeerInfo("/ip4/0.0.0.0/tcp/0/p2p/" & $PeerId.random(crypto.newRng()).get()))
|
||||
.mapIt(
|
||||
parsePeerInfo("/ip4/0.0.0.0/tcp/0/p2p/" & $PeerId.random(crypto.newRng()).get())
|
||||
)
|
||||
.filterIt(it.isOk())
|
||||
.mapIt(it.value)
|
||||
for p in peers:
|
||||
|
||||
@ -19,7 +19,8 @@ proc newTestWakuLegacyLightpushNode*(
|
||||
): Future[WakuLegacyLightPush] {.async.} =
|
||||
let
|
||||
peerManager = PeerManager.new(switch)
|
||||
proto = WakuLegacyLightPush.new(peerManager, crypto.newRng(), handler, rateLimitSetting)
|
||||
proto =
|
||||
WakuLegacyLightPush.new(peerManager, crypto.newRng(), handler, rateLimitSetting)
|
||||
|
||||
await proto.start()
|
||||
switch.mount(proto)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user