Skip to content

Commit

Permalink
revert merge of 4966 to release/v80 (#4968)
Browse files Browse the repository at this point in the history
## Describe your changes

The PR #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 #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 #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.
  • Loading branch information
conorsch authored Dec 16, 2024
1 parent 626fbed commit 884c987
Showing 1 changed file with 9 additions and 63 deletions.
72 changes: 9 additions & 63 deletions crates/bin/pcli/src/command/query/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -38,7 +30,6 @@ pub enum ChainCmd {
#[clap(short, long)]
verbose: bool,
},
DetectDesync,
}

pub struct Stats {
Expand Down Expand Up @@ -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?;
}
Expand Down

0 comments on commit 884c987

Please sign in to comment.