Skip to content

Commit

Permalink
penumbra: fix all path, compiles
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanor committed Dec 25, 2024
1 parent 4a7e649 commit 3551d14
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ camino = { version = "1" }
chacha20poly1305 = { version = "0.9.0" }
chrono = { default-features = false, version = "0.4" }
clap = { version = "3.2" }
cnidarium = { version = "0.82", default-features = false}
cnidarium = { version = "0.82.1", default-features = false}
cnidarium-component = { default-features = false, path = "crates/cnidarium-component" }
cometindex = { path = "crates/util/cometindex" }
criterion = { version = "0.4" }
Expand Down
16 changes: 7 additions & 9 deletions crates/bin/pcli/src/command/query.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anyhow::{anyhow, Result};
use anyhow::{anyhow, Context, Result};

pub(crate) mod auction;
mod chain;
Expand All @@ -13,12 +13,12 @@ mod validator;
use auction::AuctionCmd;
use base64::prelude::*;
use chain::ChainCmd;
use cnidarium::proto::v1::non_verifiable_key_value_request::Key as NVKey;
use colored_json::ToColoredJson;
use community_pool::CommunityPoolCmd;
use dex::DexCmd;
use governance::GovernanceCmd;
use ibc_query::IbcCmd;
use penumbra_sdk_proto::cnidarium::v1::non_verifiable_key_value_request::Key as NVKey;
use shielded_pool::ShieldedPool;
use tx::Tx;
pub(super) use validator::ValidatorCmd;
Expand Down Expand Up @@ -177,7 +177,7 @@ impl QueryCmd {
} => (key.clone(), storage_backend.clone()),
};

use penumbra_sdk_proto::cnidarium::v1::query_service_client::QueryServiceClient;
use cnidarium::proto::v1::query_service_client::QueryServiceClient;
let mut client = QueryServiceClient::new(app.pd_channel().await?);

// Using an enum in the clap arguments was annoying; this is workable:
Expand All @@ -187,7 +187,7 @@ impl QueryCmd {
.decode(&key)
.map_err(|e| anyhow::anyhow!(format!("invalid base64: {}", e)))?;

let req = penumbra_sdk_proto::cnidarium::v1::NonVerifiableKeyValueRequest {
let req = cnidarium::proto::v1::NonVerifiableKeyValueRequest {
key: Some(NVKey { inner: key_bytes }),
..Default::default()
};
Expand All @@ -205,7 +205,7 @@ impl QueryCmd {
}
// Default to JMT
"jmt" | _ => {
let req = penumbra_sdk_proto::cnidarium::v1::KeyValueRequest {
let req = cnidarium::proto::v1::KeyValueRequest {
key: key.clone(),
// Command-line queries don't have a reason to include proofs as of now.
proof: false,
Expand Down Expand Up @@ -269,12 +269,10 @@ impl QueryCmd {
// this code (not just this function, the whole module) is pretty shitty,
// but that's maybe okay for the moment. it exists to consume the rpc.
async fn watch(key_regex: String, nv_key_regex: String, app: &mut App) -> Result<()> {
use penumbra_sdk_proto::cnidarium::v1::{
query_service_client::QueryServiceClient, watch_response as wr,
};
use cnidarium::proto::v1::{query_service_client::QueryServiceClient, watch_response as wr};
let mut client = QueryServiceClient::new(app.pd_channel().await?);

let req = penumbra_sdk_proto::cnidarium::v1::WatchRequest {
let req = cnidarium::proto::v1::WatchRequest {
key_regex,
nv_key_regex,
};
Expand Down
6 changes: 2 additions & 4 deletions crates/core/app/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ use {
self::query::AppQueryServer,
crate::PenumbraHost,
anyhow::Context,
cnidarium::rpc::{
proto::v1::query_service_server::QueryServiceServer as StorageQueryServiceServer,
Server as StorageServer,
},
cnidarium::proto::v1::query_service_server::QueryServiceServer as StorageQueryServiceServer,
cnidarium::rpc::Server as StorageServer,
ibc_proto::{
cosmos::bank::v1beta1::query_server::QueryServer as TransferQueryServer,
ibc::{
Expand Down
7 changes: 3 additions & 4 deletions crates/core/app/tests/mock_consensus_block_proving.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use {
anyhow::Context as _,
cnidarium::proto::v1::{
query_service_client::QueryServiceClient as CnidariumQueryServiceClient, KeyValueRequest,
},
cnidarium::{StateRead as _, TempStorage},
common::{BuilderExt as _, TempStorageExt as _},
ibc_proto::ibc::core::client::v1::{
Expand All @@ -23,10 +26,6 @@ use {
penumbra_sdk_mock_client::MockClient,
penumbra_sdk_mock_consensus::TestNode,
penumbra_sdk_proto::{
cnidarium::v1::{
query_service_client::QueryServiceClient as CnidariumQueryServiceClient,
KeyValueRequest,
},
util::tendermint_proxy::v1::{
tendermint_proxy_service_client::TendermintProxyServiceClient, GetBlockByHeightRequest,
},
Expand Down

0 comments on commit 3551d14

Please sign in to comment.