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

Send transactions to all peers instead of a sub-set #1261

Merged
merged 9 commits into from
Sep 30, 2021

Conversation

ricardolyn
Copy link
Contributor

@ricardolyn ricardolyn commented Sep 30, 2021

Summary

The introduction of EIP-2464 (eth65 version) reduces the bandwidth used for transaction propagation from linear complexity in the number of peers to logarithmic one. While this approach removes the naive transfer of full transactions, it does create transaction pool consistency issues where some nodes are unable to promote transactions properly to be included in a block and thus creating empty blocks.

Moreover, it happens more specifically when there is a combination of the following:

  • high throughput of transactions from the same EOA
  • lower value than throughput on Transaction Pool Options (like --txpool.accountqueue)
  • a low number of nodes in the network (the lower, the higher probability that the node is unable to promote remote transactions).

The following image illustrates the issue:
Untitled-6

Therefore, this PR addresses the issue by sending the transactions to all peers, while in the meantime we work on a logarithmic propagation solution for IBFT/QBFT.

Changes

  • Broadcast the full transaction data to all peers
  • Add unit test to validate the logic

@ricardolyn ricardolyn self-assigned this Sep 30, 2021
@ricardolyn ricardolyn marked this pull request as ready for review September 30, 2021 11:33
Copy link
Contributor

@baptiste-b-pegasys baptiste-b-pegasys left a comment

Choose a reason for hiding this comment

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

I know it is inspired from code that exists priorly, but I just want to raise some concerns here about closing and emptying channels, checking all errors, and trying to be synchronous to avoid some flakiness.

eth/handler_test.go Outdated Show resolved Hide resolved
eth/handler_test.go Outdated Show resolved Hide resolved
eth/handler_test.go Outdated Show resolved Hide resolved
eth/handler_test.go Outdated Show resolved Hide resolved
eth/handler_test.go Outdated Show resolved Hide resolved
eth/handler_test.go Show resolved Hide resolved
@ricardolyn
Copy link
Contributor Author

@baptiste-b-pegasys changes done. please review again

Copy link
Contributor

@jbhurat jbhurat left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@achraf17 achraf17 left a comment

Choose a reason for hiding this comment

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

LGTM

@ricardolyn ricardolyn enabled auto-merge (squash) September 30, 2021 15:48
@ricardolyn ricardolyn merged commit 87648f6 into master Sep 30, 2021
@ricardolyn ricardolyn deleted the fix/empty-blocks-issue branch September 30, 2021 16:01
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.

4 participants