-
Notifications
You must be signed in to change notification settings - Fork 99
feat: expose rpc listener #1709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It's used on the testing prover of miden-client
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. |
| 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; |
| 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() | ||
| } |
There was a problem hiding this comment.
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.