Skip to content

Use "canonical address" instead of checksum address to key known_nodes #1995

@jMyles

Description

@jMyles

Even though we no longer fully instantiate nodes before using them (allowing them to remain a NodeSprout until we are about to verify), we still key all known nodes using their checksum address.

Thus, any time many more nodes are added to known_nodes (which happens essentially on every run at some point) is thus a substantially expensive CPU operation compared to everything that happens around it. It is noticeable even on a powerful laptop in the large fleet tests. On a small device, it might be crippling. We can decrease this cost by keying using the raw bytes (known in web3 terms as "canonical address") instead.

Using checksum addresses is of course required for most transaction operations. How do other projects aimed at small devices handle quick indexing of more than a hundred or so nodes?

Metadata

Metadata

Labels

EnhancementNew or improved featuresOptimizationuse less, go fasterP2PNode discovery and P2P

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions