From 0bbb10c493e47d418e9738756bf3c8fe291d6b47 Mon Sep 17 00:00:00 2001 From: ratan kaliani Date: Tue, 10 Sep 2024 16:05:30 -0700 Subject: [PATCH] use port 8089, less freq used --- proposer/op/Dockerfile.span_batch_server | 4 ++-- proposer/op/server/main.go | 4 ++-- scripts/prove/bin/cost_estimator.rs | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/proposer/op/Dockerfile.span_batch_server b/proposer/op/Dockerfile.span_batch_server index 4f7a84f6..fd3e008c 100644 --- a/proposer/op/Dockerfile.span_batch_server +++ b/proposer/op/Dockerfile.span_batch_server @@ -31,8 +31,8 @@ WORKDIR /app/op-proposer-go/server # Build the application RUN go build -o span_batch_server main.go -# Expose port 8080 -EXPOSE 8080 +# Expose port 8089 +EXPOSE 8089 # Set the entrypoint to run the server ENTRYPOINT ["./span_batch_server"] diff --git a/proposer/op/server/main.go b/proposer/op/server/main.go index 97207161..47a1f71e 100644 --- a/proposer/op/server/main.go +++ b/proposer/op/server/main.go @@ -36,8 +36,8 @@ func main() { r := mux.NewRouter() r.HandleFunc("/span-batch-ranges", handleSpanBatchRanges).Methods("POST") - fmt.Println("Server is running on :8080") - log.Fatal(http.ListenAndServe(":8080", r)) + fmt.Println("Server is running on :8089") + log.Fatal(http.ListenAndServe(":8089", r)) } // Return all of the span batches in a given L2 block range. diff --git a/scripts/prove/bin/cost_estimator.rs b/scripts/prove/bin/cost_estimator.rs index 07c31cd9..4a3a02ba 100644 --- a/scripts/prove/bin/cost_estimator.rs +++ b/scripts/prove/bin/cost_estimator.rs @@ -92,7 +92,7 @@ async fn get_span_batch_ranges_from_server( // Get the span batch server URL from the environment. let span_batch_server_url = - env::var("SPAN_BATCH_SERVER_URL").unwrap_or("http://localhost:8080".to_string()); + env::var("SPAN_BATCH_SERVER_URL").unwrap_or("http://localhost:8089".to_string()); let query_url = format!("{}/span-batch-ranges", span_batch_server_url); let response: SpanBatchResponse = @@ -298,9 +298,9 @@ fn aggregate_execution_stats(execution_stats: &[ExecutionStats]) -> ExecutionSta /// Build and manage the Docker container for the span batch server. Note: All logs are piped to /// /dev/null, so the user doesn't see them. fn manage_span_batch_server_container() -> Result<()> { - // Check if port 8080 is already in use - if TcpListener::bind("0.0.0.0:8080").is_err() { - info!("Port 8080 is already in use. Assuming span_batch_server is running."); + // Check if port 8089 is already in use + if TcpListener::bind("0.0.0.0:8089").is_err() { + info!("Port 8089 is already in use. Assuming span_batch_server is running."); return Ok(()); } @@ -323,7 +323,7 @@ fn manage_span_batch_server_container() -> Result<()> { // Start the Docker container. let run_status = Command::new("docker") - .args(["run", "-p", "8080:8080", "-d", "span_batch_server"]) + .args(["run", "-p", "8089:8089", "-d", "span_batch_server"]) .stdout(Stdio::null()) .stderr(Stdio::null()) .status()?;