Skip to content

mempool: Remove list of peer ids in reactor #1146

@hvanz

Description

@hvanz

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)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions