Skip to content
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

chore(sdk): update network-v2 proto #1669

Merged
merged 3 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
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
Loading