diff --git a/README.md b/README.md index ba66aa3..daf45e3 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,54 @@ obol stack purge -f > [!WARNING] > The `purge` command permanently deletes all cluster data and configuration. The `-f` flag is required to remove persistent volume claims (PVCs) owned by root. Use with caution. +### Installing Applications + +The Obol Stack supports installing decentralized applications on top of your local Kubernetes cluster. + +#### Aztec Network + +Aztec is a privacy-focused Layer 2 network for Ethereum. To run an Aztec node on the Obol Stack: + +```bash +obol network install aztec \ + --attester-private-key \ + --l1-execution-urls https://el-1.example.com/ \ + --l1-consensus-urls https://cl-1.example.com/ +``` + +**What this does:** +- Deploys an Aztec node in your local Kubernetes cluster +- Connects to Ethereum mainnet using the specified L1 RPC endpoints +- Configures your node as an attester using the provided private key + +**L1 RPC endpoints:** + +The Aztec node requires connections to Ethereum L1 for both the execution layer (EL) and consensus layer (CL). You can provide multiple URLs (comma-separated) for redundancy: + +| Flag | Description | +|------|-------------| +| `--l1-execution-urls` | Comma-separated list of L1 Execution RPC URLs | +| `--l1-consensus-urls` | Comma-separated list of L1 Consensus RPC URLs | + +**Example EL-CL pairs:** + +| Provider | Execution Layer (EL) | Consensus Layer (CL) | +|----------|---------------------|---------------------| +| Provider A | `https://el-1.example.com/` | `https://cl-1.example.com/` | +| Provider B | `https://el-2.example.com/` | `https://cl-2.example.com/` | + +**Example with multiple endpoints for redundancy:** + +```bash +obol network install aztec \ + --attester-private-key \ + --l1-execution-urls "https://el-1.example.com/,https://el-2.example.com/" \ + --l1-consensus-urls "https://cl-1.example.com/,https://cl-2.example.com/" +``` + +> [!NOTE] +> If `--l1-execution-urls` is not provided, the stack defaults to using the internal ERPC endpoint. + ### Working with Kubernetes The `obol` CLI includes convenient wrappers for common Kubernetes tools. These automatically use the correct cluster configuration: diff --git a/internal/embed/networks/aztec/helmfile.yaml.gotmpl b/internal/embed/networks/aztec/helmfile.yaml.gotmpl index 45279d7..2a0aa05 100644 --- a/internal/embed/networks/aztec/helmfile.yaml.gotmpl +++ b/internal/embed/networks/aztec/helmfile.yaml.gotmpl @@ -4,12 +4,12 @@ values: - network: {{ env "AZTEC_NETWORK" | default "mainnet" }} # @description Attester private key (hex string) attesterPrivateKey: {{ env "AZTEC_ATTESTER_PRIVATE_KEY" }} - # @description L1 Execution RPC URL override (defaults to local erpc endpoint based on network) - l1ExecutionUrl: {{ env "AZTEC_L1_EXECUTION_URL" | default "" }} - # @description L1 Consensus RPC URL - l1ConsensusUrl: {{ env "AZTEC_L1_CONSENSUS_URL" | default "https://ethereum-beacon-api.publicnode.com" }} - # Computed value: L1 Execution URL - uses override or defaults to erpc endpoint - __l1ExecutionUrl: {{ if (env "AZTEC_L1_EXECUTION_URL") }}{{ env "AZTEC_L1_EXECUTION_URL" }}{{ else }}http://erpc.erpc.svc.cluster.local:4000/rpc/{{ env "AZTEC_NETWORK" | default "mainnet" }}{{ end }} + # @description Comma-separated list of L1 Execution RPC URLs (defaults to local erpc endpoint based on network) + l1ExecutionUrls: {{ env "AZTEC_L1_EXECUTION_URLS" | default "" }} + # @description Comma-separated list of L1 Consensus RPC URLs + l1ConsensusUrls: {{ env "AZTEC_L1_CONSENSUS_URLS" | default "https://ethereum-beacon-api.publicnode.com" }} + # Computed value: L1 Execution URLs - uses override or defaults to erpc endpoint + __l1ExecutionUrls: {{ if (env "AZTEC_L1_EXECUTION_URLS") }}{{ env "AZTEC_L1_EXECUTION_URLS" }}{{ else }}http://erpc.erpc.svc.cluster.local:4000/rpc/{{ env "AZTEC_NETWORK" | default "mainnet" }}{{ end }} --- @@ -45,9 +45,13 @@ releases: - --network - '{{ .Values.network }}' l1ExecutionUrls: - - '{{ .Values.__l1ExecutionUrl }}' + {{- range $url := splitList "," .Values.__l1ExecutionUrls }} + - '{{ $url | trim }}' + {{- end }} l1ConsensusUrls: - - '{{ .Values.l1ConsensusUrl }}' + {{- range $url := splitList "," .Values.l1ConsensusUrls }} + - '{{ $url | trim }}' + {{- end }} resources: requests: cpu: "4"