Skip to content

P2P transaction flow is spammy #6435

@Arkenan

Description

@Arkenan

There are separate problems to fix:

Urgent and simple:

  • Add deduplication. If we receive the same unknown transaction hash by N different nodes we may send N requests for GetPooledTransactions, when in reality we only need one. To achieve this we need to track in-flight transactions.
  • Avoid sending empty requests. If we receive an empty transactions list we still send a message. We shouldn't.

Medium:

  • Rate limiting/batching. We probably should wait some milliseconds to accumulate transactions to send a request for all of them in a batch instead of doing this eagerly.
  • is_synced guard: if we aren't synced we shouldn't even send the request for the transactions, it's no use. We will not building blocks soon.

Needs more research.

  • We should probably not send this request to a random peer but to the sender peer. This we need to check in the specs.
  • Are we using the broadcaster and not notifying it? Is it possible that we are sending the hash to the same node that sends it to us?
  • Node selection: use the weighted version or some other mechanism, not random.

Metadata

Metadata

Assignees

Labels

p2pIssues related to p2p networkperformanceBlock execution throughput and performance in general

Type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions