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

Prevent indefinite transactions_by_peers growth #6834

Closed
Rjected opened this issue Feb 28, 2024 · 2 comments
Closed

Prevent indefinite transactions_by_peers growth #6834

Rjected opened this issue Feb 28, 2024 · 2 comments
Labels
A-devp2p Related to the Ethereum P2P protocol A-networking Related to networking in general A-tx-pool Related to the transaction mempool C-bug An unexpected or incorrect behavior

Comments

@Rjected
Copy link
Member

Rjected commented Feb 28, 2024

The transactions_by_peers data structure in the TransactionsManager appears to grow unbounded:
Screenshot 2024-02-27 at 7 56 19 PM
In this graph, transactions by peers total count is the sum of the vec lengths, and transactions by peers is the number of keys in the map.

See the following from a memory profile, the push operation accounts for almost a third of inuse space:
image

The line referred to in the memory profile is here:

entry.get_mut().push(peer_id);

We need to come up with a way to prune or bound this data structure, after investigating why this does not shrink.

@Rjected Rjected added C-bug An unexpected or incorrect behavior A-devp2p Related to the Ethereum P2P protocol A-tx-pool Related to the transaction mempool A-networking Related to networking in general labels Feb 28, 2024
@mattsse
Copy link
Collaborator

mattsse commented Mar 1, 2024

can close @Rjected ?

@Rjected
Copy link
Member Author

Rjected commented Mar 4, 2024

yep, memory with this fix:
Screenshot 2024-03-04 at 10 26 32 AM

@Rjected Rjected closed this as completed Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devp2p Related to the Ethereum P2P protocol A-networking Related to networking in general A-tx-pool Related to the transaction mempool C-bug An unexpected or incorrect behavior
Projects
Archived in project
Development

No branches or pull requests

2 participants