Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR represents a major architectural overhaul of the EthPillar deployment engine. By moving from monolithic installation scripts to a modular, service-oriented architecture, maintainability is significantly improved while hardening the system with a comprehensive test suite.
Duplication Reduction & Efficiency
The core achievement of this refactor is the centralization of systemd service generation.
Centralized Logic: Consolidated service generation for 13+ unique client roles (Execution, Consensus, and Tooling) into a single service_generators.py
Boilerplate Elimination: Removed hundreds of lines of redundant template strings across individual client installers.
Estimated LoC Impact: Reduced the footprint of individual installer modules like lodestar.py and teku.py by approximately 40%, stripping away hardcoded systemd templates in favor of shared, reusable generator functions.
Modularity & Maintainability
Dedicated Client Modules: Each Ethereum client now has its own isolated logic module (e.g., besu.py, nimbus.py), making it easier to add new clients or update existing ones without touching the core orchestration.
Type Safety & Documentation: Implemented full PEP 484 type hints and comprehensive Google-style docstrings across the deploy/ package to improve IDE support and developer onboarding.
Shared Utilities: Extracted system-level operations (architecture detection, JWT management, and service file writing) into a robust common.py utility layer.
Testing & Reliability
Introduced a two-tier testing strategy to ensure zero regressions:
Golden-String Unit Tests: test_service_generators.py verifies that every CLI flag and systemd parameter is generated exactly as expected for various networks (Mainnet, Ephemery, etc.).
Integration Tests: Added a new orchestration test suite to verify the end-to-end installation flow and user/directory permission handling.
Edge Case Coverage: Added explicit tests for complex configurations like MEV-Boost relay handling and custom Ephemery chainspecs.
Backwards Compatibility
Systemd Preservation: Maintained exact parity with legacy systemd service file locations and naming conventions (e.g., /etc/systemd/system/execution.service).
Path Consistency: Retained all original data directory structures (/var/lib/...) and binary paths (/usr/local/bin/...).
Environment Parity: The network_override and fee_parameters logic ensures that existing custom scripts using the EthPillar core will continue to function without modification.
Tests: All pytest suites passing.
Linting: Type hints verified for Optional safety.