{"id":29414789,"url":"https://github.com/init4tech/signet-infra-components","last_synced_at":"2025-09-06T09:34:28.527Z","repository":{"id":293513998,"uuid":"984263854","full_name":"init4tech/signet-infra-components","owner":"init4tech","description":"opinionated but generic components for each of the pieces of the signet blockchain ","archived":false,"fork":false,"pushed_at":"2025-08-22T16:27:24.000Z","size":241,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-22T18:54:17.054Z","etag":null,"topics":["golang","iac","pulumi"],"latest_commit_sha":null,"homepage":"https://signet.sh/docs/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/init4tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-15T16:42:09.000Z","updated_at":"2025-08-22T16:24:44.000Z","dependencies_parsed_at":"2025-06-03T17:51:03.174Z","dependency_job_id":"d7675098-144b-44e6-a48b-90dd7eee34c0","html_url":"https://github.com/init4tech/signet-infra-components","commit_stats":null,"previous_names":["init4tech/signet-infra-components"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/init4tech/signet-infra-components","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/init4tech%2Fsignet-infra-components","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/init4tech%2Fsignet-infra-components/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/init4tech%2Fsignet-infra-components/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/init4tech%2Fsignet-infra-components/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/init4tech","download_url":"https://codeload.github.com/init4tech/signet-infra-components/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/init4tech%2Fsignet-infra-components/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271740696,"owners_count":24812639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","iac","pulumi"],"created_at":"2025-07-11T15:00:42.605Z","updated_at":"2025-09-06T09:34:28.489Z","avatar_url":"https://github.com/init4tech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Signet Infrastructure Components\n\nA comprehensive Pulumi component library for deploying and managing Signet blockchain infrastructure on Kubernetes.\n\n## Overview\n\nThis repository provides production-ready, reusable Pulumi components for deploying blockchain infrastructure services. Built with Go and designed for Kubernetes, these components offer a consistent, validated approach to infrastructure as code for blockchain operations.\n\n## Features\n\n- **Type-Safe Infrastructure**: Strongly typed Go interfaces with comprehensive validation\n- **AWS Integration**: Built-in support for IAM roles, S3 buckets, and RDS databases\n- **Kubernetes Native**: Deploy to any Kubernetes cluster with standard resources\n- **Component Composition**: Complex services built from reusable sub-components\n- **Production Ready**: Health checks, resource limits, and monitoring built-in\n\n## Components\n\n### Core Blockchain Services\n\n#### Builder (`pkg/builder/`)\nDeploys a Signet builder service for blockchain operations.\n\n**Resources Created:**\n- Kubernetes Deployment with configurable replicas\n- Service (ClusterIP) for internal access\n- ServiceAccount with optional AWS IAM role\n- ConfigMap for environment configuration\n- Persistent Volume Claims for data storage\n\n#### Signet Node (`pkg/signet_node/`)\nCore Signet blockchain node implementation.\n\n**Resources Created:**\n- StatefulSet for node persistence\n- Service for peer-to-peer and RPC access\n- PersistentVolumeClaim for blockchain data\n- ConfigMap for node configuration\n\n#### Transaction Cache (`pkg/txcache/`)\nHigh-performance transaction caching service.\n\n**Resources Created:**\n- Deployment with memory-optimized configuration\n- Service for cache access\n- ConfigMap for cache settings\n- Optional Redis backend support\n\n### Ethereum Infrastructure\n\n#### Ethereum Node (`pkg/ethereum/`)\nComposite component that manages both execution and consensus clients as a complete Ethereum node.\n\n**Sub-components:**\n- **Execution Client** (`pkg/ethereum/execution/`): Reth or compatible execution layer\n- **Consensus Client** (`pkg/ethereum/consensus/`): Lighthouse Beacon chain consensus layer\n\n**Features:**\n- Automatic JWT secret management\n- Inter-client communication setup\n\n### Specialized Services\n\n#### eRPC Proxy (`pkg/erpc-proxy/`)\nAdvanced RPC proxy with load balancing and failover capabilities.\n\n**Resources Created:**\n- Deployment with health probes\n- Service for RPC access\n- ConfigMap for complex routing configuration\n- Secret for API keys\n- ServiceAccount for pod identity\n\n**Example:**\n```go\n\t\t_, err = erpcproxy.NewErpcProxy(ctx, erpcproxy.ErpcProxyComponentArgs{\n\t\t\tNamespace: \"default\",\n\t\t\tName:      \"rpc-erpc-proxy\",\n\t\t\tConfig: erpcproxy.ErpcProxyConfig{\n\t\t\t\tServer: erpcproxy.ErpcProxyServerConfig{\n\t\t\t\t\tHttpHostV4: \"0.0.0.0\",\n\t\t\t\t\tHttpPortV4: 8545,\n\t\t\t\t\tMaxTimeout: \"60s\",\n\t\t\t\t},\n\t\t\t\tProjects: []erpcproxy.ErpcProxyProjectConfig{\n\t\t\t\t\t{\n\t\t\t\t\t\tId: \"rpc\",\n\t\t\t\t\t\tNetworks: []erpcproxy.ErpcProxyNetworkConfig{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tChainId:      1,\n\t\t\t\t\t\t\t\tArchitecture: \"evm\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tUpstreams: []erpcproxy.ErpcProxyUpstreamConfig{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tId:       \"rpc\",\n\t\t\t\t\t\t\t\tType:     \"evm\",\n\t\t\t\t\t\t\t\tEndpoint: \"http://some-rpc-service.default.svc.cluster.local:8545\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tResources: erpcproxy.ErpcProxyResources{\n\t\t\t\tMemoryRequest: \"1Gi\",\n\t\t\t\tMemoryLimit:   \"2Gi\",\n\t\t\t\tCpuRequest:    \"100m\",\n\t\t\t\tCpuLimit:      \"200m\",\n\t\t\t},\n\t\t\tReplicas: 1,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n```\n\n#### Pylon (`pkg/pylon/`)\nEthereum Blob cold storage client\n\n**Features:**\n- Deploys an ExEx on top of a Reth/Lighthouse pair\n- S3 integration for blob storage\n- PostgreSQL database support\n- Custom environment configuration\n\n#### Quincey (`pkg/quincey/`)\nQuincey service component for specialized blockchain operations.\n\n### AWS Integration (`pkg/aws/`)\n\n#### IAM Roles\nCreate and manage AWS IAM roles for Kubernetes service accounts (IRSA).\n\n#### PostgreSQL Database\nProvision RDS PostgreSQL instances with:\n- Automated backups\n- Security group configuration\n- Parameter group customization\n- Connection string management\n\n### Utilities (`pkg/utils/`)\nShared helper functions for:\n- Resource labeling\n- ConfigMap creation\n- Port parsing with defaults\n- Environment variable management\n\n## Usage Example\n\n```go\npackage main\n\nimport (\n    \"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n    \"github.com/init4tech/signet-infra-components/pkg/builder\"\n    \"github.com/init4tech/signet-infra-components/pkg/erpc-proxy\"\n    \"github.com/init4tech/signet-infra-components/pkg/ethereum\"\n)\n\nfunc main() {\n    pulumi.Run(func(ctx *pulumi.Context) error {\n        // Deploy a builder service\n        builder, err := builder.NewBuilder(ctx, builder.BuilderComponentArgs{\n            Namespace: \"signet\",\n            Name:      \"signet-builder\",\n            Image:     \"your-registry/builder:latest\",\n            BuilderEnv: builder.BuilderEnv{\n                // Configuration\n            },\n        })\n        if err != nil {\n            return err\n        }\n\n        // Deploy an eRPC proxy\n        proxy, err := erpcproxy.NewErpcProxy(ctx, erpcproxy.ErpcProxyComponentArgs{\n            Namespace: \"signet\",\n            Name:      \"erpc-proxy\",\n            Image:     \"ghcr.io/erpc/erpc:latest\",\n            Config: erpcproxy.ErpcProxyConfig{\n                LogLevel: \"info\",\n                Projects: []erpcproxy.ErpcProxyProjectConfig{\n                    {\n                        Id: \"mainnet\",\n                        Networks: []erpcproxy.ErpcProxyNetworkConfig{\n                            {\n                                ChainId:      1,\n                                Architecture: \"evm\",\n                                Upstreams: []erpcproxy.ErpcProxyUpstreamConfig{\n                                    {\n                                        Id:       \"primary\",\n                                        Type:     \"http\",\n                                        Endpoint: \"https://eth-mainnet.example.com\",\n                                    },\n                                },\n                            },\n                        },\n                    },\n                },\n            },\n        })\n        if err != nil {\n            return err\n        }\n\n        // Deploy a complete Ethereum node\n        ethNode, err := ethereum.NewEthereumNodeComponent(ctx, \u0026ethereum.EthereumNodeArgs{\n            Name:      \"eth-node\",\n            Namespace: \"signet\",\n            ExecutionClient: \u0026execution.ExecutionClientArgs{\n                // Execution configuration\n            },\n            ConsensusClient: \u0026consensus.ConsensusClientArgs{\n                // Consensus configuration\n            },\n        })\n        if err != nil {\n            return err\n        }\n\n        // Export service endpoints\n        ctx.Export(\"builderUrl\", builder.GetServiceURL())\n        ctx.Export(\"erpcUrl\", proxy.GetServiceURL())\n        \n        return nil\n    })\n}\n```\n\n## Development\n\n### Prerequisites\n\n- Go 1.22+ (CI uses 1.22, go.mod specifies 1.24.3)\n- Pulumi CLI 3.x\n- Access to a Kubernetes cluster\n- AWS credentials (for AWS-integrated components)\n\n### Project Structure\n\n```\nsignet-infra-components/\n├── pkg/\n│   ├── aws/              # AWS resource components\n│   ├── builder/          # Builder service\n│   ├── erpc-proxy/       # eRPC proxy service\n│   ├── ethereum/         # Ethereum node components\n│   │   ├── consensus/    # Consensus client\n│   │   └── execution/    # Execution client\n│   ├── pylon/           # Pylon service\n│   ├── quincey/         # Quincey service\n│   ├── signet_node/     # Signet node\n│   ├── txcache/         # Transaction cache\n│   └── utils/           # Shared utilities\n├── go.mod\n├── go.sum\n├── README.md\n└── CLAUDE.md            # AI assistant guidelines\n```\n\n### Building and Testing\n\n```bash\n# Build all packages\ngo build -v ./...\n\n# Run all tests\ngo test -v ./...\n\n# Run tests for a specific package\ngo test -v ./pkg/builder\n\n# Verify dependencies\ngo mod verify\n\n# Update dependencies\ngo mod tidy\n```\n\n### Adding New Components\n\n1. **Create Package Directory**: `mkdir -p pkg/your-component`\n\n2. **Implement Required Files**:\n   - `types.go` - Public and internal type definitions\n   - `your-component.go` - Main component implementation\n   - `validation.go` - Input validation logic\n   - `validation_test.go` - Unit tests\n   - `constants.go` - Component constants (optional)\n   - `helpers.go` - Helper functions (optional)\n\n3. **Follow Design Patterns**:\n   - Use dual-struct pattern (public/internal types)\n   - Implement comprehensive validation\n   - Create standard Kubernetes resources\n   - Add health probes where applicable\n\n4. **Test Thoroughly**:\n   - Write table-driven tests\n   - Cover validation edge cases\n   - Aim for high test coverage\n\nSee [CLAUDE.md](CLAUDE.md) for detailed architectural patterns and best practices.\n\n## Component Configuration\n\n### Monitoring\n\nComponents expose Prometheus metrics on configurable ports, typically:\n- Application metrics: `/metrics`\n- Health endpoint: `/healthcheck` or `/health`\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Follow the component patterns described in CONTRIBUTING.md\n4. Ensure all tests pass\n5. Submit a pull request\n\n## Support\n\nFor issues, questions, or contributions, please open an issue on GitHub.\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finit4tech%2Fsignet-infra-components","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finit4tech%2Fsignet-infra-components","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finit4tech%2Fsignet-infra-components/lists"}