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: use HashSet for transactions_by_peers #6893

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

Rjected
Copy link
Member

@Rjected Rjected commented Feb 29, 2024

Does not fix memory growth from #6834, but it does make more sense to store these as a hashset, since duplicate values should not exist in the peer list

@Rjected Rjected added C-bug An unexpected or incorrect behavior A-devp2p Related to the Ethereum P2P protocol A-networking Related to networking in general labels Feb 29, 2024
Copy link
Member

@emhane emhane left a comment

Choose a reason for hiding this comment

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

this is definitely likely to give a performance boost since malfunctioning or, even more so, malicious peers are likely to send us the same transactions more than once. this could also happen under network congestion, leading to peers not knowing what we have seen or not seen.

@emhane emhane added this pull request to the merge queue Feb 29, 2024
Merged via the queue into main with commit 7719514 Feb 29, 2024
29 checks passed
@emhane emhane deleted the dan/transactions-by-peers-hashset branch February 29, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devp2p Related to the Ethereum P2P protocol A-networking Related to networking in general C-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants