Description
Feature Request
Summary
CometBFT's libs/rand was always a really questionable choice that never made sense to me. (Documented from before the cosmos hub launch: tendermint/tendermint#2956 )
We should just delete all usage of our libs/rand, and make each gossiping thread maintain its own randomness instance. This will reduce mutex contention, and speedup core gossip routines.
Each rand instance has only 50% doing its actual rand operation. And we see lockSlow
getting called, which per my understanding of the go runtime, means that this is actually a contended for mutex, hence this is justified.