-
Notifications
You must be signed in to change notification settings - Fork 219
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
fix!: change grpc deny to allow #6177
fix!: change grpc deny to allow #6177
Conversation
@@ -13,39 +14,26 @@ grpc_enabled = true | |||
#grpc_tls_enabled = false | |||
|
|||
# Uncomment all gRPC server methods that should be denied default (only active when `grpc_enabled = true`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Uncomment all gRPC server methods that should be denied default (only active when `grpc_enabled = true`) | |
# All gRPC server methods that should be allowed (only active when `grpc_enabled = true`) |
grpc_server_allow_methods = [ | ||
"get_version", | ||
"check_for_updates", | ||
"get_sync_info", | ||
"get_sync_progress", | ||
#"get_tip_info", | ||
"identify", | ||
"get_network_status", | ||
#"list_headers", | ||
"get_header_by_hash", | ||
"get_blocks", | ||
"get_block_timing", | ||
"get_constants", | ||
"get_block_size", | ||
"get_block_fees", | ||
#"get_tokens_in_circulation", | ||
#"get_network_difficulty", | ||
#"get_new_block_template", | ||
#"get_new_block", | ||
#"get_new_block_blob", | ||
#"submit_block", | ||
#"submit_block_blob", | ||
#"submit_transaction", | ||
#"search_kernels", | ||
#"search_utxos", | ||
#"fetch_matching_utxos", | ||
"get_peers", | ||
"get_mempool_transactions", | ||
#"transaction_state", | ||
#"list_connected_peers", | ||
#"get_mempool_stats", | ||
#"get_active_validator_nodes", | ||
#"get_shard_key", | ||
#"get_template_registrations", | ||
#"get_side_chain_utxos", | ||
"get_tip_info", | ||
"list_headers", | ||
"get_tokens_in_circulation", | ||
"get_network_difficulty", | ||
"get_new_block_template", | ||
"get_new_block", | ||
"get_new_block_blob", | ||
"submit_block", | ||
"submit_block_blob", | ||
"submit_transaction", | ||
"search_kernels", | ||
"search_utxos", | ||
"fetch_matching_utxos", | ||
"transaction_state", | ||
"list_connected_peers", | ||
"get_mempool_stats", | ||
"get_active_validator_nodes", | ||
"get_shard_key", | ||
"get_template_registrations", | ||
"get_side_chain_utxos", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the missing methods back in but commented out
grpc_server_allow_methods = [ | ||
"get_version", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto other methods commented out
Test Results (Integration tests)12 tests +12 12 ✅ +12 59s ⏱️ +59s For more details on these parsing errors, see this check. Results for commit 65dd095. ± Comparison against base commit 464f2c3. ♻️ This comment has been updated with latest results. |
Test Results (CI) 3 files 117 suites 39m 12s ⏱️ Results for commit 65dd095. ♻️ This comment has been updated with latest results. |
# Uncomment all gRPC server methods that should be denied default (only active when `grpc_enabled = true`) | ||
grpc_server_deny_methods = [ | ||
grpc_server_allow_methods = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is still outdated
# Uncomment all gRPC server methods that should be denied default (only active when `grpc_enabled = true`) | ||
grpc_server_deny_methods = [ | ||
grpc_server_allow_methods = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto comment outdated
base_node_config.base_node.grpc_server_allow_methods = vec![]; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this list must be fully populated now instead of being left empty.
Cucumber errors:
Captured output: called `Result::unwrap()` on an `Err` value: Status { code: PermissionDenied, message: "`ListConnectedPeers` method not made available"
Step panicked. Captured output: called `Result::unwrap()` on an `Err` value: ExitError { exit_code: GrpcError, details: Some("Base node not responding to gRPC requests: 'get_new_block_template'") }
Step panicked. Captured output: called `Result::unwrap()` on an `Err` value: Status { code: PermissionDenied, message: "`GetTipInfo` method not made available",
Replacing this with: #6218 |
Description --- Removes the antipattern of a deny list and puts in an allow list Motivation and Context --- A deny list is an antipattern because new methods are not automatically added to the list Replaces: #6177 --------- Co-authored-by: stringhandler <[email protected]> Co-authored-by: Stan Bondi <[email protected]> Co-authored-by: Hansie Odendaal <[email protected]>
Description
Removes the antipattern of a deny list and puts in an allow list
Motivation and Context
A deny list is an antipattern because new methods are not automatically added to the list
How Has This Been Tested?
Tested with dan testing
What process can a PR reviewer use to test or verify this change?
Breaking Changes
BREAKING CHANGE: Removed
grpc_server_deny_methods
and addedgrpc_server_allow_methods