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

consensus: check votes signatures in parallel, not holding the consensus state mutex #2927

Open
ValarDragon opened this issue Apr 29, 2024 · 0 comments
Labels
consensus enhancement New feature or request

Comments

@ValarDragon
Copy link
Collaborator

ValarDragon commented Apr 29, 2024

Feature Request

Summary

Right now vote signatures are only checked inside of the consensus mutex, and therefore all block each other (and every other consensus operation, e.g. receiving block parts)

Each Vote should instead get its signature before a mutex is called. To do this, I think the handleMsg code needs to be refactored, to only take out a mutex if the vote passes signature check.

Problem Definition

Vote signature checking is expensive. 30s of consensus blocking CPU time, over 1 hour of an osmosis node being synced. Moreover this blocking behavior is at the most critical time. We want to mitigate the time under this consensus lock. To contextualize, all the Osmosis block execution for this 1 hour period is 159s. (And being brought down!)

image

@ValarDragon ValarDragon added enhancement New feature or request needs-triage This issue/PR has not yet been triaged by the team. labels Apr 29, 2024
@andynog andynog added consensus and removed needs-triage This issue/PR has not yet been triaged by the team. labels Apr 29, 2024
@cason cason changed the title Check tryAddVote signatures in parallel, outside of the consensus mutex consensus: check votes signatures in parallel, not holding the consensus state mutex May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants