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

p2p/discover: concurrent TALKREQ handling #27112

Merged
merged 8 commits into from
Apr 28, 2023

Conversation

fjl
Copy link
Contributor

@fjl fjl commented Apr 18, 2023

This changes TALKREQ message processing to run the handler on separate goroutine,
instead of running on the main discv5 dispatcher goroutine. It's better this way because
it allows the handler to perform blocking actions.

I'm also adding a new method TalkRequestToID here. This is needed for my work on
data transfers over discv5 in the discv5-streams repo.
The new method allows implementing a request flow where one node A sends TALKREQ to
another node B, and node B later sends a TALKREQ back. With TalkRequestToID, node B
does not need the ENR of A to send its request.

fjl added 6 commits April 14, 2023 12:59
This changes TALKREQ message processing to run the handler on separate
goroutine, instead of running on the main discv5 dispatcher goroutine.
It's better this way because it allows the handler to perform blocking
actions.
@fjl fjl requested a review from zsfelfoldi as a code owner April 18, 2023 09:14
@Dawidowak

This comment was marked as off-topic.

@Dawidowak

This comment was marked as off-topic.

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

Minor nits, generally lgtm

p2p/discover/v5_talk.go Outdated Show resolved Hide resolved
p2p/discover/v5_talk.go Show resolved Hide resolved
@fjl
Copy link
Contributor Author

fjl commented Apr 24, 2023

@holiman PTAL

@fjl fjl merged commit 47cdea5 into ethereum:master Apr 28, 2023
@fjl fjl added this to the 1.11.7 milestone Apr 28, 2023
shekhirin pushed a commit to shekhirin/go-ethereum that referenced this pull request Jun 6, 2023
This changes TALKREQ message processing to run the handler on separate goroutine,
instead of running on the main discv5 dispatcher goroutine. It's better this way because
it allows the handler to perform blocking actions.

I'm also adding a new method TalkRequestToID here. The method allows implementing
a request flow where one node A sends TALKREQ to another node B, and node B later
sends a TALKREQ back. With TalkRequestToID, node B does not need the ENR of A to
send its request.
devopsbo3 pushed a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
This changes TALKREQ message processing to run the handler on separate goroutine,
instead of running on the main discv5 dispatcher goroutine. It's better this way because
it allows the handler to perform blocking actions.

I'm also adding a new method TalkRequestToID here. The method allows implementing
a request flow where one node A sends TALKREQ to another node B, and node B later
sends a TALKREQ back. With TalkRequestToID, node B does not need the ENR of A to
send its request.
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
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.

3 participants