mirror of
https://github.com/waku-org/nwaku.git
synced 2025-02-24 21:08:38 +00:00
Update nim-libp2p and other submodules
Need to use latest libp2p for GossipSub bug fix, safer to update all Use MultiAddr.tryGet() per resultification upstream
This commit is contained in:
parent
610305f27b
commit
1400575067
@ -22,7 +22,7 @@ export
|
|||||||
switch, peer, peerinfo, connection, multiaddress, crypto
|
switch, peer, peerinfo, connection, multiaddress, crypto
|
||||||
|
|
||||||
proc newStandardSwitch*(privKey = none(PrivateKey),
|
proc newStandardSwitch*(privKey = none(PrivateKey),
|
||||||
address = MultiAddress.init("/ip4/127.0.0.1/tcp/0"),
|
address = MultiAddress.init("/ip4/127.0.0.1/tcp/0").tryGet(),
|
||||||
triggerSelf = false,
|
triggerSelf = false,
|
||||||
gossip = false,
|
gossip = false,
|
||||||
verifySignature = libp2p_pubsub_verify,
|
verifySignature = libp2p_pubsub_verify,
|
||||||
|
2
vendor/nim-faststreams
vendored
2
vendor/nim-faststreams
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 5d7cad792ff782672cc46a84cfcae341b55e2437
|
Subproject commit 81c24860e2622a15e05c81d15e3d1cc02c460870
|
2
vendor/nim-json-serialization
vendored
2
vendor/nim-json-serialization
vendored
@ -1 +1 @@
|
|||||||
Subproject commit aa51f6fed1715a91fd8b58072a1915422a133d4a
|
Subproject commit 8d4c31f7c2f56e17ec3325ec054fe15ccf4e89d4
|
2
vendor/nim-libp2p
vendored
2
vendor/nim-libp2p
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 7b6e1c06888a831d61d7019a07d2d59d5bd079ea
|
Subproject commit 6affcda9378593f96e9d2b75f9d9ac5e6e33c526
|
2
vendor/nim-serialization
vendored
2
vendor/nim-serialization
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 16e6bcd16d71eba932978ebc22908da414f52db7
|
Subproject commit d8ca3daf3a788f357bf96b8e61b3ffce9a018ea2
|
@ -39,7 +39,7 @@ proc initNodeCmd(shift: int, staticNodes: seq[string] = @[], master = false, lab
|
|||||||
port = 60000 + shift
|
port = 60000 + shift
|
||||||
#DefaultAddr = "/ip4/127.0.0.1/tcp/55505"
|
#DefaultAddr = "/ip4/127.0.0.1/tcp/55505"
|
||||||
address = "/ip4/127.0.0.1/tcp/" & $port
|
address = "/ip4/127.0.0.1/tcp/" & $port
|
||||||
hostAddress = MultiAddress.init(address)
|
hostAddress = MultiAddress.init(address).tryGet()
|
||||||
|
|
||||||
info "Address", address
|
info "Address", address
|
||||||
# TODO: Need to port shift
|
# TODO: Need to port shift
|
||||||
|
@ -30,11 +30,11 @@ proc setBootNodes(nodes: openArray[string]): seq[ENode] =
|
|||||||
result.add(ENode.fromString(nodeId).expect("correct node"))
|
result.add(ENode.fromString(nodeId).expect("correct node"))
|
||||||
|
|
||||||
proc initAddress(T: type MultiAddress, str: string): T =
|
proc initAddress(T: type MultiAddress, str: string): T =
|
||||||
let address = MultiAddress.init(str)
|
let address = MultiAddress.init(str).tryGet()
|
||||||
if IPFS.match(address) and matchPartial(multiaddress.TCP, address):
|
if IPFS.match(address) and matchPartial(multiaddress.TCP, address):
|
||||||
result = address
|
result = address
|
||||||
else:
|
else:
|
||||||
raise newException(MultiAddressError,
|
raise newException(ValueError,
|
||||||
"Invalid bootstrap node multi-address")
|
"Invalid bootstrap node multi-address")
|
||||||
|
|
||||||
proc dialPeer(p: WakuProto, address: string) {.async.} =
|
proc dialPeer(p: WakuProto, address: string) {.async.} =
|
||||||
@ -123,7 +123,7 @@ proc run(config: WakuNodeConf) =
|
|||||||
#port = 60000 + tcpPort
|
#port = 60000 + tcpPort
|
||||||
#DefaultAddr = "/ip4/127.0.0.1/tcp/55505"
|
#DefaultAddr = "/ip4/127.0.0.1/tcp/55505"
|
||||||
address = "/ip4/127.0.0.1/tcp/" & $tcpPort
|
address = "/ip4/127.0.0.1/tcp/" & $tcpPort
|
||||||
hostAddress = MultiAddress.init(address)
|
hostAddress = MultiAddress.init(address).tryGet()
|
||||||
|
|
||||||
# XXX: Address and hostAddress usage needs more clarity
|
# XXX: Address and hostAddress usage needs more clarity
|
||||||
# Difference between announced and host address relevant for running behind NAT, however doesn't seem like nim-libp2p supports this. GHI?
|
# Difference between announced and host address relevant for running behind NAT, however doesn't seem like nim-libp2p supports this. GHI?
|
||||||
@ -137,7 +137,7 @@ proc run(config: WakuNodeConf) =
|
|||||||
|
|
||||||
#INF 2020-05-28 11:15:50+08:00 Initializing networking (host address and announced same) tid=15555 address=192.168.1.101:30305:30305
|
#INF 2020-05-28 11:15:50+08:00 Initializing networking (host address and announced same) tid=15555 address=192.168.1.101:30305:30305
|
||||||
info "Initializing networking (nat address unused)", nat_address, address
|
info "Initializing networking (nat address unused)", nat_address, address
|
||||||
peerInfo.addrs.add(Multiaddress.init(address))
|
peerInfo.addrs.add(Multiaddress.init(address).tryGet())
|
||||||
|
|
||||||
# switch.pubsub = wakusub, plus all the peer info etc
|
# switch.pubsub = wakusub, plus all the peer info etc
|
||||||
# And it has wakuProto lets use wakuProto maybe, cause it has switch
|
# And it has wakuProto lets use wakuProto maybe, cause it has switch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user