mirror of
https://github.com/vacp2p/dst-libp2p-test-node.git
synced 2026-08-27 12:51:12 +00:00
regression: open the publish endpoint before the bootstrap dial
A node's mesh arrives on inbound dials from nodes that bootstrapped earlier, so it is
ready to publish long before its own staggered dial returns. Gating :8645 on that dial
left half a 1000-node fleet refusing publishes: the statefulset reported all 1000 ready
at 01:46:35 while pod-700 did not finish its own dial until 01:55, and 32 of 600
injections were refused. Restores the ordering from 7e37a02, which only ever landed on a
campaign branch.
This commit is contained in:
@@ -204,6 +204,12 @@ proc main {.async.} =
|
||||
|
||||
await switch.start()
|
||||
|
||||
# Before the staggered bootstrap dial below, not after. A node's mesh arrives on
|
||||
# inbound dials from nodes that bootstrapped earlier, so it can publish long before
|
||||
# its own dial returns; gating :8645 on that left half the fleet refusing publishes.
|
||||
info "Starting listening endpoint for publish controller"
|
||||
discard gossipSub.startHttpServer(myId)
|
||||
|
||||
info "Starting metrics server"
|
||||
let metricsServer = startMetricsServer(parseIpAddress("0.0.0.0"), prometheusPort)
|
||||
if metricsServer.isErr:
|
||||
@@ -238,8 +244,6 @@ proc main {.async.} =
|
||||
# Hold connections open until gossipsub traffic takes over
|
||||
asyncSpawn pingLoop(switch, pingProtocol)
|
||||
|
||||
info "Starting listening endpoint for publish controller"
|
||||
discard gossipSub.startHttpServer(myId)
|
||||
|
||||
await sleepAsync(2.days)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user