Skip to content

Commit

Permalink
use port 8089, less freq used
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani committed Sep 10, 2024
1 parent 8a1ec38 commit 0bbb10c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions proposer/op/Dockerfile.span_batch_server
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
4 changes: 2 additions & 2 deletions proposer/op/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions scripts/prove/bin/cost_estimator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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(());
}

Expand All @@ -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()?;
Expand Down

0 comments on commit 0bbb10c

Please sign in to comment.