-
Notifications
You must be signed in to change notification settings - Fork 780
Closed
osmosis-labs/cometbft
#30Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Feature Request
Summary
We re-compute the block hash several times during consensus. We should just cache this block hash computation. E.g. each HashesTo call recreates the block's hash.
Here is the time spent in block hashing in a node synced to osmosis mainnet for 1 hour:

This is by no means the bottleneck, but is part of the sequential bottleneck of consensus and would be good to reduce, via only computing it once per block.
Proposal
I suggest that we cache this by adding a verifiedHash field to the internal Block type.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request