Skip to content

feat: BehindPublisher limit#23321

Open
petreze wants to merge 10 commits intomainfrom
23250-behind-publisher-rate-limit
Open

feat: BehindPublisher limit#23321
petreze wants to merge 10 commits intomainfrom
23250-behind-publisher-rate-limit

Conversation

@petreze
Copy link
Contributor

@petreze petreze commented Feb 4, 2026

Description:
This PR handles the possibility of multiple BehindPublisher responses returned from BNs. We should allow receiving at most 1 such responses and if we receive a 2nd one, we should end the stream with code RESET and reschedule the connection after a configurable period of time (behindPublisherScheduleDelay - default 30 seconds). The maxBehindPublishersAllowed is also a configurable property, defaulted to 1

Related issue(s):

Fixes #23250

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Petar Tonev <petar.tonev@limechain.tech>
# Conflicts:
#	hedera-node/hedera-config/src/main/java/com/hedera/node/config/data/BlockNodeConnectionConfig.java
@petreze petreze self-assigned this Feb 4, 2026
@lfdt-bot
Copy link

lfdt-bot commented Feb 4, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Signed-off-by: Petar Tonev <petar.tonev@limechain.tech>
@codacy-production
Copy link

codacy-production bot commented Feb 5, 2026

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.01% (target: -1.00%) 92.16%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (63f96a2) 91263 74843 82.01%
Head commit (e59bff0) 91312 (+49) 74888 (+45) 82.01% (+0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#23321) 51 47 92.16%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 88.23529% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...cks/impl/streaming/BlockNodeConnectionManager.java 78.26% 4 Missing and 1 partial ⚠️
...s/impl/streaming/BlockNodeStreamingConnection.java 92.85% 0 Missing and 1 partial ⚠️

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #23321   +/-   ##
=======================================
  Coverage        ?   78.02%           
  Complexity      ?    23416           
=======================================
  Files           ?     2458           
  Lines           ?    91495           
  Branches        ?     9713           
=======================================
  Hits            ?    71392           
  Misses          ?    16507           
  Partials        ?     3596           
Files with missing lines Coverage Δ Complexity Δ
...node/app/blocks/impl/streaming/BlockNodeStats.java 90.56% <100.00%> (ø) 16.00 <5.00> (?)
...ra/node/config/data/BlockNodeConnectionConfig.java 100.00% <ø> (ø) 1.00 <0.00> (?)
...s/impl/streaming/BlockNodeStreamingConnection.java 88.70% <92.85%> (ø) 85.00 <1.00> (?)
...cks/impl/streaming/BlockNodeConnectionManager.java 89.96% <78.26%> (ø) 92.00 <7.00> (?)

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@petreze petreze marked this pull request as ready for review February 5, 2026 11:52
@petreze petreze requested a review from a team as a code owner February 5, 2026 11:52
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.

Block Node BehindPublisher limiting

2 participants