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

feat(prover): Make it possible to run prover out of GCP #2448

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions prover/prover_fri_utils/src/region_fetcher.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::net::ToSocketAddrs;

use anyhow::Context;
use regex::Regex;
use reqwest::{
Expand All @@ -7,6 +9,12 @@ use reqwest::{
use zksync_utils::http_with_retries::send_request_with_retries;

pub async fn get_zone(zone_url: &str) -> anyhow::Result<String> {
// Check if zone URL can be resolved. If not, we assume that we're running locally.
if zone_url.to_socket_addrs().is_err() {
tracing::error!("Unable to resolve zone URL, assuming local environment");
return Ok("local".to_string());
}

let data = fetch_from_url(zone_url).await.context("fetch_from_url()")?;
parse_zone(&data).context("parse_zone")
}
Expand Down
Loading