You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
Summary
The data structure
mempoolIDs
in the mempool reactor is used to assign a unique identifier of typeuint16
to each peer (identified byp2p.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)
The text was updated successfully, but these errors were encountered: