diff --git a/Cargo.lock b/Cargo.lock index 67bb0fff56..827970c648 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1287,9 +1287,9 @@ dependencies = [ [[package]] name = "cnidarium" -version = "0.82.0" +version = "0.82.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab30a485dceb9aca3210c03fbbecadd14837a94aef19deb594eef9cb5ced1" +checksum = "7f0060de634f1f7411ab7464f1021f48ffdeb72fd63cf19553035fa766563828" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index f368d816bc..8ab80872f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" } diff --git a/crates/bin/pcli/src/command/query.rs b/crates/bin/pcli/src/command/query.rs index 6d64098d75..f2657b3cc6 100644 --- a/crates/bin/pcli/src/command/query.rs +++ b/crates/bin/pcli/src/command/query.rs @@ -1,4 +1,4 @@ -use anyhow::{anyhow, Result}; +use anyhow::{anyhow, Context, Result}; pub(crate) mod auction; mod chain; @@ -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; @@ -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: @@ -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() }; @@ -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, @@ -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, }; diff --git a/crates/core/app/src/rpc.rs b/crates/core/app/src/rpc.rs index fd69cb5933..eec4d504bc 100644 --- a/crates/core/app/src/rpc.rs +++ b/crates/core/app/src/rpc.rs @@ -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::{ diff --git a/crates/core/app/tests/mock_consensus_block_proving.rs b/crates/core/app/tests/mock_consensus_block_proving.rs index 831117f368..d6e7ef9e5c 100644 --- a/crates/core/app/tests/mock_consensus_block_proving.rs +++ b/crates/core/app/tests/mock_consensus_block_proving.rs @@ -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::{ @@ -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, },