-
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.
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. 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.
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. 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)
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 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; |
| 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.