Skip to content

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

Open

Description

@ValarDragon

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

Activity

  1. added
    enhancement
    needs-triage
    on Apr 29, 2024
  2. added and removed
    needs-triage
    on Apr 29, 2024
  3. 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[/+] on May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    consensusenhancement

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions