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/dnsdisc: fix flaw in dns size calculation #22533

Merged
merged 1 commit into from
Mar 19, 2021
Merged

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Mar 19, 2021

Fixes #22532

The calculation for maxChildren was wrong:

300 / 16 * (13 / 8) == 30

Should have been

300 / (16 * (13 / 8)) == 11

After fixing this, I also bumped 300 a bit, so instead of 11 we land at 13 as the max.

@holiman holiman added this to the 1.10.2 milestone Mar 19, 2021
@fjl fjl merged commit 5bc0343 into ethereum:master Mar 19, 2021
atif-konasl pushed a commit to frozeman/pandora-execution-engine that referenced this pull request Oct 15, 2021
This fixes the calculation of the tree branch factor. With the new
formula, we now creat at most 13 children instead of 30, ensuring
the TXT record size will be below 370 bytes.
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.

DNS discovery uses too large responses to fit within UDP packet size
2 participants