Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- Validator now persists validated transactions ([#1614](https://github.com/0xMiden/miden-node/pull/1614)).
- [BREAKING] Remove `SynState` and introduce `SyncChainMmr` ([#1591](https://github.com/0xMiden/miden-node/issues/1591)).
- Introduce `SyncChainMmr` RPC endpoint to sync chain MMR deltas within specified block ranges ([#1591](https://github.com/0xMiden/miden-node/issues/1591)).
- Fixed `TransactionHeader` serialization for row insertion on database & fixed transaction cursor on retrievals ([#1701](https://github.com/0xMiden/miden-node/issues/1701)).
- Re-Introduce `RpcListener` & expose remote prover as a library to allow instantiation on other crates ([#1709](https://github.com/0xMiden/miden-node/issues/1709)).

### Changes

Expand All @@ -24,6 +24,7 @@
- Improved tracing span fields ([#1650](https://github.com/0xMiden/miden-node/pull/1650))
- Replaced NTX Builder's in-memory state management with SQLite-backed persistence; account states, notes, and transaction effects are now stored in the database and inflight state is purged on startup ([#1662](https://github.com/0xMiden/miden-node/pull/1662)).
- [BREAKING] Reworked `miden-remote-prover`, removing the `worker`/`proxy` distinction and simplifying to a `worker` with a request queue ([#1688](https://github.com/0xMiden/miden-node/pull/1688)).
- Fixed `TransactionHeader` serialization for row insertion on database & fixed transaction cursor on retrievals ([#1701](https://github.com/0xMiden/miden-node/issues/1701)).
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this previous entry here as it is better suited here.


## v0.13.5 (2026-02-19)

Expand Down
9 changes: 9 additions & 0 deletions bin/remote-prover/src/lib.rs
Copy link
Collaborator

@Mirko-von-Leipzig Mirko-von-Leipzig Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to need some more context in how this is being used? If its just for testing why not just implement a very basic proving server?

As a general rule I'm not very comfortable having "libraries" exposed from the node since we're a binary application. Changes here would not be considered breaking.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to need some more context in how this is being used

It's used on the testing prover of miden-client

If its just for testing why not just implement a very basic proving server

It's just for testing, so implementing everything from scratch is a possible solution. I've pushed a possible implementation to the miden-client update PR 755123e. It's not that more complicated so we can close this PR and just roll with it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were using this a library in the client also to benefit for rust artifacts caching in the CI, the same we do with the node using its components as library. I agree that it is not completely necessary, best case scenario we should use the actual binary from the node to ensure that the integration works.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think we briefly discussed this with @juan518munoz: We could clone the binary and run it, it's just a bit more cumbersome to manage revisions and artifact caching (with the upside that it tests the integration better)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean if its for our own internal testing purposes; I don't mind it so much.

I'm just thinking about our "internal" RPC client that then got used by actual teams and I'd prefer to not have that be an option. If exposing this is easiest for you then lets do it, and just note in the readme and doc comments that its not stable.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pub mod generated;
pub mod server;

/// Component identifier for structured logging and tracing.
pub const COMPONENT: &str = "miden-prover";

// Convenience re-exports for library consumers.
pub use server::RpcListener;
pub use server::proof_kind::ProofKind;
12 changes: 5 additions & 7 deletions bin/remote-prover/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
use anyhow::Context;
use clap::Parser;
use miden_node_utils::logging::{OpenTelemetry, setup_tracing};
use miden_remote_prover::COMPONENT;
use tracing::info;

mod generated;
mod server;

const COMPONENT: &str = "miden-prover";

#[tokio::main]
async fn main() -> anyhow::Result<()> {
let _otel_guard = setup_tracing(OpenTelemetry::Enabled)?;
info!(target: COMPONENT, "Tracing initialized");

let (handle, _port) =
server::Server::parse().spawn().await.context("failed to spawn server")?;
let (handle, _port) = miden_remote_prover::server::Server::parse()
.spawn()
.await
.context("failed to spawn server")?;

handle.await.context("proof server panicked").flatten()
}
26 changes: 22 additions & 4 deletions bin/remote-prover/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ use tower_http::trace::TraceLayer;
use crate::generated::api_server::ApiServer;
use crate::server::service::ProverService;

mod proof_kind;
mod prover;
mod service;
mod status;
pub mod proof_kind;
pub mod prover;
pub mod service;
pub mod status;

#[cfg(test)]
mod tests;
Expand Down Expand Up @@ -101,3 +101,21 @@ impl Server {
Ok((server, port))
}
}

/// A bundle of gRPC services and a TCP listener, ready to be served.
pub struct RpcListener {
pub api_service: ApiServer<service::ProverService>,
pub status_service:
crate::generated::worker_status_api_server::WorkerStatusApiServer<status::StatusService>,
pub listener: TcpListener,
}

impl RpcListener {
pub fn new(listener: TcpListener, kind: ProofKind) -> Self {
let capacity = NonZeroUsize::new(1).unwrap();
let prover_service = service::ProverService::with_capacity(kind, capacity);
let api_service = ApiServer::new(prover_service);
let status_service = status::StatusService::new(kind);
Self { api_service, status_service, listener }
}
}
Loading