Skip to content

Hardcoded Semaphore(8) in CommittingState serializes large validator committees #1721

Open

Description

@MuncleUscles

Problem

CommittingState.handle caps concurrent validator executions with a hardcoded asyncio.Semaphore(8) (backend/consensus/base.py:1925, introduced in #1272).

For large committees this dominates transaction latency: a 47-validator committee runs as ~6 sequential rounds of 8 (sliding window, but with similar per-validator LLM latencies it behaves like waves). This is the likely cause of the observed "47v is ~10× slower" behavior, and becomes increasingly relevant as appeals push committees to 23+.

Why the cap exists (and why 8 is arbitrary)

Bounding GenVM concurrency is legitimate:

  • each validator execution spawns a GenVM subprocess → unbounded concurrency risks OOM
  • uvloop fd-registry collisions from concurrent GenVM socket operations (hit on the RPC path, fixed in fix: bound rpc genvm calls and health scans #1648)
  • DB connection-pool exhaustion

But the value 8 is not derived from anything — not container memory limits, host RAM, or committee size. It's a static default from #1272 with no recorded rationale. Meanwhile the RPC path's equivalent bound is already configurable via GENVM_MAX_CONCURRENT (backend/protocol_rpc/endpoints.py:71, default 8).

Proposal

  1. Make the consensus-path bound configurable — either reuse GENVM_MAX_CONCURRENT or add a dedicated env var (e.g. CONSENSUS_VALIDATOR_CONCURRENCY), defaulting to the current 8 for backward compatibility.
  2. Deployments with adequate memory can then raise it to match committee sizes (23–47+) instead of paying a ~6× serialization penalty.

References

Activity

  1. added 3 commits that reference this issue on Aug 11, 2026
    701d497
    a83d7b6
    df4f055
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions