Skip to content

Conversation

@karankurbur
Copy link
Contributor

The health check did not previously check the l2 client health. If the l2 client was unhealthy but the builder was healthy, it would set the service status to Healthy.

It checks the L2 client health first. If execution mode is enabled, it will then check the builder client health

Copilot AI review requested due to automatic review settings October 30, 2025 22:29
@vercel
Copy link

vercel bot commented Oct 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
rollup-boost Ignored Ignored Preview Nov 5, 2025 6:16pm

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the health check system to separately monitor both L2 client and builder client health, with different health status responses based on which component is failing and the current execution mode.

  • Added L2 client health monitoring with separate status reporting (ServiceUnavailable vs PartialContent)
  • Modified execution mode behavior: disabled/dry-run modes now only check L2 client health
  • Added comprehensive test coverage for the new L2 client failure scenarios

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 6 comments.

File Description
crates/rollup-boost/src/server.rs Passes l2_client to HealthHandle constructor
crates/rollup-boost/src/health.rs Implements dual health checking for L2 and builder clients with distinct failure modes and adds corresponding tests
crates/rollup-boost/Cargo.toml Adds serial_test dependency for test serialization
Cargo.lock Updates lock file with serial_test and its transitive dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

tokio-util = { version = "0.7.13" }

[dev-dependencies]
serial_test = "*"
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using '*' for dependency versions is not recommended. Specify an explicit version to ensure reproducible builds and avoid unexpected breaking changes.

Suggested change
serial_test = "*"
serial_test = "2.0.0"

Copilot uses AI. Check for mistakes.
#[tokio::test]
async fn tick_advances_after_sleep() {
let mut ts = MonotonicTimestamp::new();
let mut ts: MonotonicTimestamp = MonotonicTimestamp::new();
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The explicit type annotation : MonotonicTimestamp is redundant since the type can be inferred from MonotonicTimestamp::new(). Remove it for cleaner code.

Suggested change
let mut ts: MonotonicTimestamp = MonotonicTimestamp::new();
let mut ts = MonotonicTimestamp::new();

Copilot uses AI. Check for mistakes.
if t.saturating_sub(block.header.timestamp)
.gt(&self.max_unsafe_interval)
{
warn!(target: "rollup_boost::health", curr_unix = %t, unsafe_unix = %block.header.timestamp, "Builder client - unsafe block timestamp is too old updating health status");
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing comma after 'too old'. The message should read 'too old, updating health status' for proper grammar.

Suggested change
warn!(target: "rollup_boost::health", curr_unix = %t, unsafe_unix = %block.header.timestamp, "Builder client - unsafe block timestamp is too old updating health status");
warn!(target: "rollup_boost::health", curr_unix = %t, unsafe_unix = %block.header.timestamp, "Builder client - unsafe block timestamp is too old, updating health status");

Copilot uses AI. Check for mistakes.

use super::*;
use crate::{Probes, payload::PayloadSource};
use serial_test::serial;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like serial test is unnecessary and it's making tests very slow - consider removing it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added it because they were flaky without it

Copilot AI review requested due to automatic review settings November 5, 2025 18:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

.expect("Time went backwards")
.as_secs();

// L2 healthy unhealth
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment contains garbled text 'healthy unhealth'. Based on the context (the L2 client is being set up with an old timestamp), this should be 'L2 unhealthy'.

Suggested change
// L2 healthy unhealth
// L2 unhealthy

Copilot uses AI. Check for mistakes.
self.probes.set_health(Health::Healthy);
if self.execution_mode.lock().is_enabled() {
// Only check builder client health if execution mode is enabled
// If its unhealthy, set the health status to PartialContent
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammatical error: 'its' should be 'it's' (contraction of 'it is').

Suggested change
// If its unhealthy, set the health status to PartialContent
// If it's unhealthy, set the health status to PartialContent

Copilot uses AI. Check for mistakes.
#[tokio::test]
async fn tick_advances_after_sleep() {
let mut ts = MonotonicTimestamp::new();
let mut ts: MonotonicTimestamp = MonotonicTimestamp::new();
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Unnecessary explicit type annotation. The type MonotonicTimestamp can be inferred from the new() call.

Suggested change
let mut ts: MonotonicTimestamp = MonotonicTimestamp::new();
let mut ts = MonotonicTimestamp::new();

Copilot uses AI. Check for mistakes.
@0xForerunner 0xForerunner enabled auto-merge (squash) November 5, 2025 18:19
@0xForerunner 0xForerunner merged commit 0e4f60b into flashbots:main Nov 5, 2025
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants