Skip to content

feat(consensus): make validator execution concurrency configurable (v0.123) - #1723

Merged
MuncleUscles merged 1 commit into
v0.123-devfrom
feat/validator-concurrency-config-v0123
Aug 11, 2026
Merged

feat(consensus): make validator execution concurrency configurable (v0.123)#1723
MuncleUscles merged 1 commit into
v0.123-devfrom
feat/validator-concurrency-config-v0123

Conversation

@MuncleUscles

Copy link
Copy Markdown
Member

Refs #1721 — port of the same change targeting v0.121.

What

  • Replace the hardcoded asyncio.Semaphore(8) in CommittingState.handle with a module-level VALIDATOR_MAX_CONCURRENT read from the CONSENSUS_VALIDATOR_MAX_CONCURRENT env var (default 8, clamped to >= 1).
  • Update the stale comment in backend/protocol_rpc/endpoints.py that referenced the hardcoded value.
  • Document the new variable in .env.example.

Why

A 47-validator committee currently runs through a fixed window of 8 concurrent validator executions (~6 sequential rounds), dominating transaction latency. The cap itself is legitimate (GenVM subprocess memory / fd / DB-pool bounds) but the value 8 was arbitrary and not tunable. Deployments with adequate memory can now size it to their committee sizes. Default behavior is unchanged.

Testing done

  • python3 -m py_compile on both edited modules.
  • No behavior change with the variable unset (default 8).

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bf1af3ae-bcba-45c9-ad52-045dbca3e9a5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
25.0% Coverage on New Code (required ≥ 80%)
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@MuncleUscles

Copy link
Copy Markdown
Member Author

/run-e2e studio

4 similar comments
@MuncleUscles

Copy link
Copy Markdown
Member Author

/run-e2e studio

@MuncleUscles

Copy link
Copy Markdown
Member Author

/run-e2e studio

@MuncleUscles

Copy link
Copy Markdown
Member Author

/run-e2e studio

@MuncleUscles

Copy link
Copy Markdown
Member Author

/run-e2e studio

Replace the hardcoded asyncio.Semaphore(8) in CommittingState with the CONSENSUS_VALIDATOR_MAX_CONCURRENT env var (default 8, min 1) so large committees (23-47+ validators) are not serialized into ~6 rounds of 8. Port of the v0.121 change. Refs #1721
@MuncleUscles
MuncleUscles force-pushed the feat/validator-concurrency-config-v0123 branch from e4a013f to a83d7b6 Compare August 11, 2026 10:09
@MuncleUscles
MuncleUscles changed the base branch from v0.123 to v0.123-dev August 11, 2026 10:09
@MuncleUscles

Copy link
Copy Markdown
Member Author

Retargeted to v0.123-dev (rebased, same change). The prior E2E failures were not this PR: the v0.6 e2e train tests the fee-enabled stack (sim_getFeeConfig via genlayer-js v2 / cli v0.40 / wallet v0.2), which exists on v0.123-dev (fee accounting restored in 9e7bd54) but not on the stale v0.123 release branch — so all tooling components died on Method not found: sim_getFeeConfig regardless of this diff. Per the release flow, v0.123 only receives promotions from -dev and shouldn't be a direct PR target.

/run-e2e studio

@MuncleUscles

Copy link
Copy Markdown
Member Author

/run-e2e studio

@MuncleUscles
MuncleUscles merged commit df4f055 into v0.123-dev Aug 11, 2026
22 of 25 checks passed
@MuncleUscles
MuncleUscles deleted the feat/validator-concurrency-config-v0123 branch August 11, 2026 15:44
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.

1 participant