From 884c9871621c0fe0e355e56b39e551dece3a6c73 Mon Sep 17 00:00:00 2001 From: Conor Schaefer Date: Mon, 16 Dec 2024 21:47:43 +0000 Subject: [PATCH] revert merge of 4966 to release/v80 (#4968) ## Describe your changes The PR https://github.com/penumbra-zone/penumbra/pull/4966 was mistakenly targeted against `release/v0.80.x`, which branch has fallen out of sync with main. If we want to make a Penumbra point release, PRs should target `main`, and we'll tag directly on main. Eventually we may want to revive `release/v0.80.x` and use it for backports, but that time is not now. By reverting the out-f-order merge from https://github.com/penumbra-zone/penumbra/pull/4966, we leave the door open to updating that branch in the future so it can be used to manage backports. ## Issue ticket number and link Just https://github.com/penumbra-zone/penumbra/pull/4966 is relevant. ## Checklist before requesting a review - [x] I have added guiding text to explain how a reviewer should test these changes. - [x] If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason: > this is a housekeeping commit, intended to cleanup git history and avoid confusion. --- crates/bin/pcli/src/command/query/chain.rs | 72 +++------------------- 1 file changed, 9 insertions(+), 63 deletions(-) diff --git a/crates/bin/pcli/src/command/query/chain.rs b/crates/bin/pcli/src/command/query/chain.rs index 025efa58c5..c02e7fde04 100644 --- a/crates/bin/pcli/src/command/query/chain.rs +++ b/crates/bin/pcli/src/command/query/chain.rs @@ -3,26 +3,18 @@ use comfy_table::{presets, Table}; use futures::TryStreamExt; use penumbra_app::params::AppParameters; use penumbra_proto::{ - core::{ - app::v1::{ - query_service_client::QueryServiceClient as AppQueryServiceClient, AppParametersRequest, - }, - component::{ - sct::v1::{ - query_service_client::QueryServiceClient as SctQueryServiceClient, - EpochByHeightRequest, - }, - stake::v1::{ - query_service_client::QueryServiceClient as StakeQueryServiceClient, - ValidatorInfoRequest, - }, - }, + core::app::v1::{ + query_service_client::QueryServiceClient as AppQueryServiceClient, AppParametersRequest, + }, + core::component::sct::v1::{ + query_service_client::QueryServiceClient as SctQueryServiceClient, EpochByHeightRequest, + }, + core::component::stake::v1::{ + query_service_client::QueryServiceClient as StakeQueryServiceClient, ValidatorInfoRequest, }, util::tendermint_proxy::v1::{ - tendermint_proxy_service_client::TendermintProxyServiceClient, AbciQueryRequest, - GetStatusRequest, + tendermint_proxy_service_client::TendermintProxyServiceClient, GetStatusRequest, }, - Message, }; use penumbra_stake::validator; @@ -38,7 +30,6 @@ pub enum ChainCmd { #[clap(short, long)] verbose: bool, }, - DetectDesync, } pub struct Stats { @@ -143,51 +134,6 @@ impl ChainCmd { pub async fn exec(&self, app: &mut App) -> Result<()> { match self { - ChainCmd::DetectDesync => { - let mut client = TendermintProxyServiceClient::new(app.pd_channel().await?); - let status = client - .get_status(GetStatusRequest::default()) - .await? - .into_inner() - .sync_info - .ok_or_else(|| anyhow!("missing sync_info"))?; - - let mut app_client = AppQueryServiceClient::new(app.pd_channel().await?); - let params = app_client - .app_parameters(AppParametersRequest {}) - .await? - .into_inner() - .app_parameters - .unwrap(); - let chain_id = params.chain_id; - - let height = status.latest_block_height as i64; - - let response = client - .abci_query(AbciQueryRequest { - data: b"sct/block_manager/block_height".to_vec(), - path: "state/key".to_string(), - height, - prove: false, - }) - .await? - .into_inner(); - - let raw_height_response = response.value; - let height_response: u64 = Message::decode(&raw_height_response[..]) - .map_err(|e| anyhow!("failed to decode height response: {}", e))?; - - println!("chain_id: {}", chain_id); - println!("queried height: {}", height); - println!("height response: {}", height_response); - if height == height_response as i64 { - println!( - "Unaffected. No action item. The full node internal state version tracks the block height." - ); - } else { - println!("Affected. The full node chain state is corrupted, please resync your node."); - } - } ChainCmd::Params => { self.print_app_params(app).await?; }