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

WIP: Pooled transactions exchange protocol #1228

Draft
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

digorithm
Copy link
Member

@digorithm digorithm commented Jun 23, 2023

Work in progress

Scope and design

Partially closes #1049. I say partially because this work will be split into two:

  1. An initial pooled transactions "handshake" between two newly connected peers, where these two peers will share their pooled transactions. This is the scope of this PR. Then, in a follow-up PR:
  2. Another sub-service will periodically request pooled transactions from a random, small subset of known peers and compare and share their pooled transactions like the first part of the protocol.
  3. More details in the RFC.

These two combined will lead to the mempool being more resilient.

Tasks and TODOs

  • Create and organize the new TxPoolSync service under the current architecture;
  • Setup the communication between the new service and the main transaction pool service, and the p2p service (the majority of this work falls under this task);
  • Implement the pooled transaction sharing
    • Current blocker: node gets penalized and disconnected when sending transactions
  • Write new tests
  • Fix old tests and CI-related stuff broken due to these changes;
  • Clean-up code (TODOs, improve quality, etc.)
  • Write more documentation;

@bvrooman
Copy link
Contributor

To make things a bit easier to review, is it possible/feasible to separate out the nonfunctional formatting changes into a separate PR?

@digorithm
Copy link
Member Author

To make things a bit easier to review, is it possible/feasible to separate out the nonfunctional formatting changes into a separate PR?

Yup, I'll revert those; those were automatically done by my editor + my current version of the formatter. I'll do it asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

P2P request response protocol for txpool sync
2 participants