Skip to content

Conversation

@teddyknox
Copy link
Collaborator

@teddyknox teddyknox commented Oct 20, 2025

  • Summary: Consolidates RPC client configuration into a reusable ClientArgs type and refactors CLI, server, and proxy wiring to construct typed RPC/HTTP clients from args. Simplifies ProxyLayer to accept prebuilt HTTP clients, adds constructor helpers for RollupBoostServer, and improves health/debug startup orchestration.

  • Key changes

    • Introduce ClientArgs with helpers to build clients:
      • client/rpc.rs: adds ClientArgs, new_rpc_client, new_http_client, and define_client_args! macro to generate BuilderArgs/L2ClientArgs with consistent flags.
    • Refactor server/CLI construction:
      • server.rs: add RollupBoostServer::<FlashblocksService>::new_from_args and RollupBoostServer::<RpcClient>::new_from_args that validate the flashblocks mode and build the appropriate clients; move ExecutionMode initialization into new and call update_execution_mode_gauge.
      • cli.rs: build ClientArgs from clap args; create l2_http_client and builder_http_client; start the DebugServer from the CLI after constructing RollupBoostServer; wire middleware with ProbeLayer and the new ProxyLayer.
    • Simplify proxy wiring:
      • proxy.rs: change ProxyLayer::new to accept HttpClient instances for L2 and builder rather than URIs/JWT; forward rules unchanged; tests updated to construct clients via ClientArgs.
    • Minor cleanups:
      • flashblocks/mod.rs: tidy exports.
      • payload.rs: make PayloadTraceContext and related structs Debug.
      • probe.rs: return probes from ProbeLayer::new() for simpler wiring.
      • cli.rs: implement Default for RollupBoostArgs to aid testing.
  • Breaking changes

    • ProxyLayer::new signature now takes (l2_client: HttpClient, builder_client: HttpClient). All call sites updated.
    • Code constructing RpcClient/HttpClient should use ClientArgs or the new helpers.
  • Operational impact

    • Behavior is unchanged functionally; startup is cleaner and mode-checked. Health and debug endpoints are initialized from the CLI after server construction.
    • Metrics now record initial execution mode at construction via update_execution_mode_gauge.
  • Testing

    • Updated proxy tests to use ClientArgs and the new ProxyLayer::new.
    • Added/expanded tests for:
      • Forwarding paths (miner/eth send) and engine passthrough.
      • L2 server recovery and success/failure transitions.
      • Health status behavior under builder/L2 API failures and external state root flow.
    • Server tests now build both RPC and HTTP clients from ClientArgs and exercise new constructors.
  • Migration notes

    • Replace prior ProxyLayer::new(uri, jwt, ...) usage with HTTP clients created via:
      • ClientArgs::new_http_client(PayloadSource::L2|Builder)
    • Prefer constructing RollupBoostServer via new_from_args helpers when possible.

Copilot AI review requested due to automatic review settings October 20, 2025 16:59
@vercel
Copy link

vercel bot commented Oct 20, 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 Oct 29, 2025 7:44pm

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 refactor consolidates client configuration patterns and removes generic type parameters to enable rollup-boost as a library. The changes introduce a unified ClientArgs struct that handles JWT configuration and client instantiation for both L2 and builder clients, replacing the previous scattered configuration approach.

Key Changes:

  • Unified client configuration through ClientArgs struct with JWT handling helpers
  • Removed generic type parameter T from RollupBoostServer in favor of trait objects
  • Added new_from_args constructor method for simplified server initialization
  • Updated dependency versions (reth v1.8.1→v1.8.2, alloy-consensus v1.0.35→v1.0.37)

Reviewed Changes

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

Show a summary per file
File Description
crates/rollup-boost/src/server.rs Removes generic type parameter, adds new_from_args method, updates test configuration to use ClientArgs
crates/rollup-boost/src/proxy.rs Refactors to accept HttpClient instances instead of raw configuration parameters
crates/rollup-boost/src/client/rpc.rs Introduces ClientArgs struct with JWT handling and client factory methods, renames macro
crates/rollup-boost/src/cli.rs Simplifies initialization logic using new ClientArgs pattern and new_from_args
Cargo.toml Updates reth and alloy-consensus dependency versions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copilot AI review requested due to automatic review settings October 23, 2025 13:19
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 8 out of 9 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@teddyknox teddyknox force-pushed the push-uksuovvzmmus branch 2 times, most recently from 024a82e to 2ce4654 Compare October 23, 2025 14:59
Copilot AI review requested due to automatic review settings October 23, 2025 14:59
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 9 out of 10 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copilot AI review requested due to automatic review settings October 24, 2025 19:19
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 9 out of 10 changed files in this pull request and generated 4 comments.


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

Copilot AI review requested due to automatic review settings October 27, 2025 15:07
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 8 out of 9 changed files in this pull request and generated 1 comment.


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

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 8 out of 9 changed files in this pull request and generated 1 comment.


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

Copilot AI review requested due to automatic review settings October 28, 2025 14:51
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 9 out of 9 changed files in this pull request and generated no new comments.


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

Copy link
Collaborator

@0xOsiris 0xOsiris left a comment

Choose a reason for hiding this comment

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

This generally LGTM. Would wait for other approvals

Copilot AI review requested due to automatic review settings October 28, 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 8 out of 8 changed files in this pull request and generated 1 comment.


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

* unify client configuration with ClientArgs struct
* Consolidate BuilderArgs/L2ClientArgs into unified ClientArgs pattern
* Move JWT handling into ClientArgs with helper methods
* Update ProxyLayer to accept HttpClient instances instead of raw config
* Add RollupBoostServer::new_from_args for cleaner initialization
* Bump reth-rpc-layer to v1.8.2
Copilot AI review requested due to automatic review settings October 29, 2025 19:44
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 8 out of 8 changed files in this pull request and generated 3 comments.


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

@teddyknox teddyknox merged commit 2ff9e81 into flashbots:main Oct 29, 2025
14 checks passed
@teddyknox teddyknox deleted the push-uksuovvzmmus branch October 29, 2025 20:42
haardikk21 pushed a commit to haardikk21/rollup-boost that referenced this pull request Oct 30, 2025
* Add test verifying failure to proxy rpc requests to l2_client are
retriable

* refactor: Enable library usage of rollup-boost
* unify client configuration with ClientArgs struct
* Consolidate BuilderArgs/L2ClientArgs into unified ClientArgs pattern
* Move JWT handling into ClientArgs with helper methods
* Update ProxyLayer to accept HttpClient instances instead of raw config
* Add RollupBoostServer::new_from_args for cleaner initialization
* Bump reth-rpc-layer to v1.8.2
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.

4 participants