Skip to content
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

fix(peer-exchange): start px discv5 loop after discv5 has started #1407

Merged
merged 3 commits into from
Nov 25, 2022

Conversation

kaiserd
Copy link
Contributor

@kaiserd kaiserd commented Nov 21, 2022

The peer exchange discv5 loop was stared before discv5 was listening, causing the loop to immediately stop.
This PR fixes this issue.

@@ -489,7 +487,10 @@ proc startNode(node: WakuNode, conf: WakuNodeConf,
await connectToNodes(node, dynamicBootstrapNodes, "dynamic bootstrap")
except:
return err("failed to connect to dynamic bootstrap nodes: " & getCurrentExceptionMsg())


if conf.peerExchange:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking. Before we were also running runPeerExchangeDiscv5Loop if conf.peerExchangeNode != "", but not only if conf.peerExchange. Is this intended? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because only a service node has to run discv5. Nodes that only specify a peer-exchange-node act as client.
(In a future refactor, client nodes should be able to use peer exchange without mounting the protocol.)

@status-im-auto
Copy link
Collaborator

status-im-auto commented Nov 21, 2022

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ a3e7677 #1 2022-11-21 12:28:20 ~17 min linux 📦bin
✔️ a3e7677 #1 2022-11-21 12:33:11 ~22 min macos 📦bin
✔️ 3fe5f63 #2 2022-11-22 14:04:20 ~16 min macos 📦bin
✔️ 3fe5f63 #2 2022-11-22 14:05:45 ~17 min linux 📦bin

Copy link
Contributor

@alrevuelta alrevuelta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! lgtm!

Copy link
Contributor

@LNSD LNSD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

Copy link
Contributor

@jm-clius jm-clius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Seems indeed like your failing test is the one investigated in #1368

@kaiserd kaiserd merged commit 6942e46 into master Nov 25, 2022
@kaiserd kaiserd deleted the fix/px-discv5-loop-start branch November 25, 2022 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants