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: improve discv5 NODES response packing #1349

Merged
merged 2 commits into from Nov 8, 2022
Merged

p2p/discover: improve discv5 NODES response packing #1349

merged 2 commits into from Nov 8, 2022

Conversation

ucwong
Copy link
Member

@ucwong ucwong commented Nov 7, 2022

No description provided.

ucwong and others added 2 commits November 7, 2022 07:41
Instead of using a limit of three nodes per message, we can pack more nodes
into each message based on ENR size. In my testing, this halves the number
of sent NODES messages, because ENR size is usually < 300 bytes.

This also adds RLP helper functions that compute the encoded size of
[]byte and string.

Co-authored-by: Martin Holst Swende <martin@swende.se>
@ucwong ucwong merged commit f93bc42 into master Nov 8, 2022
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.

None yet

2 participants