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

eth65 fix #1601

Merged
merged 19 commits into from
Dec 1, 2020
Merged

eth65 fix #1601

merged 19 commits into from
Dec 1, 2020

Conversation

matkt
Copy link
Contributor

@matkt matkt commented Nov 23, 2020

Signed-off-by: Karim TAAM [email protected]

PR description

If we look at the specification GetPoolTransactions can allow you to retrieve up to 256 transactions at one time while in most cases we only do it for 1 transaction.

For each NewPooledTransactionHashesMessage we do a GetPooledTransactionsFromPeerTask which can be problematic if the peer sends us a NewPooledTransactionHashesMessage per transaction in the pool. If we add each time a request in Netty's queue, this can explain the fact that it is very quickly overloaded.

This PR adds a waiting list for NewPooledTransactionHashesMessage in order to group several hashes into a single GetPooledTransactionsFromPeerTask

By default, hashes are put in a 500ms waiting list. This waiting list is created when receiving a first hash from a peer. This duration can be modified thanks to this flag --Xeth65-tx-announced-buffering-period-milliseconds

Test performed

3 days of non-stop synchronization for the version with the fix. I also compared my results with the besu-ohio-mainnet-1 version to check that I do not consume a lot of memory or that I do not lose too often peers

Changelog

@matkt matkt force-pushed the feature/eth65-test branch 4 times, most recently from db0b6a1 to 6bb1839 Compare November 25, 2020 14:30
@hyperledger hyperledger deleted a comment from lgtm-com bot Nov 26, 2020
Signed-off-by: Karim TAAM <[email protected]>
Signed-off-by: Karim TAAM <[email protected]>
Signed-off-by: Karim TAAM <[email protected]>
Signed-off-by: Karim TAAM <[email protected]>
Signed-off-by: Karim TAAM <[email protected]>
Signed-off-by: Karim TAAM <[email protected]>
@matkt matkt changed the title eth65 test eth65 fix Nov 30, 2020
@matkt matkt linked an issue Nov 30, 2020 that may be closed by this pull request
Signed-off-by: Karim TAAM <[email protected]>
Signed-off-by: Karim TAAM <[email protected]>
Signed-off-by: Karim TAAM <[email protected]>
Signed-off-by: Karim TAAM <[email protected]>
@matkt matkt marked this pull request as ready for review November 30, 2020 12:27
Signed-off-by: Ratan Rai Sur <[email protected]>
Copy link
Contributor

@RatanRSur RatanRSur left a comment

Choose a reason for hiding this comment

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

Feel free to revert any of the cosmetic changes I pushed :)

All the tests and logic LGTM!

@matkt matkt merged commit d4a330b into hyperledger:master Dec 1, 2020
@matkt matkt deleted the feature/eth65-test branch April 13, 2021 11:24
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.

ETH/65 Causes Crashes
2 participants