fuel-core icon indicating copy to clipboard operation
fuel-core copied to clipboard

WIP: Pooled transactions exchange protocol

Open digorithm opened this issue 1 year ago • 2 comments

Work in progress

Scope and design

Partially closes https://github.com/FuelLabs/fuel-core/issues/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

  • [x] Create and organize the new TxPoolSync service under the current architecture;
  • [x] 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);
  • [x] Implement the pooled transaction sharing
    • [x] Current blocker: node gets penalized and disconnected when sending transactions
  • [x] 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;

digorithm avatar Jun 23 '23 18:06 digorithm

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

bvrooman avatar Jun 29 '23 16:06 bvrooman

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

digorithm avatar Jun 29 '23 16:06 digorithm