status-im / status-go

The Status module that consumes go-ethereum
https://status.im
Mozilla Public License 2.0
727 stars 245 forks source link

Disable `DiscoveryV5` #724

Closed mandrigin closed 6 years ago

mandrigin commented 6 years ago

Problem

discv5 seems pretty CPU hungry when running in a profiler (~20% on iPhone 8+). (observe CPU behaviour with discv5 enabled vs discv5 disabled).

We need to disable discovery v5 to save this CPU time, especially since we don't use it.

Part of https://github.com/status-im/ideas/issues/83

divan commented 6 years ago

@mandrigin can you elaborate more on "especially since we don't use it." (i.e. so anyone without prior knowledge of what is discv5 can understand)

dshulyak commented 6 years ago

So that was my comment, we are not relying on discovery (neither v5 or one without a version) for maintaining connections with dynamic peers. All of our peers are static and added at the node startup or on demand (mail servers)