Description
Summary
After performing some benchmarks with and without #4748 on the Cosmos Hub mainnet for blocks 50k-100k using a modified version of v0.34.7, certain execution paths offer glaringly obvious room for performance improvement.
Taking a look at the benchmark, we can see inter-block caching provides significant improvement during BeginBlock
. However, we can see the following areas take a significant amount of computation time:
handleValidatorSignature
AllocateTokensToValidator
Computation time could improve if we modify how GetValidatorMissedBlockBitArray
works. The overhead of storing the key at varying heights is probably high. We instead can store the arrays at fixed lengths (e.g. 100), where they would be kept in cache except every 100 blocks (credit @cwgoes).
AllocateTokensToValidator
I don't think there's too much we can tweak here as a bulk of the time is spent in amino and mutexes.
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned
Activity