Skip to content

mempool: wasteful tx broadcasting #1798

@ebuchman

Description

@ebuchman

Currently, every valid tx received by a node is sent to each of its peers, regardless of whether that peer has it or not, even if that peer was the original sender of the tx.

This results in a lot of wasted bandwidth and spamming the log message:

I[06-22|22:07:31.670] Could not check tx                           module=mempool tx=25CF190AB603E698BFFD8FD72F35E28FBE13057E err="Tx already exists in cache"   

At the least, we should be able to record which peer originally sent us a tx and not send it back to them.

We should also consider adding a new message type so peers can indicate which txs they already have, though this is more tricky.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions