From 4bedc5d317bad7464f79ce28ce18cdc21e954616 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Thu, 25 Jul 2024 15:45:00 -0600 Subject: [PATCH 1/3] Include full rpc api on enable_full_rpc --- src/kubernetes.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/kubernetes.rs b/src/kubernetes.rs index a29e579..9d18c4a 100644 --- a/src/kubernetes.rs +++ b/src/kubernetes.rs @@ -306,6 +306,7 @@ impl<'a> Kubernetes<'a> { if self.validator_config.enable_full_rpc { flags.push("--enable-rpc-transaction-history".to_string()); flags.push("--enable-extended-tx-metadata-storage".to_string()); + flags.push("--full-rpc-api".to_string()); } if let Some(limit_ledger_size) = self.validator_config.max_ledger_size { From fbfe4c53cf93cf86e79723113e9b5a0c1ebae342 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Thu, 25 Jul 2024 15:49:07 -0600 Subject: [PATCH 2/3] Put full-rpc flags in a separate method --- src/kubernetes.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/kubernetes.rs b/src/kubernetes.rs index 9d18c4a..be954b0 100644 --- a/src/kubernetes.rs +++ b/src/kubernetes.rs @@ -293,6 +293,12 @@ impl<'a> Kubernetes<'a> { ) } + fn generate_full_rpc_flags(flags: &mut Vec) { + flags.push("--enable-rpc-transaction-history".to_string()); + flags.push("--enable-extended-tx-metadata-storage".to_string()); + flags.push("--full-rpc-api".to_string()); + } + fn generate_command_flags(&self, flags: &mut Vec) { if self.validator_config.skip_poh_verify { flags.push("--skip-poh-verify".to_string()); @@ -304,9 +310,7 @@ impl<'a> Kubernetes<'a> { flags.push("--require-tower".to_string()); } if self.validator_config.enable_full_rpc { - flags.push("--enable-rpc-transaction-history".to_string()); - flags.push("--enable-extended-tx-metadata-storage".to_string()); - flags.push("--full-rpc-api".to_string()); + Self::generate_full_rpc_flags(flags); } if let Some(limit_ledger_size) = self.validator_config.max_ledger_size { From 5e2864a02d38aaa2e22b3f6116f63b92b494e369 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Thu, 25 Jul 2024 15:50:37 -0600 Subject: [PATCH 3/3] Always boot rpc nodes with full-rpc flags --- src/kubernetes.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/kubernetes.rs b/src/kubernetes.rs index be954b0..dd3617b 100644 --- a/src/kubernetes.rs +++ b/src/kubernetes.rs @@ -309,9 +309,6 @@ impl<'a> Kubernetes<'a> { if self.validator_config.require_tower { flags.push("--require-tower".to_string()); } - if self.validator_config.enable_full_rpc { - Self::generate_full_rpc_flags(flags); - } if let Some(limit_ledger_size) = self.validator_config.max_ledger_size { flags.push("--limit-ledger-size".to_string()); @@ -322,6 +319,9 @@ impl<'a> Kubernetes<'a> { fn generate_bootstrap_command_flags(&self) -> Vec { let mut flags: Vec = Vec::new(); self.generate_command_flags(&mut flags); + if self.validator_config.enable_full_rpc { + Self::generate_full_rpc_flags(&mut flags); + } flags } @@ -533,6 +533,9 @@ impl<'a> Kubernetes<'a> { fn generate_validator_command_flags(&self) -> Vec { let mut flags: Vec = Vec::new(); self.generate_command_flags(&mut flags); + if self.validator_config.enable_full_rpc { + Self::generate_full_rpc_flags(&mut flags); + } flags.push("--internal-node-stake-sol".to_string()); flags.push(self.validator_config.internal_node_stake_sol.to_string()); @@ -608,6 +611,7 @@ impl<'a> Kubernetes<'a> { flags.push("--expected-shred-version".to_string()); flags.push(shred_version.to_string()); } + Self::generate_full_rpc_flags(&mut flags); self.add_known_validators_if_exists(&mut flags);