Skip to content

Commit

Permalink
chore: bumping dependencies for 0.27.0 (#2572)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmer authored Apr 9, 2024
1 parent 56dd47d commit f68ac79
Show file tree
Hide file tree
Showing 16 changed files with 48 additions and 46 deletions.
3 changes: 2 additions & 1 deletion apps/chat2/chat2.nim
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import
../../waku/node/peer_manager,
../../waku/factory/builder,
../../waku/common/utils/nat,
../../waku/waku_relay,
./config_chat2

import libp2p/protocols/pubsub/rpc/messages, libp2p/protocols/pubsub/pubsub
Expand Down Expand Up @@ -522,7 +523,7 @@ proc processInput(rfd: AsyncFD, rng: ref HmacDrbgContext) {.async.} =
if msg.contentTopic == chat.contentTopic:
chat.printReceivedMessage(msg)

node.subscribe((kind: PubsubSub, topic: DefaultPubsubTopic), some(handler))
node.subscribe((kind: PubsubSub, topic: DefaultPubsubTopic), some(WakuRelayHandler(handler)))

if conf.rlnRelay:
info "WakuRLNRelay is enabled"
Expand Down
2 changes: 1 addition & 1 deletion apps/networkmonitor/networkmonitor.nim
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ proc subscribeAndHandleMessages(
else:
msgPerContentTopic[msg.contentTopic] = 1

node.subscribe((kind: PubsubSub, topic: pubsubTopic), some(handler))
node.subscribe((kind: PubsubSub, topic: pubsubTopic), some(WakuRelayHandler(handler)))

when isMainModule:
# known issue: confutils.nim(775, 17) Error: can raise an unlisted exception: ref IOError
Expand Down
5 changes: 3 additions & 2 deletions examples/subscriber.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import
../../../waku/waku_node,
../../../waku/waku_enr,
../../../waku/waku_discv5,
../../../waku/factory/builder
../../../waku/factory/builder,
../../../waku/waku_relay

# An accesible bootstrap node. See waku.sandbox fleets.status.im
const bootstrapNode =
Expand Down Expand Up @@ -115,7 +116,7 @@ proc setupAndSubscribe(rng: ref HmacDrbgContext) {.async.} =
contentTopic = msg.contentTopic,
timestamp = msg.timestamp

node.subscribe((kind: PubsubSub, topic: pubsubTopic), some(handler))
node.subscribe((kind: PubsubSub, topic: pubsubTopic), some(WakuRelayHandler(handler)))

when isMainModule:
let rng = crypto.newRng()
Expand Down
2 changes: 1 addition & 1 deletion vendor/nim-bearssl
Submodule nim-bearssl updated 1 files
+1 −1 bearssl.nimble
2 changes: 1 addition & 1 deletion vendor/nim-faststreams
2 changes: 1 addition & 1 deletion vendor/nim-json-serialization
2 changes: 1 addition & 1 deletion vendor/nim-libbacktrace
2 changes: 1 addition & 1 deletion vendor/nim-libp2p
Submodule nim-libp2p updated 60 files
+0 −1 README.md
+1 −1 examples/helloworld.nim
+17 −22 libp2p/builders.nim
+8 −6 libp2p/connmanager.nim
+0 −53 libp2p/crypto/crypto.nim
+1 −1 libp2p/dialer.nim
+0 −22 libp2p/errors.nim
+87 −39 libp2p/multistream.nim
+19 −10 libp2p/muxers/mplex/coder.nim
+53 −40 libp2p/muxers/mplex/lpchannel.nim
+63 −61 libp2p/muxers/mplex/mplex.nim
+25 −16 libp2p/muxers/muxer.nim
+167 −108 libp2p/muxers/yamux/yamux.nim
+6 −7 libp2p/protocols/connectivity/dcutr/server.nim
+18 −14 libp2p/protocols/connectivity/relay/rconn.nim
+13 −5 libp2p/protocols/connectivity/relay/relay.nim
+38 −24 libp2p/protocols/connectivity/relay/utils.nim
+59 −14 libp2p/protocols/protocol.nim
+10 −7 libp2p/protocols/pubsub/floodsub.nim
+166 −112 libp2p/protocols/pubsub/gossipsub.nim
+20 −20 libp2p/protocols/pubsub/gossipsub/behavior.nim
+33 −34 libp2p/protocols/pubsub/gossipsub/scoring.nim
+3 −0 libp2p/protocols/pubsub/gossipsub/types.nim
+4 −6 libp2p/protocols/pubsub/mcache.nim
+59 −42 libp2p/protocols/pubsub/pubsub.nim
+202 −56 libp2p/protocols/pubsub/pubsubpeer.nim
+2 −2 libp2p/protocols/pubsub/rpc/message.nim
+63 −63 libp2p/protocols/pubsub/rpc/messages.nim
+23 −23 libp2p/protocols/pubsub/rpc/protobuf.nim
+13 −5 libp2p/protocols/rendezvous.nim
+97 −51 libp2p/protocols/secure/noise.nim
+0 −444 libp2p/protocols/secure/secio.nim
+64 −43 libp2p/protocols/secure/secure.nim
+24 −25 libp2p/stream/bufferstream.nim
+39 −28 libp2p/stream/chronosstream.nim
+35 −38 libp2p/stream/connection.nim
+75 −84 libp2p/stream/lpstream.nim
+25 −39 libp2p/transports/tcptransport.nim
+9 −9 libp2p/transports/transport.nim
+27 −17 libp2p/transports/wstransport.nim
+44 −39 libp2p/upgrademngrs/muxedupgrade.nim
+22 −15 libp2p/upgrademngrs/upgrade.nim
+11 −8 libp2p/utility.nim
+29 −0 tests/errorhelpers.nim
+29 −24 tests/helpers.nim
+1 −0 tests/hole-punching-interop/hole_punching.nim
+24 −12 tests/pubsub/testgossipinternal.nim
+23 −11 tests/pubsub/testgossipsub.nim
+25 −25 tests/pubsub/testmcache.nim
+18 −15 tests/pubsub/testmessage.nim
+9 −8 tests/pubsub/utils.nim
+2 −3 tests/testbufferstream.nim
+7 −6 tests/testconnmngr.nim
+3 −3 tests/testheartbeat.nim
+197 −106 tests/testmplex.nim
+154 −107 tests/testmultistream.nim
+4 −4 tests/testnoise.nim
+2 −3 tests/testtortransport.nim
+86 −0 tests/testutility.nim
+136 −81 tests/testyamux.nim
2 changes: 1 addition & 1 deletion vendor/nim-presto
2 changes: 1 addition & 1 deletion vendor/nim-stew
2 changes: 1 addition & 1 deletion vendor/nim-stint
2 changes: 1 addition & 1 deletion vendor/nim-unicodedb
2 changes: 1 addition & 1 deletion vendor/nim-unittest2
60 changes: 30 additions & 30 deletions waku/waku_relay/protocol.nim
Original file line number Diff line number Diff line change
Expand Up @@ -60,58 +60,58 @@ const TopicParameters = TopicParams(
)

# see: https://rfc.vac.dev/spec/29/#gossipsub-v10-parameters
const GossipsubParameters = GossipSubParams(
explicit: true,
pruneBackoff: chronos.minutes(1),
unsubscribeBackoff: chronos.seconds(5),
floodPublish: true,
gossipFactor: 0.25,
d: 6,
dLow: 4,
dHigh: 8,
dScore: 6,
dOut: 3,
dLazy: 6,
heartbeatInterval: chronos.seconds(1),
historyLength: 6,
historyGossip: 3,
fanoutTTL: chronos.minutes(1),
seenTTL: chronos.minutes(2),
const GossipsubParameters = GossipSubParams.init(
explicit = true,
pruneBackoff = chronos.minutes(1),
unsubscribeBackoff = chronos.seconds(5),
floodPublish = true,
gossipFactor = 0.25,
d = 6,
dLow = 4,
dHigh = 8,
dScore = 6,
dOut = 3,
dLazy = 6,
heartbeatInterval = chronos.seconds(1),
historyLength = 6,
historyGossip = 3,
fanoutTTL = chronos.minutes(1),
seenTTL = chronos.minutes(2),

# no gossip is sent to peers below this score
gossipThreshold: -100,
gossipThreshold = -100,

# no self-published msgs are sent to peers below this score
publishThreshold: -1000,
publishThreshold = -1000,

# used to trigger disconnections + ignore peer if below this score
graylistThreshold: -10000,
graylistThreshold = -10000,

# grafts better peers if the mesh median score drops below this. unset.
opportunisticGraftThreshold: 0,
opportunisticGraftThreshold = 0,

# how often peer scoring is updated
decayInterval: chronos.seconds(12),
decayInterval = chronos.seconds(12),

# below this we consider the parameter to be zero
decayToZero: 0.01,
decayToZero = 0.01,

# remember peer score during x after it disconnects
retainScore: chronos.minutes(10),
retainScore = chronos.minutes(10),

# p5: application specific, unset
appSpecificWeight: 0.0,
appSpecificWeight = 0.0,

# p6: penalizes peers sharing more than threshold ips
ipColocationFactorWeight: -50.0,
ipColocationFactorThreshold: 5.0,
ipColocationFactorWeight = -50.0,
ipColocationFactorThreshold = 5.0,

# p7: penalizes bad behaviour (weight and decay)
behaviourPenaltyWeight: -10.0,
behaviourPenaltyDecay: 0.986,
behaviourPenaltyWeight = -10.0,
behaviourPenaltyDecay = 0.986,

# triggers disconnections of bad peers aka score <graylistThreshold
disconnectBadPeers: true,
disconnectBadPeers = true,
)

type
Expand Down

0 comments on commit f68ac79

Please sign in to comment.