Skip to content

Client: (WIP) rework CLI startup logic using RpcConfig (#3983) #4013

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ether-wan
Copy link

@ether-wan ether-wan commented Apr 23, 2025

This PR starts addressing #3983 by refactoring the client CLI

Description

  • Introduced a new RpcConfig class for RPC endpoints (eth/engine, http/ws)
  • Added a generateRpcConfigs() func to generate all server configurations from CLI args
  • Refactored startRPCServers() to use these configs instead of cli args
  • Removed repeated logic for creating, starting and logging HTTP/WS servers
  • Split the run() function to improve testability:
    • run() now handles only CLI argument parsing, config generation, and dispatch
    • New startClientAndServers() function performs the client and RPC server startup
    • This split improves separation of concerns and makes the CLI flow easier to test

This is still a work in progress — if the current structure looks good, I’ll follow up with unit tests for the new helpers and config logic in a separate commit!

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.

2 participants