Skip to content

Removed peer authenticated assert in Floodgate::broadcast #4680

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

Merged
merged 1 commit into from
Mar 31, 2025

Conversation

SirTyson
Copy link
Contributor

Description

Resolves https://github.com/stellar/stellar-core-internal/issues/335

This PR removes an expensive assert in Floodgate::broadcast. This assert had to acquire mStateMutex from the main thread, but would often be blocked by the background thread. During periods of high load (1850 TPS), waiting for this mutex would double the median time of broadcast. Because a peer's authenticated state can only be changed from the mainthread anyway, the assert was replaced with a lockless main thread assert. During testing at 1850 TPS, this change resulted in a 15% decrease of txset fetch time, as well as a 10% decrease in nomination latency.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

Copy link
Contributor

@marta-lokhova marta-lokhova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! We can merge this in the public repo

@SirTyson SirTyson merged commit 3ec24ee into stellar:release/v22.3.0 Mar 31, 2025
13 checks passed
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