Skip to content

Commit

Permalink
chore: restructure proving service clients crate (#1102)
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiagoPittella authored Jan 28, 2025
1 parent fb2284b commit 9930c36
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Changes

- [BREAKING] Incremented minimum supported Rust version to 1.84.
- [BREAKING] Moved `generated` module from `miden-proving-service-client` crate to `tx_prover::generated` hierarchy (#1102).

## 0.7.1 (2025-01-24) - `miden-objects` crate only

Expand Down
2 changes: 1 addition & 1 deletion crates/miden-proving-service-client/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fn copy_proto_files() -> miette::Result<()> {
fn compile_tonic_client_proto() -> miette::Result<()> {
let crate_root =
PathBuf::from(env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR should be set"));
let dst_dir = crate_root.join("src").join("generated");
let dst_dir = crate_root.join("src").join("tx_prover").join("generated");

// Remove `api.rs` if it exists.
fs::remove_file(dst_dir.join("api.rs")).into_diagnostic().ok();
Expand Down
7 changes: 1 addition & 6 deletions crates/miden-proving-service-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ extern crate std;
use thiserror::Error;

#[cfg(feature = "tx-prover")]
pub mod generated;

#[cfg(feature = "tx-prover")]
mod prover;
#[cfg(feature = "tx-prover")]
pub use prover::RemoteTransactionProver;
pub mod tx_prover;

/// Protobuf definition for the Miden proving service
pub const SERVICE_PROTO: &str = include_str!("../proto/api.proto");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
pub mod generated;

use alloc::{
boxed::Box,
string::{String, ToString},
};

use generated::api_client::ApiClient;
use miden_objects::transaction::{ProvenTransaction, TransactionWitness};
use miden_tx::{utils::sync::RwLock, TransactionProver, TransactionProverError};

use crate::{generated::api_client::ApiClient, RemoteProverError};
use crate::RemoteProverError;

// REMOTE TRANSACTION PROVER
// ================================================================================================
Expand Down Expand Up @@ -84,7 +87,7 @@ impl TransactionProver for RemoteTransactionProver {
.ok_or_else(|| TransactionProverError::other("client should be connected"))?
.clone();

let request = tonic::Request::new(crate::generated::ProveTransactionRequest {
let request = tonic::Request::new(generated::ProveTransactionRequest {
transaction_witness: tx_witness.to_bytes(),
});

Expand Down

0 comments on commit 9930c36

Please sign in to comment.