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: add config for grpc server methods #5886

Merged

Conversation

hansieodendaal
Copy link
Contributor

@hansieodendaal hansieodendaal commented Oct 30, 2023

Description

Added configuration options for the base node's gRPC methods whereby each method can be enabled or disabled with the startup-config settings.

Closing #5858

Some BloomRPC screenshots:

image

image

Motivation and Context

See #5858

How Has This Been Tested?

  • Pass existing unit tests
  • Added unit test fn it_deserializes_enums
  • Pass cucumber tests on CI
  • Manual gRPC queries to the base node (with BloomRPC)

What process can a PR reviewer use to test or verify this change?

  • Code walkthrough
  • Manual gRPC queries to the base node

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

@ghpbot-tari-project ghpbot-tari-project added P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Oct 30, 2023
@github-actions
Copy link

github-actions bot commented Oct 30, 2023

Test Results (CI)

1 244 tests   1 244 ✔️  9m 28s ⏱️
     39 suites         0 💤
       1 files           0

Results for commit 32ed96c.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 30, 2023

Test Results (Integration tests)

34 tests   34 ✔️  13m 0s ⏱️
11 suites    0 💤
  2 files      0

Results for commit 32ed96c.

♻️ This comment has been updated with latest results.

@hansieodendaal hansieodendaal force-pushed the ho_disable_base_node_grpc branch from 3e0c548 to bb610a7 Compare October 31, 2023 08:57
Copy link
Member

@sdbondi sdbondi left a comment

Choose a reason for hiding this comment

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

Think the idea is solid, I looked at tonic interceptors and middleware and there will be a way to do it, however tonic makes it very difficult (unless I missed something obvious), so happy to add a conditional to the start of every method.

The implementation adds more maintenance overhead than required. I think adding a list of methods that should be denied will make things easier to maintain.

applications/minotari_node/src/config.rs Outdated Show resolved Hide resolved
@hansieodendaal hansieodendaal force-pushed the ho_disable_base_node_grpc branch from bb610a7 to c8270d7 Compare October 31, 2023 09:09
Added configuration options for the base node's gRPC methods whereby each method can
be enabled or disabled with the startup config settings.
@hansieodendaal hansieodendaal force-pushed the ho_disable_base_node_grpc branch from c8270d7 to 32ed96c Compare October 31, 2023 13:03
@hansieodendaal hansieodendaal changed the title [wip] feat: add config for grpc server methods feat: add config for grpc server methods Oct 31, 2023
@ghpbot-tari-project ghpbot-tari-project removed the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Nov 1, 2023
@SWvheerden SWvheerden merged commit a3d7cf7 into tari-project:development Nov 1, 2023
15 of 16 checks passed
@hansieodendaal hansieodendaal deleted the ho_disable_base_node_grpc branch November 1, 2023 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-acks_required Process - Requires more ACKs or utACKs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants