Bump libp2p for gossipsub improvements (#5229)

* Bump libp2p

* Add bandwidthEstimate param

* Fix typo and type

* Add config for light client

* Fix unit

* Add debug prefix

---------

Co-authored-by: Jacek Sieka <jacek@status.im>
Co-authored-by: diegomrsantos <diegomrsantos@gmail.com>
Co-authored-by: Diego <diego@status.im>
This commit is contained in:
Tanguy 2023-08-24 16:04:19 +02:00 committed by GitHub
parent 0043a07c6f
commit 36413c8f21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 1 deletions

View File

@ -623,6 +623,11 @@ type
desc: "Experimental, debug option; could disappear at any time without warning"
name: "temporary-debug-trusted-setup-file" .}: Option[string]
bandwidthEstimate* {.
hidden
desc: "Bandwidth estimate for the node (bits per second)"
name: "debug-bandwidth-estimate" .}: Option[Natural]
of BNStartUpCmd.wallets:
case walletsCmd* {.command.}: WalletsCmd
of WalletsCmd.create:

View File

@ -145,6 +145,11 @@ type LightClientConf* = object
desc: "A file containing the hex-encoded 256 bit secret key to be used for verifying/generating JWT tokens"
name: "jwt-secret" .}: Option[InputFile]
bandwidthEstimate* {.
hidden
desc: "Bandwidth estimate for the node (bits per second)"
name: "debug-bandwidth-estimate" .}: Option[Natural]
# Testing
stopAtEpoch* {.
hidden

View File

@ -2385,6 +2385,8 @@ proc createEth2Node*(rng: ref HmacDrbgContext,
res.mgetOrPut(peerId, @[]).add(maddress)
info "Adding priviledged direct peer", peerId, address = maddress
res
,
bandwidthEstimatebps: config.bandwidthEstimate.get(100_000_000)
)
pubsub = GossipSub.init(
switch = switch,

2
vendor/nim-libp2p vendored

@ -1 +1 @@
Subproject commit 224f92e17251464984d6906316c54d2e1108ae43
Subproject commit f80ce3133c1d75b3d18d1d1766a58121d8999abd