From a3d7cf771663d2b3c3585796ef502ab00f569ba0 Mon Sep 17 00:00:00 2001 From: Hansie Odendaal <39146854+hansieodendaal@users.noreply.github.com> Date: Wed, 1 Nov 2023 08:33:30 +0200 Subject: [PATCH] feat: add config for grpc server methods (#5886) 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](https://github.com/tari-project/tari/assets/39146854/356cbe44-d3ff-46c8-9215-57e9f24da815) ![image](https://github.com/tari-project/tari/assets/39146854/8bf225b8-1b00-439b-96be-93c8040bf8d4) 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 --- - [x] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify --- Cargo.lock | 1 + applications/minotari_node/Cargo.toml | 3 + applications/minotari_node/src/config.rs | 92 ++++++++++++ .../src/grpc/base_node_grpc_server.rs | 136 +++++++++++++++++- applications/minotari_node/src/lib.rs | 5 +- common/config/presets/c_base_node.toml | 38 +++++ integration_tests/src/base_node_process.rs | 3 + 7 files changed, 276 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3fca8d1abc..e2c4905075 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3270,6 +3270,7 @@ dependencies = [ "tari_utilities", "thiserror", "tokio", + "toml 0.5.11", "tonic 0.6.2", ] diff --git a/applications/minotari_node/Cargo.toml b/applications/minotari_node/Cargo.toml index 19148b0666..5be6ccae4d 100644 --- a/applications/minotari_node/Cargo.toml +++ b/applications/minotari_node/Cargo.toml @@ -65,3 +65,6 @@ ignored = [ # We need to specify extra features for log4rs even though it is not used directly in this crate "log4rs" ] + +[dev-dependencies] +toml = { version = "0.5" } diff --git a/applications/minotari_node/src/config.rs b/applications/minotari_node/src/config.rs index c2e9c4081a..29f508e35c 100644 --- a/applications/minotari_node/src/config.rs +++ b/applications/minotari_node/src/config.rs @@ -87,6 +87,8 @@ pub struct BaseNodeConfig { pub grpc_enabled: bool, /// GRPC address of base node pub grpc_address: Option, + /// GRPC server config - which methods are active and which not + pub grpc_server_deny_methods: Vec, /// A path to the file that stores the base node identity and secret key pub identity_file: PathBuf, /// Spin up and use a built-in Tor instance. This only works on macos/linux - requires that the wallet was built @@ -143,6 +145,16 @@ impl Default for BaseNodeConfig { network: Network::default(), grpc_enabled: true, grpc_address: None, + grpc_server_deny_methods: vec![ + // These gRPC server methods share sensitive information, thus disabled by default + GrpcMethod::GetVersion, + GrpcMethod::CheckForUpdates, + GrpcMethod::GetSyncInfo, + GrpcMethod::GetSyncProgress, + GrpcMethod::GetTipInfo, + GrpcMethod::Identify, + GrpcMethod::GetNetworkStatus, + ], identity_file: PathBuf::from("config/base_node_id.json"), use_libtor: false, tor_identity_file: PathBuf::from("config/base_node_tor_id.json"), @@ -195,3 +207,83 @@ impl BaseNodeConfig { pub enum DatabaseType { Lmdb, } + +/// A list of all the GRPC methods that can be enabled/disabled +#[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq)] +#[serde(rename_all = "snake_case")] +pub enum GrpcMethod { + ListHeaders, + GetHeaderByHash, + GetBlocks, + GetBlockTiming, + GetConstants, + GetBlockSize, + GetBlockFees, + GetVersion, + CheckForUpdates, + GetTokensInCirculation, + GetNetworkDifficulty, + GetNewBlockTemplate, + GetNewBlock, + GetNewBlockBlob, + SubmitBlock, + SubmitBlockBlob, + SubmitTransaction, + GetSyncInfo, + GetSyncProgress, + GetTipInfo, + SearchKernels, + SearchUtxos, + FetchMatchingUtxos, + GetPeers, + GetMempoolTransactions, + TransactionState, + Identify, + GetNetworkStatus, + ListConnectedPeers, + GetMempoolStats, + GetActiveValidatorNodes, + GetShardKey, + GetTemplateRegistrations, + GetSideChainUtxos, +} + +#[cfg(test)] +mod tests { + use serde::{Deserialize, Serialize}; + + use crate::config::GrpcMethod; + + #[derive(Clone, Serialize, Deserialize, Debug)] + #[allow(clippy::struct_excessive_bools)] + struct TestConfig { + name: String, + inner_config: TestInnerConfig, + } + + #[derive(Clone, Serialize, Deserialize, Debug)] + #[allow(clippy::struct_excessive_bools)] + struct TestInnerConfig { + deny_methods: Vec, + } + + #[test] + fn it_deserializes_enums() { + let config_str = r#"name = "blockchain champion" + inner_config.deny_methods = [ + "list_headers", + "get_constants", + # "get_blocks" + "identify", + # "get_shard_key" + ]"#; + let config = toml::from_str::(config_str).unwrap(); + + // Enums in the config + assert!(config.inner_config.deny_methods.contains(&GrpcMethod::ListHeaders)); + assert!(config.inner_config.deny_methods.contains(&GrpcMethod::GetConstants)); + assert!(!config.inner_config.deny_methods.contains(&GrpcMethod::GetBlocks)); // commented out in the config + assert!(config.inner_config.deny_methods.contains(&GrpcMethod::Identify)); + assert!(!config.inner_config.deny_methods.contains(&GrpcMethod::GetShardKey)); // commented out in the config + } +} diff --git a/applications/minotari_node/src/grpc/base_node_grpc_server.rs b/applications/minotari_node/src/grpc/base_node_grpc_server.rs index 26900e496d..48bf9b9b3a 100644 --- a/applications/minotari_node/src/grpc/base_node_grpc_server.rs +++ b/applications/minotari_node/src/grpc/base_node_grpc_server.rs @@ -58,6 +58,7 @@ use tonic::{Request, Response, Status}; use crate::{ builder::BaseNodeContext, + config::GrpcMethod, grpc::{ blocks::{block_fees, block_heights, block_size, GET_BLOCKS_MAX_HEIGHTS, GET_BLOCKS_PAGE_SIZE}, hash_rate::HashRateMovingAverage, @@ -94,10 +95,11 @@ pub struct BaseNodeGrpcServer { comms: CommsNode, liveness: LivenessHandle, report_grpc_error: bool, + deny_methods: Vec, } impl BaseNodeGrpcServer { - pub fn from_base_node_context(ctx: &BaseNodeContext) -> Self { + pub fn from_base_node_context(ctx: &BaseNodeContext, deny_methods: Vec) -> Self { Self { node_service: ctx.local_node(), mempool_service: ctx.local_mempool(), @@ -108,12 +110,17 @@ impl BaseNodeGrpcServer { comms: ctx.base_node_comms().clone(), liveness: ctx.liveness(), report_grpc_error: ctx.get_report_grpc_error(), + deny_methods, } } pub fn report_error_flag(&self) -> bool { self.report_grpc_error } + + fn is_method_enabled(&self, grpc_method: GrpcMethod) -> bool { + !self.deny_methods.contains(&grpc_method) + } } pub fn obscure_error_if_true(report: bool, status: Status) -> Status { @@ -152,6 +159,11 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetNetworkDifficulty) { + return Err(Status::permission_denied( + "`GetNetworkDifficulty` method not made available", + )); + } let report_error_flag = self.report_error_flag(); let request = request.into_inner(); debug!( @@ -256,6 +268,11 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetMempoolTransactions) { + return Err(Status::permission_denied( + "`GetMempoolTransactions` method not made available", + )); + } let report_error_flag = self.report_error_flag(); let _request = request.into_inner(); debug!(target: LOG_TARGET, "Incoming GRPC request for GetMempoolTransactions",); @@ -316,6 +333,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::ListHeaders) { + return Err(Status::permission_denied("`ListHeaders` method not made available")); + } let report_error_flag = self.report_error_flag(); let request = request.into_inner(); debug!( @@ -480,6 +500,11 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetNewBlockTemplate) { + return Err(Status::permission_denied( + "`GetNewBlockTemplate` method not made available", + )); + } let report_error_flag = self.report_error_flag(); let request = request.into_inner(); debug!(target: LOG_TARGET, "Incoming GRPC request for get new block template"); @@ -532,6 +557,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetNewBlock) { + return Err(Status::permission_denied("`GetNewBlock` method not made available")); + } let report_error_flag = self.report_error_flag(); let request = request.into_inner(); debug!(target: LOG_TARGET, "Incoming GRPC request for get new block"); @@ -589,6 +617,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetNewBlockBlob) { + return Err(Status::permission_denied("`GetNewBlockBlob` method not made available")); + } let request = request.into_inner(); debug!(target: LOG_TARGET, "Incoming GRPC request for get new block blob"); let block_template: NewBlockTemplate = request @@ -640,6 +671,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::SubmitBlock) { + return Err(Status::permission_denied("`SubmitBlock` method not made available")); + } let report_error_flag = self.report_error_flag(); let request = request.into_inner(); let block = @@ -669,6 +703,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::SubmitBlockBlob) { + return Err(Status::permission_denied("`SubmitBlockBlob` method not made available")); + } debug!(target: LOG_TARGET, "Received block blob from miner: {:?}", request); let request = request.into_inner(); debug!(target: LOG_TARGET, "request: {:?}", request); @@ -706,6 +743,11 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::SubmitTransaction) { + return Err(Status::permission_denied( + "`SubmitTransaction` method not made available", + )); + } let report_error_flag = self.report_error_flag(); let request = request.into_inner(); let txn: Transaction = request @@ -752,6 +794,11 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::TransactionState) { + return Err(Status::permission_denied( + "`TransactionState` method not made available", + )); + } let report_error_flag = self.report_error_flag(); let request = request.into_inner(); let excess_sig: Signature = request @@ -828,6 +875,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, _request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetPeers) { + return Err(Status::permission_denied("`GetPeers` method not made available")); + } let report_error_flag = self.report_error_flag(); debug!(target: LOG_TARGET, "Incoming GRPC request for get all peers"); @@ -860,6 +910,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetBlocks) { + return Err(Status::permission_denied("`GetBlocks` method not made available")); + } let report_error_flag = self.report_error_flag(); let request = request.into_inner(); debug!( @@ -925,6 +978,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, _request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetTipInfo) { + return Err(Status::permission_denied("`GetTipInfo` method not made available")); + } let report_error_flag = self.report_error_flag(); debug!(target: LOG_TARGET, "Incoming GRPC request for BN tip data"); @@ -952,6 +1008,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::SearchKernels) { + return Err(Status::permission_denied("`SearchKernels` method not made available")); + } let report_error_flag = self.report_error_flag(); debug!(target: LOG_TARGET, "Incoming GRPC request for SearchKernels"); let request = request.into_inner(); @@ -1002,6 +1061,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::SearchUtxos) { + return Err(Status::permission_denied("`SearchUtxos` method not made available")); + } let report_error_flag = self.report_error_flag(); debug!(target: LOG_TARGET, "Incoming GRPC request for SearchUtxos"); let request = request.into_inner(); @@ -1052,6 +1114,11 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::FetchMatchingUtxos) { + return Err(Status::permission_denied( + "`FetchMatchingUtxos` method not made available", + )); + } let report_error_flag = self.report_error_flag(); debug!(target: LOG_TARGET, "Incoming GRPC request for FetchMatchingUtxos"); let request = request.into_inner(); @@ -1115,6 +1182,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetBlockTiming) { + return Err(Status::permission_denied("`GetBlockTiming` method not made available")); + } let report_error_flag = self.report_error_flag(); let request = request.into_inner(); debug!( @@ -1161,6 +1231,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetConstants) { + return Err(Status::permission_denied("`GetConstants` method not made available")); + } debug!(target: LOG_TARGET, "Incoming GRPC request for GetConstants",); debug!(target: LOG_TARGET, "Sending GetConstants response to client"); @@ -1180,6 +1253,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetBlockSize) { + return Err(Status::permission_denied("`GetBlockSize` method not made available")); + } let report_error_flag = self.report_error_flag(); get_block_group( self.node_service.clone(), @@ -1194,6 +1270,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetBlockFees) { + return Err(Status::permission_denied("`GetBlockFees` method not made available")); + } let report_error_flag = self.report_error_flag(); get_block_group( self.node_service.clone(), @@ -1205,6 +1284,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { } async fn get_version(&self, _request: Request) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetVersion) { + return Err(Status::permission_denied("`GetVersion` method not made available")); + } Ok(Response::new(consts::APP_VERSION.to_string().into())) } @@ -1212,6 +1294,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, _request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::CheckForUpdates) { + return Err(Status::permission_denied("`CheckForUpdates` method not made available")); + } let mut resp = tari_rpc::SoftwareUpdate::default(); if let Some(ref update) = *self.software_updater.update_notifier().borrow() { @@ -1228,6 +1313,11 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetTokensInCirculation) { + return Err(Status::permission_denied( + "`GetTokensInCirculation` method not made available", + )); + } debug!(target: LOG_TARGET, "Incoming GRPC request for GetTokensInCirculation",); let request = request.into_inner(); let mut heights = request.heights; @@ -1279,6 +1369,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, _request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetSyncProgress) { + return Err(Status::permission_denied("`GetSyncProgress` method not made available")); + } let state = self .state_machine_handle .get_status_info_watch() @@ -1323,6 +1416,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, _request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetSyncInfo) { + return Err(Status::permission_denied("`GetSyncInfo` method not made available")); + } debug!(target: LOG_TARGET, "Incoming GRPC request for BN sync data"); let response = self .state_machine_handle @@ -1350,6 +1446,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetHeaderByHash) { + return Err(Status::permission_denied("`GetHeaderByHash` method not made available")); + } let report_error_flag = self.report_error_flag(); let tari_rpc::GetHeaderByHashRequest { hash } = request.into_inner(); let mut node_service = self.node_service.clone(); @@ -1381,6 +1480,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { } async fn identify(&self, _: Request) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::Identify) { + return Err(Status::permission_denied("`Identify` method not made available")); + } let identity = self.comms.node_identity_ref(); Ok(Response::new(tari_rpc::NodeIdentity { public_key: identity.public_key().to_vec(), @@ -1393,6 +1495,11 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, _: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetNetworkStatus) { + return Err(Status::permission_denied( + "`GetNetworkStatus` method not made available", + )); + } let report_error_flag = self.report_error_flag(); let status = self .comms @@ -1424,6 +1531,11 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, _: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::ListConnectedPeers) { + return Err(Status::permission_denied( + "`ListConnectedPeers` method not made available", + )); + } let report_error_flag = self.report_error_flag(); let mut connectivity = self.comms.connectivity(); let peer_manager = self.comms.peer_manager(); @@ -1459,6 +1571,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, _: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetMempoolStats) { + return Err(Status::permission_denied("`GetMempoolStats` method not made available")); + } let report_error_flag = self.report_error_flag(); let mut mempool_handle = self.mempool_service.clone(); @@ -1480,6 +1595,9 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetShardKey) { + return Err(Status::permission_denied("`GetShardKey` method not made available")); + } let request = request.into_inner(); let report_error_flag = self.report_error_flag(); let mut handler = self.node_service.clone(); @@ -1507,6 +1625,11 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetActiveValidatorNodes) { + return Err(Status::permission_denied( + "`GetActiveValidatorNodes` method not made available", + )); + } let request = request.into_inner(); debug!(target: LOG_TARGET, "Incoming GRPC request for GetActiveValidatorNodes"); @@ -1548,6 +1671,11 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetTemplateRegistrations) { + return Err(Status::permission_denied( + "`GetTemplateRegistrations` method not made available", + )); + } let request = request.into_inner(); let report_error_flag = self.report_error_flag(); debug!(target: LOG_TARGET, "Incoming GRPC request for GetTemplateRegistrations"); @@ -1631,10 +1759,16 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { Ok(Response::new(rx)) } + #[allow(clippy::too_many_lines)] async fn get_side_chain_utxos( &self, request: Request, ) -> Result, Status> { + if !self.is_method_enabled(GrpcMethod::GetSideChainUtxos) { + return Err(Status::permission_denied( + "`GetSideChainUtxos` method not made available", + )); + } let request = request.into_inner(); let report_error_flag = self.report_error_flag(); debug!(target: LOG_TARGET, "Incoming GRPC request for GetTemplateRegistrations"); diff --git a/applications/minotari_node/src/lib.rs b/applications/minotari_node/src/lib.rs index 34b4207882..f6f3c2d0aa 100644 --- a/applications/minotari_node/src/lib.rs +++ b/applications/minotari_node/src/lib.rs @@ -133,7 +133,10 @@ pub async fn run_base_node_with_cli( format!("/ip4/127.0.0.1/tcp/{}", port).parse().unwrap() }); // Go, GRPC, go go - let grpc = grpc::base_node_grpc_server::BaseNodeGrpcServer::from_base_node_context(&ctx); + let grpc = grpc::base_node_grpc_server::BaseNodeGrpcServer::from_base_node_context( + &ctx, + config.base_node.grpc_server_deny_methods.clone(), + ); task::spawn(run_grpc(grpc, grpc_address, shutdown.to_signal())); } diff --git a/common/config/presets/c_base_node.toml b/common/config/presets/c_base_node.toml index d47e48d1a1..d6d8db46c9 100644 --- a/common/config/presets/c_base_node.toml +++ b/common/config/presets/c_base_node.toml @@ -33,6 +33,44 @@ identity_file = "config/base_node_id_nextnet.json" # Set to false to disable the base node GRPC server (default = true) #grpc_enabled = true +# Uncomment all gRPC server methods that should be denied default (only active when `grpc_enabled = true`) +grpc_server_deny_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" +] + # A path to the file that stores your node identity and secret key (default = "config/base_node_id.json") #identity_file = "config/base_node_id.json" diff --git a/integration_tests/src/base_node_process.rs b/integration_tests/src/base_node_process.rs index e1a5d5ff85..cefe6b9af9 100644 --- a/integration_tests/src/base_node_process.rs +++ b/integration_tests/src/base_node_process.rs @@ -80,6 +80,7 @@ pub async fn spawn_base_node(world: &mut TariWorld, is_seed_node: bool, bn_name: spawn_base_node_with_config(world, is_seed_node, bn_name, peers, BaseNodeConfig::default()).await; } +#[allow(clippy::too_many_lines)] pub async fn spawn_base_node_with_config( world: &mut TariWorld, is_seed_node: bool, @@ -184,6 +185,8 @@ pub async fn spawn_base_node_with_config( base_node_config.base_node.storage.pruning_interval = 1; }; + base_node_config.base_node.grpc_server_deny_methods = vec![]; + // Heirachically set the base path for all configs base_node_config.base_node.set_base_path(temp_dir_path.clone());