Skip to content

Conversation

@rswanson
Copy link
Member

@rswanson rswanson commented Jun 3, 2025

TL;DR

Added Ethereum node components for Kubernetes deployments, including execution and consensus clients with proper configuration and resource management.

What changed?

This PR introduces a new Ethereum node infrastructure for Kubernetes deployments with the following components:

  • Created a consensus client package with:

    • Component creation logic for deploying consensus clients
    • Kubernetes resources (StatefulSet, PVC, Services, Secrets)
    • Command generation for client configuration
    • Validation logic and tests
  • Created an execution client package with:

    • Component creation logic for execution clients
    • Kubernetes resources (StatefulSet, PVC, Services, Secrets)
    • Command generation for client configuration
    • Validation logic and tests
  • Added an Ethereum node component that combines both execution and consensus clients

  • Enhanced the environment variable handling in the utils package to use generics

  • Added proper JWT authentication between execution and consensus clients

Why make this change?

This change provides a standardized way to deploy Ethereum nodes in Kubernetes environments, which is essential for running Ethereum infrastructure in cloud-native environments. The components handle all the complexity of configuring and connecting execution and consensus clients, managing persistent storage, and setting up proper networking and authentication between components.

The implementation follows best practices for Kubernetes deployments and provides a flexible, reusable infrastructure component that can be used across different environments and configurations.

Copy link
Member Author

rswanson commented Jun 3, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@rswanson rswanson mentioned this pull request Jun 3, 2025
@rswanson rswanson marked this pull request as ready for review June 5, 2025 15:26
@rswanson rswanson requested review from a team and Copilot and removed request for Copilot June 5, 2025 15:26
@rswanson rswanson self-assigned this Jun 5, 2025
Copy link
Contributor

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

Adds a new Ethereum package alongside generic environment‐variable utilities and updates to existing Signet and Quincey components.

  • Introduce a generic EnvProvider interface and update CreateConfigMap/CreateEnvMap to use Go generics.
  • Add ethereum package with execution and consensus client components, argument types, validation, and tests.
  • Adjust Signet and Quincey code to use the new EnvProvider for building ConfigMaps.

Reviewed Changes

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

Show a summary per file
File Description
pkg/utils/env.go Converted env utilities to generics and removed non-interface fallback
pkg/signet_node/types.go Added ConsensusEnv type implementing EnvProvider
pkg/signet_node/signet_node.go Switched SignetNode to use the new ConsensusEnv
pkg/quincey/quincey.go Updated CreateConfigMap call to pass an EnvProvider
pkg/ethereum/types.go Defined EthereumNodeArgs and EthereumNodeComponent types
pkg/ethereum/execution/validation_test.go Added unit tests for execution client argument validation
pkg/ethereum/execution/validation.go Implemented Validate for execution client args
pkg/ethereum/execution/types.go Defined execution client argument and component structs
pkg/ethereum/execution/component.go Built execution client component and command builder
pkg/ethereum/ethereum_node.go Created top-level NewEthereumNodeComponent function
pkg/ethereum/consensus/validation_test.go Added unit tests for consensus client argument validation
pkg/ethereum/consensus/validation.go Implemented Validate for consensus client args
pkg/ethereum/consensus/types.go Defined consensus client argument and component structs
pkg/ethereum/consensus/component.go Built consensus client component and command builder

// NewEthereumNodeComponent creates a new Ethereum node component that combines an execution client and a consensus client
func NewEthereumNodeComponent(ctx *pulumi.Context, name string, args *EthereumNodeArgs, opts ...pulumi.ResourceOption) (*EthereumNodeComponent, error) {
component := &EthereumNodeComponent{
Name: name,
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

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

[nitpick] EthereumNodeComponent stores Name and Namespace as plain strings, whereas other components use pulumi.StringOutput for these fields. For consistency and to expose computed outputs, consider using pulumi.StringOutput here as well.

Suggested change
Name: name,
Name: pulumi.ToOutput(name).(pulumi.StringOutput),
Namespace: pulumi.ToOutput(args.Namespace).(pulumi.StringOutput),

Copilot uses AI. Check for mistakes.
@rswanson rswanson merged commit 0364820 into main Jun 11, 2025
2 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.

2 participants