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

feat: permit unpaid queries when executed from localhost #15554

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

MiroslavGatsanoga
Copy link
Collaborator

@MiroslavGatsanoga MiroslavGatsanoga commented Sep 19, 2024

Description:

  • Update NettyGrpcServerManager to run additional localhost-only node operator gRPC server on a separate port that can be configured with grpc.nodeOperatorPort config property
  • The node operator server will only have query methods registered
  • Enabling the node operator server is behind a grpc.nodeOperatorPortEnabled feature flag, currently defaulting to false
  • Update QueryWorkflow.handleQuery method to accept additional boolean parameter that indicates if the workflow should charge for handling queries (the node operator server is should not be charged or throttled when making queries)
  • Update test-clients so that SubProcessNetwork's nodes can have node operator servers listening on different ports

Related issue(s):

Fixes #11211

Notes for reviewer:

Checklist

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

Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
@MiroslavGatsanoga MiroslavGatsanoga added this to the v0.56 milestone Sep 19, 2024
@MiroslavGatsanoga MiroslavGatsanoga self-assigned this Sep 19, 2024
Copy link

codacy-production bot commented Sep 19, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.01% (target: -1.00%) 89.66%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (729ae99) 109310 67484 61.74%
Head commit (4c88f60) 109350 (+40) 67520 (+36) 61.75% (+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 (#15554) 58 52 89.66%

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

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 82.75862% with 10 lines in your changes missing coverage. Please review.

Project coverage is 58.20%. Comparing base (729ae99) to head (4c88f60).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...de/app/grpc/impl/netty/NettyGrpcServerManager.java 84.00% 5 Missing and 3 partials ⚠️
...n/java/com/hedera/node/config/data/GrpcConfig.java 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             develop   #15554   +/-   ##
==========================================
  Coverage      58.19%   58.20%           
- Complexity     21608    21622   +14     
==========================================
  Files           2785     2785           
  Lines         109493   109533   +40     
  Branches       11200    11204    +4     
==========================================
+ Hits           63724    63756   +32     
- Misses         41899    41903    +4     
- Partials        3870     3874    +4     
Files with missing lines Coverage Δ
...ava/com/hedera/node/app/grpc/impl/QueryMethod.java 100.00% <100.00%> (ø)
...a/node/app/grpc/impl/netty/GrpcServiceBuilder.java 98.46% <100.00%> (ø)
...ra/node/app/workflows/query/QueryWorkflowImpl.java 87.71% <100.00%> (ø)
...n/java/com/hedera/node/config/data/GrpcConfig.java 25.00% <0.00%> (-8.34%) ⬇️
...de/app/grpc/impl/netty/NettyGrpcServerManager.java 74.41% <84.00%> (+2.56%) ⬆️

... and 1 file with indirect coverage changes

Impacted file tree graph

…config

Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
…ports

Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
…uld be free

Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

Successfully merging this pull request may close these issues.

Permit unpaid queries when executed from localhost
1 participant