Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(consensus/blockstore): Remove validate basic call from LoadBlock… (backport #62) #66

Merged
merged 1 commit into from
May 23, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented May 22, 2024

…Meta (backport cometbft#2964) (cometbft#2998)

Our gossip block parts routine calls Blockstore.LoadBlockMeta (as do things in blocksync). This currently takes some time due to ValidateBasic:

image

However note that we only save validated data to the blockstore. We only do it in:

Hence the validate basic time is wasted.

This should eventually just go to an LRU cache to even avoid the proto unmarshalling (as should ~everything in blockstore) but we want this anyway to reduce the computational overhead,

WRT live consensus, in main this only helps with catchup for live syncing nodes, I haven't checked on v0.47.x, but the cpuprofile suggests it may help with active block gossip time as well?


PR checklist



PR checklist

  • Tests written/updated
  • Changelog entry added in .changelog (we use unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments

This is an automatic backport of pull request #62 done by [Mergify](https://mergify.com).

…Meta (backport cometbft#2964) (cometbft#2998) (#62)

* perf(consensus/blockstore): Remove validate basic call from LoadBlockMeta (cometbft#2998) (#62)

Co-authored-by: Anton Kaliaev <[email protected]>
(cherry picked from commit c73455f)
@PaddyMc PaddyMc merged commit ca3ee6e into osmo-v25/v0.37.4 May 23, 2024
15 of 16 checks passed
@mergify mergify bot deleted the mergify/bp/osmo-v25/v0.37.4/pr-62 branch May 23, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants