Skip to content

Commit

Permalink
chore(sdk): update network-v2 proto (#1669)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstam authored Oct 18, 2024
1 parent 1ec6b10 commit bc5245e
Show file tree
Hide file tree
Showing 4 changed files with 295 additions and 39 deletions.
16 changes: 9 additions & 7 deletions crates/sdk/src/network-v2/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ impl NetworkClient {

// Check if the URL scheme is HTTPS and configure TLS.
if rpc_url.starts_with("https://") {
println!("Using TLS");
let tls_config = ClientTlsConfig::new().with_enabled_roots();
endpoint = endpoint.tls_config(tls_config)?;
}
Expand All @@ -79,7 +78,6 @@ impl NetworkClient {

// Check if the URL scheme is HTTPS and configure TLS.
if rpc_url.starts_with("https://") {
println!("Using TLS");
let tls_config = ClientTlsConfig::new().with_enabled_roots();
endpoint = endpoint.tls_config(tls_config)?;
}
Expand Down Expand Up @@ -118,7 +116,7 @@ impl NetworkClient {
})
.await?
.into_inner();
let status = ProofStatus::try_from(res.status)?;
let status = ProofStatus::try_from(res.proof_status)?;
let proof = match status {
ProofStatus::Fulfilled => {
log::info!("Proof request fulfilled");
Expand All @@ -138,14 +136,18 @@ impl NetworkClient {
/// Get all the proof requests for a given status. Also filter by version if provided.
pub async fn get_filtered_proof_requests(
&self,
status: ProofStatus,
version: Option<&str>,
version: Option<String>,
proof_status: Option<i32>,
execution_status: Option<i32>,
limit: Option<u32>,
) -> Result<GetFilteredProofRequestsResponse> {
let mut rpc = self.get_rpc().await?;
let res = rpc
.get_filtered_proof_requests(GetFilteredProofRequestsRequest {
status: status.into(),
version: version.map(|v| v.to_string()).unwrap_or_default(),
version,
proof_status,
execution_status,
limit,
})
.await?
.into_inner();
Expand Down
4 changes: 2 additions & 2 deletions crates/sdk/src/network-v2/proto/artifact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub mod artifact_store_client {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// / Creates an artifact that can be used for proof requests.
/// Creates an artifact that can be used for proof requests.
pub async fn create_artifact(
&mut self,
request: impl tonic::IntoRequest<super::CreateArtifactRequest>,
Expand Down Expand Up @@ -127,7 +127,7 @@ pub mod artifact_store_server {
/// Generated trait containing gRPC methods that should be implemented for use with ArtifactStoreServer.
#[async_trait]
pub trait ArtifactStore: std::marker::Send + std::marker::Sync + 'static {
/// / Creates an artifact that can be used for proof requests.
/// Creates an artifact that can be used for proof requests.
async fn create_artifact(
&self,
request: tonic::Request<super::CreateArtifactRequest>,
Expand Down
Loading

0 comments on commit bc5245e

Please sign in to comment.