8000 mempool: Remove list of peer ids in reactor · Issue #1146 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mempool: Remove list of peer ids in reactor #1146

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

Closed
hvanz opened this issue Jul 19, 2023 · 0 comments · Fixed by #1191
Closed

mempool: Remove list of peer ids in reactor #1146

hvanz opened this issue Jul 19, 2023 · 0 comments · Fixed by #1191
Assignees
Labels

Comments

@hvanz
Copy link
Member
hvanz commented Jul 19, 2023

Summary

The data structure mempoolIDs in the mempool reactor is used to assign a unique identifier of type uint16 to each peer (identified by p2p.ID). These ids are only known locally to the node, and only used to keep track of the senders of each transaction.

PR tendermint/tendermint#2778 introduced this data structure, where it says: "Instead of using the 20byte peer ID, it instead uses a local map from peerID to uint16 counter, so every peer adds 2 bytes. (Word aligned to probably make it 8 bytes)".

Proposal

Remove mempoolIDs that is only used to save 12 bytes per connected peer.

See original discussion: #1043 (comment)

@hvanz hvanz added the mempool label Jul 19, 2023
@hvanz hvanz self-assigned this Aug 1, 2023
@hvanz hvanz moved this from Todo to In Progress in CometBFT 2023 Aug 1, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in CometBFT 2023 Aug 10, 2023
@hvanz hvanz added hygiene Any work relating to code legibility/hygiene to make it easier to read and removed hygiene Any work relating to code legibility/hygiene to make it easier to read labels Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant
0