Skip to content

mempool: Peers resend same transaction between themselves #613

@hvanz

Description

@hvanz

Related to #11 and, more specifically, #1058

Scenario

When a node receives a transaction, it retransmits the transaction to its peers (except to the peer that sent the transaction originally, and only if the transaction was validated by the application). Those peers may retransmit the same transaction between them if they are connected, thus receiving the transaction multiple times.

We can clearly observe this behaviour in a network of four nodes where only one node receives transactions from a client. The volume of transactions received by the other three nodes is at least 3 times higher than the first node.

Proposal

There are multiple ways to improve this scenario. For example:

  • Implement a back pressure mechanism in the emitting node, so that its neighbours have time to update the status of their peers and avoid resending transactions.
  • Send together with the transaction a list of peers where the transaction is being sent. Then the peers will know to which other nodes the transaction has been sent.

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions