Skip to content
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

Deprecate TTFB, RESP_TIMEOUT, introduce MAX_CONCURRENT_REQUESTS #8839

Merged
merged 23 commits into from
Dec 11, 2024

Conversation

StefanBratanov
Copy link
Contributor

@StefanBratanov StefanBratanov commented Nov 20, 2024

PR Description

Main changes are in Eth2IncomingRequestHandler, Eth2OutgoingRequestHandler and RpcHandler

Reintroduced the timeouts as constants to handle slow servers. Furthermore, they could be should probably be configured per different methods. (as per the consensus-specs PR describes)

Fixed Issue(s)

related to #8803

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

@StefanBratanov StefanBratanov marked this pull request as ready for review November 23, 2024 19:03
@StefanBratanov StefanBratanov changed the title Replace TTFB, RESP_TIMEOUT with MAX_CONCURRENT_REQUESTS Deprecate TTFB, RESP_TIMEOUT, introduce MAX_CONCURRENT_REQUESTS Nov 25, 2024
@Nashatyrev
Copy link
Contributor

Shouldn't we remove the obsolete constants from NetworkingSpecConfig?

  // in seconds
  int getTtfbTimeout();

  // in seconds
  int getRespTimeout();

this.asyncRunner = asyncRunner;
this.rpcMethod = rpcMethod;
concurrentRequestsQueue = ThrottlingTaskQueue.create(maxConcurrentRequests);
Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I understand here we are limiting ourselves for max concurrent outgoing requests? Do we have the code which enforces inbound limit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean The responder MAY penalise peers that concurrently open more than MAX_CONCURRENT_REQUESTS streams for the same request type, for the protocol IDs defined in this specification. ? I was thinking it could be an incremental change and do it in a further PR since it is MAY instead of SHOULD/MUST.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, right! Fair point!

@StefanBratanov StefanBratanov force-pushed the p2p_deprecation branch 2 times, most recently from 17e8938 to b9e40de Compare December 4, 2024 11:15
@StefanBratanov
Copy link
Contributor Author

Shouldn't we remove the obsolete constants from NetworkingSpecConfig?

  // in seconds
  int getTtfbTimeout();

  // in seconds
  int getRespTimeout();

I tried doing this and there were some test failures regarding unrecognised constants. Think should look more into it.

Copy link
Contributor

@Nashatyrev Nashatyrev left a comment

Choose a reason for hiding this comment

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

LGTM

@StefanBratanov StefanBratanov changed the title Deprecate TTFB, RESP_TIMEOUT, introduce MAX_CONCURRENT_REQUESTS [DO NOT MERGE] Deprecate TTFB, RESP_TIMEOUT, introduce MAX_CONCURRENT_REQUESTS Dec 10, 2024
@StefanBratanov StefanBratanov changed the title [DO NOT MERGE] Deprecate TTFB, RESP_TIMEOUT, introduce MAX_CONCURRENT_REQUESTS Deprecate TTFB, RESP_TIMEOUT, introduce MAX_CONCURRENT_REQUESTS Dec 11, 2024
@StefanBratanov StefanBratanov enabled auto-merge (squash) December 11, 2024 09:36
@StefanBratanov StefanBratanov merged commit d633566 into Consensys:master Dec 11, 2024
17 checks passed
@StefanBratanov StefanBratanov deleted the p2p_deprecation branch December 11, 2024 10:31
tbenr added a commit to tbenr/teku that referenced this pull request Dec 11, 2024
tbenr added a commit that referenced this pull request Dec 11, 2024
StefanBratanov added a commit to StefanBratanov/teku that referenced this pull request Dec 12, 2024
StefanBratanov added a commit to StefanBratanov/teku that referenced this pull request Dec 12, 2024
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.

3 participants