-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: easy setup fleets for lpt #3125
base: master
Are you sure you want to change the base?
Conversation
…g service peers if failed with original
…ity and availability, dashboard adjustments
b0a1a05
to
460f561
Compare
You can find the image built from this PR at
Built from c6e2b4e |
…ager's peerStore to wakuPeerStore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woooow amazing PR! 🔥 🔥 🔥 Thanks so much!
Left a bunch of random comments but mostly nitpicks.
Really looking forward to deploy the LPT and use it on the fleets! 😍
|
||
return ok(peerInfo) | ||
|
||
randomize() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want this call on a global scope or inside a proc? if it's globally, better to put it before every proc definition so it's easier to see
elif codec.contains("filter"): | ||
capability = Capabilities.Filter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this elif
redundant if capability is already initialized to Capabilities.Filter
?
Same in selectRandomCapablePeer
var found = none(RemotePeerInfo) | ||
var okPeers: seq[RemotePeerInfo] = @[] | ||
|
||
while found.isNone() and supportivePeers.len > 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't even update found
in this proc, it's very similar to selectRandomCapablePeer
- not sure if it's better to avoid the code duplication by having all that same logic in a same place
Actually, I think we don't use selectRandomCapablePeer
anywhere 😶
if connOpt.value().isSome(): | ||
found = some(randomPeer) | ||
debug "Dialing successful", | ||
peer = constructMultiaddrStr(randomPeer), codec = codec | ||
else: | ||
debug "Dialing failed", peer = constructMultiaddrStr(randomPeer), codec = codec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we do here
lpt_dialed_peers.inc()
and
lpt_dial_failures.inc()
like in tryCallAllPxPeers
?
if conf.bootstrapNode.len > 0: | ||
info "Bootstrapping with PeerExchange to gather random service node" | ||
let futForServiceNode = pxLookupServiceNode(wakuApp.node, conf) | ||
if not (waitFor futForServiceNode.withTimeout(20.minutes)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waitFor
with 20 mins timeout? 😱
# so we will mount PeerExchange to gather possible service peers, if got some | ||
# we will mount the client protocols afterward. | ||
wakuConf.peerExchange = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure I understand - according to the comment, shouldn't wakuConf.peerExchange
be set to true
?
proc `$`*(cap: Capabilities): string = | ||
case cap | ||
of Capabilities.Relay: | ||
return "Relay" | ||
of Capabilities.Store: | ||
return "Store" | ||
of Capabilities.Filter: | ||
return "Filter" | ||
of Capabilities.Lightpush: | ||
return "Lightpush" | ||
of Capabilities.Sync: | ||
return "Sync" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth having this proc in waku/waku_enr/capabilities.nim
so it can be used in other places too :)
Co-authored-by: gabrielmer <101006718+gabrielmer@users.noreply.github.com>
Description
A greater upgrade for liteprotocoltester.
Changes
Extension
A new repository https://github.com/waku-org/lpt-runner created to ease the usage and run against various waku networks and fleets.
Issue
#2999